YCloud Sequences icon

YCloud Sequences

Pre-built WhatsApp automation sequences: contact upsert, inbound routing, opt-in/out, onboarding, message status routing, tag campaigns and auto-responses.

Contact Upsert

AI-generated

Summary

Upsert a contact by searching for an existing contact via phone number in E.164 format and either returning the existing contact or creating a new one. Optionally update contact fields if the contact already exists.

Inputs

  • Phone Number (required) — Phone number in E.164 format to look up or create the contact for. Supports expressions.
  • On Contact Found — Determines behavior if a contact with the phone number exists: either 'Do Nothing' and return existing data or 'Update Contact Fields'.
  • Contact Fields — Optional fields to set when creating a new contact or when updating an existing contact if updating is selected. Includes Country Code, Nickname, Owner Email, Tags (comma-separated), and Custom Attributes as JSON string.

Output shape

Two outputs: the first output returns items for contacts found (including updated contacts if applicable), the second output returns items for newly created contacts.

Each output item includes the contact data in JSON format and preserves input item pairing. On errors, items include an error message if 'Continue On Fail' is enabled.

Examples

Example 1: Find existing contact by phone number and return its data if found, otherwise create it with specified fields.

Set 'Phone Number' to the contact's phone in E.164, 'On Contact Found' to 'Do Nothing', and provide any desired 'Contact Fields' to set when creating a contact.

Links

Discussion