Sort contacts based on their answers to a form

Learn how to sort your contacts into separate address books based on their answers to a form.


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.

mceclip1.pngThere are three steps to this process:

  1. Create your data field
  2. Create your program
  3. Create your form

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:

  1. Go to Email > Contacts > Contact data fields.
  2. Select NEW DATA FIELD.
  3. Create a new text type data field and give it a name. In this example, we’re calling it EMAIL_FREQUENCY.
  4. 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

  1. Go to Email > Automation > All programs.
  2. Select NEW PROGRAM, then select Blank Template.
  3. Enter a name for the program, and, optionally, expand the Program location drop-down menu and choose a folder to store the program.
  4. 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

  1. Drag a Multi decision node onto the canvas so it is connected to the Start node.
  2. Select the Multi decision node, then SELECT CONDITION.
  3. Select Contact data field rule, then expand the drop-down menu and choose the data field you created in Step 1.
  4. Set the data field value to be equal to Weekly, then select APPLY.
  5. Select NEW ROUTE, then repeat steps 3-4, only this time set the value to Monthly.
  6. For Default route, select IMMEDIATELY, then select APPLY.
  7. 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

  1. Drag an Add contact node onto the canvas, connected to route 1 of your Multi decision node.
  2. 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.
  3. Select or create the address book for contacts who want to receive weekly emails, and then select APPLY.
  4. 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.
  5. Connect the Add contact nodes to the End node.
  6. 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:

  1. Go to Pages and Forms > New page or form.
  2. 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.

  3. 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.
  4. Drag a Multiple choice Form block onto the form builder canvas.
  5. Enter your question text, and then select [Click to add item] to enter your response options.
  6. 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.
  7. Once you’re happy with your form design, select SAVE.
  8. In the Submit actions side panel:
    1. Set Respondents can complete the form to MULTIPLE TIMES.
    2. Under Add respondents, set Enrol on to program to the program you created in Step 2.
  9. 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:

See also

Did you find this article helpful?

Can we help?

Thanks for using Dotdigital. If you need more help or support, then contact our support team.