Linking Workflow to the Button

The algorithm for linking a workflow to the button is universal. We will illustrate it with the example of a campaign for segmenting contacts.

Let us suppose that you have a quite large contact database but you don’t know anything but email addresses about your subscribers. If you don’t want to annoy them with trifles but send only the relevant content you need to know their interests and expectations. For this purpose, we send subscriber a trigger email that contains request to tell more about himself/herself and a special workflow attached to it.

Basic segmentation

The simplest example is an email with the question: What kind of clothes are you interested in? A contact could click on one of three buttons: Men's, Women's, or All. Your goal is to build a workflow to add contacts to segments when they click the buttons in the email.

Each workflow must be linked to a certain event. You can pass events via API or create them in our system manually.

1. Creating an Event Type

  1. Go to Automation → Event types and click New event type.
Creating a new event type
  1. In the New event type window add an event name and select a category.
New event type parameters



For the Click category be sure to specify the key in the corresponding field. The key is any value/word, preferably written without using numbers. For example: action, click, etc.

  1. Click Add.

2. Linking Event to the Button

  1. Open the email with a questionnaire in the editor.
  2. Click on each button with the answer option and link an event to it. Select the corresponding one from the dropdown list.
Email editor

3. Setting Up Workflow

  1. Go to AutomationWorkflows and click New workflow.
Creating a new workflow
  1. Enter the title and add tags (optionally) of the workflow.
  2. Build a chain of actions:
  • Start
  • Add to segment
  • End

In the Add to segment block, select the group to add contacts to.

Building a chain of actions

You can add more actions to such a workflow, for example — send a message after adding to the segment.

Adding a few actions to workflow
  1. Click Save and exit.
  2. Go to Trigger configuration.
Trigger configuration
  1. In Start configuration, select Event-based and select the event in Event field. Set up processing unique events (in this case, we recommend you the once option).
  2. Click Apply.
Workflow start configuration



If you want the contact to receive an email with recommendations immediately after the workflow is executed, set the Once in every __ parameter in the Process unique events field. If this parameter is not specified, and a subscriber accidentally clicks the button several times, the scenario will run anyway, sending several identical messages to one person.

  1. Click the Activate button.
Click the Activate button

Each contact who clicks on the button will be added to the segment specified in the workflow. This way, you will get the target audience segments for emailing campaigns with relevant content. Using the same principles you can generate new events arranging much more complex workflows and adding them to buttons, pics, and even text links in your messages.