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. But how do you decide which one to use?

 When deciding whether to use objects or collections, consider:

  • how many groups you have
  • how often you will update them
  • how you want to relate them to people

Objects are easier to manipulate than collections - you can modify a single object unlike a collection where you’d have to replace the whole collection to make a change to a single item. Use objects when you have more then a couple thousand groups or when you’re going to update the items a couple times a day. Job Postings, for instance, would be a good fit for objects if you plan on creating or updating them on a daily basis.

On the other hand, collections are free to Premium and Enterprise customers, easy to sync from a Google sheet, and work well for data you’d otherwise store in a spreadsheet. For example, imagine that you run a school where you manage a few hundred courses every year, a group of teachers, and classroom facilities. You might store your facilities and teachers as collections because there are fewer of them and they change infrequently. Then you might store courses as objects because it’s easy to change course data and relate courses to your audience of students.

You should also consider how objects and collections relate to people. You can relate people to objects directly by adding relationships to their profiles. Relationships persist until you delete them. Relationships to collections do not persist beyond the workflow, though. After people exit a campaign, they’re no longer related to a collection. (You could, however, use a Create/Update Person action to add the collection data to a profile.) You also cannot relate collection data to people outside of a workflow. Rather, you must use a Query Collection action in a campaign to retrieve the relevant data and relate it to people while in the campaign.

ObjectsCollections
Relate to peopleIndependently of workflowsOnly inside workflows
Frequency of updatesYou can update an individual object at any time.You have to replace the entire collection to update a single item, so we recommend infrequent updates.
PricingTieredFree (available on Premium and Enterprise plans)

Objects

An Object is a grouping mechanism in 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 or an object—like a person’s name, the date they were created in your workspace, or a company’s billing date etc. Use attributes to target people and personalize messages. Attributes are analogous to traits in Data Pipelines., 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!
  Contents
Is this page helpful?