Create or update person

This action lets you update a person. You can update the person currently in your automation workflow, or you can update a related person. If this related person doesn't exist, this action creates a new person!

How it works

You can use the Create or update person action in any automation workflow. When you update the person currently in your automation, you can set attributes from static values, the event that triggered your automation, other profile attributes—or any other value you could otherwise set with liquid or JavaScript.

If you want to update another person—or you use the action in a webhook-triggered automation—you’ll select a value representing the other person’s identifier. If the person exists, we’ll update their attributes accordingly. If the person does not exist, we’ll create them and set their attributes accordingly.

You might use this action to:

  • Update a person’s subscription date for “account anniversary” automations.
  • Calculate a customer’s lifetime value (with a total_purchase_value attribute, for example).
  • Create a person based on an incoming webhook.
  • Set a customer’s next appointment time.

You don't need a delay after this action

Your automation workflow will automatically wait for the attribute update to finish before moving to the next step. You don’t need to add a delay after a Create or update person action—the workflow won’t proceed until the update finishes.

flowchart LR a{Is the update for<br>the current person}-->|Yes|b[Update<br>current person] a-->|No: someone else<br>or webhook-triggered automation|c{Does this person exist?} c-->|Yes|d[Update<br>other person] c-->|No|e[Create<br>new person]

Create or update a person

In the Workflow step of your automation:

  1. Drag the Create or update person block into your workflow.

  2. Give the action a Name and click Add Details. You can also set Action Conditions if you don’t want everybody in your workflow to trigger this action.

    Add create or add person block to your workflow
  3. Select whether you want to update The person in the workflow or Someone else. If you select Someone else, you’ll need a value to use as an identifier for that person.

    Set attributes on the person you want to update
  4. Click Add attribute and set attribute values for the person.

    • Attribute represents the name of the attribute you want to set.
    • Value is the type of value you want to populate your attribute with. For example, if you want to use an event property as the person’s attribute value, select Event attribute. Then in the field to the right, choose the event attribute.

    You can set nested attributes with JSON dot notation

    Use JSON dot notation to set attributes inside other attributes or create an array of values. See Storing and using JSON for more information about dot notation in Customer.io.

  5. Click Save Changes when you’re done.

Use the Remove attribute option if you want to unset a person's attribute

Setting an attribute value to an empty string or null is the same as removing that attribute from a person.

You don't need a delay after this action

Your workflow automatically waits for the attribute update to complete before moving to the next action. You don’t need to add a delay after a Create or update person action—the workflow won’t proceed until the update finishes.

Webhook-triggered automations or the Someone Else option

When you use Create or update person in a webhook-triggered automation or select the Someone else option, you’ll select an identifier that we’ll use to find or create a person. Customer.io looks for the person represented by this value. If that person exists, we’ll update them normally. If we can’t find a person matching the identifier you provide, we’ll create one.

In general, this means that either the incoming data or the current person in your workflow must have a value representing another person.

Set attributes

In most automations, you can set an attribute to one of these data types:

  • Profile attribute
  • Journey attribute
  • Static value
  • Liquid
  • JavaScript

In automations triggered by events, form submissions, objects, or relationships, you can also set an attribute equal to trigger data.

  • For event or form-triggered automations, you’ll choose “Event attribute” from the dropdown then click beside an event attribute from the left-hand panel of sample data.
  • For object or relationship-triggered automations, you’ll choose “Trigger object attribute” or “Trigger relationship attribute” from the dropdown. Then choose an attribute from the list of available values. To see a preview of the payload, make sure you select a person from the sample data on the left who has a relationship to the object.

You can't set object or relationship attributes with a workflow action

If you want to set object or relationship attributes as a part of an automation or broadcast workflow, you’ll need to use a Send and receive data action and call our API.

Using liquid in attribute updates

You might use liquid to manipulate the values you set as attributes—if you need to convert timestamps, append values, or access a specific set of values from an array, etc. See the liquid tag list for a list of ways you can transform data.

An attribute can contain JSON. However, when you reference an array or object, you’ll need use | to_json. By default, liquid maps objects and arrays to strings (or integers, where applicable). Use this tag, like {{event.object | to_json}} when you reference an object or array to avoid errors and maintain the original shape of your data!

Use JavaScript in attribute updates

You can manipulate attribute values with JavaScript. When using JavaScript, you’ll write a return statement for each attribute value you want to set. You can set properties from any source available in your automation—trigger data, attributes, event properties, snippets, etc.

For example, if you wanted to access a person’s id from within the identifers object in your automation’s trigger, you would write return triggers.identifiers.id;.

See our JavaScript quick reference guide for more examples to help you take advantage of JavaScript in your workflow.

You can't use Liquid inside JavaScript

When you use the JavaScript option, you must manipulate values with JavaScript. If you try to return a snippet value that contains Liquid, you’ll receive an error.

use javascript to manipulate attributes
Updated September 14, 2026