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

# Update contact action

> Create or update a contact record within a workflow. Match contacts by phone or email, then set fields like name, tags, and custom metadata automatically.

Create a new contact or update an existing one. The action matches contacts by phone number or email — if a match is found, it updates the record. If not, it creates a new contact.

## Configuration

| Field         | Required | Description                                                                                       |
| ------------- | -------- | ------------------------------------------------------------------------------------------------- |
| First name    | No       | Contact's first name. Supports `{{variables}}`.                                                   |
| Last name     | No       | Contact's last name. Supports `{{variables}}`.                                                    |
| Phone         | No       | Phone number in E.164 format (e.g., `+14155551234`).                                              |
| Email         | No       | Email address. Automatically lowercased.                                                          |
| Business name | No       | Company name. Supports `{{variables}}`.                                                           |
| Add Tags      | No       | Tags to add to the contact. Tags already on the contact stay. Tags not listed here are untouched. |
| Remove Tags   | No       | Tags to remove from the contact. Tags not listed here are untouched.                              |
| Custom fields | No       | Additional fields to set as key-value pairs.                                                      |

At least one identifying field (phone or email) should be provided so the action can match or create the contact.

## How matching works

1. If a **phone number** is provided, the action searches for an existing contact with that number
2. If no phone match, it searches by **email**
3. If a match is found, the contact is **updated** with the new data
4. If no match, a new contact is **created**

Fields you leave blank are not overwritten on existing contacts.

## Output

| Field       | Description                               |
| ----------- | ----------------------------------------- |
| `contactId` | The contact's ID (new or existing)        |
| `created`   | `true` if a new contact was created       |
| `updated`   | `true` if an existing contact was updated |

## Example

**Tag contacts after a completed call:**

1. Trigger: Conversation ended → Agent Type: voice
2. Condition: Outcome equals "completed"
3. Action: Update contact
   * Add Tags: "called", "interested"

**Create contact from webhook data:**

1. Trigger: Webhook (receives form submission data)
2. Action: Update contact
   * First name: `{{firstName}}`
   * Last name: `{{lastName}}`
   * Email: `{{email}}`
   * Phone: `{{phone}}`
   * Add Tags: "website-lead"
3. Action: Voice call with sales agent

**Move a contact between segments:**

1. Trigger: Booking confirmed
2. Action: Update contact
   * Add Tags: "customer"
   * Remove Tags: "lead", "interested"
