Data processing
Once the app installation is complete, Braze automatically creates your webhook and ScriptTag integration with Shopify. See the following table for more details on how the supported Shopify events map to Braze custom events and custom attributes.
Supported Shopify events
Event Name | Braze Event Type | Triggered When… | Event Source |
---|---|---|---|
shopify_product_viewed |
Custom Event | Product views will trigger when products are fully visible on the Shopify store to the customer. | ScriptTag integration |
shopify_product_clicked |
Custom Event | Product clicks will trigger as soon as the customer clicks into the product information page. | ScriptTag integration |
shopify_abandoned_cart |
Custom Event | As soon as a customer adds items to their cart, Braze will store the cart token ID. The default Abandoned Cart Delay is set at 1 hour. Meaning, after 1 hour of cart abandonment where no updates have been made to the cart, Braze will then trigger the event. You can update your Abandoned Cart Delay within Advanced Settings. |
ScriptTag integration |
shopify_abandoned_checkout |
Custom Event | Checkout updates webhook’s trigger when a customer adds or removes items from their cart AND proceeds further into the checkout process including adding their personal information. Braze will listen to the inbound Shopify checkout update webhooks and trigger the shopify_abandoned_checkout custom event when that checkout is considered abandoned. The Abandoned Checkout Delay is set to 1 hour but is configurable within the Advanced Settings section on the Shopify partner page. |
Shopify webhooks |
shopify_created_order |
Custom Event | Order create events trigger: Automatically after a customer has completed a purchase from your Shopify store. OR Manually through the orders section of your Shopify account. |
Shopify webhooks |
Purchase | Braze Purchase Event | Shopify’s order create event immediately triggers a Braze purchase event. | Shopify webhooks |
shopify_paid_order |
Custom Event | Order paid events will trigger when an order’s payment status is changed to paid. An order is in paid status after a credit card payment has been captured or when an order using a manual payment method is marked as paid. | Shopify webhooks |
shopify_partially_fulfilled_order |
Custom Event | Partially fulfilled order events will trigger when some of the line items in an order are fulfilled successfully. | Shopify webhooks |
shopify_fulfilled_order |
Custom Event | Fulfilled order events will trigger when the fulfillment of all of the line items in a fulfillment order is successful. | Shopify webhooks |
shopify_cancelled_order |
Custom Event | Canceled order events will trigger when a customer creates an order but then cancels the order before fulfillment. | Shopify webhooks |
shopify_created_refund |
Custom Event | Created refunds events are triggered when a customer is provided a refund for their order, whether a partial refund or a complete refund. A refund can also be triggered when a Shopify account admin manually processes the refund in Shopify. |
Shopify webhooks |
1
2
3
4
5
6
7
8
9
10
11
12
{
"name": "shopify_product_viewed",
"properties": {
"id": 5971657097407,
"title": "Example T-Shirt",
"price": 1999,
"vendor": "Acme",
"images": [
"//cdn.shopify.com/s/files/1/0503/3849/6703/products/green-t-shirt.jpg?v=1603397913"
]
}
}
1
2
3
4
5
6
7
8
9
10
11
12
{
"name": "shopify_product_clicked",
"properties": {
"id": 5971657097407,
"title": "Example T-Shirt",
"price": 1999,
"vendor": "Acme",
"images": [
"//cdn.shopify.com/s/files/1/0503/3849/6703/products/green-t-shirt.jpg?v=1603397913"
]
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{
"name": "shopify_abandoned_cart",
"time": "2022-10-14T15:08:31.571Z",
"properties": {
"cart_id": "163989958f6b0de13f3b4f702fa5ee0d",
"line_items": [
{
"price": 60,
"product_id": 7110622675033,
"properties": null,
"quantity": 1,
"sku": null,
"title": "Spinach Surprise Smoothie - 12 Pack",
"variant_id": 40094740545625,
"vendor": "Jennifer's Juice"
}
]
},
"braze_id": "63497b3ca3eabd0053380451"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{
"name": "shopify_abandoned_checkout",
"time": "2020-09-10T18:53:37-04:00",
"properties": {
"applied_discount": {
"amount": "30.00",
"title": "XYZPromotion",
"description": "Promotionalitemforblackfriday."
},
"discount_code": "30_DOLLARS_OFF",
"total_price": "398.00",
"line_items": [
{
"price": "199.00",
"properties": {},
"product_id": 632910392,
"quantity": 1,
"sku": "IPOD2008PINK",
"title": "IPodNano-8GB",
"variant_id": 40094740545625,
"variant_title": "Pink iPod Nano 8 GB",
"vendor": "Apple",
}
],
"abandoned_checkout_url": "https://checkout.local/690933842/checkouts/123123123/recover?key=example-secret-token",
"checkout_id": "123123123"
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
{
"name": "shopify_created_order",
"time": "2020-09-10T18:53:45-04:00",
"properties": {
"total_discounts": "5.00",
"total_price": "403.00",
"discount_codes": [],
"line_items": [
{
"product_id": 632910392,
"quantity": 1,
"sku": "IPOD2008PINK",
"title": "IPodNano-8GB",
"variant_id": 40094740545625,
"variant_title": "Pink iPod Nano 8 GB",
"vendor": null,
"name": "IPodNano-8GB",
"properties": [],
"price": "199.00"
},
{
"product_id": 632910393,
"quantity": 1,
"sku": "IPOD2008SILVER",
"title": "IPodNano-8GB",
"variant_id": 40094740545626,
"variant_title": "Silver iPod Nano 8 GB",
"vendor": null,
"name": "IPodNano-8GB",
"properties": [],
"price": "199.00"
}
],
"order_id": 820982911946154500,
"confirmed": false,
"order_status_url": "https://apple.myshopify.com/690933842/orders/123456abcd/authenticate?key=abcdefg",
"order_number": 1234,
"cancelled_at": "2020-09-10T18:53:45-04:00",
"shipping": [
{
"title": "Standard",
"price": "10.00"
},
{
"title": "Expedited",
"price": "25.00"
}
],
"tags": "heavy"
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{
"product_id": 632910392,
"currency": "USD",
"price": "199.00",
"time": "2020-09-10T18:53:45-04:00",
"quantity": 1,
"source": "shopify",
"properties": {
"name": "IPodNano-8GB",
"sku": "IPOD2008PINK",
"variant_id": 40094740545626,
"variant_title": "Silver iPod Nano 8 GB",
"vendor": null,
"properties": []
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{
"name": "shopify_paid_order",
"time": "2022-05-23T13:52:38-04:00",
"properties": {
"order_id": 4444596371647,
"line_items": [
{
"quantity": 1,
"product_id": 6143033344191,
"sku": null,
"title": "LED High Tops",
"variant_id": 40094740549876,
"variant_title": null,
"vendor": "partners-demo",
"name": "LED High Tops",
"properties": [],
"price": "80.00",
"fulfillment_status": null
}
],
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
{
"name": "shopify_partially_fulfilled_order",
"time": "2022-05-23T14:43:34-04:00",
"properties": {
"order_id": 4444668657855,
"line_items": [
{
"quantity": 1,
"product_id": 6143032066239,
"sku": null,
"title": "Dark Denim Top",
"variant_id": 40094740549876,
"variant_title": "",
"vendor": "partners-demo",
"name": "Dark Denim Top",
"properties": [],
"price": "60.00",
"fulfillment_status": "fulfilled"
}
],
"shipping": [
{
"title": "Standard",
"price": "0.00"
}
],
"total_price": "130.66",
"confirmed": true,
"total_discounts": "0.00",
"discount_codes": [],
"order_number": 1093,
"order_status_url": "https://test-store.myshopify.com/",
"cancelled_at": null,
"tags": "",
"closed_at": null,
"fulfillment_status": "partial",
"fulfillments": [
{
"shipment_status": null,
"status": "success",
"tracking_company": "Other",
"tracking_number": "123",
"tracking_numbers": [
"123"
],
"tracking_url": "https://braze.com",
"tracking_urls": [
"https://braze.com"
],
"line_items": [
{
"fulfillment_status": "fulfilled",
"name": "Dark Denim Top",
"price": "60.00",
"product_id": 6143032066239,
"properties": [],
"quantity": 1,
"requires_shipping": true,
"sku": null,
"title": "Dark Denim Top",
"variant_id": 40094740549876,
"variant_title": "",
"vendor": "partners-demo"
}
]
}
]
},
"braze_id": "abc123abc123"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
{
"name": "shopify_fulfilled_order",
"time": "2022-05-23T14:44:34-04:00",
"properties": {
"order_id": 4444668657855,
"line_items": [
{
"quantity": 1,
"product_id": 6143032066239,
"sku": null,
"title": "Dark Denim Top",
"vendor": "partners-demo",
"name": "Dark Denim Top",
"properties": [],
"price": "60.00",
"fulfillment_status": "fulfilled"
}
],
"shipping": [
{
"title": "Standard",
"price": "0.00"
}
],
"total_price": "130.66",
"confirmed": true,
"total_discounts": "0.00",
"discount_codes": [],
"order_number": 1093,
"order_status_url": "https://test-store.myshopify.com/",
"cancelled_at": null,
"tags": "",
"closed_at": "2022-05-23T14:44:34-04:00",
"fulfillment_status": "fulfilled",
"fulfillments": [
{
"shipment_status": null,
"status": "success",
"tracking_company": "Other",
"tracking_number": "456",
"tracking_numbers": [
"456"
],
"tracking_url": "https://braze.com",
"tracking_urls": [
"https://braze.com"
],
"line_items": [
{
"fulfillment_status": "fulfilled",
"name": "Dark Denim Top",
"price": "60.00",
"product_id": 6143032066239,
"quantity": 1,
"requires_shipping": true,
"sku": null,
"title": "Dark Denim Top",
"vendor": "partners-demo"
}
]
}
]
},
"braze_id": "123abc123abc"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{
"name": "shopify_cancelled_order",
"time": "2022-05-23T14:40:52-04:00",
"properties": {
"order_id": 4444596371647,
"line_items": [
{
"quantity": 1,
"product_id": 6143033344191,
"sku": null,
"title": "LED High Tops",
"variant_id": 40094740549876,
"variant_title": "",
"vendor": "partners-demo",
"name": "LED High Tops",
"properties": [],
"price": "80.00",
"fulfillment_status": null
}
],
"shipping": [
{
"title": "Standard",
"price": "0.00"
}
],
"total_price": "141.54",
"confirmed": true,
"total_discounts": "0.00",
"discount_codes": [],
"order_number": 1092,
"order_status_url": "https://test-store.myshopify.com/",
"cancelled_at": "2022-05-23T14:40:52-04:00",
"tags": "",
"closed_at": "2022-05-23T14:40:51-04:00",
"fulfillment_status": null,
"fulfillments": []
},
"braze_id": "123abc123abc"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{
"name": "shopify_created_refund",
"time": "2022-05-23T14:40:50-04:00",
"properties": {
"order_id": 4444596371647,
"note": null,
"line_items": [
{
"quantity": 1,
"product_id": 6143033344191,
"sku": null,
"title": "LED High Tops",
"variant_id": 40094740549876,
"variant_title": "",
"vendor": "partners-demo",
"properties": [],
"price": "80.00"
},
{
"quantity": 1,
"product_id": 6143032852671,
"sku": null,
"title": "Chequered Red Shirt",
"variant_id": 40094796619876,
"variant_title": "",
"vendor": "partners-demo",
"properties": [],
"price": "50.00"
}
]
},
"braze_id": "abc123abc123"
}
Supported Shopify custom attributes
Attribute Name | Description |
---|---|
shopify_accepts_marketing |
This custom attribute corresponds to the email marketing opt-in status that is captured on the checkout page. This field is now deprecated for new Shopify customers in favor of our subscription states and group feature. |
shopify_sms_consent |
This custom attribute corresponds to the SMS marketing opt-in status that is captured on the checkout page. This field is now deprecated for new Shopify customers in favor of our subscription states and group feature. |
shopify_tags |
This attribute corresponds to the customer tags set by Shopify admins. |
1
2
3
4
5
6
7
8
9
10
11
12
{
"attributes": [
{
"external_id": "user_id",
"shopify_sms_consent": {
"state": "subscribed",
"opt_in_level": "single_opt_in",
"collected_from": "other"
}
}
]
}
1
2
3
4
5
6
7
8
{
"attributes": [
{
"external_id": "user_id",
"shopify_accepts_marketing": true
}
]
}
1
2
3
4
5
6
7
8
{
"attributes": [
{
"external_id": "user_id",
"shopify_tags": "VIP_customer"
}
]
}
Supported Shopify standard attributes
- First Name
- Last Name
- Phone
- City
- Country
Braze will only update supported Shopify custom attributes and Braze standard attributes if there is a difference in data from the existing user profile. For example, if the inbound Shopify data contains a first name of Bob and Bob already exists as a first name on the Braze user profile, Braze will not trigger an update, and you will not be charged a data point.
Shopify advanced settings
Update abandoned cart and abandoned checkout delay
By default, Braze will automatically set the delay to trigger the shopify_abandoned_checkout
and shopify_abandoned_cart
events to one hour of inactivity. You can set the Abandoned Delay for each event from 5 minutes up to 24 hours by selecting the dropdown and then selecting Set Delay on the Shopify partner page.
Set your preferred product identifier
If you have included Braze purchase events within your Shopify integration setup, by default, Braze will set the Shopify Product ID as the product_id
used within Braze’s purchase event. This will be used when you filter for products purchased in Y days or personalize content in your message using Liquid.
You can also choose to set either the SKU or Product Title from Shopify instead of the Shopify Product ID through advanced settings.
Shopify user syncing
Braze will update existing user profiles or create new ones for leads, sign-ups, and account registrations captured in your Shopify store. User profile data can be collected from the following methods in Shopify but is not limited to:
- Customer creates an account
- Customer email or phone is collected in a Shopify pop-up form
- Customer email is collected on your store from Shopify’s footer
- Customer email or phone number is collected through a third-party tool connected to Shopify
Braze will first attempt to map the supported Shopify data to any existing user profiles using the customer’s email address or phone number.
Anonymous users
- If the email address or phone number is associated with an existing anonymous user profile or alias-only profile, we sync the Shopify data to that user.
- For existing alias-only profiles, we’ll add the Shopify alias object for that user.
- If the email address or phone number is not associated with a user profile in Braze, Braze generates an alias-only user with a Shopify alias object.
- If these alias-only users eventually become identified, Braze customers must assign an external ID to the alias-only profile by calling the Users Identify endpoint.
Identified users
- As the customers proceed into the checkout process, Braze will check to see if the inputted email address, phone number, or their Shopify Customer ID matches an identified user profile. If there is a match, Braze will sync the Shopify user data to that profile.
- If the email address or phone number is associated with multiple identified user profiles, Braze syncs the Shopify data to the one with the most recent activity.
If Braze does not find a match for the email address or phone number, we will create a new user profile with the supported Shopify data.
Some of the user data and events collected by the Shopify integration will count towards your data point usage. Refer to our data point policy for more information.
The Web SDK and Shopify webhooks
Anonymous users
- With the Web SDK integration, you will begin tracking sessions for your Shopify customers. If your store visitors are guests (i.e., anonymous), Braze will capture the
device_id
for that particular customer’s session. - As the customer progresses to checkout and provides additional identifiable information like email or phone number, Braze will capture the relevant Shopify user data via Shopify webhooks.
- In this process, Braze will effectively match the user by the same
device_id
for the same session and merge all of the user data captured from both the Web SDK and Shopify webhooks into a single user profile in Braze.
Braze will also assign the Shopify customer ID as the user alias on the user profile:
1
2
3
4
5
6
{
"user_alias" :
{
"alias_name" : "4306250531001",
"alias_label" : "shopify_customer_id" }
}
Identified users
- As the customers proceed into the checkout process, Braze will check to see if the inputted email address, phone number, or their Shopify Customer ID matches an identified user profile. If there is a match, Braze will sync the Shopify user data to that profile using our merge functionality.
- If the email address or phone number is associated with multiple identified user profiles, Braze syncs the Shopify data to the one with the most recent activity.
User reconciling issues
If you use the ScriptTag integration and your Shopify store offers a “Buy Now” option that skips the cart, Braze may be unable to reconcile users created through this flow. Shopify does not allow our script tags to retrieve a device_id
to map the events back to this user who skips the cart.
User profile merging
Braze will merge the following fields on the anonymous user created from our Shopify integration to the identified user when we find a match on one of these identifiers, Shopify customer ID, email, or phone number. Note this user data merging functionality is only available in the Shopify integration.
- First name
- Last name
- Gender
- Date of birth
- Phone number
- Time zone
- Home city
- Country
- Language
- Custom attributes
- Custom event and purchase event data (excluding event properties, count, and first date and last date timestamps)
- Custom event and purchase event properties for “X times in Y days” segmentation (where X<=50 and Y<=30)
- Push tokens
- Message history
Any of the following fields found on the anonymous user to the identified user:
- Custom event and purchase event count and first date and last date timestamps
- These merged fields will update “for X events in Y days” filters. For purchase events, these filters include “number of purchases in Y days” and “money spent in last Y days”.
Session data is not yet supported as part of our merging process.
GDPR
Concerning personal data submitted to Braze services by or on behalf of its customers, Braze is the data processor, and our customers are the data controllers. Accordingly, Braze processes such personal data solely at the instruction of our customers and, when applicable, notifies our customers of data subject requests. As the data controllers, our customers respond directly to Data subject requests. As part of the Braze platform’s Shopify integration, Braze automatically receives Shopify’s GDPR webhooks. However, Braze customers are ultimately responsible for responding to data subject requests from their Shopify customers through the use of Braze SDKs or REST APIs in accordance with our GDPR compliance policies.