All Collections
Marketing Automation
Integration Nodes & Webhooks
Send Unsubscribes to an External System Real-Time
Send Unsubscribes to an External System Real-Time
Rikke Søndergaard avatar
Written by Rikke Søndergaard
Updated over a week ago

Send Unsubscribes to an External System Real-Time

If you need to update an external system when Profiles unsubscribe, the best way to do this is via the Webhook Node.

This solution is currently unavailable with the APSIS One API and is only applicable for when subscribers opt-out via your communications, and not via the File Import or APSIS One API.


How to Listen for Unsubscribe Events

1. Create a Marketing Automation flow for the specific Section you want to use to send the Unsubscribe Events to your own system.

For essential information about creating Marketing Automation flows, head over to this article.

2. Set up the Listen node.

The Listen node will bring Profiles into your flow as they unsubscribe from your communications, making it possible for you to send a signal to your own system to unsubscribe them from all other relevant communications if needed.

Choose Events on the left side, and pick Response data and Select an Unsubscribe Event.

These are the three alternatives.

  • Email - Unsubscribe: The Profile unsubscribed via an email message you sent them. They opted out from email communications related to the specific Subscription you sent that email to.

  • Email - Abuse: The Profile reported your email as Spam, and opted out from your email communications from the entire Section's Subscriptions in all Folders.

  • SMS - Unsubscribe: The Profile unsubscribed via a SMS message you sent them, They opted out from SMS communications related to the specific Subscription you sent that SMS message to.

Bear in mind that, if you wish to use more than one Unsubscribe Event, you must create a separate flow for each Event.

How do Profiles Opt-out?

When subscribers opt-out from an email or SMS message, they gain the Email or SMS - Unsubscribe Event in their Response Data Events. Their consent is revoked for the specific Subscription related to that specific email or SMS message.

They will remain subscribed to other Subscriptions until they opt-out from those communications.

However, if they report an email as Spam, they will gain the Email - Abuse Event and opt-out from all Subscriptions in all Folders and Subscriptions in the Section.

3. Adjust the Event Data

Unless you want to specify a specific email or SMS message from which Profiles can unsubscribe, there's no need to pick an activity.

If you choose the Email or SMS Unsubscribe Event, you will bring Profiles into the flow as they unsubscribe from your email or SMS communications in the Subscription level. If you don't tailor the Listen node further, it will bring Profiles as they unsubscribe from any Subscription in any Folder in your Section.

Use the Match option to narrow down Profiles that unsubscribe from only one Subscription While you can't choose multiple Subscriptions in the Listen node, you can always create another Marketing Automation flow for another Subscription.

To get a Subscription ID, navigate to the Subscription in Audience and copy the number after /subscription/ in the URL shown in your browser's address bar. For example:

https://app.apsis.one/audience/1234/consent-lists/root/target/1234/topic/1234

If you choose the Email - Abuse Event, you will bring Profiles into the flow as they unsubscribe from all communications related to the Section (all Subscriptions/Subscriptions). No further settings are required in the Listen node.

Bear in mind that this Event (similar to opt-out all) is logged into Profiles as they request to be opted out from the Section, and is not the result of a cumulative opt-out in each Subscription.

4. Click the plus icon to add a new node. Under Integrations, select the Webhook node.

Drag the Webhook node into the canvas an click to set it up.

4. Choose a HTTP method from the http dropdown menu.

While the action of the HTTP method depends on the API you're using, here's a rundown of what each method generally does in most cases.

GET: Retrieve data from the path/endpoint.

POST: Create new data into the path/endpoint.

PUT: Update existing data in the path/endpoint.

DELETE: Delete data in the path/endpoint.

PATCH: Partially update data in the path/endpoint.

For this application, we recommend the POST method.

Please note

Currently, the webhook node will send your request as a GET parameter instead of a request body payload.

We suggest that you test your Webhook node with sites like https://webhook.site or https://requestbin.com with non-sensitive test data to make sure it's working as expected.

5. Enter the URL of the endpoint where the Webhook node will send the Unsubscribe Event. The Webhook node supports static parameters.

Web4_02.jpg

6. Click Add Profile data.

In the Profile data drop-down menu, select the Email or Mobile Attribute.

This will identify the Profile in your system, so that the right Profile is unsubscribed when the flow sends the information.

Under Parameter, enter a parameter like email or mobile, depending on your system and your choice of Event. Make sure that you set up your system to recognize this parameter.

7. Click Add Profile data again.

If you're working with the Email or SMS Unsubscribe Event, select SubscriptionId and add a Subscription parameter.

If instead you're working with the Email - Abuse Event, select sectionId and add a section parameter. It's important that your system can recognise this signal as an opt-out to all communications, so that subscribers can be opted out from all Subscriptions or mailing lists they provided consent for in the past.

The parameters will depend on how your own system recognizes Subscriptions as subscriptions or opt-ins. Reach out to your development team if you need a hand.

8. Adjust the Response and Error handling options of your Webhook node. For more information, head over to the Webhook node article.

9. In the Bottom bar, open the Flow Settings.

Under General Settings, select Unlimited and Confirm. This way, Profiles can re-enter your flow as they unsubscribe from different Subscriptions at different points in time.

Note: It's important that you don't miss this step, especially if your flow is listening for the Email or SMS Unsubscribe Event.

Since they will enter the flow whenever they unsubscribe from any Subscription, you want to allow them back into the flow if they unsubscribe from another Subscription afterwards.

The goal is to get all opt-outs fed into your own system so that you can stay on top of their consent preferences.

10. Ready? Activate the flow.


What's Next?

Did this answer your question?