Custom field: Multi value

Overview

Custom fields hold subscriber info specific to your organisation in unique database fields. Multiple values allow subscribers to select more than one response for certain options. These multi-value custom fields can now be implemented across the product, wherever you use custom fields.


Creating Multi-Value Custom Fields

Creating multi-value custom fields works exactly like creating a single-value custom field, so we'll begin there. Click Contact management > Custom fields.

CustomFields

You can either edit your existing custom field, or create a new custom field. In our example we will use an existing custom field to allow subscribers to select more than one option for the type of subscriber they are.

CustomFields-Create

 

Click Edit to bring up the properties of the field you've selected. The same options are also available when you create a new custom field.

  • In the Field Type drop-down, select Multiple Value.
  • The multiple value field name: Name your field. Make it descriptive so it's easy for your subscribers to understand what the field is about.
  • Custom field visibility: Choose between public or private. If the field's visibility is set to 'Public', a contact can modify the field when updating their profile.

Allowed Options

In this section you can set up the options that your subscribers can select in the multi-value field.

  1. Click the plus sign to add a field.
  2. Enter the field label.
  3. Click Save.

You can click the minus sign if you need to delete the field.

CustomFields-Select

You can learn more about creating and editing custom fields on our Custom Fields page.

Using Multi-Value Custom Fields

There are many places where you can use multi-value custom fields:

Update My Profile

If the multi-value custom field is set to public, users can now update this field on their profile.

Contacts Interface

You can edit the fields yourself if you know which option your contacts will select, but it is best if they fill it in themselves when updating their profiles.

Subscription Forms - Product Creation

You can include multi-value options in your subscription forms. Create your subscription form as normal. In the builder, find your multi-value field from the options and drag it into form.

Subscription Form

You can read our article on how to create Subscription Forms if you are new to them.

Subscription Forms - Public Interface

If a subscriber is already part of your list and you want them to update their details to include your multi-value options, you can send them an email to a subscription form which they can then fill in with the necessary details. When they click submit, their information in your contact lists will update accordingly.

Bulk Update

You can bulk update with the multi-value custom field. It will appear under the Custom Fields header and allow you to set all your contacts to a single option. THis works the same as bulk update for single-value custom fields.

It would be best to let your contacts update their information accordingly.

API Update

Updating through the API will require a separate line of code for each option you want to assign your contact. The prefix for multi-value fields is "cfv_" and can be found in the properties tab of the custom fields screen.

API_CFV

We have an extensive API Guide available for all API-related queries.

Importing

Ensure that the document you are importing has this custom field included as a column for the system to detect the custom field correctly.

For API importing, use the same CFV_ value in your API code.

For more information on Importing, read our Importing Contacts guide.

Filters

You can create a filter for your multi-value custom field.

Click Contact Management > Filters > Create Filter. In the filter tabs, select Custom Fields and you can set a condition for your multi-value custom field. You can select more than one option for the value and the filter will work according to the condition.

Filter_MV

The filter option breaks down into different conditions for the selected options:

  • One of: Filters for one of the selected values.
  • All of: Filters according to all of the selected values.
  • None of: Filter is set for none of the selected values.

Personalising with Multi-Value Fields

You can personalise the body of an email using a combination of multi-value custom fields and if statements. This powerful combination allows you to either hide or display text based on a subscriber’s preferences.

For example, if you’ve collected data on your subscriber’s favourite food (burgers vs. pizza), and you want to offer your subscribers a 10% discount on their favourite dinner, you can use multi-value fields so pizza lovers will read “pizza” in their email, while the burger aficionados will read “burgers”.

How to Use IF Statements With Multi-Value Fields

If statements must read by our server, interpreted, and then the desired result inserted in the email before it is sent to each subscriber. As such, it is really important that you structure your if statements correctly.  If you don’t, our server won’t be able to reference your list and retrieve the correct information.

Here is an example of what the text would look like on our pizza/burger special for the subscribers who prefer burgers:

Everlytic Café Friday special: 10 % off all {% if contact.cfv_burgers == 1 %} burgers {% endif %} this week only!

Let’s break down the code portion in detail below.

{% if contact.cfv_burgers == 1 %} burgers {% endif %}

  1. The curly brackets and percent signs at the beginning and end of the code tell the email program that we’re talking to it in code.

{% if contact.cfv_burgers == 1 %} burgers {% endif %}

  1. Use the custom field name to tell our system which information to send with each email. You will insert this field in the first set of brackets. Remember to remove the curly brackets that come with the personalisation tag.

{% if contact.cfv_burgers == 1 %} burgers {% endif %}

  1. Add "==" and either 1 for true, or 0 for false.

{% if contact.cfv_burgers == 1 %} burgers {% endif %}

  1. Outside the if statement opening brackets, enter the text you want to display. This is the text that will show if the condition is met. In this case, we’re saying “If the subscriber likes burgers, display burgers”.

{% if contact.cfv_burgers == 1 %} burgers {% endif %}

  1. After the text, you need to close the if statement so that our server doesn’t carry on reading the rest of the email as though it were part of this instruction.

{% if contact.cfv_burgers == 1 %} burgers {% endif %}

Now that you’ve mastered the single variable, let’s look at adding a second. This will allow us to offer our special on burgers or pizzas. All you need to do is add a second line telling the server to check for the pizza variable.

{% if contact.cfv_burgers == 1 %} burgers {% endif %} {% if contact.cfv_pizza == 1 %} pizzas {% endif %}

This simple format allows you to have multiple fields and simply tell our server which one to put in here.

 

Translate »