CRM tools
Search, create and update contacts, manage opt-outs and organise people with tags.
waca_contacts_search#Search contacts
Finds contacts in the CRM by name or phone text, status, tags and chat activity. Returns a page with names, phones, tag names and last-chat time. Use detailed when you need contact_id/tag_ids for a follow-up call. Narrow the search rather than paging through everything.
Parameters (9)›
querystring
Free text matched against name and phone.status"okay" | "duplicate" | "issue" | "unsubscribed"[]
Filter by derived status.unsubscribed= opted out.tag_idsstring[]
Only contacts carrying ALL of these tags.chat_activity"all" | "chatted" | "never"
chatted= has a WhatsApp thread,never= no inbound message yet.Default"all"sort"createdAt" | "updatedAt" | "firstName" | "lastName" | "status" | "chatActivity"
No extra notes.Default"createdAt"order"asc" | "desc"
No extra notes.Default"desc"pageinteger
1-based page number.Default1page_sizeinteger
Rows per page, 1-100. Default 20.Default20response_format"concise" | "detailed"
concisereturns the fields a person reads;detailedadds ids and raw fields for follow-up calls.Default"concise"
waca_contacts_get#Get one contact
Full profile of one contact: name, phone, status, opt-out state, tags, custom attributes and chat activity.
Parameters (1)›
contact_idrequiredstring
No extra notes.
waca_contacts_check_phone#Check whether a phone is already a contact
Normalises a phone number and reports whether a contact with it already exists. Call before waca_contacts_create to avoid a PHONE_DUPLICATE error.
Parameters (2)›
country_coderequiredstring
Country calling code digits only, e.g.91for India.phonerequiredstring
Local number or full E.164 without the plus sign.
waca_contacts_create#Create a contact
Adds one contact to the CRM. Every contact needs at least one tag: pass existing tag_ids from waca_tags_list or create one with waca_tags_create first. Fails with PHONE_DUPLICATE when the number already exists (the error carries existingId).
Parameters (6)›
first_namerequiredstring
No extra notes.last_namestring
No extra notes.country_coderequiredstring
Country calling code digits only, e.g.91for India.phonerequiredstring
Local number or full E.164 without the plus sign.tag_idsrequiredstring[]
No extra notes.attributesobject
Custom attribute values keyed by attribute key; list valid keys with waca_contact_attributes_list.
waca_contacts_bulk_create#Create up to 100 contacts
Creates many contacts in one call (max 100). Each row is validated on its own; the answer lists what was created and what failed with the reason, so a duplicate does not stop the rest. Same tag rule as waca_contacts_create.
Parameters (2)›
tag_idsrequiredstring[]
Tags applied to every created contact.contactsrequiredobject[]
Each item: first_name (string), last_name (string), country_code (string), phone (string), attributes (object).
waca_contacts_update#Update a contact
Changes name, phone, tags or custom attributes of one contact. Omitted fields stay as they are. tag_ids, when given, replaces the whole tag set (at least one). Opt-out is not changed here: use waca_contacts_set_opt_out.
Parameters (7)›
contact_idrequiredstring
No extra notes.first_namestring
No extra notes.last_namestring
No extra notes.country_codestring
Country calling code digits only, e.g.91for India.phonestring
Local number or full E.164 without the plus sign.tag_idsstring[]
No extra notes.attributesobject
Custom attribute values keyed by attribute key; list valid keys with waca_contact_attributes_list.
waca_contacts_set_opt_out#Opt a contact out of messages
Marks a contact as opted out, so broadcasts skip them and single sends refuse them. Use this when a customer asks to stop receiving messages. Only opting out is possible here: re-enabling a contact who opted out is done by a person in the SheetWA dashboard. Idempotent.
Parameters (3)›
contact_idrequiredstring
No extra notes.opted_outboolean
Always true. Opting a contact back in is dashboard-only.reasonstring
Why they asked to stop; kept in the audit trail.
waca_contact_attributes_list#List custom attribute definitions
The custom attribute keys this workspace accepts on contacts (key, label, type). Use the key values in the attributes object of create/update.
Takes no parameters.
waca_tags_list#List tags
Every contact tag in the workspace with its id and how many contacts carry it. Tags group contacts for broadcasts and searches.
Takes no parameters.
waca_tags_create#Create a tag
Creates a contact tag by name. If a tag with that name already exists, its id is returned with already_existed: true.
Parameters (1)›
namerequiredstring
No extra notes.
waca_tags_assign#Add tags to contacts
Adds one or more tags to one or more contacts. Existing tags on those contacts are kept.
Parameters (2)›
tag_idsrequiredstring[]
No extra notes.contact_idsrequiredstring[]
No extra notes.
waca_tags_unassign#Remove tags from contacts
Removes tags from contacts. A contact always keeps at least one tag; the tool refuses with CANNOT_UNASSIGN_LAST_TAG and lists the contacts that would be left without one.
Parameters (2)›
tag_idsrequiredstring[]
No extra notes.contact_idsrequiredstring[]
No extra notes.