Getting started with Objects and Collections

When you identify people or send events, you associate data with a person. But what if you want to manage data for a company, a series of educational courses, or other entities? That’s what objects and collections are for in Customer.io: they provide ways to manage non-people data and associate it with people!

How it works

Customer.io revolves around people. You identify people, set their attributes, and send events representing the things that they do on your websites or in your apps. But you might want to maintain some data independently of people and associate this data with people later. Maybe you manage multiple accounts, and people can belong to one or more accounts; or people in your environment can enroll in educational courses; or you might manage recreational sports leagues that people can join.

This is where Objects and Collections come in. They key difference between the two is that you can relate objects to people independently of workflowsA series of actions (messages, attribute updates, etc) that people progress through as a part of a campaign or broadcast., but you can only relate collection data to people inside workflows: object relationships persist beyond a workflow; collection queries don’t.

Objects

 This feature is in beta

That doesn’t mean it isn’t ready to use. Rather, by beta, we mean that we’re actively working on it, and you may notice changes as we increase support for this new feature across other areas of the platform!

An Object is a grouping mechanism Customer.io—a way to associate people with an account, online courses, or recreational sports leagues.

You’ll set up an object with its own attributesA key-value pair that you associate with a person—like their name, the date they were created in your workspace, etc. Use attributes to target people and personalize messages., and then you can set relationships between people and the object. Your object can both supplement people data in segmentsA group of people who match a series of conditions. People enter and exit the segment automatically when they match or stop matching conditions., liquidA syntax that supports variables, letting you personalize messages for your audience. For example, if you want to reference a person’s first name, you might use the variable {{customer.first_name}}., and other aspects of Customer.io.

Objects are a bit like people in that they can contain attributes, and changes to them can trigger messages, but they can’t receive messages or perform events themselves. Rather, when you target an object, you’re really associating data or sending messages to people who are “related to” an object—like messaging a group of people when an online course changes or when they have new charges associated with their account.

flowchart LR subgraph Object direction LR a[create object]-->|set relationship|b[person 1] a-->|set relationship|c[person 2] a-->|set relationship|d[person 3] end Object-->e[object
triggers campaign] e-->f[person 1
enters campaign] e-->g[person 2
enters campaign] e-->h[person 3
enters campaign

Collections

A Collection is data that exists independently of people or objects. You can query a collection as a part of a workflowA series of actions (messages, attribute updates, etc) that people progress through as a part of a campaign or broadcast., and use the data alongside people in the workflow. But, when the person exits the workflow, they’re no longer associated with the data.

flowchart LR a[person triggers
campaign]-->c subgraph Campaign c[query collection]-->|use collection
data in message|d[send message] d-->e[person matches
conversion criteria] end e-->|collection data
no longer applies|f[person exits
campaign]
Copied to clipboard!
Is this page helpful?