Skip to main content
Shopify webhooks
Updated over a week ago

Shopify webhooks overview

Bluecore’s integration with Shopify webhooks allows you to capture a comprehensive view of your customers’ actions, like customer opt in and unsubscribes, and Shopify storefront updates, like new product additions, that you can later use in your Bluecore campaigns.

Bluecore recommends enabling all Shopify webhooks. Continue to use your company’s comprehensive data feeds and near real-time updates from the Bluecore Website Integration, the Purchase Pixel, and the Unsubscribe Pixel.

By combining Bluecore’s data feeds and near real-time updates and Shopify webhooks, you can create a more complete picture of your customers’ behavior and product catalog updates. This enables you to deliver timely, accurate, and personalized campaigns.

The following table outlines which Bluecore events are triggered by Shopify webhooks. Multiple Bluecore events may be created from the same Shopify webhook.

Bluecore Event

Shopify Webhook

New customer identified

Customers/create

Customer opt-in

  • Customers/create

  • Customers/update

  • Customers/enable

Note: These webhooks only opt-in customers if a specific attribute is sent.

Customer unsubscribed

  • Customers/create

  • Customers/update

  • Customers/enable

Note: These webhooks only unsubscribe the customer if a specific flag is sent.

Customer profile updated

Customers/update

Purchase made

Orders/paid

New product added

Products/create

Product updated

Products/update

Product out of stock

Products/update

New Customer Identified

New customers are identified in Bluecore once a customer inputs their email address, such as during checkout or creating an account.

You must have the customers/create webhook enabled to use this feature.

Example of data sent to Bluecore:

{
"event": "identify",
"properties": {
"email": "alice@gmail.com",
"distinct_id": "7251775422563",
"token": "bluecore_store",
"event_source": "shopify_app",
"customer": {
"email": "alice@gmail.com",
"distinct_id": "7251775422563",
"shopify_customer_id": 7251775422563,
"verified_email": True,
"state": "disabled",
"token": "bluecore_store",
"event_source": "shopify_app",
"orders_count": 0,
"total_spent": "0.00",
"shopify_customer_tags": "newsletter",
"city": None,
"province": None,
"country": "United States",
"zip": None,
"name": "",
"province_code": None,
"country_code": "US",
"country_name": "United States",
"email_marketing_consent_state": "subscribed",
"email_marketing_consent_opt_in_level": "single_opt_in",
"email_marketing_consent_updated_at": "2024-07-30 10:59:48"
}
}
}

Customer opt-in

At any time, customers can choose to opt-in to receive marketing communications from your brand, from updating their email preferences in a preference center to checking a box during checkout.

The following webhooks may contain opt-in information:

  • Customers/create

  • Customers/update

  • Customers/enable

Customer identified

When a new customer is identified, they may choose to opt-in to receive marketing communications.

You must have the customers/create webhook enabled to use this feature.

The following is an example of the data in Bluecore. The "event": "optin" indicates the customer opted-in to receive marketing campaigns.

{
"event": "optin",
"properties": {
"channel_type": "email",
"channel_identifier": "unset",
"channel": "unset",
"source_type": "integration",
"source": "shopify",
"source_identifier": "unset",
"message_type": "marketing",
"event_source": "shopify_app",
"email": "alice@gmail.com",
"distinct_id": "7251775422563",
"token": "bluecore_store"
}
}

Customer updated

An existing customer may update their subscription preferences at any time and choose to opt-in to receive marketing emails.

You must have the customers/update webhook enabled to use this feature.

The following is an example of data sent to Bluecore. The "email_marketing_consent_state": "subscribed" indicates the customer opted-in to receive marketing campaigns.

{
"event": "customer_patch",
"properties": {
"email": "alice@gmail.com.com",
"distinct_id": "6531017900131",
"token": "bluecore_store",
"event_source": "shopify_app",
"customer": {
"email": "alice@gmail.com.com",
"distinct_id": "6531017900131",
"shopify_customer_id": 6531017900131,
"verified_email": True,
"state": "enabled",
"token": "bluecore_store",
"event_source": "shopify_app",
"first_name": "Alice",
"last_name": "Dodgson",
"orders_count": 1,
"total_spent": "624.71",
"last_order_id": 5367759306851,
"last_order_name": "#587514",
"shopify_customer_tags": "Shop",
"city": "New York City",
"province": "New York",
"country": "United States",
"zip": "10038",
"name": "Alice Dodgson",
"province_code": "NY",
"country_code": "US",
"country_name": "United States",
"email_marketing_consent_state": "subscribed",
"email_marketing_consent_opt_in_level": "single_opt_in",
"email_marketing_consent_updated_at": "2023-10-11 00:28:56"
}
}
}

Customer enabled

