Store integrations
Wire a store webhook to a Cloud Bridge integration. Each integration owns its mappings, signing secret, and delivery log.
Overview
A store integration links your e-commerce platform to Cloud Bridge. When configured, your store sends a webhook on each order and Cloud Bridge processes it to deliver the purchased presets or captures to the customer's Cortex Cloud account.
Cloud Bridge supports three store providers:
| Provider | Webhook source | Signature header |
|---|---|---|
| Shopify | Order creation / payment webhooks | X-Shopify-Hmac-Sha256 |
| WooCommerce | Order completed webhooks | X-WC-Webhook-Signature |
| Generic | Any HTTP POST with JSON body | X-Webhook-Signature or X-NDSP-Signature |
Creating an integration
- Go to Integrations in your Cloud Bridge dashboard.
- Click New integration and choose your store provider.
- Give it a name (e.g., "My Shopify Store").
- Copy the Webhook URL and Signing secret that are generated.
- Configure your store to send order webhooks to the provided URL.
https://<your-domain>/api/webhooks/<provider>/<integrationId>
Item mappings
Item mappings tell Cloud Bridge which NDSP asset to deliver for a given store product. Each mapping connects a store identifier to a preset or capture on Cortex Cloud.
Match types
| Match type | Description | Example value |
|---|---|---|
sku |
Matches the product SKU from the order line item | STORM-LEAD-V2 |
productId |
Matches the store's product ID | 7891234567890 |
variantId |
Matches a specific product variant ID | 43210987654321 |
title |
Matches the product title (case-insensitive) | Storm Drive Lead Preset |
Resource types
Each mapping specifies whether the NDSP asset is a preset or a capture:
preset, a Quad Cortex preset file shared on Cortex Cloudcapture, a neural capture shared on Cortex Cloud
{
"matchType": "sku",
"externalRef": "STORM-LEAD-V2",
"resourceType": "preset",
"resourceId": "abc123-preset-id"
}
Shopify setup
- Create a Shopify integration in your Cloud Bridge dashboard and copy the webhook URL.
- In your Shopify admin, go to Settings → Notifications → Webhooks.
- Click Create webhook.
- Set the event to Order creation (or Order payment).
- Set the format to JSON.
- Paste the Cloud Bridge webhook URL.
- Save the webhook. Shopify will now send order data to Cloud Bridge automatically.
WooCommerce setup
- Create a WooCommerce integration in your Cloud Bridge dashboard and copy the webhook URL and signing secret.
- In your WordPress admin, go to WooCommerce → Settings → Advanced → Webhooks.
- Click Add webhook.
- Set Status to Active.
- Set Topic to Order updated or Order created.
- Set Delivery URL to the Cloud Bridge webhook URL.
- Set Secret to the signing secret from Cloud Bridge.
- Save the webhook.
Generic / custom store
For platforms not natively supported, use the Generic provider. Send a POST request with a JSON body and an HMAC-SHA256 signature header.
POST /api/webhooks/generic/<integrationId>
Content-Type: application/json
X-Webhook-Signature: sha256=<hmac-hex>
{
"orderId": "order-1234",
"customerEmail": "fan@music.com",
"targetUsername": "cortex_user_42",
"items": [
{
"sku": "STORM-LEAD-V2",
"title": "Storm Drive Lead Preset",
"quantity": 1
}
]
}
Computing the signature
Sign the raw request body with your webhook signing secret using HMAC-SHA256 and include the hex digest in the X-Webhook-Signature header:
const crypto = require('crypto');
const signature = 'sha256=' +
crypto.createHmac('sha256', webhookSecret)
.update(rawBody)
.digest('hex');
Delivery statuses
Each delivery attempt progresses through one or more statuses:
| Status | Description |
|---|---|
| queued | Delivery has been accepted and is waiting to be processed |
| running | Cloud Bridge is actively working on the delivery |
| retry_scheduled | Cloud Bridge will try again. This includes waiting for the customer to follow back in Cortex Cloud. |
| action_required | The merchant needs to fix credentials, username, credits, integration status, or product mapping. |
| completed | Preset or capture was successfully shared |
| failed_permanent | Delivery failed. Check the resolution code for details. |
| cancelled | Delivery was manually cancelled |
| duplicate | Skipped because the same delivery was already processed |
Failure resolution codes
When a delivery fails, a resolution code explains why:
| Code | Meaning |
|---|---|
missing_username | No NDSP username was found in the order |
invalid_username | The username does not exist on Cortex Cloud |
missing_credentials | You have not saved your NDSP credentials |
inactive_api_key | The API key used is deactivated |
credits_exhausted | Your account does not have enough credits for the next paid action |
no_item_mapping | No item mapping matched the purchased product |
order_status_filtered | The order status is not configured for delivery |
ndsp_waiting | Cloud Bridge is waiting for the customer to follow back in Cortex Cloud |
temporary_failure | Cortex Cloud or the worker had a temporary problem and will retry |
duplicate | The same webhook event was already accepted |
unknown | The delivery could not be classified safely |
missing_username or invalid_username can be retried after updating the customer's NDSP username from the Integrations page.