Browse the docs

Build an agent

Variables and contact data

An agent knows who it is talking to. Before each call, CallShift matches the number with a contact of the CRM and hands the agent that contact's data.

Contact fields in the prompt

A contact has a salutation, a firstName, a lastName, an email, an information text and a free metadata object. Prompts read them through variables, and {{contact.metadata.<key>}} reads any key of the metadata, dotted paths included.

JSON
{
  "firstName": "Ada",
  "phoneNumber": "+33612345678",
  "metadata": { "plan": "pro", "renewal": { "date": "2026-11-15" } }
}
Prompt
The customer is on the {{contact.metadata.plan}} plan,
which renews on {{contact.metadata.renewal.date}}.

Set metadata or information: when metadata is set, it takes precedence. The contact's metadata is also in the after-call webhook.

Typos are silent

A variable that resolves to nothing becomes an empty string, with no error. Check a new variable on a test call.

Date and time

CallShift adds today's date, tomorrow's and the current time to every prompt, in the account's timezone (account settings, Europe/Paris by default). Leave them out of your prompts. {{now}}, {{today}}, {{tomorrow}} and {{timezone}} exist if you need them in a sentence.

Inbound calls

The caller is matched by number, exactly as in a campaign, and the prompt must reference contact.* for the lookup to happen. To give the agent fresh data before someone calls, update the contact beforehand with PATCH/v1/contact/{contactId}: its id arrives in the after-call webhook as contact.id.