Support
Support agents, website chat, conversations, assignment, and resolution
The Support module powers website chat and the Admin support inbox. Storefront visitors start conversations through the storefront support API. Admin users create support agents, reply as staff, assign conversations, and resolve them.
Storefront Chat
POST
/v1/storefront/{storeId}/support/conversations SDK:
arky.support.startConversation() POST
/v1/storefront/{storeId}/support/conversations/{conversationId}/messages SDK:
arky.support.sendMessage() GET
/v1/storefront/{storeId}/support/conversations/{conversationId} SDK:
arky.support.getConversation() import { initialize } from "arky-sdk/storefront";
const arky = initialize({ baseUrl, storeId });
const started = await arky.support.startConversation({
agent_key: "default",
metadata: { page: window.location.pathname },
});
const next = await arky.support.sendMessage({
conversation_id: started.conversation.id,
input: { type: "text", content: "I need help with an order." },
});
Parameters
| Name | Type | Description |
|---|---|---|
agent_key optional | string | Support agent key. Omit it to use the default active agent. |
metadata optional | Record<string, unknown> | Storefront context saved with the conversation. |
Support Agents
POST
/v1/stores/{storeId}/support/agents SDK:
sdk.support.agent.create() GET
/v1/stores/{storeId}/support/agents SDK:
sdk.support.agent.find() PUT
/v1/stores/{storeId}/support/agents/{id} SDK:
sdk.support.agent.update() DELETE
/v1/stores/{storeId}/support/agents/{id} SDK:
sdk.support.agent.delete() const agent = await sdk.support.agent.create({
store_id: "store_abc123",
key: "default",
name: "Website Support",
status: "active",
entry_node_id: "hello",
nodes: {
hello: {
type: "message",
text: "Hi. How can we help?",
buttons: ["Talk to us"],
},
},
edges: [],
});
Support agents are store-scoped flow definitions. Nodes can send messages, collect input, hand off to AI mode, or hand off to human staff.
Admin Conversations
GET
/v1/stores/{storeId}/support/conversations SDK:
sdk.support.conversation.find() GET
/v1/stores/{storeId}/support/conversations/{conversationId} SDK:
sdk.support.conversation.get() POST
/v1/stores/{storeId}/support/conversations/{conversationId}/reply SDK:
sdk.support.conversation.reply() POST
/v1/stores/{storeId}/support/conversations/{conversationId}/assign SDK:
sdk.support.conversation.assign() POST
/v1/stores/{storeId}/support/conversations/{conversationId}/resolve SDK:
sdk.support.conversation.resolve() const inbox = await sdk.support.conversation.find({
store_id: "store_abc123",
status: "escalated",
limit: 25,
});
await sdk.support.conversation.assign({
store_id: "store_abc123",
conversation_id: inbox.items[0].id,
account_id: "acct_staff_1",
});
await sdk.support.conversation.reply({
store_id: "store_abc123",
conversation_id: inbox.items[0].id,
content: "I can help with that.",
});
await sdk.support.conversation.resolve({
store_id: "store_abc123",
conversation_id: inbox.items[0].id,
});
Resolved conversations are closed. New visitor messages create or continue active conversations instead of reopening closed support state.