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

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

Make sure you have sign up to Shopify and also check access to Shopify’s admin dashboard. Admin dashboard URL should be something like: https://mydemostore.myshopify.com/admin, where mydemostore is the name you used to sign up.

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

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

Tests Connectivity

Shopify offers the Send test notification option on each created Webhook item. Click it and it should send a test event to mParticle’s. You can see these events in 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 will map 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
  1. 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?