Skip to main content

Opt-in & preferences management

First time using Actito's Integration Framework?

Check out the Quick Start before diving into this use case.

Introduction

When your website hosts a personal space where visitors can create an account, keeping it in sync with Actito must be seamless and real-time — especially for subscription and opt-in management, where GDPR compliance requires continuous data synchronization between your systems.

The scenario we'll implement:

  • New users create an account on your website throughout the day.
  • After validating their account, each user receives a confirmation email with a link to a preferences center landing page, where they can choose which communications they want to receive.
  • Your system is notified of any subscription changes — at signup and whenever the user updates their preferences — so your data stays up to date.

Steps overview

  1. Set up a webhook for profile subscriptions
  2. Trigger a transactional confirmation email
  3. Receive and process the subscription webhook events
Prerequisites
  • A profile table with the desired attributes and subscriptions
  • A preferences center landing page with profile subscription enrichment rules linked to that table
  • A transactional email campaign with a link to that landing page

Contact your marketer or refer to the Actito documentation to set these up. Once created, you'll need their technical names for the API calls below.

Step 1. Set up a webhook for profile subscriptions

First, configure Actito to listen for subscription and unsubscription events on your profile table by creating an UPDATED_SUBSCRIPTIONS webhook.

In this example, the profile table is Accounts (technical ID 10), within the entity MyEntity, and events should be pushed to https://yourdomain.com/actito-subscriptions.

POST /webhooks/v4/entity/MyEntity/webhookSubscription

Request body:

{
"on": "PROFILE_TABLE",
"onElementId": "10",
"eventType": "UPDATED_SUBSCRIPTIONS",
"targetUrl": "https://yourdomain.com/actito-subscriptions",
"isActive": false
}

Response (200 OK):

{
"webhookSubscriptionId": 123456
}

Once your endpoint is live and reachable, activate the webhook and add a shared secret header to verify that incoming requests originate from Actito:

PUT /webhooks/v4/entity/MyEntity/webhookSubscription/123456
{
"headers": {
"X-Origin": "webhook-actito-subscriptions-d4d58fl$DDvnjgf!"
},
"isActive": true
}

Actito will now start listening to subscription events on your Accounts table and posting them to your endpoint.

note

This step is a one-time setup and does not need to be automated.

info

For a full overview of Actito webhooks, see the Webhooks section.

Step 2. Trigger a transactional confirmation email

Each time a user creates an account, trigger a confirmation email using the Transactional Sendings API.

This route will match an existing profile or create one if none is found, then send the email.

POST /transactional-sendings/v4/entity/MyEntity/transactionalmail/ConfirmationEmail/contact

Request body:

{
"profile": {
"attributes": [
{ "name": "emailAddress", "value": "john.smith@actito.com" },
{ "name": "lastName", "value": "Smith" },
{ "name": "firstName", "value": "John" },
{ "name": "customerId", "value": 111444777 }
],
"dataCollection": {
"source": "AGDPRSource",
"way": "AGDPRWay",
"date": "10/09/2019 22:00:00"
}
},
"parameters": [
{ "key": "accountType", "values": ["NEWSUBSCRIBER"] },
{ "key": "websiteLanguage", "values": ["EN"] }
]
}

The email is sent to john.smith@actito.com. The user can then click the preferences center link and choose their subscriptions. Once submitted, Actito's profile enrichment process updates the profile — which triggers the webhook events you configured in Step 1.

Step 3. Receive and process the subscription webhook events

As users subscribe via your account creation form, your endpoint will start receiving HTTP POST calls from Actito, including the custom headers you defined and a JSON body describing the event.

For a user who subscribed to Newsletter and Promotions, the payload looks like:

{
"id": "d7ab32ee-e36d-4feb-8a14-bf55df768722",
"data": {
"profileId": 125,
"businessKey": "john.smith@actito.com",
"Newsletter": true,
"Promotions": true,
"dataCollectionMoment": "2019-09-20 10:00:00",
"dataCollectionSource": "PreferencesCenter",
"dataCollectionWay": "Form",
"_links": {
"profile": {
"href": "/v4/entity/MyEntity/table/Accounts/profile/125"
}
}
},
"_links": {
"webhook": {
"href": "/v4/entity/MyEntity/webhookSubscription/123456"
}
}
}

The data object contains everything you need: the profile ID and business key, the updated subscription states, and GDPR data collection details.

That's all it takes to keep your system in sync with Actito in real time.

Prefer triggering the email via a Scenario?

You can instead push the new user account via the Profile creation route and set up an Actito Scenario that reacts to profile creations to send the confirmation email. The preferences center setup and webhook configuration described above remain fully compatible — so you can switch email-triggering modes without changing your webhook setup or endpoint code.