Texa DeskDevelopers

Texa AI in your product

Customers and memory

How Texa AI remembers a customer by your reference, and how to read, merge or forget what it knows.

Texa AI remembers each customer across conversations: what they asked before, what was done, the facts it established. In the Texa API it knows them by your reference, customer_ref.

Choose a reference

Use an id from your own system that never changes for that person: user-1842, not an email address or a phone number they might change. Prefixes keep sources apart: wa:2348031234567 for a WhatsApp number you haven't matched to an account yet.

What Texa AI remembers

Shell
curl https://api.texadesk.com/v1/customers/user-1842 -H "Authorization: Bearer $TEXA_API_KEY"

The answer is what Texa AI keeps about the customer. Use it to show your team what Texa AI knows, or to check what it will bring into the next conversation.

You can give Texa AI facts at the start of a conversation with known_facts ("Gold customer since 2021; two cards, one blocked"): it uses them in that conversation without having to ask.

Two references, one person

When you learn that two references are the same person (a WhatsApp number that signs in to account user-1842), merge them so their history is one:

Shell
curl -X POST https://api.texadesk.com/v1/customers/wa:2348031234567/merge \
  -H "Authorization: Bearer $TEXA_API_KEY" -H "Content-Type: application/json" \
  -d '{"into": "user-1842", "by": "sign-in"}'

into is the reference that stays. by says who or what merged them, for the record.

Forget a customer

When a customer asks you to delete their data (their right under the NDPA and similar laws), forget them:

Shell
curl -X POST https://api.texadesk.com/v1/customers/user-1842/forget \
  -H "Authorization: Bearer $TEXA_API_KEY" -H "Content-Type: application/json" \
  -d '{"requested_by": "[email protected], ticket 4471"}'

Texa AI's memory of the customer and their Texa API conversations are deleted. requested_by is kept in your audit log, so you can show the request was handled. A contact in Texa Desk is deleted there, through the Desk (Delete contact).

Texa Desk contacts

Customers who reach you on a channel are contacts in Texa Desk, with their phone, email and custom attributes. Texa AI fills in what it learns (a name, a city) on the contact. Read and change contacts with the Contacts API, and hear about changes with the contact_created and contact_updated webhooks.