--- title: Wrap Up API description: Provides endpoints for managing wrap-up functionality for external Contact Center as a Service \(CCaaS\) systems or ServiceNow AI Platform workspaces.Retrieves details for a specified wrap-up code.Retrieves details for a specified wrap-up segment.Retrieves details for a wrap-up segment based on a specified agent and interaction.Creates or updates wrap-up codes.Opens a wrap-up segment for an interaction.Updates and closes a wrap-up segment for an interaction.Updates an existing open wrap-up segment with AI-recommended wrap-up codes and notes. locale: en-US canonical_url: https://www.servicenow.com/docs/r/australia/api-reference/rest-apis/wrap-up-api.html release: australia product: REST APIs classification: rest-apis topic_type: concept last_updated: "2026-03-12" reading_time_minutes: 45 breadcrumb: [REST API reference, API reference, API implementation and reference] --- # Wrap Up API Provides endpoints for managing wrap-up functionality for external Contact Center as a Service \(CCaaS\) systems or ServiceNow AI Platform workspaces. This API requires the Interactions Management \(com.glide.interaction.awa\) plugin. To call this API, you must have the interaction\_integration\_user role. When agents close an interaction, the wrap-up feature enables them to enter closing details and wrap-up codes for future reference. For more information about wrap-up functionality, see [Wrap up overview](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/conversational-interfaces/wrap-up-overview.md). To use this API for segmented wrap-up of interactions from external systems, you must implement the InteractionSegment scripted extension point to create and retrieve segment records in your chosen table. If you're using [OpenFrame](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/customer-service-management/c_OpenFrameOverview.md), the extension point has an existing implementation to create and retrieve segment records in the Phone Log \[sn\_openframe\_phone\_log\] table. - **AI wrap-up recommendations** AI wrap-up recommendations can come from two sources: - Internal \(Now Assist\): When **use\_third\_party\_ai** is false, a business rule triggers automatically after segment creation to call the CSM API and populate **ai\_wrap\_up\_code** and **ai\_notes**. - External \(third-party / CCaaS\): When **use\_third\_party\_ai** is true, the external system pushes AI data via the new PUT `/api/now/wrapup/segment/update/ai` endpoint. - **Use cases** - Reduce agent handle time by providing wrap-up codes and notes with AI suggestions. - Enable CCaaS platforms to push AI-generated content into ServiceNow AI Platform after an interaction ends. - Give supervisors cleaner, more consistent wrap-up data for reporting and analytics. - **Endpoint call order for an AI-assisted wrap-up flow** 1. POST `/api/now/wrapup/segment/create` — Open a segment or pass **ai\_wrap\_up\_code** / **ai\_notes** and AI config flags. 2. PUT `/api/now/wrapup/segment/update/ai` — \(External AI only\) Push AI recommendations onto the open segment. 3. PUT `/api/now/wrapup/segment/update` — Agent finalizes and closes the segment. 4. GET `/api/now/wrapup/segment/{segment_id}` — Retrieve segment including stored AI fields. **Parent Topic:**[REST API reference](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/api-rest.md) ## Wrap Up - GET /now/wrapup/code/\{code\_id\} Retrieves details for a specified wrap-up code. ### URL format Versioned URL: `/api/now/{api_version}/wrapup/code/{code_id}` Default URL: `/api/now/wrapup/code/{code_id}` ### Supported request parameters
| Name | Description |
|---|---|
| api\_version | Optional. Version of the endpoint to access. For example, `v1` or `v2`. Only specify this value to use an endpoint version other than the latest. Data type: String |
| code\_id | Sys\_id of the wrap-up code.Data type: String Table: Interaction Wrap Up Code \[interaction\_wrap\_up\_code\] |
| Header | Description |
|---|---|
| Accept | Data format of the response body. Supported types: **application/json** or **application/xml**. Default: **application/json** |
| Name | Description |
|---|---|
| result | Object containing information about the API request and the wrap-up code.Data type: Object ``` "result": { "message": "String", "resultMap": {Object}, "success": Boolean } ``` |
| result.message | Message that describes the outcome of the API request.Data type: String |
| result.result\_map | Object containing the wrap-up code.Data type: Object ``` "result_map": { "wrap_up_code": {Object} } ``` |
| result.result\_map.wrap\_up\_code | Object with details about the wrap-up code.Data type: Object ``` "wrap_up_code": { "active": Boolean, "code": "String", "description": "String", "external": Boolean, "sys_id": "String", "translated_code": "String", "translated_description": "String" } ``` |
| result.result\_map.wrap\_up\_code.active | Flag that indicates whether the wrap-up code is active.Valid values: - true: The wrap-up code is active. - false: The wrap-up code isn't active. Data type: Boolean Default: true |
| result.result\_map.wrap\_up\_code.code | Label of the wrap-up code.Data type: String |
| result.result\_map.wrap\_up\_code.description | Description of the wrap-up code.Data type: String |
| result.result\_map.wrap\_up\_code.external | Flag that indicates whether the wrap-up code is from an external system.Valid values: - true: The wrap-up code is from an external system. - false: The wrap-up code is internal. Data type: Boolean |
| result.result\_map.wrap\_up\_code.sys\_id | Sys\_id of the wrap-up code.Data type: String Table: Interaction Wrap Up Code \[interaction\_wrap\_up\_code\] |
| result.result\_map.wrap\_up\_code.translated\_code | A translation of the wrap-up code label. Data type: String |
| result.result\_map.wrap\_up\_code.translated\_description | A translation of the wrap-up code description.Data type: String |
| result.success | Flag that indicates whether the API request was successfully processed.Valid values: - true: The API request was successful. - false: The API request failed. Data type: Boolean |
| Name | Description |
|---|---|
| api\_version | Optional. Version of the endpoint to access. For example, `v1` or `v2`. Only specify this value to use an endpoint version other than the latest. Data type: String |
| segment\_id | Sys\_id of the wrap-up segment in the Interaction Wrap Up Segment \[interaction\_wrap\_up\_segment\] table, or identifier representing the interaction segment on the external system. Data type: String |
| Header | Description |
|---|---|
| Accept | Data format of the response body. Supported types: **application/json** or **application/xml**. Default: **application/json** |
| Name | Description |
|---|---|
| message | Message that describes the outcome of the API request.Data type: String |
| segment | Object containing data about the interaction and wrap-up segment.Data type: Object ``` "segment": { "agent": "String", "ai_code_defined_at": "String", "ai_notes": "String", "ai_notes_defined_at": "String", "ai_wrap_up_code": "String", "awaiting_confirmation": Boolean, "confirmed_on": "String", "external": Boolean, "interaction": "String", "opened_on": "String", "segmented": Boolean, "segment_id": "String", "segment_table": "String", "state": "String", "submitted_on": "String", "sys_id": "String", "wrap_up_configuration": {Object} } ``` |
| segment.agent | Sys\_id of the agent assigned to the interaction.Data type: String Table: User \[sys\_user\] |
| segment.ai\_code\_defined\_at | Timestamp when AI code was stored.Format: Unix epoch milliseconds \(e.g., "1752252703000"\) Data type: String |
| segment.ai\_notes | AI-generated notes stored on the segment.Data type: String |
| segment.ai\_notes\_defined\_at | Timestamp when AI notes were stored.Format: Unix epoch milliseconds Data type: String |
| segment.ai\_wrap\_up\_code | AI-recommended code stored on the segment.Data type: String |
| segment.awaiting\_confirmation | Flag that indicates whether the wrap-up segment submitted by the agent is awaiting confirmation that it was processed by the external CCaaS system.Valid values: - true: The wrap-up segment is awaiting confirmation. - false: The wrap-up segment was processed by the external system. Data type: Boolean |
| segment.confirmed\_on | Date and time the submitted wrap-up segment is processed in the external CCaaS system.Data type: String |
| segment.external | Flag that indicates whether the interaction segment is from an external system.Valid values: - true: The interaction segment is from an external system. - false: The interaction segment is internal. Data type: Boolean Default: false |
| segment.interaction | Sys\_id of the interaction.Data type: String Table: Interaction \[interaction\] |
| segment.opened\_on | The start date and time of the wrap-up period according to the external system.Data type: String |
| segment.segmented | Flag that indicates whether the wrap-up is segmented.Valid values: - true: The wrap-up is segmented into multiple parts. - false: The wrap-up is one complete segment. Data type: Boolean Default: false |
| segment.segment\_id | Sys\_id of the interaction segment.Data type: String |
| segment.segment\_table | Name of the table containing the interaction segment.Data type: String |
| segment.state | State of the interaction segment.Data type: String |
| segment.submitted\_on | Date and time the agent submitted the wrap-up segment.Data type: String |
| segment.sys\_id | Sys\_id of the wrap-up segment.Data type: String Table: Interaction Wrap Up Segment \[interaction\_wrap\_up\_segment\] |
| segment.wrap\_up\_configuration | Object containing details about the wrap-up configuration used for the wrap-up segment.Data type: Object ``` "wrap_up_configuration": { "allowed_codes": [Array], "default_code": {Object}, "enable_ai_code": Boolean, "enable_ai_notes": Boolean, "enable_codes": Boolean, "use_ai_as_default": Boolean, "use_third_party_ai": Boolean } ``` |
| segment.wrap\_up\_configuration.allowed\_codes | Array of objects each representing a wrap-up code the agent is allowed to use.Data type: Array ``` "allowed_codes": [ { "active": Boolean, "code": "String", "description": "String", "external": Boolean, "sys_id": "String", "translated_code": "String", "translated_description": "String" } ] ``` |
| segment.wrap\_up\_configuration.allowed\_codes.active | Flag that indicates whether the wrap-up code is active.Valid values: - true: The wrap-up code is active. - false: The wrap-up code isn't active. Data type: Boolean Default: true |
| segment.wrap\_up\_configuration.allowed\_codes.code | Label of the wrap-up code.Data type: String |
| segment.wrap\_up\_configuration.allowed\_codes.description | Description of the wrap-up code.Data type: String |
| segment.wrap\_up\_configuration.allowed\_codes.external | Flag that indicates whether the wrap-up code is from an external system.Valid values: - true: The wrap-up code is from an external system. - false: The wrap-up code is internal. Data type: Boolean |
| segment.wrap\_up\_configuration.allowed\_codes.sys\_id | Sys\_id of the wrap-up code.Data type: String Table: Interaction Wrap Up Code \[interaction\_wrap\_up\_code\] |
| segment.wrap\_up\_configuration.allowed\_codes.translated\_code | A translation of the wrap-up code label. Data type: String |
| segment.wrap\_up\_configuration.allowed\_codes.translated\_description | A translation of the wrap-up code description.Data type: String |
| segment.wrap\_up\_configuration.default\_code | Object containing the wrap-up code to use as the default.Data type: Object ``` "default_code": { "active": Boolean, "code": "String", "description": "String", "external": Boolean, "sys_id": "String", "translated_code": "String", "translated_description": "String" } ``` |
| segment.wrap\_up\_configuration.default\_code.active | Flag that indicates whether the wrap-up code is active.Valid values: - true: The wrap-up code is active. - false: The wrap-up code isn't active. Data type: Boolean Default: true |
| segment.wrap\_up\_configuration.default\_code.code | Label of the wrap-up code.Data type: String |
| segment.wrap\_up\_configuration.default\_code.description | Description of the wrap-up code.Data type: String |
| segment.wrap\_up\_configuration.default\_code.external | Flag that indicates whether the wrap-up code is from an external system.Valid values: - true: The wrap-up code is from an external system. - false: The wrap-up code is internal. Data type: Boolean |
| segment.wrap\_up\_configuration.default\_code.sys\_id | Sys\_id of the wrap-up code.Data type: String Table: Interaction Wrap Up Code \[interaction\_wrap\_up\_code\] |
| segment.wrap\_up\_configuration.default\_code.translated\_code | A translation of the wrap-up code label. Data type: String |
| segment.wrap\_up\_configuration.default\_code.translated\_description | A translation of the wrap-up code description.Data type: String |
| segment.wrap\_up\_configuration.enable\_ai\_code | Flag that indicates whether AI code generation is enabled for this configuration.Valid values: - true: AI code generation is enabled for this configuration. - false: AI code generation is not enabled for this configuration. Data type: Boolean |
| segment.wrap\_up\_configuration.enable\_ai\_notes | Flag that indicates whether AI notes generation is enabled for this configuration.Valid values: - true: AI notes generation is enabled for this configuration. - false: AI notes generation is not enabled for this configuration. Data type: Boolean |
| segment.wrap\_up\_configuration.enable\_codes | Flag that indicates whether the agent must select a wrap-up code.Valid values: - true: Agent must select a wrap-up code. - false: Agent isn't required to select a wrap-up code. Data type: Boolean Default: false |
| segment.wrap\_up\_configuration.use\_ai\_as\_default | Flag that indicates whether AI code is automatically set as the default wrap-up code for this configuration.Valid values: - true: AI code is automatically set as the default wrap-up code. - false: AI code is not automatically set as the default wrap-up code. Data type: Boolean |
| segment.wrap\_up\_configuration.use\_third\_party\_ai | Flag that indicates if the AI content source is from a third-party external system.Valid values: - true: AI content source is from a third-party external system. - false: Now Assist is the AI content source. Data type: Boolean |
| segment\_id | Sys\_id of the wrap-up segment.Data type: String Table: Interaction Wrap Up Segment \[interaction\_wrap\_up\_segment\] |
| success | Flag that indicates whether the API request was successfully processed.Valid values: - true: The API request was successful. - false: The API request failed. Data type: Boolean |
| Name | Description |
|---|---|
| api\_version | Optional. Version of the endpoint to access. For example, `v1` or `v2`. Only specify this value to use an endpoint version other than the latest. Data type: String |
| agent\_id | Sys\_id of the agent assigned to the interaction.Data type: String Table: User \[sys\_user\] |
| interaction\_id | Sys\_id of the interaction.Data type: String Table: Interaction \[interaction\] |
| Header | Description |
|---|---|
| Accept | Data format of the response body. Supported types: **application/json** or **application/xml**. Default: **application/json** |
| Name | Description |
|---|---|
| message | Message that describes the outcome of the API request.Data type: String |
| segment | Object containing data about the interaction and wrap-up segment.Data type: Object ``` "segment": { "agent": "String", "ai_code_defined_at": "String", "ai_notes": "String", "ai_notes_defined_at": "String", "ai_wrap_up_code": "String", "awaiting_confirmation": Boolean, "confirmed_on": "String", "external": Boolean, "interaction": "String", "opened_on": "String", "segmented": Boolean, "segment_id": "String", "segment_table": "String", "state": "String", "submitted_on": "String", "sys_id": "String", "wrap_up_configuration": {Object} } ``` |
| segment.agent | Sys\_id of the agent assigned to the interaction.Data type: String Table: User \[sys\_user\] |
| segment.agent | Sys\_id of the agent assigned to the interaction.Data type: String Table: User \[sys\_user\] |
| segment.ai\_code\_defined\_at | Timestamp when AI code was stored.Format: Unix epoch milliseconds \(e.g., "1752252703000"\) Data type: String |
| segment.ai\_notes | AI-generated notes stored on the segment.Data type: String |
| segment.ai\_notes\_defined\_at | Timestamp when AI notes were stored.Format: Unix epoch milliseconds Data type: String |
| segment.ai\_wrap\_up\_code | AI-recommended code stored on the segment.Data type: String |
| segment.awaiting\_confirmation | Flag that indicates whether the wrap-up segment submitted by the agent is awaiting confirmation that it was processed by the external CCaaS system.Valid values: - true: The wrap-up segment is awaiting confirmation. - false: The wrap-up segment was processed by the external system. Data type: Boolean |
| segment.confirmed\_on | Date and time the submitted wrap-up segment is processed in the external CCaaS system.Data type: String |
| segment.external | Flag that indicates whether the interaction segment is from an external system.Valid values: - true: The interaction segment is from an external system. - false: The interaction segment is internal. Data type: Boolean Default: false |
| segment.interaction | Sys\_id of the interaction.Data type: String Table: Interaction \[interaction\] |
| segment.opened\_on | The start date and time of the wrap-up period according to the external system.Data type: String |
| segment.segmented | Flag that indicates whether the wrap-up is segmented.Valid values: - true: The wrap-up is segmented into multiple parts. - false: The wrap-up is one complete segment. Data type: Boolean Default: false |
| segment.segment\_id | Sys\_id of the interaction segment.Data type: String |
| segment.segment\_table | Name of the table containing the interaction segment.Data type: String |
| segment.state | State of the interaction segment.Data type: String |
| segment.submitted\_on | Date and time the agent submitted the wrap-up segment.Data type: String |
| segment.sys\_id | Sys\_id of the wrap-up segment.Data type: String Table: Interaction Wrap Up Segment \[interaction\_wrap\_up\_segment\] |
| segment.wrap\_up\_configuration | Object containing details about the wrap-up configuration used for the wrap-up segment.Data type: Object ``` "wrap_up_configuration": { "allowed_codes": [Array], "default_code": {Object}, "enable_codes": Boolean } ``` |
| segment.wrap\_up\_configuration.allowed\_codes | Array of objects each representing a wrap-up code the agent is allowed to use.Data type: Array ``` "allowed_codes": [ { "active": Boolean, "code": "String", "description": "String", "external": Boolean, "sys_id": "String", "translated_code": "String", "translated_description": "String" } ] ``` |
| segment.wrap\_up\_configuration.allowed\_codes.active | Flag that indicates whether the wrap-up code is active.Valid values: - true: The wrap-up code is active. - false: The wrap-up code isn't active. Data type: Boolean Default: true |
| segment.wrap\_up\_configuration.allowed\_codes.code | Label of the wrap-up code.Data type: String |
| segment.wrap\_up\_configuration.allowed\_codes.description | Description of the wrap-up code.Data type: String |
| segment.wrap\_up\_configuration.allowed\_codes.external | Flag that indicates whether the wrap-up code is from an external system.Valid values: - true: The wrap-up code is from an external system. - false: The wrap-up code is internal. Data type: Boolean |
| segment.wrap\_up\_configuration.allowed\_codes.sys\_id | Sys\_id of the wrap-up code.Data type: String Table: Interaction Wrap Up Code \[interaction\_wrap\_up\_code\] |
| segment.wrap\_up\_configuration.allowed\_codes.translated\_code | A translation of the wrap-up code label. Data type: String |
| segment.wrap\_up\_configuration.allowed\_codes.translated\_description | A translation of the wrap-up code description.Data type: String |
| segment.wrap\_up\_configuration.default\_code | Object containing the wrap-up code to use as the default.Data type: Object ``` "default_code": { "active": Boolean, "code": "String", "description": "String", "external": Boolean, "sys_id": "String", "translated_code": "String", "translated_description": "String" } ``` |
| segment.wrap\_up\_configuration.default\_code.active | Flag that indicates whether the wrap-up code is active.Valid values: - true: The wrap-up code is active. - false: The wrap-up code isn't active. Data type: Boolean Default: true |
| segment.wrap\_up\_configuration.default\_code.code | Label of the wrap-up code.Data type: String |
| segment.wrap\_up\_configuration.default\_code.description | Description of the wrap-up code.Data type: String |
| segment.wrap\_up\_configuration.default\_code.external | Flag that indicates whether the wrap-up code is from an external system.Valid values: - true: The wrap-up code is from an external system. - false: The wrap-up code is internal. Data type: Boolean |
| segment.wrap\_up\_configuration.default\_code.sys\_id | Sys\_id of the wrap-up code.Data type: String Table: Interaction Wrap Up Code \[interaction\_wrap\_up\_code\] |
| segment.wrap\_up\_configuration.default\_code.translated\_code | A translation of the wrap-up code label. Data type: String |
| segment.wrap\_up\_configuration.default\_code.translated\_description | A translation of the wrap-up code description.Data type: String |
| segment.wrap\_up\_configuration.enable\_ai\_code | Flag that indicates whether AI code generation is enabled for this configuration.Valid values: - true: AI code generation is enabled for this configuration. - false: AI code generation is not enabled for this configuration. Data type: Boolean |
| segment.wrap\_up\_configuration.enable\_ai\_notes | Flag that indicates whether AI notes generation is enabled for this configuration.Valid values: - true: AI notes generation is enabled for this configuration. - false: AI notes generation is not enabled for this configuration. Data type: Boolean |
| segment.wrap\_up\_configuration.enable\_codes | Flag that indicates whether the agent must select a wrap-up code.Valid values: - true: Agent must select a wrap-up code. - false: Agent isn't required to select a wrap-up code. Data type: Boolean Default: false |
| segment.wrap\_up\_configuration.use\_ai\_as\_default | Flag that indicates whether AI code is automatically set as the default wrap-up code for this configuration.Valid values: - true: AI code is automatically set as the default wrap-up code. - false: AI code is not automatically set as the default wrap-up code. Data type: Boolean |
| segment.wrap\_up\_configuration.use\_third\_party\_ai | Flag that indicates if the AI content source is from a third-party external system.Valid values: - true: AI content source is from a third-party external system. - false: Now Assist is the AI content source. Data type: Boolean |
| segment\_id | Sys\_id of the wrap-up segment.Data type: String Table: Interaction Wrap Up Segment \[interaction\_wrap\_up\_segment\] |
| success | Flag that indicates whether the API request was successfully processed.Valid values: - true: The API request was successful. - false: The API request failed. Data type: Boolean |
| Name | Description |
|---|---|
| api\_version | Optional. Version of the endpoint to access. For example, `v1` or `v2`. Only specify this value to use an endpoint version other than the latest. Data type: String |
| Name | Description |
|---|---|
| codes | Required. Array of objects each representing a wrap-up code.Data type: Array ``` "codes": [ { "active": Boolean, "code": "String", "description": "String", "translations": [Array] } ] ``` |
| codes.active | Flag that indicates whether the wrap-up code is active.Valid values: - true: The wrap-up code is active. - false: The wrap-up code isn't active. Data type: Boolean Default: true |
| codes.code | Required. Label of the wrap-up code.Data type: String |
| codes.description | Description of the wrap-up code.Data type: String |
| codes.translations | Array of objects each representing a translation of the wrap-up code.Data type: Array ``` "translations": [ { "code": "Abrechnungsproblem", "description": "Ein code für Abrechnungsprobleme", "language": "de" } ] ``` |
| codes.translations.code | A translation of the wrap-up code label \(**codes.code**\). Required if using the **codes.translations** parameter.Data type: String |
| codes.translations.description | A translation of the wrap-up code description \(**codes.description**\). Required if using the **codes.translations** parameter and a value was provided for **codes.description**.Data type: String |
| codes.translations.language | Two-letter code for the language used in the translation. Required if using the **codes.translations** parameter.Data type: String |
| Header | Description |
|---|---|
| Accept | Data format of the response body. Supported types: **application/json** or **application/xml**. Default: **application/json** |
| Content-Type | Data format of the request body. Supported types: **application/json** or **application/xml**. Default: **application/json** |
| Name | Description |
|---|---|
| result | Object containing information about the API request and the created wrap-up codes.Data type: Object ``` "result": { "message": "String", "resultMap": {Object}, "success": Boolean } ``` |
| result.message | Message that describes the outcome of the API request.Data type: String |
| result.result\_map | Object containing an array of created wrap-up codes.Data type: Object ``` "result_map": { "created_wrap_up_codes": [Array] } ``` |
| result.result\_map.created\_wrap\_up\_codes | Array of objects each representing a created wrap-up code.Data type: Array ``` "created_wrap_up_codes": [ { "active": Boolean, "code": "String", "description": "String", "external": Boolean, "sys_id": "String", "translated_code": "String", "translated_description": "String" } ] ``` |
| result.result\_map.created\_wrap\_up\_codes.active | Flag that indicates whether the wrap-up code is active.Valid values: - true: The wrap-up code is active. - false: The wrap-up code isn't active. Data type: Boolean Default: true |
| result.result\_map.created\_wrap\_up\_codes.code | Label of the wrap-up code.Data type: String |
| result.result\_map.created\_wrap\_up\_codes.description | Description of the wrap-up code.Data type: String |
| result.result\_map.created\_wrap\_up\_codes.external | Flag that indicates whether the wrap-up code is from an external system.Valid values: - true: The wrap-up code is from an external system. - false: The wrap-up code is internal. Data type: Boolean |
| result.result\_map.created\_wrap\_up\_codes.sys\_id | Sys\_id of the wrap-up code.Data type: String Table: Interaction Wrap Up Code \[interaction\_wrap\_up\_code\] |
| result.result\_map.created\_wrap\_up\_codes.translated\_code | A translation of the wrap-up code label. Data type: String |
| result.result\_map.created\_wrap\_up\_codes.translated\_description | A translation of the wrap-up code description.Data type: String |
| result.success | Flag that indicates whether the API request was successfully processed.Valid values: - true: The API request was successful. - false: The API request failed. Data type: Boolean |
| Name | Description |
|---|---|
| api\_version | Optional. Version of the endpoint to access. For example, `v1` or `v2`. Only specify this value to use an endpoint version other than the latest. Data type: String |
| Name | Description |
|---|---|
| agent\_sys\_id | Required. Sys\_id of the agent assigned to the interaction.Data type: String Table: User \[sys\_user\] |
| ai\_wrap\_up\_code | AI-suggested wrap-up code label. Populated automatically by Now Assist if the value of **use\_third\_party\_ai** is `false` or the field is absent from configuration.See also: - [GET /now/wrapup/segment/\{segment\_id\}](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/wrap-up-api.md) - [PUT /api/now/wrapup/segment/update/ai](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/wrap-up-api.md) Table: Interaction Wrap Up Segment \[interaction\_wrap\_up\_segment\] Data type: String |
| ai\_notes | AI-generated notes.Maximum length: 4000 characters Table: Interaction Wrap Up Segment \[interaction\_wrap\_up\_segment\] Data type: String |
| configuration | Object containing the code and duration details for an external wrap-up. Required if **external** is `true`.Data type: Object ``` "configuration": { "allowed_codes": [Array], "default_code": "String", "duration": "String", "enable_codes": Boolean, "enable_ai_code": Boolean, "enable_ai_notes": Boolean, "show_timer": Boolean, "use_ai_as_default": Boolean } ``` |
| configuration.allowed\_codes | Array of objects each representing a wrap-up code the agent is allowed to use. Required if **external** and **configuration.enable\_codes** are both `true`.Data type: Array ``` "allowed_codes": [ { "code": "String", "translation": {Object} } ] ``` |
| configuration.allowed\_codes.code | Label of the wrap-up code. Required if using the **configuration.allowed\_codes** parameter.Data type: String |
| configuration.allowed\_codes.translation | A translation of the wrap-up code.Data type: Object ``` "translation": { "code": "String", "language": "String" } ``` |
| configuration.allowed\_codes.translation.code | A translation of the wrap-up code label. Data type: String |
| configuration.allowed\_codes.translation.language | Two-letter code for the language used in the translation.Data type: String |
| configuration.default\_code | Label of the wrap-up code to use as the default. Required if **external** and **configuration.enable\_codes** are both `true`.Data type: String Table: Interaction Wrap Up Code \[interaction\_wrap\_up\_code\] Field: Code |
| configuration.duration | Maximum allowed wrap-up duration. Must be used with **show\_timer**.Data type: String Unit: Seconds Default: Empty string \(No time limit\). |
| configuration.enable\_codes | Flag that indicates whether the agent must select a wrap-up code.Valid values: - true: Agent must select a wrap-up code. - false: Agent isn't required to select a wrap-up code. Data type: Boolean Default: false |
| configuration.enable\_ai\_code | Flag that indicates whether AI code generation is enabled for this configuration.Valid values: - true: AI code generation is enabled for this configuration. - false: AI code generation is not enabled for this configuration. Table: Interaction Wrap Up Configuration \[interaction\_wrap\_up\_configuration\] Data type: Boolean Default: false |
| configuration.enable\_ai\_notes | Flag that indicates whether AI notes generation is enabled for this configuration.Valid values: - true: AI notes generation is enabled for this configuration. - false: AI notes generation is not enabled for this configuration. Table: Interaction Wrap Up Configuration \[interaction\_wrap\_up\_configuration\] Data type: Boolean Default: false |
| configuration.use\_ai\_as\_default | Flag that indicates whether AI code is automatically set as the default wrap-up code for this configuration.Valid values: - true: AI code is automatically set as the default wrap-up code. - false: AI code is not automatically set as the default wrap-up code. Table: Interaction Wrap Up Configuration \[interaction\_wrap\_up\_configuration\] Data type: Boolean Default: false |
| configuration.show\_timer | Required when using the duration property. Flag that indicates whether the timer displays.Valid values: - true: Timer displays in the UI. - false: Timer does not display in the UI. Data type: Boolean Default: false |
| external | Flag that indicates whether the interaction segment is from an external system.Valid values: - true: The interaction segment is from an external system. - false: The interaction segment is internal. Data type: Boolean Default: false |
| external\_segment\_id | Identifier representing the interaction segment on the external system. Required if **external** is `true`.Data type: String |
| interaction\_sys\_id | Required. Sys\_id of the interaction.Data type: String Table: Interaction \[interaction\] |
| opened\_on | The start date and time of the wrap-up period according to the external system. Required if using the **configuration.duration** parameter.Data type: String |
| segmented | Flag that indicates whether the wrap-up is segmented.Valid values: - true: The wrap-up is segmented into multiple parts. - false: The wrap-up is one complete segment. Data type: Boolean Default: false |
| segment\_id | Sys\_id of the interaction segment. Required if **external** and **segmented** are both `true`.**Note:** You must implement the InteractionSegment scripted extension point to create and retrieve segment records in your chosen table or use the [OpenFrame](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/customer-service-management/c_OpenFrameOverview.md) implementation to create and retrieve segment records in the Phone Log \[sn\_openframe\_phone\_log\] table. Data type: String |
| segment\_table | Name of the table containing the interaction segment. Required if **external** and **segmented** are both `true`.Data type: String |
| wrap\_up\_configuration\_sys\_id | Sys\_id of the wrap-up configuration to use. Required if **external** is `false`.Data type: String Table: Interaction Wrap Up Configuration \[interaction\_wrap\_up\_configuration\] |
| Header | Description |
|---|---|
| Accept | Data format of the response body. Supported types: **application/json** or **application/xml**. Default: **application/json** |
| Content-Type | Data format of the request body. Supported types: **application/json** or **application/xml**. Default: **application/json** |
| Name | Description |
|---|---|
| message | Message that describes the outcome of the API request.Data type: String |
| segment | Object containing data about the interaction and wrap-up segment.Data type: Object ``` "segment": { "agent": "String", "external": Boolean, "interaction": "String", "opened_on": "String", "segmented": Boolean, "segment_id": "String", "segment_table": "String", "state": "String", "sys_id": "String", "wrap_up_configuration": {Object} } ``` |
| segment.agent | Sys\_id of the agent assigned to the interaction segment.Data type: String Table: User \[sys\_user\] |
| segment.external | Flag that indicates whether the interaction segment is from an external system.Valid values: - true: The interaction segment is from an external system. - false: The interaction segment is internal. Data type: Boolean Default: false |
| segment.interaction | Sys\_id of the interaction.Data type: String Table: Interaction \[interaction\] |
| segment.opened\_on | The start date and time of the wrap-up period according to the external system.Data type: String |
| segment.segmented | Flag that indicates whether the wrap-up is segmented.Valid values: - true: The wrap-up is segmented into multiple parts. - false: The wrap-up is one complete segment. Data type: Boolean Default: false |
| segment.segment\_id | Sys\_id of the interaction segment.Data type: String |
| segment.segment\_table | Name of the table containing the interaction segment.Data type: String |
| segment.state | State of the interaction segment. Interaction segments that the Wrap Up API creates successfully are in the open state.Data type: String |
| segment.sys\_id | Sys\_id of the wrap-up segment.Data type: String Table: Interaction Wrap Up Segment \[interaction\_wrap\_up\_segment\] |
| segment.wrap\_up\_configuration | Object containing details about the wrap-up configuration used for the wrap-up segment.Data type: Object ``` "wrap_up_configuration": { "allowed_codes": [Array], "default_code": {Object}, "enable_ai_code": Boolean, "enable_ai_notes": Boolean, "enable_codes": Boolean, "use_ai_as_default": Boolean, "use_third_party_ai": Boolean } ``` |
| segment.wrap\_up\_configuration.allowed\_codes | Array of objects each representing a wrap-up code the agent is allowed to use.Data type: Array ``` "allowed_codes": [ { "active": Boolean, "code": "String", "description": "String", "external": Boolean, "sys_id": "String", "translated_code": "String", "translated_description": "String" } ] ``` |
| segment.wrap\_up\_configuration.allowed\_codes.active | Flag that indicates whether the wrap-up code is active.Valid values: - true: The wrap-up code is active. - false: The wrap-up code isn't active. Data type: Boolean Default: true |
| segment.wrap\_up\_configuration.allowed\_codes.code | Label of the wrap-up code.Data type: String |
| segment.wrap\_up\_configuration.allowed\_codes.description | Description of the wrap-up code.Data type: String |
| segment.wrap\_up\_configuration.allowed\_codes.external | Flag that indicates whether the wrap-up code is from an external system.Valid values: - true: The wrap-up code is from an external system. - false: The wrap-up code is internal. Data type: Boolean |
| segment.wrap\_up\_configuration.allowed\_codes.sys\_id | Sys\_id of the wrap-up code.Data type: String Table: Interaction Wrap Up Code \[interaction\_wrap\_up\_code\] |
| segment.wrap\_up\_configuration.allowed\_codes.translated\_code | A translation of the wrap-up code label. Data type: String |
| segment.wrap\_up\_configuration.allowed\_codes.translated\_description | A translation of the wrap-up code description.Data type: String |
| segment.wrap\_up\_configuration.default\_code | Object containing the wrap-up code to use as the default.Data type: Object ``` "default_code": { "active": Boolean, "code": "String", "description": "String", "external": Boolean, "sys_id": "String", "translated_code": "String", "translated_description": "String" } ``` |
| segment.wrap\_up\_configuration.default\_code.active | Flag that indicates whether the wrap-up code is active.Valid values: - true: The wrap-up code is active. - false: The wrap-up code isn't active. Data type: Boolean Default: true |
| segment.wrap\_up\_configuration.default\_code.code | Label of the wrap-up code.Data type: String |
| segment.wrap\_up\_configuration.default\_code.description | Description of the wrap-up code.Data type: String |
| segment.wrap\_up\_configuration.default\_code.external | Flag that indicates whether the wrap-up code is from an external system.Valid values: - true: The wrap-up code is from an external system. - false: The wrap-up code is internal. Data type: Boolean |
| segment.wrap\_up\_configuration.default\_code.sys\_id | Sys\_id of the wrap-up code.Data type: String Table: Interaction Wrap Up Code \[interaction\_wrap\_up\_code\] |
| segment.wrap\_up\_configuration.default\_code.translated\_code | A translation of the wrap-up code label. Data type: String |
| segment.wrap\_up\_configuration.default\_code.translated\_description | A translation of the wrap-up code description.Data type: String |
| segment.wrap\_up\_configuration.enable\_ai\_code | Flag that indicates whether AI code generation is enabled for this configuration.Valid values: - true: AI code generation is enabled for this configuration. - false: AI code generation is not enabled for this configuration. Data type: Boolean |
| segment.wrap\_up\_configuration.enable\_ai\_notes | Flag that indicates whether AI notes generation is enabled for this configuration.Valid values: - true: AI notes generation is enabled for this configuration. - false: AI notes generation is not enabled for this configuration. Data type: Boolean |
| segment.wrap\_up\_configuration.enable\_codes | Flag that indicates whether the agent must select a wrap-up code.Valid values: - true: Agent must select a wrap-up code. - false: Agent isn't required to select a wrap-up code. Data type: Boolean Default: false |
| segment.wrap\_up\_configuration.use\_ai\_as\_default | Flag that indicates whether AI code is automatically set as the default wrap-up code for this configuration.Valid values: - true: AI code is automatically set as the default wrap-up code. - false: AI code is not automatically set as the default wrap-up code. Data type: Boolean |
| segment.wrap\_up\_configuration.use\_third\_party\_ai | Flag that indicates if the AI content source is from a third-party external system.Valid values: - true: AI content source is from a third-party external system. - false: Now Assist is the AI content source. Data type: Boolean |
| success | Flag that indicates whether the API request was successfully processed.Valid values: - true: The API request was successful. - false: The API request failed. Data type: Boolean |
| sys\_id | Sys\_id of the wrap-up segment.Data type: String Table: Interaction Wrap Up Segment \[interaction\_wrap\_up\_segment\] |
| Name | Description |
|---|---|
| api\_version | Optional. Version of the endpoint to access. For example, `v1` or `v2`. Only specify this value to use an endpoint version other than the latest. Data type: String |
| Name | Description |
|---|---|
| agent\_sys\_id | Sys\_id of the agent assigned to the interaction. Required along with **interaction\_sys\_id** if neither **segment\_sys\_id** nor **external\_segment\_id** are provided.Data type: String Table: User \[sys\_user\] |
| external\_segment\_id | Identifier representing the interaction segment on the external system. Used to identify the wrap-up segment to update if **segment\_sys\_id** isn't provided. |
| interaction\_sys\_id | Sys\_id of the interaction. Required along with **agent\_sys\_id** if neither **segment\_sys\_id** nor **external\_segment\_id** are provided.Data type: String Table: Interaction \[interaction\] |
| segment\_sys\_id | Sys\_id of the wrap-up segment.Data type: String Table: Interaction Wrap Up Segment \[interaction\_wrap\_up\_segment\] |
| Name | Description |
|---|---|
| confirmed\_on | The end date and time of the wrap-up period according to the external system.Data type: String |
| notes | Additional notes added to the wrap-up by the agent.Data type: String |
| wrap\_up\_code | Label of the wrap-up code selected by the agent. If the agent doesn't select a code, the configured default code is used.Data type: String Table: Interaction Wrap Up Code \[interaction\_wrap\_up\_code\] Field: Code |
| Header | Description |
|---|---|
| Accept | Data format of the response body. Supported types: **application/json** or **application/xml**. Default: **application/json** |
| Content-Type | Data format of the request body. Supported types: **application/json** or **application/xml**. Default: **application/json** |
| Name | Description |
|---|---|
| message | Message that describes the outcome of the API request.Data type: String |
| segment | Object containing data about the interaction and wrap-up segment.Data type: Object ``` "segment": { "agent": "String", "awaiting_confirmation": Boolean, "code": {Object}, "confirmed_on": "String", "external": Boolean, "interaction": "String", "notes": "String", "opened_on": "String", "segmented": Boolean, "segment_id": "String", "segment_table": "String", "state": "String", "submitted_on": "String", "sys_id": "String", "wrap_up_configuration": {Object} } ``` |
| segment.agent | Sys\_id of the agent assigned to the interaction.Data type: String Table: User \[sys\_user\] |
| segment.awaiting\_confirmation | Flag that indicates whether the wrap-up segment submitted by the agent is awaiting confirmation that it was processed by the external CCaaS system.Valid values: - true: The wrap-up segment is awaiting confirmation. - false: The wrap-up segment was processed by the external system. Data type: Boolean |
| segment.code | Object containing the wrap-up code selected by the agent.Data type: Object ``` "code": { "active": Boolean, "code": "String", "description": "String", "external": Boolean, "sys_id": "String", "translated_code": "String", "translated_description": "String" } ``` |
| segment.code.active | Flag that indicates whether the wrap-up code is active.Valid values: - true: The wrap-up code is active. - false: The wrap-up code isn't active. Data type: Boolean Default: true |
| segment.code.code | Label of the wrap-up code.Data type: String |
| segment.code.description | Description of the wrap-up code.Data type: String |
| segment.code.external | Flag that indicates whether the wrap-up code is from an external system.Valid values: - true: The wrap-up code is from an external system. - false: The wrap-up code is internal. Data type: Boolean |
| segment.code.sys\_id | Sys\_id of the wrap-up code.Data type: String Table: Interaction Wrap Up Code \[interaction\_wrap\_up\_code\] |
| segment.code.translated\_code | A translation of the wrap-up code label. Data type: String |
| segment.code.translated\_description | A translation of the wrap-up code description.Data type: String |
| segment.confirmed\_on | Date and time the submitted wrap-up segment is processed in the external CCaaS system.Data type: String |
| segment.external | Flag that indicates whether the interaction segment is from an external system.Valid values: - true: The interaction segment is from an external system. - false: The interaction segment is internal. Data type: Boolean Default: false |
| segment.interaction | Sys\_id of the interaction.Data type: String Table: Interaction \[interaction\] |
| segment.notes | Additional notes added to the wrap-up by the agent.Data type: String |
| segment.opened\_on | The start date and time of the wrap-up period according to the external system.Data type: String |
| segment.segmented | Flag that indicates whether the wrap-up is segmented.Valid values: - true: The wrap-up is segmented into multiple parts. - false: The wrap-up is one complete segment. Data type: Boolean Default: false |
| segment.segment\_id | Sys\_id of the interaction segment.Data type: String |
| segment.segment\_table | Name of the table containing the interaction segment.Data type: String |
| segment.state | State of the interaction segment. Interaction segments that this endpoint updates successfully are in the closed state.Data type: String |
| segment.submitted\_on | Date and time the agent submitted the wrap-up segment.Data type: String |
| segment.sys\_id | Sys\_id of the wrap-up segment.Data type: String Table: Interaction Wrap Up Segment \[interaction\_wrap\_up\_segment\] |
| segment.wrap\_up\_configuration | Object containing details about the wrap-up configuration used for the wrap-up segment.Data type: Object ``` "wrap_up_configuration": { "allowed_codes": [Array], "default_code": {Object}, "enable_codes": Boolean } ``` |
| segment.wrap\_up\_configuration.allowed\_codes | Array of objects each representing a wrap-up code the agent is allowed to use.Data type: Array ``` "allowed_codes": [ { "active": Boolean, "code": "String", "description": "String", "external": Boolean, "sys_id": "String", "translated_code": "String", "translated_description": "String" } ] ``` |
| segment.wrap\_up\_configuration.allowed\_codes.active | Flag that indicates whether the wrap-up code is active.Valid values: - true: The wrap-up code is active. - false: The wrap-up code isn't active. Data type: Boolean Default: true |
| segment.wrap\_up\_configuration.allowed\_codes.code | Label of the wrap-up code.Data type: String |
| segment.wrap\_up\_configuration.allowed\_codes.description | Description of the wrap-up code.Data type: String |
| segment.wrap\_up\_configuration.allowed\_codes.external | Flag that indicates whether the wrap-up code is from an external system.Valid values: - true: The wrap-up code is from an external system. - false: The wrap-up code is internal. Data type: Boolean |
| segment.wrap\_up\_configuration.allowed\_codes.sys\_id | Sys\_id of the wrap-up code.Data type: String Table: Interaction Wrap Up Code \[interaction\_wrap\_up\_code\] |
| segment.wrap\_up\_configuration.allowed\_codes.translated\_code | A translation of the wrap-up code label. Data type: String |
| segment.wrap\_up\_configuration.allowed\_codes.translated\_description | A translation of the wrap-up code description.Data type: String |
| segment.wrap\_up\_configuration.default\_code | Object containing the wrap-up code to use as the default.Data type: Object ``` "default_code": { "active": Boolean, "code": "String", "description": "String", "external": Boolean, "sys_id": "String", "translated_code": "String", "translated_description": "String" } ``` |
| segment.wrap\_up\_configuration.default\_code.active | Flag that indicates whether the wrap-up code is active.Valid values: - true: The wrap-up code is active. - false: The wrap-up code isn't active. Data type: Boolean Default: true |
| segment.wrap\_up\_configuration.default\_code.code | Label of the wrap-up code.Data type: String |
| segment.wrap\_up\_configuration.default\_code.description | Description of the wrap-up code.Data type: String |
| segment.wrap\_up\_configuration.default\_code.external | Flag that indicates whether the wrap-up code is from an external system.Valid values: - true: The wrap-up code is from an external system. - false: The wrap-up code is internal. Data type: Boolean |
| segment.wrap\_up\_configuration.default\_code.sys\_id | Sys\_id of the wrap-up code.Data type: String Table: Interaction Wrap Up Code \[interaction\_wrap\_up\_code\] |
| segment.wrap\_up\_configuration.default\_code.translated\_code | A translation of the wrap-up code label. Data type: String |
| segment.wrap\_up\_configuration.default\_code.translated\_description | A translation of the wrap-up code description.Data type: String |
| segment.wrap\_up\_configuration.enable\_codes | Flag that indicates whether the agent must select a wrap-up code.Valid values: - true: Agent must select a wrap-up code. - false: Agent isn't required to select a wrap-up code. Data type: Boolean Default: false |
| success | Flag that indicates whether the API request was successfully processed.Valid values: - true: The API request was successful. - false: The API request failed. Data type: Boolean |
| sys\_id | Sys\_id of the wrap-up segment.Data type: String Table: Interaction Wrap Up Segment \[interaction\_wrap\_up\_segment\] |
| Name | Description |
|---|---|
| api\_version | Optional. Version of the endpoint to access. For example, `v1` or `v2`. Only specify this value to use an endpoint version other than the latest. Data type: String |
| Name | Description |
|---|---|
| agent\_sys\_id | Sys\_id of the agent assigned to the interaction. Required with **interaction\_sys\_id** if neither **segment\_sys\_id** nor **external\_segment\_id** are provided.Data type: String Table: User \[sys\_user\] |
| ai\_wrap\_up\_code | AI-recommended wrap-up code label. Stored only if the **enable\_ai\_code** property is `true` in the configuration.[Wrap Up - POST /now/wrapup/segment/create](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/wrap-up-api.md)Data type: String |
| ai\_notes | AI-generated notes. . Stored only if enable\_ai\_notes is true on the configuration.[Wrap Up - POST /now/wrapup/segment/create](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/wrap-up-api.md)Max length: 4000 characters Data type: String |
| interaction\_sys\_id | Sys\_id of the interaction. Required with **agent\_sys\_id** if neither **segment\_sys\_id** nor **external\_segment\_id** are provided.Data type: String Table: Interaction \[interaction\] |
| segment\_sys\_id | Sys\_id of the wrap-up segment.Data type: String Table: Interaction Wrap Up Segment \[interaction\_wrap\_up\_segment\] |
| Header | Description |
|---|---|
| Accept | Data format of the response body. Supported types: **application/json** or **application/xml**. Default: **application/json** |
| Content-Type | Data format of the request body. Supported types: **application/json** or **application/xml**. Default: **application/json** |
| Name | Description |
|---|---|
| message | Message that describes the outcome of the API request.Data type: String |
| segment | Object containing data about the interaction and wrap-up segment.Data type: Object ``` "segment": { "agent": "String", "ai_code_defined_at": "String", "ai_notes": "String", "ai_notes_defined_at": "String", "ai_wrap_up_code": "String", "interaction": "String", "sys_id": "String" } ``` |
| segment.agent | Sys\_id of the agent assigned to the interaction.Data type: String Table: User \[sys\_user\] |
| segment.ai\_code\_defined\_at | Timestamp when AI code was stored.Format: Unix epoch milliseconds \(e.g., "1752252703000"\) Data type: String |
| segment.ai\_notes | AI-generated notes stored on the segment.Data type: String |
| segment.ai\_notes\_defined\_at | Timestamp when AI notes were stored.Format: Unix epoch milliseconds Data type: String |
| segment.ai\_wrap\_up\_code | AI-recommended code stored on the segment.Data type: String |
| segment.interaction | Sys\_id of the interaction.Data type: String Table: Interaction \[interaction\] |
| segment.sys\_id | Sys\_id of the wrap-up segment.Data type: String Table: Interaction Wrap Up Segment \[interaction\_wrap\_up\_segment\] |
| success | Flag that indicates whether the API request was successfully processed.Valid values: - true: The API request was successful. - false: The API request failed. Data type: Boolean |