Webhooks for synchronizing preferences
Voyado Engage uses a third-party service called Svix as a "Webhooks as a Service" platform. This keeps your Shopify account in sync with any changes made to a customer's marketing preferences for email, postal and SMS communication.
Important
Because “Svix“ is a third-party service, an agreement must be signed before you can use this feature in Voyado Engage. Please reach out to your Voyado team and they will help you.
Important
Before you can complete the setup, you'll need an encryption key. Contact your Voyado team to get this.
Caution
If you are already live with the Voyado Engage app for Shopify, you must make sure that all marketing preferences are currently in sync between Engage and Shopify before you activate this webhooks feature. Otherwise there is a risk of overriding the correct opt-in/out status in Engage.
How it works
Svix is used to dispatch events from Engage to a POST endpoint hosted by the Voyado Engage app. You can read more about this service here.
Here is an example of the workflow from Engage to Shopify:
![shopify-webhooks-01.png](../../image/166dafc22452dd.png)
The customer opts-out from email marketing through an email sent to them from Voyado Engage.
The change in their preferences triggers an encrypted event to Svix.
Svix passes the event to the Voyado Engage app, where it is placed in a queue.
The app decrypts the event payload and updates the customer's preferences in Shopify
Prerequisites
There are some prerequisites before this will work:
The “Webhooks” module need to be enabled in Voyado Engage.
You need to have been assigned permissions to access the “Webhooks Dashboard“.
You have received a 32 character encryption key from your Voyado team.
You've made sure that all customers marketing preferences are in sync between Shopify and Engage.
Setting it up
Here are the steps to follow:
Enter the Voyado Engage app for Shopify.
Go to “Settings“ and scroll down to the section “Synchronize marketing preference changes from Engage to Shopify.”
Enable the functionality by checking the box “Enable“.
Input your Encryption key and select “Save”.
Copy the webhook URL to your clipboard.
Login into Voyado Engage and go to the “Webhooks Dashboard” in the Administration menu.
In the top right corner, select “Add endpoint“.
Paste in the webhook URL in the "Endpoint URL" field.
Enable the events
contact.acceptsEmail.changed
andcontact.acceptsSms.changed
under the section "Message Filtering".Select “Create“ and you are good to go!
Email marketing options “Preselected“
![shopify-webhooks-04.png](../../image/166dafc2252d02.png)
If you have marketing options set to “Preselected“, you'll have to activate this setting below in the Voyado Engage app. This is needed to sync the correct consent given in the checkout by the consumers.
![shopify-webhooks-05.png](../../image/166dafc2256fe8.png)