Add a post-call action
Add one post-call action to an agent.
The agent's other actions stay as they are. Send an Idempotency-Key header
to retry safely: the same key and body return the action the first request
added.
Path parameters
agent_idintegerrequiredThe ID of the agent.
Headers
Idempotency-KeystringAny unique string. A retry with the same key and body adds nothing new.
Body
typeenumrequiredThe channel. It cannot change after the action is created:
delete it and add a new one. google_sheets, slack,
salesforce, hubspot and zoho_bigin deliver through an
account connected in the dashboard: pass its id as
integration_id (see List integrations).
One of: emailwebhookomni_crmcloud_whatsappworkflowgoogle_sheetsslacksalesforcehubspotzoho_bigin
integration_idintegergoogle_sheets, slack, salesforce, hubspot, zoho_bigin
only, required: the id of your integration of that type.
spreadsheet_idstringgoogle_sheets only, required: the id in the sheet's URL, the
part after /d/.
spreadsheet_namestringgoogle_sheets only: the sheet's name, for display.
worksheet_namestringgoogle_sheets only: the tab to append to. Defaults to Sheet1.
channel_idstringslack only: the channel id. Send this or channel_name.
channel_namestringslack only: the channel name. Send this or channel_id.
object_namestringsalesforce: Lead (default), Contact, Account,
Opportunity, Case, Task or Product. hubspot, required:
contact, company, deal or ticket. Both send a fixed set of
fields for the chosen object, so they take no extracted_variables.
create_call_logbooleanzoho_bigin only: log the call in Zoho Bigin. Defaults to true.
update_contactbooleanzoho_bigin only: update a matching contact with what the call captured. Defaults to true.
create_contactbooleanzoho_bigin only: create a contact when no contact matches. Defaults to true.
actionenumsalesforce only: upsert finds the record by the caller's number
and updates it or creates it. create creates a new record every
call. Defaults to create.
One of: createupsert
match_fieldstringsalesforce only, with upsert: the phone field the caller's number is looked up in. Defaults to Phone.
log_callbooleansalesforce only: log the call on the record, with the summary and recording link. Defaults to false.
add_notebooleansalesforce only: add the call summary as a note on the record. Defaults to false.
recipientsstring[]email only, required: the addresses to notify.
urlstringwebhook only, required: the endpoint that receives a POST with the call payload.
Format uri
phone_number_idintegercloud_whatsapp only, required: your Cloud WhatsApp number the message is sent from. Also send template_id or templates, or nothing is sent.
template_idintegercloud_whatsapp only: an approved template on that number.
template_variablesobject[]cloud_whatsapp only: which extracted variable fills each template placeholder.
+ Show child fields (2)− Hide child fields
indexstringThe placeholder number, as a string.
extracted_varstringThe key of the extracted variable whose value fills this placeholder.
templatesobject[]cloud_whatsapp only: one or more templates to send.
+ Show child fields (4)− Hide child fields
template_idintegerAn approved template on the chosen number.
usage_descriptionstringWhen this template should be sent. After the call, the model reads these descriptions to choose which templates fit the conversation.
always_sendbooleanSend this template after every call, whichever templates the model chooses.
variable_mappingsobject[]How to fill each template placeholder.
+ Show child fields (5)− Hide child fields
indexstringThe placeholder number, as a string.
extracted_varstringThe extracted variable whose value fills this placeholder.
static_valuestringA fixed value for this placeholder. When set, it is used instead of the extracted variable.
modeenumWhich input the dashboard shows for this placeholder. It
does not change the value sent: a static_value is used
first, then the extracted variable, then fallback_value.
One of: variablestatic
fallback_valuestringThe value to use when the variable is not extracted.
workflow_idintegerworkflow only, required: the workflow to run. It must have a published version, or the action is skipped.
includestring[]Which sections to include.
One of: summaryextracted_variablesfullConversationsentiment
extracted_variablesobject[]Variables the model should pull out of the conversation. A key
already used by another action on this agent must have the same
prompt, or the request is refused with 400. Other actions are
never changed to match.
+ Show child fields (2)− Hide child fields
keystringrequiredUnique identifier for the variable in the post-call payload.
promptstringrequiredInstruction for the model on what to pull out of the conversation.
trigger_call_statusesstring[]Call outcomes that fire this action. Omit to use the default
(completed, voicemail_detected).
One of: completedvoicemail_detectedfailedno-answerbusycanceled
user_idintegerresellers onlyReseller keys only: act as one of your clients by its user id. Omit it to act on your own account. How acting for a client works.
Was this page helpful?
