> ## Documentation Index
> Fetch the complete documentation index at: https://developer.fabric.inc/llms.txt
> Use this file to discover all available pages before exploring further.

# Cart FAQ

## 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's recommended to use the following three fabric services to support the cart functionality, along with validation:

1. [fabric Product Catalog](/v3/api-reference/products/product-operations-by-id/products-api) for item validation during [add-to-cart](/v3/api-reference/cart/line-items/create-a-line-item) and [cart retrieval](/v3/api-reference/cart/carts/get-a-cart). It ensures the product being added to the cart is both available and active.
2. [fabric Offers](/v3/api-reference/offers/offers--3-0-0) for price validation, promotions, and coupon application during [add-to-cart](/v3/api-reference/cart/line-items/create-a-line-item) and [cart retrieval](/v3/api-reference/cart/carts/get-a-cart). It's used to get the current pricing and promotions for products.
3. [fabric Inventory](/v3/api-reference/inventory/inventory/overview) for validation during [add-to-cart](/v3/api-reference/cart/line-items/create-a-line-item) and [cart retrieval](/v3/api-reference/cart/carts/get-a-cart). It's 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 ([Product Catalog](/v3/api-reference/product-catalog/product-operations-by-id/products-api), [Inventory](/v3/api-reference/inventory/inventory/overview), and [Offers](/v3/api-reference/offers/offers--3-0-0)) 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're 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](/v3/api-reference/cart/cart--3-0-0) endpoints.

### User or Shoppers

#### 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 `customer.id` 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](#fabric-cart-configuration-and-behavior) 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](#fabric-cart-configuration-and-behavior) and use cases related to it. Also refer to [Merge Cart](#fabric-cart-configuration-and-behavior) endpoint.

#### Q: How do I apply a coupon to a cart

A: Refer to [Apply Coupon](/v3/api-reference/cart/carts/apply-coupon-to-cart) and [Remove Coupon](/v3/api-reference/cart/carts/remove-coupon-from-cart) 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 price list 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](/v3/api-reference/cart/line-items/create-a-line-item) or during [cart retrieval](/v3/api-reference/cart/carts/get-a-cart). 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](/v3/api-reference/cart/line-items/create-a-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](/v3/api-reference/cart/carts/create-a-cart) itself to capture further relaxant custom information that's 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`.