If a customer deactivates their account and later chooses to reactivate it, they may choose to opt in with reactivation.

You must have the customers/enable webhook enabled to use this feature.

The following is an example of the data in Bluecore. The "event": "optin" indicates the customer opted-in to receive marketing campaigns.

{
"event":"optin",
"properties":{
"channel_type":"email",
"channel_identifier":"unset",
"channel":"unset",
"source_type":"integration",
"source":"shopify",
"source_identifier":"unset",
"message_type":"marketing",
"event_source":"shopify_app",
"email":"alice@gmail.com",
"distinct_id":"6042932052067",
"token":"bluecore_store"
}
}

Customers Unsubscribed

Customers may update their subscription preferences at any time and choose to unsubscribe from receiving marketing emails. Deleting or disabling customer accounts will also unsubscribe them.

The following webhooks may contain opt out information:

  • Customers/create

  • Customers/update

  • Customers/enable

Customer identified

When a new customer is <link>identified</link>, they may not elect to receive marketing communications.

You must have the customers/create webhook enabled to use this feature.

The following is an example of the data in Bluecore. The "event": "unsubscribe" indicates the customer unsubscribed from receiving marketing campaigns.

{
"event":"customer_patch",
"properties":{
"email":"alice@gmail.com",
"distinct_id":"6531017900131",
"token":"bluecore_store",
"event_source":"shopify_app",
"customer":{
"email":"alice@gmail.com",
"distinct_id":"6531017900131",
"shopify_customer_id":6531017900131,
"verified_email":true,
"state":"enabled",
"token":"bluecore_store",
"event_source":"shopify_app",
"first_name":"Alice",
"last_name":"Dodgson",
"orders_count":1,
"total_spent":"624.71",
"last_order_id":5367759306851,
"last_order_name":"#587514",
"shopify_customer_tags":"Shop",
"city":"New York City",
"province":"New York",
"country":"United States",
"zip":"10038",
"name":"Alice Dodgson",
"province_code":"NY",
"country_code":"US",
"country_name":"United States",
"email_marketing_consent_state":"unsubscribed",
"email_marketing_consent_opt_in_level":"single_opt_in",
"email_marketing_consent_updated_at":"2023-10-11 00:28:56"
}
}
}

Customer updated

At any time, a customer may update their profile and choose to opt out of marketing communications.

You must have the customers/update webhook enabled to use this feature.

The following is an example of data sent to Bluecore. The "email_marketing_consent_state": "unsubscribed" indicates the customer opted-in to receive marketing campaigns.

{
"event":"customer_patch",
"properties":{
"email":"alice@gmail.com",
"distinct_id":"6531017900131",
"token":"bluecore_store",
"event_source":"shopify_app",
"customer":{
"email":"alice@gmail.com",
"distinct_id":"6531017900131",
"shopify_customer_id":6531017900131,
"verified_email":true,
"state":"enabled",
"token":"bluecore_store",
"event_source":"shopify_app",
"first_name":"Alice",
"last_name":"Dodgson",
"orders_count":1,
"total_spent":"624.71",
"last_order_id":5367759306851,
"last_order_name":"#587514",
"shopify_customer_tags":"Shop",
"city":"New York City",
"province":"New York",
"country":"United States",
"zip":"10038",
"name":"Alice Dodgson",
"province_code":"NY",
"country_code":"US",
"country_name":"United States",
"email_marketing_consent_state":"unsubscribed",
"email_marketing_consent_opt_in_level":"single_opt_in",
"email_marketing_consent_updated_at":"2023-10-11 00:28:56"
}
}
}

Customer enabled

If a customer deactivates their account and later chooses to reactivate it, they may opt out during reactivation.

You must have the customers/enable webhook enabled to use this feature.

The following is an example of data sent to Bluecore. The "email_marketing_consent_state": "unsubscribed" indicates the customer opted-in to receive marketing campaigns.

{
"event":"customer_patch",
"properties":{
"email":"alice@gmail.com",
"distinct_id":"6042932052067",
"token":"bluecore_store",
"event_source":"shopify_app",
"customer":{
"email":"alice@gmail.com",
"distinct_id":"6042932052067",
"shopify_customer_id":6042932052067,
"verified_email":true,
"state":"enabled",
"email_marketing_consent_state":"unsubscribed",
"email_marketing_consent_opt_in_level":"single_opt_in",
"email_marketing_consent_updated_at":"2022-11-19 07:06:14",
"sms_marketing_consent_state":"unsubscribed",
"sms_marketing_consent_opt_in_level":"confirmed_opt_in",
"sms_marketing_consent_updated_at":"2023-08-18 12:02:15"
}
}
}

Purchase made

