One-to-Many Data is different structurally from Person Data and requires a bit more preparation work for you to become completely comfortable using it. This is our best practice on how you can start off right when working with One-to-many Data.
In this article, you'll find information about:
- Agillic's Recommended Best Practice on Working with One-to-Many Data
Agillic's Recommended Best Practice on Working with One-to-Many Data
Get Familiar with One-to-Many Data
The first step to successfully work with One-to-Many Data is to understand how it works. One-to-Many Data is a data type that is stored in a One-to-Many table linked to an individual recipient in your Agillic database. A One-to-Many Table could, for instance, contain data on your recipient's purchases or subscriptions.
Unlike Person Data, One-to-Many Data can store multiple rows of data for the same recipient. An example of this would be multiple rows containing multiple purchases or subscriptions.
See below for an example of One-to-Many Data for a recipient:
The recipient with email firstname.lastname@example.org has made 3 purchases in the PURCHASES One-to-Many table.
You can read more about how to check your One-to-Many Data here.
Create One-to-Many Tables
Once you know what data makes sense to store in a One-to-Many Table, you'll have to create the actual One-to-Many Table.
The One-to-Many Table is the overall structure used to store your One-to-Many Data. For instance, a One-to-Many Table could be called 'PURCHASES' and contain fields used to store your recipients' TIME_OF_PURCHASE, the PRODUCT_NAME of the product they bought, or the product's PRICE.
All One-to-Many Tables also need a field used to identify the different rows in the One-to-Many Table. In the below example, this is the first field named 'ID'. Thie identifier is important when you import data to the Table so Agillic knows which row to update or create new.
You can read more about how to create a One-to-Many Table here.
A One-to-Many Table named 'PURCHASES' containing the id field named 'ID' as well as other fields such as TIME, NAME, STORE, etc.
Once you've created your One-to-Many Table and added all necessary fields, you'll be ready to import One-to-Many Data to your recipients.
Create Test Recipients with One-to-Many Data
The best way to become comfortable working with One-to-Many Data is to create test recipients that resemble your live recipients. This allows you to test Conditions and personalised content based on One-to-Many Data, without the risk of influencing real customers and their data.
Firstly, you should locate all the test recipients you want to add One-to-Many Data to. If you don't have any test recipients to add One-to-Many Data to yet, you can either:
Once you have all the necessary test recipients created on the Staging environment, you're ready to start importing One-to-Many Data.
One-to-Many Data can't be created through the UI. So, the easiest way to add One-to-Many Data to your test recipients is to create an import file. When importing One-to-Many Data, you'll need to import it in the correct format for One-to-Many Data.
See an example of an import file containing One-to-Many Data below:
An Import file ready to import One-to-Many Data to the One-to-Many Table named 'PURCHASES' for the two test recipients with the email addresses blue and green. The two recipients will each have two rows of One-to-Many Data imported.
You can find more information about the One-to-Many format here.
You can also read more about how to create an Import file here.
Play with One-to-Many Conditions
Once you've successfully created your One-to-Many Table and created test recipients with multiple rows of One-to-Many Data, you're ready to start creating Conditions using One-to-Many Data.
The best way to grasp how One-to-Many Conditions work is to play around with the Conditions while observing which of your test recipients match your chosen Conditions. This is why it's so important that you have multiple test recipients.
For instance, if you want a segment including all recipients who made one or more purchases within the past month, you should ensure that you have, for example, one recipient who made a purchase within the past 30 days, one who doesn't have any purchases, and one who made multiple purchases but where all purchases are older than 30 days old. This way, when you start setting up your Conditions, you can observe which recipients meet your Conditions and which ones don't.
Learn how to check your recipients One-to-Many Data here.
A test Target Group with One-to-Many Conditions set up to find all test recipients who have made one or more purchases within the past 30 days. The test recipients can be inspected by clicking the 'Edit OTM' button for each test recipient to ensure the expected recipients meet your set Conditions.
Familiarise yourself with creating One-to-Many Blocks
Other than working with One-to-Many as Conditions, you'll probably also need to show One-to-Many Data in your outbound communications at some point in time. For example, this could be to show a recipient their newest purchase in a confirmation email. To do this, you'll need to use a One-to-Many Block. Learn how to insert a One-to-Many Block here.
Once again, it's important that you've created your test recipients with One-to-Many Data so you can test your One-to-Many Block once you've set it up.
You can test this in a number of ways:
- Preview Panel - intended for quick overviews.
- Test Panel - intended for initial tests as long as a Recipient ID is included.
- Manually execute a Flow on Staging - used as the most accurate form of testing.
A One-to-Many Block set up to show the One-to-Many fields NAME, STORE, and ID from a PURCHASES One-to-Many table. The Condition ensures that only PURCHASES from the past day will show.
Test, test, test!
No matter what type of data you're working with, you can never test enough.
Testing ensures that the One-to-Many Data used in Conditions and your communications act and display as intended before they're sent out to your recipients.