Sync your Shopify customer, product, and order data to Optimizely Data Platform (ODP) for personalized marketing campaigns by maintaining consistent consent management across both platforms.
Data types imported from Shopify
Customer data
ODP receives the following customer data from Shopify when you import or update customer data:
- Profile information – The customer's first name, last name, email address, phone number, default shipping address, and customer tags.
-
Marketing consent fields – The customer's email marketing consent and the corresponding timestamp.
-
Email marketing consent – Maps to the
shopify_accepts_marketingfield. -
Consent timestamp – Maps to the
shopify_accepts_marketing_updated_atfield.
-
Email marketing consent – Maps to the
- Identifiers – The Shopify customer ID, used as a primary, high-confidence identifier, and the Shopify cart token, used for cart tracking as a low-confidence identifier. See Identifiers.
Product data
ODP imports the following product data from Shopify and periodically refreshes:
- Product fields – The product and variant ID, product title and description, product type, handle, product tags, quantity available, published date, and pricing information.
Order data
ODP imports the following transaction history from Shopify:
- Order-level information – The order ID and name, order timestamp, financial status (such as paid, pending, authorized, and more), customer information, total amount including tax, shipping, and discounts, applied discount codes, order tags, and billing and shipping address.
- Line item information – The product ID and SKU, price and quantity, discount amount, and item subtotal for each product in the order.
- Refund and cancelation tracking – Refund transactions with amounts and timestamps, order cancelations, and currency conversions for multi-currency refunds.
Data sent to Shopify
ODP sends the following types of data to Shopify:
Email marketing consent updates
To ensure compliance with Shopify's Terms of Service, the integration syncs a customer's updated email consent data, such as suscribed or unsubscribed, marketing opt-in level (set to unknown), and the consent updated timestamp, to Shopify. This ensures marketing preferences remain consistent.
The integration syncs the data in the following way:
- Runs nightly, once a day.
- Only processes consent changes that occurred in ODP since the last sync.
- Includes a 30-minute overlap to capture in-flight data changes.
ODP does not create new Shopify customers and only updates existing customers.
Map email marketing consent in ODP
The integration uses the following field mapping to map Shopify's consent system to ODP's consent management:
- The
shopify_accepts_marketingfield records whether a customer opted in to receive marketing emails from your Shopify store. This is a Boolean data type with the valuestrue,false, andnull.-
true– Customer opted in to receive marketing communications. -
false– Customer opted out of receiving marketing communications. -
null– Consent status is unknown or not applicable.
-
- The
shopify_accepts_marketing_updated_atfield records when the marketing consent preference was last changed. This is aTimestamp(Unix epoch time) data type that lets you- Track when consent preferences were last updated.
- Track audit consent changes over time.
- Determine if consent information is current or changed.
Unknown consent
When shopify_accepts_marketing returns a null value, it indicates one of the following scenarios:
- Customer never provided consent preference – New customers were not asked about marketing preferences.
-
Shopify state is ambiguous – States like
pending,invalid, ornot_subscribeddo not clearly indicate consent.
If you receive unknown consent, do not assume consent, and track whether consent information transitioned from null to a defined state.
There might be a delay in displaying updated consent information in the Customer Profile > Identifiers page on ODP. Wait a few minutes for consent changes to display in the UI.
Configure Shopify
- In your ODP account, go to Data Setup > Integrations > Shopify.
- Enter your store name and click Log In.
-
Log in to Shopify.
- Select Install unlisted app to grant the ODP app the required integration permissions.
- Start your historical data import in ODP by selecting Start Bulk Import. The import could take up to a few hours depending on the number of historical orders and customers.
Article is closed for comments.