Marqo settings not found for shop {shop_id}
Background
When calling the ecom API, the Cloudflare worker first needs to look up index settings from its KV store to get the search config, the API key to use for the downstream call, etc.
If these settings are missing, the ecom API must fail. This is the case when calling the API for an index that doesn’t exist, so the error will be a 404 Not Found. If the index does in fact exist, there is likely a bug preventing the ecom API to read settings from the KV store (either they’re not there, or the worker can’t load them).
Process
- Index settings are stored in the prod-search-proxy-kv KV store. First check the list of KV Pairs to verify your shop ID is in fact missing.
- If the settings are present, the ecom API worker is failing to read them. This should give a more specific error, so try to check the logs and figure out what’s wrong.
- The source of truth for settings is the prod-EcomIndexSettingsTable in DynamoDB (
[PRODUCTION] [us-east-1] Cloud controlleraccount). Check that table to verify your index has settings there (pk = "{system account ID}",sk = "INDEX#{index_name}").- If the settings record is not present, the index either doesn’t actually exist, or it is not an “ecommerce index” (i.e. created via the ecom API, or otherwise initialised as an ecom index). Consider create ecom index or Convert classic index to an ecommerce index
- If the record is present in DDB but not KV store, then the prod-EcomSettingsExporterLambda has failed to export DDB to KV store. This will usually be due to a data validation error (to avoid exporting invalid data to Cloudflare and causing validation issues at runtime).
- First, check the Lambda’s monitoring tab to see if it has recent failures, and/or search its logs for the string ERROR.
-
If there appears to be no issue, or the issue has been identified and fixed, you can try to trigger a new sync. There are two ways to do this:
- Edit ecommerce index settings as usual. This will trigger the Lambda via DDB Streams.
-
Invoke the Lambda directly. You can pass one of the event bodies below to sync either a single index or all indexes in an account:
# Single index { "system_account_id": "{id}", "index_name": "{name}" } # All indexes in account { "system_account_id": "{id}" }
-
Go back to step one to verify that the record has synced to KV store.