BackstageClient.support
BackstageClient.support in @ticketlayer/backstage.
@ticketlayer/backstage / BackstageClient / support
support: {
createInboundAddress: (request: {
accountId?: string;
autoAcknowledge?: boolean;
category?: string;
eventId?: string;
label?: string;
route?: string;
salesChannelId?: string;
venueId?: string;
}, requestOptions?: RequestOptions) => Promise<{
accountId: string | null;
address: string;
autoAcknowledge: boolean;
category: string | null;
createdAt: string;
eventId: string | null;
id: string;
label: string | null;
localPart: string;
route: string | null;
salesChannelId: string | null;
updatedAt: string;
venueId: string | null;
}>;
createMacro: (request: {
accountId?: string | null;
action?: | "open"
| "refund"
| "close"
| "wait_on_customer"
| "wait_on_internal"
| "resolve"
| "reopen"
| "mark_spam"
| "resend"
| null;
body: string;
knowledgeArticleId?: string | null;
name: string;
resultingState?: | "open"
| "waiting_on_customer"
| "waiting_on_internal"
| "resolved"
| "closed"
| null;
}, requestOptions?: RequestOptions) => Promise<{
accountId: string | null;
action: | "open"
| "refund"
| "close"
| "wait_on_customer"
| "wait_on_internal"
| "resolve"
| "reopen"
| "mark_spam"
| "resend"
| null;
body: string;
createdAt: string;
createdBy: string | null;
id: string;
knowledgeArticleId: string | null;
name: string;
resultingState: | "open"
| "waiting_on_customer"
| "waiting_on_internal"
| "resolved"
| "closed"
| null;
updatedAt: string;
updatedBy: string | null;
version: number;
}>;
deleteMacro: (macroId: string, requestOptions?: RequestOptions) => Promise<true>;
getInbox: (options?: {
cursor?: string;
limit?: string;
view?: string;
}, requestOptions?: RequestOptions) => Promise<{
cases: {
assignedAt: string | null;
assigneeUserId: string | null;
category: string | null;
channel: | "email"
| "phone"
| "sms"
| "in_person"
| "chat"
| "concierge"
| "manage"
| "box_office"
| "api";
closedAt: string | null;
contact: | {
email: string | null;
name: string | null;
phone: string | null;
}
| null;
createdAt: string;
createdBy: string | null;
customerId: string | null;
id: string;
number: number;
organisationId: string;
owedReply: {
breached: boolean;
dueAt: string | null;
owed: boolean;
paused: boolean;
since: string | null;
target: "first_response" | "next_response" | null;
};
owningAccountId: string | null;
priority: "low" | "normal" | "high" | "urgent";
queueKey: string | null;
reopenUntil: string | null;
resolutionReason: "answered" | "refunded" | "exchanged" | "no_action" | "duplicate" | null;
resolvedAt: string | null;
resolverId: string | null;
resolverKind: "user" | "ai" | "workflow" | null;
retainUntil: string | null;
salesChannelId: string | null;
sla: {
breachedAt: string | null;
dueAt: string | null;
firstRespondedAt: string | null;
firstResponseDueAt: string | null;
nextResponseDueAt: string | null;
pausedAt: string | null;
pausedSeconds: number;
status: "none" | "running" | "paused" | "breached";
target: "first_response" | "next_response" | null;
};
state: | "new"
| "open"
| "waiting_on_customer"
| "waiting_on_internal"
| "resolved"
| "closed"
| "spam";
stateCategory: "cancelled" | "open" | "waiting" | "done";
subject: string;
tags: string[];
updatedAt: string;
version: number;
}[];
counts: {
all_open: number;
breaching: number;
mine: number;
queues: {
accountId: string | null;
count: number;
key: string;
name: string | null;
}[];
unassigned: number;
waiting: number;
};
nextCursor: string | null;
view: string;
}>;
getMacro: (macroId: string, requestOptions?: RequestOptions) => Promise<{
accountId: string | null;
action: | "open"
| "refund"
| "close"
| "wait_on_customer"
| "wait_on_internal"
| "resolve"
| "reopen"
| "mark_spam"
| "resend"
| null;
body: string;
createdAt: string;
createdBy: string | null;
id: string;
knowledgeArticleId: string | null;
name: string;
resultingState: | "open"
| "waiting_on_customer"
| "waiting_on_internal"
| "resolved"
| "closed"
| null;
updatedAt: string;
updatedBy: string | null;
version: number;
}>;
getSettings: (options?: {
accountId?: string;
}, requestOptions?: RequestOptions) => Promise<{
accountId: string | null;
businessHours: | {
holidays?: string[];
timezone: string;
weekly: {
fri?: {
close: string;
open: string;
}[];
mon?: {
close: string;
open: string;
}[];
sat?: {
close: string;
open: string;
}[];
sun?: {
close: string;
open: string;
}[];
thu?: {
close: string;
open: string;
}[];
tue?: {
close: string;
open: string;
}[];
wed?: {
close: string;
open: string;
}[];
};
}
| null;
queues: {
assignment: "manual" | "round_robin";
conditions: {
field: | "channel"
| "category"
| "priority"
| "tags"
| "accountId"
| "salesChannelId";
operator: "in" | "not_in";
values: string[];
}[];
key: string;
members: {
roleIds: string[];
userIds: string[];
};
name: string;
}[];
slaTargets: {
category?: string | null;
firstResponseMinutes: number;
nextResponseMinutes: number;
priority: "low" | "normal" | "high" | "urgent";
}[];
updatedAt: string | null;
updatedBy: string | null;
venueHours: {
[key: string]:
| {
holidays?: string[];
timezone: string;
weekly: {
fri?: {
close: ...;
open: ...;
}[];
mon?: {
close: ...;
open: ...;
}[];
sat?: {
close: ...;
open: ...;
}[];
sun?: {
close: ...;
open: ...;
}[];
thu?: {
close: ...;
open: ...;
}[];
tue?: {
close: ...;
open: ...;
}[];
wed?: {
close: ...;
open: ...;
}[];
};
}
| null;
};
version: number;
}>;
listForwardingConfirmations: (options?: {
status?: "dismissed" | "pending" | "confirmed";
}, requestOptions?: RequestOptions) => Promise<{
address: string | null;
confirmationCode: string | null;
confirmationUrl: string | null;
forwardingFrom: string | null;
fromAddress: string;
id: string;
inboundAddressId: string | null;
provider: "gmail" | "microsoft";
receivedAt: string;
senderVerified: boolean;
status: "dismissed" | "pending" | "confirmed";
subject: string | null;
}[]>;
listInboundAddresses: (requestOptions?: RequestOptions) => Promise<{
accountId: string | null;
address: string;
autoAcknowledge: boolean;
category: string | null;
createdAt: string;
eventId: string | null;
id: string;
label: string | null;
localPart: string;
route: string | null;
salesChannelId: string | null;
updatedAt: string;
venueId: string | null;
}[]>;
listMacros: (options?: {
accountId?: string;
search?: string;
}, requestOptions?: RequestOptions) => Promise<{
accountId: string | null;
action: | "open"
| "refund"
| "close"
| "wait_on_customer"
| "wait_on_internal"
| "resolve"
| "reopen"
| "mark_spam"
| "resend"
| null;
body: string;
createdAt: string;
createdBy: string | null;
id: string;
knowledgeArticleId: string | null;
name: string;
resultingState: | "open"
| "waiting_on_customer"
| "waiting_on_internal"
| "resolved"
| "closed"
| null;
updatedAt: string;
updatedBy: string | null;
version: number;
}[]>;
updateMacro: (macroId: string, request: {
action?: | "open"
| "refund"
| "close"
| "wait_on_customer"
| "wait_on_internal"
| "resolve"
| "reopen"
| "mark_spam"
| "resend"
| null;
body?: string;
expectedVersion?: number;
knowledgeArticleId?: string | null;
name?: string;
resultingState?: | "open"
| "waiting_on_customer"
| "waiting_on_internal"
| "resolved"
| "closed"
| null;
}, requestOptions?: RequestOptions) => Promise<{
accountId: string | null;
action: | "open"
| "refund"
| "close"
| "wait_on_customer"
| "wait_on_internal"
| "resolve"
| "reopen"
| "mark_spam"
| "resend"
| null;
body: string;
createdAt: string;
createdBy: string | null;
id: string;
knowledgeArticleId: string | null;
name: string;
resultingState: | "open"
| "waiting_on_customer"
| "waiting_on_internal"
| "resolved"
| "closed"
| null;
updatedAt: string;
updatedBy: string | null;
version: number;
}>;
updateSettings: (request: {
accountId?: string | null;
businessHours?: | {
holidays?: string[];
timezone: string;
weekly: {
fri?: {
close: string;
open: string;
}[];
mon?: {
close: string;
open: string;
}[];
sat?: {
close: string;
open: string;
}[];
sun?: {
close: string;
open: string;
}[];
thu?: {
close: string;
open: string;
}[];
tue?: {
close: string;
open: string;
}[];
wed?: {
close: string;
open: string;
}[];
};
}
| null;
expectedVersion?: number;
queues?: {
assignment: "manual" | "round_robin";
conditions: {
field: | "channel"
| "category"
| "priority"
| "tags"
| "accountId"
| "salesChannelId";
operator: "in" | "not_in";
values: string[];
}[];
key: string;
members: {
roleIds: string[];
userIds: string[];
};
name: string;
}[];
slaTargets?: {
category?: string | null;
firstResponseMinutes: number;
nextResponseMinutes: number;
priority: "low" | "normal" | "high" | "urgent";
}[];
venueHours?: {
[key: string]:
| {
holidays?: string[];
timezone: string;
weekly: {
fri?: {
close: ...;
open: ...;
}[];
mon?: {
close: ...;
open: ...;
}[];
sat?: {
close: ...;
open: ...;
}[];
sun?: {
close: ...;
open: ...;
}[];
thu?: {
close: ...;
open: ...;
}[];
tue?: {
close: ...;
open: ...;
}[];
wed?: {
close: ...;
open: ...;
}[];
};
}
| null;
};
}, requestOptions?: RequestOptions) => Promise<{
accountId: string | null;
businessHours: | {
holidays?: string[];
timezone: string;
weekly: {
fri?: {
close: string;
open: string;
}[];
mon?: {
close: string;
open: string;
}[];
sat?: {
close: string;
open: string;
}[];
sun?: {
close: string;
open: string;
}[];
thu?: {
close: string;
open: string;
}[];
tue?: {
close: string;
open: string;
}[];
wed?: {
close: string;
open: string;
}[];
};
}
| null;
queues: {
assignment: "manual" | "round_robin";
conditions: {
field: | "channel"
| "category"
| "priority"
| "tags"
| "accountId"
| "salesChannelId";
operator: "in" | "not_in";
values: string[];
}[];
key: string;
members: {
roleIds: string[];
userIds: string[];
};
name: string;
}[];
slaTargets: {
category?: string | null;
firstResponseMinutes: number;
nextResponseMinutes: number;
priority: "low" | "normal" | "high" | "urgent";
}[];
updatedAt: string | null;
updatedBy: string | null;
venueHours: {
[key: string]:
| {
holidays?: string[];
timezone: string;
weekly: {
fri?: {
close: ...;
open: ...;
}[];
mon?: {
close: ...;
open: ...;
}[];
sat?: {
close: ...;
open: ...;
}[];
sun?: {
close: ...;
open: ...;
}[];
thu?: {
close: ...;
open: ...;
}[];
tue?: {
close: ...;
open: ...;
}[];
wed?: {
close: ...;
open: ...;
}[];
};
}
| null;
};
version: number;
}>;
};Defined in: client.ts:11193
Support methods
createInboundAddress()#
createInboundAddress: (request: {
accountId?: string;
autoAcknowledge?: boolean;
category?: string;
eventId?: string;
label?: string;
route?: string;
salesChannelId?: string;
venueId?: string;
}, requestOptions?: RequestOptions) => Promise<{
accountId: string | null;
address: string;
autoAcknowledge: boolean;
category: string | null;
createdAt: string;
eventId: string | null;
id: string;
label: string | null;
localPart: string;
route: string | null;
salesChannelId: string | null;
updatedAt: string;
venueId: string | null;
}>;Add an inbound email address
Add the organisation's base address (no route), or a route (<org>+<route>@...) that files what arrives at it under an account, a venue, an event, a sales channel and a category. The base address is made with the first route if the organisation has none. Forward a mailbox to the address it answers with; Gmail and Microsoft then send a confirmation, which GET /support/email/forwarding-confirmations shows. Needs cases.write for the account the address files under (the organisation's at :all), and a plan with email on cases (403 PLAN_ENTITLEMENT_REQUIRED, support.email).
Parameters#
| Parameter | Type | Description |
|---|---|---|
request | { accountId?: string; autoAcknowledge?: boolean; category?: string; eventId?: string; label?: string; route?: string; salesChannelId?: string; venueId?: string; } | - |
request.accountId? | string | Description The account a case opened here belongs to |
request.autoAcknowledge? | boolean | - |
request.category? | string | - |
request.eventId? | string | Description A case opened here is linked to this event |
request.label? | string | - |
request.route? | string | Description The plus-address route (<org>+<route>@...), one per venue or event, say. Leave it out for the organisation's base address. Example studio |
request.salesChannelId? | string | Description A case opened here is on this sales channel, and its replies carry the channel's brand |
request.venueId? | string | - |
requestOptions? | RequestOptions | - |
Returns#
Promise<{
accountId: string | null;
address: string;
autoAcknowledge: boolean;
category: string | null;
createdAt: string;
eventId: string | null;
id: string;
label: string | null;
localPart: string;
route: string | null;
salesChannelId: string | null;
updatedAt: string;
venueId: string | null;
}>
Operation Id#
createInboundAddress
createMacro()#
createMacro: (request: {
accountId?: string | null;
action?: | "open"
| "refund"
| "close"
| "wait_on_customer"
| "wait_on_internal"
| "resolve"
| "reopen"
| "mark_spam"
| "resend"
| null;
body: string;
knowledgeArticleId?: string | null;
name: string;
resultingState?: | "open"
| "waiting_on_customer"
| "waiting_on_internal"
| "resolved"
| "closed"
| null;
}, requestOptions?: RequestOptions) => Promise<{
accountId: string | null;
action: | "open"
| "refund"
| "close"
| "wait_on_customer"
| "wait_on_internal"
| "resolve"
| "reopen"
| "mark_spam"
| "resend"
| null;
body: string;
createdAt: string;
createdBy: string | null;
id: string;
knowledgeArticleId: string | null;
name: string;
resultingState: | "open"
| "waiting_on_customer"
| "waiting_on_internal"
| "resolved"
| "closed"
| null;
updatedAt: string;
updatedBy: string | null;
version: number;
}>;Create a macro A saved reply: a name, a body with variables, optionally a knowledge base article, a case action it runs (e.g. resend) and the state it leaves the case in. An organisation macro (no accountId) needs cases.manage on every account; an account's, on that account. A variable that does not exist is refused (400 MACRO_VARIABLE_UNKNOWN); a name already used in that scope is 409 MACRO_NAME_EXISTS. Platform: 403 PLAN_ENTITLEMENT_REQUIRED (support.inbox) on other plans.
Parameters#
| Parameter | Type | Description |
|---|---|---|
request | { accountId?: string | null; action?: | "open" | "refund" | "close" | "wait_on_customer" | "wait_on_internal" | "resolve" | "reopen" | "mark_spam" | "resend" | null; body: string; knowledgeArticleId?: string | null; name: string; resultingState?: | "open" | "waiting_on_customer" | "waiting_on_internal" | "resolved" | "closed" | null; } | - |
request.accountId? | string | null | Description The account whose cases it is offered on; absent or null for every case (the organisation's, cases.manage at :all) |
request.action? | | "open" | "refund" | "close" | "wait_on_customer" | "wait_on_internal" | "resolve" | "reopen" | "mark_spam" | "resend" | null | Description A case action it runs, e.g. resend |
request.body? | string | Description Plain text with variables: {{customer.firstName}}, {{customer.lastName}}, {{customer.email}}, {{order.number}}, {{agent.firstName}}, {{agent.lastName}}, {{brand.displayName}}, {{case.number}}, {{case.subject}} Example Hi {{customer.firstName}}, I have resent the tickets for order {{order.number}}. {{agent.firstName}}, {{brand.displayName}} |
request.knowledgeArticleId? | string | null | Description A knowledge base article (kba_) to offer with it |
request.name? | string | Example Resend tickets |
request.resultingState? | | "open" | "waiting_on_customer" | "waiting_on_internal" | "resolved" | "closed" | null | Description The state it leaves the case in |
requestOptions? | RequestOptions | - |
Returns#
Promise<{
accountId: string | null;
action: | "open"
| "refund"
| "close"
| "wait_on_customer"
| "wait_on_internal"
| "resolve"
| "reopen"
| "mark_spam"
| "resend"
| null;
body: string;
createdAt: string;
createdBy: string | null;
id: string;
knowledgeArticleId: string | null;
name: string;
resultingState: | "open"
| "waiting_on_customer"
| "waiting_on_internal"
| "resolved"
| "closed"
| null;
updatedAt: string;
updatedBy: string | null;
version: number;
}>
Operation Id#
createSupportMacro
deleteMacro()#
deleteMacro: (macroId: string, requestOptions?: RequestOptions) => Promise<true>;Delete a macro Delete a macro. Needs cases.manage for its account (every account for the organisation's).
Parameters#
| Parameter | Type |
|---|---|
macroId | string |
requestOptions? | RequestOptions |
Returns#
Promise<true>
Operation Id#
deleteSupportMacro
getInbox()#
getInbox: (options?: {
cursor?: string;
limit?: string;
view?: string;
}, requestOptions?: RequestOptions) => Promise<{
cases: {
assignedAt: string | null;
assigneeUserId: string | null;
category: string | null;
channel: | "email"
| "phone"
| "sms"
| "in_person"
| "chat"
| "concierge"
| "manage"
| "box_office"
| "api";
closedAt: string | null;
contact: | {
email: string | null;
name: string | null;
phone: string | null;
}
| null;
createdAt: string;
createdBy: string | null;
customerId: string | null;
id: string;
number: number;
organisationId: string;
owedReply: {
breached: boolean;
dueAt: string | null;
owed: boolean;
paused: boolean;
since: string | null;
target: "first_response" | "next_response" | null;
};
owningAccountId: string | null;
priority: "low" | "normal" | "high" | "urgent";
queueKey: string | null;
reopenUntil: string | null;
resolutionReason: "answered" | "refunded" | "exchanged" | "no_action" | "duplicate" | null;
resolvedAt: string | null;
resolverId: string | null;
resolverKind: "user" | "ai" | "workflow" | null;
retainUntil: string | null;
salesChannelId: string | null;
sla: {
breachedAt: string | null;
dueAt: string | null;
firstRespondedAt: string | null;
firstResponseDueAt: string | null;
nextResponseDueAt: string | null;
pausedAt: string | null;
pausedSeconds: number;
status: "none" | "running" | "paused" | "breached";
target: "first_response" | "next_response" | null;
};
state: | "new"
| "open"
| "waiting_on_customer"
| "waiting_on_internal"
| "resolved"
| "closed"
| "spam";
stateCategory: "cancelled" | "open" | "waiting" | "done";
subject: string;
tags: string[];
updatedAt: string;
version: number;
}[];
counts: {
all_open: number;
breaching: number;
mine: number;
queues: {
accountId: string | null;
count: number;
key: string;
name: string | null;
}[];
unassigned: number;
waiting: number;
};
nextCursor: string | null;
view: string;
}>;Get the support inbox
The cases a view holds, the running SLA clock due soonest first, with the counts of every view. Views: mine (assigned to you), unassigned, breaching (owing a reply whose SLA is breached or due within the hour), waiting (on the customer or on someone internal), all_open (the default) and queue:<key>. Each case says whether a reply is owed (owedReply: an inbound message nobody has answered) and its SLA. Only cases of the accounts your cases.read reaches, never another account's, and the cases assigned to you or your queues (which any staff person reads). Platform: 403 PLAN_ENTITLEMENT_REQUIRED (support.inbox) on other plans; GET /cases lists the same cases on every plan.
Parameters#
| Parameter | Type |
|---|---|
options? | { cursor?: string; limit?: string; view?: string; } |
options.cursor? | string |
options.limit? | string |
options.view? | string |
requestOptions? | RequestOptions |
Returns#
Promise<{
cases: {
assignedAt: string | null;
assigneeUserId: string | null;
category: string | null;
channel: | "email"
| "phone"
| "sms"
| "in_person"
| "chat"
| "concierge"
| "manage"
| "box_office"
| "api";
closedAt: string | null;
contact: | {
email: string | null;
name: string | null;
phone: string | null;
}
| null;
createdAt: string;
createdBy: string | null;
customerId: string | null;
id: string;
number: number;
organisationId: string;
owedReply: {
breached: boolean;
dueAt: string | null;
owed: boolean;
paused: boolean;
since: string | null;
target: "first_response" | "next_response" | null;
};
owningAccountId: string | null;
priority: "low" | "normal" | "high" | "urgent";
queueKey: string | null;
reopenUntil: string | null;
resolutionReason: "answered" | "refunded" | "exchanged" | "no_action" | "duplicate" | null;
resolvedAt: string | null;
resolverId: string | null;
resolverKind: "user" | "ai" | "workflow" | null;
retainUntil: string | null;
salesChannelId: string | null;
sla: {
breachedAt: string | null;
dueAt: string | null;
firstRespondedAt: string | null;
firstResponseDueAt: string | null;
nextResponseDueAt: string | null;
pausedAt: string | null;
pausedSeconds: number;
status: "none" | "running" | "paused" | "breached";
target: "first_response" | "next_response" | null;
};
state: | "new"
| "open"
| "waiting_on_customer"
| "waiting_on_internal"
| "resolved"
| "closed"
| "spam";
stateCategory: "cancelled" | "open" | "waiting" | "done";
subject: string;
tags: string[];
updatedAt: string;
version: number;
}[];
counts: {
all_open: number;
breaching: number;
mine: number;
queues: {
accountId: string | null;
count: number;
key: string;
name: string | null;
}[];
unassigned: number;
waiting: number;
};
nextCursor: string | null;
view: string;
}>
Operation Id#
getSupportInbox
getMacro()#
getMacro: (macroId: string, requestOptions?: RequestOptions) => Promise<{
accountId: string | null;
action: | "open"
| "refund"
| "close"
| "wait_on_customer"
| "wait_on_internal"
| "resolve"
| "reopen"
| "mark_spam"
| "resend"
| null;
body: string;
createdAt: string;
createdBy: string | null;
id: string;
knowledgeArticleId: string | null;
name: string;
resultingState: | "open"
| "waiting_on_customer"
| "waiting_on_internal"
| "resolved"
| "closed"
| null;
updatedAt: string;
updatedBy: string | null;
version: number;
}>;Get a macro One macro. 404 MACRO_NOT_FOUND for another account's.
Parameters#
| Parameter | Type |
|---|---|
macroId | string |
requestOptions? | RequestOptions |
Returns#
Promise<{
accountId: string | null;
action: | "open"
| "refund"
| "close"
| "wait_on_customer"
| "wait_on_internal"
| "resolve"
| "reopen"
| "mark_spam"
| "resend"
| null;
body: string;
createdAt: string;
createdBy: string | null;
id: string;
knowledgeArticleId: string | null;
name: string;
resultingState: | "open"
| "waiting_on_customer"
| "waiting_on_internal"
| "resolved"
| "closed"
| null;
updatedAt: string;
updatedBy: string | null;
version: number;
}>
Operation Id#
getSupportMacro
getSettings()#
getSettings: (options?: {
accountId?: string;
}, requestOptions?: RequestOptions) => Promise<{
accountId: string | null;
businessHours: | {
holidays?: string[];
timezone: string;
weekly: {
fri?: {
close: string;
open: string;
}[];
mon?: {
close: string;
open: string;
}[];
sat?: {
close: string;
open: string;
}[];
sun?: {
close: string;
open: string;
}[];
thu?: {
close: string;
open: string;
}[];
tue?: {
close: string;
open: string;
}[];
wed?: {
close: string;
open: string;
}[];
};
}
| null;
queues: {
assignment: "manual" | "round_robin";
conditions: {
field: | "channel"
| "category"
| "priority"
| "tags"
| "accountId"
| "salesChannelId";
operator: "in" | "not_in";
values: string[];
}[];
key: string;
members: {
roleIds: string[];
userIds: string[];
};
name: string;
}[];
slaTargets: {
category?: string | null;
firstResponseMinutes: number;
nextResponseMinutes: number;
priority: "low" | "normal" | "high" | "urgent";
}[];
updatedAt: string | null;
updatedBy: string | null;
venueHours: {
[key: string]:
| {
holidays?: string[];
timezone: string;
weekly: {
fri?: {
close: ...;
open: ...;
}[];
mon?: {
close: ...;
open: ...;
}[];
sat?: {
close: ...;
open: ...;
}[];
sun?: {
close: ...;
open: ...;
}[];
thu?: {
close: ...;
open: ...;
}[];
tue?: {
close: ...;
open: ...;
}[];
wed?: {
close: ...;
open: ...;
}[];
};
}
| null;
};
version: number;
}>;Get the support settings Business hours, venue hours, SLA targets and queues: the organisation's (which apply to every account), or with accountId an account's own, which come before the organisation's for that account's cases. Needs cases.read (for an account's, on that account). Version 0 and empty lists when nothing has been written.
Parameters#
| Parameter | Type |
|---|---|
options? | { accountId?: string; } |
options.accountId? | string |
requestOptions? | RequestOptions |
Returns#
Promise<{
accountId: string | null;
businessHours: | {
holidays?: string[];
timezone: string;
weekly: {
fri?: {
close: string;
open: string;
}[];
mon?: {
close: string;
open: string;
}[];
sat?: {
close: string;
open: string;
}[];
sun?: {
close: string;
open: string;
}[];
thu?: {
close: string;
open: string;
}[];
tue?: {
close: string;
open: string;
}[];
wed?: {
close: string;
open: string;
}[];
};
}
| null;
queues: {
assignment: "manual" | "round_robin";
conditions: {
field: | "channel"
| "category"
| "priority"
| "tags"
| "accountId"
| "salesChannelId";
operator: "in" | "not_in";
values: string[];
}[];
key: string;
members: {
roleIds: string[];
userIds: string[];
};
name: string;
}[];
slaTargets: {
category?: string | null;
firstResponseMinutes: number;
nextResponseMinutes: number;
priority: "low" | "normal" | "high" | "urgent";
}[];
updatedAt: string | null;
updatedBy: string | null;
venueHours: {
[key: string]:
| {
holidays?: string[];
timezone: string;
weekly: {
fri?: {
close: ...;
open: ...;
}[];
mon?: {
close: ...;
open: ...;
}[];
sat?: {
close: ...;
open: ...;
}[];
sun?: {
close: ...;
open: ...;
}[];
thu?: {
close: ...;
open: ...;
}[];
tue?: {
close: ...;
open: ...;
}[];
wed?: {
close: ...;
open: ...;
}[];
};
}
| null;
};
version: number;
}>
Operation Id#
getSupportSettings
listForwardingConfirmations()#
listForwardingConfirmations: (options?: {
status?: "dismissed" | "pending" | "confirmed";
}, requestOptions?: RequestOptions) => Promise<{
address: string | null;
confirmationCode: string | null;
confirmationUrl: string | null;
forwardingFrom: string | null;
fromAddress: string;
id: string;
inboundAddressId: string | null;
provider: "gmail" | "microsoft";
receivedAt: string;
senderVerified: boolean;
status: "dismissed" | "pending" | "confirmed";
subject: string | null;
}[]>;List forwarding confirmations The forwarding confirmations Gmail and Microsoft sent to the organisation's inbound addresses when someone set up forwarding: the code and the link to confirm it (only ever on the provider's own hosts). They are never cases. Pending ones by default. Only those at addresses whose account your cases.write reaches.
Parameters#
| Parameter | Type |
|---|---|
options? | { status?: "dismissed" | "pending" | "confirmed"; } |
options.status? | "dismissed" | "pending" | "confirmed" |
requestOptions? | RequestOptions |
Returns#
Promise<{
address: string | null;
confirmationCode: string | null;
confirmationUrl: string | null;
forwardingFrom: string | null;
fromAddress: string;
id: string;
inboundAddressId: string | null;
provider: "gmail" | "microsoft";
receivedAt: string;
senderVerified: boolean;
status: "dismissed" | "pending" | "confirmed";
subject: string | null;
}[]>
Operation Id#
listForwardingConfirmations
listInboundAddresses()#
listInboundAddresses: (requestOptions?: RequestOptions) => Promise<{
accountId: string | null;
address: string;
autoAcknowledge: boolean;
category: string | null;
createdAt: string;
eventId: string | null;
id: string;
label: string | null;
localPart: string;
route: string | null;
salesChannelId: string | null;
updatedAt: string;
venueId: string | null;
}[]>;List inbound email addresses
The addresses the organisation's support mail is forwarded to (<org>@reply.ticketlayer.com, and <org>+<route>@... routes), each with what a case opened there is filed under. Only the addresses of accounts your cases.read reaches; the organisation's own at :all.
Parameters#
| Parameter | Type |
|---|---|
requestOptions? | RequestOptions |
Returns#
Promise<{
accountId: string | null;
address: string;
autoAcknowledge: boolean;
category: string | null;
createdAt: string;
eventId: string | null;
id: string;
label: string | null;
localPart: string;
route: string | null;
salesChannelId: string | null;
updatedAt: string;
venueId: string | null;
}[]>
Operation Id#
listInboundAddresses
listMacros()#
listMacros: (options?: {
accountId?: string;
search?: string;
}, requestOptions?: RequestOptions) => Promise<{
accountId: string | null;
action: | "open"
| "refund"
| "close"
| "wait_on_customer"
| "wait_on_internal"
| "resolve"
| "reopen"
| "mark_spam"
| "resend"
| null;
body: string;
createdAt: string;
createdBy: string | null;
id: string;
knowledgeArticleId: string | null;
name: string;
resultingState: | "open"
| "waiting_on_customer"
| "waiting_on_internal"
| "resolved"
| "closed"
| null;
updatedAt: string;
updatedBy: string | null;
version: number;
}[]>;List macros Saved replies you can read: the organisation's (offered on every case) and those of the accounts your cases.read reaches. With accountId, those offered on that account's cases.
Parameters#
| Parameter | Type |
|---|---|
options? | { accountId?: string; search?: string; } |
options.accountId? | string |
options.search? | string |
requestOptions? | RequestOptions |
Returns#
Promise<{
accountId: string | null;
action: | "open"
| "refund"
| "close"
| "wait_on_customer"
| "wait_on_internal"
| "resolve"
| "reopen"
| "mark_spam"
| "resend"
| null;
body: string;
createdAt: string;
createdBy: string | null;
id: string;
knowledgeArticleId: string | null;
name: string;
resultingState: | "open"
| "waiting_on_customer"
| "waiting_on_internal"
| "resolved"
| "closed"
| null;
updatedAt: string;
updatedBy: string | null;
version: number;
}[]>
Operation Id#
listSupportMacros
updateMacro()#
updateMacro: (macroId: string, request: {
action?: | "open"
| "refund"
| "close"
| "wait_on_customer"
| "wait_on_internal"
| "resolve"
| "reopen"
| "mark_spam"
| "resend"
| null;
body?: string;
expectedVersion?: number;
knowledgeArticleId?: string | null;
name?: string;
resultingState?: | "open"
| "waiting_on_customer"
| "waiting_on_internal"
| "resolved"
| "closed"
| null;
}, requestOptions?: RequestOptions) => Promise<{
accountId: string | null;
action: | "open"
| "refund"
| "close"
| "wait_on_customer"
| "wait_on_internal"
| "resolve"
| "reopen"
| "mark_spam"
| "resend"
| null;
body: string;
createdAt: string;
createdBy: string | null;
id: string;
knowledgeArticleId: string | null;
name: string;
resultingState: | "open"
| "waiting_on_customer"
| "waiting_on_internal"
| "resolved"
| "closed"
| null;
updatedAt: string;
updatedBy: string | null;
version: number;
}>;Update a macro Edit a macro's name, body, article, action or resulting state; its scope does not change. Needs cases.manage for its account (every account for the organisation's). Never plan-gated: an organisation keeps and maintains what it has.
Parameters#
| Parameter | Type | Description |
|---|---|---|
macroId | string | - |
request | { action?: | "open" | "refund" | "close" | "wait_on_customer" | "wait_on_internal" | "resolve" | "reopen" | "mark_spam" | "resend" | null; body?: string; expectedVersion?: number; knowledgeArticleId?: string | null; name?: string; resultingState?: | "open" | "waiting_on_customer" | "waiting_on_internal" | "resolved" | "closed" | null; } | - |
request.action? | | "open" | "refund" | "close" | "wait_on_customer" | "wait_on_internal" | "resolve" | "reopen" | "mark_spam" | "resend" | null | Description A case action it runs, e.g. resend |
request.body? | string | Description Plain text with variables: {{customer.firstName}}, {{customer.lastName}}, {{customer.email}}, {{order.number}}, {{agent.firstName}}, {{agent.lastName}}, {{brand.displayName}}, {{case.number}}, {{case.subject}} Example Hi {{customer.firstName}}, I have resent the tickets for order {{order.number}}. {{agent.firstName}}, {{brand.displayName}} |
request.expectedVersion? | number | - |
request.knowledgeArticleId? | string | null | Description A knowledge base article (kba_) to offer with it |
request.name? | string | Example Resend tickets |
request.resultingState? | | "open" | "waiting_on_customer" | "waiting_on_internal" | "resolved" | "closed" | null | Description The state it leaves the case in |
requestOptions? | RequestOptions | - |
Returns#
Promise<{
accountId: string | null;
action: | "open"
| "refund"
| "close"
| "wait_on_customer"
| "wait_on_internal"
| "resolve"
| "reopen"
| "mark_spam"
| "resend"
| null;
body: string;
createdAt: string;
createdBy: string | null;
id: string;
knowledgeArticleId: string | null;
name: string;
resultingState: | "open"
| "waiting_on_customer"
| "waiting_on_internal"
| "resolved"
| "closed"
| null;
updatedAt: string;
updatedBy: string | null;
version: number;
}>
Operation Id#
updateSupportMacro
updateSettings()#
updateSettings: (request: {
accountId?: string | null;
businessHours?: | {
holidays?: string[];
timezone: string;
weekly: {
fri?: {
close: string;
open: string;
}[];
mon?: {
close: string;
open: string;
}[];
sat?: {
close: string;
open: string;
}[];
sun?: {
close: string;
open: string;
}[];
thu?: {
close: string;
open: string;
}[];
tue?: {
close: string;
open: string;
}[];
wed?: {
close: string;
open: string;
}[];
};
}
| null;
expectedVersion?: number;
queues?: {
assignment: "manual" | "round_robin";
conditions: {
field: | "channel"
| "category"
| "priority"
| "tags"
| "accountId"
| "salesChannelId";
operator: "in" | "not_in";
values: string[];
}[];
key: string;
members: {
roleIds: string[];
userIds: string[];
};
name: string;
}[];
slaTargets?: {
category?: string | null;
firstResponseMinutes: number;
nextResponseMinutes: number;
priority: "low" | "normal" | "high" | "urgent";
}[];
venueHours?: {
[key: string]:
| {
holidays?: string[];
timezone: string;
weekly: {
fri?: {
close: ...;
open: ...;
}[];
mon?: {
close: ...;
open: ...;
}[];
sat?: {
close: ...;
open: ...;
}[];
sun?: {
close: ...;
open: ...;
}[];
thu?: {
close: ...;
open: ...;
}[];
tue?: {
close: ...;
open: ...;
}[];
wed?: {
close: ...;
open: ...;
}[];
};
}
| null;
};
}, requestOptions?: RequestOptions) => Promise<{
accountId: string | null;
businessHours: | {
holidays?: string[];
timezone: string;
weekly: {
fri?: {
close: string;
open: string;
}[];
mon?: {
close: string;
open: string;
}[];
sat?: {
close: string;
open: string;
}[];
sun?: {
close: string;
open: string;
}[];
thu?: {
close: string;
open: string;
}[];
tue?: {
close: string;
open: string;
}[];
wed?: {
close: string;
open: string;
}[];
};
}
| null;
queues: {
assignment: "manual" | "round_robin";
conditions: {
field: | "channel"
| "category"
| "priority"
| "tags"
| "accountId"
| "salesChannelId";
operator: "in" | "not_in";
values: string[];
}[];
key: string;
members: {
roleIds: string[];
userIds: string[];
};
name: string;
}[];
slaTargets: {
category?: string | null;
firstResponseMinutes: number;
nextResponseMinutes: number;
priority: "low" | "normal" | "high" | "urgent";
}[];
updatedAt: string | null;
updatedBy: string | null;
venueHours: {
[key: string]:
| {
holidays?: string[];
timezone: string;
weekly: {
fri?: {
close: ...;
open: ...;
}[];
mon?: {
close: ...;
open: ...;
}[];
sat?: {
close: ...;
open: ...;
}[];
sun?: {
close: ...;
open: ...;
}[];
thu?: {
close: ...;
open: ...;
}[];
tue?: {
close: ...;
open: ...;
}[];
wed?: {
close: ...;
open: ...;
}[];
};
}
| null;
};
version: number;
}>;Replace the support settings Replace one scope's business hours, venue hours, SLA targets and queues. The organisation's need cases.manage on every account; an account's, on that account. A queue's key is unique in the organisation. Invalid timezones, overlapping windows, duplicate targets and unknown members are refused together (400 SUPPORT_SETTINGS_INVALID, with each problem). Send expectedVersion to refuse overwriting someone else's change (412 VERSION_MISMATCH). Platform: 403 PLAN_ENTITLEMENT_REQUIRED (support.inbox) on other plans.
Parameters#
| Parameter | Type | Description |
|---|---|---|
request | { accountId?: string | null; businessHours?: | { holidays?: string[]; timezone: string; weekly: { fri?: { close: string; open: string; }[]; mon?: { close: string; open: string; }[]; sat?: { close: string; open: string; }[]; sun?: { close: string; open: string; }[]; thu?: { close: string; open: string; }[]; tue?: { close: string; open: string; }[]; wed?: { close: string; open: string; }[]; }; } | null; expectedVersion?: number; queues?: { assignment: "manual" | "round_robin"; conditions: { field: | "channel" | "category" | "priority" | "tags" | "accountId" | "salesChannelId"; operator: "in" | "not_in"; values: string[]; }[]; key: string; members: { roleIds: string[]; userIds: string[]; }; name: string; }[]; slaTargets?: { category?: string | null; firstResponseMinutes: number; nextResponseMinutes: number; priority: "low" | "normal" | "high" | "urgent"; }[]; venueHours?: { [key: string]: | { holidays?: string[]; timezone: string; weekly: { fri?: { close: ...; open: ...; }[]; mon?: { close: ...; open: ...; }[]; sat?: { close: ...; open: ...; }[]; sun?: { close: ...; open: ...; }[]; thu?: { close: ...; open: ...; }[]; tue?: { close: ...; open: ...; }[]; wed?: { close: ...; open: ...; }[]; }; } | null; }; } | - |
request.accountId? | string | null | Description The account whose settings these are; absent or null for the organisation's (cases.manage at :all) |
request.businessHours? | | { holidays?: string[]; timezone: string; weekly: { fri?: { close: string; open: string; }[]; mon?: { close: string; open: string; }[]; sat?: { close: string; open: string; }[]; sun?: { close: string; open: string; }[]; thu?: { close: string; open: string; }[]; tue?: { close: string; open: string; }[]; wed?: { close: string; open: string; }[]; }; } | null | - |
request.expectedVersion? | number | Description The version these replace (0 for none yet); 412 VERSION_MISMATCH when someone wrote since |
request.queues? | { assignment: "manual" | "round_robin"; conditions: { field: | "channel" | "category" | "priority" | "tags" | "accountId" | "salesChannelId"; operator: "in" | "not_in"; values: string[]; }[]; key: string; members: { roleIds: string[]; userIds: string[]; }; name: string; }[] | - |
request.slaTargets? | { category?: string | null; firstResponseMinutes: number; nextResponseMinutes: number; priority: "low" | "normal" | "high" | "urgent"; }[] | - |
request.venueHours? | { [key: string]: | { holidays?: string[]; timezone: string; weekly: { fri?: { close: ...; open: ...; }[]; mon?: { close: ...; open: ...; }[]; sat?: { close: ...; open: ...; }[]; sun?: { close: ...; open: ...; }[]; thu?: { close: ...; open: ...; }[]; tue?: { close: ...; open: ...; }[]; wed?: { close: ...; open: ...; }[]; }; } | null; } | - |
requestOptions? | RequestOptions | - |
Returns#
Promise<{
accountId: string | null;
businessHours: | {
holidays?: string[];
timezone: string;
weekly: {
fri?: {
close: string;
open: string;
}[];
mon?: {
close: string;
open: string;
}[];
sat?: {
close: string;
open: string;
}[];
sun?: {
close: string;
open: string;
}[];
thu?: {
close: string;
open: string;
}[];
tue?: {
close: string;
open: string;
}[];
wed?: {
close: string;
open: string;
}[];
};
}
| null;
queues: {
assignment: "manual" | "round_robin";
conditions: {
field: | "channel"
| "category"
| "priority"
| "tags"
| "accountId"
| "salesChannelId";
operator: "in" | "not_in";
values: string[];
}[];
key: string;
members: {
roleIds: string[];
userIds: string[];
};
name: string;
}[];
slaTargets: {
category?: string | null;
firstResponseMinutes: number;
nextResponseMinutes: number;
priority: "low" | "normal" | "high" | "urgent";
}[];
updatedAt: string | null;
updatedBy: string | null;
venueHours: {
[key: string]:
| {
holidays?: string[];
timezone: string;
weekly: {
fri?: {
close: ...;
open: ...;
}[];
mon?: {
close: ...;
open: ...;
}[];
sat?: {
close: ...;
open: ...;
}[];
sun?: {
close: ...;
open: ...;
}[];
thu?: {
close: ...;
open: ...;
}[];
tue?: {
close: ...;
open: ...;
}[];
wed?: {
close: ...;
open: ...;
}[];
};
}
| null;
};
version: number;
}>
Operation Id#
putSupportSettings