Learn how to sort your contacts into separate address books based on their answers to a form.
Overview
A useful way to automatically sort your contacts is by adding those who give similar answers to a form into a specific address book.
We're going to use an example form that asks contacts whether they'd prefer to receive weekly or monthly communications to demonstrate how you can do this. We're going to create a program that sorts your contacts into a particular address book, depending on the answer they gave.
There are three steps to this process:
Step 1: Create a data field
You first need a data field to store your contacts form response in. It’s the value stored in this data field that allows your program to sort the contacts into the relevant address book.
To create a data field:
- Go to Email > Contacts > Contact data fields.
- Select NEW DATA FIELD.
- Create a new text type data field and give it a name. In this example, we’re calling it EMAIL_FREQUENCY.
- Select SAVE.
To learn more about creating new data fields, check out the article Create, delete and edit custom data fields.
Step 2: Create your program
To create a program which will sort your contacts into address books based on their preferred email frequency:
Configure the start node
- Go to Email > Automation > All programs.
- Select NEW PROGRAM, then select Blank Template.
- Enter a name for the program, and, optionally, expand the Program location drop-down menu and choose a folder to store the program.
- Select the program Start node, then SELECT SCHEDULE. Select the No scheduled enrolment radio button, then select APPLY.
The program is set to No scheduled enrolment because we’re going to configure our form to push contacts into the program automatically once they submit their answers.
Add a Multi decision node
- Drag a Multi decision node onto the canvas so it is connected to the Start node.
- Select the Multi decision node, then SELECT CONDITION.
- Select Contact data field rule, then expand the drop-down menu and choose the data field you created in Step 1.
- Set the data field value to be equal to Weekly, then select APPLY.
- Select NEW ROUTE, then repeat steps 3-4, only this time set the value to Monthly.
- For Default route, select IMMEDIATELY, then select APPLY.
- Drag an End node onto the canvas, connected to the Default route of your Multi decision node.
This will exit contacts from the program if they don’t have either of the specified values in the data field rule.
Set up the Add contact nodes
- Drag an Add contact node onto the canvas, connected to route 1 of your Multi decision node.
- Select the Add contact node, then SELECT ADDRESS BOOK, or NEW ADDRESS BOOK, if the address book you want to place your contacts in doesn’t yet exist.
- Select or create the address book for contacts who want to receive weekly emails, and then select APPLY.
- Drag a second Add contact node onto the canvas, connected to route 2 of your Multi decision node. Repeat steps 2-3, but this time select the address book for contacts who want to receive monthly emails.
- Connect the Add contact nodes to the End node.
- Select ACTIVATE.
Your program will look something like this:
To learn more about working with programs, check out the Program builder section of our Help Centre.
Step 3: Create the form
Now that we have our data field set up, and our program ready to accept contacts, we can create the form for contacts to provide their responses about how often they’d like to receive emails.
To create a form:
- Go to Pages and Forms > New page or form.
- Select a template. We’re using the Blank form template to work from.
Collecting an email address
If the template you choose doesn’t already include a Contact email block, you must add one. To do so, drag a Text box Form block onto the canvas, then, in the Settings panel, expand the Question type drop-down menu and select Contact email. This will automatically link the form field to the contact’s email address data field. This allows you to store the form responses against your contacts, and, if you link to the form from a campaign, pre-populates the field with the contact’s email address.
- Edit the headings and any other page design elements you want to change.
To learn more about building and designing forms, check out the Building pages and forms section of the Help Centre.
- Drag a Multiple choice Form block onto the form builder canvas.
- Enter your question text, and then select [Click to add item] to enter your response options.
- In the left hand Settings tab for the Multiple choice block, select Data field, and then expand the Assign to a data field drop-down menu, and choose the data field you created in Step 1.
For the If you already have this data for a respondent field, leave the default of Update selected.
- Once you’re happy with your form design, select SAVE.
- In the Submit actions side panel:
- Set Respondents can complete the form to MULTIPLE TIMES.
- Under Add respondents, set Enrol on to program to the program you created in Step 2.
- Publish your form.
To learn how, check out the article Publish a page or form.
Share your form
All that remains is to share the form you have created with your contacts. The simplest way to do this is to send an email campaign with a link to the form. You can either send contacts directly to the form hosted on your Dotdigital domain, or you can embed the form on your site, or add it as a pop-over.
To learn more about each of these options, check out these articles: