Q: How can I insert fees, discounts, and taxes both at the order level and at the item level?

A:

  • To insert at item level: include discounts, fees, and tax details inside the items array while creating an order.
  • To insert at order level: include discounts, fees, and tax details outside the items array while creating an order. For examples and details, see the request payload of Order Create.

type field is used as an identifier for each of the discounts, fees, and taxes.

Q: How can I upload inventory if I have more than one POS, WMS, or other sources of truth for inventory?

A:

  1. Prepare a .csv file with all the inventory details.
  2. Use the bulk operation endpoint POST/api/v2/inventory/aws/upload-url to create an URL
  3. Upload the .csv file to the created URL generated using the second point.

Q: What are counters and how are they updated?

A: There are two types of counters- Base Counter and Virtual Counter. Base counters refer to onHand, Allocated, Shipped, and any other custom counters that are created using the counter endpoint. Virtual counter refers to the availableToPurchase counter.

  1. Base counters can be updated (except Allocated as it is automatically calculated during order workflow )using:
    • adjustment endpoint: Use PUT/api/v2/inventory/adjustment to adjust the counter quantity. Using this endpoint, you can only adjust the counter quantity, not other inventory details, such as type, lead time, and so on. Based on the counter quantity you mention in the payload while calling the endpoint, the original counter quantity is increased or decreased. For example, if the original counter quantity is 100 (that you mention while creating the counter), and mention the counter quantity as ‘+10’ or ‘-10’ in the payload while calling the adjustment endpoint, the original counter quantity is adjusted by 110 (100+10) or 90 (100-10) respectively.
    • Update inventory endpoint: Use PUT/api/v2/inventory to update counter quantity as well as other inventory details.
  2. Virtual counter (availableToPurchase) is calculated/updated during the order workflow. When an order is placed, fabric OMS automatically allocates the order, and then the order is picked, packed, and shipped. Once the order moves to the allocated and shipped phase, availableToPurchase is calculated based on the formula onHand-allocated-shipped.