Escalations

Define when an agent should ask your team for help, what data it must collect and whether it keeps replying while someone handles the case. Find an escalation that already covers the situation or create one, then connect it to the agent.

Agents can share the same workspace escalation. Each time it is triggered, it opens a case with a case number and a log. The API uses clients for contacts.

Example

// 1. Create the escalation in the library
const billing = await platic.escalations.create({
  name: "Billing",
  description: "When the customer reports an error on their invoice.",
  prefix: "BIL",
  fields: [{ key: "order_number", label: "Order number", kind: "text", required: true }],
  assignment: { mode: "contact_owner", userIds: ["billing@acme.com"] },
  agent: { keepReplying: false, waitMessage: "I am passing you to billing." },
});

// 2. Connect it to the agent (publishes right away) and turn on assistance if it was off
await platic.agents.draft.update(agentId, {
  assistance: { enabled: true, escalations: [{ escalationId: billing.id, enabled: true }] },
});
await platic.agents.publish(agentId);

What you need to know

  • Reuse first: check the list of escalations before creating another; several agents can share the same escalation.
  • It does not break open cases: editing or archiving an escalation applies right away to the agents, but each open case keeps its own copy (escalationSnapshot).
  • Fields linked to the contact: use fields[].customFieldId (from custom fields) to take data the contact already has and to save back what the agent collects (sync: "fill_empty" or "overwrite").
  • Enable assistance: create an agent with assistance enabled, or edit its draft and publish to enable it.
  • Connect an escalation: Connect an escalation links an escalation and publishes immediately. It returns 409 DRAFT_PENDING if the draft has unpublished changes; it does not enable assistance.enabled.
  • Permissions: requires the Conversations module (creating, editing and archiving require the owner or administrator role on OAuth; an API key always can). Connecting to an agent requires the Agents permission.

Endpoints

MethodEndpointWhat it does
GET/v1/escalationsList the workspace's escalations
POST/v1/escalationsCreate an escalation
GET/v1/escalations/{escalationId}Get an escalation
PATCH/v1/escalations/{escalationId}Edit an escalation
POST/v1/escalations/{escalationId}/archiveArchive an escalation

Connect escalations to each agent in Agent escalations, manage open cases in Cases, check codes in Errors and use it from AI in Escalations MCP.