Cart FAQ(s)

fabric Cart: Configuration and Behavior

Q: What are the pre-requisite fabric services required to work with fabric Cart?

A: When working with the fabric Cart, it is recommended to use the following three fabric services to support the cart functionality, along with validation:

  1. fabric products (previously known as PIM) for item validation during add-to-cart and cart retrieval. It ensures the product being added to the cart is both available and active.
  2. fabric Offers for price validation, promotions, and coupon application during add-to-cart and cart retrieval. It is used to get the current pricing and promotions for products.
  3. fabric Inventory for validation during add-to-cart and cart retrieval. It is used to confirm the product availability.

Q: How can I control the interaction between fabric Cart and other fabric services?

The co-ordination between cart and the other three services (Products, Inventory, and Offers) can be configured through "validations" as follows:

  1. Inventory for availability validation:
    a. ON
    b. OFF
  2. Products for status validation:
    a. ON
    b. OFF
  3. Offers for pricing retrieval, validation, and promotion validation
    a. ON
    b. OFF
    These configuration settings are managed by fabric as part of your onboarding process (currently, they are not supported through Copilot UI).

Q: How can I modify a cart's behavior? What options are available?

A: There are two primary ways to manage configuration in a cart and change its behavior:

  1. Tenant-level configuration: Supports the previously-mentioned "validation" switches set by fabric staff and systems.
  2. Cart-level or run-time configurations (part of endpoint requests): These settings affect the behavior of a specific cart and can be set by developers when using cart endpoints. Refer to Cart endpoints.

User or Shoppers

Q: How do I identify the shopper, whether they are a guest or a registered user?

If fabric Shopper Identity is being used, it will provide unique identifiers for shoppers. When calling fabric Cart service, you would use the S2S (System to System) authorization token to identify the shopper in any cart endpoint using

Q: Can I use an external IDP to identify my shoppers? How?

A: Yes, you can use any external IDP. Simply use the S2S authorization token and then pass the identifier from you IDP as to any cart-related endpoint requests.

Q: What type of shoppers does fabric Cart support?

A: fabric Cart supports both guest users and registered users. Refer to FAQs on cart merging for further details.

Q: How do I merge carts when transitioning from guest flows to logged-in flows?

A: See our recipe on cart merging and use cases related to it. Also refer to Merge Cart endpoint.

Q: How do I apply a coupon to a cart

A: Refer to Apply Coupon and Remove Coupon for details.

Product and related concepts

Q: How do I add an item to fabric Cart?

A: The following are the pre-requisites to add an item to fabric Cart:

  1. An active product exists.
  2. An active pricelist exists.
  3. Inventory exists for the product.

Q: How do I know when an item is out of stock?

A: When inventory validations are enabled (ON), you can identify if an item is out of stock during the process of add-to-cart or during cart retrieval. If the item is out of stock, it will be marked as inActive (isActive = false) in cart, and error message will be shown. Specifically, the inventoryErrors within errors will be populated for all items that are out of stock.

Q: Where can I store custom data about the item in fabric Cart?

To store custom information about items in cart, you can use attributes at the line item level. These attributes allow you to store and associate additional custom data with specific items.
Note: In addition, you have the flexibility to add custom attributes to cart object itself to capture further relaxant custom information that is not specific to a product.

Fulfillment - Shipping and Other Options

Q: What are the fulfillment methods supported by fabric?

A: fabric supports the following fulfillment methods:

  1. WEB_SHIP - Shipping to a physical address.
  2. WEB_SDD - Shipping to a physical address for the same-day delivery (SDD).
  3. WEB_PICKUP - Buy Online and Pickup in Store (BOPIS).

Q: Is 'split' fulfillment (between two or more address or two different fulfillment methods) supported?

A: Yes, fabric supports split fulfillment. You can add multiple ShippingDetails (with delivery address or pickup details). Then you can assign them items in the cart to these ShippingDetails.