Talkify / Help / Your own system

Connect your own system.

The Your own system card lets your agent reach your software through its API: look a caller up before it answers, check or change something during the call, or send the call into your system when it ends. This is the full reference, written so you can hand it to whoever looks after your API. Rather not do it yourself? Ask us and we will set it up.

How it works.

One card is one request to your system, at one moment in the call. An agent can carry up to 12 cards, so each job gets its own.

When it runsWhat it is forHow it connects to the agentOn the board
Before the callLook the caller up by their number: their name, their account, an open booking.What you save is written into the agent's instructions before it says hello.Purple wire
During the callSomething the agent does when the conversation calls for it: check a booking, look up an order, log a job.The card becomes one tool on the agent. It decides when to use it from your name and description.Solid wire
After the callSend what happened into your system: the summary, the transcript, what the caller gave.The agent has no part in it, so it cannot forget. It runs off the finished call.Dashed blue wire, blue card

The path of a during-the-call request: the caller asks, the agent picks the tool and fills in the fields it is responsible for, Talkify adds your token and the details it holds and calls your API, then hands the agent only the parts you allowed with a sentence saying what to do with them. Your token never leaves our servers.

Several things during a call means several cards. Checking a booking and logging a repair are two cards, and so two tools. You do not describe them both in one prompt: each card's description is what the agent uses to tell them apart, and we write the list of them into its instructions for you when you deploy.

What your API must do.

Most modern APIs already do all of this.

RequirementDetail
Public https addressIt must start with https:// and be reachable from the internet. Private networks, office-only addresses and our own servers are refused.
A token in a headerWe send it in the header you name, exactly as you paste it, for example Authorization: Bearer abc123.
JSON backThe parts of the answer are read from JSON. Anything else counts as an answer with no details in it.
Answer quicklyBefore the call: 2 seconds, because the caller is waiting for the hello. During the call: the time you set on the card, 5 to 30 seconds, 10 by default. Aim for under two seconds: that is silence on a phone call.
No redirectsA redirect is not followed. Give the final address.
Answer under 256 KBAnything larger is refused rather than read. The agent is passed at most 2 KB of it, so return what a phone call needs.
Handle the rateEach card sends at most 120 requests a minute.

How we read your status code

You answerWe treat it asWhat the agent does
2xxIt worked, as long as your success test passes (see What comes back)Your "when it works" sentence
404Nothing foundYour "when nothing is found" sentence
401 403 other 4xxSet up wrong. Not retried after the call, because it would fail the same wayYour "when it fails" sentence
429 5xx or no answerYour system is having trouble. Tried up to 3 times after the callYour "when it fails" sentence

After-the-call requests carry an Idempotency-Key header made of the call and the card, the same on every try. If your API honours it, a retry can never record one call twice. If it does not, match on the call reference field instead.

Every setting.

In the order they appear on the card, and what each one does to the agent.

SettingWhat it doesEffect on the agent
NameWhat the card is called on the board and in the call's activity.Part of the tool's name and description, so make it say the job: "Check booking", not "API 1".
When it runsBefore, during or after the call. Moves the card to that lane and changes its colour.Decides whether it reaches the agent as details, a tool, or not at all.
DescriptionOne or two sentences, written to the agent.The most important box on the card. During the call, it is how the agent decides to use this tool rather than another one.
MethodGET POST PUT PATCH DELETE, from your API's documentation.None directly.
AddressThe full https address. A word in curly brackets, like {booking_number}, is filled from a field of the same name, safely encoded.Never shown to the agent.
Send the fields asJSON or form fields, for POST, PUT and PATCH.None.
Header it goes in, TokenWhere your token goes and the token itself. Press Save token. Encrypted, write-only, shown only as its last four characters.Never shown to the agent.
Other headersAnything else your API wants, like a store id. These are not secret, so never put a key here.Never shown to the agent.
Fields to sendThe values in the request. See Fields to send.The fields it is responsible for become what it must collect.
What comes backWhich parts of the answer may be used. See What comes back.The only parts of your answer it ever receives.
When it works, nothing is found, it failsA sentence for each. Left blank, a sensible default is used.The matching sentence comes back with each answer as its instruction.
ThenAfter a failure: offer to take a message, put them through, or carry on.Added to the failure instruction.
The caller waits for itTicked, the agent says it is checking first, and the caller hears typing. Untick for something quiet.Stops silence on the line.
It changes something in your systemTick for anything that writes. On by default for POST, PUT, PATCH and DELETE.Reads the details back and gets a yes first, and the caller cannot talk over the send.
Before it sendsYour own wording for that read-back.Replaces our default.
Seconds to waitHow long we wait for your API, 5 to 30 seconds.Past this, it gets the failure sentence.

