Inventory Sandbox
This document describes the sandbox scenarios for inventory items, as implemented for the sandbox provider. These scenarios allow automated testing and simulation of approval, rejection, and stock on hand flows based on the SKU value.
Approved Scenario
Section titled “Approved Scenario”If the SKU ends with 010, the inventory item is automatically approved. The SKU is set as the provider reference.
Trigger:
sku.endswith("010")
Result:
- Approval status:
APPROVED - Provider reference: SKU value
Rejected Scenario
Section titled “Rejected Scenario”If the SKU ends with 200, the inventory item is automatically rejected. The reason is set to OTHER. This simulates cases where the provider cannot create the inventory item due to failure or incorrect data.
Trigger:
sku.endswith("200")
Result:
- Approval status:
REJECTED - Reason:
OTHER
Stock On Hand Scenario
Section titled “Stock On Hand Scenario”If the SKU ends with 011, the inventory item is approved (as in the Approved Scenario) and stock on hand is created for that item. The stock on hand is assigned to the last updated warehouse in the platform. If there are no warehouses, a placeholder HTTP reference is used.
Trigger:
sku.endswith("011")
Result:
- Approval status:
APPROVED - Provider reference: SKU value
- Stock on hand created for the inventory item
- Warehouse: Last updated warehouse or placeholder reference if none exist