wrap-up-codes-v1
Event to send wrap-up codes from interaction.
Emitter
The Agent Workspace MFE
Listener
Any integrator interested in receiving wrap-up codes for an interaction.
Event dictionary
The event dictionary can be browsed here: wrap-up-codes-v1
Payloads
Payload v1.0.1
Payload schema:
export const WRAP_UP_CODES_SCHEMA_VERSION = "1.0.1";
const WrapUpCodeItemSchema = z.object({
callLineId: z.string(),
dispositionCode: z.string(),
id: z.string(),
menuText: z.string(),
ordinate: z.string(),
parentId: z.string(),
queueObjId: z.string(),
reportText: z.string(),
shortCodeText: z.string(),
shortKeyText: z.string(),
callBackTime: z.number(),
description: z.string().optional(), // Optional description field
});
const WrapUpCodeSchema = z.object({
ani: z.string().optional(),
assignments: z.object({
type: z.string(),
list: z.array(z.string())
}),
autoSort: z.boolean(),
id: z.string(),
isAgentDefault: z.boolean(),
items: z.array(WrapUpCodeItemSchema),
name: z.string(),
primaryLang: z.string(),
multiChoice: z.boolean(),
reqBeforeOutbound: z.boolean(),
required: z.boolean(),
});
export const WrapUpCodesPayloadSchema = z.object({
interactionId: z.string(),
wrapUpCodes: z.array(WrapUpCodeSchema),
schemaVersion: z.literal(WRAP_UP_CODES_SCHEMA_VERSION)
});
export type WrapUpCodesPayload = z.infer<typeof WrapUpCodesPayloadSchema>
Payload example:
const payloadV1_0_0_Default = {
interactionId: 'interaction-12345',
wrapUpCodes: [
{
ani: '1234567890',
assignments: {
type: 'agent',
list: ['agent-1', 'agent-2'],
},
autoSort: true,
id: 'wrap-up-code-1',
isAgentDefault: false,
items: [
{
callLineId: 'line-1',
dispositionCode: 'code-1',
id: 'item-1',
menuText: 'Menu Item 1',
ordinate: '1',
parentId: 'parent-1',
queueObjId: 'queue-1',
reportText: 'Report Text 1',
shortCodeText: 'SC1',
shortKeyText: 'SK1',
callBackTime: 60,
description: 'description', // Optional
},
],
name: 'Wrap-Up Code 1',
primaryLang: 'en',
multiChoice: false,
reqBeforeOutbound: true,
required: true,
},
],
};
Field Descriptions
WrapUpCodeItemSchema Fields
callLineId: Identifier for the call linedispositionCode: Code representing the dispositionid: Unique identifier for the wrap-up code itemmenuText: Display text shown in the menuordinate: Ordering position of the itemparentId: Identifier of the parent wrap-up codequeueObjId: Queue object identifierreportText: Text used for reporting purposesshortCodeText: Abbreviated code textshortKeyText: Short key text identifiercallBackTime: Time for callback in secondsdescription: Optional descriptive text providing additional context about the wrap-up code item
WrapUpCodeSchema Fields
ani: Optional Automatic Number Identificationassignments: Assignment configuration with type and list of assigned entitiesautoSort: Whether items should be automatically sortedid: Unique identifier for the wrap-up code groupisAgentDefault: Whether this is the default for the agentitems: Array of wrap-up code itemsname: Display name of the wrap-up code groupprimaryLang: Primary language codemultiChoice: Whether multiple selections are allowedreqBeforeOutbound: Whether required before outbound callsrequired: Whether the wrap-up code is mandatory