Fields to send.

One row for each value your API expects.

ColumnWhat it does
Field nameThe exact name your API expects: letters, numbers, underscores and hyphens, starting with a letter or underscore.
SentIn the body, in the query, or in the address. Body fields need POST, PUT or PATCH.
TypeSee below. It tells the agent the format, and we check it again before sending.
Where the value comes fromSee below.
Describe it for the agentWhat it is and how it should look: "The booking number, six digits". This is what the agent reads, so say the format.
The choicesFor "one of a list": the only values allowed.
ExampleOptional. Added to what the agent reads.
Must have itDuring the call, the agent collects it first, and if it tries without it we send nothing and tell it what to ask for. After the call, the request is not sent without it, rather than sending a guess.

Types

TypeSent as
TextA string.
Number, whole numberA number. Whole numbers are rounded.
Yes or notrue or false.
Date, timeYYYY-MM-DD and 24 hour HH:MM.
Phone numberInternational format where we can tell, like +64211234567.
EmailLower case. A value that is not an email address is left out.
One of a listOne of your choices, in your spelling.
Group of fieldsA JSON object, with its own rows inside, up to 3 levels deep.
ListA JSON array of one type, or of groups.

Where a value can come from

SourceBeforeDuringAfterWhat happens
The agent asks or works it outNoYesYesDuring the call the agent gets it from the caller. After the call it is picked out of the transcript using your description, and left empty when it was not said.
Always the same valueYesYesYesA fixed value you type, like a source or a branch code.
A detail of the callYesYesYesFilled by us, so the agent can never get it wrong or invent it. See the list below.
A value saved earlier in the callNoYesYesSomething another card on this agent saved. That is how a lookup passes a customer number to the next card.
What happened on the callNoNoYesSee the list below.

Call details

  • Caller's number
  • Number they rang
  • Call reference (not before the call: it does not exist yet)
  • Agent name
  • Business name
  • Date and time now
  • Today's date

What happened on the call

  • Call summary
  • Transcript as text
  • Transcript as a list of turns
  • How long the call took, in seconds
  • Whether the call went well
  • Details collected on the call

What comes back.

Your API can return everything it likes. The agent only ever gets what you list here.

ColumnWhat it does
Where in the answerThe path to a value, with dots: booking.start. A list uses square brackets: items[].name reads the name from every item. After a test, the real paths are offered to pick from.
Call itThe name the agent sees it under. "Booking time" is better than bk_st_ts.
Who sees it The agent can tell the caller: it may say it.
For the agent only: it may act on it but is told never to read it out, like "behind on fees".
Nobody, only saved: the agent never sees it at all. Use this for ids that only matter to your next card.
Save it for laterKeeps the value as a call variable, named api_ plus your name, for later cards and for the agent's instructions. Names must be unique across an agent's cards.
Only counts as found whenMany APIs answer 200 with {"found": false}. Name that path, and a false, empty or zero value counts as nothing found.

With nothing listed, the top level of your answer is passed on, cut short at 2 KB. That is fine for a first test. List the parts before you go live, because anything passed on is something the agent could read out.

What the agent receives.

Exactly what it is given, so nothing here is a mystery.

Your API answers

{
  "found": true,
  "booking": { "class": "Spin", "start": "6:00 pm", "room": "B" },
  "member": {
    "id": "M-778",
    "notes": "Behind on fees",
    "card": "4111"
  }
}

The agent is handed

{
  "ok": true,
  "found": true,
  "data": { "Class": "Spin", "Starts": "6:00 pm" },
  "for_you_only": { "Staff notes": "Behind on fees" },
  "message": "Tell them the class and the time."
}

The room and the card number were not listed, so they do not exist as far as the agent is concerned. The member id was set to "Nobody, only saved", so it is available to your next card and never to the agent.

