Sync a cart item catalog
Cart item catalogs allow you to synchronize your product information management (PIM) system with Talon.One. They are also necessary for using strikethrough pricing in your campaigns.
After you create a cart item catalog in the Campaign Manager, you can update it programmatically via the Sync cart item catalog endpoint. Use this endpoint to add or remove one or more items in your catalog, or update the attributes of items. See the catalog sync actions below.
To check which items exist in a certain catalog, call the List items in a catalog endpoint.
A catalog can be connected to several Applications, but an Application can only be connected to one catalog.
Best practices
To ensure optimal data processing and performance, follow these best practices when integrating with the Sync cart item catalog endpoint:
-
Only sync items that have changed, rather than the entire catalog.
-
Implement batching for catalog sync requests and avoid sending one item per request. Instead:
- Sync multiple items in a single request.
- Limit the number of items to 1000 per request.
- Send multiple smaller batch requests instead of large payloads.
-
Avoid sending concurrent requests, as this can cause performance issues. Never send them for the same SKU, and use them for different SKUs only when necessary.
-
Before syncing a catalog, ensure all the required custom attributes for a cart item are created in the Campaign Manager. If an item requires an attribute and is synced without one, this triggers an error. If you're uncertain about which custom attributes are required, contact your Technical Account Manager.
-
When updating an item, ensure the SKU in the catalog matches the SKU sent under
cartItemsin the Update customer session request payload. -
Align with your Technical Account Manager or Customer Success Manager on the following:
- The catalog-related features you want to use, since they may need to give you access to features in closed beta.
- The size of the catalog you want to create and sync with Talon.One. This is particularly important for large-scale catalogs with millions of items, where aligning on sync dates is important for avoiding performance issues or timeouts.
-
Implement a retry mechanism in case a catalog sync fails, following these guidelines:
- Do not cancel a request to immediately retry it, since these retries create additional load. Increase timeout instead.
- Retries should include exponential backoff.
- Retrying Update customer session requests is a safe operation. Any other retries risk duplication.
-
Implement a queuing mechanism for catalog sync requests.
-
Send requests outside of business hours.
Catalog sync actions
Use the following action types in the endpoint to synchronize a catalog.
| Action type | What it does |
|---|---|
ADD | Adds an SKU to the cart item catalog. Contains the "replaceIfExists": true property, which can be used to update an existing item without creating duplicates. |
PATCH | Adds values to attributes for a specific SKU. |
PATCH_MANY | Adds values to attributes for several SKUs in a single API request. |
REMOVE | Deletes an SKU and all its related data (price, custom attribute values, etc.) from a catalog. |
REMOVE_MANY | Deletes several SKUs and all their related data from a catalog. |
ADD_PRICE_ADJUSTMENT | Assigns a specific price value to a catalog item. |
-
Using the
PATCH_MANYandREMOVE_MANYaction types can potentially lead to performance degradation if requests include multiple specific attributes for filtering cart items. -
For large catalogs where using
REMOVE_MANYmay impact many items, use theREMOVEaction type.