Once a customer completes their purchase on the Shopify storefront by paying for it, the transaction is complete, and Bluecore will receive information about that purchase.

You must have the orders/paid webhook enabled to use this feature.

The following is an example of data sent to Bluecore. The "financial_status": "paid" indicates the customer completed their purchase.

{
"event":"purchase",
"properties":{
"order_id":"5786712866915",
"total_order_discounts":"0.00",
"total_tip_received":"0.00",
"email":"alice@gmail.com",
"distinct_id":"7251835879523",
"products":[
{
"id":"40209995628643"
}
],
"total":"0.00",
"subtotal_price":0.0,
"financial_status":"paid",
"confirmed":true,
"source_identifier":"03659fa3b0c2f724eb0bc6a749c7a6fb",
"customer_locale":"en-US",
"browser_ip":"2601:3ca:203:4950:d852:1f09:5073:ce0b",
"order_status_url":"https://www.bluecorestore.com/29928226916/orders/1a2e59c8461bb292c7e5d3d85f966f8b",
"currency":"USD",
"shipping_price":0.0,
"shipping_discounted_price":0.0,
"token":"bluecore_store",
"event_source":"shopify_app",
"product_quantities":[
{
"id":"40209995628643",
"quantity":1
}
],
"created_override":1722341291.0,
"shopify_order_tags":"",
"source_name":"web"
}
}

New product added

If the Shopify storefront manager adds a new product to the Shopify storefront, Bluecore receives information about the new product and adds it to the product catalog.

You must have the products/create webhook enabled to use this feature.

The following is an example of data sent to Bluecore:

{
"event":"patch",
"properties":{
"distinct_id":"4303617",
"token":"bluecore_store",
"event_source":"shopify_app",
"products":[
{
"id":"40839079067781",
"master_id":"7046198755461",
"master_name":"TEAPOT",
"name":"SMALL TEAPOT",
"vendor":"Bluecore Store",
"type":"",
"handle":"teapot-small",
"shopify_product_tags":"price_$50-$100",
"description":"",
"price":79.95,
"compare_at_price":79.95,
"inventory":0,
"image_id":"None",
"url":"https://bluecorestore.myshopify.com/products/teapot?variant=40839079067781",
"original_price":79.95,
"on_sale":false,
"out_of_stock":true,
"image":"",
"attr_color":"MULTI",
"attr_size":"SMALL",
"attr_color_code":"918"
}
]
}
}

Product updated

Products that are updated in Shopify will update the product catalog in Bluecore.

You must have the products/update webhook enabled to use this feature.

The following is an example of data sent to Bluecore:

{
"event":"patch",
"properties":{
"distinct_id":"4303617",
"token":"bluecore_store",
"event_source":"shopify_app",
"products":[
{
"id":"41272920670307",
"master_id":"7175611088995",
"master_name":"TEAPOT",
"name":"Teapot",
"vendor":"Bluecore Store",
"type":"Sample",
"handle":"teapot-small",
"shopify_product_tags":"",
"description":"Small teapot",
"price":79.95,
"compare_at_price":0.0,
"option3":"None",
"inventory":0,
"image_id":"None",
"url":"hhttps://bluecorestore.myshopify.com/products/teapot?variant=40839079067781",
"original_price":79.95,
"on_sale":false,
"out_of_stock":true,
"image":"https://cdn.shopify.com/s/files/1/0299/2822/6915/files/teapot_9ed8c997-55e3-46db-b179-4452bd770ff6.png?v=1715189677",
"attr_title":"Default Title"
}
]
}
}

Product out of stock

Shopify keeps track of product inventory levels, and will send out an update if the product is out of stock.

You must have the products/update webhook enabled to use this feature.

Example of data sent to Bluecore. The "out_of_stock": True indicates the product is out of stock.

{
"event":"patch",
"properties":{
"distinct_id":"4303617",
"token":"bluecore_store",
"event_source":"shopify_app",
"products":[
{
"id":"41272920670307",
"master_id":"7175611088995",
"master_name":"TEAPOT",
"name":"SMALL TEAPOT",
"vendor":"Bluecore Store",
"type":"Sample",
"handle":"small-teapot",
"shopify_product_tags":"",
"description":"Small teapot",
"price":79.95,
"compare_at_price":0.0,
"option3":"None",
"inventory":0,
"image_id":"None",
"url":"hhttps://bluecorestore.myshopify.com/products/teapot?variant=40839079067781",
"original_price":79.95,
"on_sale":false,
"out_of_stock":true,
"image":"https://cdn.shopify.com/s/files/1/0299/2822/6915/files/teapot_9ed8c997-55e3-46db-b179-4452bd770ff6.png?v=1715189677",
"attr_title":"Default Title"
}
]
}
}
Did this answer your question?