CategoriesAll

Feed

Shopify is an ecommerce platform that has everything you need to sell online, on social media, or in person. The mParticle Shopify integration uses Webhooks.

Data Processing Notes

  • Shopify will remove configured webhooks if the webhook destination repeatedly returns a non-200 status response.
  • Any request with a supported topic and domain will return a 202 (Accepted) response.
  • Any request that does not contain an email will return a 202 (Accepted) response, indicate the missing identity, but will not be processed.
  • Any request that contains an unsupported topic will return a 400 (Bad Request) response and won’t be processed.

Enable the Integration

Execute the following steps in mParticle platform and in Shopify to enable the integration

mParticle - Input Feed Creation

The following steps must be executed in mParticle’s platform

  1. Select Directory, and click the Shopify tile (if you don’t see it, use the search bar to find it)
  2. Click Add Shopify to Setup
  3. Select the Input Feed as Integration Type and click Configure. If you have done this before, click on Go to Setup, look for the Shopify group and select + Configure
  4. Input the configuration parameters

    • Configuration Name
    • Environment
  5. Click Save
  6. Copy the Webhook URL

This Webhook URL will be used in steps concerning Shopify’s Webhook creation

Shopify - Create Webhook for a Shopify Topic

Ensure you have signed up for a Shopify account, and verify you have access to the Shopify admin dashboard. The Admin dashboard can be reached by going to https://admin.shopify.com/store/mydemostore, where mydemostore is the name you chose for your store when created.

  1. Navigate to your Shopify admin dashboard
  2. Navigate to Settings > Notifications > Webhooks section
  3. Click Create webhook option
  4. For Event, select one of the Supported Events by mParticle
  5. For Format, select JSON
  6. For URL, paste the Webhook URL that was generated in Input Feed Creation section
  7. For Webhook API version, select 2023-07

    • If 2023-07 is not available, select the most recent stable version.
  8. Click Save

If you want to know more technical details, please review Shopify webhooks

Testing Connectivity

Each webhook within Shopify should display a Send test notification button after creation. When clicked, Shopify will send a test notification to mParticle which should be visible in the mParticle Live Stream.

Supported Events

These are the mParticle supported events that can be used when you Create Webhook for a Shopify Topic

Shopify Event Shopify Topic
Checkout checkouts/create, checkouts/update
Customer customers/create, customers/disable, customers/enable, customers/update
Draft Order draft_orders/create, draft_orders/update
Fulfillment fulfillments/create, fulfillments/update
Order orders/cancelled, orders/create, orders/fulfilled, orders/paid, orders/partially_fulfilled, orders/updated

Event Mappings

Customer Events

Customer events are mapped to Custom Events of type other and events names:

Shopify Topic mParticle Event Name
customers/create create_customer
customers/disable disable_customer
customers/enable enable_customer
customers/update update_customer

Commerce Events

All other events are mapped to Product Action Commerce Events:

Shopify Topic mParticle Product Action
orders/cancelled refund
orders/create checkout
orders/fulfilled checkout
orders/paid purchase
orders/partially_fulfilled checkout
orders/updated checkout
fulfillments/create checkout
fulfillments/update checkout
draft_orders/create checkout
draft_orders/update checkout

Attribute Mappings

  1. Any Shopify fields that contain blank or null values will not be stored.
  2. All line item properties are set to mParticle product properties when available. All others are set as product custom attributes.
  3. The Shopify SKU field maps to product.id. The Shopify product_id and key fields will be set as product custom attributes.
  4. The following Shopify fields will be set as event custom attributes:

    • API-version
    • created_at
    • domain
    • topic
  5. Fields whose values are arrays of strings are processed by converting the entire array to a single string. Below is an example:
{
  "tags": [
    "Barnes & Noble",
    "John's Fav",
    "Big Air"
  ]
}
{
  "tags": "Barnes & Noble, John's Fav, Big Air"
}
  1. Fields whose values are arrays of objects/dictionaries are processed by flattening the array. Below is an example:
{
  "price_set": {
    "shop_money": {
      "amount": "199.00",
      "currency_code": "USD"
    },
    "presentment_money": {
      "amount": "199.00",
      "currency_code": "USD"
    }
  }
}
{
   "price_set.shop_money.amount": "199.00",
   "price_set.shop_money.currency_code": "USD",
   "price_set.presentment_money.amount": "199.00",
   "price_set.presentment_money.currency_code": "USD"
}

User Attribute Mappings

mParticle will map user properties to User Attributes. All other user properties will be stored as user attributes prefixed with shopify_

Shopify Field mParticle field
default_address.address1, default_address.address2 $address
default_address.city $city
default_address.country_code $country
first_name $firstname
last_name $lastname
default_address.zip $zip

Supported Identities

User Identities

  • Email

Was this page helpful?