KeyMeaning
okfalse when the request failed.
foundfalse when nothing was found or it failed. The agent is told it does not have that information and must not guess.
dataWhat it may tell the caller.
for_you_onlyWhat it may act on and must never read out.
messageThe instruction for this answer: your sentence for the outcome. When an answer worked but held no details, it is also told to state none.

Before the call

There is no conversation yet, so saved values are the only thing that reaches the agent, and a before-the-call card must save at least one. They are written into its instructions on their own lines, under the names you gave them. A blank means not found or not checked, and it is told never to guess or to mention the lookup. Your values can also go in your own wording on the agent card, as {{api_first_name}}. In the greeting, a caller with no match hears it without that part, so "Kia ora {{api_first_name}}, thanks for calling" becomes "Kia ora, thanks for calling". The card has to be on and finished, or the deploy stops and says so.

Before-the-call cards run on incoming calls only. On a call we place, the values start out blank.

After the call

Nothing is said, because the call is over. The request is sent once per call, in the background, and every try is on the call's activity.

A worked example.

A gym, with three cards on one agent.

CardRequestFieldsWhat comes back
Member lookup
Before the call
GET /membersphone in the query, from the call detail "Caller's number"first_name saved as first_name, may say. id saved as member_id, nobody.
Check booking
During the call
GET /bookings/{booking_number}booking_number in the address, the agent asks, must have. member in the query, saved value member_id.booking.class and booking.start, may say. Success test found.
File the call
After the call
POST /callssummary and transcript, what happened on the call. member, saved value member_id. reference, the call detail "Call reference".Nothing needed.

The requests we send for that call

GET /members?phone=%2B64211234567
Authorization: Bearer your-token

GET /bookings/123456?member=M-778
Authorization: Bearer your-token

POST /calls
Authorization: Bearer your-token
Idempotency-Key: conv_abc-handling-xyz
Content-Type: application/json

{
  "summary": "Caller asked about their Spin class.",
  "transcript": "Agent: Kia ora, Kauri Gym...",
  "member": "M-778",
  "reference": "conv_abc"
}

When it goes wrong.

Start with See recent calls on the card, under What happened on recent calls. For the last five calls it shows what each card sent, what came back and what the agent was told, in plain words, including a call that ended as soon as it was answered.

Start with Save and send a test on the card: it shows what was sent and what came back.

You seeUsually means
"Only https addresses can be called", "points at a private network"The address must be public and https. A system on an office computer cannot be reached.
401 or 403The token is wrong, expired, or in the wrong header. Paste a fresh one and press Save token.
404 on every testThe address is wrong, or a word in curly brackets has no field sending a value.
No answerYour system took longer than the card waits. Raise the wait, or speed the endpoint up.
Agent says it found nothing when it should haveThe success test names a path that is not in the answer. Check it against the test result.
Agent has nothing to sayThe paths you listed are not in the answer. It is told to state no details rather than invent them.
Agent does not use the toolThe description does not match how callers ask. Say it in their words.
Agent uses the wrong cardTwo descriptions overlap. Say when each one is for, and when it is not.
Before-the-call values are blankYour system took longer than 2 seconds, or the caller's number did not match. Check your number format against the international format we send.
Nothing arrived after the callCheck the call's activity. A 4xx is the card set up wrong; a required field that was never said stops the send.

Changed something and nothing happened? A changed card does nothing until the build is deployed again. A new token is the one exception: it applies straight away. Still stuck? Get in touch through the help centre, with the call if you have one.

Common questions.

If the agent needs to do several things during a call, is each one a card?

Yes. One card is one request to your system, and each during-the-call card becomes its own tool the agent can use. Checking a booking and logging a job are two cards. The agent chooses between them from the name and the description you write on each, so say plainly when each one is for.

Does our token get shared with anyone?

No. Every request is made from Talkify's own servers, and the token is added at that moment. It is stored encrypted, it is never part of what the agent or the voice service is given, and nobody can read it back once it is saved.

What happens on a call if our system is down?

The call carries on. Before the call, the details are simply blank and the agent treats the caller as somebody new. During the call, the agent is told to say it cannot check right now and follows your fallback. After the call, the request is tried again.

Can the agent make up an answer our system did not give?

It is told not to in every answer. It only receives the parts of your answer you listed, a clear sentence on what to do with them, and an outright instruction to state nothing when no details came back. Test each case with the Test button and a test call before you rely on it.