By connecting your Shopify or Shopify Plus account to Bloomreach Engagement, you can easily analyze your Shopify data, run marketing campaigns across multiple channels, and use Bloomreach Engagement's advanced AI features on your Shopify store. No more dealing with numerous plugins!
Bloomreach Engagement retrieves customer information, past orders, and product catalogs from Shopify, and it regularly imports the delta product catalogs in real time. It also stays connected to Shopify to receive real-time updates on customers and orders.
Time to complete
Initial Integration: less than 10 Minutes Web Integration: A few days
# How is the integration useful
With the Bloomreach Engagement Shopify Integration, you can effortlessly send emails, and push notifications, create experiments, and gain valuable insights from your Shopify data analysis. It simplifies the entire process and makes it more efficient.
Instead of having to depend on external plugins, the Shopify integration allows for a simple plug-and-play transition.
You can set up a straightforward and uncomplicated way to analyze your Shopify data and use them to boost your marketing campaigns.
You do not have to deal with external plugins for integrating my Shopify data with Bloomreach Engagement.
You can integrate your Shopify data with Bloomreach Engagement in the most efficient way.
# How the integration works
After you set up the integration, Bloomreach Engagement downloads historical data (data up to that point) and subsequently tracks new data (changes, additions, etc.) from the Shopify API:
**Initial data load**
Bloomreach Engagement loads customer base, historical orders or purchases, and product catalogs from Shopify:
Initial load of all events from the beginning until the time when webhooks were added
Events loaded from Shopify: `
purchase
`, `purchase_item
`, `cart_update
`Customer attributes loaded from Shopify: personal information, `
accepts_marketing
`Catalogs: products and variants
**Real time imports**
Bloomreach Engagement imports delta product catalogs from Shopify Products API in real time.
Real Time Imports for New Integrations
All new integrations with Shopify import data to Bloomreach Engagement in real time.
However, older integrations have updates of imports every 4 hours.
**Near real-time webhooks**
Bloomreach Engagement subscribes for new updates on customers and orders from the Shopify backend.
**Webhook registration**
Bloomreach Engagement registers webhooks to receive real-time tracking and customer updates from Shopify.
**Webhooks processing**
Bloomreach Engagement processes real-time tracking:
customer create/update attributes/deletion (track `
customer_updated
`)`
purchase
` events`
cart_create
`, `cart_update
`
# Setup process
## 1. Add new integration
Open Bloomreach Engagement App and go to `Data & Assets > Integrations > + Add new integration
` and look up **Shopify**. Next, click on `+ Add integration
`.

## 2. Prerequisites
On the next screen, you will see 4 IDs that need to be set up in your project. Make sure these are set up before you continue and match exactly; ID names are not customizable. You do not need to fill anything in here – just be sure these IDs have been set up. The integration will automatically use these IDs once it starts working.

A project needs to have the following IDs set up:
**`
email_id
`** - Hard ID, lowercase, trim; email address is the primary identifier for a customer in Bloomreach Engagement ⓘ _If there are multiple Shopify customers with the same email address, there is one customer for Bloomreach Engagement_**`
shopify_id
`** - Soft ID - numeric Shopify Customer identifier ⓘ _one customer can have more values if multiple Shopify stores are integrated into one Bloomreach Engagement project_**`
cart_id
`** - Soft ID - an alphanumeric token of a shopping cart for purposes of cart_update tracking ⓘ \_the cart_id is used to match Shopify carts with Bloomreach Engagement customers_**`
cookie
`** - Soft ID - device unique cookie identifier ⓘ _standard cookie identifier that is used in web tracking_
Shopify integration does not use the default "**registered**" as its ID. Setting up a project without a "**registered**" ID is recommended. If the project has this ID, it will be ignored, but it is better to create a new project without "**registered**" if possible.
## 3. Authentication
To connect your project with Shopify, there are two ways how to authenticate with Shopify and allow the data to flow successfully:
**Official app **(Shopify App Store) - recommended
**Custom app**
### Official App
After reviewing the prerequisites, connect your project with Shopify via the Official App. To generate Encrypted credentials, click on the `
official App in the Shopify App Store
` link, which redirects you to the Shopify App Store.

Click on `
Add app
`, then approve permissions by clicking the `Install app
` button.


To connect your Shopify account with Bloomreach Engagement, click the `
Reveal token
` button and copy and paste it into the **Encrypted credentials** field in Bloomreach Engagement.


Click the `
Save integration
` button to complete your integration.

### Custom app
Log in to your Shopify account and click on the `
>
` symbol next to **Apps**.

Click on `
App and sales channel settings
`.

Click on `
Develop apps
`.

Click on `
Allow custom app development
` and re-confirm in the next window by clicking on `Allow custom app development
` again.


Now go and click `
Create an app
`.

Complete the field **App name** with a descriptive name (we recommend **Bloomreach Engagement**). Choose a responsible technical person as the **App developer** and insert their email address. Then click on `
Create app
`.

