Sync Your Product Feed via API
You can update your feed periodically, as described in Create & Sync a Product Feed Using a Data File, Or use an API to update only the changes (rather than syncing the entire feed). This can be helpful to quickly sync a feed with a large number of products, which can take some time to sync by file.
Syncing your product catalog with Dynamic Yield via API includes the following steps:
- Create the Product Feed in Experience OS.
- Generate an API key to include in each API call.
- Implement the API calls to send data to Dynamic Yield. Calls include performing a bulk update or getting a transaction status.
Ensure your feed is correctly structured, including mandatory and custom columns, along with localization.
Set up the feed
- If you do not yet have a product feed, go to Assets › Data Feeds and create it.
- For the Feed Source, select Sync via API.
- Add any optional properties that will be included in each item of the product feed by clicking New Property. These can later be used for:
- Targeting (for example, if you add "color", you can target users who purchased blue items)
- Affinity scores (for example, include color affinity in the affinity recommendation algorithm)
- Defining merchandising rules in your recommendation widgets (for example, never recommend products of a specific brand).
- Custom properties must follow these guidelines:
- Values must be strings, up to 1,000 characters, with no special characters.
- Property names must not start with '_id'.
- After you add a custom property, you can't remove it. You can stop using it or return empty values, but the property must be in any future items.
To set up your feed to support sites or apps with multiple languages, see Multi-Language Support for Product Feeds
- Click Save and Activate to complete the process.
Generate an API Key to include in each API call
To enable this feature, contact your account team. To generate an API Key:
- Go to Settings › API Keys and click New Key.
- Specify Feed for the ACL value and click Save.
- Copy the value of the key to a secure location.
Implement the API call
See the API reference: Update Product Feed
The set of APIs includes:
- Bulk update: Perform multiple API actions in a single call. Partial update, upsert, or delete one or more items in your feed.
- Transaction Status: Get the status of either a specific item or a transaction.
Test your feed
- Send a Bulk Update request as defined in the previous section.
- The API call returns a transaction ID called transaction_id in the response. Using this ID, go to the API log and search for the API call status.
- In the log, ensure that the API request status is correct (202).
- Track transaction status: In addition to checking for the transaction_id in the API Logs, you can use one of the two following Track Transaction Status APIs:
- Sync time: It shouldn't take more than 90 seconds for a transaction to propagate fully (from getting a status 202 from the Update Product Feed API to getting a 200 status from the Track Transaction Status API). If it takes longer than 90 seconds, we would consider it a bug, and you should contact Support.
Feed sync status
You can view the product feed sync status on the Data Feeds page.
The status is indicated by an icon, and represents the summary of the last 7 days. The date is the last date the status was calculated. View the API log for more details.
Prerequisites and limitations
- If you're changing the sync method from periodic sync to API, your feed must be synced in accordance with the Dynamic Yield schema, without a parser function, and as a CSV file.
- API request limits:
- Up to 600 requests per minute
- Up to 100 actions per batch (using bulk requests)
- Payloads that exceed 33K will not be displayed in the API logs
Updated about 1 month ago