Conversations stored by Kapso for a phone number, plus thread control on shared numbers.
For project-wide queries, assignments and status changes see
KapsoEx.Platform.Conversations.
Summary
Functions
Gets a conversation. Params: fields.
Lists conversations, latest activity first.
Passes, releases or takes a conversation between apps on a shared number.
Types
@type result() :: {:ok, map()} | {:error, KapsoEx.Error.t()}
Functions
Gets a conversation. Params: fields.
@spec list(KapsoEx.Client.t(), String.t(), map() | keyword()) :: result()
Lists conversations, latest activity first.
Params: status ("active"/"ended"), assigned_user_id, unassigned,
last_active_since, last_active_until, phone_number, limit,
before, after, fields.
@spec thread_control( KapsoEx.Client.t(), String.t(), String.t() | map(), String.t(), keyword() ) :: result()
Passes, releases or takes a conversation between apps on a shared number.
action is "pass", "release" or "take". to is a phone number or a
map with :to / :recipient.
Options
:target_role- for"pass":"escalation","ai_agent","customer_service","marketing","utility"or"ctwa".:metadata- string (up to 2000 chars) passed to the receiving app.
A 502 means the outcome is unknown; Kapso never retries it.
Conversations.thread_control(client, phone_number_id, "15551234567", "pass",
target_role: "escalation", metadata: "Customer asked for a human")