Go to `
API credentials
` and click on `Configure Admin API scopes
`.

In **Admin API access scopes**, select the required user permissions. Then in **Event version** under **Webhook subscriptions**, choose `
2023-10
`.
Required user permissions
Required user permissions are: `
read_customers
`, `read_orders
`, and `read_products
`.


Now, click on `
Install app
`. Make sure to keep your tab with **Shopify** open for completing the following steps.

Now, go back to your **Shopify** tab and copy & paste the `
Admin API access token
`, `API key
`, and `API secret key
` from your Shopify account to the matching fields in Bloomreach Engagement under the section Connect project with Shopify.

## 4. Web integration
Now, you can move on to web integration. You will need a technical person to complete the integration by making a few [front-end modifications](🔗). This will take less than a few hours to complete.

After the web integration is complete, the data will start coming in. Events from the API should appear instantly after the setup is finished (remember to click `
Save integration
`). Regular catalog imports and customer and historical purchase data can be found in Bloomreach Engagement under `Imports
`.Take a coffee break before all the imports are visible, as it might take a while before the whole import is finished.
Shopify Front-end integration for Bloomreach Engagement
[This repository](🔗) contains .liquid snippets that can enable standardized front-end tracking of e-commerce events on your Shopify Plus website.
Using Shopify instead of Shopify Plus
Using the non-Plus version of Shopify does not allow you to customize your checkout page, thus not allowing you to add checkout tracking. This means that Bloomreach Engagement cannot track the checkout steps. Bloomreach Engagement script runs only on the final checkout step; therefore, Bloomreach Engagement cannot personalize the previous checkout process steps.
# SMS Marketing
You can add `sms_marketing_consent
` customer property to your existing Shopify integration. The `sms_marketing_consent
` is tracked when a customer subscribes or unsubscribes to SMS consent.

To track this new customer property in **real-time**, you need to:
Upgrade Shopify API webhook version to 2023-10
In your Shopify Admin account, go through the following steps: `
Settings > Apps and sales channels > Develop apps > Select your existing private app > Review configurations > Edit > Select '2023-10
`' under Webhook API version > Save changes\`.
Go to your Shopify integration page in your Bloomreach Engagement project and click the red button `
Upgrade Shopify integration
`.

Once you have finished the setup, the `
sms_marketing_consent
` customer property is available for all your customers.
Relevance for new clients
This action is only relevant for existing Bloomreach Engagement clients as for it is automatically integrated for new clients.
### How to transform customer attributes `sms_marketing_consent
` or `email_marketing_consent
` into consent events in Bloomreach Engagement?
Shopify manages consents on a profile level. That is the reason why in Bloomreach Engagement, you can see `sms_marketing_consent
` or `email_marketing_consent
` as a customer attribute and `shopify_consent
` event (automatically triggered by Bloomreach).
In order to transform them into Bloomreach Engagement consent events (accept or reject), you should set up a transformation scenario in your project to turn `shopify_consent
` events into [Consent Management events](🔗).
It is advised to double opt-in customers with approved `sms_marketing_consent
`, what can be done using the `shopify_consent
` event made for this purpose. You can see the example of this action below.

**Alternative 1: Single opt-in**
Define `
shopify_consent
` as:


Consent event as:


**Alternative 2: Double opt-in**
It is recommended to **always** use a double opt-in approach to follow market regulations and best practices.
To use the double opt-in approach it is required to use opt-in keyword specified in the outbound SMS (e.g. Bloomreach: Reply YES to receive automated marketing messages and cart reminders.) and set the grant action for the specified opt-in keyword in `Project Settings > Campaigns > Channels > SMS/MMS > 2-way SMS / MMS messaging
`.


Manually deleting phone for customers in Shopify Admin view
When a customer's phone is removed from Shopify Admin, the `
shopify_consent
` event is not tracked. This means that the consent scenario is not triggered in Bloomreach Engagement. Unsubscribed customers still have the sms consent given in the Bloomreach Engagement, even if the SMS consent has been removed in Shopify. Note that if you manually remove the phone number or consent in Shopify Admin view, you must also manually do so in Bloomreach Engagement.
# Limitations
Service worker not supported
Shopify **does not support using a service worker** as it prevents installing the service worker into the root folder of Shopify. The root folder is required to install the service worker for web push notifications and non-flickering experiments. Therefore, those two features are not supported out-of-the-box for this integration.
# Technical detail
### What is the latency between an order happening and an order appearing in our app when using our Shopify integration?
The sync is near real-time - Bloomreach Engagement subscribes and listens for new updates on customers and orders from the Shopify backend, resulting in near real-time webhooks.
# Removing Shopify integration
If you decide to remove Shopify integration, please do not remove the webhook from the integration manually before **removing the integration in the application**, as you will not be able to remove the integration afterward. Instead, use only the 'Remove Integration' button in the application. It will take care of all steps required to remove the integration, including deleting the webhook.
