Next Commerce

Send NEXT order data to Shopify

v1.4Updated Oct 6, 2026

Copy NEXT order and attribution metadata, such as a Meta or Google click ID, into Shopify order metafields with Shop Sync.

Shop Sync can copy NEXT order and attribution metadata into Shopify order metafields. Use it to give your Shopify apps and reports the values your campaigns capture, such as a Meta or Google click ID or any custom field you define.

Shop Sync needs to be connected first. See Set up Shop Sync.

Map a metadata field

  1. In NEXT, create the field under Settings → Metadata Fields (create metadata definitions).
  2. In Shopify admin, create an Orders metafield definition under Settings → Custom data, with the type that matches the NEXT field (table below).
  3. In Shop Sync, click Add Metadata Sync. Choose the NEXT field under Next Commerce Metadata and the Shopify definition under Shopify Order Metafield, then click Save.

Only order and attribution metadata fields appear in the list. If the two types do not match, Shop Sync shows "Metadata type mismatch" and does not save the mapping.

Shop Sync writes the metafields once, when it creates the order in Shopify. Fields with no value on the order are left out.

Match the types like this:

NEXT metadata typeShopify metafield type
textsingle_line_text_field
multi_textmulti_line_text_field
integernumber_integer
decimalnumber_decimal
booleanboolean

Send click IDs to Shopify

The Campaign Cart SDK records click IDs on every order without any code on your pages. To send one to Shopify, create the metadata field and map it.

Click IDMetadata key the SDK writes
Meta click ID (fbclid URL parameter)fbclid
Meta browser cookies _fbc and _fbpfb_fbc, fb_fbp
Generic clickid URL parameterclickid
Everflow click ID (evclid URL parameter)everflow_transaction_id
  1. In Settings → Metadata Fields, create a field with object attribution, type text, and the key from the table, for example fbclid.
  2. In Shopify, create an Orders metafield definition of type single_line_text_field, for example namespace next, key fbclid.
  3. In Shop Sync, click Add Metadata Sync, choose the two fields, and click Save.

Google click ID

The SDK records gclid as a standard attribution field rather than as metadata. To send it to Shopify, copy it into metadata on your landing pages, then create and map the field as above with the key gclid:

window.nextReady = window.nextReady || [];
window.nextReady.push(function (next) {
  var gclid = next.getAttribution()?.gclid;
  if (gclid) {
    next.addMetadata('gclid', gclid);
  }
});

Subscriptions

Shop Sync sends subscription renewals to Shopify like any other order and copies the renewal order's metadata. To carry a value onto renewals, set it on the subscription's attribution metadata through the Admin API. See the subscription update API reference.

On this page