Skip to main content

Alternative Double Opt-in

Learn how to set Double Opt-In for any subscriber source in Omnisend

Sarunas avatar
Written by Sarunas
Updated over 2 weeks ago

Omnisend forms include a built-in double opt-in option by default. This default feature is available for Omnisend forms only. However, if you’re using another signup method, there’s an alternative way to set up double opt-in messages with Omnisend automations.

In this article, you will learn how to set double opt-in messages for your subscribers using selected segments.


Before You Begin

  • This feature uses Webhooks in automations, which are currently in closed beta and must be enabled by our support team. To do so, write a request to [email protected] with your use case.

  • How this works:

    • Contact enters a segment.

    • An automation is triggered that sends a double-opt-in email to the contact.

    • Contact clicks on any link in the email.

    • The “clicked on a message” event triggers an automation, which sends a webhook to subscribe to the contacts.

    • (optional) An additional block in the double opt-in flow, where if the email is not clicked in a set amount of time, they are unsubscribed.

Benefits

With the alternative double opt-in, you will be able to send a confirmation email to your audience regardless of where they originated from:

  • Third-party forms;

  • Manual import;

  • Checkout;

  • Store signups;

  • API.

Setup Process

Step 1: Trigger Segment

Create a segment that, when contacts enter it, will send a double opt-in email. In our example, we will use the "Subscribed" segment, which contains all subscribed contacts.

You will want to adjust filters according to your needs; maybe not all subscribed contacts need a double opt-in, or only non-subscribed.

Step 2: Double Opt-in Email

Create an automation, you can name it "Double opt-in email".

Add a trigger "entered segment" and select a previously created segment. Then add an email and adjust it to represent a double opt-in email, specifically an add-a-button and a callout.


Your automation should look close to the following example.

After a delay, the optional section adds a webhook block and checks whether a button was clicked in the previous email. If the button is not clicked, it triggers a webhook.

The webhook has three main sections, as follows. It generally leads to unsubscribing contacts that do not click your email after the set delay is met.

URL:

HEADERS:

x-api-key : <Your API key>

BODY:

{
"identifiers": [
{
"type": "email",
"id": "[[contact.email]]",
"channels": {
"email": {
"status": "unsubscribed"
}
}
}
]
}

You can remove the delay and split to instantly unsubscribe contacts who received a double opt-in email, so they would be subscribed only after they click on the email (step 3).

If you are already passing these contacts as nonsubscribed, you can remove the unsubscription webhook so that contacts stay nonsubscribed.

Step 3: Double Opt-in Subscription

Create a second automation, you can name it "Double opt-in subscription".

  • Select your automation trigger to be "clicked on a message," add a filter "marketing activity ID," paste the ID of your "Double opt-in email" automation.

  • Add a webhook block to your automation using the following elements.

URL:

HEADERS:

x-api-key : <Your API key>

BODY:

{
"identifiers": [
{
"type": "email",
"id": "[[contact.email]]",
"channels": {
"email": {
"status": "subscribed"
}
}
}
]
}

Step 4: Enable the Two Automations

You're set. It's advisable to trigger the automation with a test contact to see if the email is received properly and if they are subscribed after clicking on the email.

💡 Note! Integrating webhooks often requires development resources, especially for custom API setups, so ensure you have the necessary support.


Please feel free to reach out to our Support Team via in-app chat or at [email protected] for further assistance.

Did this answer your question?