> ## Documentation Index
> Fetch the complete documentation index at: /help/llms.txt
> Use this file to discover all available pages before exploring further.

# Contact data steps

> Update contact, Create or update contact, Add and Remove tags, Filter, Round robin and Format data: change, find, sort and clean contact data inside a campaign.

These steps work on contact data while a campaign runs. Click **+** on the canvas and look in **Contact data**. **Filter** and **Round robin** are also under **Conditions > More ways to branch**.

## Update contact

Changes the contact that reaches the step. Click **Add field** for each field to change:

* **Field**: first name, last name, full name, email, phone, company, company website, job title, headline, location, city, country, LinkedIn URL, owner, status, or any of your custom fields.
* **What to do**: **Set** writes the value. **Set only if empty** fills the field only when it has nothing yet. **Clear** empties it.
* **Value**: type it, or click **Insert** to add a variable: a contact field, a value from an earlier step, the trigger's data or one of your workspace variables.

A value that comes out empty because a variable is missing never erases a field. Only **Clear** does. A full name fills the first name (first word) and the last name (the rest). An email that isn't valid, or a LinkedIn URL another contact already has, is left as it was.

Below the fields, **Add tags** and **Remove tags** let you pick tags your workspace already uses or type a new one.

The card's hover shows what the step does, for example **Sets 3 fields, + hot**. The contact's history lists every change with the old and the new value, and each field that was left as it was, with the reason.

## Create or update contact

Finds a contact in this workspace and updates it, or creates it when none matches. Useful when a form, a webhook or another contact's data names a person, for example a referral.

1. **Find the contact by**: **Email**, **LinkedIn URL** or **Phone**.
2. **Email to look for** (or URL, or phone): usually a variable, like `{{trigger.email}}`.
3. **Create the contact if none matches** is on by default. Turn it off to only update contacts you already have.
4. Add the fields to write, the same way as in **Update contact**, and tags to add.
5. Optional: **Also add to a list** and **Also add to a campaign**. That campaign's own entry rules and account limits apply, and a contact already in it isn't added twice.

Later steps can use `{{steps.<step>.contact_id}}` and `{{steps.<step>.created}}` (`true` when it was created). Each contact's visit to the step creates or updates once, even after a restart.

If the value to look for is empty or not valid, the contact is on your blocklist, or nothing matches and creating is off, the step takes its **failed** way. With nothing connected there, the contact stops with **Couldn't find or create the contact** and **Retry**.

This step also works in [campaigns without contacts](/help/campaigns/campaigns-without-contacts.md), so a webhook can create the contact it is about.

## Add tags and Remove tags

**Add tags** puts tags on the contact; **Remove tags** takes them off. Pick from the tags your workspace already uses, or type a new one and press **Enter**. A tag the contact doesn't have is skipped.

## Filter

Lets a contact go on only when a condition is true, for example **Email is not empty** or **Has one of these tags**. Pick what happens to the others:

* **Stop here** (default): they leave the campaign. Their history and the run log say **Didn't match the filter**.
* **Skip to the end**: they finish the campaign without the steps after the filter.

A Filter has one way out. Use a **Condition** when the contacts that don't match need their own steps.

## Round robin

Sends contacts to **Branch 1**, then **Branch 2**, then **Branch 3**, then back to **Branch 1**, in turn. Use it to share contacts between teammates, sending accounts or message versions.

* Name each branch if you like; the name shows on its way out on the canvas.
* Give a branch a **weight** to send it more: weights 2, 1, 1 send twice as many to the first branch (Branch 1, Branch 2, Branch 3, Branch 1...). The panel shows the order.
* **Add branch** adds one (up to 20). The rotation keeps going from where it was.

Kerux keeps the count for each Round robin step, so two contacts arriving at the same moment never take the same turn, and a restart loses nothing. A contact that comes back to the step keeps its branch. For a random split by percentage, use **A/B split** instead.

## Format data

Takes one value (usually a variable) and runs it through operations, in order. Add as many as you need:

* **Cut**: first word, last word, first N characters, last N characters, text before or after a separator, split and take part N (`-1` takes the last part).
* **Clean**: trim spaces, remove characters, replace text, UPPER, lower, Capitalize Words.
* **Extract**: email domain (`ana@acme.com` gives `acme.com`), domain from a URL (`https://www.acme.com/about` gives `acme.com`), a number (`$1,250.50` gives `1250.5`).
* **Default if empty**: a value to use when nothing is left.
* Lists, numbers and dates: split into a list, join, add, subtract, multiply, divide, round, format a date, add to a date.

**Try it with a sample** shows the result as you change the operations. Save the result in a contact field, keep it as `{{steps.<step>.value}}`, or name it in **Save as variable** and use `{{vars.<name>}}` in later steps. For example, "Last word" on a full name gives a last name to use in a message.

If a value can't be read (an amount that isn't a number, a date that isn't a date), the step takes its **couldn't read it** way. With nothing connected there, the contact stops with the reason and **Retry**.

## In the API

These steps are part of a campaign's definition, so the API builds and edits them like any other step: `update_lead` (with `fields`), `upsert_contact`, `add_tag`, `remove_tag`, `filter`, `ab_split` with `"mode": "round_robin"`, and `transform`. `GET /api/v1/tags` lists your workspace's tags. See [the API](/help/developers/api.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.