Skip to content

Convert classic index to an ecommerce index

Context

Ecommerce indexes are not just a thin wrapper around a Marqo Classic index. They require additional config records in DDB and per-index AWS resources (e.g. SQS queues). These are automatically set up when creating a new ecommerce index, but require an extra step for existing Classic indexes.

Process

  • Call the create index ecom API for the existing index, with the extra field allowExisting: true in the body. This will perform all the steps that would normally happen when creating a new ecom index (e.g. provisioning DDB records and SQS queues), but not actually create the index.

    curl -X POST \
        <your ecom API URL, e.g. dev or staging>/api/v1/indexes \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer YOUR_API_KEY" \
      -d '{
      "indexName": "EXISTING_INDEX_NAME",
      "modelType": "ecommerce",
      "allowExisting": true
    }'
    
    staging index URL: https://staging-ecom.dev-marqo.org
    

    This is sufficient to start using the ecom API for this index.

  • To make Console treat the index like an ecom index, add {metadata: {shopId: "INDEX_SHOP_ID"}} to the CustomerIndexConfigTable

    • For regular ecom indexes (i.e. not created through the Shopify integration), “shop ID” is just {SYSTEM_ACCOUNT_ID}-{INDEX_NAME}.
    • For now this is a manual operation. Use Escalator: Self-Service Admin for prod admin access if your index is in prod.