Expected Catalog Information
Cloudshelf holds a catalog of your products which have been ingested into the system; either via a pre-built connector or via the API.
This catalog is used to display information about your products to your users.
During ingestion, the Cloudshelf API will return user errors if we can't ingest some of the data, but another way to ensure the catalog is synchronised as you expected is to report the expected catalog information to the API.
This is done via the ReportCatalogStats Mutation .
The ReportCatalogStats
mutation has parameters for each key catalog entity, all of these are all optional; as a best practice, you should report the expected catalog information at least once per sync for each entity.
Best practice usage:
#
As an example, our Shopify Connector will call the mutation twice, once when we ingest the products, and once when we ingest the product groups.
- During the product sync, we know how many products, variants and images should exist, and we report these to the ingest API.
- During the product group sync, we know how many shopify collections should exist, and we report them to the ingest API.
Finally, if Shopify returns an error suggesting the store has been closed (fraud, billing issues etc), we report the retailer has closed.
Ingest Product Groups