# Check for spelling mistakes
Source: https://docs.asapp.com/apis/autocompose/check-for-spelling-mistakes

post /autocompose/v1/spellcheck/correction
Get spelling correction for a message as it is being typed, if there is a misspelling. Only the current word
will be corrected, once it's fully typed (so it is recommended to call this endpoint after space characters).




# Create a custom response
Source: https://docs.asapp.com/apis/autocompose/create-a-custom-response

post /autocompose/v1/responses/customs/response
Add a single custom response for an agent



# Create a message analytic event
Source: https://docs.asapp.com/apis/autocompose/create-a-message-analytic-event

post /autocompose/v1/conversations/{conversationId}/message-analytic-events
To improve the performance of ASAPP suggestions, provide information about the actions performed by the agent while composing a message by creating `message-analytic-events`.

These analytic events indicate which AutoCompose functionality was used or not. This information along with the conversation itself is used to optimize our models, resulting in better results for the agents.

We track the following types of message analytic events:
- suggestion-1-inserted: The agent selected the first of the `suggestions` from a `Suggestion` API response.
- suggestion-2-inserted: The agent selected the second of the `suggestions` from a `Suggestion` API response.
- suggestion-3-inserted: The agent selected the third of the `suggestions` from a `Suggestion` API response.
- phrase-completion-accepted: The agent selected the `phraseCompletion` from a `Suggestion` API response.
- spellcheck-applied: A correction provided in a `SpellcheckCorrection` API response was applied automatically.
- spellcheck-undone: A correction provided in a `SpellcheckCorrection` API response was undone by clicking the undo button.
- custom-response-drawer-inserted: The agent inserted one of their custom responses from the custom response drawer.
- custom-panel-inserted: The agent inserted a response from their custom response list in the custom response panel.
- global-panel-inserted: The agent inserted a response from the global response list in the global response panel.

Some of the event types have a corresponding event object to provide details.




# Create a MessageSent analytics event
Source: https://docs.asapp.com/apis/autocompose/create-a-messagesent-analytics-event

post /autocompose/v1/analytics/message-sent
Create a MessageSent analytics event describing the agent's usage of AutoCompose augmentation features
while composing a message




# Create a response folder
Source: https://docs.asapp.com/apis/autocompose/create-a-response-folder

post /autocompose/v1/responses/customs/folder
Add a single folder for an agent



# Delete a custom response
Source: https://docs.asapp.com/apis/autocompose/delete-a-custom-response

delete /autocompose/v1/responses/customs/response/{responseId}
Delete a specific custom response for an agent



# Delete a response folder
Source: https://docs.asapp.com/apis/autocompose/delete-a-response-folder

delete /autocompose/v1/responses/customs/folder/{folderId}
Delete a folder for an agent



# Evaluate profanity
Source: https://docs.asapp.com/apis/autocompose/evaluate-profanity

post /autocompose/v1/profanity/evaluation
Get an evaluation of a text to verify if it contains profanity, obscenity or other unwanted words. This service should be called before sending a message to prevent the agent from sending profanities in the chat.




# Generate suggestions
Source: https://docs.asapp.com/apis/autocompose/generate-suggestions

post /autocompose/v1/conversations/{conversationId}/suggestions
Get suggestions for the next agent message in the conversation. 

There are several times when this should be called:
- when an agent joins the conversation,
- after a message is sent by either the customer or the agent,
- and as the agent is typing in the composer (to enable completing the agent's in-progress message).

Optionally, add a message to the conversation.




# Get autopilot greetings
Source: https://docs.asapp.com/apis/autocompose/get-autopilot-greetings

get /autocompose/v1/autopilot/greetings
Get autopilot greetings for an agent



# Get autopilot greetings status
Source: https://docs.asapp.com/apis/autocompose/get-autopilot-greetings-status

get /autocompose/v1/autopilot/greetings/status
Get autopilot greetings status for an agent



# Get custom responses
Source: https://docs.asapp.com/apis/autocompose/get-custom-responses

get /autocompose/v1/responses/customs
Get custom responses for an agent. Responses are sorted by title, and folders are sorted by name.



# Get settings for AutoCompose clients
Source: https://docs.asapp.com/apis/autocompose/get-settings-for-autocompose-clients

get /autocompose/v1/settings
Get settings for AutoCompose clients, such as whether any features should not be used.
It may be desirable to disable some features in high-latency scenarios.




# List the global responses
Source: https://docs.asapp.com/apis/autocompose/list-the-global-responses

get /autocompose/v1/responses/globals
Get the global responses and folder organization for a company. Responses are sorted by text, and folders are sorted by name.



# Update a custom response
Source: https://docs.asapp.com/apis/autocompose/update-a-custom-response

put /autocompose/v1/responses/customs/response/{responseId}
Update a specific custom response for an agent



# Update a response folder
Source: https://docs.asapp.com/apis/autocompose/update-a-response-folder

put /autocompose/v1/responses/customs/folder/{folderId}
Update a folder for an agent



# Update autopilot greetings
Source: https://docs.asapp.com/apis/autocompose/update-autopilot-greetings

put /autocompose/v1/autopilot/greetings
Update autopilot greetings for an agent



# Update autopilot greetings status
Source: https://docs.asapp.com/apis/autocompose/update-autopilot-greetings-status

put /autocompose/v1/autopilot/greetings/status
Update autopilot greetings status for an agent



# Create free text summary
Source: https://docs.asapp.com/apis/autosummary/create-free-text-summary

post /autosummary/v1/free-text-summaries
Generates a concise, human-readable summary of a conversation.

Provide an agentExternalId if you want to get the summary for a single agent's involvment with a conversation.

You can use the id from ASAPP's system (conversationId or IssueId) or your own id (externalConversationId).

Multilingual support: You can get summaries in languages different from English by making use of the 'Accept-Language' header.




# Create structured data
Source: https://docs.asapp.com/apis/autosummary/create-structured-data

post /autosummary/v1/structured-data
Creates and returns set of structured data about a conversation that is already known to ASAPP.

You can use the id from ASAPP's system (conversationId or IssueId) or your own id (externalConversationId).

Provide an agentExternalId if you want to get the structured data for a single agent's involvment with a conversation.




# Get conversation intent
Source: https://docs.asapp.com/apis/autosummary/get-conversation-intent

get /autosummary/v1/intent/{conversationId}
Retrieves the primary intent of a conversation, represented by both an intent code and a human-readable intent name. If no intent is detected, "NO_INTENT" is returned.

This endpoint requires:
1. Intent support to be explicitly enabled for your account.
2. A valid conversationId, which is an ASAPP-generated identifier created when using the ASAPP /conversations endpoint.

Use this endpoint to gain insights into the main purpose or topic of a conversation.




# Get free text summary
Source: https://docs.asapp.com/apis/autosummary/get-free-text-summary

get /autosummary/v1/free-text-summaries/{conversationId}
<Warning>
**Deprecated**

Replaced by [POST /autosummary/v1/free-text-summaries](/apis/autosummary/create-free-text-summary)
</Warning>

Generates a concise, human-readable summary of a conversation.

Provide an agentExternalId if you want to get the summary for a single agent's involvment with a conversation.

Multilingual support: You can get summaries in languages different from English by making use of the 'Accept-Language' header.




# Provide feedback.
Source: https://docs.asapp.com/apis/autosummary/provide-feedback

post /autosummary/v1/feedback/free-text-summaries/{conversationId}
Create a feedback event with the full and updated summary. Each event is associated with a specific summary id. 

The event must contain the final summary, in the form of text.        




# Get Twilio media stream url
Source: https://docs.asapp.com/apis/autotranscribe-media-gateway/get-twilio-media-stream-url

get /mg-autotranscribe/v1/twilio-media-stream-url
Returns url where [Twilio media stream](/autotranscribe/deploying-autotranscribe-for-twilio) should be sent to.



# Start streaming
Source: https://docs.asapp.com/apis/autotranscribe-media-gateway/start-streaming

post /mg-autotranscribe/v1/start-streaming
This starts the transcription of the audio stream.

Use in conjunction with the [stop-streaming](/apis/media-gateway/stop-streaming-audio) endpoint to control when transcription occurs for a given call. This allow you to prevent transcription of sensitive parts of a conversation, such as entering PCI data.




# Stop streaming
Source: https://docs.asapp.com/apis/autotranscribe-media-gateway/stop-streaming

post /mg-autotranscribe/v1/stop-streaming
This stops the transcription of the audio stream.

Use in conjunction with the [start-streaming](/apis/media-gateway/start-streaming-audio) endpoint to control when transcription occurs for a given call. This allow you to prevent transcription of sensitive parts of a conversation, such as entering PCI data.




# Get streaming URL
Source: https://docs.asapp.com/apis/autotranscribe/get-streaming-url

post /autotranscribe/v1/streaming-url
Get [websocket streaming URL](/autotranscribe/deploying-autotranscribe-via-websocket) to transcribe audio in real time. This websocket is used to send audio to ASAPP's transcription service and receive transcription results.




# Authenticate a user in a conversation
Source: https://docs.asapp.com/apis/conversations/authenticate-a-user-in-a-conversation

post /conversation/v1/conversations/{conversationId}/authenticate
Stores customer-specific authentication credentials for use in integrated flows.

- Can be called at any point during a conversation
- Commonly used at the start of a conversation or after mid-conversation authentication
- May trigger additional actions, such as GenerativeAgent API signals to customer webhooks

<Note>This API only accepts the customer-specific auth credentials; the customer is responsible for handling 
the specific authentication mechanism.</Note>




# Create a message
Source: https://docs.asapp.com/apis/conversations/create-a-message

post /conversation/v1/conversations/{conversationId}/messages
Creates a message object, adding it to an existing conversation.

Use this endpoint to record each new message in the conversation.




# Create multiple messages
Source: https://docs.asapp.com/apis/conversations/create-multiple-messages

post /conversation/v1/conversations/{conversationId}/messages/batch
This creates multiple message objects at once, adding them to an existing conversation.

Use this endpoint when you need to add several messages at once, such as when importing historical conversation data.




# Create or update a conversation
Source: https://docs.asapp.com/apis/conversations/create-or-update-a-conversation

post /conversation/v1/conversations
Creates a new conversation or updates an existing one based on the provided `externalId`.

Use this endpoint when:
- Starting a new conversation
- Updating conversation details (e.g., reassigning to a different agent)

If the `externalId` is not found, a new conversation will be created. Otherwise, the existing conversation will be updated.




# List conversations
Source: https://docs.asapp.com/apis/conversations/list-conversations

get /conversation/v1/conversations
Retrieves a list of conversation resources that match the specified criteria.

You must provide at least one search criterion in the query parameters.




# List messages
Source: https://docs.asapp.com/apis/conversations/list-messages

get /conversation/v1/conversations/{conversationId}/messages
Lists all messages within a conversation.

This messages are returned in chronological order. 




# List messages with an externalId
Source: https://docs.asapp.com/apis/conversations/list-messages-with-an-externalid

get /conversation/v1/conversation/messages
Get all messages from a conversation.




# Retrieve a conversation
Source: https://docs.asapp.com/apis/conversations/retrieve-a-conversation

get /conversation/v1/conversations/{conversationId}
Retrieves the details of a specific conversation using its `conversationId`.

This endpoint returns detailed information about the conversation, including participants and metadata.




# Retrieve a message
Source: https://docs.asapp.com/apis/conversations/retrieve-a-message

get /conversation/v1/conversations/{conversationId}/messages/{messageId}
Retrieve the details of a message from a conversation.




# List feed dates
Source: https://docs.asapp.com/apis/file-exporter/list-feed-dates

post /fileexporter/v1/static/listfeeddates
Lists dates for a company feed/version/format




# List feed files
Source: https://docs.asapp.com/apis/file-exporter/list-feed-files

post /fileexporter/v1/static/listfeedfiles
Lists files for a company feed/version/format/date/interval




# List feed formats
Source: https://docs.asapp.com/apis/file-exporter/list-feed-formats

post /fileexporter/v1/static/listfeedformats
Lists feed formats for a company feed/version/




# List feed intervals
Source: https://docs.asapp.com/apis/file-exporter/list-feed-intervals

post /fileexporter/v1/static/listfeedintervals
Lists intervals for a company feed/version/format/date




# List feed versions
Source: https://docs.asapp.com/apis/file-exporter/list-feed-versions

post /fileexporter/v1/static/listfeedversions
Lists feed versions for a company




# List feeds
Source: https://docs.asapp.com/apis/file-exporter/list-feeds

post /fileexporter/v1/static/listfeeds
Lists feed names for a company




# Retrieve a feed file
Source: https://docs.asapp.com/apis/file-exporter/retrieve-a-feed-file

post /fileexporter/v1/static/getfeedfile
Retrieves a feed file URL for a company feed/version/format/date/interval/file




# Analyze conversation
Source: https://docs.asapp.com/apis/generativeagent/analyze-conversation

post /generativeagent/v1/analyze
Call this API to trigger GenerativeAgent to analyze and respond to a conversation.

This API should be called after a customer sends a message while not speaking with a live agent. The Bot replies will not be returned on this request; they will be delivered asynchronously via the webhook callback.

This API also adds an optional **message** field to create a message for a given conversation before triggering the bot replies. The message object is the exact same message used in the conversations API /message endpoint




# Create stream URL
Source: https://docs.asapp.com/apis/generativeagent/create-stream-url

post /generativeagent/v1/streams
This API creates a generative agent event streaming URL to start a streaming connection (SSE).

This API should be called when the client boots-up to request a streaming_url, before it calls endpoints whose responses are delivered asynchronously (and most likely before calling any other endpoint).

Provide the streamId to reconnect to a previous stream.




# Get GenerativeAgent state
Source: https://docs.asapp.com/apis/generativeagent/get-generativeagent-state

get /generativeagent/v1/state
This API provides the current state of the generative agent for a given conversation.




# Check ASAPP's API's health.
Source: https://docs.asapp.com/apis/health-check/check-asapps-apis-health

get /v1/health
The API Health check endpoint enables you to check the operational status of our API platform.




# Create a submission
Source: https://docs.asapp.com/apis/knowledge-base/create-a-submission

post /knowledge-base/v1/submissions
Initiate a request to add a new article or update an existing one.

The provided title and content will be processed to create the final version of the submission.

A `submission` is the programmatic creation or editing of an article. All submissions need to be approved by a human in the ASAPP Console in order to be applied.

All content in a submission may be refined by our AI in order to make it easy to be used by GenerativeAgent

Head to [Connecting your Knowledge Base](/generativeagent/configuring/connecting-your-knowledge-base#step-1-importing-your-knowledge-base) to see how to enter the API from the ASAPP Console.



# Retrieve a submission
Source: https://docs.asapp.com/apis/knowledge-base/retrieve-a-submission

get /knowledge-base/v1/submissions/{id}
This service retrieves the details of a specific submission using its unique identifier.

A `submission` is the programmatic creation or editing of an article. All submissions need to be approved by a human in the ASAPP Console in order to be applied.

All content in a submission may be refined by our AI in order to make it easy to be used by GenerativeAgent 

Head to [Connecting your Knowledge Base](/generativeagent/configuring/connecting-your-knowledge-base#step-1-importing-your-knowledge-base) to see how to enter the API from the ASAPP Console.




# Retrieve an article
Source: https://docs.asapp.com/apis/knowledge-base/retrieve-an-article

get /knowledge-base/v1/articles/{id}
Fetch a specific article by its unique identifier. 

If the article has not been created because the associated submission was not approved, a 404 status will be returned.




# Add a conversation metadata
Source: https://docs.asapp.com/apis/metadata/add-a-conversation-metadata

post /metadata-ingestion/v1/single-convo-metadata
Add metadata attributes of one issue/conversation




# Add a customer metadata
Source: https://docs.asapp.com/apis/metadata/add-a-customer-metadata

post /metadata-ingestion/v1/single-customer-metadata
Add metadata attributes of one customer




# Add an agent metadata
Source: https://docs.asapp.com/apis/metadata/add-an-agent-metadata

post /metadata-ingestion/v1/single-agent-metadata
Add metadata attributes of one agent




# Add multiple agent metadata
Source: https://docs.asapp.com/apis/metadata/add-multiple-agent-metadata

post /metadata-ingestion/v1/many-agent-metadata
Add multiple agent metadata items; submit items in a batch in one request




# Add multiple conversation metadata
Source: https://docs.asapp.com/apis/metadata/add-multiple-conversation-metadata

post /metadata-ingestion/v1/many-convo-metadata
Add multiple issue/conversation metadata items; submit items in a batch in one request




# Add multiple customer metadata
Source: https://docs.asapp.com/apis/metadata/add-multiple-customer-metadata

post /metadata-ingestion/v1/many-customer-metadata
Add multiple customer metadata items; submit items in a batch in one request




# Overview
Source: https://docs.asapp.com/apis/overview

Overview of the ASAPP API

The ASAPP API is Resource oriented, relying on REST principles. Our APIs accept and respond with JSON.

## Authentication

The ASAPP API uses a combination of an API Id and API Secret to authenticate requests.

```bash
curl -X GET 'https://api.sandbox.asapp.com/conversation/v1/conversations' \
--header 'asapp-api-id: <API KEY ID>' \
--header 'asapp-api-secret: <API TOKEN>' \
```

Learn how to find your API Id and API Secret in the [Developer quickstart](/getting-started/developers).

## Environments

The ASAPP API is available in two environments:

* **Sandbox**: Use the Sandbox environment for development and testing.
* **Production**: Use the Production environment for production use.

Use the API domain to make requests to the relevant environment.

| Environment | API Domain                                                     |
| :---------- | :------------------------------------------------------------- |
| Sandbox     | [https://api.sandbox.asapp.com](https://api.sandbox.asapp.com) |
| Production  | [https://api.asapp.com](https://api.asapp.com)                 |

## Errors

The ASAPP API uses standard HTTP status codes to indicate the success or failure of a request.

| Status Code | Description           |
| :---------- | :-------------------- |
| 200         | OK                    |
| 201         | Created               |
| 204         | No Content            |
| 400         | Bad Request           |
| 401         | Unauthorized          |
| 403         | Forbidden             |
| 404         | Not Found             |
| 429         | Too Many Requests     |
| 500         | Internal Server Error |

We also return a `code` and `message` in the response body for each error. Learn more about error codes in the [Error handling](/getting-started/developers/error-handling) section.


# AutoCompose
Source: https://docs.asapp.com/autocompose



<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/autocompose/autocompose-home.png" />
</Frame>

ASAPP AutoCompose helps agents compose the best response to customers, using machine learning techniques to suggest complete responses, partial sentences, key phrases and spelling fixes in real-time based on both the context of the conversation and past agent behavior.

## Features

AutoCompose provides the following features:

| Feature                  | Description                                                                                                               |
| :----------------------- | :------------------------------------------------------------------------------------------------------------------------ |
| **Autosuggest**          | Provides up to three suggestions that appear in a suggestion drawer above the typing field before the agent begins typing |
| **Autocomplete**         | Provides up to three suggestions that appear in a suggestion drawer above the typing field after the agent begins typing  |
| **Phrase autocomplete**  | Provides in-line phrase suggestions that appear while an agent is typing                                                  |
| **Response quicksearch** | Allows in-line search of global and custom responses                                                                      |
| **Fluency correction**   | Applies automatic grammar corrections that an agent can undo                                                              |
| **Profanity blocking**   | Prevents an agent from sending a message containing profanity to the customer                                             |
| **Custom response list** | Enables management of an individual agent’s custom responses in a simple library interface                                |
| **Global response list** | Enables management of global responses in a simple tooling interface                                                      |

## How it works

AutoCompose takes in a live feed of your agent's conversations, and then using our various AI models, returns a list of changes or suggested responses based on the state of conversation and currently typed message.

1. Provide Conversation data via Conversation API.
2. In your Agent Application, call the AutoCompose APIs to retrieve the list of changes or suggested responses.
3. Show the potential changes or responses to your Agent for them to incorporate.

This streamlines your agent's effeciancy while still allowing agents to review changes, ensuring only the highest quality of responses are sent to your customers.

AutoCompose has the following technical components:

| Component              | Description                                                                                                                          |
| :--------------------- | :----------------------------------------------------------------------------------------------------------------------------------- |
| **Autosuggest model**  | LLM Retrained by ASAPP with agent usage data                                                                                         |
| **Data Storage**       | A storage for historical conversations, global response lists and agent historical feature usage that are used for weekly retraining |
| **Conversation API**\* | An API for creating and updating conversations and conversation data                                                                 |

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-efcbb75b-b38e-3cc1-4f44-1630dbe3c68b.png" />
</Frame>

## Get Started

Integrate AutoCompose into your applications and upscale your agent response rates.

### Integrate AutoCompose

AutoCompose is available both as an integration into leading messaging applications and as an API for custom-built messaging interfaces.

For technical instructions on how to implement the service for each approach, refer to the deployment guides below:

<Card title="AutoCompose API" href="/autocompose/deploying-autocompose-api">Learn more on the use of AutoCompose API</Card>
<Card title="AutoCompose for LivePerson" href="/autocompose/deploying-autocompose-for-liveperson">Deploy AutoCompose via LivePerson</Card>
<Card title="AutoCompose for Salesforce" href="/autocompose/deploying-autocompose-for-salesforce">Deploy AutoCompose on your Salesforce solution</Card>

### Use AutoCompose

For a functional breakdown and walkthrough of effective use cases and configurations, refer to the guides below:

<Card title="AutoCompose Product Guide" href="/autocompose/product-guide">Learn more on the use of AutoCompose</Card>
<Card title="AutoCompose Tooling Guide" href="/autocompose/autocompose-tooling-guide">Check the tooling options for AutoCompose</Card>

### Feature Releases

<Card title="AutoCompose Feature Releases" href="/autocompose/feature-releases">Visit the feature releases for new additions to AutoCompose functionality</Card>

<Note>
  Product and Deployment Guides will be updated as new features become available in production.
</Note>

## Enhance AutoCompose

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-597c4697-359d-b13e-8532-9b2119d3381d.png" />
</Frame>

ASAPP AutoSummary is a recommended pairing with AutoCompose, generating conversation summaries of key events for 100% of customer interactions.

Note-taking and disposition questions take call time and agent focus, both of which can have a negative impact on agent performance. Removing summarization tasks from agents through automation can keep agents focused on messaging with customers and yield higher summary data coverage than manual agent notes.

<CardGroup>
  <Card title="AutoSummary" href="/autosummary">Head to AutoSummary Overview to learn more.</Card>
  <Card title="AutoSummary on ASAPP.com" href="https://www.asapp.com/products/ai-services/autosummary/">Learn more about AutoSummary on ASAPP.com</Card>
</CardGroup>


# AutoCompose Tooling Guide
Source: https://docs.asapp.com/autocompose/autocompose-tooling-guide

Learn how to use the AutoCompose tooling UI

## Overview

This page outlines how to manage and configure global response lists for AutoCompose in ASAPP Messaging.

The global response list is created and maintained by program administrators, and the responses contained within it can be suggested to the full agent population.

<Note>
  Suggestions given to agents can also include custom responses created by agents and organic responses, which are a personalized response list of frequently-used responses by each agent.

  To learn more about AutoCompose Features, go to [AutoCompose Product Guide](/autocompose/product-guide).
</Note>

ASAPP Messaging gives program administrators full control over the global response list.

In ASAPP Messaging, click on **AutoCompose** and then on **Global Responses** in the sidebar.

## Best Practices

The machine learning models powering AutoCompose look at the global response list and select the response that is most likely to be said by the agent.

To create an effective global response list, take into account the following best practices:

1. We recommend having a global response list containing 1000-5000 responses.
   * The more global responses, the better. Having responses that cover the full range of common conversational scenarios enables the models to make better selections.
   * Deploying a small response list that contains only one way of saying each phrase is not recommended. The best practice is to include several ways of saying the same phrase, as that will enable our machine learning models to match each agent's conversational style.
   * Typically, the list is generated by collecting and curating the most frequent agent messages from historical chats at the beginning of an ASAPP deployment.
2. Responses should be kept up-to-date as there are changes to business logic and policies to avoid suggestions with stale information.

## Managing Responses

The Global Responses page contains a table where each row represents a response that can be suggested to an agent.

There are two ways of managing the global response list:

1. Directly add or edit responses through the AI-Console UI, which provides a simple and intuitive experience. This method is best suited for small volumes of changes.
2. Upload a .csv file containing the entire global response list, doing a bulk edit. This method is best suited for large volumes of changes.

The following table describes the elements that can be included with each response:

| Field            | Description                                                                                                                                                                                         | Required |
| :--------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------- |
| Text             | The text field contains the response that can be suggested to an agent. Optionally, the text can include [metadata inserts](#metadata "Metadata") to dynamically embed information into a response. | Yes      |
| Title            | Used to provide short descriptors for responses. If a title is specified, when a response is suggested to an agent it will display its title.                                                       | No       |
| Metadata filters | Used to determine when a response can appear as a suggestion. Allows responses to be filtered to specific agents based on one or more conditions (e.g. filtering responses to specific queues).     | No       |
| Folder path      | Used to organize responses into folder hierarchies. Agents can access and navigate these folders to discover relevant responses.                                                                    | No       |

## Uploading Responses in Bulk

The global response list can be updated by uploading a .csv file containing the full response list. The recommended workflow is to first download the most recent response list, make changes, and upload the list back into AI-Console.

### .csv Templates

The following instructions provide detailed descriptions of how responses need to be defined when using a .csv file.

**Text**

The text field should contain the exact response that will be suggested to an agent. Optionally, the text field may contain metadata inserts. To use a metadata insert within a response, type the key of the metadata insert inside curly brackets:

> "Hello, my name is \{rep\_name}. How may I assist you today?"

To learn more about which metadata inserts are available to use within responses, see [Metadata](#metadata "Metadata").

**Folder path**

Responses can be organized within a folder structure. This field can contain a single folder name, or a series of nested folders. If using nested folders, each folder should be separated by the ">" character (e.g. "PARENT FOLDER > CHILD FOLDER").

**Title**

The title field enables short descriptions for responses. Titles do not need to be unique.

**Metadata filters**

Metadata filters can be added by specifying conditions using the metadata filter key and metadata filter value columns.

Key: The metadata filter key contains the field on which to condition the response.

For example, if we want to filter a response to a specific queue, the metadata key should be "queue\_name".

Value: The metadata filter value specifies for which values of the metadata key the response will be valid.

A single metadata filter key can have multiple values, which should be written as a comma-separated list. For example, if the response should be available to the "general" and "escalation" queues, then the metadata filter value should be "general, escalation".

A response can contain multiple conditions. To define multiple conditions, separate each with a new line; use shift+enter in Windows or option+enter in Mac to enter a new line in the same cell.

<Tip>
  <Frame>
    <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-5c8cb29c-99a6-df8c-3f50-17b82d5332b3.png" />
  </Frame>

  [Click here to download a global responses template file](https://docs-sdk.asapp.com/product_features/global-responses-template.csv).
</Tip>

<Tip>
  **Getting the "invalid character �" when uploading a response list?**
  If you are uploading a response list and seeing an error message that a response contains the invalid character �, it is likely caused by using Microsoft Excel to edit the response list, as Excel uses a non-standard encoding mechanism. To fix this issue, select **Save as...** and under **File Format**, select **CSV UTF-8 (Comma delimited) (.csv)**.
</Tip>

## Saving and Deploying

Saving changes to the global response list or uploading a new list from a .csv file will create a new version. Past versions can be seen by selecting **Past Versions** under the vertical ellipses menu.

The global response list can be easily deployed into testing or production environments. An indicator at the top of each version indicates the status of the response list: unsaved draft, saved draft, deployed in a testing environment, or deployed in production.

## Metadata

The Metadata Dictionary, accessible through the navigation panel, provides an overview of metadata that is available for your organization to use in global responses. There are two types of metadata:

* **Metadata inserts** are used within the text of each response as templates that can dynamically insert information. Inserts are defined using curly brackets (e.g. Hello, this is \{rep\_name}, how may I assist you today?).
* **Metadata filters** introduce conditions to control in which conversations responses can be suggested. By default, responses without any metadata filters are available as suggestions for the entire agent population. Common patterns for filtering include restricting responses to specific queues or lines of business.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-3f272638-1167-16fb-66fb-63fdd3017689.png" />
</Frame>

Metadata Inserts

A response that contains a metadata insert is a templated response. When a templated response is suggested, it will be shown to the agent with the metadata insert filled in.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-99f92559-38ad-54a6-e764-58f659ae2df0.png" />
</Frame>

*Adding a templated response in AI-Console*

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-190313dc-5566-f4ed-6871-31ee775b3e9e.png" />
</Frame>

*Templated response being suggested to the agent in AutoCompose*

<Note>
  If the needed metadata insert (such as customer or agent name) is unavailable for a particular response (e.g. the customer in the conversation is unidentifiable), the response will not be suggested by AutoCompose.
</Note>

To view all metadata inserts available to use within a conversation, navigate to **Metadata Dictionary** in the navigation panel.

Metadata Filters

Responses that do not have associated metadata filters will be available to the full agent population. In the metadata dictionary, click on any metadata filter to view details about the filter and all possible values available for it.


# Deploying AutoCompose API
Source: https://docs.asapp.com/autocompose/deploying-autocompose-api

Communicate with AutoCompose via API.

ASAPP AutoCompose has the following technical components:

* **An autosuggest model** that ASAPP retrains weekly with [agent usage data you provide through the `/analytics/message-sent` endpoint](#sending-agent-usage-data "Sending Agent Usage Data")
* **Data storage** for historical conversations, global response lists and agent historical feature usage that are used for weekly retraining
* The **Conversation API** for creating and updating conversation data and the **AutoCompose API** that interfaces with the application with which agents interact and receives agent usage data in the form of message analytics events

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-efcbb75b-b38e-3cc1-4f44-1630dbe3c68b.png" />
</Frame>

### Setup

ASAPP provides an AI Services [Developer Portal](/getting-started/developers). Within the portal, developers can do the following:

* Access relevant API documentation (e.g. OpenAPI reference schemas)
* Access API keys for authorization
* Manage user accounts and apps

In order to use ASAPP's APIs, all apps must be registered through the portal. Once registered, each app will be provided unique API keys for ongoing use.

<Tip>
  Visit the [Get Started](/getting-started/developers) page on the Developer Portal for instructions on creating a developer account, managing teams and apps, and setup for using AI Service APIs.
</Tip>

## Usage

ASAPP AutoCompose exposes API endpoints that each enable distinct features in the course of an agent's message composition workflow. Requests should be sent to each endpoint based on events in the conversation and actions taken by the agent in their interface.

For example, the sequence below shows requests made for a typical new conversation in which the agent begins creating their first message, sends the first message and receives one message in return from an end-customer:

<Note>
  This example is not comprehensive of every possible endpoint request supported by AutoCompose. Refer to the [Endpoints](#endpoints-25843 "Endpoints") section for a full listing of endpoints.
</Note>

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-257e4c08-d22a-8244-277c-e2a2024a1eb3.png" />
</Frame>

**In this example:**

<table class="informaltable frame-void rules-rows">
  <thead>
    <tr>
      <th class="th"><p>Conversation Event</p></th>
      <th class="th"><p>API Request</p></th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td class="td"><p>Conversation starts</p></td>

      <td class="td">
        <p>1. Create a new ASAPP conversation record</p>
        <p>2. Request first set of response suggestions</p>
      </td>
    </tr>

    <tr>
      <td class="td"><p>Agent keystroke</p></td>
      <td class="td"><p>1. Request updated response suggestions</p></td>
    </tr>

    <tr>
      <td class="td"><p>Agent uses the spacebar</p></td>

      <td class="td">
        <p>1. Request updated response suggestions</p>
        <p>2. Check the spelling of the most recent word</p>
      </td>
    </tr>

    <tr>
      <td class="td"><p>Agent searches for a response</p></td>
      <td class="td"><p>1. Get the response list that pertains to their search</p></td>
    </tr>

    <tr>
      <td class="td"><p>Agent saves a custom response</p></td>
      <td class="td"><p>1. Add the new response to their personal library</p></td>
    </tr>

    <tr>
      <td class="td"><p>Agent submits their message</p></td>
      <td class="td"><p>1. Check if any profanity is present in the message</p></td>
    </tr>

    <tr>
      <td class="td"><p>Agent message is sent</p></td>

      <td class="td">
        <p>1. Add the message to ASAPP’s conversation record</p>
        <p>2. Create analytics event for the message that details how the agent used AutoCompose </p>
        <p>3. Request updated response suggestions</p>
      </td>
    </tr>

    <tr>
      <td class="td"><p>Customer message is sent</p></td>

      <td class="td">
        <p>1. Add the message to ASAPP’s conversation record</p>
        <p>2. Request updated response suggestions</p>
      </td>
    </tr>
  </tbody>
</table>

The [Endpoints](#endpoints-25843 "Endpoints") section below outlines how to use each endpoint.

### Endpoints Listing

<Note>
  For all requests, you must provide a header containing the `asapp-api-id` API Key and the `asapp-api-secret`. You can find them under your Apps in the [AI Services Developer Portal](https://developer.asapp.com/).
  All requests to ASAPP sandbox and production APIs must use `HTTPS` protocol. Traffic using `HTTP` will not be redirected to `HTTPS`.
</Note>

Use the links below to skip to information about the relevant fields and parameters for the corresponding endpoint(s):

**[Conversations](#conversations-api-25843 "Conversations API")**

* `POST /conversation/v1/conversations`
* `POST /conversation/v1/conversations/\{conversationId\}/messages`

[**Requesting Suggestions**](#requesting-suggestions "Requesting Suggestions")

* `POST /autocompose/v1/conversations/\{conversationId\}/suggestions`

[**Checking Profanity & Spelling**](#check-profanity-spelling "Check Profanity & Spelling")

* `POST /autocompose/v1/profanity/evaluation`
* `POST /autocompose/v1/spellcheck/correction`

[**Sending Agent Usage Data**](#sending-agent-usage-data "Sending Agent Usage Data")

* `POST /autocompose/v1/analytics/message-sent`

[**Getting Response Lists**](#getting-response-lists "Getting Response Lists")

* `GET /autocompose/v1/responses/globals`
* `GET /autocompose/v1/responses/customs`

[**Updating Custom Response Lists**](#updating-custom-response-lists "Updating Custom Response Lists")

* `POST /autocompose/v1/responses/customs/response`
* `PUT /autocompose/v1/responses/customs/response/\{responseId\}`
* `DELETE /autocompose/v1/responses/customs/response/\{responseId\}`
* `POST /autocompose/v1/responses/customs/folder`
* `PUT /autocompose/v1/responses/customs/folder/\{folderId\}`
* `DELETE /autocompose/v1/responses/customs/folder/\{folderId\}`

### Conversations API

ASAPP receives conversations through POST requests to the Conversations API. This service creates a record of conversations referenced as a source of truth by all ASAPP services.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-807868bf-ee29-0cb8-4cc9-e97fabf3a8f8.png" />
</Frame>

By promptly sending conversation and message data to this API, you ensure that ASAPP's conversation records match your own and that ASAPP services use the most current information available.

[`POST /conversation/v1/conversations`](/apis/conversations/create-or-update-a-conversation)

Use this endpoint to create a new conversation record or update an existing conversation record.

**When to Call**

This service should be called when a conversation starts or when something about the conversation changes (e.g. a conversation is reassigned to a different agent).

**Request Details**

Requests must include a conversation identifier from your system of record (external to ASAPP) and a timestamp (formatted in RFC3339 micro second date-time expressed in UTC) for when the conversation started.

Requests to create a conversation record must also include identifying information about the human participants. Two types of requests are supported to create a new conversation:

1. **Conversations started with an agent:** Provide both the `agent` and `customer` objects in the request when the conversation begins.
2. **Conversations started with a virtual agent:** Provide only the `customer` object in the initial request when the conversation with the virtual agent begins; you must send a subsequent request that includes both the `agent` and `customer` objects once the agent joins the conversation.

Requests may also include key-value pair metadata for the conversation that can be used either (1) to insert values into templated responses for agents or (2) as filter criteria to determine whether a conversation is eligible for specific response suggestions.

<Note>
  To support inserting the customer's time of day (morning, afternoon, evening) into templated agent responses, conversation metadata key-value pairs should take the format of `CUSTOMER_TIMEZONE: <IANA time zone name>`
</Note>

**Response Details**

When successful, this endpoint responds with a unique ASAPP identifier (`id`) for the conversation. This identifier should be used whenever referencing this conversation in the future. For example, adding new messages to this conversation record will require use of this identifier so that ASAPP knows to which conversation messages should be added.

[`POST /conversation/v1/conversations/\{conversationId\}/messages`](/apis/conversations/create-a-message)

Use this endpoint to add a message to an existing conversation record.

**When to Call**

This service should be called after each sent message by a participant in the conversation.

<Note>
  If a conversation begins with messages between a customer and virtual agent/bot, ensure the conversation record is updated once the agent joins the conversation, prior to posting messages to this endpoint for the agent.
</Note>

**Request Details**

The path parameter for this request is the unique ASAPP conversation ID that was provided in the response body when the conversation record was initially created.
Requests must include the message's text and the message's sent timestamp (formatted in RFC3339 micro second date-time expressed in UTC).
Requests must also include identifying information about the sender of the message, including their `role`; supported values include `agent`, `customer`, or `system` for virtual agent messages.

**Response Details**

When successful, this endpoint responds with a unique ASAPP identifier (`id`) for the message. This identifier should be used if a need arises to reference this message in the future.

<Note>
  When a conversation message is posted, ASAPP applies redaction to the message text to prevent storage of sensitive information. 
  Visit the [Data Redaction](/security/data-redaction "Data Redaction") section to learn more.
  Reach out to your ASAPP account contact for information on available redaction capabilities to configure for your implementation.
</Note>

### Requesting Suggestions

ASAPP provides suggestions through one POST request to the AutoCompose API.

[`POST /autocompose/v1/conversations/\{conversationId\}/suggestions`](/apis/autocompose/generate-suggestions)

Use this endpoint to get suggestions for the next agent message in the conversation.

**When to Call**

This service should be called when an agent joins the conversation, after every agent keystroke, and after a message is sent by either the customer or the agent. In each of these instances, AutoCompose takes into account new conversation context (e.g. the next letter the agent typed) and will return suggestions suitable for that context.

<Note>
  If a conversation begins with messages between a customer and virtual agent/bot, ensure the conversation record is updated once the agent joins the conversation. Suggestion requests to this endpoint will fail if no agent is associated with a conversation.
</Note>

While making a request for a suggestion, a new sent message by either the customer or agent can be posted to the conversation record by including it in the request body. This optional approach to updating the conversation record is in lieu of sending a separate request to the `/messages` endpoint.

<Note>
  New messages cannot be added to the conversation record using the suggestions endpoint if no agent is associated with the conversation.
</Note>

**Request Details**

The path parameter for this request is the unique ASAPP conversation ID that was provided in the response body when the conversation record was initially created.

Requests must include any text that the agent has already typed (called the `query`).

To add a message to the conversation record during a suggestion request, you must also include a message object that contains the text of the sent message, the sender role and ID, and the timestamp for the sent message.

**Response Details**

When successful, this endpoint responds with a set of suggestions or phrase completions, and a unique ASAPP identifier (`id`) that corresponds to this set of suggestions.

Full suggestions will be returned when the agent has not yet typed and early in the composition of their typed message. Once the agent's typed message is sufficiently complete, no suggestions will be returned.

Phrase completions are only provided when a high-confidence phrase is available to complete a partially typed message with several words. If no such phrases fit the message, phrase completions will not be returned.

If a message object was included in the request body, the response will include a message object with a unique message identifier.

**Metadata Inserts**

Suggestions will always include messages with `text` and `templateText` fields. `Text` fields contain the message as it should be shown in the end-user interface, whereas `templateText` indicates where metadata was inserted into a templated part of the message.

For example, `text` would read `"Sure John"`and `templateText` would read `"Sure \{NAME\}"`. AutoCompose currently supports inserting metadata about a customer name or agent name into a templated suggestion.

<Note>
  `templateText` will be returned even if there are no metadata elements being inserted into the suggestion `text`. In these cases, the `templateText` and `text` will be identical.
</Note>

### Check Profanity & Spelling

[`POST /autocompose/v1/profanity/evaluation`](/apis/autocompose/evaluate-profanity)

Use this endpoint to receive an evaluation of a text string to verify if it contains a word present on ASAPP's profanity blocklist.

**When to Call**

This service should be called when a carriage return or "enter" is used to send an agent message in order to prevent sending profanities in the chat.

**Request Details**

Requests need only specify the text required to be checked for profanity

**Response Details**

When successful, this endpoint responds with a boolean indicating whether or not the submitted text contains profanity.

[`POST /autocompose/v1/spellcheck/correction`](/apis/autocompose/check-for-spelling-mistakes)

Use this endpoint to get a spelling correction for a message as it is being typed.

**When to Call**

This service should be called after a space character is entered, checking  the most recently completed word in the sentence.

**Request Details**

Requests must include the text the agent has typed and the position of the cursor to indicate which word the agent has just typed to be checked for spelling.

The request may also specify a user dictionary of any words that should not be corrected if present.

**Response Details**

When successful and a spelling mistake is present, this endpoint identifies the misspelled text, the correct spelling of the word and start position of the cursor where the misspelled word begins so that it can be replaced.

### Sending Agent Usage Data

[`POST /autocompose/v1/analytics/message-sent`](/apis/autocompose/create-a-messagesent-analytics-event)

Use this endpoint to create an analytics event describing the agent's usage of AutoCompose for a given message. ASAPP uses these events to train AutoCompose, identifying which forms of augmentation should be credited for contributing to the final sent message.

**When to Call**

This service should be called after both of the following have occurred:

1. A message has been submitted by an agent
2. A successful request has been made to add this message to ASAPP's record of the conversation

<Note>
  Message sent analytics events should be posted after every agent message regardless of whether any AutoCompose capabilities were used.
</Note>

**Request Details**

Requests must include the ASAPP identifiers for the conversation and the specific message about which the analytics data is about.

Requests must also include an array called `augmentationType` that describes the agent's sequence of AutoCompose usage before sending the message. Valid `augmentationType` values are described below:

| augmentationType     | When to Use                                                                                           |
| :------------------- | :---------------------------------------------------------------------------------------------------- |
| AUTOSUGGEST          | When agent uses a full response suggestion with no text in the composer                               |
| AUTOCOMPLETE         | When agent uses a full response suggestion with text already in the composer                          |
| PHRASE\_AUTOCOMPLETE | When agent uses a phrase completion rather than a full response suggestion                            |
| CUSTOM\_DRAWER       | When agent inserts a custom message from a drawer menu in the composer                                |
| CUSTOM\_INSERT       | When agent inserts a custom message from a response panel                                             |
| GLOBAL\_INSERT       | When agent inserts a global message from a response panel                                             |
| FLUENCY\_APPLY       | When a fluency correction is applied to a word                                                        |
| FLUENCY\_UNDO        | When a fluency correction is undone                                                                   |
| FREEHAND             | When the agent types the entire message themselves and does not use any augmentation from AutoCompose |

Requests should include identifiers for the initial set of suggestions shown to the agent and the last set of suggestions where the agent made a selection (if any selections were made). If a selection was made, the index of the selected message (from the list of three) should also be specified.

Requests may also include further metadata describing the agents editing keystrokes after selecting a suggestion, their time crafting and waiting to send the message, the time between the last sent message and their first action, and their interactions with phrase completion suggestions (if relevant).

**Response Details**

When successful, this endpoint confirms the analytics message event was received and returns no response body.

### Getting Response Lists

ASAPP provides access to the global response list and agent-specific custom response lists through GET requests to two endpoints. Each endpoint is designed to be used to show an agent the contents of the response list in a user interface as they browse or search the list.

[`GET /autocompose/v1/responses/globals`](/apis/autocompose/list-the-global-responses)

Use this endpoint to retrieve the global responses and associated folder organization.

**When to Call**

This service should be called to show an agent the global response list - the list of responses available to all agents - in a user interface in response to an action taken by the agent, such as clicking on a response panel icon or searching for a specific response.

**Request Details**

Requests must include the agent's unique identifier from your system - this is the same identifier used to create conversation and conversation message records.

* Only values within a specific folder
* Only responses, only folders, or both
* Only values that match an agent search term

Requests can be returned in multiple pages based on a maximum per page parameter set to ensure a user interface only receives the number responses it can support. This endpoint can be called again with the same query parameters and a pageToken to indicate which page to retrieve in a multi-page list.

**Response Details**

When successful, this endpoint responds with a response list (if requested) that fits the criteria of the request query parameters, including the id of the response along with the text, title, corresponding folder to which it belongs and any key-value pair metadata associated with the response.

As discussed previously in Metadata Inserts, responses can be templated to insert metadata into specific parts of the message, such as the customer or agent's name. ASAPP can also use metadata associated with a response (e.g. agent skills for which that response is allowed) to filter out that response from suggestions for a given conversation.

If there is a next page to the response list, a pageToken is provided in the response for use in a subsequent call to show the next page to the user.

This endpoint also responds with a folder list (if requested) including the identifier of the folder, its name, and parent folder (if one exists), and version information about the global list of responses from which this list is sourced.

<Note>
  Global responses are returned in alphabetical order, sorted on the text of the response. Folders are sorted by folder name.
</Note>

[`GET /autocompose/v1/responses/customs`](/apis/autocompose/get-custom-responses)

Use this endpoint to retrieve the custom responses and associated folder organization.

**When to Call**

This service should be called to show an agent their custom response list - the list of responses available to only that agent - in a user interface in response to an action taken by the agent, such as clicking on a response panel icon or searching for a specific response.

**Request Details**

Requests must include the agent's unique identifier from your system - this is the same identifier used to create conversation and conversation message records.

Requests may include parameters about what values the returned list should contain based on the context of the request:

* Only values within a specific folder
* Only responses, only folders, or both
* Only values that match an agent search term

Requests can be returned in multiple pages based on a maximum per page parameter set to ensure a user interface only receives the number responses it can support. This endpoint can be called again with the same query parameters and a pageToken to indicate which page to retrieve in a multi-page list.

**Response Details**

When successful, this endpoint responds with a response list (if requested) that fits the criteria of the request query parameters, including the identifier of the response along with the text, title, corresponding folder to which it belongs and any key-value pair metadata associated with the response.

As discussed previously in Metadata Inserts, responses can be templated to insert metadata into specific parts of the message, such as the customer or agent's name. ASAPP can also use metadata associated with a response (e.g. agent skills/queues for which that response is allowed) to filter out that response from suggestions for a given conversation.

If there is a next page to the response list, a pageToken is provided in the response for use in a subsequent call to show the next page to the user.

This endpoint also responds with a folder list (if requested) including the identifier of the folder, its name, and parent folder (if one exists).

<Note>
  Custom responses are returned in alphabetical order, sorted on the title of the response. Folders are sorted by folder name.
</Note>

### Updating Custom Response Lists

Each agent's custom responses and the related folders can be added, updated and deleted using six endpoints. These endpoints are designed to carry out actions taken by agents in their personal list management interface.

#### For Responses

[`POST /autocompose/v1/responses/customs/response`](/apis/autocompose/create-a-custom-response)

Use this endpoint to add a single custom response for an agent.

**When to Call**

This service should be called when an agent creates a new custom response.

**Request Details**

Requests must include the agent's unique identifier from your system - this is the same identifier used to create conversation and conversation message records.

Requests must also include the text of the custom response and its title.

Requests may include the identifier of the folder in which the response should be stored; if not provided, the response is created at the \_\_root folder level.

Requests may also specify metadata to be inserted into specific parts of the message, such as the customer or agent's name.

**Response Details**

When successful, the endpoint responds with a unique ASAPP identifier for the response. This value should be used to update and delete the same response.

[`PUT /autocompose/v1/responses/customs/response/\{responseId\}`](/apis/autocompose/update-a-custom-response)

Use this endpoint to update a specific custom response for an agent.

**When to Call**

This service should be called once an agent edits a custom response.

**Request Details**

The path parameter for this request is the unique ASAPP response ID provided in the response body when creating the response.

Requests must also include the text and title values of the updated custom response.

Requests may include the identifier of the folder in which the response should be stored and may also specify metadata to be inserted into specific parts of the message, such as the customer or agent's name.

**Response Details**

When successful, this endpoint confirms the update and returns no response body.

[`DELETE /autocompose/v1/responses/customs/response/\{responseId\}`](/apis/autocompose/delete-a-custom-response)

Use this endpoint to delete a specific custom response for an agent.

**When to Call**

This service should be called when an agent deletes a response.

**Request Details**

The path parameter for this request is the unique ASAPP response ID provided in the response body when creating the response.

Requests must also include the agent's unique identifier from your system.

**Response Details**

When successful, this endpoint confirms the deletion and returns no response body.

#### For Folders

[`POST /autocompose/v1/responses/customs/folder`](/apis/autocompose/create-a-response-folder)

Use this endpoint to add a single folder for an agent.

**When to Call**

This service should be called when an agent creates a new custom response folder.

**Request Details**

Requests must include the agent's unique identifier from your system - this is the same identifier used to create conversation and conversation message records.

Requests must also include the name of the custom response folder.

Requests may include the identifier of the parent folder in which to create the new folder.

**Response Details**

When successful, the endpoint responds with a unique ASAPP identifier for the folder. This value should be used to update and delete the same folder.

[`PUT /autocompose/v1/responses/customs/folder/\{folderId\}`](/apis/autocompose/update-a-response-folder)

Use this endpoint to update a specific folder for an agent.

**When to Call**

This service should be called once an agent edits the name or hierarchy location of the folder.

**Request Details**

The path parameter for this request is the unique ASAPP folder ID provided in the response body when creating the folder.

Requests must include the agent's unique identifier from your system and the name of the folder once updated.

Requests may include the identifier of the folder in which the response should be stored if that parent folder has been updated.

**Response Details**

When successful, this endpoint confirms the update and returns no response body.

[`DELETE /autocompose/v1/responses/customs/folder/\{folderId\}`](/apis/autocompose/delete-a-response-folder)

Use this endpoint to delete a specific folder for an agent.

**When to Call**

This service should be called when an agent deletes a folder.

**Request Details**

The path parameter for this request is the unique ASAPP folder ID provided in the folder body when creating the folder.

Requests must include the agent's unique identifier from your system.

**Response Details**

When successful, this endpoint confirms the deletion and returns no response body.

## Certification

Before providing credentials for applications to use production services, ASAPP reviews your completed integration in the sandbox environment to certify that your application is ready.

The following criteria are used to certify that the integration is ready to use the AutoCompose API in a production environment:

* Under normal conditions, the integration is free of errors
* Under abnormal conditions, the integration provides the correct details in order to troubleshoot the issue
* The correct analytics events are being provided for agent messages that are sent

To test these criteria, an ASAPP Solution Architect will review these AutoCompose functionalities:

* Load a new customer conversation onto the agent desktop/view (with existing customer messages)
* Present the agent with suggestions and enable them to select an option and send
* Enable the agent to modify or add to a selected suggestion, and then send
* Enable the agent to freely type and use a phrase completion
* Enable the agent to use the spell check and profanity functionality
* Verify that correct analytics details are sent to ASAPP when an agent sends a message
* Disable API Keys in developer.asapp.com and generate an error message

The following are the test scenarios and accompanying sequence of expected API requests:

<table class="informaltable frame-void rules-rows">
  <thead>
    <tr>
      <th class="th" colspan="2"><p>Scenario</p></th>
      <th class="th"><p>Expected Requests</p></th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td class="td"><p>A</p></td>
      <td class="td"><p>Start new chat for agent with pre-existing customer messages</p></td>

      <td class="td">
        <p>POST /conversation</p>
        <p>POST /messages</p>
        <p>POST /suggestions</p>
      </td>
    </tr>

    <tr>
      <td class="td"><p>B</p></td>
      <td class="td"><p>Populate suggestions, select a suggestion and send</p></td>

      <td class="td">
        <p>POST /suggestions</p>
        <p>POST /spellcheck</p>
        <p>POST /profanity</p>
        <p>POST /messages</p>
        <p>POST /message-sent</p>
      </td>
    </tr>

    <tr>
      <td class="td"><p>C</p></td>
      <td class="td"><p>Populate suggestions, don’t choose one and type “Hello” and send message</p></td>

      <td class="td">
        <p>POST /suggestions</p>
        <p>POST /suggestions per keystroke</p>
        <p>POST /spellcheck</p>
        <p>POST /profanity</p>
        <p>POST /messages</p>
        <p>POST /message-sent</p>
      </td>
    </tr>

    <tr>
      <td class="td"><p>D</p></td>
      <td class="td"><p>Choose a suggestion and edit suggestion and select a phrase completion</p></td>

      <td class="td">
        <p>POST /suggestions</p>
        <p>POST /suggestions per keystroke</p>
        <p>POST /spellcheck</p>
        <p>POST /profanity</p>
        <p>POST /messages</p>
        <p>POST /message-sent</p>
      </td>
    </tr>

    <tr>
      <td class="td"><p>E</p></td>
      <td class="td"><p>Choose a suggestion and add to it, purposely misspelling a word and undoing the spelling correction</p></td>

      <td class="td">
        <p>POST /suggestions</p>
        <p>POST /suggestions per keystroke</p>
        <p>POST /spellcheck</p>
        <p>POST /profanity</p>
        <p>POST /messages</p>
        <p>POST /message-sent</p>
      </td>
    </tr>

    <tr>
      <td class="td"><p>F</p></td>
      <td class="td"><p>Choose a suggestion and edit with profanity</p></td>

      <td class="td">
        <p>POST /suggestions</p>
        <p>POST /suggestions per keystroke</p>
        <p>POST /spellcheck</p>
        <p>POST /profanity</p>
        <p>POST /messages</p>
        <p>POST /message-sent</p>
      </td>
    </tr>
  </tbody>
</table>

## Use Case Examples

### 1. Create a Conversation and Ask for Suggestions

The example below is a conversation post request with one customer message. Notice that the `id` value provided in the `/conversations` response is used as the `conversationId` path parameter in subsequent calls.

The conversation and message calls are followed by a suggestion request and response for the agent's reply which includes two suggestions without a title and one suggestion with a title. The `phraseCompletion` field is not returned, as the agent has only just begun typing their message with `"query": "Sure"` when this suggestion request was made.

**POST** `/conversation/v1/conversations`

**Request**

```json
{
  "externalId": "33411121",
  "agent": {
    "externalId": "671",
    "name": "agentname"
  },
  "customer": {
    "externalId": "11462",
    "name": "Sarah Jones"
  },
  "metadata": {
    "organizationalGroup": "some-group",
    "subdivision": "some-division",
    "queue": "some-queue"
  },
  "timestamp": "2021-11-23T12:13:14.55Z"
}
```

**Response**

*STATUS 200: Successfully created or updated conversation*

```json
{
  "id": "5544332211"
}
```

**POST** `/conversation/v1/conversations/5544332211/messages`

**Request**

```json
{
  "text": "Hello, I would like to upgrade my internet plan to GOLD.",
  "sender": {
    "role": "customer",
    "externalId": "3455123"
  },
  "timestamp": "2021-11-23T12:13:18.55Z"
}
```

**Response**
*STATUS 200: Successfully created message in conversation*

```json
{
  "id": "099455443322115544332211"
}
```

**POST** `/autocompose/v1/conversations/5544332211/suggestions`
**Request**

```json
{
  "query": "Sure"
}
```

**Response**
*STATUS 200: Successfully fetched suggestions for the conversation*

```json
{
  "id": "453466732233",
  "suggestions": [
    {
      "text": "Sure, can I get your account number for verification please?",
      "templateText": "Sure, can I get your account number for verification please?",
      "title": ""
    },    
    {
      "text": "Sure Sarah, I can certainly help you with that.",
      "templateText": "Sure {NAME}, I can certainly help you with that.",
      "title": ""
    },
    {
      "text": "The GOLD plan is a great choice",
      "templateText": "The GOLD plan is a great choice",
      "title": "Gold plan great choice"
    }
  ]
}
```

### 2. Check Profanity

The example below is of a profanity check request and response for a text string that does not contain any words found in the profanity blocklist:

**POST** `/autocompose/v1/profanity/evaluation`

**Request**

```json
{
  "text": "This is a perfectly decent sentence."
}
```

**Response**

*STATUS 200: Successfully fetched an evaluation result of the sentence.*

```json
{
  "hasProfanity": false
}
```

### 3. Check Spelling

The example below is of a spell check request and response for a text string that contains a misspelling in the last typed word of the string:

**POST** `/autocompose/v1/spellcheck/correction`

**Request**

```json
{
  {
  "text": "How is tihs ",
  "typingEvent": {
    "cursorStart": 11,
    "cursorEnd": 12
  },
  "userDictionary": [
    "Hellooo"
  ]
}
```

**Response**

*STATUS 200: Successfully checked for a spelling mistake.*

```json
{
  "misspelledText": "tihs",
  "correctedText": "this",
  "position": 7
}
```

### 4. Send an Analytics Message Event

The example below is of an analytics message event being sent to ASAPP that provides metadata about how an agent used AutoCompose for a given message.
For this message example, the agent used a spelling correction, selected the first response suggestion offered, and subsequently used the first phrase completion presented to finish the sentence, in that order.
**POST** `/autocompose/v1/analytics/message-sent`
**Request**

```json
{
  "conversationId": "5544332211",
  "messageId": "ee675e6576c0faf40dbb92d0d5993f5f",
  "augmentationType": [
    "FLUENCY_APPLY",
    "AUTOSUGGEST",
    "PHRASE_AUTOCOMPLETE"
  ],
  "numEdits": 2,
  "selectedSuggestionText": "How can I help you today?",
  "selectedSuggestionsId": "5e9491b203e6ecccfef964e26fb1a5d3",
  "selectedSuggestionIndex": 1,
  "initialSuggestionsId": "5e9491b203e6ecccfef964e26fb1a5d3",
  "timeToAction": 1.891412,
  "craftingTime": 10.9472,
  "dwellTime": 4.132985,
  "phraseAutocompletePresentedCt": 1,
  "phraseAutocompleteSelectedCt": 1
}
```

**Response**
*STATUS 200: Successfully created a MessageSent event.*
In this example, the agent typed a message and sent it without using any assistance from AutoCompose:
**Request**

```json
 {
  "messageId": "ee675e6576c0faf40dbb92d0d5993e2q",
  "augmentationType": [
    "FREEHAND"
  ],
  "initialSuggestionsId": "5e9491b303e6ecccfef164e26fb1afq9",
  "timeToAction": 2.891412,
  "craftingTime": 20.9472,
  "dwellTime": 5.132985
}
```

**Response**

*STATUS 200: Successfully created a MessageSent event.*

In this example, the agent typed "hel", selected the second suggestion presented to them and sent it:

**Request**

```json
 {
  "messageId": "ee675e1236c0faf40dcb92h0e5y93e2p",
  "augmentationType": [
    "AUTOCOMPLETE"
  ],
  "selectedSuggestionText": "Hello there, welcome to customer support chat!",
  "selectedSuggestionsId": "4d2fd982640c311394008259594399a1",
  "selectedSuggestionIndex": 2,
  "initialSuggestionsId": "4d2fd982640c311394008259594399a1",
  "timeToAction": 1.891412,
  "craftingTime": 11.9472,
  "dwellTime": 2.132985
}
```

**Response**
*STATUS 200: Successfully created a MessageSent event.*
In this example, the agent typed "htis", hit the space bar, and spellcheck corrected the text to "this". Then the agent accidentally reversed the spell check and sent the message to the customer without using any other AutoCompose assistance:
**Request**

```json
 {
  "messageId": "fe675e1236c0fbf40dcb33h0e5y93e1d",
  "augmentationType": [
    "FLUENCY_APPLY",
    "FLUENCY_UNDO"
  ],
  "initialSuggestionsId": "2d2fd982640c311146008259594399a2",
  "timeToAction": 1.891412,
  "craftingTime": 11.9472,
  "dwellTime": 2.132985
}
```

**Response**

*STATUS 200: Successfully created a MessageSent event.*

### 5. Show an Agent Global Responses

The example below is of a request to show global responses only to an agent who is searching the greetings folder for a particular response. **NOTE**: The response below is shortened to show two responses.

**GET** `/autocompose/v1/responses/globals`

**Request**

*Query Parameters:*

```json
        folderId: "9923599"
        resourceType: "responses"
        searchTerm: "transfer"
```

**Response**

*STATUS 200: The global responses for this company*

```json
{
  "responses": {
    "responsesList": [
      {
        "id": "425523523599",
        "text": "I’d be happy to transfer you to my supervisor.",
        "title": "Sup Transfer 2",
        "folderId": "9923599",
      },
      {
        "id": "425523523598",
        "text": "No problem {NAME}, I’d be happy to transfer you to my supervisor.",
        "title": "Sup Transfer 1",
        "folderId": "9923599 ",
        "metadata": [
          {
            "name": "NAME",
            "allowedValues": [
              "customer.name"
            ]
          }
        ]
      }
    ],
  },
  "version": {
    "id": "12134",
    "description": "June 5 2022 Update"
  }
}
```

### 6. Creating a New Custom Response Folder and Response

The example below shows the calls that would accompany an agent creating a new greeting custom response without a folder, then adding it to an existing folder.

**POST** `/autocompose/v1/responses/customs/response`

**Request**

```json
{
  "text": "Howdy, how can I help you today?",
  "title": "Howdy Help"
}
```

**Response**

*STATUS 200: Acknowledgement that the response was successfully added*

```json
{
  "id": "425523523523",
  "text": "Howdy, how can I help you today?",
  "title": "Howdy Help",
  "folderId": "__root"
}

```

**PUT** `/autocompose/v1/responses/customs/response/425523523523`

**Request**

```json
{
  "text": "Howdy, how can I help you today?",
  "title": "Howdy Help",
  "folderId": "9923523"
}
```

**Response**

*STATUS 201: Acknowledgement that the custom response was successfully updated*

## Data Security

ASAPP's security protocols protect data at each point of transmission, from first user authentication, to secure communications, to our auditing and logging system, all the way to securing the environment when data is at rest in the data logging system. Access to data by ASAPP teams is tightly constrained and monitored. Strict security protocols protect both ASAPP and our customers.

The following security controls are particularly relevant to AutoCompose:

1. Client sessions are controlled using a time-limited authorization token. Privileges for each active session are controlled server-side to mitigate potential elevation-of-privilege and information disclosure risks.
2. To avoid unauthorized disclosure of information, unique, non-guessable IDs are used to identify conversations. These conversations can only be accessed using a valid client session.
3. Requests to API endpoints that can potentially receive sensitive data are put through a round of redaction to strip the request of sensitive data (like SSNs and phone numbers).

## Additional Considerations

### Historical Conversation Data for Generating a Response List

ASAPP uses past agent conversations to generate a customized response list tailored to a given use case. In order to create an accurate and relevant list, ASAPP requires a minimum of 200,000 historical transcripts to be supplied ahead of implementing AutoCompose.

For more information on how to transmit the conversation data, reach out to your ASAPP account contact.

Visit [Transmitting Data to SFTP](/reporting/send-sftp "Transmitting Data to SFTP") for instructions on how to send historical transcripts to ASAPP.


# Deploying AutoCompose for LivePerson
Source: https://docs.asapp.com/autocompose/deploying-autocompose-for-liveperson

Use AutoCompose on your LivePerson application.

## Overview

This page describes how to Integrate AutoCompose in your LivePerson application.

### Integration Steps

There are four parts to the AutoCompose setup process. Use the links below to skip to information about a specific part of the process:

1. [Install the ASAPP browser extension](#1-install-the-asapp-browser-extension) on all agents' desktop (via a system policy or using your company's existing deployment processes)
2. [Configure the LivePerson organization](#2-configure-liveperson) centrally using an administrator account
3. [Setup agent/user authentication](#3-set-up-single-sign-on) through the existing single sign-on (SSO) service
4. [Work with your ASAPP contact to configure Auto-Pilot Greetings](#4-configure-auto-pilot-greetings), if desired

## Requirements

**Browser Support**

ASAPP AutoCompose is supported in Google Chrome and Microsoft Edge

* NOTE: This support covers the latest version of each browser and extends to the previous two versions

Please consult your ASAPP account contact if your installation requires support for other browsers

**LivePerson**

ASAPP supports LivePerson's Messaging conversation type

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-25692af3-f40a-506d-128f-9b57931ae9b1.png" />
</Frame>

**SSO Support**

The AutoCompose widget supports SP-initiated SSO with either OIDC (preferred method) or SAML.

**Domain Whitelisting**

In order for AutoCompose to interact with ASAPP's backend and third-party support services, the following domains need to be accessible from end-user environments:

| Domain                                     | Description                                                        |
| :----------------------------------------- | :----------------------------------------------------------------- |
| \*.asapp.com                               | ASAPP service URLs                                                 |
| \*.ingest.sentry.io                        | Application performance monitoring tool                            |
| fonts.googleapis.com                       | Fonts                                                              |
| google-analytics.com                       | Page analytics                                                     |
| asapp-chat-sdk-production.s3.amazonaws.com | Static ASAPP AWS URL for desktop network connectivity health check |

**Policy Check**

Before proceeding, check the current order of precedence of policies deployed in your organization. Platform-deployed policies (like Group Policy Objects) and cloud-deployed policies (like Google Admin Console) are enforced in a priority order that can lead to lower-priority policies not being enforced.

* If installing the ASAPP browser extension via Group Policy Objects, set platform policies to have precedence over cloud policies.
* If installing the ASAPP browser extension via Google Admin Console, set cloud policies to have precedence over platform policies.
  For more on how to check and modify order of precedence, see [policy management guides from Google Enterprise](https://support.google.com/chrome/a/answer/9037717).

## Integrate with LivePerson

### 1. Install the ASAPP Browser Extension

Customers have two options for installing the AutoCompose browser extension:

A.  Group Policy Objects (GPO)

B.  Google Admin Console

#### A. Install Group Policy Objects (GPO)

Customers can automatically install and manage the ASAPP AutoCompose browser extension via Group Policy Objects (GPO). ASAPP provides an installation server from which the extension can be downloaded and automatically updated.

The Customer's system administrator must configure GPO rules to allow the installation server URL and the software component ID. Through GPO, the administrator can choose to force the installation (i.e., install without requiring human intervention).

The following policies will configure Chrome and Edge to download the AutoCompose browser extension in all on-premise managed devices via GPO:

| **Policy Name**                                                                                                         | **Value to Set**                                                                                                                                                                |
| :---------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [ExtensionInstallSources](https://cloud.google.com/docs/chrome-enterprise/policies/?policy=ExtensionInstallSources)     | https\://\*.asapp.com/\*                                                                                                                                                        |
| [ExtensionInstallAllowlist](https://cloud.google.com/docs/chrome-enterprise/policies/?policy=ExtensionInstallAllowlist) | bfcmlmledhddbnialbbdopfefoelbbei                                                                                                                                                |
| [ExtensionInstallForcelist](https://cloud.google.com/docs/chrome-enterprise/policies/?policy=ExtensionInstallForcelist) | bfcmlmledhddbnialbbdopfefoelbbei;[https://app.asapp.com/autocompose-liveperson-chrome-extension/updates](https://app.asapp.com/autocompose-liveperson-chrome-extension/updates) |

Each Policy Name above links to documentation that describes how to set the values with the proper format depending on the platform.

<Note>
  When policy changes occur, you may need to reload policies manually or force restart the browser to ensure newly deployed policies are applied.
</Note>

Figure 2 shows example policy files for the Windows platform. The policy adds the URL 'https\://\*.asapp.com/\*' as a valid extension install source, allows the extension ID 'bfcmlmledhddbnialbbdopfefoelbbei', and forces the extension installation.

Google Chrome:

```registry
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome]
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome\ExtensionInstallAllowlist]
"1"="bfcmlmledhddbnialbbdopfefoelbbei"
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome\ExtensionInstallSources]
"1"="https://*.asapp.com/*"
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome\ExtensionInstallForcelist]
"1"="bfcmlmledhddbnialbbdopfefoelbbei;https://app.asapp.com/autocompose-liveperson-chrome-extension/updates”
```

Microsoft Edge:

```registry
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Edge]
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Edge\ExtensionInstallAllowlist]
"1"="bfcmlmledhddbnialbbdopfefoelbbei"
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Edge\ExtensionInstallSources]
"1"="https://*.asapp.com/*"
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Edge\ExtensionInstallForcelist]
"1"="bfcmlmledhddbnialbbdopfefoelbbei;https://app.asapp.com/autocompose-liveperson-chrome-extension/updates”
```

Figure 2: Example policy files to install the AutoCompose browser extension in Google Chrome and Microsoft Edge browsers respectively (*Windows Registry*)

#### B. Install via Google Admin Console

For Google Chrome deployments, customers can install and manage the ASAPP AutoCompose browser extension using Managed Chrome Device policies in the Google Admin console. The Customer's system administrator must set up the AutoCompose browser extension through the Google Admin console by creating a custom app and configuring the extension ID and XML manifest URL. Through managed Chrome policies the administrator can choose to force the installation (i.e. install without requiring human intervention).

In order to have Chrome download the ASAPP hosted extension in all managed devices through the Google Admin console:

1. Navigate to **Device management > Chrome**.
2. Click **Apps & Extensions**.
3. Click on **Add (+)** and look for **Add Chrome app or extension by ID** option.
4. Complete the fields using the values provided below. Be sure to select the **From a custom URL** option.

| **Field** | **Value**                                                                                                                                      |
| :-------- | :--------------------------------------------------------------------------------------------------------------------------------------------- |
| ID        | bfcmlmledhddbnialbbdopfefoelbbei                                                                                                               |
| URL       | [https://app.asapp.com/autocompose-liveperson-chrome-extension/updates](https://app.asapp.com/autocompose-liveperson-chrome-extension/updates) |

Please check Google's [Managing Extensions in Your Enterprise](https://docs.google.com/document/d/1pT0ZSbGdrbGvuCsVD2jjxrw-GVz-80rMS2dgkkquhTY/edit#heading=h.ojow7ntunwpx) for more information.

<Note>
  To ensure that cloud policies are enabled for production environment users in a given organizational unit, locate that group of users by navigating to **Devices** > **Chrome** > **Settings** menu in Google Suite.

  Ensure the setting **[Chrome management for signed-in users](https://support.google.com/chrome/a/answer/2657289?hl=en#zippy=%2Cchrome-management-for-signed-in-users)** is set to **Apply all user policies when users sign into Chrome, and provide a managed Chrome experience.**
</Note>

**Testing**

The following two checks on a target machine will verify the extension is installed correctly:

1. **The extension is force-installed in the browser**
   a.  Expand the extension icon in the browser toolbar.
   b.  Alternatively, navigate to chrome://extensions/ or edge://extensions/ and look for 'ASAPP Extension'
   c.  Alternatively, navigate to edge://extensions/ and look for 'ASAPP Extension'
2. **The extension is properly configured**
   a.  Click the extension icon and validate that the allowlist and denylist values in the extension's options are as they were set.
   b.  Alternatively, navigate to chrome://policy and search for the extension policies.
   c.  Alternatively, navigate to edge://policy and search for the extension policies.

### 2. Configure LivePerson

**Before You Begin**

You will need the following information to configure ASAPP for LivePerson:

* The URL for your custom widget, which will be provided to you by ASAPP

* Credentials to login to your LivePerson organization as an administrator

**Configuration Steps**

1. **Add New Widget**
   * Open the LivePerson website and login as an administrator.
   * Go to 'agent workspace' and click **Night Vision**, in the top right:
     <Frame>
       <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-0fc19664-1fdd-cae9-f0e1-deb3a73b1c54.png" />
     </Frame>
   * Click +, then **Add new widget**.
     <Frame>
       <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-d4ab75f3-3c1a-7d12-e5e7-77d35f5dcebf.png" />
     </Frame>
2. **Enter Widget Attributes**
   * Fill in the **Widget name** as 'ASAPP'
   * Assign the conversation skill(s) to which ASAPP is being deployed in the **Assigned skills** dropdown menu.
     <Caution>
       Leaving **Assigned skills** blank will show the ASAPP widget for all conversation regardless of skill.
     </Caution>
   * Enter the URL that contains the API key you were provided by your ASAPP account contact for your custom widget in the **URL** field.

     <Note>
       When configuring for a sandbox environment, use this URL format: `https://app.asapp.com/autocompose-liveperson/autocompose.html?apikey=\{your_sandbox_api_key\}&asapp_api_domain=api.sandbox.asapp.com`

       When configuring for a production environment, use this URL format: `https://app.asapp.com/autocompose-liveperson/autocompose.html?apikey=\{your_prod_api_key\}`
     </Note>

     <Frame>
       <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-763a008b-cd5b-688f-8cc6-0bd15ad1db91.png" />
     </Frame>
   * Click the **Save** button.
     <Note>
       Ensure **Hide** and **Manager View** are unselected once you are ready for agents to see the widget for conversations with the assigned skill(s).

       <Frame>
         <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-4d3271ac-3a6a-9deb-af4a-fdd5061ea20d.png" />
       </Frame>
     </Note>
3. **Move Widget to Top**
   * Click the **Organize** button
   * Scroll down to the ASAPP widget, and click the **Move top** button:
     <Frame>
       <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-13d78edd-6c73-7c9d-65a9-edfe08088a33.png" />
     </Frame>
   * Click the **Done** button
4. **Enable Pop-in Composer**
   * In the Agent Workspace, click the nut icon (similar to a gear shape) next to the **+** icon at the bottom of the AutoCompose panel widget.
   * Enable the **Pop-in Composer** option.
     <Frame>
       <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-3001d768-5dfb-e02e-24fa-6adcb8e513b4.png" />
     </Frame>

Press the escape key and reload the page to see the changes; the ASAPP widget should now be available across your LivePerson organization

Upon login to the Agent Workspace, the ASAPP widget for AutoCompose will appear in place of the standard LivePerson composer, underneath the conversation transcript. By default, the response panel for AutoCompose will appear to the right of the conversational panel.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-4b2626ec-266c-fbcf-f28f-0c10080ea306.png" />
</Frame>

### 3. Set Up Single Sign-On

ASAPP handles authentication through the customer's SSO service to confirm the identity of the agent.

ASAPP acts as the Service Provider (SP) with the customer acting as the Identity Provider (IDP). The customer's authentication system performs user authentication using their existing user credentials.

ASAPP supports SP-initiated SSO with either OIDC (preferred method) and SAML. Once the user initiates sign-in, ASAPP detects that the user is authenticated and requests an assertion from the customer's SSO service.

**Configuration Steps for OIDC (preferred method)**

1. Create a new IDP OIDC application with type `Web`
2. Set the following attributes for the app:
   <table class="informaltable frame-void rules-rows">
     <thead>
       <tr>
         <th class="th"><p>Attribute</p></th>
         <th class="th"><p>Value\*</p></th>
       </tr>
     </thead>

     <tbody>
       <tr>
         <td class="td"><p>Grant Type</p></td>
         <td class="td"><p>authorization code</p></td>
       </tr>

       <tr>
         <td class="td"><p>Sign-in Redirect URIs</p></td>

         <td class="td">
           <p>Production: [https://api.asapp.com/auth/v1/callback/\\\{company\_marker\\}](https://api.asapp.com/auth/v1/callback/\\\{company_marker\\})</p>
           <p>Sandbox: [https://api.sandbox.asapp.com/auth/v1/callback/\\\{company\_marker\\}-sandbox](https://api.sandbox.asapp.com/auth/v1/callback/\\\{company_marker\\}-sandbox)</p>
         </td>
       </tr>
     </tbody>
   </table>
   **\*NOTE:** ASAPP to provide `company_marker` value
3. Save the application and send ASAPP the `Client ID` and `Client Secret` from the app through a secure communication channel
4. Set scopes for the OIDC application:
   * Required: `openid`
   * Preferred: `email`, `profile`
5. Tell ASAPP which end-user attribute should be used a unique identifier
6. Tell ASAPP your IDP domain name

**Configuration Steps for SAML**

1. Create a new IDP SAML application.
2. Set the following attributes for the app:

   | Attribute            | Value\*                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
   | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
   | Single Sign On URL   | Production: [https://sso.asapp.com/auth/realms/standalone-\{company\_marker}-auth/broker/saml/endpoint/clients/asapp-saml](https://sso.asapp.com/auth/realms/standalone-\{company_marker}-auth/broker/saml/endpoint/clients/asapp-saml)<br /><br />Sandbox: [https://sso.asapp.com/auth/realms/standalone-\{company\_marker}-auth/broker/saml-sandbox/endpoint/clients/asapp-saml-sandbox](https://sso.asapp.com/auth/realms/standalone-\{company_marker}-auth/broker/saml-sandbox/endpoint/clients/asapp-saml-sandbox) |
   | Recipient URL        | Production: [https://sso.asapp.com/auth/realms/standalone-\{company\_marker}-auth/broker/saml/endpoint/clients/asapp-saml](https://sso.asapp.com/auth/realms/standalone-\{company_marker}-auth/broker/saml/endpoint/clients/asapp-saml)<br /><br />Sandbox: [https://sso.asapp.com/auth/realms/standalone-\{company\_marker}-auth/broker/saml-sandbox/endpoint/clients/asapp-saml-sandbox](https://sso.asapp.com/auth/realms/standalone-\{company_marker}-auth/broker/saml-sandbox/endpoint/clients/asapp-saml-sandbox) |
   | Destination URL      | Production: [https://sso.asapp.com/auth/realms/standalone-\{company\_marker}-auth/broker/saml/endpoint/clients/asapp-saml](https://sso.asapp.com/auth/realms/standalone-\{company_marker}-auth/broker/saml/endpoint/clients/asapp-saml)<br /><br />Sandbox: [https://sso.asapp.com/auth/realms/standalone-\{company\_marker}-auth/broker/saml-sandbox/endpoint/clients/asapp-saml-sandbox](https://sso.asapp.com/auth/realms/standalone-\{company_marker}-auth/broker/saml-sandbox/endpoint/clients/asapp-saml-sandbox) |
   | Audience Restriction | Production: [https://sso.asapp.com/auth/realms/standalone-\{company\_marker}-auth/broker/saml/endpoint/clients/asapp-saml](https://sso.asapp.com/auth/realms/standalone-\{company_marker}-auth/broker/saml/endpoint/clients/asapp-saml)<br /><br />Sandbox: [https://sso.asapp.com/auth/realms/standalone-\{company\_marker}-auth/broker/saml-sandbox/endpoint/clients/asapp-saml-sandbox](https://sso.asapp.com/auth/realms/standalone-\{company_marker}-auth/broker/saml-sandbox/endpoint/clients/asapp-saml-sandbox) |
   | Response             | Signed                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
   | Assertion            | Signed                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
   | Signature Algorithm  | RSA\_SHA256                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
   | Digest Algorithm     | SHA256                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
   | Attribute Statements | externalUserId: {unique_id_to_identify_the_user}                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |

   **\*NOTE:** ASAPP to provide `company_marker` value
3. Save the application and send the Public Certificate to validate Signature for this app SAML payload to ASAPP team
4. Send ASAPP team the URL of the SAML application

### 4. Configure Auto-Pilot Greetings

If you so choose, you can work with your ASAPP contact to enable Auto-Pilot Greetings in your AutoCompose installation.

Auto-Pilot Greetings automatically generates a greeting at the beginning of a conversation, and that greeting can be automatically sent to a customer on your agent's behalf after a configurable timer elapses.

Your ASAPP contact can:

* Turn Auto-Pilot Greetings on or off for your organization
* Set a countdown timer value after which the Auto-Pilot Greeting is sent if an agent does not cancel Auto-Pilot by typing or clicking a "cancel" button
* Set the global default messages that will be provided for Auto-Pilot Greetings across your organization (note that agents can optionally customize their Auto-Pilot Greetings messages within the Auto-Pilot tab of the AutoCompose panel)

## Usage

### Customization

#### LivePerson

For LivePerson, the standard process is to download ASAPP AutoCompose as a standalone widget. In the case that you already have your own LivePerson custom widget, ASAPP also provides the option for you to embed our custom widget inside your own custom widget, thus economizing on-screen real estate.

**Conversation Attributes**

Once the ASAPP AutoCompose widget is embedded, LivePerson shares the following conversation attributes with ASAPP: customer name, agent name and skill.

ASAPP can use name attributes to populate values into templated responses (e.g. "Hi \[customer name], how can I help you today?") and to selectively filter response lists based on the skill of the conversation.

**Conversation Redaction**

When message text in the conversation transcript is sent to ASAPP, ASAPP applies redaction to the message text to prevent transmission of sensitive information. Reach out to your ASAPP account contact for information on available redaction capabilities to configure for your implementation.

### Data Security

ASAPP's security protocols protect data at each point of transmission from first user authentication, to secure communications, to our auditing and logging system, all the way to securing the environment when data is at rest in the data logging system. Access to data by ASAPP teams is tightly constrained and monitored. Strict security protocols protect both ASAPP and our customers.

The following security controls are particularly relevant to AutoCompose:

1. Client sessions are controlled using a time-limited authorization token. Privileges for each active session are controlled server-side to mitigate potential elevation-of-privilege and information disclosure risks.
2. To avoid unauthorized disclosure of information, unique, non-guessable IDs are used to identify conversations. These conversations can only be accessed using a valid client session.
3. Requests to API endpoints that can potentially receive sensitive data are put through a round of redaction to strip the request of sensitive data (like SSNs and phone numbers).

### Additional Considerations

#### Historical Conversation Data for Generating a Response List

ASAPP uses past agent conversations to generate a customized response list tailored to a given use case. In order to create an accurate and relevant list, ASAPP requires a minimum of 200,000 historical transcripts to be supplied ahead of implementing AutoCompose.

For more information on how to transmit the conversation data, reach out to your ASAPP account contact.

#### LivePerson

ASAPP uses a browser extension to replace the LivePerson composer with the ASAPP composer. In the unlikely event that the DOM of the LivePerson composer or its surrounding area changes, the LivePerson composer may no longer be replaced by the ASAPP composer.

In this case, the CSR has the option to toggle the ASAPP composer so that it 'retreats' into the ASAPP Custom Widget. In such a case, the ASAPP composer will continue to be fully functional, even if it is no longer ideally placed just below the LivePerson chat history.

In order to quickly restore the placement of the ASAPP composer directly beneath the LivePerson chat log, ASAPP deploys its extension so that the extension's configuration is pulled down from our servers in real-time. If the LivePerson DOM does change, we can deploy a fix rapidly.


# Deploying AutoCompose for Salesforce
Source: https://docs.asapp.com/autocompose/deploying-autocompose-for-salesforce

Use AutoCompose on Salesforce Lightning Experience.

## Overview

This page describes how to Integrate AutoCompose in your Salesforce application.

### Integration Steps

There are three parts to the AutoCompose setup process. Use the links below to skip to information about a specific part of the process:

1. [Configure the Salesforce organization](#1-configure-the-salesforce-organization-centrally) centrally using an administrator account
2. [Setup agent/user authentication](#2-set-up-single-sign-on) through the existing single sign-on (SSO) service
3. [Work with your ASAPP contact to configure Auto-Pilot Greetings](#3-configure-auto-pilot-greetings), if desired

<Tip>
  Expected effort for each part of the setup process:

  * 1 hour for installation and configuration of the ASAPP chat componentd
  * 1-2 hours to enable user authentication, depending on SSO system complexity
</Tip>

## Requirements

**Browser Support**

ASAPP AutoCompose is supported in Google Chrome and Microsoft Edge

<Tip>
  NOTE: This support covers the latest version of each browser and extends to the previous two versions

  Please consult your ASAPP account contact if your installation requires support for other browsers
</Tip>

**Salesforce**

ASAPP supports Lightning-based chat (cf. classic)

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-c6a319ef-4846-1c14-7ea5-5294ed44e8e2.png" />
</Frame>

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-e66b3aab-d17a-a7dc-f607-4f8a9504db87.png" />
</Frame>

**SSO Support**

The AutoCompose widget supports SP-initiated SSO with either OIDC (preferred method) or SAML.

**Domain Whitelisting**

In order for AutoCompose to interact with ASAPP's backend and third-party support services, the following domains need to be accessible from end-user environments:

| Domain                                     | Description                                                        |
| :----------------------------------------- | :----------------------------------------------------------------- |
| \*.asapp.com                               | ASAPP service URLs                                                 |
| \*.ingest.sentry.io                        | Application performance monitoring tool                            |
| fonts.googleapis.com                       | Fonts                                                              |
| google-analytics.com                       | Page analytics                                                     |
| asapp-chat-sdk-production.s3.amazonaws.com | Static ASAPP AWS URL for desktop network connectivity health check |

## Integrate with Salesforce

### 1. Configure the Salesforce Organization Centrally

**Before You Begin**

You will need the following information to configure ASAPP for Salesforce:

* Administrator credentials to login to your Salesforce organization account.
  * **NOTE:** Organization and Administrator should be enabled for 'chat'.
* A URL for the ASAPP installation package, which will be provided by ASAPP.

  <Note>
    ASAPP provides the same install package for implementing both AutoCompose and AutoSummary in Salesforce. Use this guide to configure AutoCompose.

    If you're looking to implement AutoSummary, [use this guide](/autosummary/salesforce-plugin).
  </Note>
* API Id and API URL values, which can be found in your ASAPP Developer Portal account (developer.asapp.com) in the **Apps** section.

**Configuration Steps**

**1. Install the ASAPP Package**

* Open the package installation URL from ASAPP.
* Login with your Salesforce organization administrator credentials. The package installation page appears:
  <Frame>
    <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-2e51b4cf-646c-4e67-42b2-4df188321f5f.png" />
  </Frame>
* Choose **Install for All Users** (as shown above).
* Check the acknowledgment statement and click the **Install** button:
  <Frame>
    <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-efdaa3e5-109a-a6f1-46d9-fbc0777d7340.png" />
  </Frame>
  <Frame>
    <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-d6534373-fa62-f370-e790-fee74118bd80.png" />
  </Frame>
* The Installation runs. An **Installation Complete!** message appears:
  <Frame>
    <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-6c4df35c-6c3f-a1d2-b0cc-64b5d0aac3d9.png" />
  </Frame>
  <Frame>
    <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-8229e206-9c06-70e3-af08-2a5c9b4373c3.png" />
  </Frame>
* Click the **Done** button.

**2. Add ASAPP to the Chat Transcript Page**

* Open the 'Service Console' page (or your chat page).
* Choose an existing chat session or start a new chat session so that the chat transcript page appears (the exact mechanism is organization-specific).
* In the top-right, click the **gear** icon, then right-click **Edit Page**, and **Open Link in a New Tab**.
  <Frame>
    <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-16a63275-b025-59fc-3aa5-154a5ca10db6.png" />
  </Frame>
* Navigate to the new tab to see the chat transcript edit page:
  <Frame>
    <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-412d4636-2ddf-33fd-04bb-598df2851636.png" />
  </Frame>
* Select the conversation panel (middle) and delete it.
  <Frame>
    <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-082909fc-339c-417c-2ba6-af6de29ef281.png" />
  </Frame>
* Drag the **chatAsapp** component (left), inside the conversation panel:
  <Frame>
    <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-03d5534d-9513-e847-f942-8c11291b8806.png" />
  </Frame>
* Drag the **exploreAsapp** component (left), to the right column. Next, add your organization's **API key** and **API URL** (found in the ASAPP Developer Portal) in the rightmost panel:

  <Note>
    The API key is labeled as **API Id** in the ASAPP Developer Portal.

    The API URL should be listed as `https://api.sandbox.asapp.com` for lower environments and `https://api.asapp.com` for production.
  </Note>

  <Frame>
    <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-cba02769-7bfd-4046-7b89-f6e99d6e26da.png" />
  </Frame>

  <Frame>
    <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-b9a621e7-75d9-7dfe-7e62-08dd68fc00b2.png" />
  </Frame>
* Click **Save**, then click **Activate**
  <Frame>
    <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-8d13377b-ee60-0196-c713-224ee04d65cc.png" />
  </Frame>
* Click **Assign as org default**.
  <Frame>
    <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-e2227892-55f8-1c17-16c7-61a1895bf19c.png" />
  </Frame>
* Choose **Desktop** form factor, then click **Save**.
  <Frame>
    <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-25a3c7b0-9a58-97be-28a4-799e4de6f3f3.png" />
  </Frame>
* Return to the chat transcript page and refresh - the ASAPP composer should appear.
  <Frame>
    <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-419161db-4848-c498-a3b7-60faa0d0df6d.png" />
  </Frame>

### 2. Set Up Single Sign-On

ASAPP handles authentication through the customer's SSO service to confirm the identity of the agent.

ASAPP acts as the Service Provider (SP) with the customer acting as the Identity Provider (IDP). The customer's authentication system performs user authentication using their existing user credentials.

ASAPP supports SP-initiated SSO with either OIDC (preferred method) and SAML. Once the user initiates sign-in, ASAPP detects that the user is authenticated and requests an assertion from the customer's SSO service.

**Configuration Steps for OIDC (preferred method)**

1. Create a new IDP OIDC application with type `Web`

2. Set the following attributes for the app:
   <table class="informaltable frame-void rules-rows">
     <thead>
       <tr>
         <th class="th"><p>Attribute</p></th>
         <th class="th"><p>Value\*</p></th>
       </tr>
     </thead>

     <tbody>
       <tr>
         <td class="td"><p>Grant Type</p></td>
         <td class="td"><p>authorization code</p></td>
       </tr>

       <tr>
         <td class="td"><p>Sign-in Redirect URIs</p></td>

         <td class="td">
           <p>Production: `https://api.asapp.com/auth/v1/callback/\{company_marker\}`</p>
           <p>Sandbox: `https://api.sandbox.asapp.com/auth/v1/callback/\{company_marker\}-sandbox`</p>
         </td>
       </tr>
     </tbody>
   </table>
   **\*NOTE:** ASAPP to provide `company_marker` value

3. Save the application and send ASAPP the `Client ID` and `Client Secret` from the app through a secure communication channel

4. Set scopes for the OIDC application:
   * Required: `openid`
   * Preferred: `email`, `profile`

5. Tell ASAPP which end-user attribute should be used a unique identifier

6. Tell ASAPP your IDP domain name

**Configuration Steps for SAML**

1. Create a new IDP SAML application.
2. Set the following attributes for the app:

   | Attribute            | Value\*                                                                                                                                                                                                                                                                     |
   | :------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
   | Single Sign On URL   | Production: `https://sso.asapp.com/auth/realms/standalone-{company_marker}-auth/broker/saml/endpoint/clients/asapp-sam`l <br /><br /> Sandbox: `https://sso.asapp.com/auth/realms/standalone-{company_marker}-auth/broker/saml-sandbox/endpoint/clients/asapp-saml-sandbox` |
   | Recipient URL        | Production: `https://sso.asapp.com/auth/realms/standalone-{company_marker}-auth/broker/saml/endpoint/clients/asapp-saml` <br /><br /> Sandbox: `https://sso.asapp.com/auth/realms/standalone-{company_marker}-auth/broker/saml-sandbox/endpoint/clients/asapp-saml-sandbox` |
   | Destination URL      | Production: `https://sso.asapp.com/auth/realms/standalone-{company_marker}-auth/broker/saml/endpoint/clients/asapp-saml` <br /><br /> Sandbox: `https://sso.asapp.com/auth/realms/standalone-{company_marker}-auth/broker/saml-sandbox/endpoint/clients/asapp-saml-sandbox` |
   | Audience Restriction | Production: `https://sso.asapp.com/auth/realms/standalone-{company_marker}-auth/broker/saml/endpoint/clients/asapp-saml` <br /><br /> Sandbox: `https://sso.asapp.com/auth/realms/standalone-{company_marker}-auth/broker/saml-sandbox/endpoint/clients/asapp-saml-sandbox` |
   | Response             | Signed                                                                                                                                                                                                                                                                      |
   | Assertion            | Signed                                                                                                                                                                                                                                                                      |
   | Signature Algorithm  | RSA\_SHA256                                                                                                                                                                                                                                                                 |
   | Digest Algorithm     | SHA256                                                                                                                                                                                                                                                                      |
   | Attribute Statements | externalUserId: `{unique_id_to_identify_the_user}`                                                                                                                                                                                                                          |

   **\*NOTE:** ASAPP to provide `company_marker` value
3. Save the application and send the Public Certificate to validate Signature for this app SAML payload to ASAPP team
4. Send ASAPP team the URL of the SAML application

### 3. Configure Auto-Pilot Greetings

If you so choose, you can work with your ASAPP contact to enable Auto-Pilot Greetings in your AutoCompose installation.
Auto-Pilot Greetings automatically generates a greeting at the beginning of a conversation, and that greeting can be automatically sent to a customer on your agent's behalf after a configurable timer elapses.

Your ASAPP contact can:

* Turn Auto-Pilot Greetings on or off for your organization
* Set a countdown timer value after which the Auto-Pilot Greeting is sent if an agent does not cancel Auto-Pilot by typing or clicking a "cancel" button
* Set the global default messages that will be provided for Auto-Pilot Greetings across your organization (note thatagents can optionally customize their Auto-Pilot Greetings messages within the Auto-Pilot tab of the AutoCompose panel)

## Usage

### Customization

#### Conversation Attributes

Once the ASAPP AutoCompose widget is embedded, Salesforce shares the following conversation attributes with ASAPP: customer name, agent name and skill.

ASAPP can use name attributes to populate values into templated responses (e.g. "Hi \[customer name], how can I help you today?") and to selectively filter response lists based on the skill of the conversation.

#### Conversation Redaction

When message text in the conversation transcript is sent to ASAPP, ASAPP applies redaction to the message text to prevent transmission of sensitive information. Reach out to your ASAPP account contact for information on available redaction capabilities to configure for your implementation.

#### Composer Placement

ASAPP currently targets Lightning desktops. Within Lightning-based desktops, you are free to place our composer wherever you choose. However, we suggest placing it immediately below the Salesforce conversation widget, such that the chat log appears above the ASAPP composer.

### Data Security

ASAPP's security protocols protect data at each point of transmission from first user authentication, to secure communications, to our auditing and logging system, all the way to securing the environment when data is at rest in the data logging system. Access to data by ASAPP teams is tightly constrained and monitored. Strict security protocols protect both ASAPP and our customers.

The following security controls are particularly relevant to AutoCompose:

1. Client sessions are controlled using a time-limited authorization token. Privileges for each active session are controlled server-side to mitigate potential elevation-of-privilege and information disclosure risks.
2. To avoid unauthorized disclosure of information, unique, non-guessable IDs are used to identify conversations. These conversations can only be accessed using a valid client session.
3. Requests to API endpoints that can potentially receive sensitive data are put through a round of redaction to strip the request of sensitive data (like SSNs and phone numbers).

### Additional Considerations

#### Historical Conversation Data for Generating a Response List

ASAPP uses past agent conversations to generate a customized response list tailored to a given use case. In order to create an accurate and relevant list, ASAPP requires a minimum of 200,000 historical transcripts to be supplied ahead of implementing AutoCompose.

For more information on how to transmit the conversation data, reach out to your ASAPP account contact.


# Feature Releases Overview
Source: https://docs.asapp.com/autocompose/feature-releases



| Feature Name                    | Feature Release Details                                                                                                                           | Additional Relevant Information (if available)        |
| :------------------------------ | :------------------------------------------------------------------------------------------------------------------------------------------------ | :---------------------------------------------------- |
| **Tooling**                     | [Tooling for AutoCompose](/autocompose/feature-releases/tooling-for-autocompose "Tooling for AutoCompose")                                        |                                                       |
| **Auto-Pilot Greetings**        | [Auto-Pilot Greetings for AutoCompose](/autocompose/feature-releases/auto-pilot-greetings-for-autocompose "Auto-Pilot Greetings for AutoCompose") | Available for all implementation types of AutoCompose |
| **Health Check API**            | [Health Check API](/autocompose/feature-releases/health-check-api "Health Check API")                                                             |                                                       |
| ****Sandbox for AutoCompose**** | [Sandbox for AutoCompose](/autocompose/feature-releases/sandbox-for-autocompose "Sandbox for AutoCompose")                                        |                                                       |


# Auto-Pilot Greetings for AutoCompose
Source: https://docs.asapp.com/autocompose/feature-releases/auto-pilot-greetings-for-autocompose



## Feature Release

This is the announcement for an upcoming ASAPP feature. Your ASAPP account team will provide a target release date and can direct you to more detailed information as needed.

## Overview

Sending a prompt and personalized greeting message is critical to making a great first impression with a newly assigned customer. However, at the moment of assignment, agents are often in the middle of other important tasks. Switching context to get caught up on the conversation can be disruptive to the agent's productivity.

With Auto-Pilot Greetings for AutoCompose, agents can configure an adaptive greeting message which will auto-send upon issue assignment following a configurable timeout period. The greeting can optionally use the customer's first name when it's available.

Agents retain control of the feature --- they can turn Auto-Pilot Greetings on/off for themselves, individualize their automatically composed greeting messages, and intervene to either cancel or send the message immediately.

<Frame caption="Auto-Pilot Greetings for AutoCompose in Salesforce Lightning agent experience.">
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-ca05baa8-0fdd-9c54-d0a5-f75f59366da5.png" />
</Frame>

## Use and Impact

Auto-Pilot Greetings automates agents' initial interaction with customers, freeing them for higher value tasks.

AutoCompose's Auto-Pilot Greetings is intended to reduce an agent's average response time across concurrent issues by freeing up their attention, and ultimately reduce average handle time.

## How It Works

For each conversation, Auto-Pilot Greetings follows a simple sequence:

1. Customer enters the chat
2. Auto-Pilot Greeting message and countdown timer appears above the composer
3. Timer counts down to zero
4. Greeting message is sent

### Configurations

**Global On/Off**

* This setting configures whether Auto-Pilot Greetings will be enabled or disabled for all agents.
* Customers must reach out to their ASAPP contact to configure Auto-Pilot Greetings globally for their program.

**Global Default Auto-Pilot Greeting Messages**

* Two default Auto-Pilot Greetings messages must be configured: one version where the customer's name is known and one where the customer's name is not known.
* Customers must reach out to their ASAPP contact to configure Global Default Auto-Pilot Greeting messages.

**Agent Specific Auto-Pilot Greeting Messages and On / Off Settings**

* Agents can optionally customize the Auto-Pilot Greeting messages composed on their behalf, and use their individualized messages in lieu of the global default messages; often agents include their name in their customized messages. Additionally, they can toggle whether Auto-Pilot Greetings is on or off for themselves by default.
* If using AutoCompose for Salesforce or LivePerson, agents configure customized messages and the on / off setting themselves through the Auto-Pilots tab of their AutoCompose panel.

  This agent functionality can also be enabled via API for custom implementations of AutoCompose.

**Countdown Timer**

* The countdown timer is the amount of time after a customer enters the chat before an Auto-Pilot Greeting is sent. A countdown timer will display to the agent notifying them of the time remaining before auto-sending.
* Customers must reach out to their ASAPP contact to set an appropriate countdown timer value, which will apply across their AutoCompose implementation.

## FAQs

* **What are best practices for Auto-Pilot Greetings?**

  ASAPP recommends setting the default message to include questions that agents often need to ask in the beginning of a call to resolve a dispute. For example:

  > \*"Hi, \[NAME]. This is Robert and I'm happy to assist you today. So I can best help you, can you please provide me with your account number and a description of your issue?"

  Furthermore, ASAPP recommends setting a countdown timer value in the range of 10-15 seconds. Too long of a default may increase handle times. Too short of a default may not give an agent a chance to cancel the Auto-Pilot Greeting should they so desire.


# Health Check API
Source: https://docs.asapp.com/autocompose/feature-releases/health-check-api



## Feature Release

This is the announcement for an upcoming ASAPP feature. Your ASAPP account team will provide a target release date and can direct you to more detailed information as needed.

## Overview

ASAPP provides a means for our customers to check the operational status of our API platform. Developers can ping this endpoint to verify that the ASAPP infrastructure is working as expected.

## Use and Impact

Developers can either check ad hoc if the ASAPP infrastructure is up at a given time or implement automated API monitoring to send a request to the Health Check API at a preset interval.

This feature is intended to improve developer confidence when integrating with ASAPP services. It also removes the need for developers to send requests to other ASAPP services to check their status, which may trigger errors unnecessarily.

## How It Works

Developers can run a `GET https://api.sandbox.asapp.com/v1/health` operation and inspect for a 200 response with either the SUCCESS or FAILED value for the status of the core ASAPP platform.

**Configuration**

Developers must request access to the API endpoint in the Developer Portal:

1. Access the Developer Portal.
2. Navigate to **Apps**, select your application, and authorize the Health Check API.
3. Reach out to your ASAPP account team to authorize access.


# Sandbox for AutoCompose
Source: https://docs.asapp.com/autocompose/feature-releases/sandbox-for-autocompose



## Feature Release

This is the announcement for an upcoming ASAPP feature. Your ASAPP account team will provide a target release date and can direct you to more detailed information as needed.

## Overview

AutoCompose Sandbox is a playground designed to preview an agent's experience with AutoCompose without having to wait for an integration to complete. AutoCompose Sandbox enables administrators to step into the role of an agent and experience the real-time suggestions that AutoCompose provides.

<Frame caption="AutoCompose running in a sandbox environment.">
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-780cd7be-c1db-c5f1-cef1-8627c8e2eec3.png" />
</Frame>

## Use and Impact

AutoCompose Sandbox enables administrators to visualize the experience that AutoCompose gives to agents presented in two areas of the screen: in the composer, which is where the agent types, and in the AutoCompose panel on the right-hand side.

Beyond showcasing the operational features of AutoCompose, the sandbox environment also delivers a proposed UI design. This design is rooted in thorough research on agent experience, resulting in increased product adoption and time savings.

AutoCompose provides both complete response suggestions above the composer and in-line suggestions while typing. The sandbox replicates the experience an agent would get, receiving suggestions from the response library. As AutoCompose learns from agents' most common responses, the response library will grow, which will be reflected in the suggestions provided in the sandbox.

## How It Works

Watch the following video walkthrough to learn how to use the AutoCompose Sandbox:

<iframe width="560" height="315" allow="fullscreen *" src="https://fast.wistia.net/embed/iframe/ezkjx798f7" />

AutoCompose Sandbox enables you to play both sides of the conversation. AutoCompose won't suggest anything while simulating a customer, but suggestions will populate for the agent role.

The AutoCompose panel situated on the right side allows you to define and browse custom responses, which can then be accessed as suggestions in the composer. It also enables browsing of the global response list that has been defined globally. Finally, it allows an agent to customize the behavior of AutoPilot.

As agents use the suggestions provided by AutoCompose, the response library will grow, which will be reflected in the suggestions produced by AutoCompose.

## FAQs

* **Is AutoCompose Sandbox using the same sandbox environment we have access to?**

  Yes. Developers building an AutoCompose integration can use AutoCompose Sandbox to easily create conversations and later retrieve them via the unique conversation ID available in the header of each conversation.


# Tooling for AutoCompose
Source: https://docs.asapp.com/autocompose/feature-releases/tooling-for-autocompose



## Feature Release

This is the announcement for an upcoming ASAPP feature. Your ASAPP account team will provide a target release date and can direct you to more detailed information as needed.

## Overview

AutoCompose now supports configuration of the global response list in ASAPP's AI-Console. Users will be able to import responses in bulk, edit individual responses, and deploy responses to testing and production environments.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-e57d895e-a797-9b64-158c-beebfd45d4db.png" />
</Frame>

## Use and Impact

ASAPP's machine learning models powering AutoCompose use the global response list (in addition to custom responses and organic responses) to select the response that is most likely to be said by the agent. Making ongoing updates to the global response list is essential to ensuring agents are receiving relevant suggestions.Features

Global responses can be configured at two levels:

1. **Bulk uploads**: This method is best suited for large volumes of changes. Users first make edits to a .csv file offline containing the full global response list, then upload the file as a new version of the list.
2. **Targeted edits**: This method is best suited for small volumes of changes. Users make edits directly in the AI-Console UI for each individual response they wish to change.

By providing ASAPP customers this self-serve capability, teams can iterate more quickly on the response list, ensuring improved coverage of situations encountered by agents and timely updates that keep pace with ongoing changes in the business.

## How It Works

Watch the video walkthrough below to learn how to manage global responses in AI-Console:

<iframe width="560" height="315" allow="fullscreen *" src="https://fast.wistia.net/embed/iframe/kz017a1yi7" />

**Configurable Response Elements**

Users can configure four data elements for each global response:

* **Response text**: The text of the response (required)
* **Folder path**: The hierarchy that dictates where the response resides
* **Title**: The short-form title of the response
* **Metadata filters**: A key and value used to specify the set of conversations for which a response is available

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-1260d78d-5635-43c9-a4a3-e2bb201a511d.png" />
</Frame>

**Saving and Deploying**

Saving changes to the global response list or uploading a new list creates a new version. Past versions can also be viewed and restored as needed.

The global response list can be easily deployed into testing or production environments, with an indicator at the top of each version showing the status of the response list (e.g. Live in production).

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-aeb37fd0-b374-4ffd-7cc1-35cf8f7fa4d8.png" />
</Frame>

Visit the [Tooling Guide](/autocompose/autocompose-tooling-guide "AutoCompose Tooling Guide") for more information on using AI-Console to manage the AutoCompose global response list.

## FAQs

1. **How do you access AutoCompose in AI-Console?**

   Provided that you have permission to access AutoCompose in AI-Console, it will appear in the AI Services section of your homepage.
   To access AutoCompose from any other AI-Console page, select the menu icon in the top left corner and then select AutoCompose.

2. **How does response metadata work?**

   AutoCompose uses response metadata in two main ways:

   * **As a data insert:** Variable metadata such as customer name or time of day is dynamically inserted into templated response text when a suggestion is made to the agent. Read more about templated responses in the AutoCompose Product Guide Features
   * **As a filter:** Responses are only made available for suggestion when the conversation's metadata matches the attribute set for a given response (e.g. a response only being available when `queue` = `general`).

   <Note>
     Agent first name, customer first name and time of day inserts are available by default. Consult your ASAPP account team for assistance with adding metadata for use as an insert or a filter.
   </Note>

3. **How can I search the list for specific responses?**

   There is a search bar to look up specific words from response text. Dropdown menus can also be used to filter by folder path and metadata filter.


# AutoCompose Product Guide
Source: https://docs.asapp.com/autocompose/product-guide

Learn more about the features and insights of AutoCompose

## Getting Started

This page provides an overview of the features and functionalities in AutoCompose.

After AutoCompose is integrated into your applications, you can use its features to scale up your agent responses.

<Note>
  The following UI descriptions are examples of AutoCompose Integrations with LivePerson and Salesforce.
  API-based integrations do not include custom UIs.
</Note>

### Suggestions

AutoCompose supports agents throughout the conversation with both complete response suggestions before they type and suggestions while typing to complete their sentence.

The machine learning models powering AutoCompose suggestions use the entire conversation context (not just the last few responses) and personal agent response history to predict the most likely next agent message or phrase in the conversation.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-646b67c6-650e-2baf-b18b-31cb81ba966a.png" />
</Frame>

### Response Library

AutoCompose suggests responses from a library curated from a wide range of domain-specific conversation topics. The response library is a combination of three lists:

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-2ee5ac6b-e459-ad20-3eea-939ce44e089a.png" />
</Frame>

1. **Global response list:** Messages created and maintained by program administrators available to a designated full agent population.
2. **Custom response list:** Messages created and maintained directly in AutoCompose by individual agents; only available to the agent that created the message.
3. **Organically growing response list:** Messages automatically created by ASAPP for each agent based on their most commonly used messages that do not already exist in the global response list or the agent's curated custom response list.

<Tip>
  Agents use custom responses to make their favorite messages readily available for sending quickly: well-honed explanations for difficult processes and concepts, discovery questions, personal anecdotes, and greetings and farewells infused with their personal style.  Agents often curate their custom responses based on global responses, with a bit of their own personal touch.
</Tip>

### Agent Interface

AutoCompose provides three complete response suggestions in the drawer above the composer both before typing begins and in the early stages of message composition; phrase completion suggestions are made directly in-line as more of a sentence is typed.

Agents can also search for a response in two places:

1. **Composer:** As agents type, they can choose to search for their typed text in the global response list to see the full list of related messages with that term.
   By typing `/` in the empty composer, agents can also browse their custom response library by using either the message text or title of the custom response as a search term.
   <Frame>
     <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-fa73a5df-bb23-2a08-2b79-beff50effdc8.png" />
   </Frame>
2. **Response panel:** In the response panel, agents can browse both the global and custom response lists, either using a folder hierarchy or with the provided search field.
   <Frame>
     <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-eb6d75f8-8a20-6bd2-66e2-8933fef91fe0.png" />
   </Frame>

<Note>
  The organically growing response list is not available for agents to browse - responses from this list only appear in suggestions.  Agents are encouraged to add these frequently used responses to their custom response list.
</Note>

### Autocomplete

Once the agent begins typing, AutoCompose provides two forms of autocomplete suggestions at different stages in the message composition:

* As the agent begins typing a message, complete response suggestions are available. At this point, the agent is in the early stages of composing their response and several potential complete response options are relevant.
* After several words are typed, a high-confidence phrase completion can be recommended in-line to help agents finish their already well-formed thought.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-4fc5f306-00fa-07a2-a43e-6b950b1bb065.png" />
</Frame>

Phrase completions are generated from common, high-frequency phrases used in each implementation's production conversations. AutoCompose only makes phrase suggestions when a sufficiently high-confidence phrase is available and only uses language found in the global and custom response library.

### Templated Responses

AutoCompose can dynamically insert metadata into designated templated responses in the global response list.

For example, a customer's first name can be automatically populated into this templated response: "Hi *\{name}*, how can I help you today?".

By default, AutoCompose supports inserting customer first name, agent first name and the customer's time of day (morning, afternoon, evening) into templated responses. Time of day can be set to a single zone or be dynamically determined for each conversation.

AutoCompose also supports inserting custom conversation-specific metadata passed to ASAPP. For more information on custom inserts, reach out to your ASAPP account team.

<Note>
  If the needed metadata is unavailable for a particular templated response (e.g. there is no customer name available), that response will not be suggested by AutoCompose.
</Note>

### Fluency and Profanity

**Fluency Boosting**

AutoCompose automatically corrects commonly misspelled words once the space bar is pressed following a given word.

Corrections are underlined in the composer for agent-awareness and can be undone if needed by hovering over the corrected word.

**Profanity Blocking**

AutoCompose checks for profanity in messages when the agent attempts to send the message. If any terms match ASAPP's profanity criteria, the message will not be sent and the agent will be informed.

## Customization

### Suggestion Model

The AutoCompose suggestion model functions as a custom recommendation service for each agent. The model references the global response list, a library of custom responses created by each agent, and also learns from each agent's unique production message-sending behaviors to surface the best responses.

### Global Response List

Prior to deployment, ASAPP can generate a domain-relevant global response list using representative historical conversations as an input. This is a highly recommended customization to ensure agents receive useful, relevant suggestions as early as possible.

<Note>
  If historical conversation data is unavailable prior to deploying AutoCompose, production conversations after deployment can be used to adapt the response list at a later date.
</Note>

| **Option**      | **Description**                                                                                            | **Requirements**                                                 |
| :-------------- | :--------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------- |
| Model-generated | Fully-custom global response list that extracts relevant terminology and sentences from real conversations | 200,000 historical transcripts to enable prior to implementation |

For more information on sending historical transcript files to ASAPP, see [Transmitting Data to ASAPP](/reporting/send-s3#historical-transcript-file-structure).

### Queue/Skill Response List Filtering

AutoCompose can filter the global response list by agent queue/skill for a given conversation. For example, a subset of responses appropriate only for sales conversations can be labeled to be removed from technical troubleshooting conversations.

Responses are labeled with applicable queue(s)/skill(s) and are unavailable for suggestion if their labels do not match the conversation.

| **Option**                                  | **Description**                                                                                              | **Requirements**                          |
| :------------------------------------------ | :----------------------------------------------------------------------------------------------------------- | :---------------------------------------- |
| Global Response List with filter attributes | Global responses are labeled with optional attributes for skills for which they are exclusively appropriate. | Review and labeling of specific responses |

<Tip>
  For technical information about implementing this service, refer to the deployment guides for AutoCompose:

  * [AutoCompose API](/autocompose/deploying-autocompose-api "Deploying AutoCompose API")
  * [AutoCompose for LivePerson](/autocompose/deploying-autocompose-for-liveperson "Deploying AutoCompose for LivePerson")
  * [AutoCompose for Salesforce](/autocompose/deploying-autocompose-for-salesforce "Deploying AutoCompose for Salesforce")
</Tip>

## Use Cases

### For Improved Agent Productivity

**Challenge**

Agents spend a lot of time manually crafting responses to similar customer problems.  Using scripts can make the conversation sound robotic, so agents who do use canned responses spend a lot of time adjusting the language to sound more like them or use them too rarely to impact their response time or ability to handle multiple conversations concurrently.

Average response crafting time and messaging concurrency, even with canned response library usage, remains high for most digital messaging programs.

**Using AutoCompose**

AutoCompose drastically reduces crafting time by not only serving up response suggestions from a much more exhaustive set of responses, but it also addresses the problem of canned responses sounding overly generic by empowering agents to craft messaging in their personal style.

This is why adoption, and therefore efficiency gains overall, are so impressive when AutoCompose is deployed.

### For CX Quality and Consistency

**Challenge**

Agents have a lot of information to learn to become domain experts and are often handling issues with which they have limited experience or that they have trouble recalling the best way to handle.

Many companies use a variety of resources that agents have to search through to find answers on how to best handle a customer's problem.  This can be difficult for an agent to juggle while in a live conversation, especially if they are unsure where to begin their search.

**Using AutoCompose**

AutoCompose learns from the global population of agents over time, which is incredibly useful to newer agents or agents who are beginning to handle conversation in a newer domain.

While the model may not initially have much indication on language that a particular agent likes to use, it naturally adapts to this by surfacing up suggestions from the global response list and global history of how similar conversations have been handled in the past.  This helps ensure that agents follow consistent behaviors when handling issues that they are less certain about.

## FAQs

### Model Improvement

**How does the suggestion model improve over time?**

The model is automatically trained weekly on the latest historical data, informed by agent interactions with AutoCompose at given moments of conversations. As more situational agent behaviors are observed, better response suggestions are surfaced at more relevant points in the conversation.

**Does the model adapt to topics not seen before?**

As a baseline, models are able to make inferences about what existing responses are most relevant even if the topic is new.

**Do new topics require new entries to be added to the global response list?**

Major new topics are best handled by updating the global response list with appropriate responses. If, for example, you want to prepare for a new product launch, our recommendation is to make additions and edits to the global response list in advance, then upload on the day of the launch.

Our models will immediately start making suggestions from the updated response list. As more agents use the system, the models will become even smarter at identifying when these new responses should be suggested.4.

### Response Lists

**How is the global response list updated?**

AI-Console gives program administrators full control to make targeted or bulk updates to the global response list and manage deployments of those changes. Once deployed to production, response list changes are immediately available to agents.

For more information, refer to the [AutoCompose Tooling Guide](/autocompose/autocompose-tooling-guide "AutoCompose Tooling Guide").

**Does the global response list change automatically?**

The global response list does not automatically update. It is managed exclusively by product owners for a given implementation.

The organically growing list of commonly used responses updates automatically without need for manual updates.

**What is the difference between the global and custom response list?**

The global response list is managed by center leadership and contains a comprehensive list of responses available across the agent population. This list is intended to be the recommended wording for responding to customers.

The custom response list is managed by each agent and is exclusively accessible to them. Responses in the custom response list are suggested by AutoCompose alongside entries in the global response list. Like the global response list, the custom response list also supports a folder structure and can be manually searched by the agent.

**Does the suggestion model act differently from one agent to the next?**

The suggestion model uses the agent's live conversation context and uses agent-specific response from both the custom response list and the organically-growing response list. AutoCompose suggestion models are not unique to each agent, but have different inputs and potential responses that personalize their experience.

**Can the global response list be customized by queue/skill?**

Yes. When the global response list is being created or edited, ASAPP can add metadata to specific responses that make them eligible for specific queues or skills, and ineligible for suggestions for all others.
For example, a set of 40 responses may only be applicable for an escalation queue, and be tagged such that they don't appear as suggestions in any conversation that appears in another queue.


# AutoSummary
Source: https://docs.asapp.com/autosummary

Use AutoSummary to extract insights and data from your conversations

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/autosummary/autosummary-home.png" />
</Frame>

AutoSummary provides a set of APIs to enable you to extract insights from the wealth of data generated when your agents talk to your customers.

AutoSummary insights are powered by ASAPP's Generative AI (LLMs). Organizations use these insights to identify custom data, intents, topics, entities, sentiment drivers, and other structured data from every voice or chat (message) interaction between a customer and an agent.

AutoSummary can be customized to your specific use cases such as workflows optimizations, trade confirmations, compliance monitoring and quality assurance etc.

## Insights and Data

With AutoSummary, you can extract the following information:

| Insight                                             | Description                                                                                                                                                                                                                                                                                                                                             | This enables you to                                                                                                                                                                                                                                                              |
| :-------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Free text summary](/autosummary/free-text-summary) | Generates a concise text summary of each conversation                                                                                                                                                                                                                                                                                                   | <ul><li>Reduces average handle time by eliminating post-call summarization.</li><li>Improves customer experience by allowing agents to focus on customers.</li></ul>                                                                                                             |
| [Intents](/autosummary/intent)                      | Identifies the topic-level categorization of the customer's primary issue or question                                                                                                                                                                                                                                                                   | <ul><li>Optimizes operations by analyzing contact reasons.</li><li>Improves customer experience through better conversation routing.​</li></ul>                                                                                                                                  |
| [Structured Data](/autosummary/structured-data)     | ​Extract specific, customizable data points from a conversation:​<ul><li>Question: Answers to predefined queries (e.g., "Was the customer issue resolved?", "Did the agent follow the script?")</li><li>Entities: Key information said in the conversation such as claim numbers, account details, approval dates, monetary amount, and more.</li></ul> | <ul><li>Automates data collection for analytics and reporting.</li><li> Facilitates compliance monitoring and quality assurance</li><li>Enables rapid population of CRMs and other business tools</li><li>Supports data-driven decision making and process improvement</li></ul> |

## Customizable

AutoSummary is designed to be highly customizable to meet your specific business needs:

* **Free Text Summaries and Intents**: Train these features on your historical conversation data for optimal performance.
* **Structured Data**:
  * **Questions**: You have full control over the questions asked. Define any yes/no questions relevant to your business processes or compliance needs.
  * **Entities**: Configure the system to extract specific data points that matter most to your organization.

This level of customization ensures that AutoSummary provides precisely the insights you need for your unique use cases.

## Implementation

AutoSummary requires conversation transcripts to evaluatge. You have multiple methods available to provide transcripts:

* API (Real-Time): Use the conversation API to upload conversations. This approach is addressed in the Getting Started.
* [Batched Files](/autosummary/batch): Upload the conversation transcripts or audio via S3 or SFTP.
* [AutoTranscribe (speech-to-text service)](/autotranscribe): Use ASAPP's AutoTranscribe  to transcribe your phone calls.
* [Salesforce plugin (for free text summaries only)](/autosummary/salesforce-plugin): If using Salesforce Chat, install our plugin to automatically handle the API interactions. Only free text summary supported.

<Card title="Getting Started" href="autosummary/getting-started" horizontal="true" icon={<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M14.82 3H19C20.1 3 21 3.9 21 5V19C21 20.1 20.1 21 19 21H5C4.86 21 4.73 20.99 4.6 20.97C4.21 20.89 3.86 20.69 3.59 20.42C3.41 20.23 3.26 20.02 3.16 19.78C3.06 19.54 3 19.27 3 19V5C3 4.72 3.06 4.46 3.16 4.23C3.26 3.99 3.41 3.77 3.59 3.59C3.86 3.32 4.21 3.12 4.6 3.04C4.73 3.01 4.86 3 5 3H9.18H14.82ZM17 7H7V9H17V7ZM7 11H17V13H7V11ZM7 15H14V17H7V15ZM5 19H19V5H5V19Z" fill="#8056B0"/></svg>}> Learn how to start using AutoSummary</Card>


# Example Use Cases
Source: https://docs.asapp.com/autosummary/example-use-cases

See examples on how AutoSummary can be used

AutoSummary can be applied to various industries and use cases. This section provides examples of how AutoSummary can be implemented to solve specific business challenges.

Each use case includes a brief overview, key components, and a high-level architecture diagram.

## Regulatory Compliance Monitoring

AutoSummary can be used to automatically flag customer conversations that trigger regulatory compliance requirements, such as Regulation Z (Truth in Lending Act) and Regulation E (Electronic Funds Transfer Act) in the financial services industry.

| Industry           | Category   | AutoSummary Features                                                        |
| :----------------- | :--------- | :-------------------------------------------------------------------------- |
| Financial Services | Compliance | <ul><li>Structured Data extraction </li><li>Intent identification</li></ul> |

### Implementation

1. Configure Structured Data extraction to identify key compliance-related information (e.g., loan terms, electronic fund transfer details).
2. Set up Intent identification to categorize conversations related to the compliance information.
3. Integrate with existing call center software for real-time or batch processing.
4. Connect outputs to risk management systems for review and reporting.

### Architecture

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/autosummary/reg-compliance.png" />
</Frame>

## Real-time Product Quality Monitoring (Retail, Telecommunications)

AutoSummary can generate free-text summaries of customer complaints about product quality, allowing for real-time identification of defects and issues. This could be data such as specific products, complaint or issue types.

| Industry                  | Category          | AutoSummary Features |
| :------------------------ | :---------------- | :------------------- |
| Retail Telecommunications | Quality Assurance | Entity Extraction    |

### Implementation

1. Configure Entity Extraction to identify product names and specific defect or issue descriptions.
2. Integrate with call center software for real-time processing.
3. Connect outputs to business intelligence systems for analysis and reporting.

### Architecture

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/autosummary/product-quality.png" />
</Frame>

## Automated Call Wrap-up (Multiple Industries)

AutoSummary can automate the process of summarizing customer interactions, eliminating the need for manual note-taking by agents and providing consistent, high-quality call summaries.

The summary and specific data elements can be directly inserted into your contact center or CRM tool to remove manual steps.

| Industry                                                                                                       | Category                                                            | AutoSummary Features                                                                                                  |
| :------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------ | :-------------------------------------------------------------------------------------------------------------------- |
| <ul><li>Retail </li><li>Telco </li><li>Insurance Travel </li><li>Financial Services </li><li>\*Any\*</li></ul> | <ul><li>Call Center Operations </li><li>Quality Assurance</li></ul> | <ul><li>Free Text Summary generation</li><li>Targeted Structured Data (Questions)</li><li>Entity Extraction</li></ul> |

### Implementation

1. Set up Free Text Summary to generate comprehensive call summaries.
2. Configure Targeted Structured Data to answer key questions (e.g., "Was the customer's issue resolved?", "Were any follow-up actions required?").
3. Set up API connections to populate summaries into CRM or agent desktop applications.
4. Implement quality assurance processes to validate summary accuracy.

### Architecture

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/autosummary/call-wrap-up.png" />
</Frame>

## Trade Confirmations (Financial Services)

AutoSummary can be used to ensure compliance with financial regulations like FINRA by automatically verifying if agents have confirmed trade details with customers before entering orders into the system. Structured Data can be use to extract price, type of order, the security being bought or sold, etc.

| Industry           | Category   | AutoSummary Features |
| :----------------- | :--------- | :------------------- |
| Financial Services | Compliance | Entity Extraction    |

### Implementation

1. Configure Structured Data extraction to identify order type, security name/symbol, quantity, and price.
2. Set up Entity Extraction to capture customer account numbers and trade confirmation phrases.
3. Integrate with trading platforms for real-time verification.
4. Implement alerting system for non-compliant trade confirmations.

### Architecture

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/autosummary/trade-confirmations.png" />
</Frame>


# AutoSummary Feature Releases
Source: https://docs.asapp.com/autosummary/feature-releases



| Feature Name                                          | Feature Release Details                                                                                                                                                                                                       | Additional Relevant Information (if available) |
| :---------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------- |
| **Feedback**                                          | [Feedback for AutoSummary](/autosummary/feature-releases/feedback-for-autosummary "Feedback for AutoSummary")                                                                                                                 |                                                |
| **3R Breakdown**                                      | [3R Breakdown for Free-Text Summaries](/autosummary/feature-releases/3r-breakdown-for-autosummary "3R Breakdown for AutoSummary")                                                                                             |                                                |
| **Sandbox**                                           | [Sandbox for AutoSummary](/autosummary/feature-releases/sandbox-for-autosummary "Sandbox for AutoSummary")                                                                                                                    | Accessed via AI-Console                        |
| **Salesforce Integration**                            | [AutoSummary for Salesforce](/autosummary/feature-releases/autosummary-for-salesforce "AutoSummary for Salesforce")                                                                                                           |                                                |
| **Free-Text and Feedback Feeds for AutoSummary**      | [Free-Text and Feedback Feeds for AutoSummary](/autosummary/feature-releases/free-text-and-feedback-feeds-for-autosummary "Free-Text and Feedback Feeds for AutoSummary")                                                     |                                                |
| **Added single\_intent to conversation state export** | [ASAPP - Auto Summary - adding single\_intent to conversation state export.pdf](https://docs-sdk.asapp.com/product_features/ASAPP%20-%20Auto%20Summary%20-%20adding%20single_intent%20to%20conversation%20state%20export.pdf) |                                                |
| **Entity Extraction**                                 | [AutoSummary Entity Extraction](/autosummary/feature-releases/autosummary-entity-extraction "AutoSummary Entity Extraction")                                                                                                  |                                                |
| **Intents Self Service Tooling**                      | [Intents Self Service Tooling](/autosummary/feature-releases/intents-self-service-tooling "Intents Self Service Tooling")                                                                                                     |                                                |


# 3R Breakdown for AutoSummary
Source: https://docs.asapp.com/autosummary/feature-releases/3r-breakdown-for-autosummary



## Feature Release

This is an announcement for an upcoming ASAPP feature. Your ASAPP account team will provide a target release date and can direct you to more detailed information as needed.

## Overview

This update to AutoSummary organizes free-text conversation summaries using the "3R's":

* **Reason** for contact
* **Resolution** process
* **Result** of the interaction

## Use and Impact

This enhancement to AutoSummary supports the same use cases and situations as the current free-text summaries.

It is expected that grouping summary sentences by the "3Rs" will reduce the cognitive load for end-users when reading historical disposition notes.

## How It Works

Free-text summary sentences retrieved by AutoSummary will be grouped into **reason**, **resolution**, and **result**, with the beginning of each group denoted by the name of that group.

**Comparison of Free-text Summaries to 3R Summaries**

| Free-text Summary                                                                                                                                                                                                                                                                                                                 | Free-text Summary with 3R Breakdown                                                                                                                                                                                                                                                                                                                           |
| :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Customer called in to cancel an account. Agent informed the customer that the account was for a business account. Agent explained that they did not have the correct account information and requested that the customer verify it. Agent provided the business department phone number.                                          | Reason: Customer called in to cancel an account. Resolution: Agent informed the customer that the account was for a business account. Agent explained that they did not have the correct account information and requested that the customer verify it. Result: Agent provided the business department phone number.                                          |
| Customer called in to switch their phone plan from the unlimited plan to the starter plan. Agent informed the customer that there would be a two-day proration charge for the change. Agent adjusted the plan for the customer and informed them of their new monthly charge. Agent transferred the customer to the Starter plan. | Reason: Customer called in to switch their phone plan from the unlimited plan to the starter plan. Resolution: Agent informed the customer that there would be a two-day proration charge for the change. Agent adjusted the plan for the customer and informed them of their new monthly charge. Result: Agent transferred the customer to the Starter plan. |

**On/Off Configuration**

The 3R Breakdown enhancement to AutoSummary can be configured to be ON or OFF. Customers who don't want this breakdown can continue receiving the consolidated paragraph that excludes reason, resolution, and result labeling.

## FAQs

1. **Do I need to make any changes on my integration with AutoSummary?**

   No. This feature doesn't modify API specs so it should work with your current integration. What's changing is the content of the summary, which will now come with "R" labels at the beginning of each "R" group.

2. **What happens if there are multiple intents, i.e. multiple reasons for contact?**

   There will be a single "Reason" group that will contain the summary sentences corresponding to those multiple intents. The resolution and result of each of those intents will live in the "Resolution" and "Result" groups. The order of the summary sentences will be determined by the chronology of events.

3. **Should we expect to see the three groups in every summary?**

   No, for 3 reasons:

   * Not all conversations contain the 3Rs (e.g. ghost customer, abrupt ending, wrong queue, etc.)
   * Often times the "Result" is implicit (or explicit) in the "Resolution"
   * Machine Learning is not perfect. The model might miss the summary sentences of a category and/or miscategorize summary sentences

4. **Can we provide a structure/grouping different from the 3R one (e.g., STAR framework, 4 whys)?**

   No. At present, the 3R breakdown is the only framework available.

5. **Can I assume that this particular response structure will be supported indefinitely? (So I could leverage the 3R format, for example, by extracting the Reason(s) for contact?)**

   No. ASAPP reserves the right to change the presentation of the AutoSummary output within the constraints of the API definition. You should treat the output as free-text.


# AutoSummary Entity Extraction
Source: https://docs.asapp.com/autosummary/feature-releases/autosummary-entity-extraction



## Feature Release

This is the announcement for an upcoming ASAPP feature. Your ASAPP account team will provide a target release date and can direct you to more detailed information as needed.

## Overview

AutoSummary is being extended with a new feature, Entity Extraction.

The entity extraction feature identifies and extracts key entities---such as Product names, dates, \$ amounts, competitor names---from the conversations and text. The feature is designed to enhance data retrieval and Targeted, custom analytics for downstream use and to optimize operations.

This feature is fully customizable. Customers can request the extraction of specific keywords tailored to their domain and line of business, enabling the extraction of a wide range of insights from conversations.

## Use and Impact

Users need the flexibility to target and extract analytics for downstream use and to optimize operations, and these data points differ across companies and over time. Entity extraction can be useful in several key use cases:

* **Quick Information Retrieval**: Agents can quickly extract critical information such as order numbers, \$ amount, competitor name and product details from conversations, improving response times and customer satisfaction.
* **Insight Extraction**: Agents can extract specific keywords and entities from large volumes of text, facilitating detailed reporting, trends and patterns that inform decision-making.

The Entity Extraction feature aims to deliver significant benefits to the enterprises:

* **Faster Information Retrieval (after-call wrap time)**: By automatically extracting key entities from conversations, users can quickly locate relevant information without manually sifting through chat/conversation.
* **Informed Actions**: With quick access to important elements of a conversation, users can make more informed decisions, leading to better outcomes in customer support

## How it Works

When agents finish a conversation, AutoSummary analyzes the conversations, and extracts key entities for insights which are relevant to the conversation. These key entities can be retrieved via the Entities API, or within the Conversation Explorer.

Work with your ASAPP team to configure the entities you want to extract. ASAPP also provides a number of common out of the box entities that you may use or modify from.

Some examples of the types of questions you could ask:

* Date mentioned by the customer as the start of the issue
* The type of product the call described (e.g. iPhone vs Android)
* \$ amounts that are important to the issue
* Last-four digits of the account number (if not redacted in the transcript)
* A competitor name

This upgrade comes with no changes to the API specs; Work with your ASAPP team to configure the same both custom and default entities that you want to enable.

Below are the example to be provided to get the entities enabled

* **Entity name**: 'Product'
* **Description**: The product that customer is talking about
* **Example (Product Name)**: 'Nike Dunk Low Retro'

## FAQs

1. **Can I customize the entities that are extracted?**

   Yes, you can customize the feature to extract specific keywords and entities relevant to your domain and business needs, ensuring the extracted data is tailored to your unique requirements.

2. **How do you keep the entities up to date?**

   Entities are kept up to date through a combination of automated updates and user feedback on a regular interval.


# AutoSummary for Salesforce
Source: https://docs.asapp.com/autosummary/feature-releases/autosummary-for-salesforce



## Feature Release

This is the announcement for an upcoming ASAPP feature. Your ASAPP account team will provide a target release date and can direct you to more detailed information as needed.

## Overview

ASAPP is extending our existing native plug-in for Salesforce to enable rapid implementations of AutoSummary. With this plug-in, Salesforce administrators will be able to install AutoSummary to their Salesforce organization and centrally configure the distribution of summaries into Lightning.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-4973dbae-72a6-597a-2126-759bb3fb3df8.png" />
</Frame>

## Use and Impact

For contact centers that use Salesforce Service Cloud Lightning, the AutoSummary plug-in is a low-code, rapid implementation option. Administrators can complete set up in hours and quickly deploy summarization capabilities in their production workflows without resource-intensive integration work.

With AutoSummary enabled, agents no longer need to take extensive notes summarizing events during the call.

A free-text summary is sent to a Salesforce field to be saved automatically the conversation record.

<Note>
  AutoSummary works seamlessly alongside ASAPP's AutoCompose for Salesforce.
</Note>

## How It Works

Watch the video below for an overview on AutoSummary for Salesforce:

<iframe width="560" height="315" allow="fullscreen *" src="https://fast.wistia.net/embed/iframe/4g7sfy7qg1" />

**Configuration**

Upon installing the AutoSummary package, administrators can select the user profiles for whom AutoSummary should be enabled.

**Agent Experience**

Once a call ends, AutoSummary will immediately generate a free-text summary and insert it into the pre-specified object field configured in the Service Console. Free-text summaries will appear as a set of sentences that describe key events during the conversation.

<Note>
  Summaries can be configured to include labels for sentences to indicate which correspond to the reason for contact, resolution steps taken by the agent, and result of the conversation. Reach out to your ASAPP account team to configure this.
</Note>

Any edits to the summary content by an agent will be tracked by ASAPP and used to improve future summary quality.

## FAQs

1. **Does ASAPP insert an AutoSummary UI component to the agent experience as part of this plug-in?**

   The AutoSummary plug-in only inserts a free-text summary in a designated field. There is no dedicated UI component provided by ASAPP.

2. **How does this plug-in work alongside ASAPP's AutoCompose for Salesforce?**

   Both services are enabled using the same install package provided by ASAPP.

   The AutoCompose Salesforce plug-in is fully compatible with AutoSummary - AutoCompose provides a separate dedicated UI component in the Lightning agent experience.


# AutoSummary in Conversation Explorer
Source: https://docs.asapp.com/autosummary/feature-releases/autosummary-in-conversation-explorer



## Feature Release

This is the announcement for an upcoming ASAPP feature. Your ASAPP account team will provide a target release date and can direct you to more detailed information as needed.

## Overview

Conversation Explorer is being enhanced to include the AutoSummary features of free text summaries and Structured Data.

This improves the effectiveness of Conversation Explorer providing a central place to understand and gain insights about your agents' conversations.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-019df139-213a-8348-4a1c-b4dbd9f8ffb7.png" />
</Frame>

*The Conversation Explorer showing the summary tab.*

## Use and Impact

Reviewing and understanding your agent's conversation is a central task in running a successful contact center. Your administrators and supervisors can use the conversation explorer as the central place to review conversations.

This also enables you to see the observations from AutoSummary products independent of an API integration, giving you insights immediately while you build out a robust integration to AutoSummary's APIs.

## How It Works

When navigating conversation explorer, users have two new tabs:

* **Summary tab**
* **Structured Data tab**

### Summary tab

The Summary tab shows the free text summary from AutoSummary as a list of bullet points. The notes are the additional notes that agents added to the conversation.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-32f4994c-17d4-18aa-80d4-6bc10ed8d06c.png" />
</Frame>

### Structured Data tab

The Structured Data tab shows the Structured Data from the conversation.

Structured Data are the information and insights you want extracted from the conversation. Initially, this only supports information that can be represented as yes or no.

<Note>
  Work with your ASAPP account team if you haven't previously defined Structured Data.
</Note>

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-591ab46f-0bb9-ed97-1a88-42b48eb8505f.png" />
</Frame>


# Feedback for AutoSummary
Source: https://docs.asapp.com/autosummary/feature-releases/feedback-for-autosummary



## Feature Release

This is the announcement for an upcoming ASAPP feature. Your ASAPP account team will provide a target release date and can direct you to more detailed information as needed.

## Overview

AutoSummary now supports model retraining using agent feedback. The feedback endpoint receives free-text paragraph summaries submitted by agents, and uses the difference between the automatically generated summary and the final submission to improve the model over time.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-db6d12ed-a88a-17bb-5e75-afef51ab48df.png" />
</Frame>

## Use and Impact

In agent workflows that expose an automatically generated summary for final review, agents may make edits to incorporate uncaptured nuances or correct details where needed. Rather than losing this valuable edit data, AutoSummary can now incorporate it into a feedback loop to improve the quality of the model.

The feedback endpoint can also be used to accept edited summaries that are reviewed in quality assurance workflows.

Standardizing the format and mechanism for receiving feedback facilitates ongoing model retraining that leads to improvements in...

1. Error reduction
2. Coverage of key topics

## How It Works

A summary identifier field is being added to free-text summary responses. This new field should be used in requests to the feedback endpoint.

**Free-Text Summary ID**

The GET endpoint for free-text summaries will be updated with an additional response field called `summaryId` . This field must be included in requests to the feedback endpoint to identify the summary for which you are providing feedback.

**Feedback Request Format**

The request body for the new feedback POST endpoint requires the following:

* Conversation identifier
* Summary identifier (as mentioned above)
* Final free-text summary submitted by the agent

## FAQs

1. **Is it mandatory or optional to use the AutoSummary feedback endpoint?**

   For implementations of AutoSummary that give agents the ability to edit summaries, ASAPP strongly recommends using the feedback endpoint to improve summaries over time. Anecdotal feedback from the field is considerably less useful for making model improvements.

   For implementations of AutoSummary that do not give agents the ability to edit summaries, there is no need to use the feedback endpoint.

2. **Will the feedback endpoint accept free-text summaries that are not edited?**

   Yes. For simplicity, ASAPP recommends sending all summaries that agents or other end-users have reviewed and submitted, even if the reviewed summaries are identical to the automatically generated summaries. AutoSummary will detect edits and use them for model training.

3. **How does automatic model retraining work?**

   AutoSummary continuously collects feedback from each conversation, identifying which submitted summaries contain edits from the initially generated summary.

   These edits represent signals that AutoSummary models can use to adjust outputted text to better represent key events in the conversation.


# Free-Text and Feedback Feeds for AutoSummary
Source: https://docs.asapp.com/autosummary/feature-releases/free-text-and-feedback-feeds-for-autosummary



## Feature Release

This is the announcement for an upcoming ASAPP feature. Your ASAPP account team will provide a target release date and can direct you to more detailed information as needed.

## Overview

ASAPP introduces two feeds to retrieve data for free-text summaries generated by AutoSummary and edited versions of summaries submitted by agents as feedback.

## Use and Impact

These two feeds enable administrators to retrieve AutoSummary data using the File Explorer API:

* **Free-text feed**: Retrieves data from free-text summaries generated by AutoSummary. This feed has one record per free-text summary produced and can have multiple summaries per conversation.
* **Feedback feed**:  Retrieves data from feedback summaries submitted by the agents. This feed contains the text of the feedback submitted by the agent. Developers can join this feed to the AutoSummary free-text feed using the summary ID.

## How It Works

Watch the following video walkthrough to learn about the Free-Text and Feedback feeds:

<iframe width="560" height="315" allow="fullscreen *" src="https://fast.wistia.net/embed/iframe/p7ejx6f8xv" />

Developers can access these feeds using the [File Exporter API](/reporting/file-exporter)

Besides the standard fields common to all AI Services feeds: `agent_id`, `company_marker`, `conversation_id`, `dt`, `external_conversation_id`, `hr`, and `instance_ts`; each feed returns specific data:

### autosummary\_free\_text Feed

| Field                                | Description                                                                                      |
| :----------------------------------- | :----------------------------------------------------------------------------------------------- |
| autosummary\_free\_text\_ts          | The timestamp of when the free-text summary was emitted.                                         |
| autosummary\_free\_text              | The text of the unedited free-text summary.                                                      |
| is\_autosummary\_feedback\_used      | A numeric true/false indicator of whether the agent submitted the free-text summary as feedback. |
| is\_autosummary\_feedback\_edited    | A numeric true/false indicator of whether the agent edited the free-text summary.                |
| autosummary\_free\_text\_length      | A count of how many characters are in the free-text summary.                                     |
| autosummary\_feedback\_length        | A count of how many characters are in the free-text summary edited by the agent.                 |
| autosummary\_levenshtein\_difference | The Levenshtein edit distances between the free-text summary and feedback summary.               |
| summary\_id                          | Unique identifier for AutoSummary feedback and free-text summary events.                         |

### autosummary\_feedback Feed

| Field                     | Description                                                                                             |
| :------------------------ | :------------------------------------------------------------------------------------------------------ |
| autosummary\_feedback\_ts | The timestamp of the *autosummary\_feedback\_summary* event.                                            |
| autosummary\_feedback     | Text submitted by agent, inclusive of any edits made to the free-text summary generated by AutoSummary. |
| summary\_id               | Unique identifier for AutoSummary feedback and free-text summary events.                                |

## FAQs

1. **What is the difference between summary data provided in the conversation state feed (`staging_conversation_state`) and these new AutoSummary feeds?**

   The conversation state feed only provides the last summary of each conversation. These two feeds provide every summary.

2. **Is something changing about the way AutoSummary provides data?**

   No. Responses from the API haven't changed.


# Health Check API
Source: https://docs.asapp.com/autosummary/feature-releases/health-check-api



## Feature Release

This is the announcement for an upcoming ASAPP feature. Your ASAPP account team will provide a target release date and can direct you to more detailed information as needed.

## Overview

ASAPP provides a means for our customers to check the operational status of our API platform. Developers can ping this endpoint to verify that the ASAPP infrastructure is working as expected.

## Use and Impact

Developers can either check ad hoc if the ASAPP infrastructure is up at a given time or implement automated API monitoring to send a request to the Health Check API at a preset interval.

This feature is intended to improve developer confidence when integrating with ASAPP services. It also removes the need for developers to send requests to other ASAPP services to check their status, which may trigger errors unnecessarily.

## How It Works

Developers can run a `GET https://api.sandbox.asapp.com/v1/health` operation and inspect for a 200 response with either the SUCCESS or FAILED value for the status of the core ASAPP platform.

**Configuration**

Developers must request access to the API endpoint in the Developer Portal:

1. Access the Developer Portal.
2. Navigate to **Apps**, select your application, and authorize the Health Check API.
3. Reach out to your ASAPP account team to authorize access.


# Intents Self Service Tooling
Source: https://docs.asapp.com/autosummary/feature-releases/intents-self-service-tooling



## Feature Release

This is the announcement for an upcoming ASAPP feature. Your ASAPP account team will provide a target release date and can direct you to more detailed information as needed.

## Overview

The Intents Self Service user-interface tool, integrated within ASAPP's AI Console, streamlines the onboarding and maintenance process of intent classification for customers.

This automated, self-serve interface enables users to easily upload, create or modify intent labels, ensuring a seamless onboarding experience and ease of updating the system to meet new business needs without requiring support team intervention.

## Use and Impact

Many customers are interested in providing intent labels hierarchy information before or during onboarding and want to see results via a frontend (UI) tool. Addressing this issue will streamline the onboarding process for intents and facilitates faster feedback loops.

In addition, customers interested in updating their intent labels to meet new requirements (for example, add new labels, consolidate multiple intents together or create finer-grained intents) can do so themselves.

Intent self-serve tooling achieves a fully automated intent on-boarding experience via leveraging GenAI (LLMs) models. Below are the goals to be achieved with the feature:

* Achieve the customer onboarding Time of 0 days
* Provide a Self-serving front-end tooling to customers to upload and update the intent labels
* Develop a real-time Intent classification deployment pipeline leveraging LLMs
* Update the intent labels with the ability to deploy to production within minutes

## How It Works

This service is built on a front-end interface, no separate API configuration is required from the customers.

**Import Flow of Intents**

1. Upload a csv/text file with the intent details, Refer to the provided links in the guidelines to familiarize yourself with the required file format and the necessary information for intents.
2. Select the desired file and upload the file
   <Frame>
     <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-4c80b487-aa07-a23a-a020-a27ae2a93488.png" />
   </Frame>
3. Review selected file before deploying the intents
   <Frame>
     <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-37078cc3-3b9b-bd41-7aac-9490a84ad726.png" />
   </Frame>
4. Review and verify your uploaded intents
   <Frame>
     <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-d63f6c9b-2abf-f13e-338e-eb2339ddf187.png" />
   </Frame>

**Adding a new Intent to the hierarchy**

1. Review the existing Intent hierarchy and click 'New Intent' from the 'Add' button top right
   <Frame>
     <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-d63f6c9b-2abf-f13e-338e-eb2339ddf187.png" />
   </Frame>
2. Add intent details such as the intent label, parent intent, and description. Refer to sample file in case any further clarifications
   <Frame>
     <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-08197b0b-b683-317d-d378-c68c3110e42c.png" />
   </Frame>
3. Click on create intent to add the intent to the hierarchy
   <Frame>
     <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-25ed51d7-0442-1d32-2277-23d33bb97d1b.png" />
   </Frame>
4. Review and verify your created intent
   <Frame>
     <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-c6d88a6d-8ed7-b081-15da-70d53ed004a6.png" />
   </Frame>

## FAQs

* **What file formats are supported for uploading intents label hierarchy?**

  ASAPP's Intent Self-Serve tooling supports CSV and Excel file formats for uploading intents.

* **Can I edit or update my intents hierarchy after uploading?**

  Yes, the tooling functionality allows you to edit or update your intents at any time after uploading them, ensuring you can refine and improve your intent classification as needed.

* **Do I need to have technical expertise to use the Intent Self-Serve tooling?**

  No, intent front-end tooling is designed to be user-friendly, with no API configuration required. The intent labels can be easily uploaded, created, and managed without needing any technical assistance.


# Sandbox for AutoSummary
Source: https://docs.asapp.com/autosummary/feature-releases/sandbox-for-autosummary



## Feature Release

This is the announcement for an upcoming ASAPP feature. Your ASAPP account team will provide a target release date and can direct you to more detailed information as needed.

## Overview

With AutoSummary Sandbox, administrators can easily visualize free-text and structured summaries by uploading a conversation transcript or by simulating a conversation between an agent and a customer. Accessible through AI-Console, it's a playground designed to provide easy access to AutoSummary. The Sandbox supports voice conversations, powered by AutoTranscribe's real-time transcription, and messaging conversations.

<Frame caption="AutoSummary's intent and free-text summary generated in the Sandbox.">
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-99bc91b0-52d7-1a3a-29fe-820195a57fac.png" />
</Frame>

## Use and Impact

The AutoSummary Sandbox enables administrators to visualize summary results throughout their implementation journey with ASAPP.

**Initial Use**

When using AutoSummary Sandbox for the first time, results are produced from baseline ASAPP models that are designed for the contact center setting. At this stage, the Sandbox is useful to demonstrate summary formatting and how key events are brought into summaries.

**Custom-Trained Models**

Once ASAPP deploys AutoSummary custom-trained models, the Sandbox will generate summary outputs tuned for your business use case(s). At this stage, the Sandbox illustrates how the summary models will perform in production.

As model improvements are deployed going forward, the summaries produced through the AutoSummary Sandbox will reflect those improvements.

<Note>
  Free-text summary results are always available in the Sandbox. Intents and structured summary tags must be enabled in your environment in order for them to appear in the AutoSummary Sandbox.
</Note>

## How It Works

Watch the following video walkthrough to learn how to use the AutoSummary Sandbox:

<iframe width="560" height="315" allow="fullscreen *" src="https://fast.wistia.net/embed/iframe/oqtyu0glyz" />

The AutoSummary Sandbox supports both voice and messaging conversations. Voice conversations use AutoTranscribe in the background to provide real-time speech-to-text capabilities. There are two primary ways to start a conversation:

1. **Simulate a conversation**: Switch back and forth between a customer and an agent to simulate a contact center conversation.
2. **Upload a conversation**: Load a transcript describing a conversation between an agent and a customer.

Once a conversation has been loaded, users can generate a free-text summary by selecting fetch summary. When enabled, the summary will also include the intent and structured summary tags.

<Note>
  Unless your implementation already has a custom-trained AutoTranscribe model deployed, voice conversations in the Sandbox will be transcribed using a baseline model designed for contact center conversations.
</Note>

## FAQs

1. **Why am I not seeing the intent and structured summary tags when I request a summary?**

   ASAPP partners with you to develop an intent and structured summary model that is tailored for the needs of your business. This information will become accessible through the AutoSummary Sandbox once the intent and structured summary tags have been enabled.

2. **Is the AutoSummary Sandbox using the same sandbox environment we have access to?**

   Yes. Developers building an AutoSummary integration can use the AutoSummary Sandbox to easily create conversations and later retrieve them via the unique conversation ID available in the header of each conversation.


# Structured Data in AutoSummary
Source: https://docs.asapp.com/autosummary/feature-releases/structured-data-in-autosummary



## Feature Release

This is the announcement for an upcoming ASAPP feature. Your ASAPP account team will provide a target release date and can direct you to more detailed information as needed.

## Overview

AutoSummary is being extended with a new feature, Structured Data.

Structured Data enables you to extract information and insights from conversations in the form of yes/no answers.

This can help eliminate post-call work, reduce agent underreporting, and improve adherence to corporate policies.

<Frame caption="This is an image of the Structured Data as shown in the Conversation Explorer.">
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-591ab46f-0bb9-ed97-1a88-42b48eb8505f.png" />
</Frame>

## Use and Impact

Automatic evaluation of agent's conversations can be a challenge, Structured Data enables you to pull actionable insights from a conversation.

You can ask questions around Sales, Customer retention, Product Feedback, or whatever other topic. This allows Structured Data, to address any number of insights you may want extracted from a conversation.

## How It Works

When your agents finish a conversation, AutoSummary analyzes the conversations, and extracts a set of insights in the form of yes or no questions. These yes or nos can be retrieved via the Structured Data API, or within the Conversation Explorer.

Work with your ASAPP team to configure the yes and no questions you want answered. ASAPP also provides a number of common questions that you may use or modify from.

Some examples of the types of questions you could ask:

* Did promotions persuade customers to buy the service?
* Did the agent follow retention management procedures?
* Did the customer use offensive language?

Up to 20 yes or no questions can be answered from the conversation.


# Free text Summary
Source: https://docs.asapp.com/autosummary/free-text-summary

Generate conversation summaries with Free text summary

A Free text summary is a generated summary or description from a conversation.

AutoSummary generates high-quality, free-text summaries that are fully configurable in both format and content. You have the flexibility to include or exclude targeted elements based on your needs.

This eliminates the need for agents to take notes during, or after calls, and to minimize post-call forms.

## How it works

To help understand how free-text summary works, let's use an example conversation:

> **Agent**: Hello, thank you for contacting XYZ Insurance. How can I assist you today?\
> **Customer**: Hi, I want to check the status of my payout for my claim.\
> **Agent**: Sure, can you please provide me with the claim number?\
> **Customer**: It's H123456789.\
> **Agent**: Thank you. Could you also provide the last 4 digits of your account number?\
> **Customer**: 6789\
> **Agent**: Let me check the details for you. One moment, please.\
> **Agent**: I see that your claim was approved on June 10, 2024, for \$5000. The payout has been processed.\
> **Customer**: Great! When will I receive the money?\
> **Agent**: The payout will be credited to your account within 3-5 business days.\
> **Customer**: Perfect, thank you so much for your help.\
> **Agent**: You’re welcome! Is there anything else I can assist you with?\
> **Customer**: No, that's all. Have a nice day.\
> **Agent**: You too. Goodbye!

Each word in a paragraph summary is selected uniquely for a given conversation transcript, rather than using predefined tags. The paragraph incorporates language used by the customer and agent in order to create a faithful representation of what was discussed in the conversation.

<Info>Since the summary is generated, there may be minor variations in grammar if you repeatedly generate  summaries for the same conversation.</Info>

Here is an example summary generated from the above conversation:

> The customer inquired about the status of a payout for an approved claim. The agent confirmed that the claim was approved and the payout has been processed and will be credited within 3-5 business days.

For conversations that involve transfers or multiple agents, AutoSummary can generate summaries for both the entire multi-leg conversation and specific legs.

## Generate a free text summary

To generate a free text summary, provide the conversation transcript into ASAPP first.

This example uses our conversation API, but you have options to use AutoTranscribe or batch integration options.

### Step 1: Create a conversation

To create a **`conversation`**. Provide your Ids for the conversation and customer.

```javascript
curl -X POST 'https://api.sandbox.asapp.com/conversation/v1/conversations' \
--header 'asapp-api-id: <API KEY ID>' \
--header 'asapp-api-secret: <API TOKEN>' \
--header 'Content-Type: application/json' \
--data '{ 
  "externalId": "[Your id for the conversation]",
  "customer": {   
    "externalId": "[Your id for the customer]",
    "name": "customer name" 
  },
  "timestamp": "2024-01-23T11:42:42Z"
}'
```

A successfully created conversation returns a status code of 200 and a conversation Id.

### Step 2: Add messages

You need to add the messages for the conversation.

In this example, we are using the `/messages/batch` endpoint to add the whole example conversation.

```javascript
curl -X POST 'https://api.sandbox.asapp.com/conversation/v1/conversations/5544332211/messages/batch' \
--header 'asapp-api-id: <API KEY ID>' \
--header 'asapp-api-secret: <API TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
  "messages": [
    {
      "text": "Hello, thank you for contacting XYZ Insurance. How can I assist you today?",
      "sender": {"role": "agent", "externalId": "agent_1234"},
      "timestamp": "2024-09-09T10:00:00Z"
    },
    {
      "text": "Hi, I want to check the status of my payout for my claim.",
      "sender": {"role": "customer", "externalId": "cust_1234"},
      "timestamp": "2024-09-09T10:01:00Z"
    },
    {
      "text": "Sure, can you please provide me with the claim number?",
      "sender": {"role": "agent", "externalId": "agent_1234"},
      "timestamp": "2024-09-09T10:02:00Z"
    },
    {
      "text": "It\'s H123456789.",
      "sender": {"role": "customer", "externalId": "cust_1234"},
      "timestamp": "2024-09-09T10:03:00Z"
    },
    {
      "text": "Thank you. Could you also provide the last 4 digits of your account number?",
      "sender": {"role": "agent", "externalId": "agent_1234"},
      "timestamp": "2024-09-09T10:04:00Z"
    },
    {
      "text": "****",
      "sender": {"role": "customer", "externalId": "cust_1234"},
      "timestamp": "2024-09-09T10:05:00Z"
    },
    {
      "text": "Let me check the details for you. One moment, please.",
      "sender": {"role": "agent", "externalId": "agent_1234"},
      "timestamp": "2024-09-09T10:06:00Z"
    },
    {
      "text": "I see that your claim was approved on June 10, ****, for ****. The payout has been processed.",
      "sender": {"role": "agent", "externalId": "agent_1234"},
      "timestamp": "2024-09-09T10:07:00Z"
    },
    {
      "text": "Great! When will I receive the money?",
      "sender": {"role": "customer", "externalId": "cust_1234"},
      "timestamp": "2024-09-09T10:08:00Z"
    },
    {
      "text": "The payout will be credited to your account within 3-5 business days.",
      "sender": {"role": "agent", "externalId": "agent_1234"},
      "timestamp": "2024-09-09T10:09:00Z"
    },
    {
      "text": "Perfect, thank you so much for your help.",
      "sender": {"role": "customer", "externalId": "cust_1234"},
      "timestamp": "2024-09-09T10:10:00Z"
    },
    {
      "text": "You\'re welcome! Is there anything else I can assist you with?",
      "sender": {"role": "agent", "externalId": "agent_1234"},
      "timestamp": "2024-09-09T10:11:00Z"
    },
    {
      "text": "No, that\'s all. Have a nice day.",
      "sender": {"role": "customer", "externalId": "cust_1234"},
      "timestamp": "2024-09-09T10:12:00Z"
    },
    {
      "text": "You too. Goodbye!",
      "sender": {"role": "agent", "externalId": "agent_1234"},
      "timestamp": "2024-09-09T10:13:00Z"
    }
  ]
}'
```

### Step 3: Generate free text summary

Now that you have a conversation with messages, you can generate a free text summary.

To generate the summary, provide the id of the conversation.

```javascript
curl -X GET 'https://api.sandbox.asapp.com/autosummary/v1/free-text-summaries/5544332211' \
--header 'asapp-api-id: <API KEY ID>' \
--header 'asapp-api-secret: <API TOKEN>'
```

A successful free text summary generation returns 200 and the summary.

```javascript
{
  "conversationId": "5544332211",
  "summaryId": "0992d936-ff70-49fc-ac88-76f1246d8t27",
  "summaryText": "The customer inquired about the status of a payout for an approved claim. The agent confirmed that the claim was approved and the payout has been processed and will be credited within 3-5 business days."
}
```

This summary is for the entire conversation, regardless of the number of agents.

## Multi-leg summaries

You may have a conversation where one end user talks to multiple agents about different topics. With AutoSummary, you can generate summaries for a conversation based on which agent you want to summarize.

To generate a summary for one leg, provide the id of the conversation in the path, and the agent id as a query parameter.

```javascript
curl -X GET 'https://api.sandbox.asapp.com/autosummary/v1/free-text-summaries/5544332211?agentExternalId=agent_1234 \
--header 'asapp-api-id: <API KEY ID>' \
--header 'asapp-api-secret: <API TOKEN>'
```

This generates a summary for the conversation, only for the parts of conversation that specific agent participated in.

## Customization

AutoSummary allows for extensive customization for the free text summary to meet your specific needs. Whether you want to highlight particular aspects of conversations or adhere to industry-specific standards, this feature provides the flexibility to tailor summaries in a way that aligns with your operational goals.

To customize your free text summaries, work with your ASAPP account team to refine what you want from your summaries.

As an example, using the sample conversation, you may want summaries to be specific about dates and amounts mentioned. Here is an example with that customization:

> The customer inquired about the status of a payout for an approved claim. The agent confirmed that the claim was approved on **June 10, 2024**, for **\$5,000**, and the payout has been processed and will be credited within 3-5 business days.


# Getting Started
Source: https://docs.asapp.com/autosummary/getting-started

Learn how to get started with AutoSummary

To start using AutoSummary, choose your integration method:

<AccordionGroup>
  <Accordion title="API (Real Time)">
    * Upload transcripts or use a conversation from AutoTranscribe and receive the insights instantly.
    * Ideal for real-time experiences like conversation routing and form pre-filling.
    * For digital channels: Provide the chat messages directly.
    * For voice channels: Use AutoTranscribe or your own transcription service.

    This integration is covered in this Getting Started guide.
  </Accordion>

  <Accordion title="Batch">
    * Upload conversations in bulk and receive insights in a file.
    * Useful when real-time transcripts aren't available or for data analysis only.

    <Card horizontal={true} title="Batch" href="/autosummary/batch">Learn how to use the batch integration</Card>
  </Accordion>

  <Accordion title="Salesforce plugin">
    * Only supports Salesforce Chat.
    * Inserts free-text summaries into conversation objects.

    <Card horizontal={true} title="Salesforce Plugin" href="/autosummary/batch">Learn how to use the Salesforce Plugin</Card>
  </Accordion>
</AccordionGroup>

The following instructions cover the **API (Real Time) Integration** as it is the most common method.

To use AutoSummary via API:

1. Provide transcripts
2. Extract insights with AutoSummary API

## Before you Begin

Before you start integrating AutoSummary, you need to:

* Get your API Key Id and Secret
* Ensure your account and API key have been configured to access AutoSummary. Reach out to your ASAPP team if you are unsure.

## Step 1: Provide transcripts

How you provide transcripts depends on the conversation channel.

**For digital channels:**

* Use the **conversation API** to upload the messages directly.

**For voice channels:**

* Use **AutoTranscribe** Service to transcribe the audio, or
* Upload utterances via Conversation API if using your own transcription service.

<Tabs>
  <Tab title="Use Conversation API">
    To send transcripts via Conversation API, you need to

    1. Create a `conversation`.
    2. Add `messages` to the `conversation`.

    To create a `conversation`. Provide your Ids for the conversation and customer.

    ```bash
    curl -X POST 'https://api.sandbox.asapp.com/conversation/v1/conversations' \
    --header 'asapp-api-id: \<API KEY ID\>' \
    --header 'asapp-api-secret: \<API TOKEN\>' \
    --header 'Content-Type: application/json' \
    --data '{ 
      "externalId": "\[Your id for the conversation\]",
      "customer": {   
        "externalId": "\[Your id for the customer\]",
        "name": "customer name" 
      },
      "timestamp": "2024-01-23T11:42:42Z"
    }'
    ```

    This conversation represents a thread of messages between an end user and one or more agents. A successfully created conversation returns a status code of 200 and the `id` of the conversation.

    ```json
    {"id":"01HNE48VMKNZ0B0SG3CEFV24WM"}
    ```

    Each time your end user or an agent sends a message, you need to add the messages of the conversation by creating a `message` on the `conversation`. This may either be the chat messages in digital channels, or the audio transcript from your transcription service.

    You have the choice to add a **single message** for each turn of the conversation, or can upload a **batch of messages** a conversation.

    <Tabs>
      <Tab title="Single message">
        ```bash
        curl -X POST 'https://api.sandbox.asapp.com/conversation/v1/conversations/01HNE48VMKNZ0B0SG3CEFV24WM/messages' \
        --header 'asapp-api-id: \<API KEY ID\>' \
        --header 'asapp-api-secret: \<API TOKEN\>' \
        --header 'Content-Type: application/json' \
        --data '{ 
          "text": "Hello, I would like to upgrade my internet plan to GOLD.",
          "sender": {   
            "role": "customer",
            "externalId": "\[Your id for the customer\]" 
          },
          "timestamp": "2024-01-23T11:42:42Z"
        }'
        ```

        A successfully created message returns a status code of 200 and the id of the message.

        <Warning>We only show one message as an example, though you would create many messages over the source of the conversation.</Warning>
      </Tab>

      <Tab title="Batched messages">
        Use the `/messages/batch` endpoint to send multiple messages at once for a given conversation.

        ```javascript
        curl -X POST 'https://api.sandbox.asapp.com/conversation/v1/conversations/5544332211/messages/batch' \
        --header 'asapp-api-id: <API KEY ID>' \
        --header 'asapp-api-secret: <API TOKEN>' \
        --header 'Content-Type: application/json' \
        --data '{
          "messages": [
            {
              "text": "Hello, thank you for contacting XYZ Insurance. How can I assist you today?",
              "sender": {"role": "agent", "externalId": "agent_1234"},
              "timestamp": "2024-09-09T10:00:00Z"
            },
            {
              "text": "Hi, I want to check the status of my payout for my claim.",
              "sender": {"role": "customer", "externalId": "cust_1234"},
              "timestamp": "2024-09-09T10:01:00Z"
            },
            {
              "text": "Sure, can you please provide me with the claim number?",
              "sender": {"role": "agent", "externalId": "agent_1234"},
              "timestamp": "2024-09-09T10:02:00Z"
            },
            {
              "text": "It\'s H123456789.",
              "sender": {"role": "customer", "externalId": "cust_1234"},
              "timestamp": "2024-09-09T10:03:00Z"
            },
            {
              "text": "Thank you. Could you also provide the last 4 digits of your account number?",
              "sender": {"role": "agent", "externalId": "agent_1234"},
              "timestamp": "2024-09-09T10:04:00Z"
            },
            {
              "text": "****",
              "sender": {"role": "customer", "externalId": "cust_1234"},
              "timestamp": "2024-09-09T10:05:00Z"
            },
            {
              "text": "Let me check the details for you. One moment, please.",
              "sender": {"role": "agent", "externalId": "agent_1234"},
              "timestamp": "2024-09-09T10:06:00Z"
            },
            {
              "text": "I see that your claim was approved on June 10, ****, for ****. The payout has been processed.",
              "sender": {"role": "agent", "externalId": "agent_1234"},
              "timestamp": "2024-09-09T10:07:00Z"
            },
            {
              "text": "Great! When will I receive the money?",
              "sender": {"role": "customer", "externalId": "cust_1234"},
              "timestamp": "2024-09-09T10:08:00Z"
            },
            {
              "text": "The payout will be credited to your account within 3-5 business days.",
              "sender": {"role": "agent", "externalId": "agent_1234"},
              "timestamp": "2024-09-09T10:09:00Z"
            },
            {
              "text": "Perfect, thank you so much for your help.",
              "sender": {"role": "customer", "externalId": "cust_1234"},
              "timestamp": "2024-09-09T10:10:00Z"
            },
            {
              "text": "You\'re welcome! Is there anything else I can assist you with?",
              "sender": {"role": "agent", "externalId": "agent_1234"},
              "timestamp": "2024-09-09T10:11:00Z"
            },
            {
              "text": "No, that\'s all. Have a nice day.",
              "sender": {"role": "customer", "externalId": "cust_1234"},
              "timestamp": "2024-09-09T10:12:00Z"
            },
            {
              "text": "You too. Goodbye!",
              "sender": {"role": "agent", "externalId": "agent_1234"},
              "timestamp": "2024-09-09T10:13:00Z"
            }
          ]
        }'
        ```
      </Tab>
    </Tabs>
  </Tab>

  <Tab title="Use Autotranscribe">
    AutoTranscribe converts audio streams into real-time transcripts. Regardless of the platform you use:

    1. AutoTranscribe generates a `conversation` object for each transcribed interaction.
    2. You'll receive a unique `conversation` id.
    3. Use this `conversation` id to extract insights via the AutoSummary API.

    Platform-specific integration steps vary. Refer to the AutoTranscribe documentation for detailed instructions for your chosen platform.
  </Tab>
</Tabs>

## Step 2: Extract Insight

AutoSummary offers three types of insights, each with its own API endpoint:

* **Free text summary**
* **Insight**
* **Structured Data**

All APIs require the conversation ID to extract the relevant insight.

### Example: Generate a free text summary

To generate a free text summary, use the following API call:

```javascript
curl -X GET 'https://api.sandbox.asapp.com/autosummary/v1/free-text-summaries/[conversationId]' \
--header 'asapp-api-id: <API KEY ID>' \
--header 'asapp-api-secret: <API TOKEN>'
```

A successful free text summary generation returns 200 and the summary

```javascript
{
  "conversationId": "5544332211",
  "summaryId": "0992d936-ff70-49fc-ac88-76f1246d8t27",
  "summaryText": "Customer called in saying their internet was slow. Customer wasn't home so couldn't run a speed test. Agent recommended calling back once they could run the speed test."
}
```

## Next Steps

Now that you understand the fundamentals of using AutoSummary, explore further

<CardGroup>
  <Card title="Example Use Cases" href="/autosummary/example-use-cases" />

  <Card title="Free Text Summary" href="/autosummary/free-text-summary" />

  <Card title="Intent" href="/autosummary/intent" />

  <Card title="Structured Data" href="/autosummary/structured-data" />
</CardGroup>


# Intent
Source: https://docs.asapp.com/autosummary/intent

Generate intents from your conversations

An intent is a topic-level descriptor-a single world or short phrase-that reflects the customer's main issue or question at the beginning of a conversation.

Intents come out-of-the-box with support for common intents, but can be customized to match your unique use cases.

Intents enable you to optimize operations by analyzing contact reasons, better route conversations, and contribute to your larger analyzation activities.

## How it works

To help understand how intent identification works, let's use an example conversation:

> **Agent**: Hello, thank you for contacting XYZ Insurance. How can I assist you today?\
> **Customer**: Hi, I want to check the status of my payout for my claim.\
> **Agent**: Sure, can you please provide me with the claim number?\
> **Customer**: It's H123456789.\
> **Agent**: Thank you. Could you also provide the last 4 digits of your account number?\
> **Customer**: 6789\
> **Agent**: Let me check the details for you. One moment, please.\
> **Agent**: I see that your claim was approved on June 10, 2024, for \$5000. The payout has been processed.\
> **Customer**: Great! When will I receive the money?\
> **Agent**: The payout will be credited to your account within 3-5 business days.\
> **Customer**: Perfect, thank you so much for your help.\
> **Agent**: You're welcome! Is there anything else I can assist you with?\
> **Customer**: No, that's all. Have a nice day.\
> **Agent**: You too. Goodbye!

AutoSummary analyzes the conversation, focusing primarily on the initial exchanges, to determine the customer's main reason for contact. This is represented by the `name` of the intent and the `code`, a machine readable identifier for that intent.

In this case, the intent might be identified as:

```javascript
{
  "code": "Payouts",
  "name": "Payouts"
}
```

The intent is determined based on the customer's initial statement about checking the status of their payout, which is the primary reason for their contact.

## Generate an Intent

To generate an intent, provide the conversation transcript to ASAPP.

This example uses our **Conversation API** to provide the transcript, but you have options to use [AutoTranscribe](/autotranscribe) or [batch](/autosummary/batch) integration options.

### Step 1: Create a conversation

To create a `conversation`, provide your IDs for the conversation and customer.

```javascript
curl -X POST 'https://api.sandbox.asapp.com/conversation/v1/conversations' \
--header 'asapp-api-id: <API KEY ID>' \
--header 'asapp-api-secret: <API TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
  "externalId": "[Your id for the conversation]",
  "customer": {
    "externalId": "[Your id for the customer]",
    "name": "customer name"
  },
  "timestamp": "2024-01-23T11:42:42Z"
}'
```

A successfully created conversation returns a status code of 200 and a conversation ID.

### Step 2: Add messages

You need to add the messages for the conversation.

You have the choice to add a **single message** for each turn of the conversation, or can upload a **batch of messages** a conversation.

<Tabs>
  <Tab title="Single message">
    ```bash
    curl -X POST 'https://api.sandbox.asapp.com/conversation/v1/conversations/01HNE48VMKNZ0B0SG3CEFV24WM/messages' \
    --header 'asapp-api-id: \<API KEY ID\>' \
    --header 'asapp-api-secret: \<API TOKEN\>' \
    --header 'Content-Type: application/json' \
    --data '{ 
      "text": "Hello, I would like to upgrade my internet plan to GOLD.",
      "sender": {   
        "role": "customer",
        "externalId": "\[Your id for the customer\]" 
      },
      "timestamp": "2024-01-23T11:42:42Z"
    }'
    ```

    A successfully created message returns a status code of 200 and the id of the message.

    <Warning>We only show one message as an example, though you would create many messages over the source of the conversation.</Warning>
  </Tab>

  <Tab title="Batched messages">
    Use the `/messages/batch` endpoint to send multiple messages at once for a given conversation.

    ```javascript
    curl -X POST 'https://api.sandbox.asapp.com/conversation/v1/conversations/5544332211/messages/batch' \
    --header 'asapp-api-id: <API KEY ID>' \
    --header 'asapp-api-secret: <API TOKEN>' \
    --header 'Content-Type: application/json' \
    --data '{
      "messages": [
        {
          "text": "Hello, thank you for contacting XYZ Insurance. How can I assist you today?",
          "sender": {"role": "agent", "externalId": "agent_1234"},
          "timestamp": "2024-09-09T10:00:00Z"
        },
        {
          "text": "Hi, I want to check the status of my payout for my claim.",
          "sender": {"role": "customer", "externalId": "cust_1234"},
          "timestamp": "2024-09-09T10:01:00Z"
        },
        {
          "text": "Sure, can you please provide me with the claim number?",
          "sender": {"role": "agent", "externalId": "agent_1234"},
          "timestamp": "2024-09-09T10:02:00Z"
        },
        {
          "text": "It\'s H123456789.",
          "sender": {"role": "customer", "externalId": "cust_1234"},
          "timestamp": "2024-09-09T10:03:00Z"
        },
        {
          "text": "Thank you. Could you also provide the last 4 digits of your account number?",
          "sender": {"role": "agent", "externalId": "agent_1234"},
          "timestamp": "2024-09-09T10:04:00Z"
        },
        {
          "text": "****",
          "sender": {"role": "customer", "externalId": "cust_1234"},
          "timestamp": "2024-09-09T10:05:00Z"
        },
        {
          "text": "Let me check the details for you. One moment, please.",
          "sender": {"role": "agent", "externalId": "agent_1234"},
          "timestamp": "2024-09-09T10:06:00Z"
        },
        {
          "text": "I see that your claim was approved on June 10, ****, for ****. The payout has been processed.",
          "sender": {"role": "agent", "externalId": "agent_1234"},
          "timestamp": "2024-09-09T10:07:00Z"
        },
        {
          "text": "Great! When will I receive the money?",
          "sender": {"role": "customer", "externalId": "cust_1234"},
          "timestamp": "2024-09-09T10:08:00Z"
        },
        {
          "text": "The payout will be credited to your account within 3-5 business days.",
          "sender": {"role": "agent", "externalId": "agent_1234"},
          "timestamp": "2024-09-09T10:09:00Z"
        },
        {
          "text": "Perfect, thank you so much for your help.",
          "sender": {"role": "customer", "externalId": "cust_1234"},
          "timestamp": "2024-09-09T10:10:00Z"
        },
        {
          "text": "You\'re welcome! Is there anything else I can assist you with?",
          "sender": {"role": "agent", "externalId": "agent_1234"},
          "timestamp": "2024-09-09T10:11:00Z"
        },
        {
          "text": "No, that\'s all. Have a nice day.",
          "sender": {"role": "customer", "externalId": "cust_1234"},
          "timestamp": "2024-09-09T10:12:00Z"
        },
        {
          "text": "You too. Goodbye!",
          "sender": {"role": "agent", "externalId": "agent_1234"},
          "timestamp": "2024-09-09T10:13:00Z"
        }
      ]
    }'
    ```
  </Tab>
</Tabs>

### Step 3: Generate Intent

With a conversation containing messages, you can generate an intent.

To generate the intent, provide the ID of the conversation:

```javascript
curl -X GET 'https://api.sandbox.asapp.com/autosummary/v1/intent/5544332211' \
--header 'asapp-api-id: <API KEY ID>' \
--header 'asapp-api-secret: <API TOKEN>'
```

A successful intent generation returns 200 and the intent:

```javascript
{
  "conversationId": "5544332211",
  "intent": {
    "code": "Payouts",
    "name": "Payouts"
  }
}
```

This intent represents the primary reason for the customer's contact, regardless of the number of agents involved in the conversation.

## Customization

AutoSummary allows for extensive customization of the intent identification to meet your specific needs. Whether you want to use industry-specific intents or adhere to your company's unique categorization, this feature provides the flexibility to tailor intents in a way that aligns with your operational goals.

To customize your intents, you can use the Self-Service Configuration tool in ASAPP's AI Console. This tool allows you to:

1. Upload, create, or modify intent labels
2. Expand intent classifications by adding as many intents as needed
3. Configure the system to align with your specific operational requirements

For more advanced customization, work with your ASAPP account team to refine and implement a custom set of intents that perfectly suit your business needs.


# Deploying AutoSummary for Salesforce
Source: https://docs.asapp.com/autosummary/salesforce-plugin

Learn how to use the AutoSummary Salesforce plugin.

## Using This Guide

**Deployment Guides** describe the technical components of ASAPP services and provide information about how to interact with and implement these components in your organization.

## Overview

ASAPP AutoSummary generates a summary of each voice or messaging (chat) interaction between a customer and an agent. AutoSummary also generates Structured Data and intent outputs.

With automated interaction summaries, organizations reduce agent time and effort both during and after calls, and gain high-coverage summary data for future reference by agents, supervisors and quality teams.

<Note>
  AutoSummary currently supports English-language conversations only.
</Note>

### Technology

ASAPP AutoSummary has the following technical components:

* An AutoSummary model that ASAPP uses to generate summary text
* An ASAPP component that interfaces between ASAPP's AutoSummary and

Conversation APIs to generate summaries for each conversation.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-e7d605d0-27c4-490c-c4d7-88e9e44f2ee1.png" />
</Frame>

## Setup

### Requirements

**Browser Support**
ASAPP AutoSummary is supported in Google Chrome and Microsoft Edge
<Note>This support covers the latest version of each browser and extends to the previous two versions</Note>

Please consult your ASAPP account contact if your installation requires support for other browsers

**Salesforce**
ASAPP supports Lightning-based chat (cf. classic)

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-c6a319ef-4846-1c14-7ea5-5294ed44e8e2.png" />
</Frame>

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-e66b3aab-d17a-a7dc-f607-4f8a9504db87.png" />
</Frame>

**SSO Support**
AutoSummary supports SP-initiated SSO with either OIDC (preferred method) or SAML.
**Domain Whitelisting**

In order for AutoSummary to interact with ASAPP's backend and third-party support services, the following domains need to be accessible from end-user environments:

| Domain                                       | Description                                                        |
| :------------------------------------------- | :----------------------------------------------------------------- |
| `*.asapp.com`                                | ASAPP service URLs                                                 |
| `*.ingest.sentry.io`                         | Application performance monitoring tool                            |
| `fonts.googleapis.com`                       | Fonts                                                              |
| `google-analytics.com`                       | Page analytics                                                     |
| `asapp-chat-sdk-production.s3.amazonaws.com` | Static ASAPP AWS URL for desktop network connectivity health check |

### Procedure

There are two parts to the AutoSummary setup process. Use the links below to skip to information about a specific part of the process:

1. [Configure the Salesforce organization](#1-configure-the-salesforce-organization-centrally-35766 "1. Configure the Salesforce Organization Centrally") centrally using an administrator account
2. [Setup agent/user authentication](#2-set-up-single-sign-on-sso-user-authentication-35766 "2. Set Up Single Sign-On (SSO) User Authentication") through the existing single sign-on (SSO) service

<Tip>
  Expected effort for each part of the setup process:

  * 1 hour for installation and configuration of the ASAPP chat components
  * 1-2 hours to enable user authentication, depending on SSO system complexity
</Tip>

#### 1. Configure the Salesforce Organization Centrally

**Before You Begin**
You will need the following information to configure ASAPP for Salesforce:

* Administrator credentials to login to your Salesforce organization account.
  * **NOTE:** Organization and Administrator should be enabled for 'chat'.
* A URL for the ASAPP installation package, which will be provided by ASAPP.

<Note>
  ASAPP provides the same install package for implementing both AutoCompose and AutoSummary in Salesforce. Use this guide to configure AutoSummary.

  If you're looking to implement AutoCompose, [use this guide](/autocompose/deploying-autocompose-for-salesforce).
</Note>

* API Id and API URL values, which can be found in your ASAPP Developer Portal account (developer.asapp.com) in the **Apps** section.
  **Configuration Steps**

**1. Install the ASAPP Package**

* Open the package installation URL from ASAPP.
* Login with your Salesforce organization administrator credentials. The package installation page appears:
  <Frame>
    <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-2e51b4cf-646c-4e67-42b2-4df188321f5f.png" />
  </Frame>
* Choose **Install for All Users** (as shown above).
* Check the acknowledgment statement and click the **Install** button:
  <Frame>
    <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-efdaa3e5-109a-a6f1-46d9-fbc0777d7340.png" />
  </Frame>
  <Frame>
    <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-d6534373-fa62-f370-e790-fee74118bd80.png" />
  </Frame>
* The Installation runs. An **Installation Complete!** message appears:
  <Frame>
    <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-6c4df35c-6c3f-a1d2-b0cc-64b5d0aac3d9.png" />
  </Frame>
  <Frame>
    <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-8229e206-9c06-70e3-af08-2a5c9b4373c3.png" />
  </Frame>
* Click the **Done** button.
  **2. Add ASAPP to the Chat Transcript Page**
* Open the 'Service Console' page (or your chat page).
* Choose an existing chat session or start a new chat session so that the chat transcript page appears (the exact mechanism is organization-specific).
* In the top-right, click the **gear** icon, then right-click **Edit Page**, and **Open Link in a New Tab**.
  <Frame>
    <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-16a63275-b025-59fc-3aa5-154a5ca10db6.png" />
  </Frame>
* Navigate to the new tab to see the chat transcript edit page:
  <Frame>
    <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-412d4636-2ddf-33fd-04bb-598df2851636.png" />
  </Frame>
* Select the conversation panel (middle) and delete it.
  <Frame>
    <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-082909fc-339c-417c-2ba6-af6de29ef281.png" />
  </Frame>
* Drag the **chatAsapp** component (left), inside the conversation panel:
  <Frame>
    <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-03d5534d-9513-e847-f942-8c11291b8806.png" />
  </Frame>
* Drag the **exploreAsapp** component (left), to the right column. Next, add your organization's **API key** and **API URL** (found in the ASAPP Developer Portal) in the rightmost panel:

<Note>
  The API key is labeled as **API Id** in the ASAPP Developer Portal. The API URL should be listed as `https://api.sandbox.asapp.com` for lower environments and `https://api.asapp.com` for production.
</Note>

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-cba02769-7bfd-4046-7b89-f6e99d6e26da.png" />
</Frame>

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-b9a621e7-75d9-7dfe-7e62-08dd68fc00b2.png" />
</Frame>

* Click **Save**, then click **Activate**
  <Frame>
    <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-8d13377b-ee60-0196-c713-224ee04d65cc.png" />
  </Frame>
* Click **Assign as org default**.
  <Frame>
    <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-e2227892-55f8-1c17-16c7-61a1895bf19c.png" />
  </Frame>
* Choose **Desktop** form factor, then click **Save**.
  <Frame>
    <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-25a3c7b0-9a58-97be-28a4-799e4de6f3f3.png" />
  </Frame>
* Return to the chat transcript page and refresh - the ASAPP composer should appear.
  <Frame>
    <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-419161db-4848-c498-a3b7-60faa0d0df6d.png" />
  </Frame>

**3. Add a new Salesforce field to populate AutoSummary results**
AutoSummary writes only to the **Chat Transcript** object. You need to create a new field on the Chat Transcript object that will be used by the ASAPP component.

* Go to **Setup** > **Object Manager** > **Chat Transcript** > **Fields & Relationships** page (in this specific example, we choose to add the field for summarization on the Chat Transcript page).
* Click on the **New** button.
  <Frame>
    <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-a74eb43e-d0b8-3fdd-6c19-b7fe2b380301.png" />
  </Frame>
* **Choose the field type (Step 1)**: we suggest setting this field as **Text Area (Long)**. Once this radio button is selected, click on the **Next** button.
* **Enter the field details (Step 2)**: Add a **Field Label** and a **Field Name**. Click **Next**.

<Note>
  Take note of this **Field Name**, as it will be needed when setting up the AutoSummary widget.
</Note>

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-85e7878d-743e-852a-fdff-13534d84864c.png" />
</Frame>

* **Establish field-level security (Step 3)**: no need to modify anything. Click on **Next**.
* **Add to page layouts (Step 4)**: ensure to add the new field to page layouts for this implementation and then click **Save**.
* Once created, you will be able to see the field on the following page:
  <Frame>
    <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-3a15836c-3204-4032-82fc-1cf486a1532f.png" />
  </Frame>

**4. Configure AutoSummary Widget**

* On the Service Console page, click on **Configuration** (gear icon) and then click **Edit Page**.
  <Frame>
    <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-156e16ea-d143-b711-53ea-9da9667357fd.png" />
  </Frame>
* Click the **ASAPP** panel. Then the configuration panel will appear on the right of the page. Enter the following information into the fields:
  * **API key**: this is the **API Id** found in the ASAPP Developer Portal.
  * **API URL**: this is found in the ASAPP Developer Portal; use `https://api.sandbox.asapp.com` in lower environments and `https://api.asapp.com`in production.
  * Select the checkbox for **ASAPP AutoSummary**.
  * **ASAPP AutoSummary field**: enter the **Field Name** created as part of Step 3. This is the field where the ASAPP-generated summary will appear.
  <Frame>
    <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-8b35fadc-df1f-2b55-8428-d1918d2a4f3b.png" />
  </Frame>
  <Frame>
    <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-96d8db8f-687d-5672-2a44-28c8021f4ef7.png" />
  </Frame>
* Click on the **Save** button to apply the changes.
  These configuration steps add the AutoSummary field to the Chat Transcript object. From this point forward, you may use this summary field as part of your agent-facing or internal summary data use case. A common use case is to display this field to the agent in the Record Detail widget.
  **5. Add Record Detail Widget (OPTIONAL)**
* If the Record Detail widget is not already on the Chat Transcript page, drag the **Record Detail** widget from the left panel and place it on the page.
* Click on the **Save** button to apply the changes.
* Refresh the page to see the changes applied to the page.
  The AutoSummary field should now be visible under the **Transcription** section of the Record Detail widget. Once the conversation is ended, summarization will be displayed in this newly configured field in the Record Detail widget.

#### 2. Set Up Single Sign-On (SSO) User Authentication

ASAPP handles authentication through the customer's SSO service to confirm the identity of the agent.

ASAPP acts as the Service Provider (SP) with the customer acting as the Identity Provider (IDP). The customer's authentication system performs user authentication using their existing user credentials.

ASAPP supports SP-initiated SSO with either OIDC (preferred method) and SAML. Once the user initiates sign-in, ASAPP detects that the user is authenticated and requests an assertion from the customer's SSO service.

**Configuration Steps for OIDC (preferred method)**

1. Create a new IDP OIDC application with type `Web`
2. Set the following attributes for the app:

   | Attribute             | Value\*                                                                                                                                                                            |
   | :-------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
   | Grant Type            | authorization code                                                                                                                                                                 |
   | Sign-in Redirect URIs | <ul><li>Production: `https://api.asapp.com/auth/v1/callback/{company_marker}`</li><li>Sandbox: `https://api.sandbox.asapp.com/auth/v1/callback/{company_marker}-sandbox`</li></ul> |

   <Note> ASAPP to provide `company_marker` value</Note>
3. Save the application and send ASAPP the `Client ID` and `Client Secret` from the app through a secure communication channel
4. Set scopes for the OIDC application:
   * Required: `openid`
   * Preferred: `email`, `profile`
5. Tell ASAPP which end-user attribute should be used a unique identifier
6. Tell ASAPP your IDP domain name
   **Configuration Steps for SAML**
7. Create a new IDP SAML application.
8. Set the following attributes for the app:

   | Attribute            | Value\*                                                                                                                                                                                                                                                                                  |
   | :------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
   | Single Sign On URL   | <ul><li>Production: `https://sso.asapp.com/auth/realms/standalone-{company_marker}-auth/broker/saml/endpoint/clients/asapp-saml`</li><li>Sandbox: `https://sso.asapp.com/auth/realms/standalone-{company_marker}-auth/broker/saml-sandbox/endpoint/clients/asapp-saml-sandbox`</li></ul> |
   | Recipient URL        | <ul><li>Production: `https://sso.asapp.com/auth/realms/standalone-{company_marker}-auth/broker/saml/endpoint/clients/asapp-saml`</li><li>Sandbox: `https://sso.asapp.com/auth/realms/standalone-{company_marker}-auth/broker/saml-sandbox/endpoint/clients/asapp-saml-sandbox`</li></ul> |
   | Destination URL      | <ul><li>Production: `https://sso.asapp.com/auth/realms/standalone-{company_marker}-auth/broker/saml/endpoint/clients/asapp-saml`</li><li>Sandbox: `https://sso.asapp.com/auth/realms/standalone-{company_marker}-auth/broker/saml-sandbox/endpoint/clients/asapp-saml-sandbox`</li></ul> |
   | Audience Restriction | <ul><li>Production: `https://sso.asapp.com/auth/realms/standalone-{company_marker}-auth/broker/saml/endpoint/clients/asapp-saml`</li><li>Sandbox: `https://sso.asapp.com/auth/realms/standalone-{company_marker}-auth/broker/saml-sandbox/endpoint/clients/asapp-saml-sandbox`</li></ul> |
   | Response             | Signed                                                                                                                                                                                                                                                                                   |
   | Assertion            | Signed                                                                                                                                                                                                                                                                                   |
   | Signature Algorithm  | RSA\_SHA256                                                                                                                                                                                                                                                                              |
   | Digest Algorithm     | SHA256                                                                                                                                                                                                                                                                                   |
   | Attribute Statements | externalUserId: {unique_id_to_identify_the_user}                                                                                                                                                                                                                                         |

   <Note> ASAPP to provide `company_marker` value</Note>
9. Save the application and send the Public Certificate to validate Signature for this app SAML payload to ASAPP team
10. Send ASAPP team the URL of the SAML application

## Usage

### Customization

#### Historical Transcripts for Summary Model Customization

ASAPP uses past agent conversations to generate a customized summary model that is tailored to a given use case. In order to create a customized summary model, ASAPP requires a minimum of 500 representative historical transcripts to generate free-text summaries. Transcripts should identify both the agent and customer messages.

<Note>
  Proper transcript formatting and sampling ensures data is usable for model training. Please ensure transcripts conform to the following:
  **Formatting**

  * Each utterance is clearly demarcated and sent by one identified sender
  * Utterances are in chronological order and complete, from beginning to very end of the conversation
  * Where possible, transcripts include the full content of the conversation rather than an abbreviated version. For example, in a digital messaging conversation:
    <table class="informaltable frame-void rules-rows">
      <thead>
        <tr>
          <th class="th"><p>Full</p></th>
          <th class="th"><p>Abbreviated</p></th>
        </tr>
      </thead>

      <tbody>
        <tr>
          <td class="td">
            <p><strong>Agent</strong>: Choose an option from the list below</p>
            <p><strong>Agent</strong>: (A) 1-way ticket (B) 2-way ticket (C) None of the above</p>
            <p><strong>Customer</strong>: (A) 1-way ticket</p>
          </td>

          <td class="td">
            <p><strong>Agent</strong>: Choose an option from the list below</p>
            <p><strong>Customer</strong>: (A)</p>
          </td>
        </tr>
      </tbody>
    </table>

  **Sampling**

  * Transcripts are from a wide range of dates to avoid seasonality effects; random sampling over a 12-month period is recommended
  * Transcripts mimic the production conversations on which models will be used - same types of participants, same channel (voice, messaging), same business unit
  * There are no duplicate transcripts
</Note>

For more information on how to transmit the conversation data, reach out to your ASAPP account contact.
Visit [Transmitting Data to SFTP](/reporting/send-sftp) for instructions on how to send historical transcripts to ASAPP.

#### Conversation Redaction

When message text in the conversation transcript is sent to ASAPP, ASAPP applies redaction to the message text to prevent transmission of sensitive information. Reach out to your ASAPP account contact for information on available redaction capabilities to configure for your implementation.

### Data Security

ASAPP's security protocols protect data at each point of transmission from first user authentication, to secure communications, to our auditing and logging system, all the way to securing the environment when data is at rest in the data logging system. Access to data by ASAPP teams is tightly constrained and monitored. Strict security protocols protect both ASAPP and our customers.
The following security controls are particularly relevant to AutoCompose:

1. Client sessions are controlled using a time-limited authorization token. Privileges for each active session are controlled server-side to mitigate potential elevation-of-privilege and information disclosure risks.
2. To avoid unauthorized disclosure of information, unique, non-guessable IDs are used to identify conversations. These conversations can only be accessed using a valid client session.
3. Requests to API endpoints that can potentially receive sensitive data are put through a round of redaction to strip the request of sensitive data (like SSNs and phone numbers).


# Structured Data
Source: https://docs.asapp.com/autosummary/structured-data

Extract entites and targeted data from your conversations

Structured data is specific, customizable data points extracted from a conversation. This feature encompasses to main components:

* **Entity extraction**: Automatically identifies and extracts specific pieces of information.
* **Question extraction (Targeted Structured Data)**: Answers predefined questions based on the conversation content.

Entity and Question structured data comes out of the box with entities and questions based per industry, but can be customized to match your unique use cases.

The dynamic nature of structure data makes them capable of solving an endless list of challenges, but may help you with:

* Automating data collection for analytics and reporting
* Facilitating compliance monitoring and quality assurance
* Rapid population of CRMs and other business tools
* Supporting data-driven decision making and process improvement

## How it works

To illustrate how Structured Data works, let's use an example conversation:

> **Agent**: Hello, thank you for contacting XYZ Insurance. How can I assist you today?\
> **Customer**: Hi, I want to check the status of my payout for my claim.\
> **Agent**: Sure, can you please provide me with the claim number?\
> **Customer**: It's H123456789.\
> **Agent**: Thank you. Could you also provide the last 4 digits of your account number?\
> **Customer**: 6789\
> **Agent**: Let me check the details for you. One moment, please.\
> **Agent**: I see that your claim was approved on June 10, 2024, for \$5000. The payout has been processed.\
> **Customer**: Great! When will I receive the money?\
> **Agent**: The payout will be credited to your account within 3-5 business days.\
> **Customer**: Perfect, thank you so much for your help.\
> **Agent**: You’re welcome! Is there anything else I can assist you with?\
> **Customer**: No, that's all. Have a nice day.\
> **Agent**: You too. Goodbye!

AutoSummary analyzes this conversation and extracts structured data in two ways:

### Entity

Entity Extraction automatically identifies and extracts specific pieces of information from the conversation. These entities can include things like claim numbers, account details, dates, monetary amounts, and more.

For our example conversation, the extracted entities might look like this:

```javascript
[
    {
      "name": "Claim Number",
      "value": "H123456789"
    },
    {
      "name": "Account Number Last 4",
      "value": "5678"
    },
    {
      "name": "Approval Date",
      "value": "2024-06-10"
    },
    {
      "name": "Payout Amount",
      "value": 5000
    }
]
```

### Questions

Targeted Structured Data, or Questions, allows you to get answers to predefined queries based on the conversation content. These questions can be customized to address specific aspects of customer interactions, compliance requirements, or any other relevant factors.

For our example conversation, some predefined questions and their answers might look like this:

```javascript
[
    {
      "name": "Customer Satisfied",
      "answer": "Yes"
    },
    {
      "Name": "Payout Information Provided",
      "answer": "Yes"
    },
    {
      "name": "Verification Completed",
      "answer": "Yes"
    }
]
```

## Generate Structured Data

To generate Structured Data, you first need to provide the conversation transcript to ASAPP.

This example uses our **Conversation API** to provide the transcript, but you have options to use [AutoTranscribe](/autotranscribe), or [batch](/autosummary/batch) integration options.

### Step 1: Create a conversation

To create a `conversation`, provide your IDs for the conversation and customer.

```javascript
curl -X POST 'https://api.sandbox.asapp.com/conversation/v1/conversations' \
--header 'asapp-api-id: <API KEY ID>' \
--header 'asapp-api-secret: <API TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
  "externalId": "[Your id for the conversation]",
  "customer": {
    "externalId": "[Your id for the customer]",
    "name": "customer name"
  },
  "timestamp": "2024-01-23T11:42:42Z"
}'
```

A successfully created conversation returns a status code of 200 and a conversation ID.

### Step 2: Add messages

You need to add the messages for the conversation. You have the choice to add a **single message** for each turn of the conversation, or can upload a **batch of messages** a conversation.

<Tabs>
  <Tab title="Single message">
    ```bash
    curl -X POST 'https://api.sandbox.asapp.com/conversation/v1/conversations/01HNE48VMKNZ0B0SG3CEFV24WM/messages' \
    --header 'asapp-api-id: \<API KEY ID\>' \
    --header 'asapp-api-secret: \<API TOKEN\>' \
    --header 'Content-Type: application/json' \
    --data '{ 
      "text": "Hello, I would like to upgrade my internet plan to GOLD.",
      "sender": {   
        "role": "customer",
        "externalId": "\[Your id for the customer\]" 
      },
      "timestamp": "2024-01-23T11:42:42Z"
    }'
    ```

    A successfully created message returns a status code of 200 and the id of the message.

    <Warning>We only show one message as an example, though you would create many messages over the source of the conversation.</Warning>
  </Tab>

  <Tab title="Batched messages">
    Use the `/messages/batch` endpoint to send multiple messages at once for a given conversation.

    ```javascript
    curl -X POST 'https://api.sandbox.asapp.com/conversation/v1/conversations/5544332211/messages/batch' \
    --header 'asapp-api-id: <API KEY ID>' \
    --header 'asapp-api-secret: <API TOKEN>' \
    --header 'Content-Type: application/json' \
    --data '{
      "messages": [
        {
          "text": "Hello, thank you for contacting XYZ Insurance. How can I assist you today?",
          "sender": {"role": "agent", "externalId": "agent_1234"},
          "timestamp": "2024-09-09T10:00:00Z"
        },
        {
          "text": "Hi, I want to check the status of my payout for my claim.",
          "sender": {"role": "customer", "externalId": "cust_1234"},
          "timestamp": "2024-09-09T10:01:00Z"
        },
        {
          "text": "Sure, can you please provide me with the claim number?",
          "sender": {"role": "agent", "externalId": "agent_1234"},
          "timestamp": "2024-09-09T10:02:00Z"
        },
        {
          "text": "It\'s H123456789.",
          "sender": {"role": "customer", "externalId": "cust_1234"},
          "timestamp": "2024-09-09T10:03:00Z"
        },
        {
          "text": "Thank you. Could you also provide the last 4 digits of your account number?",
          "sender": {"role": "agent", "externalId": "agent_1234"},
          "timestamp": "2024-09-09T10:04:00Z"
        },
        {
          "text": "****",
          "sender": {"role": "customer", "externalId": "cust_1234"},
          "timestamp": "2024-09-09T10:05:00Z"
        },
        {
          "text": "Let me check the details for you. One moment, please.",
          "sender": {"role": "agent", "externalId": "agent_1234"},
          "timestamp": "2024-09-09T10:06:00Z"
        },
        {
          "text": "I see that your claim was approved on June 10, ****, for ****. The payout has been processed.",
          "sender": {"role": "agent", "externalId": "agent_1234"},
          "timestamp": "2024-09-09T10:07:00Z"
        },
        {
          "text": "Great! When will I receive the money?",
          "sender": {"role": "customer", "externalId": "cust_1234"},
          "timestamp": "2024-09-09T10:08:00Z"
        },
        {
          "text": "The payout will be credited to your account within 3-5 business days.",
          "sender": {"role": "agent", "externalId": "agent_1234"},
          "timestamp": "2024-09-09T10:09:00Z"
        },
        {
          "text": "Perfect, thank you so much for your help.",
          "sender": {"role": "customer", "externalId": "cust_1234"},
          "timestamp": "2024-09-09T10:10:00Z"
        },
        {
          "text": "You\'re welcome! Is there anything else I can assist you with?",
          "sender": {"role": "agent", "externalId": "agent_1234"},
          "timestamp": "2024-09-09T10:11:00Z"
        },
        {
          "text": "No, that\'s all. Have a nice day.",
          "sender": {"role": "customer", "externalId": "cust_1234"},
          "timestamp": "2024-09-09T10:12:00Z"
        },
        {
          "text": "You too. Goodbye!",
          "sender": {"role": "agent", "externalId": "agent_1234"},
          "timestamp": "2024-09-09T10:13:00Z"
        }
      ]
    }'
    ```
  </Tab>
</Tabs>

### Step 3: Generate Structured Data

With a conversation containing messages, you can generate Structured Data.

To generate the Structured Data, provide the ID of the conversation:

```javascript
curl -X GET 'https://api.sandbox.asapp.com/autosummary/v1/structured-data/5544332211' \
--header 'asapp-api-id: <API KEY ID>' \
--header 'asapp-api-secret: <API TOKEN>'
```

A successful Structured Data generation returns 200 and the extracted data:

```javascript
{
  "conversationId": "01GCS2XA9447BCQANJF2SXXVA0",
  "id": "0083d936-ff70-49fc-ac19-74f1246d8b27",
  "structuredDataMetrics": [
    {
      "name": "Claim Number",
      "value": "H123456789"
    },
    {
      "name": "Account Number Last 4",
      "value": "5678"
    },
    {
      "name": "Approval Date",
      "value": "2024-06-10"
    },
    {
      "name": "Payout Amount",
      "value": 5000
    },
    {
      "name": "Customer Satisfied",
      "answer": "Yes"
    },
    {
      "name": "Payout Information Provided",
      "answer": "Yes"
    },
    {
      "name": "Verification Completed",
      "answer": "Yes"
    }
  ]
}
```

The structured data represents both the entities and answered questions you have configured.

## Customization

Structured Data questions and entities can be fully customized according to your business needs.

We have a list of potential questions and entities per industry that you can start with. Work with your ASAPP account team to determine whether one of our out-of-the-box configurations work for you, or if you need to create custom structured data.


# AutoTranscribe
Source: https://docs.asapp.com/autotranscribe

Transcribe your audio with best in class accuracy

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/autotranscribe/autotranscribe-home.png" />
</Frame>

ASAPP AutoTranscribe converts speech to text in real-time for live call audio streams and audio recordings.

Use AutoTranscribe for voice interactions between contact center agents and their customers, in support of a broad range of use cases including real-time guidance, topical analysis, coaching, and quality management

ASAPP's AutoTranscribe service is powered by a speech recognition model that transforms spoken form to written forms in real-time, along with punctuation and capitalization. To optimize performance, the model can be customized to support domain-specific needs by training on historical call audio and adding custom vocabulary to further boost recognition accuracy.

## How it Works

ASAPP's AutoTranscribe service is powered by a speech recognition model that transforms spoken form to written forms in real-time, along with punctuation and capitalization.

To optimize performance, the model can be customized to support domain-specific needs by training on historical call audio and adding custom vocabulary to further boost recognition accuracy

AutoTranscribe was also designed to be fast enough to show an agent what was said immediately after every utterance.

AutoTranscribe can be implemented in three main integration patterns:

1. **WebSocket API**: All audio streaming, call signaling, and returned transcripts use a WebSocket API, preceded by an authentication mechanism using a REST API.
2. **IPREC Media Gateway**: Audio streaming sent to ASAPP media gateway and call signaling sent via a dedicated API; transcripts are returned either in real-time or post call.
3. **Third Party CCaaS**: Audio is sent to ASAPP media gateway by a third party contact center as a service (CCaaS) vendor and call signaling sent via API; transcripts are returned either in real-time or post call.

<Card title="AutoTranscribe Product Guide" href="/autotranscribe/product-guide">Learn more about AutoTranscribe in the Product Guide</Card>

## Get Started

To get started with AutoTranscribe, you need to:

1. Follow the [Developer Quickstart](/getting-started/developers) to get your API Credentials
2. Choose the integration that best fits your use case:

### Platform Connectors

<CardGroup>
  <Card title="Media Gateway: SIPRec" href="/autotranscribe/siprec">Transcribe audio from your SIPRec system using the ASAPP Media Gateway</Card>
  <Card title="Media Gateway: Twilio" href="/autotranscribe/twilio">Transcribe audio from your Twilio system using the ASAPP Media Gateway</Card>
  <Card title="Media Gateway: Amazon Connect" href="/autotranscribe/amazon-connect">Transcribe audio from your Amazon Connect system using the ASAPP Media Gateway</Card>
  <Card title="Media Gateway: Genesys" href="/autotranscribe/genesys-audiohook">Transcribe audio from your Genesys system using the ASAPP Media Gateway</Card>
</CardGroup>

### Direct Integration

<Card title="Direct WebSocket" href="/autotranscribe/direct-websocket">Use a websocket to send audio directly to AutoTranscribe and receive the transcriptions</Card>

## Next Steps

<CardGroup>
  <Card title="AutoTranscribe Product Guide" href="/autotranscribe/product-guide">Learn more about AutoTranscribe in the Product Guide</Card>
  <Card title="Developer Quickstart" href="/getting-started/developers">Get started with the Developer Quickstart Guide</Card>
  <Card title="Feature Releases" href="/autotranscribe/feature-releases">See a list of feature releases for AutoTranscribe</Card>
</CardGroup>


# Deploying AutoTranscribe for Amazon Connect
Source: https://docs.asapp.com/autotranscribe/amazon-connect

Use AutoTranscribe in your Amazon Connect solution

## Overview

This guide covers the **Amazon Connect** solution pattern, which consists of the following components to receive speech audio and call signals, and return call transcripts:

* Media gateways for receiving call audio from Amazon Kinesis Video Streams
* Start/Stop API for Lambda functions to provide call data and signals for when to start and stop transcribing call audio

<Note>
  ASAPP can also accept requests to start and stop transcription via API from other call-state aware services. AWS Lambda functions are the approach outlined in this guide.
</Note>

* Required AWS IAM role to allow access to Kinesis Video Streams
* Webhook to POST real-time transcripts to a designated URL of your choosing, alongside two additional APIs to retrieve transcripts after-call

ASAPP works with you to understand your current telephony infrastructure and ecosystem.

Your ASAPP account team will also determine the main use case(s) for the transcript data to determine where and how call transcripts should be sent.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-cfc26616-6fec-757a-6bd9-91a8175d30ab.png" />
</Frame>

### Integration Steps

There are five parts of the integration process:

1. Setup Authentication for Kineses Video Streams
2. Enable Audio Streaming to Kinesis Video Streams
3. Add Start Media and Stop Media To Flows
4. Send Start and Stop Requests to ASAPP
5. Receive Transcript Outputs

### Requirements

**Audio Stream Codec**

AWS Kinesis Video Streams provides MKV format, which is supported by ASAPP.  No modification or additional transcoding is needed when forking audio to ASAPP.

<Note>
  When supplying recorded audio to ASAPP for AutoTranscribe model training prior to implementation, send uncompressed .WAV media files with speaker-separated channels.
</Note>

Recordings for training should have a sample rate of 8000 and 16-bit PCM audio encoding.

See the [Customization section of the AutoTranscribe Product Guide](/autotranscribe/product-guide#customization) for more on data requirements for transcription model training.

**Developer Portal**

ASAPP provides an AI Services [Developer Portal](/getting-started/developers). Within the portal, developers can do the following:

* Access relevant API documentation (e.g. OpenAPI reference schemas)
* Access API keys for authorization
* Manage user accounts and apps

<Tip>
  Visit the [Get Started](/getting-started/developers) for instructions on creating a developer account, managing teams and apps, and setup for using AI Service APIs.
</Tip>

## Integrate with Amazon Connect

### 1. Setup Authentication for Kineses Video Streams

The audio streams for Amazon Connect are stored in the Amazon Kinesis Video Streams service in your AWS account where the Amazon Connect instance resides. The access to the Kinesis Video Streams service is [controlled by IAM policies](https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/how-iam).

ASAPP will use [IAM Roles for Service accounts (IRSA)](https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts) to receive a specific IAM role in the ASAPP account, for example `asapp-prod-mg-amazonconnect-role`.

Setup your account's IAM role (e.g., `kinesis-connect-access-role-for-asapp`) to trust `asapp-prod-mg-amazonconnect-role` to assume it and create a policy permitting list/read operations on appropriate Kinesis Video Streams associated with Amazon Connect instance.

### 2. Enable Audio Streaming to Kinesis Video Streams

ASAPP retrieves streaming audio by sending requests to Kineses Video Streams. Streaming media is not enabled by default and must be turned on manually.

Enable live media streaming for applicable instances in your Amazon Connect console to ensure audio is available when ASAPP sends requests to Kinesis Video Streams.

<Note>
  If you choose to use a non-default KMS key, ensure that the IAM role for Service Accounts (IRSA) created for ASAPP has access to this KMS key.

  Amazon provides [documentation to guide enabling live media streaming to Kinesis Video Streams](https://docs.aws.amazon.com/connect/latest/adminguide/enable-live-media-streams).
</Note>

### 3. Add Start Media and Stop Media To Flows

Sending streaming media to Kinesis Video Streams is initiated and stopped by inserting preset blocks - called **Start media streaming** and **Stop media streaming** - into Amazon Connect flows. Place these blocks into your flows to programmatically set when media will be streamed and stopped - this determines what audio will be available for transcription

Typically for ASAPP, audio streaming begins as close as possible to when the agent is assigned. Audio streaming typically stops ahead of parts of calls that should not be transcribed such as holds, transfers, and post-call surveys.

<Note>
  When placing the **Start media streaming** block, ensure **From the customer** and **To the customer** menu boxes are checked so that both participants' call media streams are available for transcription.
</Note>

Amazon provides [documentation on adding Start media streaming and Stop media streaming blocks](https://docs.aws.amazon.com/connect/latest/adminguide/use-media-streams-blocks) to Amazon Connect flows.

### 4. Send Start and Stop Requests to ASAPP

AWS Lambda functions can be inserted into Amazon Connect flows in order to send requests directly to ASAPP APIs to start and stop transcription.

<Note>
  ASAPP can also accept requests to start and stop transcription via API from other call-state aware services. If you are using another service to interact with ASAPP APIs, you can use AWS Lambda functions to send important call metadata to your other services before they send requests to ASAPP.

  The approach outlined in this guide is to call ASAPP APIs directly using AWS Lambda functions.
</Note>

As outlined in [Requirements](#requirements "Requirements"), user accounts must be created in the developer portal in order to enroll apps and receive API keys to interact with ASAPP endpoints.

Lambda functions (or any other service you use to interact with ASAPP APIs) will require these API keys to send requests to start and stop transcription. See the [Endpoints](#endpoints "Endpoints") section to learn how to interact with them, including what's necessary to include in requests to each endpoint.

ASAPP will not begin transcribing call audio until requested to, at which point we will request the audio from Kinesis Video Streams and begin transcribing.

With AWS Kinesis Video streams, there are 2 supported selectorTypes to start-streaming:

* **NOW**: NOW will start transcribing from the most recent audio data in the Kinesis stream.
* **FRAGMENT\_NUMBER**: FRAGMENT\_NUMBER will require another parameter afterFragmentNumber to be populated and would be the fragment within the media stream to start (for example, the start fragment number to capture all transcripts in the stream prior to start-streaming being called).

<Note>
  The `/start-streaming` endpoint request requires several fields, but three specific attributes must come from Amazon:

  * Amazon Connect Contact Id (multiple possible sources)
    JSONPath formats: `$.ContactId`, `$.InitialContactId`, `$.PreviousContactId`
  * Audio Stream ARN
    JSONPath format: `$.MediaStreams.Customer.Audio.StreamARN`
  * \[OPTIONAL] Start Fragment Number
    JSONPath format: `$.MediaStreams.Customer.Audio.StartFragmentNumber`
    Requests to `/start-streaming` also require agent and customer identifiers. These identifiers can be sourced from Amazon Connect but may also originate from other systems if your use case requires it.
</Note>

Stop requests are used to pause or end transcription for any needed reason. For example, a stop request could be used when the agent initiates a transfer to another agent or queue or at the end of the call to prevent transcribing post-call interactions such as satisfaction surveys.

<Note>
  AutoTranscribe is only meant to transcribe conversations between customers and agents - start and stop requests should be implemented to ensure non-conversation audio (e.g. hold music, IVR menus, surveys) is not being transcribed. Attempted transcription of non-conversation audio will negatively impact other services meant to consume conversation transcripts, such as ASAPP AutoSummary.
</Note>

#### Adding Lambda Functions to Flows

First, create and deploy two new Lambda functions in the AWS Lambda console: one for  sending a request to ASAPP's `/start-streaming` endpoint and another for sending a request to ASAPP's `/stop-streaming` endpoint.

<Note>
  Refer to the [API Reference in ASAPP's Developer Portal](/apis/autotranscribe-media-gateway/start-streaming) for detailed specifications for sending requests to each endpoint.
</Note>

Once Lambda functions are deployed and configured, add the Lambda functions to your Amazon Connect instance using the Amazon Connect console. Once added, the Lambda functions will be available for use in your existing applicable flows.

In Amazon Connect's flow tool, add an Invoke **AWS Lambda function** where you want to make a request to ASAPP's APIs.

* For requests to `/start-streaming` endpoint, place the Lambda block following the **Start media streaming** flow block
* For requests to `/stop-streaming` endpoint, place the Lambda block immediately before the **Stop media streaming** flow block.

Amazon provides [documentation on invoking AWS Lambda functions](https://docs.aws.amazon.com/connect/latest/adminguide/connect-lambda-functions).

### 5. Receive Transcript Outputs

AutoTranscribe outputs transcripts using three separate mechanisms, each corresponding to a different temporal use case:

* **[Real-time](#real-time-via-webhook "Real-Time via Webhook")**: Webhook posts complete utterances to your target endpoint as they are transcribed during the live conversation
* **[After-call](#after-call-via-get-request "After-Call via GET Request")**: GET endpoint responds to your requests for a designated call with the full set of utterances from that completed conversation
* **[Batch](#batch-via-file-exporter "Batch via File Exporter")**: File Exporter service responds to your request for a designated time interval with a link to a data feed file that includes all utterances from that interval's conversations

#### Real-Time via Webhook

ASAPP sends transcript outputs in real-time via HTTPS POST requests to a target URL of your choosing.

Authentication

Once the target is selected, work with your ASAPP account team to implement one of the following supported authentication mechanisms:

* **Custom CAs:** Custom CA certificates for regular TLS (1.2 or above).
* **mTLS:** Mutual TLS using custom certificates provided by the customer.
* **Secrets:** A secret token. The secret name is configurable as is whether it appears in the HTTP header or as a URL parameter.
* **OAuth2 (client\_credentials):** Client credentials to fetch tokens from an authentication server.

Expected Load

Target servers should be able to support receiving transcript POST messages for each utterance of every live conversation on which AutoTranscribe is active.

For reference, an average live call sends approximately 10 messages per minute. At that rate, 50 concurrent live calls represents approximately 8 messages per second.

Please ensure the selected target server is load tested to support anticipated peaks in concurrent call volume.

Transcript Timing and Format

Once you have started transcription for a given call stream using the `/start-streaming` endpoint, AutoTranscribe begins to publish `transcript` messages, each of which contains a full utterance for a single call participant.

The expected latency between when ASAPP receives audio for a completed utterance and provides a transcription of that same utterance is 200-600ms.

<Note>
  Perceived latency will also be influenced by any network delay sending audio to ASAPP and receiving transcription messages in return.
</Note>

Though messages are sent in the order they are transcribed, network latency may impact the order in which they arrive or cause messages to be dropped due to timeouts. Where latency causes timeouts, the oldest pending messages will be dropped first; AutoTranscribe does not retry to deliver dropped messages.

The message body for `transcript` type messages is JSON encoded with these fields:

| Field                  | Subfield   | Description                                                                                                                            | Example Value                        |
| :--------------------- | :--------- | :------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------- |
| externalConversationId |            | Unique identifier with the Amazon Connect Contact Id for the call                                                                      | 8c259fea-8764-4a92-adc4-73572e9cf016 |
| streamId               |            | Unique identifier assigned by ASAPP to each call participant's stream returned in response to `/start-streaming` and `/stop-streaming` | 5ce2b755-3f38-11ed-b755-7aed4b5c38d5 |
| sender                 | externalId | Customer or agent identifier as provided in request to `/start-streaming`                                                              | ef53245                              |
| sender                 | role       | A participant role, either customer or agent                                                                                           | customer, agent                      |
| autotranscribeResponse | message    | Type of message                                                                                                                        | transcript                           |
| autotranscribeResponse | start      | The start ms of the utterance                                                                                                          | 0                                    |
| autotranscribeResponse | end        | Elapsed ms since the start of the utterance                                                                                            | 1000                                 |
| autotranscribeResponse | utterance  | Transcribed utterance text                                                                                                             | Are you there?                       |

Expected `transcript` message format:

```json
{
  "type": "transcript",
  "externalConversationId": "<Amazon Connect Contact Id>",
  "streamId": "<streamId>",
  "sender": {
    "externalId": "<id>",
    "role": "customer",  // or "agent"
  },
  "autotranscribeResponse": {
    "message": "transcript",
    "start": 0,
    "end": 1000,
    "utterance": [
       {"text": "<transcript text>"}
      ]
  }
}
```

## Error Handling

Should your target server return an error in response to a POST request, ASAPP will record the error details for the failed message delivery and drop the message.

### After-Call via GET Request

AutoTranscribe makes a full transcript available at the following endpoint for a given completed call:

`GET /conversation/v1/conversation/messages`

Once a conversation is complete, make a request to the endpoint using a conversation identifier and receive back every message in the conversation.

### Message Limit

This endpoint will respond with up to 1,000 transcribed messages per conversation, approximately a two-hour continuous call. All messages are received in a single response without any pagination.

To retrieve all messages for calls that exceed this limit, use either a real-time mechanism or File Exporter for transcript retrieval.

<Note>
  Transcription settings (e.g. language, detailed tokens, redaction), for a given call are set with the Start/Stop API, when call transcription is initiated. All transcripts retrieved after the call will reflect the initially requested settings with the Start/Stop API.
</Note>

See the [Endpoints](#endpoints "Endpoints") section to learn how to interact with this API.

#### Batch via File Exporter

AutoTranscribe makes full transcripts for batches of calls available using the File Exporter service's `utterances` data feed.

The File Exporter service is meant to be used as a batch mechanism for exporting data to your data warehouse, either on a scheduled basis (e.g. nightly, weekly) or for ad hoc analyses. Data that populates feeds for the File Exporter service updates once daily at 2:00AM UTC.

Visit [Retrieving Data from ASAPP Messaging](/reporting/file-exporter) for a guide on how to interact with the File Exporter service.

## Use Case Example

Real-Time Transcription

This real-time transcription use case example consists of an English language call between an agent and customer with redaction enabled, ending with a hold. Note that redaction is enabled by default and does not need to be requested explicitly.

1. When the customer and agent are connected, send ASAPP a request to start transcription for the call:
   **POST** `/mg-autotranscribe/v1/start-streaming`
   **Request**

   ```json
   {
     "namespace": "amazonconnect",
     "guid": "8c259fea-8764-4a92-adc4-73572e9cf016",
     "customerId": "TT9833237",
     "agentId": "RE223444211993",
     "autotranscribeParams": {
       "language": "en-US"
     },
     "amazonConnectParams": {
       "streamArn": arn:aws:kinesisvideo:us-east-1:145051540001:stream/streamtest-connect-asappconnect-contact-cccaa6b8-12e4-44a6-90d5-829c4fdf68e4/1696422764859TBD,
       "startSelectorType":"NOW"
     }
   } 
   ```

   **Response**

   *STATUS 200: Router processed the request, details are in the response body*

   ```json
   {
    "isOk": true,
    "autotranscribeResponse": {
      "customer": {
        "streamId": "5ce2b755-3f38-11ed-b755-7aed4b5c38d5",
        "status": {
          "code": 1000,
          "description": "OK"
        }
      },
      "agent": {
        "streamId": "cf31116-3f38-11ed-9116-7a0a36c763f1",
        "status": {
          "code": 1000,
          "description": "OK"
        }
      }
    }
   }
   ```

2. The agent and customer begin their conversation and separate HTTPS POST `transcript` messages are sent for each participant from ASAPP's webhook publisher to a target endpoint configured to receive the messages.

   HTTPS **POST** for Customer Utterance

   ```json
   {
     type: "transcript",
     externalConversationId: "8c259fea-8764-4a92-adc4-73572e9cf016",
     streamId: "5ce2b755-3f38-11ed-b755-7aed4b5c38d5",
     sender: {
       externalId: "TT9833237",
       role: "customer",
     },
     autotranscribeResponse: {
       message: 'transcript',
       start: 400,
       end: 3968,
       utterance: [
          {text: "I need help upgrading my streaming package and my PIN number is ####"}
         ]
     }
   }
   ```

   HTTPS **POST** for Agent Utterance

   ```json
   {
     type: "transcript",
     externalConversationId: "8c259fea-8764-4a92-adc4-73572e9cf016",
     streamId: "cf31116-3f38-11ed-9116-7a0a36c763f1",
     sender: {
       externalId: "RE223444211993",
       role: "agent",
     },
     autotranscribeResponse: {
       message: 'transcript',
       start: 4744,
       end: 8031,
       utterance: [
          {text: "Thank you sir, let me pull up your account."}
         ]
     }
   }
   ```

3. Later in the conversation, the agent puts the customer on hold. This triggers a request to the `/stop-streaming` endpoint to pause transcription and prevents hold music and promotional messages from being transcribed.

   **POST** `/mg-autotranscribe/v1/stop-streaming`

   **Request**

   ```json
   {
    "namespace": "amazonconnect",
    "guid": "8c259fea-8764-4a92-adc4-73572e9cf016",
   }
   ```

   **Response**

   *STATUS 200: Router processed the request, details are in the response body*

   ```json
   {
    "isOk": true,
    "autotranscribeResponse": {
      "customer": {
        "streamId": "5ce2b755-3f38-11ed-b755-7aed4b5c38d5",
        "status": {
          "code": 1000,
          "description": "OK"
        },
        "summary": {
          "totalAudioBytes": 1334720,
          "audioDurationMs": 83420,
          "streamingSeconds": 84,
          "transcripts": 2
        },
      "agent": {
        "streamId": "cf31116-3f38-11ed-9116-7a0a36c763f1",
        "status": {
          "code": 1000,
          "description": "OK"
        },
        "summary": {
          "totalAudioBytes": 1334720,
          "audioDurationMs": 83420,
          "streamingSeconds": 84,
          "transcripts": 2
        },
      }
    }
   }
   ```

### Data Security

ASAPP's security protocols protect data at each point of transmission, from first user authentication to secure communications to our auditing and logging system (which includes hashing of data in transit) all the way to securing the environment when data is at rest in the data logging system. The teams at ASAPP are also under tight restraints in terms of access to data. These security protocols protect both ASAPP and its customers.


# AutoTranscribe via Direct Websocket
Source: https://docs.asapp.com/autotranscribe/direct-websocket

Use a websocket URL to send audio media to AutoTranscribe

Your organization can use AutoTranscribe to transcribe voice interactions between contact center agents and their customers, in support of a broad range of use cases including analysis, coaching, and quality management.

ASAPP AutoTranscribe is a streaming speech-to-text transcription service that works both with live streams and with audio recordings of completed calls. Integrating your voice system with GenerativeAgent using the AutoTranscribe Websocket enables real-time communication, allowing for seamless interaction between your voice platform and GenerativeAgent's services.

AutoTranscribe service is powered by a speech recognition model that transforms spoken form to written forms in real-time, along with punctuation and capitalization. To optimize performance, the model can be customized to support domain-specific needs by training on historical call audio and adding custom vocabulary to further boost recognition accuracy.

Some benefits of using Websocket to Stream events include:

* Websocket Connection: Establish a persistent connection between your voice system and the GenerativeAgent server.
* API Streaming: All audio streaming, call signaling, and returned transcripts use a WebSocket API, preceded by an authentication mechanism using a REST API
* Real-time Data Exchange: Messages are exchanged in real time, ensuring quick responses and efficient handling of user queries.
* Bi-directional Communication: Websockets facilitate bi-directional communication, making the interaction smooth and responsive.

### Implementation Steps

1. Step 1: Authenticate with ASAPP
2. Step 2: Open a Connection
3. Step 3: Start an Audio Stream
4. Step 4: Send the Audio Stream
5. Step 5: Receive the free-text Transcriptions from AutoTranscribe
6. Step 6: Stop the Audio Stream

Finalize the audio stream when the conversation is over or escalated to a human agent

### How it works

1. The API Gateway authenticates customer requests and returns a WebSocket URL, which points to the Voice Gateway with secure protocol.
2. The Voice Gateway validates the client connection request, translates public WebSocket API calls to internal protocols and sends live audio streams to the Speech Recognition Server
3. The Redaction Server redacts the transcribed texts with given customizable redaction rules if redaction is requested.
4. The texts are sent to AutoTranscribe so it can analyze and reply back

This guide covers the **WebSocket API** solution pattern, which consists of an API Gateway, Voice Gateway, Speech Recognition Server and Redaction Server, where:

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-943bb07d-59b2-bfc3-921f-1251b8198153.png" />
</Frame>

### Integration Steps

Here's a high level overview of how to work with AutoTranscribe:

1. Authenticate with ASAPP to gain access to the AutoTranscribe API.
2. Establish a WebSocket connection with the ASAPP Voice Gateway.
3. Send a `startStream` message with appropriate feature parameters specified.
4. Once the request is accepted by the ASAPP Voice Gateway, stream audio as binary data.
5. The ASAPP voice server will return transcripts in multiple messages.
6. Once the audio streaming is completed, send a `finishStream` to indicate to the Voice server that there is no more audio to send for this stream request.
7. Upon completion of all audio processing, the server sends a `finalResponse` which contains a summary of the stream request.

### Requirements

**Audio Stream Format**

In order to be transcribed properly, audio sent to ASAPP AutoTranscribe must be in mono or single-channel for each speaker.

Audio is sent as binary format through the WebSocket; the audio encoding (sample rate and encoding format) should be given in the `startStream` message.

For real-time live streaming, ASAPP recommends that you stream audio chunk-by-chunk in a real-time streaming format, by sending every 20ms or 100ms of audio as one binary message and sending the next chunk after a 20ms or 100ms interval.

If the chunk is too small, it will require more audio binary messages and more downstream message handling; if the chunk is too big, it increases buffering pressure and slows down the server responsiveness.

Exceptionally large chunks may result in WebSocket transport errors such as timeouts.

<Note>
  When supplying recorded audio to ASAPP for AutoTranscribe model training prior to implementation, send uncompressed `.WAV` media files with speaker-separated channels.

  Recordings for training and real-time streams should have both the same sample rate (8000 samples/sec) and audio encoding (16-bit PCM).

  See the [Customization section of the AutoTranscribe Product Guide](/autotranscribe/product-guide#customization) for more on data requirements for transcription model training.
</Note>

**Developer Portal**

ASAPP provides an AI Services [Developer Portal](/getting-started/developers). Within the portal, developers can do the following:

* Access relevant API documentation (e.g. OpenAPI reference schemas)
* Access API keys for authorization
* Manage user accounts and apps

<Tip>
  Visit the [Get Started](/getting-started/developers) for instructions on creating a developer account, managing teams and apps, and setup for using AI Service APIs.
</Tip>

## Step 1 : Authenticate with ASAPP and Obtain an Access URL

<Note>
  All requests to ASAPP sandbox and production APIs must use `HTTPS` protocol. Traffic using `HTTP` will not be redirected to `HTTPS`.
</Note>

The following HTTPS REST API enables authentication with the ASAPP API Gateway:

* `asapp-api-id` and `asapp-api-secret`are required header parameters, both of which will be provided to you by ASAPP.
* A unique conversation ID is recommended to be sent in the request body as `externalId`. ASAPP refers to this identifier from the client's system in real-time streaming use cases to redact utterances using context from other utterances in the same conversation (e.g. reference to a credit card in an utterance from 20s earlier). It is the client's responsibility to ensure `externalId` is unique.

[`POST /autotranscribe/v1/streaming-url`](/apis/autotranscribe/get-streaming-url)

Headers (required)

```json
{
    "asapp-api-id": <asapp provided api id>,
    "asapp-api-secret": <asapp provided api secret>
}
```

Request body (optional)

```json
{
    "externalId": "<unique conversation id>"
}

```

If the authentication succeeds, a secure WebSocket short-lived access URL will be returned in the HTTP response body. Default TTL (time-to-live) for this URL is 5 minutes.

```json
{
    "streamingUrl": "<short-lived access URL>"
}
```

## Step 2: Open a Connection

Before sending any message, create a WebSocket connection with the access URL obtained from previous step:

`wss://<internal-voice-gateway-ingress>?token=<short_lived_access_token>`

A WebSocket connection will be established if the `short_lived_access_token` is validated. Otherwise, the requested connection will be rejected.

## Step 3: Start a stream audio message

AutoTranscribe uses the following message sequence for streaming audio, sending transcripts, and ending streamings:

|    | **Send Your Request**  | **Receive ASAPP Response** |
| :- | :--------------------- | :------------------------- |
| 1  | `startStream` message  | `startResponse` message    |
| 2  | Stream audio           | `transcript` message       |
| 3  | `finishStream` message | `finalResponse` message    |

<Note>
  WebSocket protocol request messages in the sequence must be formatted as text (UTF-8 encoded string data); only the audio stream should be formatted in binary. All response messages will also be formatted as text.
</Note>

### Send startStream message

Once the connection is established, send a `startStream` message with information about the speaker including their `role` (customer, agent) and their unique identifier (`externalId`) from your system before sending any audio packets.

```json
{
   "message":"startStream",
   "sender": {
          "role": "customer",
          "externalId": "JD232442"
   }
}
```

Provide additional [optional fields](#fields-and-parameters) in the `startStream` message to adjust default transcription settings.

For example, the default `language` transcription setting is `en-US` if not denoted in the `startStream` message. To set the language to Spanish, the `language` field should be set with value `es-US`. Once set, AutoTranscribe will expect a Spanish conversation in the audio stream and return transcribed message text in Spanish.

### Receive startResponse message

For any `startStream` message, the server will respond with a `startResponse` if the request is granted:

```json
{
   "message": "startResponse",
   "streamID": "128342213",
   "status": {
          "code": "1000",
          "description": "OK"
   }
}
```

The `streamID` is a unique identifier assigned to the connection by the ASAPP server.

The status code and description may contain additional useful information.

If there is an application status code error with the request, the ASAPP server sends a `finalResponse` message with an error description, and the server then closes the connection.

## Step 4: Send the audio stream

You can start to stream audio as soon as the  `startStream` message is sent without the need to wait for the `startResponse`. However, it is possible a request could be rejected either due to an invalid `startStream` or internal server errors. If that is the case, the server notifies with a `finalResponse` message, and any streamed audio packets will be dropped by the server.

Audio must be sent as binary data of WebSocket protocol:

`ws.send(<binary_blob>)`

The server does not acknowledge receiving individual audio packets. The summary in the `finalResponse` message can be used to verify if any audio packet was not received by the server.

If audio can be transcribed, the server sends back `transcript` messages asynchronously.

For real-time live streaming, it is recommeneded that audio streams are sent chunk-by-chunk, sending every 20ms or 100ms of audio as one binary message. Exceptionally large chunks may result in WebSocket transport errors such as timeouts.

### Receive transcript messages

The server sends back the `transcript` message, which contains one complete utterance.

Example of a `transcript` message:

```json
{
   "message": "transcript",
   "start": 0,
   "end": 1000,
   "utterance":
   [
      {"text": "Hi, my ID is 123."}
   ]
}
```

## Step 5: Receive Transcriptions from AutoTranscribe

Now you must call `GET /messages` to receive all the transcript messages for a completed call.

Conversation transcripts are available for seven days after they are completed.

```json
curl -X GET 'https://api.sandbox.asapp.com/conversation/v1/conversation/messages' \
--header 'asapp-api-id: <API KEY ID>' \
--header 'asapp-api-secret: <API TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
    "externalId": "Your GUID/UCID of the SPIREC Call"
}'

```

A successful response returns a 200 and the Call Transcripts

```json
{
  "type": "transcript",
  "externalConversationId": "<guid>",
  "streamId": "<streamId>",
  "sender": {
    "externalId": "<id>",
    "role": "customer",  // or "agent"
  },
  "autotranscribeResponse": {
    "message": "transcript",
    "start": 0,
    "end": 1000,
    "utterance": [
       {"text": "<transcript text>"}
      ]
  }
}

```

## Step 6: Stop the streaming audio message

### Send finishStream message

When the audio stream is complete, send a `finishStream` message. Any audio message sent after `finishStream` will be dropped by the service.

```json
{
   "message": "finishStream"
}
```

Any other non-audio messages sent after `finishStream` will be dropped, the service will send a `finalResponse` with error code 4056 (Wrong message order) and the connection will be closed.

### Receive finalResponse message

The server sends a `finalResponse` at the end of the streaming session and closes the connection, after which the server will stop processing incoming messages for the stream. It is safe to close the WebSocket connection when the `finalResponse` message is received.

The server will end a given stream session if any of following are true:

* Server receives `finishStream` and all audio received has been processed
* Server detects connection idle timeout (at 60 seconds)
* Server internal errors (unable to recover)
* Request message is invalid (note: if the access token is invalid, the WebSocket will close with a WebSocket error code)
* Critical requested feature is not supported, for example, redaction
* Service maintenance
* Streaming duration over limit (default is 3 hours)

In case of non-application WebSocket errors, the WebSocket layer closes the connection, and the server may not get an opportunity to send a `finalResponse` message.

The `finalResponse`message has a summary of the stream along with the status code, which you can use to verify if there are any missing audio packets or transcript messages:

```json
{
   "message": "finalResponse",
   "streamId": "128342213",
   "status": {
       "code": "1000",
       "description": "OK"
   },
   "summary": {
       "totalAudioBytes": 300,     // number of audio bytes received 
       "audioDurationMs": 6000,    // audio length in milliseconds processed by the server
       "streamingSeconds": 6,
       "transcripts": 10     // number of transcripts recognized
}
```

## Fields & Parameters

### StartStream Request Fields

| Field                        | Description                                                                                                                                                                                                                                                                                                                                             | Default  | Supported Values                                     |
| :--------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :------- | :--------------------------------------------------- |
| sender.role (required)       | A participant role, usually the customer or an agent for human participants.                                                                                                                                                                                                                                                                            | n/a      | "agent", "customer"                                  |
| sender.externalId (required) | Participant ID from the external system, it should be the same for all interactions of the same individual                                                                                                                                                                                                                                              | n/a      | "BL2341334"                                          |
| language                     | IETF language tag                                                                                                                                                                                                                                                                                                                                       | en-US    | "en-US", "es-US"                                     |
| samplingRate                 | Audio samples/sec                                                                                                                                                                                                                                                                                                                                       | 8000     | 8000                                                 |
| encoding                     | 'L16': PCM data with 16 bit/sample                                                                                                                                                                                                                                                                                                                      | L16      | "L16"                                                |
| smartFormatting              | Request for post processing: Inverse Text Normalization (convert spoken form to written form), e.g., 'twenty two --> 22'. Auto punctuation and capitalization                                                                                                                                                                                           | true     | true, false                                          |
| detailedToken                | If true, outputs word-level details like word content, timestamp and word type.                                                                                                                                                                                                                                                                         | false    | true, false                                          |
| audioRecordingAllowed        | false: ASAPP will not record the audio; true: ASAPP may record and store the audio for this conversation                                                                                                                                                                                                                                                | false    | true, false                                          |
| redactionOutput              | If detailedToken is true along with value 'redacted' or 'redacted\_and\_unredacted', request will be rejected. If no redaction rules configured by the client for 'redacted' or 'redacted\_and\_unredacted', the request will be rejected. If smartFormatting is False, requests with value 'redacted' or 'redacted\_and\_unredacted' will be rejected. | redacted | "redacted", "unredacted","redacted\_and\_unredacted" |

### Transcript Message Response Fields

| Field          | Description                                                                                                                                                                                                      | Format  | Example Syntax      |
| :------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------ | :------------------ |
| start          | Start time (millisecond) of the utterance (in milliseconds) relative to the start of the audio input                                                                                                             | integer | 0                   |
| end            | End time (millisecond) of the utterance (in milliseconds) relative to the start of the audio input                                                                                                               | integer | 300                 |
| utterance.text | The written text of the utterance. While an utterance can have multiple alternatives (e.g., 'me two' vs. 'me too') ASAPP provides only the most probable alternative only, based on model prediction confidence. | array   | "Hi, my ID is 123." |

If the `detailedToken` in `startStream` request is set to true, additional fields are provided within the `utterance` array for each `token`:

| Field                   | Description                                                                                                                                                                                        | Format  | Example Syntax |
| :---------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------ | :------------- |
| token.content           | Text or punctuation                                                                                                                                                                                | string  | "is", "?"      |
| token.start             | Start time (millisecond) of the token relative to the start of the audio input                                                                                                                     | integer | 170            |
| token.end               | End time (millisecond) audio boundary of the token relative to the start of the audio input, there may be silence after that, so it does not necessarily match with the startMs of the next token. | integer | 200            |
| token.punctuationAfter  | Optional, punctuation attached after the content                                                                                                                                                   | string  | '.'            |
| token.punctuationBefore | Optional, punctuation attached in front of the content                                                                                                                                             | string  | '"'            |

### Custom Vocabulary

The ASAPP speech server can boost specific word accuracy if a target list of vocabulary words is provided before recognition starts, using an `updateVocabulary` message.

The `updateVocabulary` service can be sent multiple times during a session. Vocabulary is additive, which means the new vocabulary words are appended to the previous ones. If vocabulary is sent in between sent audio packets, it will take into effect only after the end of the current utterance being processed.

All `updateVocabulary` changes are valid only for the current WebSocket session.

The following fields are part of a `updateVocabulary` message:

| Field      | Description                                                                                                                                                                                                                                                                                                                | Mandatory | Example Syntax                                     |
| :--------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------- | :------------------------------------------------- |
| phrase     | Phrase which needs to be boosted. Prevent adding longer phrases, instead add them as separate entries.                                                                                                                                                                                                                     | Yes       | "IEEE"                                             |
| soundsLike | This provides the ways in which a phrase can be said/pronounced. Certain rules: - Spell out numbers (25 -> 'two five' and/or 'twenty five') - Spell out acronyms (WHO -> 'w h o') - Use lowercase letters for everything - Limit phrases to English and Spanish-language letters (accented consonants and vowels accepted) | No        | "i triple e"                                       |
| category   | Supported Categories: 'address', 'name', 'number'. Categories help the AutoTranscribe service normalize the provided phrase so it can guess certain ways in which a phrase can be pronounced. e.g., '717 N Blvd' with 'address' category will help the service normalize the phrase to 'seven one seven North Boulevard'   | No        | "address", "name", "number", "company", "currency" |

Example request and response:

**Request**

```json
{
    "message": "updateVocabulary",
    "phrases":
    [
        {
            "phrase": "IEEE",
            "category": "company",
            "soundsLike":
            [
                "I triple E"
            ]
        },
        {
            "phrase": "25.00",
            "category": "currency",
            "soundsLike":
            [
                "twenty five dollars"
            ]
        },
        {
            "phrase": "HHilton",
            "category": "company",
            "soundsLike":
            [
                "H Hilton",
                "Hilton Honors"
            ]
        },
        {
            "phrase": "Jon Snow",
            "category": "name",
            "soundsLike":
            [
                "John Snow"
            ],
        },
        {
            "phrase": "717 N Shoreline Blvd",
            "category": "address"
        }
    ]
}
```

**Response**

```json
{
   "message": "vocabularyResponse",
   "status": {
    "code": "1000",
    "description": "OK"
}
```

### Application Status Codes

| Status code | Description                                                                                                           |
| :---------- | :-------------------------------------------------------------------------------------------------------------------- |
| 1000        | OK                                                                                                                    |
| 1008        | Invalid or expired access token                                                                                       |
| 2002        | Error in fetching conversationId. This error code is only possible when integration with other AI Services is enabled |
| 4040        | Message format incorrect                                                                                              |
| 4050        | Language not supported                                                                                                |
| 4051        | Encoding not supported                                                                                                |
| 4053        | Sample rate not supported                                                                                             |
| 4056        | Wrong message order or missing required message                                                                       |
| 4080        | Unable to transcribe the audio                                                                                        |
| 4082        | Audio decode failure                                                                                                  |
| 4083        | Connection idle timeout. Try streaming audio in real-time                                                             |
| 4084        | Custom vocabulary phrase exceeds limit                                                                                |
| 4090        | Streaming duration over limit                                                                                         |
| 4091        | Invalid vocabulary format                                                                                             |
| 4092        | Redact only smart formatted text                                                                                      |
| 4093        | Redaction only supported if detailedTokens in True                                                                    |
| 4094        | RedactionOutput cannot be unredacted or redacted\_and\_unredacted because of global config being to always redact     |
| 5000        | Internal service error                                                                                                |
| 5001        | Service shutting down                                                                                                 |
| 5002        | No instances available                                                                                                |

## Retrieving Transcript Data

In addition to real-time transcription messages via WebSocket, AutoTranscribe also can output transcripts through two other mechanisms:

* **After-call**: GET endpoint responds to your requests for a designated call with the full set of utterances from that completed conversation
* **Batch**: File Exporter service responds to your request for a designated time interval with a link to a data feed file that includes all utterances from that interval's conversations

### After-Call via GET Request

[`GET /conversation/v1/conversation/messages`](/apis/conversations/list-messages-with-an-externalid)

Use this endpoint to retrieve all the transcript messages for a completed call.

**When to Call**

Once the conversation is complete. Conversation transcripts are available for seven days after they are completed.

<note>
  For conversations that include transfers, the endpoint will provide transcript messages for all call legs that correspond to the call's identifier.
</note>

**Request Details**

Requests must include a call identifier with the GUID/UCID of the SIPREC call.

**Response Details**

When successful, this endpoint responds with an array of objects, each of which corresponds to a single message. Each object contains the text of the message, the sender's role and identifier, a unique message identifier, and timestamps.

<Tip>
  Transcription settings (e.g. language, detailed tokens, redaction), for a given call are set with [the `startStream` websocket message](#startstream-request-fields), when call transcription is initiated. All transcripts retrieved after the call will reflect the initially requested settings in the `startStream` message.
</Tip>

**Message Limit**

This endpoint will respond with up to 1,000 transcribed messages per conversation, approximately a two-hour continuous call. All messages are received in a single response without any pagination.

To retrieve all messages for calls that exceed this limit, use either a real-time mechanism or File Exporter for transcript retrieval.

### Batch via File Exporter

AutoTranscribe makes full transcripts for batches of calls available using the File Exporter service's `utterances` data feed.

The File Exporter service is meant to be used as a batch mechanism for exporting data to your data warehouse, either on a scheduled basis (e.g. nightly, weekly) or for ad hoc analyses. Data that populates feeds for the File Exporter service updates once daily at 2:00AM UTC.

Visit [Retrieving Data for AI Services](/reporting/file-exporter) for a guide on how to interact with the File Exporter service.


# AutoTranscribe Feature Releases
Source: https://docs.asapp.com/autotranscribe/feature-releases



| Feature Name                     | Feature Release Details                                                                                                                                            | Additional Relevant Information (if available)                  |
| :------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------- |
| **Get Transcript API**           | [Get Transcript API](/autotranscribe/feature-releases/get-transcript-api-for-autotranscribe "Get Transcript API for AutoTranscribe")                               | For after-call transcript retrieval                             |
| **Twilio Media Gateway**         | [Twilio Media Gateway](/autotranscribe/feature-releases/twilio-media-gateway-for-autotranscribe "Twilio Media Gateway for AutoTranscribe")                         | Support for streaming Twilio Media Streams to ASAPP             |
| **Health Check API**             | [Health Check API](/autotranscribe/feature-releases/health-check-api "Health Check API")                                                                           |                                                                 |
| **Amazon Connect Media Gateway** | [Amazon Connect Media Gateway](/autotranscribe/feature-releases/amazon-connect-media-gateway-for-autotranscribe "Amazon Connect Media Gateway for AutoTranscribe") | Support for streaming media from Kinesis Video Streams to ASAPP |
| **Sandbox for AutoTranscribe**   | [Sandbox for AutoTranscribe](/autotranscribe/feature-releases/sandbox-for-autotranscribe "Sandbox for AutoTranscribe")                                             |                                                                 |
| **Custom Redaction Entities**    | [Redaction Entities Configuration API](/autotranscribe/feature-releases/redaction-entities-configuration-api "Redaction Entities Configuration API")               |                                                                 |
| **Custom Vocab Features**        | [Custom Vocabulary Configuration API](/autotranscribe/feature-releases/custom-vocabulary-configuration-api "Custom Vocabulary Configuration API")                  |                                                                 |


# Amazon Connect Media Gateway for AutoTranscribe
Source: https://docs.asapp.com/autotranscribe/feature-releases/amazon-connect-media-gateway-for-autotranscribe



## Feature Release

This is the announcement for an upcoming ASAPP feature. Your ASAPP account team will provide a target release date and can direct you to more detailed information as needed.

## Overview

ASAPP is adding an AutoTranscribe implementation pattern for Amazon Connect. ASAPP's Amazon Connect Media Gateway will allow Kinesis Video Streams audio to be easily sent to AutoTranscribe. A similar call signaling integration via the Start/Stop API will be leveraged as is used for the integration with the SIPREC Media Gateway.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-63e69ede-ddad-5788-50c8-2405418939f8.png" />
</Frame>

*Amazon Connect Lambda functions send requests to start and stop transcription. ASAPP requests streaming media from Kinesis Video Streams and produces transcripts for real-time, after-call, and batch use cases.*

## Use and Impact

The new Media Gateway will allow for a simplified integration for customers leveraging Amazon Connect as their CCaaS provider, reducing time and effort of sending call media to ASAPP.

## How It Works

**Procedure of streaming audio to ASAPP**

1. Setup IAM roles for authentication with Kinesis Video Streams and enable media streaming.
2. Configure triggers to start and stop media streaming in Connect flows.
3. Send requests to start and stop transcription using AWS Lambda functions, including parameters that ASAPP uses to request media from Kinesis.
4. ASAPP requests media from Kinesis Video Streams and begins transcribing upon acquiring media.
5. Receive transcript outputs leveraging one of ASAPP's transcription delivery mechanisms.

**Transcription Settings**

Transcription settings (e.g., redaction, language) are configured as part of requests to the `/start-streaming` endpoint and will be reflected in the messages returned from ASAPP. No further configuration is required.

## FAQs

**Is integration with the Start/Stop API required?**

Yes. Start requests to the API provide ASAPP with required call attributes to request customer and agent audio from Kinesis Video Streams.

Stop requests are also required, as they allow AutoTranscribe to exclude hold and queue audio from transcription. This is a requirement for downstream services to function properly, ensuring transcription is only leveraged where necessary.


# Custom Vocabulary Configuration API
Source: https://docs.asapp.com/autotranscribe/feature-releases/custom-vocabulary-configuration-api



## Feature Release

This is the announcement for an upcoming ASAPP feature. Your ASAPP account team will provide a target release date and can direct you to more detailed information as needed.

## Overview

AutoTranscribe is being extended with a new self-serve feature for ASAPP's partners, Custom Vocabulary. This feature allows users to independently add or delete business-specific keywords within a custom vocabulary set.

These keywords will be included during the ASAPP's ASR model fine-tuning, enhancing transcription accuracy to better suit their specific needs.

## Use and Impact

The custom vocab features aim to deliver significant benefits to the customers and partners:

* **Faster onboarding**
  Enables swift initial configuration, expediting the onboarding process for customers. This feature reduces dependency on the ASAPP Delivery team.
* **Business-Specific Terminology & Contextual Relevance**
  By allowing clients to add industry-specific terms/words, and names, the ASR model can better recognize and accurately transcribe these words and generate more precise transcriptions, which are often missed or misinterpreted by generic models.

This feature is fully customizable and self-serviceable. Users can create/update/delete a custom vocabulary containing specific keywords tailored to their domain and line of business. The scenarios where this feature is particularly beneficial include:

* When the Speech-to-Text (ASR) service needs to incorporate business-specific terminologies and keywords.

## How It Works

**Field Description**

| Field Name                        | Type   | Description                                                                                                      |
| --------------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------- |
| custom-vocabularies               | list   | Custom vocabularies list<br /><br />By default, the list will display up to 20 custom vocabs. Can be configured. |
| custom-vocabularies\[].id         | string | System generated id                                                                                              |
| custom-vocabularies\[].phrase     | string | The phrase to place in the transcribed text                                                                      |
| custom-vocabularies\[].soundsLike | list   | List of similar phrases for the received sound                                                                   |
| nextCursor                        | id     | Next field ID<br /><br />Will be null for the first page                                                         |
| prevCursor                        | id     | Previous field ID<br /><br />Will be null for the last page                                                      |

**API Endpoints**

1. List all custom vocabs
   `GET /configuration/v1/auto-transcribe/custom-vocabularies`
   Sample response
   ```json
   {
     "customVocabularies": 
   [
       {
         "id": "563a0954-1db7-4b96-bf21-fa84de137742",
         "phrase": "IEEE",
         "soundsLike": [
                      "I triple E"
                      ]
        },
        {
          "id": "7939d838-774c-46fe-9f18-5ebf15cf3e9c",
          "phrase": "NATO",
          "soundsLike": [
                      "Nae tow",
                      "Naa toe"
                      ]
        }
     ],
      "nextCursor": "4c576035-870e-47cf-88ef-8d29e6b5d7e8",
      "prevCursor": null 
    }
   ```
2. Details of a particular custom vocab
   `GET /configuration/v1/auto-transcribe/custom-vocabularies/\{customVocabularyId\}`
   Sample response
   ```json
   {
     "id": "6B29FC40-CA47-1067-B31D-00DD010662DA", 
     "phrase": "IEEE",
     "soundsLike":[
       "I triple E"
     ]
   }
   ```
3. Create a custom vocab
   `POST /configuration/v1/auto-transcribe/custom-vocabularies`
   Sample Request
   ```json
   {
     "phrase": "IEEE",
     "soundsLike": [
       "I triple E"
     ]
   }
   ```
   Sample response
   ```json
   {
     "id": "6B29FC40-CA47-1067-B31D-00DD010662DA", 
     "phrase": "IEEE",
     "soundsLike":[
       "I triple E"
     ]
   }
   ```
4. Delete a custom vocab
   `DELETE /configuration/v1/auto-transcribe/custom-vocabularies/\{customVocabularyId\}`

## FAQs

* **Can I modify the custom vocabulary after it's been created?**

  Yes, users can update the custom vocabulary at any time. To do so, first delete the existing vocabulary and then submit a new create request.
  This process ensures that the vocabulary remains current and relevant.

* **Can I send the create request for multiple custom vocab additions?**

  Currently multiple custom vocab addition capability is not live, users must submit individual create requests for each addition.
  That said, If a large number of additions are required, please contact ASAPP's support team for assistance.

* **Is there a limit to the number of custom vocabularies that can be added?**

  Yes, The maximum number of custom vocabulary entries is 200. However, this limit is subject to change as ASAPP continuously updates and expands its backend capabilities to support more custom vocab.

* **Is there a limit to the number of sounds like items within the custom vocab?**

  The maximum number of sounds like items should be 5 and length of each item should be 40 characters


# Get Transcript API for AutoTranscribe
Source: https://docs.asapp.com/autotranscribe/feature-releases/get-transcript-api-for-autotranscribe



## Feature Release

This is the announcement for an upcoming ASAPP feature. Your ASAPP account team will provide a target release date and can direct you to more detailed information as needed.

## Overview

ASAPP is adding a new endpoint that retrieves the full set of messages for a specified conversation. This expands the delivery use cases for AutoTranscribe, providing a means to get a complete transcript at the end of a conversation on-demand, instead of in real-time during the conversation or in daily batches of conversations.

## Use and Impact

This new endpoint is intended to support use cases for full transcripts that require them for end-users or automated services once a conversation ends, rather than on a delayed basis. Potential use cases include:

* Coaching and quality assurance review
* After-call dispositioning workflows
* Agent reference for recent calls
* Text analytics

In rare cases where real-time transcript delivery fails, this endpoint also functions as a fallback option to retrieve conversation messages.

## How It Works

`GET /conversation/v1/conversation/messages` takes a single conversation identifier and immediately returns an array of messages that covers the full conversation.

Each message includes the transcribed text of the utterance, the role and unique identifier of the sender (agent or customer), and the utterance's created timestamp. For example:

```json
{
    "text": "Hello, I'd like to upgrade my plan to gold.",
    "sender": {
        "role": "customer",
        "externalId": "123"
    },
    "timestamp": "2022-11-23T12:13:14.555Z"
}
```

<Note>
  This endpoint should not be used for retrieving individual messages in real-time.
</Note>

**Configuration**

Transcription settings (e.g. redaction, language) must be configured as part of implementing AutoTranscribe and will be reflected in the messages returned from this endpoint. No further configuration is required.

## FAQs

1. **Can this endpoint be called before a conversation ends?**

   This endpoint is designed only for after-call retrieval of a transcript. AutoTranscribe offers separate real-time mechanisms for use cases that require conversation utterances during the call.
   Refer to the [AutoTranscribe Deployment Guides for WebSocket](/autotranscribe/direct-websocket) and [media gateway](/autotranscribe/siprec) respectively for more information about real-time transcript delivery.

2. **How does AutoTranscribe return conversation messages for multiple conversations?**

   This endpoint only returns transcripts for a single conversation. ASAPP's File Exporter API provides a batch mechanism for retrieving transcripts for multiple conversations at once. The data source is updated daily and returns utterances for all conversations in the update interval.


# Health Check API
Source: https://docs.asapp.com/autotranscribe/feature-releases/health-check-api



## Feature Release

This is the announcement for an upcoming ASAPP feature. Your ASAPP account team will provide a target release date and can direct you to more detailed information as needed.

## Overview

ASAPP provides a means for our customers to check the operational status of our API platform. Developers can ping this endpoint to verify that the ASAPP infrastructure is working as expected.

## Use and Impact

Developers can either check ad hoc if the ASAPP infrastructure is up at a given time or implement automated API monitoring to send a request to the Health Check API at a preset interval.

This feature is intended to improve developer confidence when integrating with ASAPP services. It also removes the need for developers to send requests to other ASAPP services to check their status, which may trigger errors unnecessarily.

## How It Works

Developers can run a `GET https://api.sandbox.asapp.com/v1/health` operation and inspect for a 200 response with either the SUCCESS or FAILED value for the status of the core ASAPP platform.

**Configuration**

Developers must request access to the API endpoint in the Developer Portal:

1. Access the Developer Portal.
2. Navigate to **Apps**, select your application, and authorize the Health Check API.
3. Reach out to your ASAPP account team to authorize access.


# Redaction Entities Configuration API
Source: https://docs.asapp.com/autotranscribe/feature-releases/redaction-entities-configuration-api



## Feature Release

This is the announcement for an upcoming ASAPP feature. Your ASAPP account team will provide a target release date and can direct you to more detailed information as needed.

## Overview

AutoTranscribe is being enhanced with a new self-serve feature to support entities for its redaction service, available to ASAPP's partners and customers.

This feature allows users to independently add or delete both PCI and PII entities for redaction. Once enabled, these entities will be applied to the transcribed audio, ensuring that transcriptions are appropriately redacted and customer data remains secure. Below is a list of some sample entities:

**PCI (Payment Card Industry)**

| Entity Label         | Status       | Description                                                                                                                                                                                  |
| -------------------- | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| CREDIT\_CARD\_NUMBER | auto-enabled | Credit card numbers<br /><br />Non-redacted: 0111 0111 0111 0111<br /><br />Redacted: \*\*\*\* \*\*\*\* \*\*\*\*1312<br /><br />Cannot be changed/updated without ASAPP’s security approval. |
| CVV                  | auto-enabled | 3- or 4-digit card verification codes and/or equivalents<br /><br />Non-redacted: 561<br /><br />Redacted: \*\*\*<br /><br />Cannot be changed/updated without ASAPP’s security approval.    |

**PII (Personally Identifiable Information)**

| Entity Label  | Status       | Description                                                                                                                |
| ------------- | ------------ | -------------------------------------------------------------------------------------------------------------------------- |
| PASSWORD      | auto-enabled | Account passwords  <br /><br /> Non-redacted: qwer1234  <br /><br /> Redacted: \*\*\*\*\*\*\*                              |
| PIN           | auto-enabled | Personal Identification Number  <br /><br /> Non-redacted: 5614  <br /><br /> Redacted: \*\*\*\*                           |
| SSN           | auto-enabled | Social Security Number  <br /><br /> Non-redacted: 012-03-1134  <br /><br /> Redacted: \***-**-1134                        |
| EMAIL         | not enabled  | Email address  <br /><br /> Non-redacted: [test@asapp.com](mailto:test@asapp.com)  <br /><br /> Redacted: \*\*\*@asapp.cpm |
| PHONE\_NUMBER | not enabled  | Telephone or fax number  <br /><br /> Non-redacted: +11234567891  <br /><br /> Redacted: \*\*\*\*\*\*\*\*\*\*\*            |
| DOB           | not enabled  | Date of Birth  <br /><br /> Non-redacted: Jan 31, 1980  <br /><br /> Redacted: \*\*\*\*\*\*                                |
| PROFANITY     | not enabled  | Profanities or banned vocabulary  <br /><br /> Non-redacted: "silly"  <br /><br /> Redacted: \*\*\*\*\*                    |

## Use and Impact

This feature allows users to fully customize and self-manage their own rules. With the ability to enable, disable, or delete custom redaction entities, users can tailor their security measures to align perfectly with their specific domain and business requirements.

This is particularly valuable for organizations handling sensitive information such as PCI and PII data, as it enables them to create redaction rules that address their unique compliance needs. The self-service aspect of this feature allows users to adapt to changing data protection demands without relying on external support.

<Note>
  Some PCI rules are driven by compliance and will be enabled by default. Users must obtain AA's approval to modify or update them.
</Note>

The Redaction Entities Configuration API aims to deliver significant benefits to customers and partners:

* **Tailored Redaction for Enhanced Data Security:**
  By enabling users to customize redaction entities, the redaction service can automatically apply these rules during transcription, aligning perfectly with their specific domain and business needs. This ensures precise redactions that are often missed or incorrectly handled by manual methods, thus enhancing the data security by ensuring that sensitive information is automatically redacted from transcriptions.
* **Faster Configuration**
  This feature allows for swift initial configuration, expediting the onboarding process for customers. It reduces dependency on ASAPP support teams, enabling customers to get up and running quickly and efficiently.

## How It Works

The API Calls take a single conversation identifier and immediately returns an array of messages that covers the full conversation.

| Field Name                       | Type    | Description                                               |
| :------------------------------- | :------ | :-------------------------------------------------------- |
| redactionEntities                | array   | Available redaction rules                                 |
| redactionEntities\[].id          | String  | The id of the redaction rule. Also a human readable name. |
| redactionEntities\[].name        | String  | Name of the redaction entity                              |
| redactionEntities\[].description | String  | Field Description                                         |
| redactionEntities\[].active      | Boolean | Indicates whether the redaction rule is active            |

1. **List redaction entities**
   `GET /configuration/v1/redaction/redaction-entities`
   Sample Response
   ```json
   {
       "redactionEntities": [
   {
       "id": "DOB",
       "name": "DOB",
       "description": "It redacts Data of birth content of data",
       "active": false
   },
   {
       "id": "PASSWORD",
       "name": "PASSWORD",
       "description": "It redacts passwords",
       "active": true
   },
   {
       "id": "PROFANITY",
       "name": "PROFANITY",
       "description": "It redacts words and phrases present in a list of known bad words",
       "active": false
   },
   {
       "id": "EMAIL",
       "name": "EMAIL",
       "description": "It redacts any well-formed email address (abc@asapp.com)",
       "active": true
   },
   {
       "id": "PHONE_NUMBER",
       "name": "PHONE_NUMBER",
       "description": "Redacts sequences of digits that could be phone numbers based on phone number formats.",
       "active": false
   },
   {
       "id": "CREDIT_CARD_NUMBER",
       "name": "CREDIT_CARD_NUMBER",
       "description": "Redacts credit card data",
       "active": true
   },
   {
       "id": "PIN",
       "name": "PIN",
       "description": "Redacts the pin",
       "active": true
   },
   {
       "id": "SSN",
       "name": "SSN",
       "description": "It redacts all the digits in next few sentences containing ssn keyword",
       "active": true
   }
   ],
       "nextCursor": null,
       "prevCursor": null
   }
   ```

2. **List current active redaction entities**
   `GET/configuration/v1/redaction/redaction-entities?active=true`
   Querying the redaction entities with the active flag shows which redaction rules are currently active.

   By default, all auto-enabled entities will be active for every user, however, users can update these rules to suit their individual needs

   Sample Response

   ```json
   {
       "redactionEntities": [
   {
       "id": "PASSWORD",
       "name": "PASSWORD",
       "description": "It redacts passwords",
       "active": true
   },
   {
       "id": "EMAIL",
       "name": "EMAIL",
       "description": "It redacts any well-formed email address (test@asapp.com)",
       "active": true
   },
   {
       "id": "CREDIT_CARD_NUMBER",
       "name": "CREDIT_CARD_NUMBER",
       "description": "Redacts credit card data",
       "active": true
   },
   {
       "id": "PIN",
       "name": "PIN",
       "description": "Redacts the pin",
       "active": true
   },
   {
       "id": "SSN",
       "name": "SSN",
       "description": "It redacts all the digits in next few sentences containing ssn keyword",
       "active": true
   }
   ],
       "nextCursor": null,
       "prevCursor": null
   }
   ```

3. **Fetch a redaction entity:**

   `GET /configuration/v1/redaction/redaction-entity/\{entityId\}`
   Sample Response

   ```json
   HTTP 200
   // Returns the redaction entity resource.
   ```

4. **Activate or Disable a redaction entity**

   Change an entity to active or not by setting the active flag.
   `PATCH /configuration/v1/redaction/redaction-entity/\{entityId\}`
   Sample Request Body

   ```json
   {
       "active":true
   }
   ```

   On success, returns HTTP 200 and the Redaction entity resource.
   Sample Response

   ```json
   {
       "id": "PASSWORD",
       "name": "PASSWORD",
       "description": "It redacts passwords",
       "active": true
   }
   ```

## FAQs

* **What is an entity?**

  In the context of redaction, an entity refers to a specific type or category of information that you want to remove or obscure from the response text. Entities are the "labels" for the pieces of information you want redacted. For example, "NAME" is an entity that represents personal names, "ADDRESS" represents physical addresses, and "ZIP" represents postal codes. When you wish to redact, you specify which entities you want redacted from your text.

* **Can I delete existing redaction entities?**

  Users can only enable or disable the predefined entities listed in the previous section. Due to PCI compliance regulations, two entities (CREDIT\_CARD\_NUMBER and CVV) are initially disabled and can only be removed through ASAPP's compliance process. All other entities are not enabled by default, but users have the flexibility to enable any of these according to their specific requirements. Users cannot create new entities or modify existing ones; they can only control the activation status of the predefined set.

* **What is the accuracy of the redaction service of ASAPP?**

  Our redaction service currently supports over 50 Out of the box (OOTB) entities, with the flexibility to expand and update this set as required. For specific entity customization, including enabling or disabling particular entities or suggesting new entities to tailor to your specific needs, please contact ASAPP's support team.


# Sandbox for AutoTranscribe
Source: https://docs.asapp.com/autotranscribe/feature-releases/sandbox-for-autotranscribe



## Feature Release

This is the announcement for an upcoming ASAPP feature. Your ASAPP account team will provide a target release date and can direct you to more detailed information as needed.

## Overview

AutoTranscribe Sandbox enables administrators to see speech-to-text capabilities designed for real-time agent assistance. Accessible through AI-Console, it's a playground designed to preview ASAPP's transcription without waiting for an integration to complete.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-dffed9bc-5bf1-5d6c-3a21-29d8e7ecd326.png" />
</Frame>

*AutoTranscribe showing conversation transcriptions in a sandbox environment.*

## Use and Impact

AutoTranscribe is specifically designed for the contact center setting and supports real-time, highly accurate transcription.

**Initial Use**

When using AutoTranscribe Sandbox for the first time, results are produced from baseline ASAPP models that are designed for the contact center setting. At this stage, the sandbox environment helps demonstrate transcript functionality, but it does not reflect the performance of a custom-trained model.

**Custom-Trained Models**

Once a transcription model has been customized using real conversations from your contact center, AutoTranscribe Sandbox will capture terminology that is unique to your business.

The Sandbox also allows administrators to preview configured redaction of sensitive information, and test new redaction rules before deploying them to production.

## How It Works

Watch the following video walkthrough to learn how to use the AutoTranscribe Sandbox:

<iframe width="560" height="315" allow="fullscreen *" src="https://fast.wistia.net/embed/iframe/njm726drfz" />

AutoTranscribe Sandbox enables users to generate transcriptions directly in the browser by using the computer's microphone. Users can simulate an entire conversation by switching between playing the role of an agent and a customer. In addition, ASAPP provides pre-loaded sample conversations that can be played back to generate live transcripts automatically.

Once redaction rules are configured, the live transcript will redact sensitive information such as credit card information, social security numbers, or email addresses.

## FAQs

1. **What information does AutoTranscribe Sandbox redact?**

   AutoTranscribe Sandbox will redact following your configured redaction rules set in partnership with your ASAPP account team. If no rules have been configured, [ASAPP's default redaction rules](/security/data-redaction/redaction-policies) will apply.

2. **Does ASAPP store voice conversations recorded using the AutoTranscribe Sandbox?**

   To protect customer's privacy, ASAPP does not store any voice data received from AutoTranscribe Sandbox. Saving a conversation will only store the conversation transcript as text.


# Twilio Media Gateway for AutoTranscribe
Source: https://docs.asapp.com/autotranscribe/feature-releases/twilio-media-gateway-for-autotranscribe



## Feature Release

This is the announcement for an upcoming ASAPP feature. Your ASAPP account team will provide a target release date and can direct you to more detailed information as needed.

## Overview

ASAPP is adding an AutoTranscribe implementation pattern for Twilio. ASAPP's Twilio Media Gateway will allow Twilio Media Streams audio to be easily sent to AutoTranscribe. The same call signaling integration via API will be leveraged as is used in the integration with the SIPREC Media Gateway.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-17b8f7ed-0d4d-92aa-f3cf-1956d27806cf.png" />
</Frame>

*Media Gateways will support receiving Twilio Media Streams and requests to start and stop transcription.*

## Use and Impact

The new Media Gateway will allow for a simplified and easy integration for customers leveraging Twilio as their CCaaS provider, reducing time and effort of sending call media to ASAPP.

## How It Works

Procedure of streaming audio to ASAPP:

1. Authenticate with ASAPP to obtain an access URL.
2. Instruct Twilio to start sending Media Streams to the ASAPP Media Gateway; the ASAPP Media Gateway will then receive real-time audio as well as Call SID data.
3. Send start and stop requests to control when transcription occurs. Start and stop requests are used to start, pause, resume, and end conversations.
4. Receive transcript outputs leveraging one of ASAPP's transcription delivery mechanisms.

**Configuration**

Transcription settings (e.g. redaction, language) must be configured as part of implementing AutoTranscribe and will be reflected in the messages returned from this endpoint. No further configuration is required.

<Tip>
  For developers, see ASAPP's API Reference for information on interacting with the Media Gateway to [retrieve an access URL](/apis/autotranscribe-media-gateway/get-twilio-media-stream-url), [start](/apis/autotranscribe-media-gateway/start-streaming) and [stop](/apis/autotranscribe-media-gateway/stop-streaming) transcription.
</Tip>

## FAQs

1. **Is integration with the Start/Stop API required?**

   Yes. Start requests to the API provide ASAPP with required metadata (i.e. agent and customer identifiers) and indicate which audio corresponds to the agent and customer respectively.

   Stop requests are also required, as they allow AutoTranscribe to exclude hold and queue audio from transcription. This is a requirement for downstream services to function properly, ensuring transcription is only leveraged where necessary.

2. **How does Twilio handle audio forking?**

   Please refer to [Twilio Documentation](https://www.twilio.com/docs/voice/twiml/stream) for details on how audio forking is handled.


# Deploying AutoTranscribe for Genesys AudioHook
Source: https://docs.asapp.com/autotranscribe/genesys-audiohook

Use AutoTranscribe in your Genesys Audiohook application

This guide covers the **Genesys AudioHook Media Gateway** solution pattern, which consists of the following components to receive speech audio and call signals, and return call transcripts:

* Media gateways for receiving call audio from Genesys Cloud
* HTTPS API which enables the customer to POST requests to start and stop call transcription
* Webhook to POST real-time transcripts to a designated URL of your choosing, alongside two additional APIs to retrieve transcripts after-call for one or a batch of conversations

ASAPP works with you to understand your current telephony infrastructure and ecosystem.

Your ASAPP account team will also determine the main use case(s) for the transcript data to determine where and how call transcripts should be sent.

ASAPP then completes the architecture definition, including integration points into the existing infrastructure.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-dbc58832-5f3c-fb5c-3327-7108f4abf265.png" />
</Frame>

### Integration Steps

There are three steps to integrate AutoTranscribe into Genesys Audiohook:

1. Enable AudioHook and Configure for ASAPP
2. Send Start and Stop Requests
3. Receive Transcript Outputs

### Requirements

**Audio Stream Codec**

Genesys AudioHook provides audio in the mu-law format with 8000 sample rate, which is supported by ASAPP.

No modification or additional transcoding is needed when forking audio to ASAPP.

<Note>
  When supplying recorded audio to ASAPP for AutoTranscribe model training prior to implementation, send uncompressed .WAV media files with speaker-separated channels.
</Note>

Recordings for training should have a sample rate of 8000 and 16-bit PCM audio encoding.

Read the [Customization section of the AutoTranscribe Product Guide](/autotranscribe/product-guide#customization) for more on data requirements for transcription model training.

**Developer Portal**

ASAPP provides an AI Services [Developer Portal](/getting-started/developers). Within the portal, developers can do the following:

* Access relevant API documentation (e.g. OpenAPI reference schemas)
* Access API keys for authorization
* Manage user accounts and apps

<Tip>
  Visit the [Get Started](/getting-started/developers) for instructions on creating a developer account, managing teams and apps, and setup for using AI Service APIs.
</Tip>

## Integrate with Genesys AudioHook

### 1. Enable AudioHook and configure for ASAPP

To enable AudioHook within Genesys:

1. Access Genesys Cloud Admin, navigate to Integrations/Integrations and click "plus" in upper right to add more integrations.
2. Find [AudioHook](https://help.mypurecloud.com/articles/install-audiohook-monitor-from-genesys-appfoundry/) Monitor and Install.
3. [Configure AudioHook Monitor](https://help.mypurecloud.com/articles/configure-and-activate-audiohook-monitor-in-genesys-cloud/) Integration, using the Connection URI (i.e. wss\://ws-example.asapp.com/mg-genesysaudiohook-autotranscribe/) and credentials provided by ASAPP.
4. [Enable voice transcription](https://help.mypurecloud.com/articles/configure-voice-transcription/) on desired trunks and within desired Architect Flows. You do not need to select ASAPP as the transcription engine.

### 2. Send Start and Stop Requests

The `/start-streaming` and `/stop-streaming` endpoints of the Start/Stop API are used to control when transcription occurs for every call media stream (identified by the Genesys conversationId) sent to ASAPP's media gateway. See the [Endpoints](#endpoints) section to learn how to interact with them.

ASAPP will not begin transcribing call audio until requested to, thus preventing transcription of audio at the very beginning of the Genesys AudioHook audio streaming session, which may include IVR, hold music, or queueing.

Stop requests are used to pause or end transcription for any needed reason. For example, a stop request could be used mid-call when the agent places the call on hold or at the end of the call to prevent transcribing post-call interactions such as satisfaction surveys.

<note>
  AutoTranscribe is only meant to transcribe conversations between customers and agents - start and stop requests should be implemented to ensure non-conversation audio (e.g. hold music, IVR menus, surveys) is not being transcribed. Attempted transcription of non-conversation audio will negatively impact other services meant to consume conversation transcripts, such as ASAPP AutoSummary.
</note>

### 3. Receive Transcript Outputs

AutoTranscribe outputs transcripts using three separate mechanisms, each corresponding to a different temporal use case:

* **[Real-time](#real-time-via-webhook)**: Webhook posts complete utterances to your target endpoint as they are transcribed during the live conversation
* **[After-call](#after-call-via-get-request "After-Call via GET Request")**: GET endpoint responds to your requests for a designated call with the full set of utterances from that completed conversation
* **[Batch](#batch-via-file-exporter "Batch via File Exporter")**: File Exporter service responds to your request for a designated time interval with a link to a data feed file that includes all utterances from that interval's conversations

#### Real-Time via Webhook

ASAPP sends transcript outputs in real-time via HTTPS POST requests to a target URL of your choosing.

Authentication

Once the target is selected, work with your ASAPP account team to implement one of the following supported authentication mechanisms:

* **Custom CAs:** Custom CA certificates for regular TLS (1.2 or above).
* **mTLS:** Mutual TLS using custom certificates provided by the customer.
* **Secrets:** A secret token. The secret name is configurable as is whether it appears in the HTTP header or as a URL parameter.
* **OAuth2 (client\_credentials):** Client credentials to fetch tokens from an authentication server.

Expected Load

Target servers should be able to support receiving transcript POST messages for each utterance of every live conversation on which AutoTranscribe is active.

For reference, an average live call sends approximately 10 messages per minute. At that rate, 50 concurrent live calls represents approximately 8 messages per second.

Please ensure the selected target server is load tested to support anticipated peaks in concurrent call volume.

Transcript Timing and Format

Once you have started transcription for a given call stream using the `/start-streaming` endpoint, AutoTranscribe begins to publish `transcript` messages, each of which contains a full utterance for a single call participant.

The expected latency between when ASAPP receives audio for a completed utterance and provides a transcription of that same utterance is 200-600ms.

<Note>
  Perceived latency will also be influenced by any network delay sending audio to ASAPP and receiving transcription messages in return.
</Note>

Though messages are sent in the order they are transcribed, network latency may impact the order in which they arrive or cause messages to be dropped due to timeouts. Where latency causes timeouts, the oldest pending messages will be dropped first; AutoTranscribe does not retry to deliver dropped messages.

The message body for `transcript` type messages is JSON encoded with these fields:

| Field                  | Subfield   | Description                                                                                                                            | Example Value                        |
| :--------------------- | :--------- | :------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------- |
| externalConversationId |            | Unique identifier with the Genesys conversation Id for the call                                                                        | 8c259fea-8764-4a92-adc4-73572e9cf016 |
| streamId               |            | Unique identifier assigned by ASAPP to each call participant's stream returned in response to `/start-streaming` and `/stop-streaming` | 5ce2b755-3f38-11ed-b755-7aed4b5c38d5 |
| sender                 | externalId | Customer or agent identifier as provided in request to `/start-streaming`                                                              | ef53245                              |
| sender                 | role       | A participant role, either customer or agent                                                                                           | customer, agent                      |
| autotranscribeResponse | message    | Type of message                                                                                                                        | transcript                           |
| autotranscribeResponse | start      | The start ms of the utterance                                                                                                          | 0                                    |
| autotranscribeResponse | end        | Elapsed ms since the start of the utterance                                                                                            | 1000                                 |
| autotranscribeResponse | utterance  | Transcribed utterance text                                                                                                             | Are you there?                       |

Expected `transcript` message format:

```json
{
  "type": "transcript",
  "externalConversationId": "<conversationId>",
  "streamId": "<streamId>",
  "sender": {
    "externalId": "<id>",
    "role": "customer",  // or "agent"
  },
  "autotranscribeResponse": {
    "message": "transcript",
    "start": 0,
    "end": 1000,
    "utterance": [
       {"text": "<transcript text>"}
      ]
  }
}
```

## Error Handling

Should your target server return an error in response to a POST request, ASAPP will record the error details for the failed message delivery and drop the message.

### After-Call via GET Request

AutoTranscribe makes a full transcript available at the following endpoint for a given completed call:

`GET /conversation/v1/conversation/messages`

Once a conversation is complete, make a request to the endpoint using a conversation identifier and receive back every message in the conversation.

Message Limit

This endpoint will respond with up to 1,000 transcribed messages per conversation, approximately a two-hour continuous call. All messages are received in a single response without any pagination.

To retrieve all messages for calls that exceed this limit, use either a real-time mechanism or File Exporter for transcript retrieval.

<Note>
  Transcription settings (e.g. language, detailed tokens, redaction), for a given call are set with the Start/Stop API, when call transcription is initiated. All transcripts retrieved after the call will reflect the initially requested settings with the Start/Stop API.
</Note>

See the [Endpoints](#endpoints) section to learn how to interact with this API.

### Batch via File Exporter

AutoTranscribe makes full transcripts for batches of calls available using the File Exporter service's `utterances` data feed.

The File Exporter service is meant to be used as a batch mechanism for exporting data to your data warehouse, either on a scheduled basis (e.g. nightly, weekly) or for ad hoc analyses. Data that populates feeds for the File Exporter service updates once daily at 2:00AM UTC.

## Use Case Example

Real-Time Transcription

This real-time transcription use case example consists of an English language call between an agent and customer with redaction enabled, ending with a hold. Note that redaction is enabled by default and does not need to be requested explicitly.

1. Ensure the Genesys AudioHook is enabled and configured on the desired trunk and flow.
2. When the customer and agent are connected, send ASAPP a request to start transcription for the call:

   **POST** `/mg-autotranscribe/v1/start-streaming`

   **Request**

```json
    {
      "namespace": "genesysaudiohook",
      "guid": "090eaa2f-72fa-480a-83e0-8667ff89c0ec",
      "customerId": "TT9833237",
      "agentId": "RE223444211993",
      "autotranscribeParams": {
        "language": "en-US"
      }
    }  
```

**Response**

*STATUS 200: Router processed the request, details are in the response body*

```json
    {
     "isOk": true,
     "autotranscribeResponse": {
       "customer": {
         "streamId": "5ce2b755-3f38-11ed-b755-7aed4b5c38d5",
         "status": {
           "code": 1000,
           "description": "OK"
         }
       },
       "agent": {
         "streamId": "cf31116-3f38-11ed-9116-7a0a36c763f1",
         "status": {
           "code": 1000,
           "description": "OK"
         }
       }
     }
    }
```

3. The agent and customer begin their conversation and separate HTTPS POST `transcript` messages are sent for each participant from ASAPP's webhook publisher to a target endpoint configured to receive the messages.

   HTTPS **POST** for Customer Utterance

```json
    {
      type: "transcript",
      externalConversationId: "8c259fea-8764-4a92-adc4-73572e9cf016",
      streamId: "5ce2b755-3f38-11ed-b755-7aed4b5c38d5",
      sender: {
        externalId: "TT9833237",
        role: "customer",
      },
      autotranscribeResponse: {
        message: 'transcript',
        start: 400,
        end: 3968,
        utterance: [
           {text: "I need help upgrading my streaming package and my PIN number is ####"}
          ]
      }
    }
```

HTTPS **POST** for Agent Utterance

```json
    {
      type: "transcript",
      externalConversationId: "8c259fea-8764-4a92-adc4-73572e9cf016",
      streamId: "cf31116-3f38-11ed-9116-7a0a36c763f1",
      sender: {
        externalId: "RE223444211993",
        role: "agent",
      },
      autotranscribeResponse: {
        message: 'transcript',
        start: 4744,
        end: 8031,
        utterance: [
           {text: "Thank you sir, let me pull up your account."}
          ]
      }
    }
```

4. Later in the conversation, the agent puts the customer on hold. This triggers a request to the `/stop-streaming` endpoint to pause transcription and prevents hold music and promotional messages from being transcribed.

   **POST** `/mg-autotranscribe/v1/stop-streaming`

   **Request**

```json
    {
     "namespace": "genesysaudiohook",
     "guid": "8c259fea-8764-4a92-adc4-73572e9cf016",
    }
```

**Response**

*STATUS 200: Router processed the request, details are in the response body*

```json
    {
     "isOk": true,
     "autotranscribeResponse": {
       "customer": {
         "streamId": "5ce2b755-3f38-11ed-b755-7aed4b5c38d5",
         "status": {
           "code": 1000,
           "description": "OK"
         },
         "summary": {
           "totalAudioBytes": 1334720,
           "audioDurationMs": 83420,
           "streamingSeconds": 84,
           "transcripts": 2
         },
       "agent": {
         "streamId": "cf31116-3f38-11ed-9116-7a0a36c763f1",
         "status": {
           "code": 1000,
           "description": "OK"
         },
         "summary": {
           "totalAudioBytes": 1334720,
           "audioDurationMs": 83420,
           "streamingSeconds": 84,
           "transcripts": 2
         },
       }
     }
    }
```

### Data Security

ASAPP's security protocols protect data at each point of transmission, from first user authentication to secure communications to our auditing and logging system (which includes hashing of data in transit) all the way to securing the environment when data is at rest in the data logging system. The teams at ASAPP are also under tight restraints in terms of access to data. These security protocols protect both ASAPP and its customers.


# AutoTranscribe Product Guide
Source: https://docs.asapp.com/autotranscribe/product-guide

Learn more about the use of AutoTranscribe and its features

## Getting Started

This page provides an overview of the features and functionalities in AutoTranscribe.

After AutoTranscribe is integrated into your applications, you can use all of the configured features.

### Transcription Outputs

AutoTranscribe returns transcriptions as a sequence of utterances with start and end timestamps in response to an audio stream from a single speaker.

As the agent and customer speak, ASAPP's automated speech recognition (ASR) model transcribes their audio streams and returns completed utterances based on the natural pauses from each speaker. The expected latency between when ASAPP receives audio for a completed utterance and provides a transcription of that same utterance is 200-600ms.

<Note>
  Perceived latency will also be influenced by any network delay sending audio to ASAPP and receiving transcription messages in return.
</Note>

Smart Formatting is enabled by default, producing utterances with punctuation and capitalization already applied. Any spoken forms of utterances are also automatically converted to written forms (e.g. 'twenty two' shown as '22').

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-e9807381-de3a-ed49-9c99-79421640a28c.png" />
</Frame>

### Redaction

AutoTranscribe can immediately redact audio for sensitive information, returning utterances with sensitive information denoted in hashmarks.

ASAPP applies default redaction policies to prevent exposure of sensitive combinations of numerical digits. To configure redaction rules for your implementation, consult your ASAPP account contact.

Visit the [Data Redaction](/security/data-redaction) section to learn more.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-5e163ec2-b3c0-533c-710b-d784dbf42203.png" />
</Frame>

<note>
  Redaction is enabled by default. Smart Formatting must also be enabled (it is by default) in order for redaction to function.
</note>

## Customization

### Transcriptions

ASAPP customizes transcription models for each implementation of AutoTranscribe to ensure domain-specific context and terminology is well incorporated prior to launch.

Consult your ASAPP account contact if the required historical call audio files are not available ahead of implementing AutoTranscribe.

<table class="informaltable frame-void rules-rows">
  <tbody>
    <tr>
      <td class="td"><p><strong>Option</strong></p></td>
      <td class="td"><p><strong>Description</strong></p></td>
      <td class="td"><p><strong>Requirements</strong></p></td>
    </tr>

    <tr>
      <td class="td"><p>Baseline</p></td>
      <td class="td"><p>ASAPP’s general-purpose transcription capability, trained with no audio from relevant historical calls</p></td>
      <td class="td"><p>none</p></td>
    </tr>

    <tr>
      <td class="td"><p>Customized</p></td>
      <td class="td"><p>A custom-trained transcription model to incorporate domain-specific terminology likely to be encountered during implementation</p></td>

      <td class="td">
        <p>For English custom models, a minimum 100 hours of representative historical call audio between customers and agents</p>
        <p>For Spanish custom models, a minimum of 200 hours.</p>
      </td>
    </tr>
  </tbody>
</table>

<Note>
  When supplying recorded audio to ASAPP for AutoTranscribe model training prior to implementation, send uncompressed `.WAV` media files with speaker-separated channels.

  Recordings for training and real-time streams should have both the same sample rate (8000 samples/sec) and audio encoding (16-bit PCM).
</Note>

Visit [Transmitting Data to SFTP](/reporting/send-sftp) for instructions on how to send historical call audio files to ASAPP.

### Vocabulary

In addition to training on historical transcripts, AutoTranscribe accepts explicitly defined custom vocabulary for terms that are specific to your implementation.

AutoTranscribe also boosts detection for these terms by accepting what the term may ordinarily sound like, so that it can be recognized and outputted with the correct spelling.

Common examples of custom vocabulary include:

* Branded products, services and offers
* Commonly used acronyms or abbreviations
* Important corporate addresses

Custom vocabulary is sent to ASAPP for each audio transcription session, and can be consistent for all transcription requests or adjusted for different use cases (different brands, skills/queues, geographies, etc.)

<Note>
  Session-specific custom vocabulary is only available for AutoTranscribe implementations via WebSocket API.

  For Media Gateway implementations, transcription models can also be trained with custom vocabulary through an alternative mechanism. Reach out to your ASAPP account team for more information.
</Note>

## Use Cases

### For Live Agent Assistance

**Challenge**

Organizations are exploring technologies to assist agents in real-time by surfacing customer-specific offers, troubleshooting process flows, topical knowledge articles, relevant customer profile attributes and more. Agents have access to most (if not all) of this content already, but a great assistive technology makes content actionable by finding the right time to bring the right item to the forefront. To do this well, these technologies need to know both what's been said and what is being said in the moment with very low latency.

Many of these technologies face agent adoption and click-through challenges for two reported reasons:

1. Recommended content often doesn't fit the conversation, which may mean the underlying transcription isn't an accurate representation of the real conversation
2. Recommended content doesn't arrive soon enough for them to use it, which may mean the latency between the audio and outputted transcript is too high

**Using AutoTranscribe**

AutoTranscribe is built to be the call transcript input data source for models that power assistive technologies for customer interactions.

Because AutoTranscribe is specifically designed for customer service interactions and trained on implementation-specific historical data, the word error rate (WER) for domain and company-specific language is reduced substantially rather than being the subject of incorrect transcriptions that lead models astray.

To illustrate this point, consider a sample of 10,000 hours of transcribed audio from a typical contact center. A speech-to-text service only needs to recognize 241 of the most frequently used words to get 80% accuracy; those are largely words like "the", "you", "to", "what", and so on.

To get to 90% accuracy, the system needs to correctly transcribe the next 324 most frequently used words, and even more for every additional percent. These are often words that are unique to your business---the words that really matter.

<Tip>
  Read more here about [why small increases in transcription accuracy matter.](https://www.asapp.com/blog/why-a-little-increase-in-transcription-accuracy-is-such-a-big-deal/)
</Tip>

To ensure these high-accuracy transcript inputs reach models quickly enough to make timely recommendations, the expected time from audio received to transcription of that same utterance is 200-600 ms (excluding effects of network delay, as noted in *Transcription Outputs*).

### For Insights and Compliance

**Challenge**

For many organizations, lack of accuracy and coverage of speech-to-text technologies prevent them from effectively employing transcripts for insights, quality management and compliance use cases. Transcripts that fall short of accurately representing conversations compromise the usability of insights and leave too much room for ambiguity for quality managers and compliance teams.

Transcription technologies that aren't accurate enough for many use cases also tend to be employed only for a minority share of total call volume because the outputs aren't useful enough to pay for full coverage. As a result, quality and compliance teams must rely on audio recordings since most calls don't get transcribed.

**Using AutoTranscribe**

AutoTranscribe is specifically designed to maximize domain-specific accuracy for call center conversations. It is trained on past conversations before being deployed and continues to improve early in the implementation as it encounters conversations at scale.

For non real-time use cases, AutoTranscribe also supports processing batches of call audio at an interval that suits the use case.

Teams can query AutoTranscribe outputs in time-stamped utterance tables for data science and targeted compliance use cases or load customer and agent utterances into quality management systems for managers to review in messaging-style user interfaces.

### AI Services That Enhance AutoTranscribe

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-597c4697-359d-b13e-8532-9b2119d3381d.png" />
</Frame>

Once accurate call transcripts are generated, automatic summarization of those customer interactions becomes possible.

ASAPP AutoSummary is a recommended pairing with AutoTranscribe, generating analytics-ready structured summaries and readable paragraph summaries that save agents the distraction of needing to write and submit disposition notes on every call.

<CardGroup>
  <Card title="AutoSummary" href="/autosummary"> Head to AutoSummary Overview to learn more.</Card>
  <Card title="AutoSummary on ASAPP.com" href="https://www.asapp.com/products/ai-services/autosummary"> Learn more about AutoSummary on ASAPP.com </Card>
</CardGroup>

<note>
  AutoSummary currently supports English-language conversations only.
</note>


# Deploy AutoTranscribe into SIPREC via Media Gateway
Source: https://docs.asapp.com/autotranscribe/siprec

Integrate AutoTranscribe into your SIPREC system using ASAPP Media Gateway

This guide covers the **SIPREC Media Gateway** solution pattern, which consists of the following components to receive speech audio and call signals, and return call transcripts:

* Session border controllers and media gateways for receiving call audio from your session border controllers (SBCs)
* HTTPS API to receive requests to start and stop call transcription
* Webhook to POST real-time transcripts to a designated URL of your choosing, alongside two additional APIs to retrieve transcripts after-call for one or a batch of conversations

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-1dced95e-7af4-160d-04a5-fa44d60214ee.png" />
</Frame>

ASAPP works with you to understand your current telephony infrastructure and ecosystem, including the type of voice work assignment platform(s) and other capabilities available, such as SIPREC.

Your ASAPP account team will also determine the main use case(s) for the transcript data to determine where and how call transcripts should be sent.

ASAPP then completes the architecture definition, including integration points into the existing infrastructure.

### Integration Steps

There are three steps to integrate AutoTranscribe into SIPREC:

1. Send Audio to Media Gateway
2. Send Start and Stop Requests
3. Receiving Transcript Outputs

### Requirements

**Audio Stream Codec**

With SIPREC, the customer SBC and the ASAPP media gateway negotiate the media attributes via the SDP offer/answer exchange during the establishment of the session. The codecs in use today are as follows:

* G.711
* G.729

<Note>
  When supplying recorded audio to ASAPP for AutoTranscribe model training prior to implementation, send uncompressed `.WAV` media files with speaker-separated channels.
  Recordings for training and real-time streams should have both the same sample rate (8000 samples/sec) and audio encoding (16-bit PCM).
  See the [Customization section of the AutoTranscribe Product Guide](/autotranscribe/product-guide#customization) for more on data requirements for transcription model training.
</Note>

**Developer Portal**

ASAPP provides an AI Services [Developer Portal](/getting-started/developers). Within the portal, developers can do the following:

* Access relevant API documentation (e.g. OpenAPI reference schemas)
* Access API keys for authorization
* Manage user accounts and apps

<Tip>
  Visit the [Get Started](/getting-started/developers) for instructions on creating a developer account, managing teams and apps, and setup for using AI Service APIs.
</Tip>

## Integrate to the Media Gateway

### 1. Send Audio to Media Gateway

Media Gateway (MG) and Media Gateway Proxy (MG Proxy) components are responsible for receiving real-time audio via SIPREC protocol (acting as Session Recording Servers) along with metadata and sending to AutoTranscribe.

ASAPP offers a software-as-a-service approach to hosting MGs and MG Proxies at ASAPP's VPC in the PCI-scoped zone.

**Network Connectivity**

ASAPP will determine the network connectivity between your infrastructure and the ASAPP AWS Virtual Private Cloud (VPC) based on the architecture; however, there will be secure connections deployed between your data centers and the ASAPP VPC.

* **Edge layer**: ASAPP has built an edge layer utilizing public IPv4 addresses registered to ASAPP. These IP addresses are NOT routed over the Internet, but they guarantee uniqueness across all IP networks. The edge layer houses firewalls and session border controllers that properly take care of full NAT for both SIP and non-SIP traffic.
* **Customer connection aggregation**: Connectivity to customers is done via AWS Transit Gateway, which allows establishment of multiple route-based VPN connections to customers. Sample configuration for various customer devices is available on request.

**Port Details**

Ports and protocols in use for the AutoTranscribe implementations are shown below. These definitions provide visibility to your security teams for the provisioning of firewalls and ACLs.

* **SIP/SIPREC:** TCP 5070 and above; your ASAPP account team will specify a value for your implementation
* **Audio Streams:** UDP \<RTP/RTCP port range>; your ASAPP account team will specify a value for your implementation
* **API Endpoints:** TCP 443

In customer firewalls, you must disable the SIP Application Layer Gateway (ALG) and any 'Threat Detection' features, as they typically interfere with the SIP dialogs and the re-INVITE process.

#### Generating Call Identifiers

AutoTranscribe uses your call identifier to ensure a given call can be referenced in subsequent start and stop requests and associated with transcripts.

To ensure ASAPP receives your call identifiers properly, configure the SBC to create a universal call identifier (UCID or equivalent identifier).

<Note>
  UCID generation is a native feature for session border controller platforms.

  For example, the Oracle/Acme Packet session border controller platform provides documentation on UCID generation as part of its [configuration guide](https://docs.oracle.com/en/industries/communications/enterprise-session-border-controller/8.4.0/configuration/universal-call-identifier-spl). 

  Other session border controller vendors have similar features, so please refer to the vendor documentation for guidance.
</Note>

### 2. Send Start and Stop Requests

As outlined above in requirements, user accounts must be created in the developer portal in order to enroll apps and receive API keys to interact with ASAPP endpoints.

The `/start-streaming` and `/stop-streaming` endpoints of the Start/Stop API are used to control when transcription occurs for every call media stream (identified by the GUID/UCID) sent to ASAPP's media gateway.

See the [Endpoints](#endpoints) section to learn how to interact with them.

ASAPP will not begin transcribing call audio until requested to, thus preventing transcription of audio at the very beginning of the SIPREC session such as standard IVR menus and hold music.

Stop requests are used to pause or end transcription for any needed reason. For example, a stop request could be used mid-call when the agent places the call on hold or at the end of the call to prevent transcribing post-call interactions such as satisfaction surveys.

<Note>
  AutoTranscribe is only meant to transcribe conversations between customers and agents - start and stop requests should be implemented to ensure non-conversation audio (e.g. hold music, IVR menus, surveys) is not being transcribed. Attempted transcription of non-conversation audio will negatively impact other services meant to consume conversation transcripts, such as ASAPP AutoSummary.
</Note>

### 3. Receiving Transcript Outputs

AutoTranscribe outputs transcripts using three separate mechanisms, each corresponding to a different temporal use case:

* **[Real-time](#real-time-via-webhook)**: Webhook posts complete utterances to your target endpoint as they are transcribed during the live conversation
* **[After-call](#after-call-via-get-request)**: GET endpoint responds to your requests for a designated call with the full set of utterances from that completed conversation
* **[Batch](#batch-via-file-exporter)**: File Exporter service responds to your request for a designated time interval with a link to a data feed file that includes all utterances from that interval's conversations

#### Real-Time via Webhook

ASAPP sends transcript outputs in real-time via HTTPS POST requests to a target URL of your choosing.

Authentication

Once the target is selected, work with your ASAPP account team to implement one of the following supported authentication mechanisms:

* **Custom CAs:** Custom CA certificates for regular TLS (1.2 or above).
* **mTLS:** Mutual TLS using custom certificates provided by the customer.
* **Secrets:** A secret token. The secret name is configurable as is whether it appears in the HTTP header or as a URL parameter.
* **OAuth2 (client\_credentials):** Client credentials to fetch tokens from an authentication server.

**Expected Load**

Target servers should be able to support receiving transcript POST messages for each utterance of every live conversation on which AutoTranscribe is active.

For reference, an average live call sends approximately 10 messages per minute. At that rate, 50 concurrent live calls represents approximately 8 messages per second.

Please ensure the selected target server is load tested to support anticipated peaks in concurrent call volume.

**Transcript Timing and Format**

See the [API Reference](/apis/overview)  to learn how to interact with this API.

The expected latency between when ASAPP receives audio for a completed utterance and provides a transcription of that same utterance is 200-600ms.

<Note>
  Perceived latency will also be influenced by any network delay sending audio to ASAPP and receiving transcription messages in return.
</Note>

Though messages are sent in the order they are transcribed, network latency may impact the order in which they arrive or cause messages to be dropped due to timeouts. Where latency causes timeouts, the oldest pending messages will be dropped first; AutoTranscribe does not retry to deliver dropped messages.

The message body for `transcript` type messages is JSON encoded with these fields:

| Field                  | Sub field  | Description                                                                                                                            | Example Value                                |                 |
| :--------------------- | :--------- | :------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------- | --------------- |
| externalConversationId |            | Unique identifier with the GUID/UCID of the SIPREC call                                                                                | 00002542391662063156                         |                 |
| streamId               |            | Unique identifier assigned by ASAPP to each call participant's stream returned in response to `/start-streaming` and `/stop-streaming` | 5ce2b755-3f38-11ed-b755-7aed4b5c38d5         |                 |
| sender                 | externalId | Customer or agent identifier as provided in request to `/start-streaming`                                                              | ef53245                                      |                 |
|                        | role       |                                                                                                                                        | A participant role, either customer or agent | customer, agent |
| autotranscribeResponse | message    | Type of message                                                                                                                        | transcript                                   |                 |
|                        | start      | The start ms of the utterance                                                                                                          | 0                                            |                 |
|                        | end        | Elapsed ms since the start of the utterance                                                                                            | 1000                                         |                 |
|                        | utterance  | text                                                                                                                                   | Transcribed utterance text                   | Are you there?  |

Expected `transcript` message format:

```json
{
  "type": "transcript",
  "externalConversationId": "<guid>",
  "streamId": "<streamId>",
  "sender": {
    "externalId": "<id>",
    "role": "customer",  // or "agent"
  },
  "autotranscribeResponse": {
    "message": "transcript",
    "start": 0,
    "end": 1000,
    "utterance": [
       {"text": "<transcript text>"}
      ]
  }
}
```

**Error Handling**

Should your target server return an error in response to a POST request, ASAPP will record the error details for the failed message delivery and drop the message.

#### After-Call via GET Request

AutoTranscribe makes a full transcript available at the following endpoint for a given completed call:

`GET /conversation/v1/conversation/messages`
Once a conversation is complete, make a request to the endpoint using a conversation identifier and receive back every message in the conversation.

**Message Limit**

This endpoint will respond with up to 1,000 transcribed messages per conversation, approximately a two-hour continuous call. All messages are received in a single response without any pagination.

To retrieve all messages for calls that exceed this limit, use either a real-time mechanism or File Exporter for transcript retrieval.

<Note>
  Transcription settings (e.g. language, detailed tokens, redaction), for a given call are set with the Start/Stop API, when call transcription is initiated.

  All transcripts retrieved after the call will reflect the initially requested settings with the Start/Stop API.
</Note>

See the [Endpoints](#endpoints) section to learn how to interact with this API.

#### Batch via File Exporter

AutoTranscribe makes full transcripts for batches of calls available using the File Exporter service's `utterances` data feed.

The File Exporter service is meant to be used as a batch mechanism for exporting data to your data warehouse, either on a scheduled basis (e.g. nightly, weekly) or for ad hoc analyses. Data that populates feeds for the File Exporter service updates once daily at 2:00AM UTC.

Visit [Retrieving Data for AI Services](/reporting/file-exporter) for a guide on how to interact with the File Exporter service.

## Usage

### Endpoints

ASAPP receives start/stop requests to signal when transcription for a given call should occur. Start and stop requests can be sent multiple times during a single call (for example, stopped when an agent places the call on hold and resumed when the call is resumed).

<Note>
  For all requests, you must provide a header containing the `asapp-api-id` API Key and the `asapp-api-secret`. You can find them under your Apps in the [AI Services Developer Portal](https://developer.asapp.com/).

  All requests to ASAPP sandbox and production APIs must use `HTTPS` protocol. Traffic using `HTTP` will not be redirected to `HTTPS`.
</Note>

[`POST /mg-autotranscribe/v1/start-streaming/`](/apis/autotranscribe-media-gateway/start-streaming)

Use this endpoint to tell ASAPP to start or resume transcription for a given call.

**When to Call**

Transcription can be started (or resumed after a [`/stop-streaming`](/apis/autotranscribe-media-gateway/stop-streaming) request) at any point during a call.

**Request Details**

Requests must include a call identifier with the GUID/UCID of the SIPREC call, a namespace (e.g. `siprec`), and an identifier from your system(s) for each of the customer and agent participants on the call.

Agent identifiers provided here can tell ASAPP whether agents have changed, indicating a new leg of the call has begun. This agent information enables other services to target specific legs of calls rather than only the higher-level call.

<Note>
  The `guid` field expects the decimal formatting of the identifier.

  Cisco example: `0867617078-0032318833-2221801472-0002236962`

  Avaya example: `00002542391662063156`
</Note>

Requests also include a parameter to indicate the mapping of media lines (m-lines) in the SDP of SIPREC protocol; the parameter specifies whether the top m-line is mapped to the agent or customer participant. The top m-line is typically reversed for outbound calls vs. inbound calls.

Requests may also include optional parameters for transcription including:

* Language (e.g. `en-us` for English or `es-us` for Spanish)
* Whether detailed tokens are requested
* Whether call audio recording is permitted
* Whether transcribed outputs should be redacted, unredacted, or both redacted and unredacted outputs should be returned

<Note>
  AutoTranscribe can immediately redact audio for sensitive information, returning utterances with sensitive information denoted in hashmarks. Visit [Redaction Policies](/security/data-redaction/redaction-policies) to learn more.
</Note>

**Response Details**

When successful, this endpoint responds with a boolean indicating whether the stream has started successfully along with a `customer` and `agent` object. Each object contains a stream identifier (`streamId`), status code and status description.

[`POST /mg-autotranscribe/v1/stop-streaming/`](/apis/autotranscribe-media-gateway/stop-streaming)

Use this endpoint to tell ASAPP to pause or end transcription for a given call.

**When to Call**

Transcription can be stopped at any point during a call.

**Request Details**

Requests must include a call identifier with the GUID/UCID of the SIPREC call and a namespace (e.g. `siprec`).

<Note>
  The `guid` field expects the decimal formatting of the identifier.

  Cisco example: `0867617078-0032318833-2221801472-0002236962`

  Avaya example: `00002542391662063156`
</Note>

**Response Details**

When successful, this endpoint responds with a boolean indicating whether the stream has stopped successfully along with a `customer` and `agent` object. Each object contains a stream identifier (`streamId`), status code and status description. Each object also contains a `summary` object of transcription stats related to that participant's stream.

[`GET /conversation/v1/conversation/messages`](/apis/conversations/list-messages-with-an-externalid)

Use this endpoint to retrieve all the transcript messages for a completed call.

**When to Call**

Once the conversation is complete. Conversation transcripts are available for seven days after they are completed.

<Note>
  For conversations that include transfers, the endpoint will provide transcript messages for all call legs that correspond to the call's identifier.
</Note>

**Request Details**

Requests must include a call identifier with the GUID/UCID of the SIPREC call.

**Response Details**

When successful, this endpoint responds with an array of objects, each of which corresponds to a single message. Each object contains the text of the message, the sender's role and identifier, a unique message identifier, and timestamps.

#### Error Handling

ASAPP uses HTTP status codes to communicate the success or failure of an API Call.

* 2XX HTTP status codes are for successful API calls.
* 4XX and 5XX HTTP status codes are for errored API calls.

ASAPP errors are returned in the following structure:

```json
{
    "error": {
        "requestId": "67441da5-dd2b-4820-b47d-441998f066e9",
        "message": "Bad request",
        "code": "400-02"
    }
}
```

In the course of using the `/start-streaming` and `/stop-streaming` endpoints, the following error codes may be returned:

| Code      | Description                                           |
| :-------- | :---------------------------------------------------- |
| `400-201` | MG AutoTranscribe API parameter incorrect             |
| `400-202` | AutoTranscribe parameter or combination incorrect     |
| `400-203` | No call with specified guid found                     |
| `409-201` | Call transcription already started or already stopped |
| `409-202` | Another API request for same guid is pending          |
| `409-203` | SIPREC BYE being processed                            |
| `500-201` | MG AutoTranscribe or AutoTranscribe internal error    |

#### Data Security

ASAPP's security protocols protect data at each point of transmission from first user authentication, to secure communications, to our auditing and logging system, all the way to securing the environment when data is at rest in the data logging system. Access to data by ASAPP teams is tightly constrained and monitored. Strict security protocols protect both ASAPP and our customers.

## Use Case Example

### Real-Time Transcription

This real-time transcription use case example consists of an English language call between an agent and customer with redaction enabled, ending with a hold. Note that redaction is enabled by default and does not need to be requested explicitly.

1. When the call record is created, ASAPP media gateway components receive real-time audio via SIPREC protocol along with metadata, most notably the call's Avaya-formatted UCID/GUID: `00002542391662063156`
2. When the customer and agent are connected, ASAPP is sent a request to start transcription for the call:

**POST** `/mg-autotranscribe/v1/start-streaming`

**Request**

```json
    {
     "namespace": "siprec",
     "guid": "00002542391662063156",
     "customerId": "TT9833237",
     "agentId": "RE223444211993",
     "autotranscribeParams": {
       "language": "en-US"
     },
     "siprecParams": {
       "mediaLineOrder": "CUSTOMER_FIRST"
     }
    } 
```

**Response**

*STATUS 200: Router processed the request, details are in the response body*

```json
    {
     "isOk": true,
     "autotranscribeResponse": {
       "customer": {
         "streamId": "5ce2b755-3f38-11ed-b755-7aed4b5c38d5",
         "status": {
           "code": 1000,
           "description": "OK"
         }
       },
       "agent": {
         "streamId": "cf31116-3f38-11ed-9116-7a0a36c763f1",
         "status": {
           "code": 1000,
           "description": "OK"
         }
       }
     }
    }
```

3. The agent and customer begin their conversation and separate HTTPS POST `transcript` messages are sent for each participant from ASAPP's webhook publisher to a target endpoint configured to receive the messages.

**HTTPS POST for Customer Utterance**

```json
    {
      type: "transcript",
      externalConversationId: "00002542391662063156",
      streamId: "5ce2b755-3f38-11ed-b755-7aed4b5c38d5",
      sender: {
        externalId: "TT9833237",
        role: "customer",
      },
      autotranscribeResponse: {
        message: 'transcript',
        start: 400,
        end: 3968,
        utterance: [
           {text: "I need help upgrading my streaming package and my PIN number is ####"}
          ]
      }
    }
```

**HTTPS POST for Agent Utterance**

```json
    {
      type: "transcript",
      externalConversationId: "00002542391662063156",
      streamId: "cf31116-3f38-11ed-9116-7a0a36c763f1",
      sender: {
        externalId: "RE223444211993",
        role: "agent",
      },
      autotranscribeResponse: {
        message: 'transcript',
        start: 4744,
        end: 8031,
        utterance: [
           {text: "Thank you sir, let me pull up your account."}
          ]
      }
    }
```

4. Later in the conversation, the agent puts the customer on hold. This triggers a request to the `/stop-streaming` endpoint to pause transcription and prevents hold music and promotional messages from being transcribed.

**POST** `/mg-autotranscribe/v1/stop-streaming`

**Request**

```json
    {
     "namespace": "siprec",
     "guid": "00002542391662063156",
    }
```

**Response**

*STATUS 200: Router processed the request, details are in the response body*

```json
    {
     "isOk": true,
     "autotranscribeResponse": {
       "customer": {
         "streamId": "5ce2b755-3f38-11ed-b755-7aed4b5c38d5",
         "status": {
           "code": 1000,
           "description": "OK"
         },
         "summary": {
           "totalAudioBytes": 1334720,
           "audioDurationMs": 83420,
           "streamingSeconds": 84,
           "transcripts": 2
         },
       "agent": {
         "streamId": "cf31116-3f38-11ed-9116-7a0a36c763f1",
         "status": {
           "code": 1000,
           "description": "OK"
         },
         "summary": {
           "totalAudioBytes": 1334720,
           "audioDurationMs": 83420,
           "streamingSeconds": 84,
           "transcripts": 2
         },
       }
     }
    }
```


# Deploying AutoTranscribe for Twilio
Source: https://docs.asapp.com/autotranscribe/twilio

Use AutoTranscribe with Twilio

This guide covers the **Twilio Media Gateway** solution pattern, which consists of the following components to receive speech audio from Twilio, receive call signals, and return call transcripts:

* Media gateways for receiving call audio from Twilio
* HTTPS API which enables the customer to GET a streaming URL to which call audio is sent and POST requests to start and stop call transcription
* Webhook to POST real-time transcripts to a designated URL of your choosing, alongside two additional APIs to retrieve transcripts after-call for one or a batch of conversations

ASAPP works with you to understand your current telephony infrastructure and ecosystem.

Your ASAPP account team will also determine the main use case(s) for the transcript data to determine where and how call transcripts should be sent.

ASAPP then completes the architecture definition, including integration points into the existing infrastructure.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-7d518252-d6a2-da98-a595-edc3b3640295.png" />
</Frame>

### Integration Steps

There are four steps to integrate AutoTranscribe into Twilio:

1. Authenticate with ASAPP and Obtain a Twilio Media Stream URL
2. Send Audio to Media Gateway
3. Send Start and Stop Requests
4. Receive Transcript Outputs

### Requirements

**Audio Stream Codec**

Twilio provides audio in the mu-law format with 8000 sample rate, which is supported by ASAPP. No modification or additional transcoding is needed when forking audio to ASAPP.

<Note>
  When supplying recorded audio to ASAPP for AutoTranscribe model training prior to implementation, send uncompressed .WAV media files with speaker-separated channels.
</Note>

Recordings for training should have a sample rate of 8000 and 16-bit PCM audio encoding.

See the [Customization section of the AutoTranscribe Product Guide](/autotranscribe/product-guide#customization) for more on data requirements for transcription model training.

**Developer Portal**

ASAPP provides an AI Services [Developer Portal](/getting-started/developers). Within the portal, developers can do the following:

* Access relevant API documentation (e.g. OpenAPI reference schemas)
* Access API keys for authorization
* Manage user accounts and apps

<Tip>
  Visit the [Get Started](/getting-started/developers) for instructions on creating a developer account, managing teams and apps, and setup for using AI Service APIs.
</Tip>

## Integrate with Twilio

### 1. Authenticate with ASAPP and Obtain a Twilio Media Stream URL

A Twilio media stream URL is required to start streaming audio. Begin by authenticating with ASAPP to obtain this URL.

<Note>
  All requests to ASAPP sandbox and production APIs must use `HTTPS` protocol. Traffic using `HTTP` will not be redirected to `HTTPS`.
</Note>

The following HTTPS REST API enables authentication with the ASAPP API Gateway:

[`GET /mg-autotranscribe/v1/twilio-media-stream-url`](/apis/autotranscribe-media-gateway/get-twilio-media-stream-url)

HTTP headers (required):

```json
{
    "asapp-api-id": <asapp provided api id>,
    "asapp-api-secret": <asapp provided api secret>
}
```

Header parameters are required and are provided to you by ASAPP in the [Developer Portal](https://developer.asapp.com/).
HTTP response body:

```json
{
   "streamingUrl": "<short-lived URL for twilio media stream>"
}
```

If the authentication succeeds, a secure WebSocket short-lived access URL will be returned in the HTTP response body. TTL (time-to-live) for this URL is 5 minutes.  Validity of the short-lived URL is checked only at the beginning of the WebSocket connection, so duration of the sessions can be as long as needed.  The same short-lived access URL can be used to start as many unique sessions as desired in the 5 minute TTL.

For example, if the call center has an average rate of 1 new call per second, the same short-lived access URL can be used to initiate 300 total calls (60 calls per minute \* 5 minutes).  And each call can last as long as needed, regardless if it's 2 minutes long or longer than 30 minutes.  But after the five minute TTL, a new short-lived access URL will need to be obtained to start any new calls.  It is recommended to obtain a new short-lived URL in less than 5 minutes to always have a valid URL.

### 2. Send Audio to Media Gateway

With the URL obtained in the previous step, instruct Twilio to start sending Media Stream to ASAPP Media Gateway components.  Media Gateway (MG) components are responsible for receiving real-time audio along with Call SID metadata.

<Note>
  Twilio provides multiple ways to initiate Media Stream, which are described in [their documentation](https://www.twilio.com/docs/voice/api/media-streams#startstop-media-streams).
</Note>

While instructing Twilio to send Media Streams, it's highly recommended to provide a `statusCallback` URL. Twilio will use this URL in the event connectivity is lost or has an error.  It will be up to the customer call center to process this callback and instruct Twilio to again start new Media Streams, assuming transcriptions are still desired. 

<Tip>
  See Handling Failures for Twilio Media Streams for details below.
</Tip>

ASAPP offers a software-as-a-service approach to hosting MGs at ASAPP's VPC in the PCI-scoped zone.

**Network Connectivity**

Audio will be sent from Twilio cloud to ASAPP cloud via secure (TLS 1.2) WebSocket connections over the internet.  No additional or custom networking is required.

**Port Details**

Ports and protocols in use for the AutoTranscribe implementations are shown below:

* **Audio Streams**: Secure WebSocket with destination port 443
* **API Endpoints**: TCP 443

**Handling Failures for Twilio Media Streams**

There are multiple reasons (e.g. intermediate internet failures, scheduled maintenance) why Twilio Media Stream could be interrupted mid-call. The only way to know that the Media Stream was interrupted is to utilize the `statusCallback` parameter (along with `statusCallbackMethod` if needed) of the Twilio API. Should a failure occur, the URL specified in `statusCallback` parameter will receive the HTTP request informing of a failure.

If a failure notification is received, it means ASAPP has stopped receiving audio from Twilio and no more transcriptions for that call will take place. To restart transcriptions:

* Obtain a Twilio Media Stream URL - unless failure occurred within 5 minutes of the start of the call, you won't be able to reuse the original call streaming URL.
* Send Audio to Media Gateway - instruct Twilio through their API to start a new media stream to the Twilio Media Stream URL provided by ASAPP.
* Send Start request (see [3. Sending Start and Stop Requests](#3-send-start-and-stop-requests) for details).

**Generating Call Identifiers**

AutoTranscribe uses your call identifier to ensure a given call can be referenced in subsequent [start and stop requests](#3-send-start-and-stop-requests) and associated with transcripts.

Twilio will automatically generate a unique Call SID identifier for the call.

### 3. Send Start and Stop Requests

As outlined in [requirements](#requirements), user accounts must be created in the developer portal in order to enroll apps and receive API keys to interact with ASAPP endpoints.

The `/start-streaming` and `/stop-streaming` endpoints of the Start/Stop API are used to control when transcription occurs for every call.

See the [API Reference](/apis/overview)  to learn how to interact with this API.

ASAPP will not begin transcribing call audio until requested to, thus preventing transcription of audio at the very beginning of the audio streaming session, which may include IVR, hold music, or queueing.

Stop requests are used to pause or end transcription for any needed reason. For example, a stop request could be used mid-call when the agent places the call on hold or at the end of the call to prevent transcribing post-call interactions such as satisfaction surveys.

<note>
  AutoTranscribe is only meant to transcribe conversations between customers and agents - start and stop requests should be implemented to ensure non-conversation audio (e.g. hold music, IVR menus, surveys) is not being transcribed. Attempted transcription of non-conversation audio will negatively impact other services meant to consume conversation transcripts, such as ASAPP AutoSummary.
</note>

### 4. Receive Transcript Outputs

AutoTranscribe outputs transcripts using three separate mechanisms, each corresponding to a different temporal use case:

* **[Real-time](#real-time-via-webhook)**: Webhook posts complete utterances to your target endpoint as they are transcribed during the live conversation
* **[After-call](#after-call-via-get-request)**: GET endpoint responds to your requests for a designated call with the full set of utterances from that completed conversation
* **[Batch](#batch-via-file-exporter)**: File Exporter service responds to your request for a designated time interval with a link to a data feed file that includes all utterances from that interval's conversations

#### Real-Time via Webhook

ASAPP sends transcript outputs in real-time via HTTPS POST requests to a target URL of your choosing.

Authentication

Once the target is selected, work with your ASAPP account team to implement one of the following supported authentication mechanisms:

* **Custom CAs:** Custom CA certificates for regular TLS (1.2 or above).
* **mTLS:** Mutual TLS using custom certificates provided by the customer.
* **Secrets:** A secret token. The secret name is configurable as is whether it appears in the HTTP header or as a URL parameter.
* **OAuth2 (client\_credentials):** Client credentials to fetch tokens from an authentication server.

Expected Load

Target servers should be able to support receiving transcript POST messages for each utterance of every live conversation on which AutoTranscribe is active.

For reference, an average live call sends approximately 10 messages per minute. At that rate, 50 concurrent live calls represents approximately 8 messages per second.

Please ensure the selected target server is load tested to support anticipated peaks in concurrent call volume.

Transcript Timing and Format

Once you have started transcription for a given call stream using the `/start-streaming` endpoint, AutoTranscribe begins to publish `transcript` messages, each of which contains a full utterance for a single call participant.

The expected latency between when ASAPP receives audio for a completed utterance and provides a transcription of that same utterance is 200-600ms.

<Note>
  Perceived latency will also be influenced by any network delay sending audio to ASAPP and receiving transcription messages in return.
</Note>

Though messages are sent in the order they are transcribed, network latency may impact the order in which they arrive or cause messages to be dropped due to timeouts. Where latency causes timeouts, the oldest pending messages will be dropped first; AutoTranscribe does not retry to deliver dropped messages.

The message body for `transcript` type messages is JSON encoded with these fields:

| Field                  | Subfield   | Description                                                                                                                            | Example Value                        |
| :--------------------- | :--------- | :------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------- |
| externalConversationId |            | Unique identifier with the Amazon Connect Contact Id for the call                                                                      | 8c259fea-8764-4a92-adc4-73572e9cf016 |
| streamId               |            | Unique identifier assigned by ASAPP to each call participant's stream returned in response to `/start-streaming` and `/stop-streaming` | 5ce2b755-3f38-11ed-b755-7aed4b5c38d5 |
| sender                 | externalId | Customer or agent identifier as provided in request to `/start-streaming`                                                              | ef53245                              |
| sender                 | role       | A participant role, either customer or agent                                                                                           | customer, agent                      |
| autotranscribeResponse | message    | Type of message                                                                                                                        | transcript                           |
| autotranscribeResponse | start      | The start ms of the utterance                                                                                                          | 0                                    |
| autotranscribeResponse | end        | Elapsed ms since the start of the utterance                                                                                            | 1000                                 |
| autotranscribeResponse | utterance  | Transcribed utterance text                                                                                                             | Are you there?                       |

Expected `transcript` message format:

```json
{
  "type": "transcript",
  "externalConversationId": "<twilio call SID>",
  "streamId": "<streamId>",
  "sender": {
    "externalId": "<id>",
    "role": "customer",  // or "agent"
  },
  "autotranscribeResponse": {
    "message": "transcript",
    "start": 0,
    "end": 1000,
    "utterance": [
       {"text": "<transcript text>"}
      ]
  }
}
```

Error Handling

Should your target server return an error in response to a POST request, ASAPP will record the error details for the failed message delivery and drop the message.

#### After-Call via GET Request

AutoTranscribe makes a full transcript available at the following endpoint for a given completed call:

`GET /conversation/v1/conversation/messages`

Once a conversation is complete, make a request to the endpoint using a conversation identifier and receive back every message in the conversation.

Message Limit

This endpoint will respond with up to 1,000 transcribed messages per conversation, approximately a two-hour continuous call. All messages are received in a single response without any pagination.

To retrieve all messages for calls that exceed this limit, use either a real-time mechanism or File Exporter for transcript retrieval.

<Note>
  Transcription settings (e.g. language, detailed tokens, redaction), for a given call are set with the Start/Stop API, when call transcription is initiated. All transcripts retrieved after the call will reflect the initially requested settings with the Start/Stop API.
</Note>

See the [API Reference](/apis/overview)  to learn how to interact with this API.

#### Batch via File Exporter

AutoTranscribe makes full transcripts for batches of calls available using the File Exporter service's `utterances` data feed.

The File Exporter service is meant to be used as a batch mechanism for exporting data to your data warehouse, either on a scheduled basis (e.g. nightly, weekly) or for ad hoc analyses. Data that populates feeds for the File Exporter service updates once daily at 2:00AM UTC.

Visit [Retrieving Data from ASAPP](https://asapp.mintlify.app/reporting/data-from-messaging-platform) for a guide on how to interact with the File Exporter service.

## Use Case Example

Real-Time Transcription

This real-time transcription use case example consists of an English language call between an agent and customer with redaction enabled, ending with a hold. Note that redaction is enabled by default and does not need to be requested explicitly.

1. Obtain a Twilio media streaming URL destination by authenticating with ASAPP.

   **GET** `/mg-autotranscribe/v1/twilio-media-stream-url`
   **Response**

   *STATUS 200: OK - Twilio media stream url in the response body*

```json
    {
      "streamingUrl": "wss://localhost/twilio-media?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
    }
```

2. With the URL obtained in the previous step, instruct Twilio to start Media Stream to ASAPP media gateway components.  ASAPP will now receive real-time audio via Twilio Stream along with metadata, most notably the call's SID: `CA5b040e075515c424391012acc5a870cf`

3. When the customer and agent are connected, send ASAPP a request to start transcription for the call:

   **POST** `/mg-autotranscribe/v1/start-streaming`
   **Request**

```json
    {
     "namespace": "twilio",
     "guid": "CA5b040e075515c424391012acc5a870cf",
     "customerId": "TT9833237",
     "agentId": "RE223444211993",
     "autotranscribeParams": {
       "language": "en-US"
     },
     "twilioParams": {
       "trackMap": {
         "inbound": "customer",
         "outbound": "agent"
       }
     }
    } 
```

**Response**

*STATUS 200: Router processed the request, details are in the response body*

```json
    {
     "isOk": true,
     "autotranscribeResponse": {
       "customer": {
         "streamId": "5ce2b755-3f38-11ed-b755-7aed4b5c38d5",
         "status": {
           "code": 1000,
           "description": "OK"
         }
       },
       "agent": {
         "streamId": "cf31116-3f38-11ed-9116-7a0a36c763f1",
         "status": {
           "code": 1000,
           "description": "OK"
         }
       }
     }
    }
```

4. The agent and customer begin their conversation and separate HTTPS POST `transcript` messages are sent for each participant from ASAPP's webhook publisher to a target endpoint configured to receive the messages.

   HTTPS **POST** for Customer Utterance

```json
    {
      type: "transcript",
      externalConversationId: "CA5b040e075515c424391012acc5a870cf",
      streamId: "5ce2b755-3f38-11ed-b755-7aed4b5c38d5",
      sender: {
        externalId: "TT9833237",
        role: "customer",
      },
      autotranscribeResponse: {
        message: 'transcript',
        start: 400,
        end: 3968,
        utterance: [
           {text: "I need help upgrading my streaming package and my PIN number is ####"}
          ]
      }
    }
```

HTTPS **POST** for Agent Utterance

```json
    {
      type: "transcript",
      externalConversationId: "CA5b040e075515c424391012acc5a870cf",
      streamId: "cf31116-3f38-11ed-9116-7a0a36c763f1",
      sender: {
        externalId: "RE223444211993",
        role: "agent",
      },
      autotranscribeResponse: {
        message: 'transcript',
        start: 4744,
        end: 8031,
        utterance: [
           {text: "Thank you sir, let me pull up your account."}
          ]
      }
    }
```

5. Later in the conversation, the agent puts the customer on hold. This triggers a request to the `/stop-streaming` endpoint to pause transcription and prevents hold music and promotional messages from being transcribed.

   **POST** `/mg-autotranscribe/v1/stop-streaming`

   **Request**

```json
    {
     "namespace": "twilio",
     "guid": "CA5b040e075515c424391012acc5a870cf",
    }
```

**Response**

*STATUS 200: Router processed the request, details are in the response body*

```json
    {
     "isOk": true,
     "autotranscribeResponse": {
       "customer": {
         "streamId": "5ce2b755-3f38-11ed-b755-7aed4b5c38d5",
         "status": {
           "code": 1000,
           "description": "OK"
         },
         "summary": {
           "totalAudioBytes": 1334720,
           "audioDurationMs": 83420,
           "streamingSeconds": 84,
           "transcripts": 2
         },
       "agent": {
         "streamId": "cf31116-3f38-11ed-9116-7a0a36c763f1",
         "status": {
           "code": 1000,
           "description": "OK"
         },
         "summary": {
           "totalAudioBytes": 1334720,
           "audioDurationMs": 83420,
           "streamingSeconds": 84,
           "transcripts": 2
         },
       }
     }
    }
```

### Data Security

ASAPP's security protocols protect data at each point of transmission, from first user authentication to secure communications to our auditing and logging system (which includes hashing of data in transit) all the way to securing the environment when data is at rest in the data logging system. The teams at ASAPP are also under tight restraints in terms of access to data. These security protocols protect both ASAPP and its customers.


# GenerativeAgent
Source: https://docs.asapp.com/generativeagent

Use GenerativeAgent to resolve customer issues safely and accurately with AI-powered conversations.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/generativeagent/generativeagent-home.png" />
</Frame>

GenerativeAgent is an advanced AI conversational bot that revolutionizes customer support. By leveraging Large Language Models (LLM), it is capable of:

* Nuanced handling of complex support issues
* Real-time access to the knowledge base and APIs
* Safe and accurate issue resolution
* Seamless integration with existing chat and voice channels

Deploy GenerativeAgent to automate your front-line support, giving you control over which interactions are handled automatically and which are routed to your existing support channels.

## How GenerativeAgent Works

At a high level, GenerativeAgent operates by:

1. Analyzing customer interactions in real-time
2. Accessing relevant information from the knowledge base
3. Interacting with back-end systems through APIs
4. Generating human-like responses to resolve issues

Unlike traditional bots with predefined flows, GenerativeAgent uses natural language processing to understand and respond to a wide range of customer queries and issues.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/generativeagent/GA-how-it-works.png" alt="GenerativeAgent main diagram" />
</Frame>

For a more detailed explanation of GenerativeAgent's functionality, implementation process, and configuration options, visit our [How GenerativeAgent Works](generativeagent/how-it-works) page.

## Safety

GenerativeAgent has been developed with a safety-first approach.

ASAPP ensures GenerativeAgent's accuracy and quality with rigorous testing and continuous updates, preventing hallucinations through advanced validating. Our team has incorporated Safety Layers that provide benefits such as reliability and response trust.

Our safety standards include:

* Safety Layers
* Hallucination Control
* Data Redaction
* IP Blocking
* Customer Info and Sensitive Data Protection

<Tip>
  You can learn more about this in [Safety and Troubleshooting](/generativeagent/configuring/safety-and-troubleshooting).
</Tip>

## Next steps

<CardGroup>
  <Card title="Getting Started" href="generativeagent/getting-started">
    Learn how to start using GenerativeAgent in your support channels
  </Card>

  <Card title="How it Works" href="generativeagent/how-it-works">
    Understand the technical details of GenerativeAgent's functionality
  </Card>
</CardGroup>


# Configuring Generative Agent
Source: https://docs.asapp.com/generativeagent/configuring

Learn how to configure GenerativeAgent

Configure how GenerativeAgent interacts with end users and define its behaviors and actions. You have full control over its capabilities and communication style.

When GenerativeAgent engages in a conversation, it starts by conversing with the user to understand their needs or objectives. It then consults its available Tasks list and selects the appropriate task to assist the user. If no suitable task is found, it escalates to a human agent.

Follow these steps to configure GenerativeAgent:

1. Define the scope for GenerativeAgent
2. Configure core conversation settings
3. Create Tasks
4. Create Functions for those Tasks
5. Connect your Knowledge Base
6. Deploy your changes

After configuration, use the [Previewer](/generativeagent/configuring/previewer) to test GenerativeAgent and make further refinements.

## Accessing the AI Console

Configuring GenerativeAgent requires access to our AI Console, our dashboard for configuring and managing ASAPP. You should have received login credentials from your ASAPP team. If not, please contact them for access.

## Step 1: Define the Scope

Define a clear scope to ensure GenerativeAgent provides safe and accurate assistance.

Consider and decide on:

* The voice or tone GenerativeAgent will use
* The types of issues or actions you want GenerativeAgent to handle (represented as **Tasks**)
* Which APIs your organization needs to expose for GenerativeAgent to address those Tasks (called **Functions**)

A **Task** is any issue or action you want GenerativeAgent to handle. Define a set of instructions in human language, and add one or **Functions**, which are the tools GenerativeAgent can use for that task.

A **Function** is an API call given to GenerativeAgent to fetch data or perform an action. Once you've mapped out the APIs, Functions, and Tasks, use the GenerativeAgent UI to enter your configuration.

## Step 2: Configure Core Conversation Settings

Configure the Core Conversation settings, including:

* Your company name for GenerativeAgent to use
* The welcome message for new customer connections
* How GenerativeAgent should refer to itself
* How your human agents are referred to
* A sentence explaining GenerativeAgent's desired tone

Work with your ASAPP team to configure these settings.

## Step 3: Create Tasks

Tasks are the foundation of how GenerativeAgent performs. This is often where you will spend most of your time when configuring GenerativeAgent. When analyzing a conversation, GenerativeAgent selects the appropriate task and follows its instructions.

To define a Task:

1. Navigate to the Tasks page
2. Click "Create task"
3. Provide the following information:
   * Task name
   * Task selector description
   * Task message (optional)
   * General Instructions
   * Functions the task should use

<Note>
  You can specify knowledge base metadata to restrict GenerativeAgent to using only articles with matching metadata.
</Note>

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-91a26448-6a25-8ae7-594e-595572a8c258.png" alt="GenerativeAgent Example" />
</Frame>

### Improving Tasks

As you configure tasks, refer to [Improving Tasks](/generativeagent/configuring/tasks-and-functions/improving) for strategies and tools to improve task performance.

## Step 4: Create Functions

Functions enable your GenerativeAgent to perform actions similar to a live agent. For example, an airline might need Functions to check refund eligibility and process refunds.

Functions must point to specific [API Connections](/generativeagent/configuring/connect-apis) and versions. API Connections contain technical details for connecting to specific API endpoints.

<Tip>
  You can opt to point to a live API Connection later by choosing "integrate later" and use a Mock API
</Tip>

To create a function:

1. Navigate to the Functions page
2. Click "Create Function"
3. Provide the following information:
   * Function name
   * Description of how GenerativeAgent should use this function
   * The API Connection to use (default is the latest version)
4. Choose the Function connection type
   * **Connect to an API**: Enable GenerativeAgent to call an API to fetch data or perform an action
   * **Create a Mock API Function**: Define an ideal API interaction for GenerativeAgent before connecting to a real API
   * **Set Variable Functions**: Enable GenerativeAgent to store conversation data as reference variables for future use
   * **System Transfer Functions**: Let GenerativeAgent signal that it's finished or needs to hand control back to an external system

<Tabs>
  <Tab title="Connect to an API">
    Under "Choose an API":

    1. Select one of your existing [API connections](/generativeagent/configuring/connect-apis).
       * (Optional) Confirm or adjust which version of the API to use if multiple are available.
    2. Save the Function.
       * GenerativeAgent will call the real API during interactions.
  </Tab>

  <Tab title="Create a Mock API Function">
    You can define an ideal API interaction for GenerativeAgent before connecting to a real API.

    Use a [Mock API Function](/generativeagent/configuring/tasks-and-functions/mock-api) to define data before using a real connection.

    You can replace the Mock call with an existing API or [Create an API Connection](/generativeagent/configuring/connect-apis) at any time.

    Under "Choose an API":

    1. Click on “Integrate later”
    2. Define your request parameters in JSON schema format

       <Tip>
         You can pick a template from the “Examples” dropdown or start with a blank schema.

         Make sure your JSON is valid; GenerativeAgent will not let you save if the schema is invalid
       </Tip>
    3. Save your Function.

    * You will see a preview of your defined parameters.

    <Note>
      You can replace the Mock API schema with a real API connection at any time.
      This makes for a seamless transition to live systems.
    </Note>
  </Tab>

  <Tab title="Set Variable Functions">
    Save a value from  the conversation with a [Variable Function](/generativeagent/configuring/tasks-and-functions/set-variable). This is helpful for storing data like a user's account number, or compute conditional logic (e.g., whether a child is eligible as a lap child).

    1. Select "Set variable" function type.
    2. Define the input GenerativeAgent should use when calling the function.
    3. Add the variables you would like to set.
       * This is defined as a string but allows for [Jinja templating](/generativeagent/configuring/tasks-and-functions/set-variable#step-5-specify-set-variables) for advanced use cases.
    4. Save the Function.
  </Tab>

  <Tab title="System Transfer Functions">
    Signal that control should be transferred from GenerativeAgent to an external system with a [System Transfer Function](/generativeagent/configuring/tasks-and-functions/system-transfer). This is helpful for ending conversations or handing control back to external systems with relevant conversation data.

    1. Select "System transfer" function type.
    2. Define the input GenerativeAgent should use when calling the function.
    3. (Optionally) Add any variables you would like to set.
    4. Save your Function.
       * You will see a preview of your defined parameters.
  </Tab>
</Tabs>

## Step 5: Connect your Knowledge Base

Connect your [knowledge base](/generativeagent/configuring/connecting-your-knowledge-base) to ASAPP and determine what information GenerativeAgent should use when assisting users.

## Step 6: Deploy Changes

After configuring GenerativeAgent, deploy your changes. You have two environments and a draft mode:

* **Draft**: Changes are automatically available for testing with Previewer
* **Sandbox**: Test GenerativeAgent with your real APIs and perform end-to-end testing
* **Production**: Serve live traffic to your end users

## Next Steps

With a functioning GenerativeAgent, you're ready to support real users. Explore these sections to advance your integration:

<CardGroup>
  <Card title="Connect your APIs" href="/generativeagent/configuring/connect-apis" />

  <Card title="Safety and Troubleshooting" href="/generativeagent/configuring/safety-and-troubleshooting" />

  <Card title="Go Live" href="/generativeagent/go-live" />
</CardGroup>


# Connecting Your APIs
Source: https://docs.asapp.com/generativeagent/configuring/connect-apis

Learn how to connect your APIs to GenerativeAgent with API Connections

GenerativeAgent can call your APIs to get data or perform actions through **API Connections**. These connections allow GenerativeAgent to handle complex tasks like looking up account information or booking flights.

Our API Connection tooling lets you transform your existing APIs into LLM-friendly interfaces that GenerativeAgent can use effectively. Unlike other providers that require you to create new simplified APIs specifically for LLM use, ASAPP's approach lets you leverage your current infrastructure without additional development work.

<Note>
  Typically, a developer or other technical user will create API Connections. If you need help, reach out to your ASAPP team.
</Note>

## Understanding API Connections

An API connection consists of three core components:

1. **API Source**:
   * Defines how to call your API
   * Handles authentication, headers, and error responses
   * Configures environment-specific settings (sandbox/production)

2. **Request Interface**:
   * Specifies what GenerativeAgent sees and can request
   * Transforms GenerativeAgent's requests into your API format
   * Provides testing capabilities for validation

3. **Response Interface**:
   * Controls what data GenerativeAgent receives back
   * Transforms API responses into LLM-friendly formats
   * Supports data formatting and simplification

## Create an API Connections

To create an API Connection, you need to:

<Steps>
  <Step title="Access the API Integration Hub">
    1. Navigate to **API Integration Hub** in your dashboard
    2. Select the **API Connections** tab
    3. Click the **Create Connection** button
  </Step>

  <Step title="Select or Upload Your API Specification">
    Every API Connection requires an [OpenAPI specification](https://spec.openapis.org/oas/latest.html) that defines your API endpoints and structure.

    * Choose an existing API spec from your previously uploaded API Specs, or
    * Upload a new OpenAPI specification file

    <Note>
      We support any API that uses JSON for requests and responses.
    </Note>
  </Step>

  <Step title="Configure Basic Details">
    Provide the essential information for your connection:

    * **Name**: A descriptive name for the API Connection
    * **Description**: Brief explanation of the connection's purpose
    * **Endpoint**: Select the specific API endpoint from your specification

    <Warning>
      Only endpoints with JSON request and response bodies are supported.
    </Warning>
  </Step>

  <Step title="Configure the API Source">
    After creation, you'll be taken to the API Source configuration page. Here you'll need to:

    1. Set up [authentication methods](#authentication)
    2. Configure [environment settings](#environment-settings)
    3. Define [error handling](#error-handling) rules
    4. Add any required [static headers](#headers)
  </Step>

  <Step title="Set Up Request and Response Interfaces">
    Configure how GenerativeAgent interacts with your API:

    1. Define the [Request Interface](#request-interface):
       * Specify the schema GenerativeAgent will use
       * Create request transformations
       * Test with sample requests
    2. Configure the [Response Interface](#response-interface):
       * Define the response schema
       * Set up response transformations
       * Validate with sample responses
  </Step>

  <Step title="Test and Validate">
    Before finalizing your API Connection:

    1. Run test requests in the sandbox environment
    2. Verify transformations work as expected
    3. Check error handling behavior
  </Step>

  <Step title="Link to Functions">
    Once your API Connection is configured and tested, you can [reference it in a Function](/generativeagent/configuring#step-4-create-functions) to enable GenerativeAgent to use the API.
  </Step>
</Steps>

## Request Interface

The Request Interface defines how GenerativeAgent interacts with your API. It consists of three key components that work together to enable effective API communication.

* [Request Schema](#request-schema): The schema of the data that GenerativeAgent can send to your API.
* [Request Transformation](#request-transformation): The transformation that will apply to the data before sending it to your API.
* [Testing Interface](#request-testing): The interface that allows you to test the request transformation with different inputs.

<Frame>
  <img width="500px" src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/generativeagent/connect-apis/request-interface.png" alt="Request Interface" />
</Frame>

### Request Schema

The Request Schema specifies the structure of data that GenerativeAgent can send to your API. This schema should be designed for optimal LLM interaction.

<Warning>
  This schema is NOT the schema of the API. This is the schema of that is shown to GenerativeAgent.
</Warning>

**Best Practices for Schema Design**

<AccordionGroup>
  <Accordion title="Simplify Field Names">
    ```json
    // Good - Clear and descriptive
    {
      "type": "object",
      "properties": {
        "customer_name": {
          "type": "string"
        },
        "order_date": {
          "type": "string"
        }
      }
    }

    // Avoid - Cryptic or complex
    {
      "type": "object", 
      "properties": {
        "cust_nm_001": {
          "type": "string"
        },
        "ord_dt_timestamp": {
          "type": "string"
        }
      }
    }
    ```
  </Accordion>

  <Accordion title="Flatten Complex Structures">
    ```json
    // Good - Flat structure
    {
      "type": "object",
      "properties": {
        "shipping_street": {
          "type": "string"
        },
        "shipping_city": {
          "type": "string"
        },
        "shipping_country": {
          "type": "string"
        }
      }
    }

    // Avoid - Deep nesting
    {
      "type": "object",
      "properties": {
        "shipping": {
          "type": "object",
          "properties": {
            "address": {
              "type": "object",
              "properties": {
                "street": {
                  "type": "string"
                },
                "city": {
                  "type": "string"
                },
                "country": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
    ```
  </Accordion>

  <Accordion title="Add Clear Descriptions">
    ```json
    {
      "properties": {
        "order_status": {
          "type": "string",
          "description": "Current status of the order (pending, shipped, delivered)",
          "enum": ["pending", "shipped", "delivered"]
        }
      }
    }
    ```
  </Accordion>

  <Accordion title="Remove Optional Fields">
    * Keep only essential fields that GenerativeAgent needs
    * Set `"additionalProperties": false` to prevent unexpected data
  </Accordion>
</AccordionGroup>

<Note>
  When first created, the Request Schema is a 1-1 mapping to the underlying API spec.
</Note>

### Request Transformation

The Request Transformation converts GenerativeAgent's request into the format your API expects. This is done using [JSONata](https://jsonata.org/) expressions.

<Note>
  When first created, the Request Transformation is a 1-1 mapping to the underlying API spec.
</Note>

<Frame>
  <img width="500px" src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/generativeagent/connect-apis/request-interface.png" alt="Request Interface Configuration" />
</Frame>

**Common Transformation Patterns**

<AccordionGroup>
  <Accordion title="Basic Field Mapping">
    ```javascript
    {
      "headers": {
        "Content-Type": "application/json"
      },
      "pathParameters": {
        "userId": request.id
      },
      "queryParameters": {
        "include": "details,preferences"
      },
      "body": {
        "name": request.userName,
        "email": request.userEmail
      }
    }
    ```
  </Accordion>

  <Accordion title="Data Formatting">
    ```javascript
    {
      "body": {
        // Convert date to ISO format
        "timestamp": $toMillis(request.date),
        // Uppercase a value
        "region": $uppercase(request.country),
        // Join array values
        "tags": $join(request.categories, ",")
      }
    }
    ```
  </Accordion>

  <Accordion title="Conditional Logic">
    ```javascript
    {
      "body": {
        // Include field only if present
        "optional_field": $exists(request.someField) ? request.someField : undefined,
        // Transform based on condition
        "status": request.isActive = true ? "ACTIVE" : "INACTIVE"
      }
    }
    ```
  </Accordion>
</AccordionGroup>

### Request Testing

Thoroughly test your request transformations to ensure GenerativeAgent can send the correct data to your API.

The API Connection can not be saved until the request transformation has a successful test.

**Testing Best Practices**

<AccordionGroup>
  <Accordion title="Test Various Scenarios">
    ```json
    // Test 1: Minimal valid request
    {
      "customerId": "123",
      "action": "view"
    }

    // Test 2: Full request with all fields
    {
      "customerId": "123",
      "action": "update",
      "data": {
        "name": "John Doe",
        "email": "john@example.com"
      }
    }
    ```
  </Accordion>

  <Accordion title="Validate Error Cases">
    * Test with missing required fields
    * Verify invalid data handling
    * Check boundary conditions
  </Accordion>

  <Accordion title="Use Sandbox Environment">
    By Default, the API Connection testing is local. You can test against actual API endpoints by setting "Run test in" to Sandbox.

    * Test against actual API endpoints
    * Verify complete request flow
    * Check response handling
  </Accordion>
</AccordionGroup>

## Response Interface

The Response Interface determines how API responses are processed and presented to GenerativeAgent. A well-designed response interface makes it easier for GenerativeAgent to understand and use the API's data effectively.

There are three main components to the response interface:

* [Response Schema](#response-schema): The JSON schema for the data returned to GenerativeAgent from the API.
* [Response Transformation](#response-transformation): A JSONata transformation where the API response is transformed into the response given to GenerativeAgent.
* [Test Response](#response-testing): The testing panel to test the response transformation with different API responses and see the output.

<Frame>
  <img width="500px" src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/generativeagent/connect-apis/response-interface.png" alt="Response Interface Configuration" />
</Frame>

### Response Schema

The Response Schema defines the structure of data that GenerativeAgent will receive. Focus on creating clear, simple schemas that are optimized for LLM processing.

<Warning>
  The Response Schema is NOT the schema of the underlying API. This is the schema of what is returned to GenerativeAgent.
</Warning>

**Schema Design Principles**

<AccordionGroup>
  <Accordion title="Focus on Essential Data">
    ```json
    // Good - Only relevant fields
    {
      "orderStatus": "shipped",
      "estimatedDelivery": "2024-03-20",
      "trackingNumber": "1Z999AA1234567890"
    }

    // Avoid - Including unnecessary details
    {
      "orderStatus": "shipped",
      "estimatedDelivery": "2024-03-20",
      "trackingNumber": "1Z999AA1234567890",
      "internalId": "ord_123",
      "systemMetadata": { /* ... */ },
      "auditLog": [ /* ... */ ]
    }
    ```
  </Accordion>

  <Accordion title="Use Clear Data Types">
    ```json
    {
      "type": "object",
      "properties": {
        "temperature": {
          "type": "number",
          "description": "Current temperature in Celsius"
        },
        "isOpen": {
          "type": "boolean",
          "description": "Whether the store is currently open"
        },
        "lastUpdated": {
          "type": "string",
          "format": "date-time",
          "description": "When this information was last updated"
        }
      }
    }
    ```
  </Accordion>

  <Accordion title="Standardize Formats">
    * Use consistent date/time formats
    * Normalize enumerated values
    * Use standard units of measurement
  </Accordion>
</AccordionGroup>

<Note>
  When first created, the Response Schema is a 1-1 mapping to the underlying API spec.
</Note>

### Response Transformation

Transform complex API responses into GenerativeAgent-friendly formats using JSONata. The goal is to simplify and standardize the data.

The Transformation's input is the raw API response. The output is the data that GenerativeAgent will receive and must match the Response Schema.

<Note>
  When first created, the Response Transformation is a 1-1 mapping to the underlying API spec.
</Note>

**Transformation Examples**

<AccordionGroup>
  <Accordion title="Basic Data Mapping">
    ```javascript
    {
      // Extract and rename fields
      "status": clientApiCall.data.orderStatus,
      "items": clientApiCall.data.orderItems.length,
      "total": clientApiCall.data.pricing.total
    }
    ```
  </Accordion>

  <Accordion title="Date and Time Formatting">
    ```javascript
    {
      // Convert ISO timestamp to readable format
      "orderDate": $fromMillis($toMillis(clientApiCall.data.created_at), 
                              "[FNn], [MNn] [D1o], [Y]"),
      
      // Format time in 12-hour clock
      "deliveryTime": $fromMillis($toMillis(clientApiCall.data.delivery_eta), 
                                 "[h]:[m01] [P]")
    }
    ```
  </Accordion>

  <Accordion title="Complex Data Processing">
    ```javascript
    {
      // Calculate order summary
      "orderSummary": {
        "totalItems": $sum(clientApiCall.data.items[*].quantity),
        "uniqueItems": $count(clientApiCall.data.items),
        "hasGiftItems": $exists(clientApiCall.data.items[type="GIFT"])
      },
      
      // Format address components
      "deliveryAddress": $join([
        clientApiCall.data.address.street,
        clientApiCall.data.address.city,
        clientApiCall.data.address.state,
        clientApiCall.data.address.zip
      ], ", ")
    }
    ```
  </Accordion>
</AccordionGroup>

### Response Testing

Thoroughly test your response transformations to ensure GenerativeAgent receives well-formatted, useful data.

The API Connection can not be saved until the response transformation has a successful test.

Use [API Mock Users](/generativeagent/configuring/connect-apis/mock-apis) to save response from your server to use them in the response testing.

**Testing Strategies**

<AccordionGroup>
  <Accordion title="Test Different Response Types">
    Make sure to test with different response types your server may respond with.

    This should include happy paths, varied response types, and error paths.
  </Accordion>

  <Accordion title="Validate Data Formatting">
    * Check date/time formatting
    * Verify numeric calculations
    * Test string manipulations
  </Accordion>

  <Accordion title="Edge Cases">
    * Handle null/undefined values
    * Process empty arrays/objects
    * Manage missing optional fields
  </Accordion>
</AccordionGroup>

## Redaction

You have the option to redact fields in the request or response from API Connection Logs or Conversation Explorer.

You can redact fields the internal request and response, by adding `x-redact` to a field in the Request Schema or Response Schema. You will need to save the API connection to apply the changes. This will redact the fields in the Conversation Explorer as well.

You can redact fields in the raw API request and response, by flagging the fields in the relevant API Spec:

1. Navigate to API Integration Hub > API Specs
2. Click on the relevant API Spec.
3. Click on the "Parameters" tab and flag
4. Per endpoint, click the fields you want to redact.

Redacting the Spec will redact the fields within the [API Connection Log](#api-connection-logs).

## API Versioning

Every update to an API Connection requires a version change. This is to ensure that no change can be made to an API connection that impacts a live function.

If you make a change to an API connection, the Function that references that API connection will need to be explicitly updated to point to the new version.

## API Connection Logs

We log all requests and responses for API connections. This allows you to see the raw requests and responses, and the transformations that were applied.

Use the logs to debug and understand how API connections are working.

Logs are available in API Integration Hub > API Connection Logs.

## Default API Spec Settings

You can set default information in an API spec. These default settings are used as a template for newly created API connections, copying those settings for all API connections created for that API spec.

You can set the following defaults:

* Headers
* Sandbox Settings:
  * Base URL
  * Authentication Method
* Production Settings:
  * Base URL
  * Authentication Method

You can make further changes to API connections as necessary.

You can also change the defaults and it will not change existing API connections, though the new defaults will be used on any new connections made with that Spec.

## Examples

Here are some examples of how to configure API connections for different scenarios.

<AccordionGroup>
  <Accordion title="Update Passenger Name (Simple mapping)">
    This example demonstrates configuring an API connection for updating a passenger's name on a flight booking.

    #### API Endpoint

    ```json
    PUT /flight/[flightId]/passenger/[passengerId]
    {
      "name": {
        "first": [Passenger FirstName],
        "last": [Passenger LastName]
      }
    }
    ```

    #### API Response

    ```json
    {
      "id": "pax-12345",
      "flightId": "XZ2468",
      "updatedAt": "2024-10-04T14:30:00Z",
      "passenger": {
        "id": "PSGR-56789",
        "name": {
          "first": "John",
          "last": "Doe"
        },
        "seatAssignment": "14A",
        "checkedIn": true,
        "frequentFlyerNumber": "FF123456"
      },
      "status": "confirmed",
      "specialRequests": ["wheelchair", "vegetarian_meal"],
      "baggage": {
        "checkedBags": 1,
        "carryOn": 1
      }
    }
    ```

    <AccordionGroup>
      <Accordion title="Request Configuration">
        1. Request Schema:

        ```json
        {
          "type": "object",
          "properties": {
            "externalCustomerId": {"type": "string"},
            "passengerFirstName": {"type": "string"},
            "passengerLastName": {"type": "string"},
            "flightId": {"type": "string"}
          },
          "required": ["externalCustomerId", "passengerFirstName", "passengerLastName", "flightId"]
        }
        ```

        2. Request Transformation:

        ```javascript
        {
          "headers": {},
          "pathParameters": {
            "flightId": request.flightId,
            "passengerId": request.externalCustomerId
          },
          "queryParameters": {},
          "body": {
            "name": {
              "first": request.passengerFirstName,
              "last": request.passengerLastName
            }
          }
        }
        ```

        3. Sample Test Request:

        ```json
        {
          "externalCustomerId": "CUST123",
          "passengerFirstName": "Johnson",
          "passengerLastName": "Doe",
          "flightId": "XZ2468"
        }
        ```
      </Accordion>

      <Accordion title="Response Configuration">
        1. Response Schema:

        ```json
        {
          "type": "object",
          "properties": {
            "success": {
              "type": "boolean",
              "description": "Whether the name update was successful"
            }
          },
          "required": ["success"]
        }
        ```

        2. Response Transformation:

        ```javascript
        {
          "success": $exists(clientApiCall.data.id) and 
                     $exists(clientApiCall.data.passenger.name.first) and 
                     $exists(clientApiCall.data.passenger.name.last) and 
                     clientApiCall.data.status = "confirmed"
        }
        ```

        3. Sample Test Response:

        ```json
        {
          "clientApiCall": {
            "data": {
              "id": "pax-12345",
              "flightId": "XZ2468",
              "updatedAt": "2024-10-04T14:30:00Z",
              "passenger": {
                "id": "PSGR-56789",
                "name": {
                  "first": "John",
                  "last": "Doe"
                },
                "seatAssignment": "14A",
                "checkedIn": true,
                "frequentFlyerNumber": "FF123456"
              },
              "status": "confirmed",
              "specialRequests": ["wheelchair", "vegetarian_meal"],
              "baggage": {
                "checkedBags": 1,
                "carryOn": 1
              }
            }
          }
        }
        ```
      </Accordion>
    </AccordionGroup>
  </Accordion>

  <Accordion title="Lookup Flight Status (Complex mapping)">
    This example shows how to simplify a complex flight status API response by removing unnecessary fields and flattening nested structures.

    #### API Endpoint

    ```json
    GET /flights/[flightNumber]/status
    ```

    #### API Response

    ```json
    {
      "flightDetails": {
        "flightNumber": "AA123",
        "route": {
          "origin": {
            "code": "SFO",
            "terminal": "2",
            "gate": "A12",
            "weather": { /* complex weather object */ }
          },
          "destination": {
            "code": "JFK",
            "terminal": "4",
            "gate": "B34",
            "weather": { /* complex weather object */ }
          }
        },
        "schedule": {
          "departure": {
            "scheduled": "2024-03-15T10:30:00Z",
            "estimated": "2024-03-15T10:45:00Z",
            "actual": null
          },
          "arrival": {
            "scheduled": "2024-03-15T19:30:00Z",
            "estimated": "2024-03-15T19:45:00Z",
            "actual": null
          }
        },
        "status": "DELAYED",
        "aircraft": { /* aircraft details */ }
      }
    }
    ```

    <AccordionGroup>
      <Accordion title="Request Configuration">
        1. Request Schema:

        ```json
        {
          "type": "object",
          "properties": {
            "flightNumber": {
              "type": "string",
              "description": "The flight number to look up"
            }
          },
          "required": ["flightNumber"]
        }
        ```

        2. Request Transformation:

        ```javascript
        {
          "headers": {},
          "pathParameters": {
            "flightNumber": request.flightNumber
          },
          "queryParameters": {},
          "body": {}
        }
        ```

        3. Sample Test Request:

        ```json
        {
          "flightNumber": "AA123"
        }
        ```
      </Accordion>

      <Accordion title="Response Configuration">
        1. Response Schema:

        ```json
        {
          "type": "object",
          "properties": {
            "flight_number": { 
              "type": "string",
              "description": "The flight number"
            },
            "flight_status": { 
              "type": "string",
              "description": "Current status of the flight"
            },
            "origin_airport_code": { 
              "type": "string",
              "description": "Three-letter airport code for origin"
            },
            "destination_airport_code": { 
              "type": "string",
              "description": "Three-letter airport code for destination"
            },
            "scheduled_departure_time": { 
              "type": "string",
              "description": "Scheduled departure time"
            },
            "scheduled_arrival_time": { 
              "type": "string",
              "description": "Scheduled arrival time"
            },
            "is_flight_delayed": { 
              "type": "boolean",
              "description": "Whether the flight is delayed"
            }
          }
        }
        ```

        2. Response Transformation:

        ```javascript
        {
          "flight_number": clientApiCall.data.flightDetails.flightNumber,
          "flight_status": clientApiCall.data.flightDetails.status,
          "origin_airport_code": clientApiCall.data.flightDetails.route.origin.code,
          "destination_airport_code": clientApiCall.data.flightDetails.route.destination.code,
          "scheduled_departure_time": clientApiCall.data.flightDetails.schedule.departure.estimated,
          "scheduled_arrival_time": clientApiCall.data.flightDetails.schedule.arrival.estimated,
          "is_flight_delayed": clientApiCall.data.flightDetails.status = "DELAYED"
        }
        ```
      </Accordion>
    </AccordionGroup>
  </Accordion>

  <Accordion title="Appointment Lookup (Date Formatting)">
    This example demonstrates date formatting and complex object transformation for an appointment lookup API.

    #### API Endpoint

    ```json
    GET /appointments/[appointmentId]
    ```

    #### API Response

    ```json
    {
      "id": "apt_123",
      "type": "DENTAL_CLEANING",
      "startTime": "2024-03-15T14:30:00Z",
      "endTime": "2024-03-15T15:30:00Z",
      "provider": "Dr. Sarah Smith",
      "location": "Downtown Medical Center",
      "patient": {
        "id": "pat_456",
        "name": "John Doe",
        "dateOfBirth": "1985-06-15",
        "contactInfo": {
          "email": "john.doe@email.com",
          "phone": "+1-555-0123"
        }
      },
      "status": "confirmed",
      "notes": "Regular cleaning and check-up",
      "insuranceVerified": true,
      "lastUpdated": "2024-03-01T10:15:00Z"
    }
    ```

    <AccordionGroup>
      <Accordion title="Request Configuration">
        1. Request Schema:

        ```json
        {
          "type": "object",
          "properties": {
            "appointmentId": {
              "type": "string",
              "description": "The ID of the appointment to look up"
            }
          },
          "required": ["appointmentId"]
        }
        ```

        2. Request Transformation:

        ```javascript
        {
          "headers": {},
          "pathParameters": {
            "appointmentId": request.appointmentId
          },
          "queryParameters": {},
          "body": {}
        }
        ```

        3. Sample Test Request:

        ```json
        {
          "appointmentId": "apt_123"
        }
        ```
      </Accordion>

      <Accordion title="Response Configuration">
        1. Response Schema:

        ```json
        {
          "type": "object",
          "properties": {
            "appointmentType": { 
              "type": "string",
              "description": "The type of appointment in a readable format"
            },
            "date": { 
              "type": "string",
              "description": "The appointment date in a friendly format"
            },
            "startTime": { 
              "type": "string",
              "description": "The appointment start time in 12-hour format"
            },
            "doctor": { 
              "type": "string",
              "description": "The healthcare provider's name"
            },
            "clinic": { 
              "type": "string",
              "description": "The location where the appointment will take place"
            },
            "status": {
              "type": "string",
              "description": "The current status of the appointment"
            },
            "patientName": {
              "type": "string",
              "description": "The name of the patient"
            }
          },
          "required": ["appointmentType", "date", "startTime", "doctor", "clinic", "status", "patientName"]
        }
        ```

        2. Response Transformation:

        ```javascript
        {
          /* Convert appointment type from UPPER_SNAKE_CASE to readable format */
          "appointmentType": $replace(clientApiCall.data.type, "_", " ") ~> $lowercase(),
          
          /* Format date as "Friday, March 15th, 2024" */
          "date": $fromMillis($toMillis(clientApiCall.data.startTime), "[FNn], [MNn] [D1o], [Y]"),
          
          /* Format start time as "2:30 PM" */
          "startTime": $fromMillis($toMillis(clientApiCall.data.startTime), "[h]:[m01] [P]"),
                      
          /* Map provider and location directly */
          "doctor": clientApiCall.data.provider,
          "clinic": clientApiCall.data.location,
          
          /* Map status and patient name */
          "status": clientApiCall.data.status,
          "patientName": clientApiCall.data.patient.name
        }
        ```

        3. Sample Transformed Response:

        ```json
        {
          "appointmentType": "dental cleaning",
          "date": "Friday, March 15th, 2024",
          "startTime": "2:30 PM",
          "doctor": "Dr. Sarah Smith",
          "clinic": "Downtown Medical Center",
          "status": "confirmed",
          "patientName": "John Doe"
        }
        ```
      </Accordion>
    </AccordionGroup>
  </Accordion>
</AccordionGroup>

## Next Steps

Now that you've configured your API connections, GenerativeAgent can interact with your APIs just like a live agent. Here are some helpful resources for next steps:

<CardGroup>
  <Card title="Previewer" href="/generativeagent/configuring/previewer" />

  <Card title="Integrating GenerativeAgent" href="/generativeagent/integrate" />

  <Card title="Connecting Your Knowledge Base" href="/generativeagent/configuring/connecting-your-knowledge-base" />
</CardGroup>


# Authentication Methods
Source: https://docs.asapp.com/generativeagent/configuring/connect-apis/authentication-methods

Learn how to configure Authentication methods for API connections.

APIs require authentication to control access to their endpoints. GenerativeAgent's API connections support the following authentication methods:

* Basic Authentication (username/password)
* Custom Header Authentication (API keys)
* OAuth 2.0 (Authorization Code and Client Credentials flows)

If your APIs require an authentication flow that is not supported by the default authentication methods, we can create a [custom authentication method](#custom-authentication-methods) for you.

## Create an Authentication Method

To Create an Authentication Method:

<Steps>
  <Step title="Navigate to API Integration Hub > Authentication Methods">
    <Note> You may also create an Authentication Method when specifying the API Connection's API Source.</Note>
  </Step>

  <Step title="Click 'Create Authentication Method'" />

  <Step title="Configure the Authentication Method">
    * Provide a name and description
    * Select the Authentication Type matching your API's requirements
    * Configure the type-specific settings detailed in sections below
    * Save the Authentication Method
  </Step>

  <Step title="Add to API Connection">
    In the API Connection's API Source tab, select this Authentication Method for Sandbox or Production environments.
  </Step>
</Steps>

## Basic Authentication

[Basic authentication](https://en.wikipedia.org/wiki/Basic_access_authentication) requires:

* Username
* Password

## Custom Header

Custom headers add authentication data to API requests via HTTP headers. Common implementations include API keys and bearer tokens.

To configure a custom header, you need to:

1. Optionally enable client authentication:
   * Enable if you need to reference values from the client in a header.
   * Set the client data validity duration.
   * Reference client data using `{Auth.*}`
2. Header configuration:
   * Header Name (e.g., "Authorization", "X-API-Key")
   * Header Value (static value or dynamic client data)
     * e.g. `{Auth.client_token}`

## OAuth

OAuth 2.0 provides delegated authorization flows. GenerativeAgent supports:

<Tabs>
  <Tab title="Authorization Code">
    Required configuration:

    * Authorization Code reference

      This is the location within the [client data](#client-authentication-data) that contains the authorization code.

      `{Auth.authorization_code}`
    * Client ID
    * Client secret
    * Token Request URL
    * Redirect URI

      You can use a variable from the client data for the redirect URI. `{Auth.redirect_uri}`
    * How the client authentication data is passed
      * Basic Auth, or
      * Request Body
    * One or more headers to be added to the request.
      * Header Name
      * Header Value

        Use `{OAuth.access_token}` for the generated access token.

        You can also reference the client data in the header values, using the variable: `{Auth.[auth_data_key]}`.
  </Tab>

  <Tab title="Client Credentials">
    Required configuration:

    * Client ID
    * Client secret
    * Token Request URL
    * How the client authentication data is passed
      * Basic Auth, or
      * Request Body
    * One or more headers to be added to the request.
      * Header Name
      * Header Value

        Use `{OAuth.access_token}` for the generated access token.

        You can also reference the client data in the header values, using the variable: `{Auth.[auth_data_key]}`.
  </Tab>
</Tabs>

## Client Authentication Data

Some authentication flows require dynamic data from the client:

* OAuth authorization codes
* User-specific API keys
* Custom tokens

Client authentication data is provided through:

<Tabs>
  <Tab title="Standalone GenerativeAgent">
    If you are using GenerativeAgent independently of ASAPP Messaging, this Auth data is passed via the [`/authenticate`](/apis/conversations/authenticate-a-user-in-a-conversation) endpoint.
  </Tab>

  <Tab title="ASAPP Messaging">
    If you are using GenerativeAgent as part of ASAPP Messaging, this Auth data is passed via the [SDKs](http://localhost:3000/messaging-platform/integrations) depending on the chat channel you are using.
  </Tab>
</Tabs>

### Client Authentication Session

Any authentication method that requires client data will store the auth data for the session.

If the underlying API returns a `401`, we will require new client authentication data for the session.  This is communicated in the GenerativeAgent event stream as an [`authenticationRequested`](http://localhost:3000/generativeagent/integrate/handling-events#user-authentication-required) event.

## Custom Authentication Methods

If your API requires an authentication flow not supported by our default methods, we can work with you to create a custom solution.

Contact your ASAPP account team to discuss your custom authentication requirements. We'll work with you to build and implement the solution.

### Using Custom Authentication Methods

Custom authentication methods work the same way as standard methods:

* They appear in your authentication method list
* Can be selected when configuring API connections
* Support both sandbox and production environments

<Note>
  Custom authentication methods are read-only configurations. To modify an existing custom authentication method, please work with your ASAPP account team.
</Note>


# Mock API Users
Source: https://docs.asapp.com/generativeagent/configuring/connect-apis/mock-apis

Learn how to mock APIs for testing and development.

While you are building your API Connection, you can use Mock Data to test the API Connection and ensure your transformations are working as expected. This Mock data is saved as a Mock User where you can group mock responses for a given scenario.

<Note>
  The Mock Data is only used when testing the API Connection. Use [Test Users](/generativeagent/configuring/tasks-and-functions/test-users) to test and simulate Tasks and Function responses.
</Note>

## Mock Users

A mock user is a collection of mock responses that simulate how your server may respond. Each endpoint in use by an API Connection can have a mock response defined. By default, the mock user will return the [default mock data](/generativeagent/configuring/connect-apis#api-source) defined in the API Connection's API Source.

To Create a Mock User:

<Steps>
  <Step title="Navigate to API Integration Hub > API Mock Users">
    Access the API Mock Users section from the API Integration Hub.
  </Step>

  <Step title="Click 'Create User'">
    Select the 'Create User' button to start creating a new mock user.
  </Step>

  <Step title="Specify the User Details">
    Provide the following information:

    * Name of the User
    * Description of the User
  </Step>

  <Step title="Define Mock Responses">
    The newly created mock user will have a default mock response for each endpoint in the API Connection.

    You can check "Override Default Mock response" and specify a new mock response.

    Make sure to save the mock user to apply the changes.
  </Step>
</Steps>

## Using Mock Users

You can use Mock Users to test your transformations. From within the Response interface, you can select the mock user to use in the "Test Response" panel.

<Frame>
  <img width="500px" src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/generativeagent/connect-apis/mock-user-selection.png" alt="Mock User Selection" />
</Frame>

This allows you to save common responses from your server in sets of Mock users. As you iterate on your API Connection, you can test your transformation using the same mock responses.

## Next Steps

<CardGroup>
  <Card title="Test Users" icon="user-check" href="/generativeagent/configuring/tasks-and-functions/test-users">
    Learn how to use test users to simulate and validate task and function responses
  </Card>

  <Card title="Connect APIs" icon="plug" href="/generativeagent/configuring/connect-apis">
    Understand how to connect and configure external APIs with your application
  </Card>

  <Card title="Authentication Methods" icon="key" href="/generativeagent/configuring/connect-apis/authentication-methods">
    Learn how to authenticate your API connections
  </Card>

  <Card title="Integration Guide" icon="code-merge" href="/generativeagent/integrate">
    Step-by-step guide to integrate APIs with your GenerativeAgent implementation
  </Card>
</CardGroup>


# Connecting your Knowledge Base
Source: https://docs.asapp.com/generativeagent/configuring/connecting-your-knowledge-base

Learn how to import and deploy your Knowledge Base for GenerativeAgent.

Your knowledge base is crucial for GenerativeAgent to provide accurate and contextually relevant responses to users. You fully control what articles are included with GenerativeAgent.

Manage the knowledge base within the ASAPP dashboard.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-6a3bd50e-2c74-39f2-9b37-2453e719cda5.png" />
</Frame>

GenerativeAgent's Knowledge Base is designed to hold information that GenerativeAgent can use to answer customer questions. Customers may ask direct questions like "What is the return policy?" or express confusion that implies a question like "I don't understand what 'eligible for store credit' means").

GenerativeAgent reads a customer message and decides if it should check the Knowledge Base to provide helpful information, even if a questions is implicit. If the message implies a question, GenerativeAgent searches for its response in the Knowledge Base.

To give GenerativeAgent access to your Knowledge Base, you need to:

1. Import your knowledge base into ASAPP
2. Deploy knowledge base articles

<Note>
  We do not recommend  to directly upload an internal agent-facing kowledge base to the GenerativeAgent Knowledge Base.

  GenerativeAgent's Knowledge Base is meant for GenerativeAgent's use. Instructions meant for agents are better suited to task instructions.
</Note>

## Step 1: Importing your Knowledge Base

To enable GenerativeAgent to reference your knowledge base, you need to import it into ASAPP:

* Navigate to GenerativeAgent > Knowledge
* Click "Add content"
* Select between:
  * **Import from URL**
  * **Create Snippet**
  * **Add via API**

<Tabs>
  <Tab title="Importing Content from URL">
    Importing content from a URL allows you to specify an entry point from where our crawler will crawl the website and create knowledge base articles.

    To import content from a website:

    1. Choose "Import from URL".

    2. Specify the URL of the website in External content URL.

    3. (Optional) Add URL Prefixes and Excluded URLs to control which articles are included.

       <AccordionGroup>
         <Accordion title="Exclude URLs">
           Add one or more URLs to exclude in the "Excluded URL".

           All the articles that direct to the URL will be excluded.

           <Frame>
             <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/generativeagent/ExcludeURLs.png" />
           </Frame>
         </Accordion>

         <Accordion title="URL Prefix">
           The URL Prefix informs our crawler to only create articles from pages that match your prefixes.

           This enables you to use the main URL as the entry point for the crawling but only use pages that match your prefixes.

           <Frame>
             <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/generativeagent/url_prefix.png" />
           </Frame>
         </Accordion>
       </AccordionGroup>

    4. Click "Import content" to start the process.

    Imported articles from a URL will need to be [reviewed and published](#Imported-Articles) before they are available in the Knowledge Base.
  </Tab>

  <Tab title="Creating a Snippet">
    Snippets are standalone articles created within the Knowledge Base Tooling:

    1. Choose "Create snippet".
    2. Provide a title and necessary content.
    3. Add LLM Instructions and Metadata Keys as needed.

    <Frame>
      <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-a5f488c1-8d55-60fa-2b18-c2b185fb5546.png" />
    </Frame>

    After saving, the Snippet can be seen from the Table View with its Description and Attributes.

    <Frame>
      <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-2a26fb87-81b2-e453-8307-d0d62b33b117.png" />
    </Frame>
  </Tab>

  <Tab title="Add via API">
    You can programmatically add and modify articles using our Knowledge Base Article Submission API. Articles imported via API need to be [reviewed and published](#Imported-Articles) before they are available in the Knowledge Base.

    <Card title="Add via API" href="/generativeagent/configuring/connecting-your-knowledge-base/add-via-api">
      Learn how to import articles programmatically using the Knowledge Base API
    </Card>
  </Tab>
</Tabs>

## Step 2: Deploy your Knowledge Base

Once imported, you need to deploy your Knowledge Base into different environments for GenerativeAgent. This includes reviewing and approving changes. This is crucial as changes to the content in knowledge base may impact how GenerativeAgent responds to your users.

Deploying Knowledge Base occurs as part of the general [GenerativeAgent deployment process](/generativeagent/configuring/deploying-to-generativeagent).

## Imported Articles

Articles imported from URL or APIs need to be reviewed and published before they are available in the Knowledge Base.

If there are any articles pending review, you will see a notification on the top of the Knowledge Base page.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-6980a63d-3e9a-1ddd-1eb3-5395d3ece938.png" />
</Frame>

For each article, you can choose between a cleaned-up or raw version of the article to ensure the content is accurate and appropriate for customer use.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/generativeagent/DetailedReview.png" />
</Frame>

<Warning>
  Imported articles that are updated due to a new crawl or API submission will need to be reviewed and published to make the new content available.
</Warning>

## Optimizing GenerativeAgent's Use of Articles

Improve GenerativeAgent's performance with these features:

1. **Query Examples**: Add typical customer questions to ensure relevant content retrieval.
2. **Additional Instructions**: Provide context and clarification for each piece of content.

### Adding Query Examples

1. In the "GenerativeAgent Instructions" column, click "Add query example".
2. Enter common customer questions.
3. Add multiple queries as needed.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-a6143054-92eb-a857-86e5-35434a80907a.png" />
</Frame>

### Providing Additional Instructions

1. Click "Add Instruction".
2. Write a clear description in the "Clarification" field.
3. Provide an example response.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-2165b887-ca8e-b93b-975a-03c9ec4eadbf.png" />
</Frame>

Use Additional Instructions to guide GenerativeAgent's behavior, including preventing unwanted responses.

### Filter with Metadata

You can enhance GenerativeAgent's understanding of your articles by adding metadata. Add metadata onto an article, and for the relevant tasks, add the metadata filers.

When GenerativeAgent follows that task, it will query the Knowledge Base with those metadata filters. This enables you to focus GenerativeAgent's to only look at the relevant articles.

It is recommended to store task-related information in the Knowledge Base with metadata tags.

To add metadata to an article:

1. Navigate to the article.
2. Click "Edit Metadata" to open the Metadata Window.
3. Add or remove keys as necessary.

You can use metadata to ensure certain articles are only used by specific tasks. If an Article and a Task have the same metadata tags, GenerativeAgent will filter and only use that specific relevant information during a conversation.

### Search with Metadata Filters

Apply additional filters to a search with the "Add filter" Button to retrieve and manage Articles in bulk.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/generativeagent/KBSearchBar.png" />
</Frame>

Available filters include:

* Content Source Name
* Content Source Type
* First Activity Range
* Created By
* Last Modified By
* Deployment Status
* Metadata

<Note>
  You can select and apply multiple filters.

  The selected filters combine using "AND" operators for precise search results
</Note>

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/generativeagent/KBSearchFilters.png" />
</Frame>

<Note>
  Search results and applied filters continue when navigating back to the Knowledge Base list from an Article
</Note>

## Preview

Test GenerativeAgent's use of your Knowledge Base:

1. Click the eye button next to "Deploy" to access the Preview User.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-357991fb-7e28-1e16-80eb-4861ec9bc6ef.png" />
</Frame>

2. Start a conversation to see how GenerativeAgent uses your content.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-a8a53588-8543-d39d-a267-cd8d7e793be6.png" />
</Frame>

For more information on the Previewer, see the [Previewer guide](/generativeagent/configuring/previewer).

## Next Steps

After adding your knowledge base to ASAPP, explore these additional integration topics:

<CardGroup>
  <Card title="Connecting Your APIs" href="/generativeagent/configuring/connect-apis" />

  <Card title="Integrating GenerativeAgent" href="/generativeagent/integrate" />
</CardGroup>


# Add via API
Source: https://docs.asapp.com/generativeagent/configuring/connecting-your-knowledge-base/add-via-api

Learn how to add Knowledge Base articles programmatically using the API

The Knowledge Base Article Submission API offers an alternative to manual creation of article snippets and URL imports. This is especially beneficial for large data sources that are not easily scraped, such as internal knowledge bases or articles within a Content Management System.

All content imported via API follow the [Imported Articles](/generativeagent/configuring/connecting-your-knowledge-base#imported-articles) review process.

## Before you Begin

Before using the Knowledge Base Article Submission API, you need to:

* [Get your API Key Id and Secret](/getting-started/developers#access-api-credentials)
* Ensure your API key has been configured to access Knowledge Base APIs. Reach out to your ASAPP team if you need access enabled.

## Step 1: Create a submission

To import an article via API, you need to create a `submission`. A **submission** is the attempt to import an article. It will still need to be reviewed and published like any other imported article.

To [create a submission](/apis/knowledge-base/create-a-submission), you need to specify:

* `title`: The title of the article
* `content`: The content of the article

<Note>
  There are additional optional fields that can be used to improve the articles such as `url`, `metadata`, and `queryExamples`. More information can be found in the [API Reference](/apis/knowledge-base/create-a-submission).
</Note>

As an example, here's a request to create a submission for an article including additional values such as `url` and `metadata`:

```json
curl --request POST \
  --url https://api.sandbox.asapp.com/knowledge-base/v1/submissions \
  --header 'Content-Type: application/json' \
  --header 'asapp-api-id: <api-key>' \
  --header 'asapp-api-secret: <api-key>' \
  --data '{
  "title": "5G Data Plan",
  "content": "Our 5G data plans offer lightning-fast speeds and generous data allowances. The Basic 5G plan includes 50GB of data per month, while our Unlimited 5G plan offers truly unlimited data with no speed caps. Both plans include unlimited calls and texts within the country. International roaming can be added for an additional fee.",
  "url": "https://example.com/5g-data-plans",
  "metadata": [
    {
      "key": "department",
      "value": "Customer experience"
    }
  ],
  "queryExamples": [
    "What 5G plans do you offer?",
    "Is there an unlimited 5G plan?"
  ],
  "additionalInstructions": [
    {
      "clarificationInstruction": "Emphasize that 5G coverage may vary by location",
      "exampleResponse": "Our 5G plans offer great speeds and data allowances, but please note that 5G coverage may vary depending on your location. You can check coverage in your area on our website."
    }
  ]
}'
```

## Step 2: Article Processing

The Article Submission API submits the article that will still need to be reviewed and published like any other imported article.

You can check the status of the submission by calling the [Get a Submission](/apis/knowledge-base/retrieve-a-submission) API.

The response will include the `id` of the submission and the `status` of the submission.

```json
{
  "id": "fddd060c-22d7-4aed-acae-8f8dcc093a88",
  "articleId": "8f8dcc09-22d7-4aed-acae-fddd060c3a88",
  "submittedAt": "2024-12-12T00:00:00",
  "title": "5G Data Plan",
  "content": "Our 5G data plans offer lightning-fast speeds and generous data allowances...",
  "status": "PENDING_REVIEW"
}
```

## Step 3: Publication and Updates

Once the submission is approved, the article will be published and become available in the Knowledge Base. The status of the submission will be updated to `ACCEPTED` and you will see it within the ASAPP AI-Console UI.

You can also update the article after it has been published by creating another submission with the same `articleId`.

## Troubleshooting

Common API response codes and their solutions:

<AccordionGroup>
  <Accordion title="500 - Internal Server Error">
    If you receive a `500` code, there is an issue with the server. Wait and try again.

    If the error persists, contact your ASAPP Team.
  </Accordion>

  <Accordion title="400 - Bad Request">
    The `400` code usually means missing required parameters.

    Recheck your request body and try again.
  </Accordion>

  <Accordion title="401 - Unauthorized">
    A `401` code indicates wrong credentials or unconfigured ASAPP credentials.
  </Accordion>

  <Accordion title="413 - Request Entity Too Large">
    The request body is too large. Article content is limited to 200,000 Unicode characters.

    Try again with less content.
  </Accordion>
</AccordionGroup>

## Next Steps

<CardGroup>
  <Card title="Knowledge Base API Reference" href="/apis/knowledge-base">
    View the Knowledge Base API documentation
  </Card>

  <Card title="Connecting your Knowledge Base" href="/generativeagent/configuring/connecting-your-knowledge-base">
    Learn more about managing your Knowledge Base articles
  </Card>

  <Card title="Configuring GenerativeAgent" href="/generativeagent/configuring">
    Configure how GenerativeAgent uses your Knowledge Base
  </Card>

  <Card title="Go Live" href="/generativeagent/go-live">
    Deploy your Knowledge Base to production
  </Card>
</CardGroup>


# Deploying to GenerativeAgent
Source: https://docs.asapp.com/generativeagent/configuring/deploying-to-generativeagent

Learn how to deploy GenerativeAgent.

After importing your Knowledge Base and connecting your APIs to GenerativeAgent, you need to manage deployments for GenerativeAgent's use.

You can deploy and undeploy articles and API Connections in the GenerativeAgent UI. There are also options to view version history and roll back changes in the UI.

<Note>
  You must deploy Articles or Functions separately from each other.
</Note>

## Environments

The GenerativeAgent UI offers the following environments to deploy, undeploy, or roll back:

* **Draft**: In this environment, you can try out any article or API connection.
* **Sandbox**: This environment works as a staging version to test GenerativeAgent's responses. You can test the behavior of GenerativeAgent and how it performs tasks or calls functions before deploying to a live environment.
* **Production**: When you deploy to this version, the GenerativeAgent will be live in collaborating in the flows and taking over tasks within your Production environments.

For any version or environment, you can deploy Articles. API Connections are tested via Trial Mode.

This way, you are able to test how GenerativeAgent behaves with a specific article, resource, or API Connection.

## GenerativeAgent Versions

As we continue to update GenerativeAgent, we will release new versions of the core system. You can manage which version of GenerativeAgent is deployed for your organization with Pinned Versions.

On the Settings page, you can choose which version of GenerativeAgent that you want to test in the [Previewer](/generativeagent/configuring/previewer) by selecting a specific version from the Version selector.

This allows you to test how GenerativeAgent would behave under a new version.

* The `Default` version will always point to the latest version of GenerativeAgent.
* Versions with a `stable` badge have been thoroughly tested and will not change.
* Versions with a `beta` badge are in development and may change. Eventually they will become `stable`.

<Note>
  Your GenerativeAgent will use the `Default` version if no other version is pinned.

  Using the `Default` version ensures that GenerativeAgent is always using the safest version with the latest features.
</Note>

If you do want to manually pin your GenerativeAgent to specific version, select the version from Settings and deploy the Settings to your production environment.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/generativeagent/PinnedVersionSelector.png" />
</Frame>

### GenerativeAgent Versions Available

| Version | Description                               |
| :------ | :---------------------------------------- |
| v3      | Improved usage of functions               |
| v2      | Improved usage of knowledge base articles |
| v1      | Safe, accurate issue resolution           |

<Note>
  Older versions will eventually become deprecated. ASAPP will reach out to you if you are using a deprecated version to communicate timelines and best practices for migration.
</Note>

## Articles

### Deploy Articles

To Deploy Content to Sandbox or Production environments:

1. Click on Deploy, then choose the root and the target environments.
2. Write any Release Notes that you deem necessary.
3. For Resource, select Knowledge Base.
4. You will be prompted with a list of all resources pulled from your file. Choose the content you want to upload to the Knowledge Base Tooling.
5. Click on Deploy and the content will be saved in the new version.

You can now see a list of all recently deployed content.

### Undeploy Articles

You can undeploy Content from Sandbox or Production environments:

1. Head to the Content Row and click on the ellipsis, then on Undeploy.
2. Select the environments that should undeploy the Resource.

A confirmation message appears every time you successfully undeploy a resource. Keep in mind undeployed resources can be redeployed via individual deployment.

### View Current Articles and Versions

After clicking on a Resource, you can see all of its details. You can also review each Resource's detail per version.

### View Deployment History

Deployment History shows a detailed account of all deployments across environments for each article.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/generativeagent/DeploymentHistory2.png" />
</Frame>

On the Deployment History tab, you can:

1. Toggle between Production and Sandbox to access environment specific deployments.
2. Filter deployment records by time frames.
3. Manage Deployment and rollback to previous versions.

<Note>
  Each deployment entry shows date, time, type, and a brief description of deployment.
</Note>

## API Connections

When you create an API Connection, it will automatically be available for GenerativeAgent. You can test resources that use APIs like Functions into the same environments before going live.

### Trial Mode

ASAPP safely deploys new API use cases to production via Trial Mode.

Trial Mode is configured in a way that if there are multiple APIs configured for a task or a function, GenerativeAgent is only allowed to call the first API.

After GenerativeAgent calls an API, it will immediately escalate to an agent. This way to observe GenerativeAgent's behavior after the API call.

Once you and your ASAPP Team are confident that GenerativeAgent is correctly using API Connections, GenerativeAgent is given full access to use the Connection. After that, Functional Testing is started on the next API Connection.

## Rollbacks

Rollback involves reverting a deployed resource to a previous version or state. Rollbacks restore the previous version of the resource, undoing any changes introduced by the most recent update. Version pointers for each resource indicate the new\_version\_number from the chosen deployment for rollback.

### Undeployment

Undeployment is restricted to individual resources (a task, a function, or an article). It is possible to remove resources from specific environments without deploying any version of them. Undeploying a resource does not change the state of the draft, and the latest modification of the draft is still considered the latest version.

Undeploying also generates a new line item within the deployment history. If a resource is critical for the functioning of other resources or services, undeployment is blocked to prevent system failures or disruptions.

### Edit History

Each resource has a history of all modifications. Edit History can be used to restore a resource to a past version.

### Resource Deletion

Deleting a resource results in the resource becoming inaccessible and invisible on the list. Deletion is prohibited if there are any dependencies, such as a function being utilized by a task. Deletion of deployed resources is not permitted until the resource is undeployed from all the dependent environments to ensure uninterrupted service.

If a resource is critical for the functioning of other resources or services, deletion is blocked to prevent system failures or disruptions.

## Next Steps

With a functioning Knowledge Base Deployment, you are ready to use GenerativeAgent. You may find one of the following sections helpful in advancing your integration:

<CardGroup>
  <Card title="Configuring GenerativeAgent" href="/generativeagent/configuring" />

  <Card title="Safety and Troubleshooting" href="/generativeagent/configuring/safety-and-troubleshooting" />

  <Card title="Go Live" href="/generativeagent/go-live" />
</CardGroup>


# Functional Testing
Source: https://docs.asapp.com/generativeagent/configuring/functional-testing

Learn how to test GenerativeAgent to ensure it handles customer scenarios correctly before production launch.

Functional Testing is a critical step in evaluating GenerativeAgent after setting requirements for Tasks and Functions. Given the dynamic nature of Large Language Models (LLMs), it's essential to validate that GenerativeAgent works as expected in various scenarios. Testing is the best strategy to ensure reliability and performance before launching any task into production.

This testing phase is a crucial part of your integration process. We strongly recommend completing thorough functional testing, with assistance from the ASAPP team, before deploying GenerativeAgent in a live environment. This process involves verifying, validating, and confirming that GenerativeAgent functions as expected across a wide range of potential user interactions.

It's helpful to have a high-level overview of how GenerativeAgent works while planning your testing. GenerativeAgent assumes it is engaging with a customer who has a problem it can help resolve. GenerativeAgent uses a combination of:

* Task Instructions
* API Response Data
* Retrieved Knowledge Base Articles

If GenerativeAgent cannot help the customer or is unsure about what to do, it will offer to escalate to a live agent.

### Acceptance Testing Objectives

* Ensure GenerativeAgent does not make mistakes given expected inputs
* Focus on preventing potential hallucinations or bad inputs
* Ensure GenerativeAgent handles expected customer scenarios correctly

Functional Testing is performed after your ASAPP Team has configured GenerativeAgent Tasks and Functions. You will be able to fully integrate GenerativeAgent into your apps after the tests are passed.

## Testing Process

### Pretesting

In the pretesting phase, keep in mind cases like the following use case scenarios:

Reading a sample of production scenarios for this task:

* Read summaries for 100 sample conversations to understand typical conversations within this use case across both the virtual agent and those that escalate to a live agent
* Have clear should/must-dos for each task
* Have a clear idea of the things that GenerativeAgent should do vs. must do within each task
* Keep in mind the common scenarios you expect users to go through based on the sample of real conversations
* Clear test users to do the testing
* Consider the permutations of test data that are important to cover. For example:
  * Someone with a flight canceled a few minutes ago
  * Someone with two flights, one which is canceled and one which is not
  * Someone with elite status vs. someone with no status

### Testing GenerativeAgent

Once you've completed the pretesting phase, you're ready to start testing GenerativeAgent itself. This phase involves simulating real-world scenarios and interactions to ensure GenerativeAgent performs as expected. Here are some key points to keep in mind:

* Aim to test approximately 100 conversations per use case
* Go through the expected conversation scenarios, as relevant, for each of the test users
* Make sure to operate in a manner that is consistent with the data in the test account you are using
* Formulate questions, based on the sample of conversations, that aim to test the knowledge articles available to GenerativeAgent
* Plan to repeat some scenarios with slight variation to ensure GenerativeAgent responses are consistent (though no response is likely to ever be exactly the same due to its generative nature)

## Example Test

The following is an example scenario of Functional Testing for a task.

### Test Scenario

If a customer asks about their flight status, GenerativeAgent should provide the relevant details.

### Preconditions

A correct confirmation number and last name

### Test Procedure

1. IF a customer asks about their current flight status
2. THEN GenerativeAgent will invoke the flight\_status task
3. AND GenerativeAgent will request the necessary criteria to look up the customer's flight details
4. AND if the customer provides a valid confirmation number and last name
5. THEN GenerativeAgent will call the appropriate API
6. AND GenerativeAgent will retrieve the required information
7. AND GenerativeAgent will inform the customer of their current flight status based on the API response

### Test Objectives

1. Confirm that GenerativeAgent correctly invokes the flight\_status task
2. Verify that GenerativeAgent identifies the necessary information from the customer to verify the flight
3. Ensure that GenerativeAgent requests the required information (confirmation number and last name)
4. Check that the appropriate API is called
5. Validate the information provided by the customer through the API
6. Ensure GenerativeAgent gathers the necessary flight status information
7. Confirm GenerativeAgent accurately communicates the flight status to the customer

This example illustrates the "happy path." But there are other scenarios such as: what if the customer only provides a confirmation number? Can they provide alternative information? What if the customer doesn't have a confirmation number? Consider other potential scenarios and instructions to test against.

## Next Steps

With correct Acceptance Testing, you are ready to support real users.

You may find one of the following sections helpful in advancing your integration:

<CardGroup cols={3}>
  <Card title="Connect your APIs" href="/generativeagent/configuring/connect-apis" />

  <Card title="Safety and Troubleshooting" href="/generativeagent/configuring/safety-and-troubleshooting" />

  <Card title="Go Live" href="/generativeagent/go-live" />
</CardGroup>


# Previewer
Source: https://docs.asapp.com/generativeagent/configuring/previewer

Learn how to use the Previewer in AI Console to test and refine your GenerativeAgent's behavior

The Previewer in AI Console makes it easy to rapidly iterate on GenerativeAgent's design and provides a quick tool to test GenerativeAgent's capabilities.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-ba75e1fb-7162-d7f5-011f-c806117e64d7.png" alt="AI Console Previewer interface" />
</Frame>

## Testing Draft Changes

When you initially configure GenerativeAgent, you'll often find subtle ways to improve its performance. While you can always make changes, then deploy and test them in sandbox, it's usually easier to try changes with Previewer. Previewer can use any changes across tasks and functions that you have in draft, allowing you to interact with GenerativeAgent using these temporary configurations.

Once you're confident with a set of changes, you can deploy them into sandbox.

### Using Live Preview

The Live Preview feature allows you to test changes in real-time during a conversation. You have the ability to:

* **Regenerate a response**: For a given bot response, regenerate it using the latest state of the draft settings.
* **Send a different message**: For a given customer message, change what is sent to see how GenerativeAgent would respond with that conversation context.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-7e037841-239a-0b66-6c05-f1f301ed206f.png" alt="Live Preview feature in AI Console Previewer" />
</Frame>

### Previewer Environment

Choose the [Environment](/generativeagent/configuring/deploying-to-generativeagent#environments) that GenerativeAgent uses to test and preview a conversation with GenerativeAgent.

Choose between:

* Draft
* Sandbox
* Production

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/generativeagent/ChooseEnvironment.png" />
</Frame>

### Replaying Conversations

During testing and configuration, you may want to replay conversations while trying out changes or validating GenerativeAgent across new versions. In Previewer, you can save the conversation to replay it again in the future.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-8bbbdf91-7ce0-1426-fa95-abc8dc1c17fe.png" alt="Save conversation option in AI Console Previewer" />
</Frame>

## Advanced Settings

Use Previewer's Advanced Settings to further test GenerativeAgent in the Previewer.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/generativeagent/AdvancedSettings.png" />
</Frame>

### Test User Type

Use the test user data or reach out to an existing API Connection.

[Test Users](generativeagent/configuring/tasks-and-functions/test-users) allow you to define a scenario and how your API would respond to an API Connection for that scenario. This allows you to try out different Tasks and iterate on tasks definitions or on Functions.

1. **API Connection**: The Previewer test the conversation with mocked data defined by a Test User.
2. **External Endpoint**: The Previewer uses external data from an existing API.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/generativeagent/TestUser.png" />
</Frame>

### Task Name

Choose a specific Task to make GenerativeAgent handle it, instead of allowing GenerativeAgent choose a Task each time the conversation is started.

If you leave the task name blank, then GenerativeAgent will choose the Task by itself.

This way you can test:

1. How GenerativeAgent handles a specific Task
2. How GenerativeAgent chooses Tasks to perform a Function.

`Task name` is also an optional part of the body request in the [GenerativeAgent API](/apis/generativeagent/analyze-conversation) with `/analyze`.

<Tip>
  Head to [Improving Tasks](/generativeagent/configuring/tasks-and-functions/improving) to learn more about the use of Tasks.
</Tip>

### Input Variables

Input Variables allow you to simulate how GenerativeAgent responds when it receives data from a calling application during a conversation.

Use Input Variables to test the use of:

* Entities extracted from a previous system or API call
* Relevant customer metadata
* Conversation context, like a summary of previous interactions
* Instructions on the next steps for a given task

<Note>
  Input variables can be submitted as key-value pairs in JSON format. For optimal configuration, reference the input variables directly in the task instructions to guide GenerativeAgent on how to interpret them
</Note>

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/generativeagent/InputVariables.png" />
</Frame>

You can also simulate directly launching the customer into a specific task, instead of allowing GenerativeAgent to choose a task.

<Tip>
  In a scenario where a IVR has already gathered information, you can ensure GenerativeAgent picks up from where the IVR left off.
</Tip>

## Observing GenerativeAgent's Behavior

Previewer gives you insight into the actions that GenerativeAgent is taking. This includes its thoughts during the conversation, the Knowledge Base articles it references, and the API calls it makes.

You can use this information to evaluate the performance of your tasks and functions, making appropriate changes when you want to alter its behavior.

### Turn Inspector

Use the Turn Inspector to examine how instructions are processed within GenerativeAgent.

Inspect the state of the variables, tasks, and instructions in each turn of conversation within the Previewer.

Turn Inspector includes detailed visibility into:

* Active Task Configuration
* Current reference variables
* Precise instruction parsing
* Function call context and parameters
* Execution state at each conversational turn

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/generativeagent/TurnInspector.png" />
</Frame>

## Next Steps

You may find one of the following sections helpful in advancing your integration:

<CardGroup>
  <Card title="Integrate GenerativeAgent" href="/generativeagent/integrate" />

  <Card title="Safety and Troubleshooting" href="/generativeagent/configuring/safety-and-troubleshooting" />

  <Card title="Go Live" href="/generativeagent/go-live" />
</CardGroup>


# Safety and Troubleshooting
Source: https://docs.asapp.com/generativeagent/configuring/safety-and-troubleshooting

Learn about GenerativeAgent's safety features and troubleshooting.

GenerativeAgent prioritizes safety in its development. ASAPP ensures accuracy and quality through rigorous testing, continuous updates, and advanced validation to prevent hallucinations. Our team has incorporated Safety Layers that provide benefits such as reliability and response trust. You can take steps to align GenerativeAgent with your organization's goals.

## Safety Layers

GenerativeAgent uses a four-layer safety strategy to prevent irrelevant or harmful responses to customer support queries. The layers also prevent any type of hallucination response from the GenerativeAgent.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/generativeagent/safety-layers.png" alt="Safety Layers Diagram" />
</Frame>

GenerativeAgent's Safety Layers work as follows:

* **Scope**: The Scope layer halts any request that is outside of the reach or the context of GenerativeAgent.
* **Input safety**: This layer defends against any nefarious prompt attempt from a user.
* **Core planning loop**: This layer is where the GenerativeAgent does all of its magic (handling tasks, calling APIs, researching Knowledge Bases) while also restraining from performing any task or sending any reply that's either out of scope, contrary to the desired tone of voice, or that goes against any of your organization policies.
* **Output safety**: This layer defines the response given by GenerativeAgent and assures that any reply protects customer and organization data.

### Input Safety

ASAPP's safety bot protects against manipulation, prompt injection, bad API responses, code/encryption, leakings, and toxic safety risks.

Customers can configure examples that should be classified as safe to improve model accuracy.

By default, GenerativeAgent's in scope capabilities prevent customers from engaging with GenerativeAgent on topics outside of your organization's matters. You can configure topics that GenerativeAgent must not engage with using our [Scope and Safety Tuning](/generativeagent/configuring/safety/scope-and-safety-tuning) tools.

### Output Safety

ASAPP's output bot ensure any output is safe for your organization.

Our TaskBot prompts customers to confirm any action before GenerativeAgent calls identified APIs so the Agent is prevented from performing any action that might impact your organization.

### Ongoing Evaluations

ASAPP runs red team simulations on a periodic basis. This way, we ensure our systems and GenerativeAgents are protected from any type of exploitation or leaks.

These simulations include everything from security exploits to prompts or tasks that might impact your organization in an unintended manner.

**Evaluation Solutions**

ASAPP implements automated tests designed to define the performance and functionality of GenerativeAgent. The Tests simulate a wide range of scenarios to evaluate GenerativeAgent's responses.

### Knowledge Base and APIs

GenerativeAgent's responses are grounded on Knowledge Base articles and APIs to construct reliable responses. It is important to set up these two factors correctly to prevent any type of hallucination. Our tests comprise:

* Measurement: ASAPP continuously tracks a combination of deterministic metrics and AI-driven evaluators for conversations in production.
* Human Oversight: ASAPP's Team actively monitors conversation to ensure accurate and relevant responses.

## Data Security

ASAPP's security protocols protect data at each point of transmission, from first user authentication to secure communications, to our auditing and logging system, all the way to securing the environment when data is at rest in data storage.

Additionally, ASAPP's API gateway solution provides rate limiting, input validation and protects endpoints against direct access, injections, and other attacks.

Access to data by ASAPP teams is tightly constrained and monitored. Strict security protocols protect both ASAPP and our customers.

ASAPP utilizes [custom redaction logic](/security/data-redaction) to remove sensitive data elements from conversations in real-time.


# Scope and Safety Tuning
Source: https://docs.asapp.com/generativeagent/configuring/safety/scope-and-safety-tuning

Learn how to customize GenerativeAgent's scope and safety guardrails

GenerativeAgent includes default safety and scope guardrails to keep conversations aligned with business needs and to ensure GenerativeAgent engages only in appropriate topics.

These tools allow you to:

* Define custom categories for what's considered "in-scope"
* Configure input safety categories for allowed customer messages
* Maintain default safety protections while adding organization-specific allowances

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/generativeagent/ScopeSafetySettings.png" />
</Frame>

## Customizing Scope and Safety Settings

Scope and safety controls are available in the main Settings page of GenerativeAgent. After making any changes to these settings, be sure to test them using the Previewer before deploying to production.

<Tabs>
  <Tab title="In-Scope Categories">
    To define valid topics for GenerativeAgent:

    1. Navigate to Settings > In-Scope Categories
    2. Click "Add Category"
    3. Enter a category name
    4. Provide specific examples of acceptable topics/requests
    5. Save your changes

    The default safety and scope guardrails remain active even when adding custom categories. Your configurations help customize permissible interactions while maintaining core safety features.

    <Note>
      If scope settings seem too restrictive, you can add new categories or expand existing ones. Always test changes in the Previewer before deployment.
    </Note>

    <Frame>
      <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/generativeagent/ScopeTopic.png" />
    </Frame>
  </Tab>

  <Tab title="Input Safety Categories">
    To specify allowed customer message types:

    1. Go to Settings > Input Safety Categories
    2. Click "Add Category"
    3. Define the category name
    4. Add example messages that should be allowed
    5. Include context explaining why these inputs are safe
    6. Save your configuration

    <Frame>
      <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/generativeagent/InputSafety.png" />
    </Frame>

    ### Safety Context

    Input safety categories require explanations to provide context for why certain inputs are deemed safe. This helps GenerativeAgent accurately apply exceptions relevant to your specific needs while maintaining overall safety standards.
  </Tab>
</Tabs>

## Next Steps

After configuring scope and safety settings, you may want to explore:

<CardGroup>
  <Card title="Previewer" href="/generativeagent/configuring/previewer" />

  <Card title="Safety and Troubleshooting" href="/generativeagent/configuring/safety-and-troubleshooting" />

  <Card title="Deploying to GenerativeAgent" href="/generativeagent/configuring/deploying-to-generativeagent" />
</CardGroup>


# Tasks Best Practices
Source: https://docs.asapp.com/generativeagent/configuring/task-best-practices

Improve task writing by following best practices

Before any technical integration with GenerativeAgent, you must first define the tasks and the functions that the GenerativeAgent will perform to help your organization.

**Tasks** are the issues or actions you want generative agent to handle. They are primarily a set of **instructions** and the **Functions** needed to perform the instructions.

* **Instructions** define the business logic and acceptance criteria of a task.
* **Functions** are the set of tools (e.g. APIs) needed to perform a task with its instructions.

The goal of all instructions is to deliver the desired outcome using the minimum number expressions.

## Best Practices

Clearly defining tasks is key in configuring GenerativeAgent, as the GenerativeAgent acts on the tasks you as it to perform and solve customer issues across your apps.

When writing or defining Tasks, have the following methods in mind:

### Know where to place information

Deciding which information belongs in a Tasks or in the Knowledge Base can be challenging. To make it simple, we offer this recommendation as a rule of thumb:

* Task instructions are procedures and course of action for GenerativeAgent.

> Example: "Flip a coin, the result of coin\_flip decides whether the customer kickoffs the game."

* Knowledge Base Articles are a place to hold information and guides on how to make operate during an action.

> Example: "Flipping coins must be quarters, the result of the flip is marked after the coin falls in your hand and stops moving. If the coin falls from your hand, the result is null.""

For example, an example of the Task that uses the `refund_eligibility` API would be:

```
Use the refund_eligibility API to check if the purchase is eligible for a refund. 
If eligible, ask the customer if they want store credit or a refund to their original payment method
```

And the example of the Knowledge Base Article for the Task would be:

```
Refunds typically take 7-10 days to appear on credit card statements. 
Store credit will be sent via email within one hour of issuing the refund.
```

### Format Instructions

Use clear instructions for the Task.

Be consistent in the way you use marks, like Headers or bullet/numbered lists. Use markdown for the task definition.

* Use Headers to organize sections within the instructions
* Use lists for clarity

```json
# Headers
- Task section
- Bullet 2
-- Secondary Section
--- Tertiary Section
--- Tertiary Section 2
Here are instructions on how to use the api calls to solve problems:
# Section
1blah blah blah
# Section
2blah blah blah
```

### Provide Resolution Steps

Enumerate the steps that GenerativeAgent needs to resolve a task.

This provides a logical flow of actions that the GenerativeAgent can use to be more efficient.

Just as a human agent needs to check, read, resolve, and send information to a customer, GenerativeAgent needs these steps to be more detailed.

```json
# Steps to take to check order status
1. Verify Purchase Eligibility
- Check the purchase date to ensure it is within the 30-day refund policy.
- Verify that the item is eligible for a refund
2. Gather Necessary Information
- Ask the customer for their order ID.
3. Check Order Status
- Call the `order_status` function to retrieve the current status of the order.
- Confirm that the order is eligible for a refund.
```

### Define Functions to Call

Functions are the set of APIs needed alongside their instructions.

GenerativeAgent invokes Functions to perform the necessary actions for a task.

Task instructions must outline how and when does GenerativeAgent invokes a Function.

Here is an example of how to call out functions in the task instruction:

Within the "FlightStatus" task, functions might include:

* `trip_details_extract_with_pnr`: Retrieves flight details using the customer's PNR and last name.
* `trip_details_pnr_emails`: Handles email addresses associated with the PNR.
* `send_itinerary_email_as_string`: Sends the trip receipt or itinerary to the customer via email.

Here is how the task instruction would be outlined to use the function:

```json
"The function `trip_details_extract_with_pnr` is used within the 'FlightStatus' task to retrieve the current schedule of a customer's flight using their confirmation code and last name."
```

### API Return Handling

Provide instructions for handle the returns of API Calls after performing a Function.

Use the syntax `(data["APICallName"])` to let GenerativeAgent know that that precise piece of writing is the data return from an API Call.

Here is an example of API Return Handling:

```json
When called, if there is a past due amount, you MUST tell them their exact soft disconnect date (data["softDisconnectDate"]), and let them know that after that day, their service will be shut off, but still be easy to turn back on.
```

### State Policies and Scenarios

Clearly define company policies and outline what GenerativeAgent must do in various scenarios.

Stating Policies ensure consistency and compliance with your Organization's standards.

Remember than a good part of the Policies can be taken from your Knowledge Base.

```json
# Refund eligibility
- Customers can request a refund within 30 days of purchase.
- Refunds will be processed to the original payment method.
- Items must be returned in their original condition.
# Conversational Style
- Always refer to the customer as "customer."
- Do not address the customer by their name or title.
```

### Ensure Knowledge Base Resourcing

Ensure that GenerativeAgent is making use of your Knowledge Base either by API or by the Knowledge Base Tooling in the Generative Agent UI.

Provide the Knowledge Base Resources within the task, so GenerativeAgent references them when active.
Remember that you can try out GenerativeAgent's behavior by using the Previewer.

It is recommended to store task-related information in the Knowledge Base with metadata tags.

You can use metadata to ensure certain articles are only used by specific tasks. If an Article and a Task have the same metadata tags, GenerativeAgent will filter and only use that specific relevant information during a conversation.

### Outline limitations

Be clear about the limitations of each task.

Provide instructions on what to do in scenarios when customers ask for things that go beyond the limits of a task.
This helps GenerativeAgent to manage customer expectations, provide alternative solutions, and switch to tasks that are in line with the customer's needs.

```json
# Limitations
- Cannot process refunds for items purchased more than 30 days ago.
- Redirect customers to the website for refunds involving gift cards.
- No knowledge of specific reasons for payment failures.
```

### Use Conditional Templates

Use [conditional templating](/generativeagent/configuring/tasks-and-functions/conditional-templates) to make parts of the task instructions conditional on reference variables determined from API responses.

This ensures that only the contextually relevant task instructions are available at the right time in the conversation.

```json
{% if data["refundStatus"] == "approved" %}
- Inform the customer that their refund has been approved and will be processed shortly.
{% elif data["refundStatus"] == "pending" %}
- Let the customer know that their refund request is pending and provide an estimated time for resolution.
{% endif %}
```

### Use Reference Variables

[Reference variables](/generativeagent/configuring/tasks-and-functions/reference-variables) let you store and reuse specific data returned from function responses. They are powerful tools for creating dynamic and context-aware tasks.

Once a reference variable is created, you can use it to:

* Conditionally make other Functions available
* Set conditional logic in prompt instructions
* Compare values across different parts of your GenerativeAgent workflow
* Control Function exposure based on data from previous function calls.
* Toggle conditional instructions in your Task s prompt depending on returned data
* Extract and transform values without hard‐coding logic into prompts or code

For example:

```json
val == "COMPLIANT" → returns True if the string is "COMPLIANT"  
val == true or val == false → checks if the value is a boolean true/false
val is not none and val|length > 0 → returns True if val has length > 0  
```

### Create Subtasks

Some tasks might be bigger and more complex than others.

GenerativeAgent is more efficient with cohesive and direct tasks. A good practice for complex tasks is to divide them into subtasks.

For example, to give a refund to a client, GenerativeAgent might need to:

* Confirm the customer's status
* Confirm the policies allow for the refund
* Confirm the refund

```json
For a customer seeking a refund, consider splitting the task into:
OrderStatus: To check the status of the order and communicate the results to the customer.
IssueRefund: To gather the information necessary to process the refund and actually process the refund.
```

### Call Task Switch

As all tasks are outlined, sometimes GenerativeAgent needs to switch from one task to another.

Be explicit about the tasks to switch to, given a context.

```json
# Damage Claims
- For claims regarding damaged products, use use the 'DamageClaims' task
# Exchange Requests
- For exchange inquiries, use the 'ExchangeProducts' task
# No pets rule
- (#rule_1) no dogs in the house
- (#rule_2) no cats outside
- (#rule_3) if either #rule_1 or #rule_2 are broken escalate to agent.
```

### Outline Human Support

State the scenarios where GenerativeAgent needs to escalate the issue to a human agent.

This ensures GenerativeAgent's role in your organization is well contained.

```json
# Escalate to a Human Agent
- Refunds involving high-value items.
- Refunds where payment method issues are detected.
```

You can also state scenarios for HILA:

```json
# Call HILA and wait on approval
- Refunds of purchases older than 30 days
- Cancelation of high-value purchases
```

### Keep it simple

It is generally best to keep task instructions focused and concise.

The more details you add to tasks, the greater the chance that essential instructions could be overlooked or diluted. GenerativeAgent might not follow the most important steps as precisely if the instructions are too long or complex.

So, we recommend to not place many task-relevant information directly into the task. It is better to make use of the other tools GenerativeAgent has at your disposal, like metadata, Functions, and the Knowledge Base.

<Note>
  We do not recommend  to directly upload an internal agent-facing knowledge base to the GenerativeAgent Knowledge Base.

  GenerativeAgent's Knowledge Base is meant for GenerativeAgent's use. Instructions meant for agents are better suited to task instructions.
</Note>


# Conditional Templates
Source: https://docs.asapp.com/generativeagent/configuring/tasks-and-functions/conditional-templates



Conditional Templates allow you use saved values from API Calls to change the instructions on a given task.

GenerativeAgent uses the conditional templates to render API and Prompt instructions based on the conditions and values in each template.

<Note>
  Conditional Templates must be referenced in Jinja2 templating language conditional statements.
  Head to the [Jinja Documentation](https://jinja.palletsprojects.com/en/3.0.x/templates/) to dive further into Conditional Statements
</Note>

## Write Conditional Templates

Conditional templating supports rendering based on the presence of some data in an API Response Model Action.

This data is pulled at run-time from the input model context (list of ModelActions) and stored in reference variables that can be used in Jinja2 conditional statements.

<Note>
  If you want to render based on ModelActions that are not API Responses, it will require further help from your ASAPP Team.
</Note>

Write a Conditional Template:

1. Identify the Function and the keypath to the value from the API response you would like to conditionally render on.
2. Add a reference var to a list of reference\_vars on the Function in the company's functions.yaml.
   It should include name and response\_keypath at minimum, with the response\_keypath format being response.\<your\_keypath>.
   You can optionally define a transform expression with val as the keypath value to be transformed . Note that these reference vars are used across the company's Tasks, so the name parameter needs to be unique.
3. Leverage the conditional in two places by pulling from vars.get("my\_reference\_var\_name"):
   In a Task, you can add Jinja2 conditional statements in the prompt\_instructions and define conditions for each of the TaskFunctions, so they only render when it evaluates to True.
   Conditions on TaskFunctions are optional, and functions will always render in the final prompt if there are no conditions provided.
   In a Function, you can add Jinja2 conditional statements to the Function's description

## Use Case Example - Mobile Bill

What this use case example accomplishes is to make GenerativeAgente behave as follows:

* If CPNI compliance is unknown, only render the identity API without its description about checking the response field "data\['cpniCompliance']", and render in the prompt\_instructions that tell the LLM it must first confirm the customer is CPNI compliant.
* If a customer is not CPNI compliant, only render the identity API with its description about checking the response field "data\['cpniCompliance']", and do not render in the prompt\_instructions that tell the LLM it must first confirm the customer is CPNI compliant.
* If a customer is CPNI compliant, do not render the identity API and render the APIs that require CPNI compliance instead, and do not render in the prompt\_instructions that tell the LLM it must first confirm the customer is CPNI compliant.

```json
identity:
  name: identity
  lexicon_name: identity-genagent
  lexicon_type: entity
  description: |:-
    Use this API call to determine whether you can discuss billing or account information with the customer. 
    {%- if not vars.get("compliance_unknown") and not vars.get("is_compliant") %}
    - If the data['cpniCompliance'] does not return "COMPLIANT", you cannot discuss account or billing information with the customer.
    {%- endif %}
  message_before: Give me a few seconds while I pull up your account.
  reference_vars:
    - name: is_compliant # this variable to be used in conditions
      response_keypath: response.cpniCompliance # keypath to the value from the response
      transform: val == "COMPLIANT" # val is passed in from the keypath for the transform
    - name: compliance_unknown
      response_keypath: response.cpniCompliance
      transform: val == None
```

```json
dname: MobileBill
selector_description: For Mobile billing inquiries only, see the current billing situation and status of your Spectrum mobile account(s), including dues, balances, important dates and more.
prompt_instructions: |:-
  - If the customer expresses anything about their question not being answered (EXAMPLES: "That didn't answer my question" "My question wasn't answered"), *before doing anything else* ask them for more details
  - The APIs in these instructions and the information they return MUST only be used to answer basic questions about a mobile bill or statements.
  - They MUST NOT be used to answer any out-of-scope concerns like the following:
  - - To answer questions related to cable (internet, TV, landline), use the command `APICALL change_task(task_name="CableBill")` to switch to the CableBill flow.
  - - concerns about why services are not working
  - - concerns about when service will be restored
  - - inquiries about where bills are being sent, or sending confirmation emails
  - - updating billing address
  {%- if vars.get("compliance_unknown") %}
  - You must confirm that a customer is CPNI compliant before telling them anything about their account or billing info. The only way to do this is via the identity() api as described below.
  - -  Note: Authentication is not the same as being CPNI compliant. You still need to use the identity() api to confirm that a customer is CPNI compliant if they are authenticated.
  {%- endif %}
  - Mobile services are billed seperately from Cable (Internet, TV, and Home phone) services.
functions:
  - name: identity
    conditions: not vars.get("is_compliant")
  - name: mobile_current_balance
    conditions: vars.get("is_compliant")
    instructions: |:-
      - Anytime you call `mobile_current_balance`, you should also call `mobile_current_statement`
  - name: mobile_current_statement
    conditions: vars.get("is_compliant")
  - name: mobile_statements
    conditions: vars.get("is_compliant")
    instructions: |:-
      - When describing payments, your response to the customer must not imply that you know the purpose or reason for any payment or how it will affect the account.
      - If you think you have found a payment the customer is referring to, ask the customer if it's the right payment, but do not say anything to confirm the customer's impression of the payment or what it is for.
  - name: mobile_specific_statement
    conditions: vars.get("is_compliant")
```


# Enter a Specific Task
Source: https://docs.asapp.com/generativeagent/configuring/tasks-and-functions/enter-specific-task

Learn how to enter a specific task for GenerativeAgent

When GenerativeAgent analyzes a conversation, by default, it will automatically select the appropriate task and follow its instruction.

If your system already knows which task to use, you can specify it by using the `taskName` attribute in the [`/analyze` request](/apis/generativeagent/analyze-conversation).

```bash
curl --request POST \
  --url https://api.sandbox.asapp.com/generativeagent/v1/analyze \
  --header 'Content-Type: application/json' \
  --header 'asapp-api-id: <api-key>' \
  --header 'asapp-api-secret: <api-key>' \
  --data '{
  "conversationId": "01BX5ZZKBKACTAV9WEVGEMMVS0",
  "message": {
    "text": "Hello, I would like to upgrade my internet plan to GOLD.",
    "sender": {
      "role": "agent",
      "externalId": 123
    },
    "timestamp": "2021-11-23T12:13:14.555Z"
  },
  "taskName": "UpgradePlan",
}'
```


# Improving Tasks
Source: https://docs.asapp.com/generativeagent/configuring/tasks-and-functions/improving

Learn how to improve task performance

GenerativeAgent uses LLMs and other generative AI technology, allowing for human-like interactions and reasoning but also requiring careful consideration on the instructions and functions you define to ensure it behaves as expected.

Creating successful tasks is an iterative process. We have multiple resources and tools to help improve task performance:

<CardGroup>
  <Card href="/generativeagent/configuring/task-best-practices" title="Task Best Practices">
    A list of different strategies and approaches to improve task performance.
  </Card>

  <Card href="/generativeagent/configuring/tasks-and-functions/conditional-templates" title="Conditional Templates">
    Use conditional logic to dynamically change the instructions shown to GenerativeAgent.
  </Card>

  <Card href="/generativeagent/configuring/tasks-and-functions/enter-specific-task" title="Enter Specific Task">
    Learn how to have GenerativeAgent enter a specific task.
  </Card>

  <Card href="/generativeagent/configuring/tasks-and-functions/trial-mode" title="Trial Mode">
    Use Trial Mode to test whether GenerativeAgent can use new Functions correctly before full rolling them out in production.
  </Card>

  <Card href="/generativeagent/configuring/tasks-and-functions/keep-fields" title="Keep Fields">
    Use Keep Fields to limit the data saved when calling a function.
  </Card>

  <Card href="/generativeagent/configuring/tasks-and-functions/mock-api" title="Mock API">
    Learn how to use mock APIs for testing and development.
  </Card>

  <Card href="/generativeagent/configuring/tasks-and-functions/test-users" title="Test Users">
    Configure test users for development and testing purposes.
  </Card>

  <Card href="/generativeagent/configuring/tasks-and-functions/input-variables" title="Input Variables">
    Learn how to use input variables in your tasks and functions.
  </Card>
</CardGroup>


# Input Variables
Source: https://docs.asapp.com/generativeagent/configuring/tasks-and-functions/input-variables

Learn how to pass information from your application to GenerativeAgent.

Input Variables allow you to provide contextual information to GenerativeAgent when analyzing a conversation. This is the main way to pass information from your application to GenerativeAgent. These variables can then be referenced in the task instructions and functions.

Use Input Variables provide GenerativeAgent with context information like:

* Entities extracted from a previous system or API call
* Relevant customer metadata
* Conversation context, like a summary of previous interactions
* Instructions on the next steps for a given task

## Add Input Variables to a conversation

To add input variables to a conversation, you needs to:

<Steps>
  <Step title="Add Input Variables with /analyze">
    Call [`analyze`](/apis/generativeagent/analyze-conversation), adding the `inputVariables` attributes. `inputVariables` is an untyped JSON object and you can pass any key-value pairs. You need to ensure you are consistent in the key names you use between `/analyze` and the task instructions.

    With each call, any new input variable is added to the conversation context.

    ```bash
    curl --request POST \
      --url https://api.sandbox.asapp.com/generativeagent/v1/analyze \
      --header 'Content-Type: application/json' \
      --header 'asapp-api-id: <api-key>' \
      --header 'asapp-api-secret: <api-key>' \
      --data '{
      "conversationId": "01BX5ZZKBKACTAV9WEVGEMMVS0",
      "message": {
        "text": "Hello, I would like to upgrade my internet plan to GOLD.",
        "sender": {
          "role": "agent",
          "externalId": 123
        },
        "timestamp": "2021-11-23T12:13:14.555Z"
      },
      "taskName": "UpgradePlan",
      "inputVariables": {
        "context": "Customer called to upgrade their current plan to GOLD",
        "customer_info": {
          "current_plan": "SILVER",
          "customer_since": "2020-01-01"
        }
      }
    }'
    ```
  </Step>

  <Step title="Reference Input Variables in Task Instructions">
    Once the Input Variables are added to the conversation, they are made part of GenerativeAgents' Context. GenerativeAgent will consider them when interacting with your users.

    You can also reference them directly in the task instructions.

    ```
    The customer has a plan status of {{ input_vars.get("customer_info.current_plan") }}
    ```

    Input variables can be used as part of [Conditional Templates](/generativeagent/configuring/tasks-and-functions/conditional-templates).
  </Step>
</Steps>

## Add Input Variables in the Previewer

While you are iterating on your tasks, you simulate how GenerativeAgent responds with added Input Variables in the [Previewer](/generativeagent/configuring/previewer#input-variables)

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/generativeagent/InputVariables.png" />
</Frame>

You can also simulate directly launching the customer into a specific task, instead of allowing GenerativeAgent to choose a task.

<Tip>
  In a scenario where a IVR has already gathered information, you can ensure GenerativeAgent picks up from where the IVR left off.
</Tip>


# Keep Fields
Source: https://docs.asapp.com/generativeagent/configuring/tasks-and-functions/keep-fields

Learn how to keep fields from API responses so GenerativeAgent can use them for more calls

The history of responses in conversations is part of the data that GenerativeAgent continually uses as context to reply, analyze, and respond to your customers.

As Generative Agent makes constant calls to APIs via Functions, response history can be extended. This can result in a lot of data in the conversation history and can make it more difficult for GenerativeAgent to identify the most relevant fields or data to use in subsequent calls.

While you can control this by specifying the data to return within the underlying API Connection, you can also use a slightly different set of fields for multiple Tasks using the same Function.

With the Keep Fields functionality you can configure Keep Fields to change the data kept in the context for that Task.

<Warning>
  Most users will not need to configure Keep Fields and instead rely on specifying the fields to keep in the underlying [API Connection](/generativeagent/configuring/connect-apis).
</Warning>

## Configure a Keep Field

Keep Fields are part of the Function page.

To configure a Keep Field:

1. Identify the Function within a Task
   * Determine the function that you want to configure fields to keep.
2. Go to the Keep Field Configuration
   * In the Function settings, see the Keep Configuration table.
3. Specify Keep Fields
   * List all the fields that this function should retain. Use a nested list format to specify the paths of the fields you want to keep.

<Note>
  Each path should be an array of strings representing the keys to traverse in the JSON structure.
</Note>

Inside of the Function options, you can add Keep Fields.

### Specify fields within objects

JSON responses on API Connections often contain arrays of objects.

To specify fields within these objects, you need to indicate that you are traversing an array.

Use the `[]` notation to denote array elements in the path when specifying which fields to keep.

This is necessary because JSON structures can include arrays, and you need to indicate that you are referring to elements within those arrays.

## Example Keep Field Configuration

See this example of a configuration to keep all fields except for `scheduledDepartureTime` under `origin` within `segments` of `originalSlice`::

```json
[
    ["response", "flightChanged"],
    ["response", "flightChangeReason"],
    ["response", "flownStatus"],
    ["response", "flightStatus"],
    ["response", "isReaccommodated"],
    ["response", "eligibleToRebook"],
    ["response", "originalSlice", "available"],
    ["response", "originalSlice", "origin"],
    ["response", "originalSlice", "destination"],
    ["response", "originalSlice", "importantInformation"],
    ["response", "originalSlice", "segments", "[]", "flightNumber"],
    ["response", "originalSlice", "segments", "[]", "status"],
    ["response", "originalSlice", "segments", "[]", "bookingCode"],
    ["response", "originalSlice", "segments", "[]", "impacted"],
    ["response", "originalSlice", "segments", "[]", "numberOfLegs"],
    ["response", "originalSlice", "segments", "[]", "origin", "estimatedDepartureDate"],
    ["response", "originalSlice", "segments", "[]", "origin", "estimatedDepartureTime"],
    ["response", "originalSlice", "segments", "[]", "origin", "scheduledDepartureDate"],
    ["response", "originalSlice", "segments", "[]", "origin", "airportCode"],
    ["response", "originalSlice", "segments", "[]", "origin", "airportCity"],
    ["response", "originalSlice", "segments", "[]", "destination", "estimatedArrivalDate"],
    ["response", "originalSlice", "segments", "[]", "destination", "estimatedArrivalTime"],
    ["response", "originalSlice", "segments", "[]", "destination", "scheduledArrivalDate"],
    ["response", "originalSlice", "segments", "[]", "destination", "scheduledArrivalTime"],
    ["response", "originalSlice", "segments", "[]", "destination", "airportCode"],
    ["response", "originalSlice", "segments", "[]", "destination", "airportCity"],
    ["response", "rebookedSlice", "available"],
    ["response", "rebookedSlice", "origin", "estimatedDepartureDate"],
    ["response", "rebookedSlice", "origin", "estimatedDepartureTime"],
    ["response", "rebookedSlice", "origin", "scheduledDepartureDate"],
    ["response", "rebookedSlice", "origin", "scheduledDepartureTime"],
    ["response", "rebookedSlice", "origin", "airportCode"],
    ["response", "rebookedSlice", "origin", "airportCity"],
    ["response", "rebookedSlice", "destination", "estimatedDepartureDate"],
    ["response", "rebookedSlice", "destination", "estimatedDepartureTime"],
    ["response", "rebookedSlice", "destination", "scheduledDepartureDate"],
    ["response", "rebookedSlice", "destination", "scheduledDepartureTime"],
    ["response", "rebookedSlice", "destination", "airportCode"],
    ["response", "rebookedSlice", "destination", "airportCity"],
    ["response", "rebookedSlice", "importantInformation", "[]", "alert"],
    ["response", "rebookedSlice", "importantInformation", "[]", "value"],
    ["response", "rebookedSlice", "importantInformation", "[]", "alertPriority"],
    ["response", "rebookedSlice", "segments", "[]", "flightNumber"],
    ["response", "rebookedSlice", "segments", "[]", "status"],
    ["response", "rebookedSlice", "segments", "[]", "bookingCode"],
    ["response", "rebookedSlice", "segments", "[]", "impacted"],
    ["response", "rebookedSlice", "segments", "[]", "numberOfLegs"],
    ["response", "rebookedSlice", "segments", "[]", "origin", "estimatedDepartureDate"],
    ["response", "rebookedSlice", "segments", "[]", "origin", "estimatedDepartureTime"],
    ["response", "rebookedSlice", "segments", "[]", "origin", "scheduledDepartureDate"],
    ["response", "rebookedSlice", "segments", "[]", "origin", "airportCode"],
    ["response", "rebookedSlice", "segments", "[]", "origin", "airportCity"],
    ["response", "rebookedSlice", "segments", "[]", "destination", "estimatedArrivalDate"],
    ["response", "rebookedSlice", "segments", "[]", "destination", "estimatedArrivalTime"],
    ["response", "rebookedSlice", "segments", "[]", "destination", "scheduledArrivalDate"],
    ["response", "rebookedSlice", "segments", "[]", "destination", "scheduledArrivalTime"],
    ["response", "rebookedSlice", "segments", "[]", "destination", "airportCode"],
    ["response", "rebookedSlice", "segments", "[]", "destination", "airportCity"]
]

```


# Mock API Connections
Source: https://docs.asapp.com/generativeagent/configuring/tasks-and-functions/mock-api



You can mock the API connections using Mock APIs.

GenerativeAgent supports Mocking API Connections to try out your raw API responses. Mock API Functions let you define request parameters (in JSON) without needing a live API.

The main benefits of mocking API connections are:

* Rapid prototyping of new Functions without a fully built API.
* Testing how GenerativeAgent processes or populates request parameters before real integration.
* Simplifying configuration for teams that want to get interacting with GenerativeAgent quickly before building or exposing internal APIs.

## Create a Mock API Function

Navigate to the “Functions” Page in the main GenerativeAgent menu and select “Functions.”

1. Click on “Create Function”

2. Choose “Integrate Later”
   * You will be prompted to select an existing API or “Integrate later.”
   * Select “Integrate later” to mark this Function as a Mock API and define the request parameters directly.
   <Frame>
     <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/generativeagent/IntegrateLater.png" />
   </Frame>

3. Name and Describe the new Function
   * **Function Name**: Give it a concise, unique name
   * **Function Purpose**: Briefly describe what the Mock Function is for
   <Tip>
     Example:

     * Name: “get\_flight\_details”
     * Purpose: “Retrieves flight information given a PNR”
   </Tip>

4. Define Request Parameters (JSON)
   * Under “Request parameters,” enter a valid JSON schema describing the parameters you want.
   * You can pick a template from the “Examples” dropdown or start with an empty JSON schema.
   <Frame>
     <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/generativeagent/MockAPIExample.png" />
   </Frame>
   * **Example Request**
   ```json
       {  
       "name": "name_of_function",  
       "description": "Brief description of what the Function is for",  
       "strict": true,  
       "parameters": {  
           "type": "object",  
           "required": ["account_number"],  
           "properties": {  
           "account_number": {  
               "type": "string",  
               "description": "The user’s account number."  
           },  
           "include_details": {  
               "type": "boolean",  
               "description": "Whether to include itemized details."  
           }  
           }  
       }  
       }  
   ```
   <Note>
     Make sure the JSON is valid.
     Invalid schemas are prevented from being saved.
   </Note>

5. Save Your Function

   * Click “Create Function” (or “Save”). If any part of your schema is invalid, an error will appear.
   * After saving, you remain on the function detail page, which shows the Function’s configuration and preview.

   <Note>
     You can configure additional fields and variables if you need prompts or placeholders in the conversation flow.

     For example: “Message before sending”, “Confirmation Message”, “Reference Variables”
   </Note>

### Best Practices

Here are some recommendations to help you make the best use of the Mock API feature:

<AccordionGroup>
  <Accordion title="Keep it Simple">
    Start with the core parameters. Add more detail as your needs become clearer.
  </Accordion>

  <Accordion title="Use Meaningful Descriptions">
    Parameter descriptions helps GenerativeAgent understand what the parameters are and how to determine their values.
    They also help future users to remember each parameter purpose.
  </Accordion>

  <Accordion title="Prototype First, Integrate Later">
    Begin testing your Function with a Mock schema, then transition smoothly to a real API when ready.
  </Accordion>
</AccordionGroup>

## Connect to a real API

When you are ready to connect the Function to an existing API in the Console:

1. Click on “Replace” on the Function detail page.
2. Select an existing API connection or create a new one.
3. Once replaced, the Function will call the real API during interactions instead of the Mock schema.

### Use Test Users

You can make use of [Test Users](/generativeagent/configuring/tasks-and-functions/test-users) to Mock the API return Scenarios in the Previewer


# Reference Variables
Source: https://docs.asapp.com/generativeagent/configuring/tasks-and-functions/reference-variables

Learn how to use reference variables to store and reuse data from function responses

Reference variables let you store and reuse specific data returned from a function response.

Reference variables offer a powerful way to condition your GenerativeAgent tasks and functions on real data returned by your APIs—all without requiring code edits.

By properly naming, key-pathing, and optionally transforming your variables, you can build flexible, dynamic flows that truly adapt to each user's situation.

Once a reference variable is created, you can use it to:

* Conditionally make other Functions available
* Set conditional logic in prompt instructions
* Compare values across different parts of your GenerativeAgent workflow
* Control Function exposure based on data from previous function calls.
* Toggle conditional instructions in your Task s prompt depending on returned data
* Extract and transform values without hard‐coding logic into prompts or code

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/generativeagent/reference-variables.png" />
</Frame>

Reference variables can be configured in the GenerativeAgent Tooling Function edit page under the "Reference vars " option.

## Define a Reference Variable

To create a reference variable in the GenerativeAgent UI:

1. Navigate to the Function's settings
2. Find the "Reference vars (Optional)" section and click "Add"
3. Configure the following fields:

* **Name**
* **Response Keypath**
* **Transform Expression** (Optional)

### Name

This is the identifier you'll use to reference this variable in Jinja expressions.

```jinja
vars.get("variable_name")
```

### Response Keypath

This is the JSON path where the data will be extracted from, using dot notation.

```json
// For a response like:
{
  "available_rooms": [...]
}
// Use keypath:
response.available_rooms
```

### Transform Expression (Optional)

This is a Jinja expression to transform the extracted value. Common patterns include:

```jinja
# Check for specific string value
val == "COMPLIANT"

    # Check boolean values
    val == true or val == false

# Check for non-empty arrays/strings
val is not none and val|length > 0
```

Once saved, GenerativeAgent will automatically update these variables whenever the Function executes successfully and returns data matching the specified keypath.

<Note>
  Reference variable names are not unique across the entire system.

  If more than one Function defines a reference variable with the same name, whichever Function is called last may overwrite a variable's value.

  Reference variables are also used at runtime, meaning GenerativeAgent extracts the specified response data from each API call that returns successfully and updates the variable accordingly.
</Note>

## Example Condition

The following example calls a Condition on a `CheckRoomAvailability` Function.

1. Suppose a Reference Variable named `rooms_available` and defined with:
   * Response Keypath: `response.available_rooms `
   * Transform: `val is not none and val|length > 0 `
2. The `rooms_available` variable will be True whenever the returned list has a length greater than zero. You can then write:
3. In a Function's conditions (to make a function available for use, conditioned on the reference variable):
   ```json
       conditions: vars.get("rooms_available")
   ```
4. In Task instructions using Jinja:
   ```jinja
           {%- if vars.get("rooms_available") %}
           The requested rooms are available.  
           {%- else %}
           No rooms are currently available.  
           {%- endif %}
   ```

### Tips and Best Practice

Here are some tips to enhance your experience with  Reference Variables:

<AccordionGroup>
  <Accordion title="Prefix Variables">
    Consider prefixing variable names to avoid clashes if multiple teams define references.

    Example: `user_is_compliant` vs. `is_compliant`
  </Accordion>

  <Accordion title="Short-circuit logic">
    Use short-circuit logic in transforms to avoid "NoneType cannot have length" errors

    Example `val is not none and val|length > 0`
  </Accordion>

  <Accordion title="Functions consideration">
    Keep in mind that if multiple Functions define the same reference variable name, one may overwrite the other depending on the call order.
  </Accordion>
</AccordionGroup>


# Set Variable Functions
Source: https://docs.asapp.com/generativeagent/configuring/tasks-and-functions/set-variable

Save a value from the conversation with a Set Variable Function.

You can store information determined during the conversation for reference in future steps using Set Variable Functions. This is useful for:

* Storing key information (like account numbers, ages, cancellation types) so GenerativeAgent doesn't have to re-prompt the user later.
* Returning or conditioning logic on data that GenerativeAgent has inferred.
* Manipulating or filtering data from APIs (e.g., extracting the single charge the customer disputes).

GenerativeAgent "sets" these variables in conversation, so they can be used immediately or in subsequent steps. You specify how the variable gets set based on the input parameters or existing variables.

To create a set variable function:

1. [Create a function](#step-1-create-a-function).
2. [Define the input parameters](#step-2-define-input-parameters-json).
3. [Specify the variables to set](#step-3-specify-set-variables).
4. [Save the function](#step-4-save-your-function).
5. [Use the function in a task](#step-5-use-the-function-in-the-conversation).

## Step 1: Create a Function

Navigate to the Functions page and click "Create Function."

1. Select "Set variable" and click "Next: Function details"
   <Frame>
     <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/generativeagent/SetVariableFunction.png" />
   </Frame>
2. Specify the Name and Purpose of the Function
   * **Function Name**: Provide a concise, unique name, using underscores (e.g., `get_lap_child_policy`).
   * **Function Purpose**: Briefly describe what the function does (e.g., "Determines whether a child can fly as a lap child").
     * GenerativeAgent uses this description to decide if and when it should invoke the function.

## Step 2: Define Input Parameters (JSON)

The input parameters are the values that GenerativeAgent needs to pass when calling this function.

You can leave the input parameters empty if you won't need new values from the conversation.

<Note>
  As with any function call, GenerativeAgent will gather the necessary information (from user messages or prior context) before calling the function.
</Note>

Under "Input Parameters," enter a valid JSON schema describing the parameters GenerativeAgent needs to pass when calling this function.

Mark a field as "required" if GenerativeAgent must obtain these values from the conversation.

```json Example Input Schema
{
  "type": "object",
  "required": [
    "account_number",
    "first_name",
    "last_name"
  ],
  "properties": {
    "account_number": {
      "type": "string",
      "description": "Customer's account number"
    },
    "first_name": {
      "type": "string",
      "description": "Customer's first name"
    },
    "last_name": {
      "type": "string",
      "description": "Customer's last name"
    }
  }
}
```

## Step 3: Specify "Set Variables"

At least one variable must be configured so GenerativeAgent can store the outcome of your function call. For each reference variable:

* Provide a Variable Name (e.g., `lap_child_policy`).
* Optionally, include [Jinja2](#jinja2-templating) transformations to manipulate or combine inputs or existing reference variables.
* Toggle "Include return variable as part of function response" to make the new variable immediately available to GenerativeAgent after the function call.

### Jinja2 Templates

Use [Jinja2](https://jinja.palletsprojects.com/en/stable/) to create or modify the stored value.

As an Example, the following Jinja2 template will set the variable to **"Children under 2 can fly as a lap child."** if the `child_age_at_time_of_flight` is less than 2. Otherwise, it will set the variable to **"Children 2 or older must have their own seat."**

```jinja2
'Children under 2 can fly as a lap child.' if params.child_age_at_time_of_flight < 2 else 'Children 2 or older must have their own seat.''
```

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/generativeagent/SetVariableDefinition.png" />
</Frame>

## Step 4: Save Your Function

With your function defined, you can save it by clicking "Create Function".

After saving, you'll see a detail page showing the JSON schema and the configured reference variables.

## Step 5: Use the Function in the Conversation

Once you have created your set variable function, you must add the function to the task's list of available functions in order for GenerativeAgent to use it.

GenerativeAgent may call the function proactively, but we recommend you instruct GenerativeAgent to call the function explicitly.

Always make sure to test your functions with Previewer to ensure they work as expected.

Here's how the function works within a task and conversation flow:

1. GenerativeAgent collects the required parameters from the user (or context).
2. (Optional) A "Message before Sending" can be displayed to the user, clarifying why GenerativeAgent is saving data.
3. Jinja2 transformations convert or combine inputs, if defined.
4. Reference variables are created as soon as the function runs successfully—GenerativeAgent can immediately incorporate them into logic or other function calls.
5. If you turned on "Include return variable as part of function response," GenerativeAgent receives the new values right away, shaping subsequent interaction steps.

<Accordion title="Example task leveraging reference variables set by a set variable function">
  ```jinja2
  # Objective
  Assist the customer in adding a lap child to their flight reservation by determining eligibility and communicating relevant policies.

  # Context
  - The customer has provided their confirmation number.
  - No lap children currently exist on their reservation.

  # Instructions
  1. **Eligibility Check:**
     - Call the `get_lap_child_policy` function to determine if the child is eligible as a lap child and obtain the policy.

  2. **Communicate Eligibility and Policy:**

     - {% if vars.get("child_eligible_as_lap_child") == true %}
         - Inform the customer: "The child is eligible as a lap child and will be {{ vars.get('childs_age') }} at the time of the flight. Lap child policy: {{ vars.get('lap_child_policy') }}."
     - {% elif vars.get("child_eligible_as_lap_child") == false %}
         - Inform the customer: "The child is not eligible as a lap child because they will be {{ vars.get('childs_age') }} at the time of the flight. Lap child policy: {{ vars.get('lap_child_policy') }}."
     - {% endif %}

  3. **Customer Action Based on Eligibility:**

     - {% if vars.get("child_eligible_as_lap_child") == true %}
         - Ask if the customer would like to add their child as a lap child.
         - If yes, call the `add_lap_child()` function.
     - {% elif vars.get("child_eligible_as_lap_child") == false %}
         - Offer assistance in purchasing a seat for the child.
         - Based on customer response:
           - Assist in seat purchase if desired.
           - If not, ask if further assistance is needed.
     - {% endif %}

  ```
</Accordion>

## Best Practices

Here are some recommendations to help you make the best use of the set variables function type:

<AccordionGroup>
  <Accordion title="Use Meaningful Names and Descriptions">
    Label your variables and functions clearly (e.g., "child\_age\_at\_time\_of\_flight") so GenerativeAgent and your team understand their purpose.
  </Accordion>

  <Accordion title="Allow Variables to Be Returned By Default">
    By toggling "Include return variable as part of function response," GenerativeAgent can incorporate newly stored data immediately. Even if this is off, the variable is still saved for future reference.
  </Accordion>

  <Accordion title="Use Jinja2 Logic">
    Apply conditionals and expressions to reduce guesswork—for instance, deciding if a child is under 2 for lap-child eligibility.
  </Accordion>

  <Accordion title="Leverage Conditions">
    In a Task's configuration, specify "Conditions" to control when GenerativeAgent should call this function. This helps you keep flows tidy.
  </Accordion>

  <Accordion title="Keep Schemas Focused">
    Avoid clutter or extraneous parameters. A clear schema helps GenerativeAgent gather exactly what's needed without prompting extra questions.
  </Accordion>
</AccordionGroup>

## Next Steps

<CardGroup>
  <Card title="Task Best Practices" href="/generativeagent/configuring/task-best-practices">
    Learn more about best practices for task and function configuration.
  </Card>

  <Card title="Conditional Templates" href="/generativeagent/configuring/tasks-and-functions/conditional-templates">
    Use conditional logic to dynamically change instructions based on variables.
  </Card>

  <Card title="Trial Mode" href="/generativeagent/configuring/tasks-and-functions/trial-mode">
    Test your functions in a safe environment before deploying to production.
  </Card>

  <Card title="Previewer" href="/generativeagent/configuring/previewer">
    Test your functions and variables in real-time with the Previewer tool.
  </Card>
</CardGroup>


# System Transfer Functions
Source: https://docs.asapp.com/generativeagent/configuring/tasks-and-functions/system-transfer

Signal conversation control transfer to external systems with System Transfer Functions.

System Transfer Functions signal that control of the conversation should be transferred from GenerativeAgent to an external system. They can also return reference variables (e.g., a determined "intent," or details about a charge) for further processing outside of GenerativeAgent.

By using a System Transfer Function, you can:

* End the conversation gracefully, indicating that GenerativeAgent is finished.
* Hand control back to the calling application or IVR once a goal is met.
* Send relevant conversation data (e.g., identified charges, subscription flags, or determined intent) for follow-up workflows.

To create a system transfer function:

1. [Create a function](#step-1-create-a-new-function)
2. [Define input parameters](#step-2-define-input-parameters-json)
3. [Set variables (optional)](#step-3-optional-set-variables)
4. [Save the function](#step-4-save-your-function)
5. [Use the function in a task](#step-6-using-the-system-transfer-function-in-the-conversation)
6. [Handle the system transfer event](#step-5-handle-the-system-transfer-event)

## Step 1: Create a New Function

Navigate to the Functions page and click "Create Function."

1. Select "System transfer" and click "Next: Function details"
   <Frame>
     <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/generativeagent/SetSystemTransferFunction.png" />
   </Frame>
2. Specify the Name and Purpose of the Function
   * **Function Name**: Provide a concise, unique name, using underscores (e.g., `issue_refund_request`).
   * **Function Purpose**: Briefly describe what the function does (e.g., "Takes the collected charge info and indicates a refund request should be processed").
     * GenerativeAgent uses this description to determine if/when it should call the function.

## Step 2: Define Input Parameters (JSON)

The input parameters are the values that GenerativeAgent needs to pass when calling this function to transfer control to the external system.

Under "Input Parameters," enter a valid JSON schema describing the required parameters. GenerativeAgent will gather the necessary information (from user messages or prior context) before calling the function.

```json Example Input Schema
{
  "type": "object",
  "required": [
    "line_item_number",
    "is_eligible_for_refund",
    "is_subscription"
  ],
  "properties": {
    "line_item_number": {
      "type": "string",
      "description": "The line item number associated with the charge"
    },
    "is_eligible_for_refund": {
      "type": "boolean", 
      "description": "Whether or not the line item is eligible for a refund"
    },
    "is_subscription": {
      "type": "boolean",
      "description": "Whether or not the charge is associated with a subscription"
    }
  }
}
```

## Step 3: (Optional) Set Variables

Though System Transfer Functions typically return control to an external system, you can still configure one or more reference variables:

* Configure variables to rename or transform parameter values for the external system
* Use [Jinja2](https://jinja.palletsprojects.com/en/stable/) for transformations if needed
* Toggle "Include return variable as part of function response" to make variables immediately available

### Jinja2 Templates

Use Jinja2 to transform values before transfer. For example, to convert a string boolean to a proper boolean:

```jinja2
true if params.get("is_subscription") == "True" else false
```

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/generativeagent/SystemTransferFunction.png" />
</Frame>

## Step 4: Save Your Function

With your function defined, save it by clicking "Create Function".

After saving, you'll see a detail page showing the JSON schema and any configured reference variables.

## Step 5: Using the System Transfer Function in the Conversation

Once you have created your system transfer function, you must add the function to the task's list of available functions for GenerativeAgent to use it.

GenerativeAgent may call the function proactively, but we recommend you instruct GenerativeAgent to call the function explicitly.

Always make sure to test your functions with Previewer to ensure they work as expected.

Here's how the function works within a task and conversation flow:

1. GenerativeAgent collects the required parameters from the user (or context).
2. (Optional) A "Message before Sending" can be displayed to the user, clarifying why GenerativeAgent is transferring control.
3. Jinja2 transformations convert or combine inputs, if defined.
4. GenerativeAgent calls the System Transfer Function, signaling that control returns to the external system.
   * All reference variables collected during the conversation are passed along.
   * If configured, the function's specific variables also appear in the final response.

<Accordion title="Example scenario using a System Transfer Function">
  ```jinja
  # Objective
  Identify the line item for an unrecognized charge, verify refund eligibility, and transfer control to the external system once the user confirms a refund request.

  # Context
  - We already have a list of recent transactions.
  - The user has confirmed which charge is disputed.

  # Instructions
  1. **Identify the Charge:**
     - Gather details: date, amount, and merchant to confirm the correct line item.
     - Store "line_item_number" once identified.

  2. **Check Refund Eligibility:**
     - If the line item meets the refund criteria, set "is_eligible_for_refund" to true.
     - If part of a subscription, set "is_subscription" to true for any special handling.

  3. **Offer Refund:**
     - {% if vars.get("is_eligible_for_refund") == true %}
       - Ask the customer: "Shall we proceed with the refund?"
       - If yes:
         - Call the `issue_refund_request` System Transfer Function.
     - {% else %}
       - Apologize, indicate no refund is possible. Offer further assistance.
     - {% endif %}
  ```
</Accordion>

### Best Practices

<AccordionGroup>
  <Accordion title="Use Meaningful Names and Descriptions">
    Choose function names like "issue\_refund\_request" or "complete\_intent\_transfer." Provide concise descriptions so GenerativeAgent knows when to transfer control.
  </Accordion>

  <Accordion title="Leverage Conditions">
    If you only want the system transfer to occur after specific statuses or variables are set, configure "Conditions" in the Task's function list so GenerativeAgent calls it at the correct time.
  </Accordion>

  <Accordion title="Stay Focused with Your Schema">
    Your function schema should cover only the data needed by the external system. Minimizing extra fields ensures smoother handoff.
  </Accordion>

  <Accordion title="Use Jinja2 for Variable Transformations">
    Handle naming or logic differences between GenerativeAgent and your external system with optional Jinja2 transformations (e.g., rename "is\_subscription" to "subscriptionFlag").
  </Accordion>
</AccordionGroup>

## Step 6: Handle the System Transfer Event

When the function is called in your task, the conversation will be transferred to your system. This transfer is communicated via the [generative agent events](/generativeagent/integrate/handling-events) that are sent as part of the conversation handling.

Each reference variable currently set are passed as `referenceVariables`, and any variables set in the function are passed as `transferVariables`.

```json Example System Transfer Event
{
  "generativeAgentMessageId": "bba4320f-de53-4874-83b4-6c8704d3620c",
  "externalConversationId": "33411121",
  "conversationId": "01HMVXRVSA1EGC0CHQTF1X2RN3",
  "type": "systemTransfer",
  "systemTransfer": {
    "referenceVariables": {
      "customerName": "John Smith",
      "accountNumber": "12345",
      "isActive": true
    },
    "transferVariables": {
      "line_item_number": "1234567890",
      "is_eligible_for_refund": true,
      "is_subscription": false
    },
    "currentTaskName": "handle_refund_requests"
  }
}
```

## Next Steps

<CardGroup>
  <Card title="Task Best Practices" href="/generativeagent/configuring/task-best-practices">
    Learn more about best practices for task and function configuration.
  </Card>

  <Card title="Set Variable Functions" href="/generativeagent/configuring/tasks-and-functions/set-variable">
    Learn how to store and manipulate conversation data with Set Variable Functions.
  </Card>

  <Card title="Connecting Your APIs" href="/generativeagent/configuring/connect-apis">
    Connect your external systems to enable system transfers.
  </Card>

  <Card title="Previewer" href="/generativeagent/configuring/previewer">
    Test your system transfer functions in real-time with the Previewer tool.
  </Card>
</CardGroup>


# Test Users
Source: https://docs.asapp.com/generativeagent/configuring/tasks-and-functions/test-users



You can test various return scenarios with GenerativeAgent by using Test Users in the Previewer.

Additionally, by using Test Users you ensure that GenerativeAgent handles tasks and functions correctly when calling your APIs.

Test Users allow you to define a scenario and how your API would respond to an API Connection for that scenario. This allows you to try out different Tasks and iterate on tasks definitions or on Functions.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/generativeagent/TestUser.png" />
</Frame>

<Note>
  Test Users allow you to define replies for different API calling scenarios (e.g. the return for an API Call named getAddress but having different user IDs).
</Note>

Use Test Users to test:

* Key happy-flows
* Edge cases
* Common problems or issues

## Test User Configuration

**Default User Options**

Whenever you choose a Test User, you are given the following options:

1. Add API: Add the Mock Response for the API Call.
   * Once you add an API, add the return scenarios by specifying different request parameter / response pairs.
2. Advance settings: Add timestamps to the mock call so GenerativeAgent can make better use of connections.
   * This works only if your mocked data includes dates. If this is the case, set this field so the date the bot believes it is aligns with the data returned in the mock responses

If your mock data does not involve or include dates, leave it blank.

**Default User**

After choosing “Add API”, fill out the following information:

1. API to mock: Be explicit about the API you can to use.

<Note>
  Remember to use the correct syntax.

  For example, add `entity.` in the jinja syntax to an `accountinfo` API Call.
</Note>

2. Request Params: Enter the Params that should be mocked
3. Response params: Enter the Request Params you want to mock in a response. You can specify multiple Request and Response pairs for a single API.

### Create a Test User

To create a Test User:

1. Navigate to the Test User page in GenerativeAgent and click "Create User".
2. This takes you to the Test User detail page which shows each endpoint currently being used by an API Connection.
3. Provide the following information:
   * Name of the test user (editable)
   * Description of the scenario this mock user represents (eg. Basic returns for the API Call and Functions)
   <Note>
     For each endpoint, provide the API response your server would respond to enable the scenario you want to simulate.
   </Note>
4. Click "Create" and create the Test User.
5. Deploy the changes to Sandbox or Draft environments

### Delete a Test User

To delete a test user, simply click on the ellipsis and then on Delete. You are given a confirmation pop-up to delete the user

## Use Test Users in the Previewer

Once you create the Test User and reference an API call to the Test User, you are ready to test a function using [Mock API Functions](/generativeagent/configuring/tasks-and-functions/mock-api).

To use the Test User:

1. Check that the Tasks and Functions correctly reference the Test User and the API Call to Mock
2. Initiate a conversation with GenerativeAgent
3. Ask GenerativeAgent for information related to the Mock Call
4. Review the response given by GenerativeAgent. It should return the same mock response that you set up in the Test User


# Trial Mode
Source: https://docs.asapp.com/generativeagent/configuring/tasks-and-functions/trial-mode



Trial mode allows admins to safely deploy new GenerativeAgent use cases to production.

A function can be marked as being in trial mode, so that when GenerativeAgent calls that function, it instead will escalate to a human agent.

This can allow you to:

* Ensure GenerativeAgent called the function properly given the conversation context.
* Ensure GenerativeAgent interpreted the function response and responded to the customer correctly.
* Be protected from unknown API response variations that you might not have accounted for during development and testing.

After running a function in trial mode and confirming it responds as expected, you can disable trial mode, deploying the function into full production use.

<Note>
  Trial mode is [distinct from A/B testing](#trial-mode-vs-a-b-testing). Trial mode is intended to ensure a function works correctly, not comparing outcomes between two functions or version.
</Note>

## Using Trial Mode

Enable trial mode on functions when you want to observe how GenerativeAgent would use that function in production by forcing escalation to a live agent immediately before or after the function is called.

<Warning>
  Enabling trial mode will temporarily reduce your containment rates because conversations are configured to escalate to a live agent instead of being fully handled by GenerativeAgent.

  However, this temporary reduction in containment is a trade-off for the added safety and reliability gained from observing and validating GenerativeAgent's behavior in a controlled environment before full deployment.
</Warning>

For example, suppose a new use case allows GenerativeAgent to check a customer's refund eligibility and then issue a refund if eligible. An admin may want to gate this new task based on two functions:

* Checking the refund eligibility; and then
* Issuing the refund.

### Example Two phase trial mode

An admin may decide to configure trial mode in two phases for this use case.

**Phase 1**

An admin can configure GenerativeAgent to call the first function (checking the refund eligibility), but then immediately escalate to a live agent to continue resolving the customer's issue. This would allow admins to observe how GenerativeAgent calls the refund eligibility function and how it would have interpreted and communicated the response of the function back to the customer.

**Phase 2**

For the second function (issuing the refund), an admin may configure that GenerativeAgent should escalate to a live agent before the function is called, as this type of function actually performs an action in a backend system. Configuring trial mode to escalate before the function is called allows admins to observe how GenerativeAgent would have called the function.

In both scenarios, trial mode lets admins observe how GenerativeAgent would have performed on production data before actually letting GenerativeAgent use the function responses to interact with the customer.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/generativeagent/trial-mode-2-phase.png" />
</Frame>

### Deciding to deploy a function

You can turn off trial mode and fully deploy the function when you have gathered sufficient data and confidence that GenerativeAgent is correctly calling the function and interpreting its responses.

This can be determined by monitoring the escalations, reviewing how GenerativeAgent would have handled the interactions, and ensuring that there are no significant issues or undesired behaviors.

## Toggle Trial Mode

By default, trial mode is toggled off.

When you want to enable trial mode for a function, click the toggle.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-738fefcd-4a0f-936d-6456-12a389aac78e.png" />
</Frame>

When using trial mode, you need to specify:

* **Escalation behavior:**
  * **Before Calling**: GenerativeAgent will escalate to a live agent before calling the function. This allows you to see what GenerativeAgent would have called the function.
  * **After Calling**: GenerativeAgent will call the function, but then escalate to an agent before responding to the customer.
* Message to send to customer: The message that will be sent to customer before escalation. Can be left blank to not send a dedicated message.

## Evaluate behavior in Previewer

When trail mode is activated, you can see the trial behavior in previewer.

### Escalate Before Call

When trial mode is toggled on and configured to escalate before the function is called, you can see the example function request GenerativeAgent would have made before the "Transferred to agent" event.

<Frame>
  <img height="300" alt="Trial mode before calling" src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-f219b86a-9930-9735-7885-9916c3e7dd8c.png" />
</Frame>

### Escalate After Call

When trial mode is toggled on and configured to escalate after the function is called, GenerativeAgent will call the function, and then escalate to an agent.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-a644be6b-8ae0-822a-fc90-239f04d985b5.png" />
</Frame>

## Trial Mode vs A/B Testing

A/B tests and trial mode are two complementary functionalities that both enable safe deployment.

A/B tests are configured at the GenerativeAgent level, where a customer is either seeing the GenerativeAgent treatment or the control treatment (where the control treatment might be the treatment customers saw prior to GenerativeAgent).

Trial mode can be configured within an A/B test. For example, it could be that 10% of the traffic in an A/B test is seeing GenerativeAgent, and within that 10% trial mode is on for one or more functions.


# Feature Releases
Source: https://docs.asapp.com/generativeagent/feature-releases



| Feature Name                  | Feature Release Details                                                                                  | Additional Relevant Information (if available) |
| :---------------------------- | :------------------------------------------------------------------------------------------------------- | :--------------------------------------------- |
| Knowledge Base Search         | [Knowledge Base Search](/generativeagent/feature-releases/knowledge-base-search "Knowledge Base Search") |                                                |
| Trial Mode                    | [Trial Mode](/generativeagent/feature-releases/trial-mode)                                               |                                                |
| Turn Inspector                | [Turn Inspector](/generativeagent/feature-releases/turn-inspector)                                       |                                                |
| Knowledge Base Submission API | [Knowledge Base API](/generativeagent/feature-releases/knowledge-base-article-submission-api)            |                                                |
| Mock API                      | [Mock API](/generativeagent/feature-releases/mock-api)                                                   |                                                |
| Scope and Safety Fine Tuning  | [Scope and Safety Tooling](/generativeagent/feature-releases/safety-tooling)                             |                                                |


# Knowledge Base Article Submission API
Source: https://docs.asapp.com/generativeagent/feature-releases/knowledge-base-article-submission-api

Learn about the upcoming Knowledge Base Article Submission API feature for ASAPP.

## Overview

ASAPP is introducing the Knowledge Base Article Submission API to GenerativeAgent, aimed at enabling users the ability to programmatically add and modify articles and large data sources within the GenerativeAgent Knowledge Base

The Knowledge Base Article Submission API offers an alternative to the manual creation of article snippets and the import url options in the Knowledge Base tooling. This feature is especially beneficial for large data sources that are not easily scrapped, like articles that live within a Content Management System.

The API key benefits are:

* **Programmatic Article Management:** Add or update articles without manual entry
* **Manual Review Process**: All submissions undergo human review in the ASAPP AI-Console UI
* **Flexible Submission**: Allows customers to choose between manual or API submission
* **Content Management System (CMS) Compatibility**: Easily import articles from various sources

<Card title="Article Submission API" href="/apis/overview">Learn more about the API in the API Reference. </Card>

## Use and Impact

Article submission via API streamlines the integration of large data sources into GenerativeAgent's Knowledge Base.

The Article Submission API enables:

1. The inclusion of articles that exist in non-public content management systems
2. More programmatic control over article details and metadata, without requiring that users configure metadata within the GenerativeAgent Knowledge Base tooling.

## How it works

1. Users configure their API credentials to use the GenerativeAgent Knowledge Base Submission API.
2. Users initiate a request to add or update an article via API with:
   * Article details
   * Metadata
3. The Article Submission API processes the submission.
4. Articles require human review and approval in the ASAPP AI-Console UI before they are published.
5. Upon approval, articles become available in the Knowledge Base
6. Users can:
   * Edit article fields (e.g. metadata)
   * Test the articles reference by GenerativeAgent via Previewer
7. Articles are ready for deployment into sandbox or production via the Deploy button in AI-Console

## FAQs

1. **Can I use the API to get the articles that already exist in the GenerativeAgent Knowledge Base?**
   * Yes, the API allows you to retrieve articles that were submitted via the API from the GenerativeAgent Knowledge Base using the articles endpoint.
     You can access details of specific articles by their unique identifiers, including:
     * Title
     * Content
     * Metadata
2. **How do I remove articles from the KB?**
   * Currently, the API does not directly support the removal of articles from the Knowledge Base.
   * To remove or archive articles, use the ASAPP AI-Console UI tooling to manage the Knowledge Base content.
3. **What if my submission contains an error or is denied?**
   * If there is an error in your submission, the API will return an appropriate error code indicating the issue.
   * Submissions must be reviewed and approved through the ASAPP AI-Console UI before they are published.
   * If a submission is denied, you can adjust the content and resubmit it for review.
4. **What are my articles different in the GenerativeAgent Knowledge Base tooling from what I submitted?**
   * Currently, GenerativeAgent cleans the articles upon ingestion. This aids with clarity and better suits the article for use in a GenerativeAgent question-answering.
5. **Do I have to manually review and accept articles every time I submit them with the API**
   * Currently, yes.
   * However, ASAPP will soon release an option to bypass the review process for users who want to skip this step and have their articles immediately available for use in production.


# Knowledge Base Search
Source: https://docs.asapp.com/generativeagent/feature-releases/knowledge-base-search

Learn about the upcoming Knowledge Base Search Bar feature for ASAPP.

## Overview

ASAPP is introducing the **Knowledge Base Search** feature to GenerativeAgent, aimed at improving the ability to search and manage Knowledge Base articles.

This feature includes a free text search that covers article titles, text, and URLs, along with metadata filters such as content source name, content source type, creator, and deployment status.

These filters can be combined using "and" operators for more refined search results

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/generativeagent/KBSearch.png" />
</Frame>

**The free text search covers:**

* Article Titles
* Article Text
* URLs

**Users can apply filters such as:**

* Content source name
* Content source type
* First activity Range
* Created by
* Last modified by
* Deployment status
* Metadata

<Tip>
  Filters can be combined using "AND" operators for refined search results, then users can manage and locate relevant articles.

  Users can reset all applied filters or navigate articles without losing search context. Additionally, users can select all articles in a search result for bulk undeploying and deleting.
</Tip>

## Use and Impact

Knowledge Base Search improves the navigation within GenerativeAgent by enhancing the process of locating Knowledge Base Articles.

Search enhances content management capabilities, allowing users to quickly filter and retrieve information based on specific criteria. This ultimately leads to more organized and efficient content handling.

Knowledge Base Search is designed for organizations with large sets of Knowledge Base Articles.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/generativeagent/KBSearchBar.png" />
</Frame>

It is particularly beneficial in situations where specific metadata attributes are crucial for locating, reviewing, or updating content, such as finding articles by a particular creator or deployment status

## How it works

Users can search for an article or apply metadata filters.

Available filters include:

* Content source name
* Content source type
* First activity Range
* Created by
* Last modified by
* Deployment status
* Metadata

<Note>
  Apply filters can be combined using AND logic operators
</Note>

Users can also:

* Reset filters to make a new search
* Select all articles in a search result for bulk undeployment or deletion

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/generativeagent/KBSearchFilters.png" />
</Frame>

## FAQs

1. How can I search for articles created by a specific user?

   Use the "Created by" metadata filter and select the desired user from the dropdown menu.
2. Will the filters persist if I navigate away from the search results?

   Yes, the search results and applied filters will persist when navigating back to the Knowledge Base list from an article
3. Can I apply multiple filters at once?

   Yes, you can select and apply multiple filters, and they will be combined using "and" operators for precise search results.


# Mock API Connections
Source: https://docs.asapp.com/generativeagent/feature-releases/mock-api

Learn about the upcoming Mock API Connection feature for ASAPP.

## Overview

Mock API Functions allow users to configure Functions within GenerativeAgent without pointing to a real API.

By providing a JSON schema, you can quickly define how a Function should behave, test its parameters, and preview conversation flows before integrating any live endpoints.
This shortens the setup process drastically and enables immediate prototyping of how GenerativeAgent will call your Function.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/generativeagent/MockAPIExample.png" />
</Frame>

Once you are ready to go live, you can simply replace your mocked schema with a real API connection, maintaining the same Function definitions and conversation logic.

Mocking API Connections is seamless way to:

* Validate conversation flows
* Confirm that parameters work as intended
* Ensure that your team can deliver results with or without fully integrated APIs

## Use and Impact

ASAPP aims to reduce friction and speed up time-to-deployment by removing the need for a working API during the initial setup and creation of Functions.

By [Mocking API Connections](/generativeagent/configuring/tasks-and-functions/mock-api), users can define and test Functions quickly, iterate on conversation flows, and confirm parameter requirements.

This helps ensure a more robust final integration, saving both time and resources for customers and developers.

Its main benefits are:

* Rapid prototyping of new Functions without a fully built API.
* Testing how GenerativeAgent processes or populates request parameters before real integration.
* Simplifying configuration for teams that want to get interacting with GenerativeAgent quickly before building or exposing internal APIs.

<Card title="Mock API" href="/generativeagent/configuring/tasks-and-functions/mock-api"> Go to the Mock API page to learn more about this feature. </Card>

## How it works

1. User selects “Create Function” from the Functions page.
2. User clicks “Integrate later,” indicating a Mock API setup.
3. User enters a valid JSON schema for the request parameters (or picks an example schema).
4. Upon saving, the Function detail page displays a preview of the schema.
5. During a conversation, GenerativeAgent can “call” the mocked Function, letting users confirm how parameters would be handled.
6. When ready, user can click “Replace” to connect to a real API, transferring any saved schema and Function definitions seamlessly into production.

<Note>
  Mock API works with JSON Schema for Mock Functions
</Note>

## FAQs

1. **Can I leave a Mock API Function in place indefinitely?**
   * Yes.
   * Mock API Functions do not need a live API unless you decide you need real data or third-party functionality. You can replace the mock with a real API at any time.
2. **Will I lose my Function definitions if I switch to a real API?**
   * Not at all.
   * You can preserve your Function’s core settings and simply hit “Replace” to attach a real API for production.
3. **Can I deploy Mock API Functions to production?**
   * Currently, Mock API Functions can be deployed to sandbox, but not to production environments.
   * If you need a Function to run in production, you must replace the mock schema with a real API connection.


# Pinned Versions
Source: https://docs.asapp.com/generativeagent/feature-releases/pinned-versions

Learn about the Pinned Versions feature for GenerativeAgent.

GenerativeAgent now allows you to pin specific versions of the core GenerativeAgent system, offering greater control over version deployment and updates.

With Pinned Versions, you can:

* Pin a version of GenerativeAgent to production to ensure consistent behavior across your organization.
* Try out new versions of GenerativeAgent (along with the associated new features) in Previewer before deploying to production.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/generativeagent/PinnedVersionSelector.png" />
</Frame>

For detailed information about configuring and using pinned versions, visit our [Pinned Versions documentation](/generativeagent/configuring/deploying-to-generativeagent#generativeagent-versions).

## FAQs

1. **What happens if I do not pin a version?**

   Your GenerativeAgent will default to the latest stable version, ensuring access to the newest features.

2. **Can I change the pinned version later?**

   Yes. You can switch versions as needed via the Settings interface.

3. **How do I know what features a new version includes?**

   Access a summary of improvements and best practices for optimizing configurations on the GenerativeAgent version release page.

4. **Can I preview a version before deploying it?**

   Absolutely. You can preview any version to understand how it will affect your environment.


# Scope and Safety Fine Tuning Tooling
Source: https://docs.asapp.com/generativeagent/feature-releases/safety-tooling

Learn about the Scope and Safety Fine Tuning Tooling feature for GenerativeAgent.

GenerativeAgent now offers customizable safety and scope guardrails, allowing you to define what's considered "in-scope" and "safe" for your specific needs. While maintaining core safety protections, this tooling enables you to expand permissible topics and adjust default guardrails to better align with your business policies and requirements.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/generativeagent/InputSafety.png" />

  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/generativeagent/ScopeTopic.png" />
</Frame>

For detailed information about configuring and using safety tooling, visit our [Scope and Safety Tuning documentation](/generativeagent/configuring/safety/scope-and-safety-tuning).

## FAQs

1. Will adding custom categories remove default protections?

   No, default safety and scope guardrails remain active. Your configurations help customize permissible interactions.

2. How can I adjust the scope if GenerativeAgent is too conservative?

   Add or refine in-scope or input safety categories to expand acceptable topics, keeping standard safety intact.

3. Why does the safety tooling require an explanation?

   Input safety requires an explanation to provide context for why certain inputs are deemed safe, helping GenerativeAgent accurately apply exceptions relevant to your specific needs.


# Trial Mode
Source: https://docs.asapp.com/generativeagent/feature-releases/trial-mode

Learn about the upcoming Trial Mode feature for ASAPP.

## Overview

ASAPP is adding the "Trial Mode" option to functions. This trial mode allows you to safely deploy GenerativeAgent use cases by trialing functions in production.

A function can be marked as being in trial mode, so that when GenerativeAgent calls that function, it instead will escalate to a human agent.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-738fefcd-4a0f-936d-6456-12a389aac78e.png" />
</Frame>

This can allow you to:

* Ensure GenerativeAgent called the function properly given the conversation context.
* Ensure GenerativeAgent interpreted the function response.
* Be protected from unknown API response variations that you might not have accounted for during development and testing.

After running a function in trial mode and confirming it responds as expected, you can disable trial mode, deploying the function into full production use.

<Note>
  Check out the [Trial Mode guide](/generativeagent/configuring/tasks-and-functions/trial-mode) for more information.
</Note>

## Use and Impact

One of the key challenges of configuring GenerativeAgent is ensuring it behaves as you expect. One of the biggest impacts on behavior is how GenerativeAgent calls functions, and interprets the results.

This is particularly important when interpreting API results. It is not unusual that some edge cases and other nuance of API responses were not accounted for, resulting in unexpected behavior.

Trial Mode allows you to experiment and try out new function configurations, seeing what GenerativeAgent would have done. While still escalating the issue to an agent, so that your customer's experiences are not negatively impacted by your testing.

## How it Works

1. Enable trial mode on functions that you want to observe.
2. Depending on your configuration, GenerativeAgent can either call the function before escalating to an agent, or escalate to an agent before calling the function. If escalating before, you will still be able to see the function that would have been called.
3. Observe GenerativeAgent's use of the function during trial mode, in previewer.

<Frame>
  <img height="200" src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-a644be6b-8ae0-822a-fc90-239f04d985b5.png" />
</Frame>

## FAQs

**How does trial mode relate to A/B testing in terms of safe deployment?**
A/B tests and trial mode are two complementary functionalities that both enable safe deployment. A/B tests are configured at the GenerativeAgent level, where a customer is either seeing the GenerativeAgent treatment or the control treatment. Trial mode can be configured within an A/B test.

**If I enable trial mode, will my containment rates be low?**
Enabling trial mode will temporarily reduce your containment rates because conversations are configured to escalate to a live agent instead of being fully handled by GenerativeAgent. However, this temporary reduction in containment is a trade-off for the added safety and reliability gained from observing and validating GenerativeAgent's behavior in a controlled environment before full deployment.

**How do I know when it's safe to turn off trial mode and fully deploy the function?**
You can turn off trial mode and fully deploy the function when you have gathered sufficient data and confidence that GenerativeAgent is correctly calling the function and interpreting its responses. This can be determined by monitoring the escalations, reviewing how GenerativeAgent would have handled the interactions, and ensuring that there are no significant issues or undesired behaviors. Once you are satisfied with the performance, you can disable trial mode for that function.


# Turn Inspector
Source: https://docs.asapp.com/generativeagent/feature-releases/turn-inspector

Learn about the upcoming Turn Inspector feature for ASAPP's Generative Agent.

## Overview

ASAPP is introducing the Turn Inspector, an advanced diagnostic feature for GenerativeAgent that enhances how developers and users understand and optimize their interaction workflows.

The Turn Inspector enables granular validation of conditional prompting, allowing users to examine how instructions are processed within GenerativeAgent. By providing a comprehensive view into each interaction's setup, Turn Inspector facilitates troubleshooting and performance optimization.

## Use and Impact

Users gain more insight and control over Tasks and Functions configuration through a new modal that exposes GenerativeAgent's internal state when using the Previewer.

Turn Inspector includes detailed visibility into:

* Active Task configuration
* Current reference variables
* Precise instruction parsing
* Function call context and parameters
* Execution state at each conversational turn

This transparency enables users to diagnose unexpected behaviors, fine-tune instruction sets, and ensure more predictable and reliable interactions with GenerativeAgent.

Turn Inspector transforms GenerativeAgent’s management to a transparent and controllable process that enhances the overall reliability and performance of GenerativeAgent interactions.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/generativeagent/TurnInspector.png" />
</Frame>

## How it Works

1. User starts a conversation using the Live Previewer in AI-Console
2. User clicks on the “Instructions” action within Previewer.
3. This opens a modal that contains:
   * The reference variables that have been set
   * The task instructions
   * The functions available at that turn of the conversation

Now, the user can inspect the state of reference variables, tasks, and function instructions at any specific turn.

## FAQs

**How to access the Turn Inspector feature?**

Access the inspector by clicking on the `Instructions` action in the conversation Previewer.

This will open a modal where you can view the state of the reference variables, task instructions, and functions that were available to GenerativeAgent at that point in the conversation.

**Can I see how my conditional logic is affecting GenerativeAgent outputs in real-time?**

Yes, by inspecting the state of GenerativeAgent at each turn, users can see how the task instructions have been rendered for GenerativeAgent.

This provides insight into what information GenerativeAgent has access to at that point in time in the conversation.

**What if I notice an issue in my task instructions through the Turn Inspector?**

If you notice an issue in the task instructions, you can navigate to the task, make changes, save the task, and then retest the conversation.

If you are previewing in the Draft environment, your task changes should be available immediately to continue previewing.


# Getting Started
Source: https://docs.asapp.com/generativeagent/getting-started



An integration into GenerativeAgent requires a combination of configuring the bot as well as the technical integrations that hook your system into GenerativeAgent. These are represented by these core steps:

<Steps>
  <Step title="Define your tasks">
    These are a series of tasks you want GenerativeAgent to handle.
  </Step>

  <Step title="Share your Knowledge Base">
    This allows GenerativeAgent to respond with accuracy and using your already established information.
  </Step>

  <Step title="Connect your APIs">
    Expose the APIs that GenerativeAgent will use as needed by the tasks you've defined. This unlocks the full potential of GenerativeAgent to perform the same tasks your agents are able perform, such as booking airline tickets, looking up bill discrepancies, or getting a customer's information.
  </Step>

  <Step title="Integrate your Voice or Chat System">
    Use Connectors or integrate directly in our API to enable GenerativeAgent to talk to end users.
  </Step>
</Steps>

<Note>
  At all points during your relationship with ASAPP, you have access to the previewer. The Previewer gives you live access to GenerativeAgent and allows for rapidly testing changes you may want to make.
</Note>

## Step 1: Define your Tasks

You need to define the **Tasks** you want the GenerativeAgent to perform. Tasks are the root of the actions that GenerativeAgent performs.

For each task, you specify the **Functions** you want it to use. Functions are what allow your GenerativeAgent to perform all the same actions a live Agent can perform.

GenerativeAgent only operates within the tasks and functions that you define. Allowing you to control the scope you want GenerativeAgent to handle.

The scope of the tasks will determine the Knowledge Bases and APIs it may need access to. They should be determined before you implement the rest of the integration.

<Card title="Configuring GenerativeAgent" href="/generativeagent/configuring">Learn more about defining Tasks and Functions.</Card>

## Step 2: Share your Knowledge Base

Connecting your knowledge base is critical as it ensures that GenerativeAgent only speaks with accuracy about your company and policies.

There are several ways you can connect GenerativeAgent to your knowledge base to GenerativeAgent:

<Card title="Connecting your knowledge base" href="/generativeagent/configuring/connecting-your-knowledge-base">Learn more about how to pass your knowledge base to GenerativeAgent.</Card>

## Step 3: Connect your APIs

GenerativeAgent calls your APIs to retrieve data as well as to perform actions such as booking a flight or canceling an order.

ASAPP supports REST and GraphQL APIs. To Connect your APIs, you need to provide an OpenAPI spec of the API you want to use and configure access information, such as authentication method.

ASAPP also allows for in-depth user mocking to make it easier to iterate on GenerativeAgent's performance with the Previewer.

<Card title="Connecting your APIs" href="/generativeagent/configuring/connect-apis">Learn how GenerativeAgent can use your APIs.</Card>

## Step 4: Integrate into your Voice or Chat System

You need to hook GenerativeAgent into your support channels. This is both sending conversation data to ASAPP and passing the response from GenerativeAgent to your end user.

This includes listening to a stream of events from GenerativeAgent, as well as hooking up your voice or text channels into ASAPP.

We support several Connectors to streamline much of the integration, but also allow for direct, text-based communication.

<Card title="Integrating GenerativeAgent" href="/generativeagent/integrate">Learn how to connect your contact center into GenerativeAgent</Card>

## Next Steps

After a first conversation with GenerativeAgent, you'll be able to resolve customer inquiries by making continuous calls to the Agent!

Here a few other topics that may help you:

<CardGroup>
  <Card title="Safety and Troubleshooting" href="/generativeagent/configuring/safety-and-troubleshooting" />

  <Card title="Go Live" href="/generativeagent/go-live" />
</CardGroup>


# Go Live
Source: https://docs.asapp.com/generativeagent/go-live



After configuring GenerativeAgent and connecting to ASAPP's servers, you can go live into your production environments.

These are the steps to take to go live:

<Steps>
  <Step title="Launch Pre-check" />

  <Step title="Validate Your Integration" />

  <Step title="Launch GenerativeAgent into Production" />

  <Step title="Post Launch Maintenance" />
</Steps>

## Step 1: Validate your Configuration

Review that the following sections of the Configuration Phase are working as expected or have been signed off:

* **Functional requirements**: Confirm your Tasks and Function Requirements were addressed by your ASAPP Team and are correctly set up in GenerativeAgent. You can use the Previewer to test task and functions.

* **Functional and UAT Testing**: Validate individual components and end-to-end functionality between the GenerativeAgent and your customers. Your organization and your ASAPP Team must have signed off acceptance for the functionality of tasks, requirements, and user interactions before going live.

* **Human-In-the-Loop Set-up**: Confirm the Human-In-the-Loop definitions are properly defined in the GenerativeAgent's Tasks

  You can use the Previewer to test Human-in-the-Loop.

* **Credentials Verification**: Verify all your ASAPP Credentials and API Keys are obtained and that all key connections and calls to GenerativeAgent return data without any issue.

* **API Connections**: Ensure your APIs are connected to GenerativeAgent and your applications are calling GenerativeAgent and ASAPP to send messages and analyze them

* **Knowledge Base ingestion**: Ensure the Tasks and Functions you previously defined align with the responses that reference your Knowledge Base as Source-of-Truth.

## Step 2: Validate your Integration

Separated from GenerativeAgent functional configuration, you need to ensure your voice or chat applications are fully integrated with Generative Agent to go live.

<Note>
  Your method of integration determines the steps to go live
</Note>

To validate your integration is working smoothly, remember the following:

**Event Handling**

Ensure you are handling all events. GenerativeAgent communicates back to you via events.

These events are sent via Server-Sent-Event stream.

**API Integration**

Test your APIs exposure in the GenerativeAgent UI: Test how GenerativeAgent calls your APIs when performing Functions

You can do this in the previewer.

**Audio Integration**

Audio Integrations need a consistent flow of incoming and outcoming audio streams. Ensure that your organization opens, stops, and ends audio streams in every interaction between a customer and an agent.

**AutoTranscribe Websocket Integration**

* **Real-time Messaging**: Ensure that the URL Websocket connections are continuously provided by the ASAPP Server.

* **WebSocket protocol**: Request messages in the sequence must be formatted as text (UTF-8 encoded string data); only the audio stream should be formatted in binary. All response messages must also be formatted as text.

**Third Party Connectors**

Follow the integration procedure for the Third Party Connectors of your choice:

<Card title="UniMRCP Pluggin" href="/generativeagent/integrate/unimrcp-plugin-for-asapp" />

After the integration, ensure that your Third Party Connector is receiving and sending audio streams to the ASAPP Servers. This is done outside of the ASAPP applications.

**Text-only Integration**

Text conversations with GenerativeAgent can be ensured via the Previewer. Ensure messages are sent, analyzed, and that the GenerativeAgent replies with expected outputs

### Substep: Test the Integration

Test your integration to ensure that GenerativeAgent

> **Performance Testing**: Simulate expected traffic or high-traffic scenarios to determine any breaking-point or requirements meeting.

## Step 3: Launch GenerativeAgent to Production

Now you are ready to deploy GenerativeAgent into your Production environments.

### Deploy GenerativeAgent

Deploy GenerativeAgent into your Production environments without further effort.

You can do this from the GenerativeAgent UI.

<Card title="Deploy Generative Agent" href="/generativeagent/configuring/deploying-to-generativeagent" />

### Talk with GenerativeAgent

Now that GenerativeAgent is live in your Organization's environments, you can talk to the GenerativeAgent and receive LLM support.

> If your Integration has a Voice Channel, call your internal phone numbers and ask for issues or inquiries your customers would ask.
>
> If your integration with GenerativeAgent has a (message) Chat Integration, use the GenerativeAgent UI to continuously review how the GenerativeAgent helps with customer support and other issues.
>
> If your Integration involves Voice applications, you can also gather insights from GenerativeAgent's analyze calls in the GenerativeAgent UI.

## Step 4: Post Launch Maintenance

There are still some things you can do after GenerativeAgent is deployed.

Here are some things that your organization can do to continuously monitor GenerativeAgent while it is live.

Your ASAPP team is at your disposal to check anything else!

**Performance Monitoring**

* **Analytics**: Continuously analyze user interactions and system logs to make the better of analytics that can make GenerativeAgent perform better.
* **Alerts**: Use your internal monitoring tools to check on GenerativeAgent's Performance.
* **Enhancement**: ASAPP is continuously enhancing its AI products, so feel free to address your ASAPP Team for new features or improvements.

**Feedback**

Feedback Sessions: Your ASAPP team is always ready to receive feedback either from customer satisfaction surveys or from internal auditions.

**Internal Training**

Provide comprehensive training sessions for your internal staff in the scenarios where GenerativeAgent performs.

In the case that your Organization uses Human-in-the-Loop, train your staff for the scenarios when your human agents help GenerativeAgent in tasks.

**Support Plan**

Establish with your ASAPP team a support plan for post-launch assistance. This can work either by Helpdesk queries or direct support from your ASAPP Team.


# How GenerativeAgent Works
Source: https://docs.asapp.com/generativeagent/how-it-works

Discover how GenerativeAgent functions to resolve customer issues.

GenerativeAgent operates by:

<Steps>
  <Step title="Analyzing customer interactions in real-time" />

  <Step title="Accessing relevant information from your knowledge base" />

  <Step title="Interacting with back-end systems through APIs" />

  <Step title="Generating human-like responses to resolve issues" />
</Steps>

Unlike traditional bots with predefined flows, GenerativeAgent uses natural language processing to understand and respond to a wide range of customer queries and issues.

## How It Works

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/generativeagent/ga-how-it-works-detailed.png" alt="GenerativeAgent Integration Flow" />
</Frame>

GenerativeAgent seamlessly integrates with your existing customer support infrastructure, providing AI-powered assistance across voice and chat channels. Here's a simplified overview of how GenerativeAgent operates:

1. **Conversation Initiation**: When a customer starts an interaction, your system sends the conversation data to GenerativeAgent.

2. **GenerativeAgent Activation**: GenerativeAgent is initiated to handle the conversation, taking over the interaction with the customer.

3. **Information Processing**: GenerativeAgent analyzes the customer's input, considering the full context of the conversation.

4. **Task Identification and Execution**: Based on the configured tasks you've defined, GenerativeAgent:
   * Identifies relevant tasks to address the customer's needs
   * Accesses necessary information from your knowledge base
   * Interacts with your APIs to perform required actions

5. **Response Generation**: GenerativeAgent creates human-like responses to communicate with the customer, providing information or confirming actions taken.

6. **Continuous Interaction**: This process continues, with GenerativeAgent handling the back-and-forth with the customer until all issues are resolved.

7. **Escalation (if needed)**: If the customer has an issue that GenerativeAgent is not configured to handle, it will smoothly escalate the conversation to a human agent.

This flexible approach allows GenerativeAgent to handle a wide range of customer interactions efficiently, only involving human agents when necessary.

<Info>We provide a [technical flow chart](/generativeagent/integrate/) for how these steps apply to the technical integration</Info>

## Previewer Tool

To help you understand and fine-tune GenerativeAgent's performance, we provide a Previewer tool. This allows you to:

* Observe GenerativeAgent in action with simulated customer interactions
* See the logic and actions GenerativeAgent performs in real-time
* Gain insights into how GenerativeAgent makes decisions and uses your configured tasks, knowledge base, and APIs

<Callout type="info">
  The Previewer ensures that GenerativeAgent is not a black box. It allows both technical and non-technical team members to visualize and understand how GenerativeAgent handles customer interactions, helping you optimize its performance for your specific use cases.
</Callout>

By leveraging GenerativeAgent's advanced capabilities and the insights provided by the Previewer tool, you can create a powerful, transparent, and efficient AI-driven solution for your customer support needs.

## Next Steps

<Card href="/generativeagent/getting-started" title="Getting Started">
  Learn how to get started with GenerativeAgent.
</Card>


# Human in the Loop
Source: https://docs.asapp.com/generativeagent/human-in-the-loop

Learn how GenerativeAgent works with human agents to handle complex cases requiring expert guidance or approval.

Human-in-the-loop is a first-of-its kind capability that allows a human agent to guide GenerativeAgent in assisting a customer. GenerativeAgent may request human help in situations where it lacks the necessary API access, knowledge sources, or requires human approval to complete an action.

GenerativeAgent raises a ticket requesting specific help through your existing digital support tool. Available agents within your organization are part of dedicated human-in-the-loop queues where they receive and respond to tickets from GenerativeAgent, thereby resolving the customer issue.

The Human-in-the-loop Agents (HILA) within your organization wait in a queue and are directed to specific scenarios where they take on the action of helping in a customer's issue and give back the conversation to the GenerativeAgent. HILAs can also transfer the conversation to a Live Agent so they take over the task from GenerativeAgent.

## When should GenerativeAgent consult a human

The Human-in-the-loop capability can be invoked in the task instructions for the GenerativeAgent. You can specify scenarios or actions that the GenerativeAgent cannot perform automatically and require human intervention for information or confirmation. This is similar to actions a human agent cannot complete without supervisor approval.

Recommended scenarios for human assistance include:

* Insufficient permissions: When the GenerativeAgent should not act out in its own without HILA approval.
* No API to call: Whenever there is no API to call to retrieve specific customer information.
* No Knowledge Base information: Whenever the question or issue provided by the costumer has no content in the Knowledge Base source that GenerativeAgent can use.

## HILAs

The primary function of the human-in-the-loop is to support and unblock the GenerativeAgent. These supervisors handle tasks requiring approvals or a deep understanding of the issues. Tier 1 agents can address simpler queries. When accepting a ticket from the GenerativeAgent in your digital support tool, agents access an embedded Human-in-the-loop UI.

The actions HILAs are set to do include:

* Ticket assignments
* Response edits/decisions
* Unlock GenerativeAgent
* Escalation to live agents

Human-in-the-loop agents assist the GenerativeAgent without directly interacting with customers, differing from live agents.

The key benefit is that a single agent can manage multiple customer conversations simultaneously without engaging in calls or chats.

If the Human-in-the-loop agent determines that a live agent would better serve the customer, they can use the Transfer option in the UI to hand off the conversation from the GenerativeAgent to a live agent.

**When does GenerativeAgent transfer to a live agent?**

The following scenarios are recommended for transferring a conversation to a live agent:

* A human-in-the-loop instructs GenerativeAgent to do so
* There are no Human-in-the-loop agents available. This is managed automatically and does not require explicit instructions.
* The customer explicitly requests it (if configured).

## Agent UI

**Enabling human-in-the-loop capability**

Human-in-the-loop agents operate from the existing Agent Desk. To enable the Human-in-the-loop UI and task functions in GenerativeAgent, please contact your Implementation Manager.

The Human-in-the-loop agent UI is the primary application where agents can interact with the GenerativeAgent. Through this interface, they can:

* Respond to the GenerativeAgent
* Transfer conversations to live agents
* View the interaction thread history
* Access relevant customer information and summarized conversation context

This section provides an overview of important features available:

* **Transfer**: Allows the agent to transfer the conversation from the GenerativeAgent to a live agent.
* **Ticket Assignment Timer**: Tracks the time elapsed since the ticket was assigned to the agent.
* **Prompt**: Indicates the specific assistance the GenerativeAgent needs to unblock the customer. This is generated by the GenerativeAgent itself.
* **Response**: The Human-in-the-loop agent can respond to the GenerativeAgent through an open text field or structured options, depending on the configuration.
* **Send**: After selecting a response, the agent can click 'Send' to submit the response and close the ticket simultaneously.
* **Context**: Provides a summarized context of the conversation between the GenerativeAgent and the customer.
* **Transcript**: Displays the complete customer interaction thread prior to the ticket being raised.
* **Customer**: Shows the customer's details, including company and specific account information for authenticated customers.

<Frame caption="Human-in-the-loop Agent UI">
  <img width="300" src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/generativeagent/hila-ui.png" />
</Frame>

## Next Steps

After setting up Human-in-the-Loop, you are ready to speed up customer replies and solve their inquiries.

You may find one of the following sections helpful in advancing your integration:

<CardGroup>
  <Card title="Connect your APIs" href="/generativeagent/configuring/connect-apis" />

  <Card title="Safety and Troubleshooting" href="/generativeagent/configuring/safety-and-troubleshooting" />

  <Card title="Go Live" href="/generativeagent/go-live" />
</CardGroup>


# Integrate GenerativeAgent Overview
Source: https://docs.asapp.com/generativeagent/integrate



Integrating into GenerativeAgent requires you to hook GenerativeAgent into your voice or chat system. This enabled GenerativeAgent to talk to your users.

An end-to-end integration of GenerativeAgent can be represented by these key components:

* **Connecting your data sources and APIs**.
  * Feed your [knowledge base into ASAPP](/generativeagent/configuring/connecting-your-knowledge-base), and [connect your APIs](/generativeagent/configuring/connect-apis). GenerativeAgent will use them to help users and perform actions.
* **Listening and Handling GenerativeAgents**. Create a single SSE stream where events from all conversations are sent.
  * Events are how GenerativeAgent's response is sent, as well as other key status information.
* **Send your audio or text conversation data** to ASAPP and have GenerativeAgent **analyze the conversation**.

Passing the conversation data, analyzing with GenerativeAgent, then handling events functions as a loop until the conversation completes or the conversation needs to be escalated to an agent.

The below diagram shows how these components work together, and the general order in which they execute during a conversation:

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/generativeagent/integrate-overview.png" />
</Frame>

1. Create an SSE stream and handle the GenerativeAgents events sent via the stream. GenerativeAgent's reply is sent via this event stream. You need to provide the bot's response back to your user.
2. Send your audio to AutoTranscribe. Use one of our Connectors to streamline this integration. Otherwise, you can use our websocket integration to pass raw audio.
3. Pass the conversation transcript into ASAPP. This is the transcript you receive from AutoTranscribe or the direct text of a conversation if a chat channel like SMS.
4. Engage GenerativeAgent on the conversation with the /analyze call. GenerativeAgent will look into ASAPP's conversation data to account for the entire conversation context.

<Note>
  You need to [configure GenerativeAgent](/generativeagent/configuring) in order for it to connect to your Knowledge Base and APIs.
</Note>

## Connectors

We support out-of-the-box connectors to enable GenerativeAgent on contact center platforms:

<CardGroup>
  <Card title="MRCP" href="/generativeagent/integrate/unimrcp-plugin-for-asapp">We have a plugin for Uni for most On-Prem IVR contact center solutions.</Card>
  <Card title="Amazon Connect" href="/generativeagent/integrate/amazon-connect">Step-by-step guide for integrating GenerativeAgent using AWS components.</Card>
  <Card title="Genesys Audiohook" href="/generativeagent/integrate/genesys-audiohook">One-click installation and configuration through for Genesys Cloud.</Card>
</CardGroup>

<Note>
  If your contact center platform is not listed here, please reach out to inquire about support options.
</Note>

## Direct API

We also support direct integration into GenerativeAgent:

<CardGroup>
  <Card title="Audio via AutoTranscribe" href="/generativeagent/integrate/autotranscribe-websocket">Use our AutoTranscribe to transcribe your user's audio. You would be responsible for converting GenerativeAgents text back into audio.</Card>

  <Card title="Text Only" href="/generativeagent/integrate/text-only-generativeagent">Send the text of a conversation directly to GenerativeAgent. This is for Chat based systems, or if you are handling all your own transcription and Text-to-Speech.</Card>
</CardGroup>

## Examples

We have various [examples of interactions](/generativeagent/integrate/example-interactions) between a user and GenerativeAgent to show what API calls to make, and what events you would receive.

Each integration method has it's own uniqueness, but these examples should still generally apply.

## Next Steps

With a functioning GenerativeAgent integration, you are ready to call GenerativeAgent and receive analyzed replies.

You may find one of the following sections helpful in advancing your integration:

<CardGroup>
  <Card title="Handling GenerativeAgent Events" href="/generativeagent/integrate/handling-events" />

  <Card title="Text-only GenerativeAgent" href="/generativeagent/integrate/text-only-generativeagent" />

  <Card title="Go Live" href="/generativeagent/go-live" />
</CardGroup>


# Amazon Connect
Source: https://docs.asapp.com/generativeagent/integrate/amazon-connect

Integrate GenerativeAgent into Amazon Connect

The Amazon Connect integration with ASAPP's GenerativeAgent allows a caller into your Amazon Connect contact center to have a conversation with Generative Agent.

This guide demonstrates an example integration using AWS's basic building blocks and ASAPP-provided flows. It showcases how the various components work together, but you can adapt or replace any part of the integration to match your organization's requirements.

## How it works

At a high level, the Amazon Connect integration with GenerativeAgent works by handing off the conversation between your Amazon Connect flow and GenerativeAgent:

1. **Hand off the conversation** to GenerativeAgent through your Amazon Connect Flows.
2. **GenerativeAgent handles the conversation** using Lambda functions to communicate with ASAPP's APIs, and respond to the caller using AWS's Text to Speech (TTS) service.
3. **Return control back** to your Amazon Connect Flow when:
   * The conversation is successfully completed
   * The caller requests a human agent
   * An error occurs

<Accordion title="Detailed Flow">
  Here's how a GenerativeAgent call will work in detail within your Amazon Connect:

  1. Your Amazon Connect Flow receives an incoming call
  2. When the flow engages GenerativeAgent, the Flow:
     * Sets required contact attributes
     * Starts media streaming
     * Calls ASAPP's API to initiate the conversation
  3. During the conversation:
     * Live audio streams through Kinesis Video Streams
     * Lambda functions coordinate between Amazon Connect and GenerativeAgent including using AWS's Text to Speech (TTS) service to respond to the caller.
     * Redis manages the conversation state
  4. When the conversation ends, GenerativeAgent returns control to your Flow with:
     * The conversation outcome
     * Any error messages
     * Instructions for next steps (e.g., transfer to agent)

  <Frame>
    <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/generativeagent/AmazonConnectDiagram.png" />
  </Frame>

  <Note>
    You are free to choose the moment when GenerativeAgent is invoked by Amazon Connect in your Contact Flow.

    You can add GenerativeAgent to any or all of your Amazon Contact Phone Numbers.
  </Note>
</Accordion>

## Before you Begin

Before using the GenerativeAgent integration with Amazon Connect, you need to:

* [Get your API Key Id and Secret](/getting-started/developers#access-api-credentials)
  * Ensure your API key has been configured to access GenerativeAgent APIs. Reach out to your ASAPP team if you need access enabled.
* Have an existing Amazon Connect Instance
  * Have claimed phone numbers.
  * Access to an Amazon Connect admin account.
* AWS administrator account with the permissions for the following:
  * Creating/managing IAM roles/policies: create a policy permitting list/read operations on the Kinesis Video Streams associated with the Amazon Connect Flow
  * Managing Amazon Connect Instance
  * Create/manage Lambda functions
  * Create/manage CloudWatch Log Groups
  * Create/manage ElastiCache for Redis
  * Create/manage VPC
* Be familiar with AWS including Amazon Connect, IAM roles, and more:

  <Accordion title="AWS Components">
    You will set up and configure the following AWS services:

    * **Amazon Connect** - Handles call flow and audio streaming
    * **Redis ElastiCache** - Manages conversation state and actions
    * **Virtual Private Cloud (VPC)** - Provides network isolation
    * **Kinesis Video Streams** - Handles real-time audio streaming
    * **IAM Roles and Permissions** - Controls access between services
    * **Lambda Functions** - These functions will handle communication between Amazon Connect and GenerativeAgent
  </Accordion>
* Receive the Generative Agent Connect Flow and Prompts from your ASAPP team.

The components used in the example integration are **intended for testing environments**, and you can use your own components in Production when you integrate GenerativeAgent.

## Step 1: Set up your AWS Account and Amazon Connect Instance

You need to set up your AWS Account and configure AWS services that will be used for an Amazon Connect flow that engages GenerativeAgent. You will configure the flow in a future step.

### Provide a dedicated VPC

All components of the GenerativeAgent Amazon Connect integration expect to be in the same VPC.

Ensure you have a VPC with at least two subnets in different Availability Zones

<Tip>
  You can use an existing VPC or create a new one.
</Tip>

### Configure your Amazon Connect Instance

You need to connect your Amazon Connect Instance with an Amazon Kinesis Video Stream Service in your AWS account.

To configure the Amazon Connect Instance, you need to:

* Navigate to Connect -> Data storage -> Live Media Storage
* Enable Live Media Streaming under Data Storage options.
* Set a retention period at minimum of 1 hour.
* Save the **kinesis video stream instance prefix**, it will be used as part of setting up the [permissions for the IAM role](#step-3-configure-iam-roles-and-policies).

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/generativeagent/LiveMediaStreaming.png" />
</Frame>

<Note>
  The access to the Kinesis Video Streams service is [controlled by IAM policies](https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/how-iam).

  GenerativeAgent uses an IAM role in the ASAPP account to access the Kinesis Video Streams service.
</Note>

### Create security groups

Create security groups that you will use for communication between the Lambda functions and the ElastiCache Cluster:

* Security group for the ElastiCache Cluster
* Security group for the PullAction Lambda
* Security group for the PushAction Lambda

You will use these security groups when setting up the [Lambda Functions](#step-2-create-lambda-functions-to-call-generativeagent).

Once created, you will need to configure the security groups:

* **PullAction Lambda Security Group**
  * Outbound
    * Allow TCP traffic on port 6379 to the just created  ElastiCache cluster security group
  * Save the security group id, it will be used when creating the [PullAction Lambda](#pullaction).
* **PushAction Lambda Security Group**
  * Outbound
    * Allow TCP traffic on port 6379 to the just created  ElastiCache cluster security group
  * Save the security group id, it will be used when creating the [PushAction Lambda](#pushaction).
* **ElastiCache Security Group**
  * Inbound
    * Allow TCP traffic on port 6379 from the just created PullAction lambda security group
    * Allow TCP traffic on port 6379 from the just created PushAction lambda security group
  * Save the security group id, it will be used when creating the [Redis ElastiCache Cluster](#redis-ElastiCache-cluster).

### Redis ElastiCache Cluster

The Amazon Connect Flow uses ElastiCache Clusters in order to store ordered list of actions for each call.

To configure the ElastiCache Cluster:

1. Create Subnet Group
   * In ElastiCache console, create a subnet group
   * Select your VPC and choose at least two subnets across different AZs
2. Create the Redis Cluster
   * Choose Redis as the engine
   * Select cluster mode (disabled/enabled)
   * Pick node type based on performance requirements

     <Note>
       The sizing is based on the amount of state that drives the memory and quantity of operations per second.

       You should size it based on the expected number of calls that will use GenerativeAgent.

       In this guide, we use a basic sizing. However you should test the sizing in your testing environments and size the VPC accordingly before launching to Production.
     </Note>
   * Choose Multi-AZ for enhanced reliability
   * Use the security group you created for the ElastiCache Cluster.
3. Connect the ElastiCache endpoint to the ASAPP-dedicated Amazon Connect Flow
   * Use the ElastiCache endpoint for all connections
   * Implement connection pooling
4. Save the Primary endpoint, it will be used as part of setting up the [lambda functions](#step-2-create-lambda-functions-to-call-generativeagent).

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/generativeagent/RedisCluster.png" />
</Frame>

<Tip>
  This guide make suggestions on setup but the configuration is ultimately up to you.

  \[Learn more about Amazon ElastiCache for Redis here]\([https://aws.amazon.com/blogs/database/work-with-cluster-mode-on-amazon-](https://aws.amazon.com/blogs/database/work-with-cluster-mode-on-amazon-) ElastiCache-for-redis/)
</Tip>

## Step 2: Create Lambda Functions to call GenerativeAgent

The GenerativeAgent Module expects certain Lambda functions to exist to interact with GenerativeAgent.

You will need to create the following Lambda functions:

* Engage
* PushAction
* PullAction

<Tip>
  Lambda samples are delivered in `Node.js 22.x`

  For other languages like Golang or Python, contact your ASAPP Team.
</Tip>

### Engage

This lambda function sends REST API requests to ASAPP and engages GenerativeAgent into a conversation.

<Tabs>
  <Tab title="Environment">
    The sample code uses the following Environment variables:

    | Name              | Description            | Value                                          |
    | :---------------- | :--------------------- | :--------------------------------------------- |
    | ASAPP\_API\_HOST  | Base URL for ASAPP API | [https://api.asapp.com](https://api.asapp.com) |
    | ASAPP\_API\_ID    | App-Id credential      | Provided by ASAPP                              |
    | ASAP\_API\_SECRET | App-Secret credential  | Provided by ASAPP                              |
  </Tab>

  <Tab title="Runtime">
    Choose the language for the function. The lambda sample is delivered in `Node.js 22.x`
  </Tab>

  <Tab title="Code">
    Reach out to your ASAPP team for the zip file containing the sample code you can upload to your lambda function.
  </Tab>

  <Tab title="IAM Role">
    Assign `Engage` a unique IAM role as an execution role with the minimum policy allowing `logs:CreateLogStream` and `logs:PutLogEvents` for all streams under your CloudWatch Log Group.

    Allow `lambda:InvokeFunction` action in your resource base policy.

    If you use automation, list `connect.amazonaws.com` as the Principal Service in your resource policy. Also list `AWS:SourceArn` as the ARN of your Amazon Connect in the Conditions table.

    <Tip>
      Necessary permissions are added automatically if you create the Lambda functions through the AWS Console.
    </Tip>
  </Tab>

  <Tab title="VPC and Security Groups">
    `Engage` only connects to internet endpoints, so do not attach it to a VPC.
  </Tab>
</Tabs>

### PullAction

This lambda function is called by the Amazon Connect Flow and queries Redis for next actions in a specific call.

The call identifier is the `contactId` taken from the `Event.ContactData`.

<Tabs>
  <Tab title="Environment">
    | Name       | Description                    | Value                         |
    | :--------- | :----------------------------- | :---------------------------- |
    | REDIS\_URL | URL of the Redis cluster setup | `redis://[PRIMARY_REDIS_URL]` |

    <Note>
      Use the primary endpoint created in the \[Redis ElastiCache Cluster]\(#redis- ElastiCache-cluster) for the `PRIMARY_REDIS_URL`.
    </Note>
  </Tab>

  <Tab title="Runtime">
    Choose the language for the function. The lambda sample is delivered in `Node.js 22.x`
  </Tab>

  <Tab title="Code">
    Reach out to your ASAPP team for the zip file containing the sample code you can upload to your lambda function.
  </Tab>

  <Tab title="IAM Role">
    Assign `PullAction` a unique IAM role as an execution role with the minimum policy allowing `logs:CreateLogStream` and `logs:PutLogEvents` for all streams under your CloudWatch Log Group.

    For VPC access, proper permissions should be part of the execution role as described in the [AWS documentation](https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html).

    Generally using the `AWSLambdaVPCAccessExecutionRole` managed policy is enough.

    <Tip>
      Necessary permissions are added automatically if you create the Lambda functions through the AWS Console.
    </Tip>
  </Tab>

  <Tab title="VPC and Security Groups">
    Enable VPC access for the `PullAction` Lambda function and put it on the same VPC used by the [Redis ElastiCache Cluster](#redis-ElastiCache-cluster).

    You should also create a unique security group that will be locked down later.
  </Tab>
</Tabs>

### PushAction

ASAPP calls this lambda function to communicate a further action for each call GenerativeAgent is engaging.

This function also pushes next actions into Redis for `PullAction` to query at the next opportunity.

Save the ARN of the `PushAction` lambda function, it will be used when [configuring the IAM role](#step-3-configure-iam-roles-and-policies).

<Tabs>
  <Tab title="Environment">
    | Name       | Description                    | Value                         |
    | :--------- | :----------------------------- | :---------------------------- |
    | REDIS\_URL | URL of the Redis cluster setup | `redis://[PRIMARY_REDIS_URL]` |

    <Note>
      Use the primary endpoint created in the \[Redis ElastiCache Cluster]\(#redis- ElastiCache-cluster) for the `PRIMARY_REDIS_URL`.
    </Note>
  </Tab>

  <Tab title="Runtime">
    Choose the language for the function. The lambda sample is delivered in `Node.js 22.x`
  </Tab>

  <Tab title="Code">
    Reach out to your ASAPP team for the zip file containing the sample code you can upload to your lambda function.
  </Tab>

  <Tab title="IAM Role">
    Assign `PushAction` a unique IAM role as an execution role with the minimum policy allowing `logs:CreateLogStream` and `logs:PutLogEvents` for all streams under your CloudWatch Log Group.

    For VPC access, proper permissions should be part of the execution role as described in the [AWS documentation](https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html).

    Generally using the `AWSLambdaVPCAccessExecutionRole` managed policy is enough.

    <Tip>
      Necessary permissions are added automatically if you create the Lambda functions through the AWS Console.
    </Tip>
  </Tab>

  <Tab title="VPC and Security Groups">
    You must give access to `PushAction` to the dedicated Redis CLuster.

    Attach the Lambda function to the same VPC used by the ElastiCache Cluster defined in `redis-vpc-id`
  </Tab>
</Tabs>

## Step 3: Configure IAM Roles and Policies

As part of this integration, ASAPP services will reach out to your AWS account to invoke the lambda functions and access the Kinesis Video Streams.

ASAPP will need to assume a role in your AWS account to access these services.

We will provide you with the ARN of ASAPP's GenerativeAgent role. You need to create an IAM role for ASAPP to assume and specify the ARN of the IAM role in the trust policy.

To configure the IAM role and policies:

1. Create an IAM role with a custom trust policy:

   ```json
   {
       "Version": "2012-10-17",
       "Statement": [
           {
               "Sid": "TrustASAPPRole",
               "Effect": "Allow",
               "Principal": {
                   "AWS": "asapp-assuming-role-arn"
               },
               "Action": "sts:AssumeRole"
           }
       ]
   }

   ```

   <Note>
     Replace the `asapp-assuming-role-arn` placeholder with the value provided by ASAPP.

     If there are multiple ARNs to trust, create multiple statements with unique Sid values and ASAPP provided ARN values in each statement.
   </Note>

   Don't immediately add permissions, instead you will add them after creation.
2. Add Kinesis Video Stream access to the IAM role by attaching the following permissions policy:

   <Note>
     Replace the `customer-account-id` with your AWS Account number and `kinesis-video-streams-prefix` with the value saved in the [Configure your Amazon Connect Instance](#configure-your-amazon-connect-instance) step.
   </Note>

   ```json
   {
       "Version": "2012-10-17",
       "Statement": [
           {
               "Sid": "ReadAmazonConnectStreams",
               "Effect": "Allow",
               "Action": [
                   "kinesisvideo:GetDataEndpoint",
                   "kinesisvideo:GetMedia",
                   "kinesisvideo:DescribeStream"
               ],
               "Resource": "arn:aws:kinesisvideo:*:customer-account-id:stream/kinesis-video-streams-prefix*/*"
           },
           {
               "Sid": "ListAllStreams",
               "Effect": "Allow",
               "Action": "kinesisvideo:ListStreams",
               "Resource": "*"
           }
       ]
   }
   ```
3. Add Lambda Function access by attaching the following permissions policy to the IAM role.
   This will allow the ASAPP service to invoke lambda functions:

   ```json
   {
       "Version": "2012-10-17",
       "Statement": [
           {
               "Sid": "Stmt1",
               "Effect": "Allow",
               "Action": [
                   "lambda:InvokeFunction"
               ],
               "Resource": [
                   "lambda-pushaction-arn"
               ]
           }
       ]
   }
   ```

   <Note>
     Replace the `lambda-pushaction-arn` placeholder with the ARN of the [`PushAction` lambda function](#pushaction).
   </Note>
4. Share the IAM role ARN with ASAPP

   ASAPP will use the ARN to interact with the `PushAction` lambda and Kinesis Video Streams.

## Step 4: Add the GenerativeAgent Modules and Prompts

With the relevant components in place, you need to create or update a flow to use a GenerativeAgent Module to engage GenerativeAgent.

### Upload the Prompts

The GenerativeAgent Modules uses specific prompts during the conversation. ASAPP will provide you with a set of `.wav` files to be added as prompts in your Amazon Connect Instance.

Prompt modules must be named exactly as the .wav files are named so that the GenerativeAgent Module works correctly.

### Create GenerativeAgent Module

The GenerativeAgent Module will handle the conversation between the customer and GenerativeAgent.

You need to create the GenerativeAgent Module in your Amazon Connect Instance:

1. Receive the GenerativeAgent module json from ASAPP.
2. Edit the json to put in the correct ARNs.

   The Module will need to be updated with the correct ARNs to properly invoke the `Engage` and `PushAction` lambda functions.

   * Update the ARN that references the `Engage` lambda function to point to the `Engage` lambda function you created in [Step 2](#engage).
   * Update the ARN that references the `PushAction` lambda function to point to the `PushAction` lambda function you created in [Step 2](#pushaction).
3. Create a GenerativeAgent module.
   1. Within your Amazon Connect Instance, navigate to Routing > Flow > Modules.
   2. In the `Modules` section, click "Create flow module".
   3. Expand the "Save" dropdown and select "Import".
   4. Upload the edited JSON file and click "Import".

### Invoke the GenerativeAgent Module

To hand off a conversation to GenerativeAgent, you need to invoke the GenerativeAgent Module.

Most companies have many flows with nuanced logic and it is entirely up to you on when you engage the GenerativeAgent Module.

Once you have determined where within your flows you want to hand off a conversation to GenerativeAgent, you need to:

1. **Set GenerativeAgent Parameter**

   Create a "Set contact attributes" block and specify the `ASAPP_CompanyMarker`. This `ASAPP_CompanyMarker` is your company marker and must be passed to GenerativeAgent Module.
2. **Invoke GenerativeAgent Module**

   Create an "Invoke module" block and select the GenerativeAgent Module. This is where the conversation is handed off to GenerativeAgent.

   <Frame>
     <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/generativeagent/InvokeModule.png" />
   </Frame>

   Within the GenerativeAgent module, the flow will use the various components you created in previous steps to engage ASAPP's GenerativeAgent to the end user.

   Once the conversation is complete, GenerativeAgent will exit the module and return control to your flow.
3. **Handle the result**

   The GenerativeAgent module will exit for one of three reasons, and will be output the `ASAPP_Disposition` contact attribute with one of the following values:

   * `transferToAgent`: when the conversation needs to be transferred to an agent
   * `disengage`: when the conversation is completed
   * `error`: when an error has occurred

## Step 5: Engage GenerativeAgent

Now you are ready to make a call and engage GenerativeAgent.

Call the phone number configured in your Contact Flow and follow the prompts until you reach the point where GenerativeAgent is engaged. You should see the conversation transition to GenerativeAgent based on where you placed the GenerativeAgent Module in your flow.

Verify that:

1. You are handed off to GenerativeAgent
2. GenerativeAgent responds appropriately to your inputs
3. You are returned to your flow when the conversation ends

<Note>
  This integration is a good starting point for your integration with GenerativeAgent. You need to further configure the integration to meet your organization's requirements.
</Note>

## Next Steps

Now that you have integrated GenerativeAgent with Amazon Connect, here are some important next steps to consider:

<CardGroup>
  <Card title="Configuration Overview" href="/generativeagent/configuring">
    Learn how to configure GenerativeAgent's behaviors, tasks, and communication style
  </Card>

  <Card title="Connect your APIs" href="/generativeagent/configuring/connect-apis">
    Configure your APIs to allow GenerativeAgent to access necessary data and perform actions
  </Card>

  <Card title="Review Knowledge Base" href="/generativeagent/configuring/connecting-your-knowledge-base">
    Connect and optimize your knowledge base to improve GenerativeAgent's responses
  </Card>

  <Card title="Go Live" href="/generativeagent/go-live">
    Follow the deployment checklist to launch GenerativeAgent in your production environment
  </Card>
</CardGroup>


# AutoTranscribe Websocket
Source: https://docs.asapp.com/generativeagent/integrate/autotranscribe-websocket

Integrate AutoTranscribe for real-time speech-to-text transcription

Your organization can use AutoTranscribe to transcribe voice interactions between contact center agents and their customers, supporting various use cases including analysis, coaching, and quality management.

ASAPP AutoTranscribe is a streaming speech-to-text transcription service that works with both live streams and audio recordings of completed calls. Integrating your voice system with GenerativeAgent using the AutoTranscribe Websocket enables real-time communication, allowing for seamless interaction between your voice platform and GenerativeAgent's services.

AutoTranscribe is powered by a speech recognition model that transforms spoken form to written forms in real-time, including punctuation and capitalization. The model can be customized to support domain-specific needs by training on historical call audio and adding custom vocabulary to further boost recognition accuracy.

## How it works

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/generativeagent/at-websocket-howitworks.png" alt="AT-GA integration diagram" />
</Frame>

1. Create SSE Stream: The Event Handler (which may exist on the IVR or be a dedicated service) creates a Server-Sent Events (SSE) stream with GenerativeAgent.

2. Audio Stream: The IVR sends the audio stream from the end user to AutoTranscribe.

3. Create Conversation: The IVR creates a conversation and adds messages to the Conversation Data.

4. Request Analysis: The IVR requests GenerativeAgent to analyze the conversation.

The Event Handler then handles events sent via SSE, including GenerativeAgent's reply, which is sent back to the user through the IVR.

## Benefits of using Websocket to Stream events

* Persistent connection between your voice system and the GenerativeAgent server
* API streaming for audio, call signaling, and returned transcripts
* Real-time data exchange for quick responses and efficient handling of user queries
* Bi-directional communication for smooth and responsive interaction

## Before you Begin

Before you start integrating to GenerativeAgent, you need to:

* [Get your API Key Id and Secret](/getting-started/developers)
* Ensure your API key has been configured to access AutoTranscribe and GenerativeAgent APIs. Reach out to your ASAPP team if you unsure.
* [Configure Tasks and Functions](/generativeagent/configuring "Configuring GenerativeAgent").

## Implementation Steps

1. Create AutoTranscribe Streaming URL
2. Listen and Handle GenerativeAgent Events
3. Open a Connection
4. Start an Audio Stream
5. Send the Audio Stream
6. Analyze the conversation with GenerativeAgent
7. Stop the Audio Stream

## Step 1: Create AutoTranscribe Streaming URL

First, you need to [create a streaming URL](/apis/autotranscribe/get-streaming-url) that will be the WebSocket connection to AutoTranscribe.

```bash
curl -X GET 'https://api.sandbox.asapp.com/autotranscribe/v1/streaming-url' \
--header 'asapp-api-id: <API KEY ID>' \
--header 'asapp-api-secret: <API TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
    "externalId": "<unique conversation id>"
}'
```

A successful response returns a 200 and a secure WebSocket short-lived access URL (TTL: 5 minutes):

```json
{
    "streamingUrl": "<short-lived access URL>"
}
```

## Step 2: Listen and Handle GenerativeAgent Events

GenerativeAgent sends events for all conversations through a single [Server-Sent-Event](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events) (SSE) stream. [Listen and handle these events](/generativeagent/integrate/handling-events) to enable GenerativeAgent interaction with your users.

## Step 3: Open a Connection

Create the WebSocket connection using the access URL:

`wss://<internal-voice-gateway-ingress>?token=<short_lived_access_token>`

## Step 4: Start a stream audio message

Start streaming audio into the AutoTranscribe Websocket using this message sequence:

| Your Stream Request     | ASAPP Response          |
| :---------------------- | :---------------------- |
| `startStream` message   | `startResponse` message |
| Stream audio - audio-in | `transcript` message    |
| `finishStream` message  | `finalResponse` message |

<Note>
  Format WebSocket protocol request messages as text (UTF-8 encoded string data); only the audio stream should be in binary format. All response messages will be formatted as text.
</Note>

Send a `startStream` message:

```json
{
   "message":"startStream",
   "sender": {
          "role": "customer",
          "externalId": "JD232442"
   }
}
```

You'll receive a `startResponse`:

```json
{
   "message": "startResponse",
   "streamID": "128342213",
   "status": {
          "code": "1000",
          "description": "OK"
   }
}
```

## Step 5: Send the audio stream

Stream audio as binary data:

`ws.send(<binary_blob>)`

You'll receive `transcript` messages:

```json
{
   "message": "transcript",
   "start": 0,
   "end": 1000,
   "utterance":
   [
      {"text": "Hi, my ID is 123."}
   ]
}
```

## Step 6: Analyze conversations with GenerativeAgent

Call the [`/analyze`](/apis/generativeagent/analyze-conversation) endpoint to evaluate the conversation:

```bash
curl -X POST 'https://api.sandbox.asapp.com/generativeagent/v1/analyze' \
--header 'asapp-api-id: <API KEY ID>' \
--header 'asapp-api-secret: <API TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
    "conversationId": "01HNE48VMKNZ0B0SG3CEFV24WM"
}'
```

You can also include a message when calling analyze:

```bash
curl -X POST 'https://api.sandbox.asapp.com/generativeagent/v1/analyze' \
--header 'asapp-api-id: <API KEY ID>' \
--header 'asapp-api-secret: <API TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
    "conversationId": "01HNE48VMKNZ0B0SG3CEFV24WM",
    "message": {
        "text": "hello, can I see my bill?",
        "sender": {
            "externalId": "321",
            "role": "customer"
        },
        "timestamp": "2024-01-23T11:50:50Z"
    }
}'
```

As the conversation goes, it is possible to give GenerativeAgent more context of the conversation by using the`taskName` and `inputVariables` attributes.

You can also simulate Tasks and Input Variables in the [Previewer](/generativeagent/configuring/previewer#input-variables)

```bash
curl --request POST \
  --url https://api.sandbox.asapp.com/generativeagent/v1/analyze \
  --header 'Content-Type: application/json' \
  --header 'asapp-api-id: <api-key>' \
  --header 'asapp-api-secret: <api-key>' \
  --data '{
  "conversationId": "01BX5ZZKBKACTAV9WEVGEMMVS0",
  "message": {
    "text": "Hello, I would like to upgrade my internet plan to GOLD.",
    "sender": {
      "role": "agent",
      "externalId": 123
    },
    "timestamp": "2021-11-23T12:13:14.555Z"
  },
  "taskName": "UpgradePlan",
  "inputVariables": {
    "context": "Customer called to upgrade their current plan to GOLD",
    "customer_info": {
      "current_plan": "SILVER",
      "customer_since": "2020-01-01"
    }
  }
}'
```

## Step 7: Stop the streaming audio message

Send a `finishStream` message:

```json
{
   "message": "finishStream"
}
```

You'll receive a `finalResponse`:

```json
{
   "message": "finalResponse",
   "streamId": "128342213",
   "status": {
       "code": "1000",
       "description": "OK"
   },
   "summary": {
       "totalAudioBytes": 300,
       "audioDurationMs": 6000,
       "streamingSeconds": 6,
       "transcripts": 10
   }
}
```

## Next Steps

With your system integrated into GenerativeAgent, you're ready to use it. You may find these other pages helpful:

<CardGroup>
  <Card title="Configuring GenerativeAgent" href="/generativeagent/configuring" />

  <Card title="Safety and Troubleshooting" href="/generativeagent/configuring/safety-and-troubleshooting" />

  <Card title="Going Live" href="/generativeagent/go-live" />
</CardGroup>


# Example Interactions
Source: https://docs.asapp.com/generativeagent/integrate/example-interactions



While each type of integration may have some subtle differences on how replies are handled and sent to back to end users. They all still follow the same basic interaction pattern. These examples show some example scenarios, the API calls you would make, and the events you would receive.

* **[Simple Interaction](#simple-interaction "Simple interaction")**
* **[Conversation with an action that requires confirmation](#conversation-with-an-action-that-requires-confirmation "Conversation with an action that requires confirmation")**
* **[Conversation with authentication](#conversation-with-authentication "Conversation with authentication")**
* **[Conversation with transfer to an agent](#conversation-with-transfer-to-an-agent "Conversation with transfer to an agent")**

## Simple interaction

The example below shows a simple interaction with the GenerativeAgent. We first use the Conversation API to create a conversation, and then call the GenerativeAgent API to analyze a message from the customer.

**Request**
`POST /conversation/v1/conversations`

```json
{
 "externalId": "33411121",
 "agent": {
   "externalId": "671",
   "name": "agentname"
 },
 "customer": {
   "externalId": "11462",
   "name": "customername"
 },
 "metadata": {
   "queue": "some-queue"
 },
 "timestamp": "2024-01-23T13:41:20Z"
}
```

**Response**

Status 200: Successfully created the conversation.

```json
{
    "id": "01HMVXRVSA1EGC0CHQTF1X2RN3"
}
```

Now that we have a Conversation ID, we can use it to analyze a new message from our user, like the following:

**Request**

`POST /generativeagent/v1/analyze`

```json
{   
    "conversationId": "01HMVXRVSA1EGC0CHQTF1X2RN3",
    "message": {
        "text": "How can I pay my bill?",
        "sender": {
            "externalId": "11462",
            "role": "customer"
        },
        "timestamp": "2024-01-23T13:43:04Z"
    }
}
```

**Response**

Status 200: Successfully sent the analyze request and created the new message.

```json
{
    "conversationId": "01HMVXRVSA1EGC0CHQTF1X2RN3",
    "messageId": "01HMVXSWK8J9RR0PNGNN7Z4FVM"
}
```

**GenerativeAgent Events**

As a result of the analyze request, the following sequence of events will be sent to via the SSE stream:

```json
{
  generativeAgentMessageId: '116aaf51-8180-47b7-9205-9f61c8799c52',
  externalConversationId: '33411121',
  conversationId: '01HMVXRVSA1EGC0CHQTF1X2RN3',
  type: 'processingStart'
}
{
  generativeAgentMessageId: '5c020ad9-4a25-4746-a345-017bb9711dbe',
  externalConversationId: '33411121',
  conversationId: '01HMVXRVSA1EGC0CHQTF1X2RN3',
  type: 'reply',
  reply: {
    messageId: '01HMVXSZANHNGJ49R83HENDAJB',
    text: "I'm happy to help you! One moment please."
  }
}
{
  generativeAgentMessageId: 'd566fda8-3b7c-42a2-ae39-d08b66397238',
  externalConversationId: '33411121',
  conversationId: '01HMVXRVSA1EGC0CHQTF1X2RN3',
  type: 'reply',
  reply: {
    messageId: '01HMVXTDR1AT9CNQXPYKKBPJ7F',
    text: 'You can pay your bill by calling (XXX) XXX-6094, using the Mobile App, or with a customer service agent over the phone (with a $5 fee).'
  }
}
{
  generativeAgentMessageId: 'bba4320f-de53-4874-83b4-6c8704d3620c',
  externalConversationId: '33411121',
  conversationId: '01HMVXRVSA1EGC0CHQTF1X2RN3',
  type: 'processingEnd'
}
```

## Conversation with an action that requires confirmation

In this use case, we go through a scenario that requires confirmation before the GenerativeAgent can execute a task on the user's behalf. Besides showing the payload of the GenerativeAgent Events that are sent from the GenerativeAgent, we also check the conversation state.

We assume there is an existing conversation with ID 01HMSHT9KKHHBRMRKJTFZYRCKZ.

**Request**

`POST /generativeagent/v1/analyze`

```json
{   
    "conversationId": "01HMSHT9KKHHBRMRKJTFZYRCKZ",
    "message": {
        "text": "hello, how can I reset my router?",
        "sender": {
            "externalId": "11462",
            "role": "customer"
        },
        "timestamp": "2024-01-21T15:08:50Z"
    }
}
```

**Response**

Status 200: Successfully sent the analyze request and created the new message.

```json
{
    "conversationId": "01HMSHT9KKHHBRMRKJTFZYRCKZ",
    "messageId": "01HMSHVZGHAXDZMS722JS1JJJK"
}
```

**GenerativeAgent events**

As a result of the analyze request, the following sequence of events will be sent via the SSE stream:

```json
{
  generativeAgentMessageId: '33843eb0-10f6-4531-a645-ed9481833301',
  externalConversationId: '33411121',
  conversationId: '01HMSHT9KKHHBRMRKJTFZYRCKZ',
  type: 'processingStart'
}
{
  generativeAgentkMessageId: '0ed65d99-215d-48b4-be28-fee936f4757e',
  externalConversationId: '33411121',
  conversationId: '01HMSHT9KKHHBRMRKJTFZYRCKZ',
  type: 'reply',
  reply: {
    messageId: '01HMSQ946T9E3RCXHPNH1B65ZE',
    text: "I'm happy to help you! One moment please."
  }
}
{
  generativeAgentMessageId: '1121411d-e68e-45d3-bf9e-f2a3db73e7ca',
  externalConversationId: '33411121',
  conversationId: '01HMSHT9KKHHBRMRKJTFZYRCKZ',
  type: 'reply',
  reply: {
    messageId: '01HMSQ96TWXB5DT4T259FP76RX',
    text: "Please say 'CONFIRM' to confirm the router reset. This action cannot be undone."
  }
}
{
  generativeAgentMessageId: '3c4b0f55-c702-453c-9a76-db591f685213',
  externalConversationId: '33411121',
  conversationId: '01HMSHT9KKHHBRMRKJTFZYRCKZ',
  type: 'processingEnd'
}
```

From the events above, we can see the GenerativeAgent requires user confirmation before it can proceed.

This can be done through another customer message (analyze API call). Optionally, we can check the current conversation state by calling the GET /state API, before the confirmation is sent:

**Request**

`GET /generativeagent/v1/state?conversationId=01HMSHT9KKHHBRMRKJTFZYRCKZ`

**Response**

Status 200. We see the GenerativeAgent is waiting for confirmation for this conversation.

```json
{
    "state": "waitingForConfirmation",
    "lastGenerativeAgentMessageId": "3c4b0f55-c702-453c-9a76-db591f685213"
}
```

Now, the user sends the confirmation message:

**Request**

`POST /generativeagent/v1/analyze`

```json
{   
    "conversationId": "01HMSHT9KKHHBRMRKJTFZYRCKZ",
    "message": {
        "text": "CONFIRM",
        "sender": {
            "externalId": "11462",
            "role": "customer"
        },
        "timestamp": "2024-01-21T15:09:10Z"
    }
}
```

**Response**

Status 200: Successfully sent the analyze request and created the new message.

```json
{
    "conversationId": "01HMSHT9KKHHBRMRKJTFZYRCKZ",
    "messageId": "01HMVJTR2CPABZ46DM0QK1NS3T"
}
```

The analyze request triggers the following events:

```json
{
  generativeAgentMessageId: 'bae280e8-26c7-4333-ae8f-018e5f7140e9',
  externalConversationId: '33411121',
  conversationId: '01HMSHT9KKHHBRMRKJTFZYRCKZ',
  type: 'processingStart'
}
{
  generativeAgentMessageId: '7bcbab42-e64f-4e1b-9ec8-5db343d471e3',
  externalConversationId: '33411121',
  conversationId: '01HMSHT9KKHHBRMRKJTFZYRCKZ',
  type: 'reply',
  reply: {
    messageId: '01HMSQ946T9E3RCXHPNH1B65ZE',
    text: "Please wait while your router is being reset..."
  }
}
{
  generativeAgentMessageId: 'd0e3cb51-79e4-4b90-8c05-3f345090fbdf',
  externalConversationId: '33411121',
  conversationId: '01HMSHT9KKHHBRMRKJTFZYRCKZ',
  type: 'reply',
  reply: {
    messageId: '01HMSQ96TWXB5DT4T259FP76RX',
    text: "Router successfully reset."
  }
}
{
  generativeAgentMessageId: '6af4172c-7bb7-4fa7-a338-b73a35be5d1c',
  externalConversationId: '33411121',
  conversationId: '01HMSHT9KKHHBRMRKJTFZYRCKZ',
  type: 'reply',
  reply: {
    messageId: '01HMSQ96TWXB5DT4T259FP76RX',
    text: "If you have any other questions or need further assistance, please don't hesitate to ask."
  }
}
{
  generativeAgentMessageId: '008a21a0-af04-4ece-8f58-b7a0c82a1115',
  externalConversationId: '33411121',
  conversationId: '01HMSHT9KKHHBRMRKJTFZYRCKZ',
  type: 'processingEnd'
}
```

Finally, we can optionally check the state again. We see it changed back into "ready".

**Request**

`GET /generativeagent/v1/state?conversationId=01HMSHT9KKHHBRMRKJTFZYRCKZ`

**Response**

```json
{
    "state": "ready",
    "lastGenerativeAgentMessageId": "008a21a0-af04-4ece-8f58-b7a0c82a1115"
}
```

## Conversation with authentication

In this scenario, the user tries to take an action that requires authentication first. GenerativeAgent will then ask for authentication via the GenerativeAgent event, which we can also confirm via the State API call. We'll authenticate and see the GenerativeAgent resuming the task.

We assume there is an existing conversation with ID *01HMW15N6V27Y4V2HRCE0CBZJQ*. Please see the first use case to understand how to create a new conversation.

**Request**

`POST /generativeagent/v1/analyze`

```json
{   
    "conversationId": "01HMW15N6V27Y4V2HRCE0CBZJQ",
    "message": {
        "text": "How much do I owe for my mobile?",
        "sender": {
            "externalId": "11462",
            "role": "customer"
        },
        "timestamp": "2024-01-23T15:49:37Z"
    }
}
```

**Response**

Status 200: Successfully sent the analyze request and created the new message.

```json
{
    "conversationId": "01HMW15N6V27Y4V2HRCE0CBZJQ",
    "messageId": "01HMSHT9KKHHBRMRKJTFZYRCKZ"
}
```

**GenerativeAgent events**

As a result of the analyze request, the following sequence of messages will be sent via the SSE stream:

```json
{
  generativeAgentMessageId: '309181fd-be58-46fa-91b3-ea49f5f4b3d9',
  externalConversationId: '33411121',
  conversationId: '01HMW15N6V27Y4V2HRCE0CBZJQ',
  type: 'processingStart'
}
{
  generativeAgentMessageId: '3122535a-3d0b-4bb5-a0ff-6c26616d2325',
  externalConversationId: '33411121',
  conversationId: '01HMW15N6V27Y4V2HRCE0CBZJQ',
  type: 'reply',
  reply: {
    messageId: '01HMW172YTTESK1EG6A9Y8QRFZ',
    text: "I'm happy to help you! One moment please."
  }
}
{
  generativeAgentMessageId: '49771949-c26e-49ab-86aa-5259d1a249ab',
  externalConversationId: '33411121',
  conversationId: '01HMW15N6V27Y4V2HRCE0CBZJQ',
  type: 'authenticationRequested'
}
{
  generativeAgentMessageId: 'd2d43ac5-e160-40fd-9c5b-773c8f7417e0',
  externalConversationId: '33411121',
  conversationId: '01HMW15N6V27Y4V2HRCE0CBZJQ',
  type: 'processingEnd'
}
```

We can see the second-to-last message is of type authenticationRequested. This tells us that the GenerativeAgent needs authentication in order to continue.

Additionally, we can check the conversation state, which is waitingForAuth:

**Request**

`GET /generativeagent/v1/state?conversationId=01HMW15N6V27Y4V2HRCE0CBZJQ`

**Response**

Status 200. We see the GenerativeAgent is waiting for confirmation for this conversation.

```json
{
  "state": "waitingForAuth",
  "lastGenerativeAgentMessageId": "d2d43ac5-e160-40fd-9c5b-773c8f7417e0"
}
```

Now let's call the authentication endpoint. Note that the specific format and content of the user credentials must be agreed upon between your organization and your ASAPP account team.

**Request**

`POST /conversation/v1/conversations/01HMW15N6V27Y4V2HRCE0CBZJQ/authenticate`

```json
{
    "customerExternalId": "33411121",
    "auth": {
        {{authentication payload}}
    }
}
```

**Response**

Status 204: Successfully sent the authenticate request no response body is expected.

**GenerativeAgent Events**

After a successful authenticate request, the GenerativeAgent will resume if it was waiting for auth. In this case, the following sequence of messages is sent via the SSE Stream:

```json
{
  generativeAgentMessageId: '07df33e7-8603-4393-8ea2-ac29e35197c9',
  externalConversationId: '33411121',
  conversationId: '01HMW15N6V27Y4V2HRCE0CBZJQ',
  type: 'processingStart'
}
{
  generativeAgentMessageId: 'adfe3156-18fe-457b-b726-90c489478c80',
  externalConversationId: '33411121',
  conversationId: '01HMW15N6V27Y4V2HRCE0CBZJQ',
  type: 'reply',
  reply: {
    messageId: '01HMY19BT31Z4AR05S0M5237EK',
    text: "Your current balance for your mobile account is $415.38, with no overdue amount and a past due amount of $10."
  }
}
{
  generativeAgentMessageId: '3325ea14-5b73-4c7a-9511-a6faebc5c98c',
  externalConversationId: '33411121',
  conversationId: '01HMW15N6V27Y4V2HRCE0CBZJQ',
  type: 'reply',
  reply: {
    messageId: '01HMY19CCJ9E8ENS34WNTQ29E2',
    text: 'There are 26 days remaining in your billing cycle.'
  }
}
{
  generativeAgentMessageId: '3325ea14-5b73-4c7a-9511-a6faebc5c98c',
  externalConversationId: '33411121',
  conversationId: '01HMW15N6V27Y4V2HRCE0CBZJQ',
  type: 'reply',
  reply: {
    messageId: '01HMY15DGHYHVHZ5GYAXR1TDWS',
    text: 'For more information on your mobile billing, you can visit https://website.com'
  }
}
{
  generativeAgentMessageId: 'd8785903-a680-4db5-a95f-ba9ed64a7aaa',
  externalConversationId: '33411121',
  conversationId: '01HMW15N6V27Y4V2HRCE0CBZJQ',
  type: 'processingEnd'
}
```

## Conversation with transfer to an agent

This example showcases the bot transferring the conversation to an agent (a.k.a. agent escalation). 

We assume there is an existing conversation with ID *01HMY50MM3D5JP23NPWXKPQVD4*. Please see the first use case to understand how to create a new conversation.

**Request**

`POST /generativeagent/v1/analyze`

```json
{   
    "conversationId": "01HMY50MM3D5JP23NPWXKPQVD4",
    "message": {
        "text": "Can I talk to a real human?",
        "sender": {
            "externalId": "11462",
            "role": "customer"
        },
        "timestamp": "2024-01-24T11:35:23Z"
    }
}
```

**Response**

Status 200: Successfully sent the analyze request and created the new message.

```json
{
    "conversationId": "01HMY50MM3D5JP23NPWXKPQVD4",
    "messageId": "01HMY5FRHW3B76JSS3BVP1VJJX"
}
```

**GenerativeAgent Events**
As a result of the analyze request, the following sequence of messages will be sent via the SSE Stream:

```json
{
  generativeAgentMessageId: '233e206d-a444-4736-9a66-1fde75e46df7',
  externalConversationId: '33411121',
  conversationId: '01HMY50MM3D5JP23NPWXKPQVD4',
  type: 'processingStart'
}
{
  generativeAgentMessageId: '2925b18f-4140-4312-b071-b56feac86d5a',
  externalConversationId: '33411121',
  conversationId: '01HMY50MM3D5JP23NPWXKPQVD4',
  type: 'reply',
  reply: {
    messageId: '01HMY5FWAMR5DF3DABGNB5118D',
    text: 'Sure, connecting you with an agent.'
  }
}
{
  generativeAgentMessageId: '42ec4212-02aa-4ac6-94e2-4c8fee24352f',
  externalConversationId: '33411121',
  conversationId: '01HMY50MM3D5JP23NPWXKPQVD4',
  type: 'transferToAgent'
}
{
  generativeAgentMessageId: '0deb0eb0-dc75-48e5-80ed-805f14d95e0c',
  externalConversationId: '33411121',
  conversationId: '01HMY50MM3D5JP23NPWXKPQVD4',
  type: 'processingEnd'
}
```

The second-to-last message is of type transferToAgent. We can also optionally verify the conversation state by calling the state API:

**Request**

`GET /generativeagent/v1/state?conversationId=01HMY50MM3D5JP23NPWXKPQVD4`

**Response**

Status 200. We see the GenerativeAgent is waiting for confirmation for this conversation.

```json
{
  "state": "transferredToAgent",
  "lastGenerativeAgentMessageId": "0deb0eb0-dc75-48e5-80ed-805f14d95e0c"
}
```


# Genesys AudioConnector for GenerativeAgent
Source: https://docs.asapp.com/generativeagent/integrate/genesys-audiohook

Learn how to integrate GenerativeAgent into Genesys Cloud using our Genesys AudioConnector integration.

The Genesys AudioConnector integration with ASAPP's GenerativeAgent allows callers in your Genesys Cloud CX contact center to have conversations with GenerativeAgent while maintaining the call entirely within your Genesys environment.

This guide demonstrates how to integrate GenerativeAgent using Genesys AudioConnector and ASAPP-provided components. It showcases how the various components work together, but you can adapt or replace any part of the integration to match your organization's requirements.

## How it works

At a high level, the Genesys AudioConnector integration with GenerativeAgent works by streaming audio and managing conversations through your Genesys Architect flows:

1. **Stream the audio** to GenerativeAgent through Genesys AudioConnector.
2. **GenerativeAgent handles the conversation** using the audio stream and responds to the caller.
   <Note>
     Since calls remain within your Genesys infrastructure throughout the interaction, you maintain full control over call handling, including error scenarios and transfers.
   </Note>
3. **Return control back** to your Genesys flow when:
   * The conversation is successfully completed
   * The caller requests a human agent
   * An error occurs

## Before you Begin

Before using the GenerativeAgent integration with Genesys Cloud CX, you need:

* [Get your API Key and Secret](/getting-started/developers#access-api-credentials)
  * Ensure your API key has been configured to access GenerativeAgent APIs. Reach out to your ASAPP team if you need access enabled.
* Have your dedicated **Base Connection URI** from ASAPP.
  * This is a URI you will use when configuring the Genesys Audiohook Monitor, provided by your ASAPP account team.
* Have an existing Genesys Cloud CX Instance
* Genesys Cloud CX administrator account with permissions for:
  * Managing integrations
  * Configuring Architect flows
  * Setting up Audiohook Monitor
  * Managing audio streaming settings

## Step 1: Configure Genesys Cloud CX Integration

First, you need to install and configure the ASAPP GenerativeAgent integration in your Genesys Cloud CX environment.

<Note>
  You will need to install a separate Audio Connector Integration for each ASAPP environment (Sandbox and Production).
</Note>

<Steps>
  <Step title="Navigate to Integrations">
    From Admin Home, navigate to Integrations > Integrations. This is a list of third-party integrations you have available to install.
  </Step>

  <Step title="Search for AudioConnector">
    Use the search functionality to find the ASAPP Generative Agent integration, called "AudioConnector".
  </Step>

  <Step title="Click Install and complete the install wizard">
    Once completing the install, you are taken to the Integration Details page.

    <Frame>
      <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/generativeagent/integrate/genesys-integrations.png" alt="Genesys Integration Details" />
    </Frame>
  </Step>

  <Step title="Name the Integration">
    You will have two sets of credentials, one for accessing the Production ASAPP environment and one for the Sandbox ASAPP environment. You will need to install a separate Audio Connector Integration for each.

    We highly recommend you include the appropriate environment when naming the connector, e.g. "ASAPP GenerativeAgent (Production)" or "ASAPP GenerativeAgent (Sandbox)"
  </Step>

  <Step title="Configure the Integration">
    1. Navigate to the Configuration tab > Properties and paste the **Base Connection URI**.
    2. Navigate to Credentials sub-tab and click "Configure".
       * Enter the **API Key** and **API Secret** for the appropriate environment and click "Ok".
  </Step>

  <Step title="Save the configuration">
    Ensure the integration is set to "Active".
  </Step>
</Steps>

## Step 2: Set Up Architect Flow

With the Audio Connector configured, you need to incorporate GenerativeAgent into your call flows. This is done by adding the GenerativeAgent Audio Connector to your Architect flows at the points where you want GenerativeAgent to handle the conversation.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/generativeagent/integrate/genesys-flow.png" alt="Genesys Audiohook Flow" />
</Frame>

<Steps>
  <Step title="Create or modify an Architect flow">
    Open or create the Architect flow where you want to use GenerativeAgent.
  </Step>

  <Step title="Identify insertion point">
    Determine where in the flow you want to add the GenerativeAgent Audio Connector.
  </Step>

  <Step title="Add the GenerativeAgent Audio Connector">
    * In the Toolbox, expand "Bot" and drag the Audio Connector module to the flow.

    <Note>
      The connector should be placed at the point where you want to hand off the conversation to GenerativeAgent.
    </Note>

    * Name the connector.
    * Specify a Connector ID.
      * This is not required, but we recommend versioning the connector ID for future version control.
    * Optionally, configure input session variables:
      * `customerId`: Passed directly as the customer ID in ASAPP's system
      * `taskName`: Used to [enter a specific task](/generativeagent/configuring/tasks-and-functions/enter-specific-task)
      * All other variables are passed as [Input Variables](/generativeagent/configuring/tasks-and-functions/input-variables)
  </Step>

  <Step title="Configure the Success and Failure results">
    When the GenerativeAgent Audio Connector is finished, it will return a result of either "Success" or "Failure".

    * **Success**: Indicates GenerativeAgent is transferring control back to your system or the caller has requested a human agent.
      * The block will return an output variable of `ASAPP_Disposition` with a value of:
        * `agent`: Indicates the caller requested a human agent.
        * `system`: Indicates GenerativeAgent has completed its task.
      * The block will also return output variables as defined in your tasks and functions as part of the [system transfer](/generativeagent/configuring/tasks-and-functions/system-transfer).
      * Configure your flow to route the conversation to the appropriate queue within Genesys Cloud.
    * **Failure**: Indicates an error occurred. Configure your flow to handle error scenarios, such as playing an error message to the caller and routing to a fallback option.
  </Step>
</Steps>

## Step 3: Test and Deploy

Before deploying to production, thorough testing is essential to ensure the integration works as expected and provides a good caller experience.

Test the integration thoroughly:

* Make test calls through the flow
  <Note>
    Test various scenarios including normal conversations or requests for human agents.
  </Note>
* Verify audio streaming quality and reliability
* Test conversation handling
  * Ensure GenerativeAgent understands and responds appropriately
  * Test different caller accents and speech patterns
  * Verify handling of background noise and interruptions
* Check error scenarios
  * Verify error handling paths in your flow

## Next Steps

After successfully integrating GenerativeAgent with your Genesys Cloud CX environment, consider these next steps to optimize your implementation:

<CardGroup>
  <Card title="Configuring GenerativeAgent" href="/generativeagent/configuring">Learn how to configure GenerativeAgent's behaviors and responses</Card>
  <Card title="Safety and Troubleshooting" href="/generativeagent/configuring/safety-and-troubleshooting">Understand safety features and how to troubleshoot common issues</Card>
  <Card title="Going Live" href="/generativeagent/go-live">Follow our checklist for deploying to production</Card>
</CardGroup>


# Handling GenerativeAgent Events
Source: https://docs.asapp.com/generativeagent/integrate/handling-events



While analyzing a conversation, GenerativeAgent communicates back to you via events. These events are sent via a [Server-Sent-Event](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events) stream.

The **single SSE stream** contain events for **all conversations** that are processed by GenerativeAgent.

Each event contains the id of the conversation it relates to, and the type of event.

Handling these events has 2 main steps:

1. Create SSE Stream
2. Handle the event

## Step 1: Create SSE Stream

To create an SSE stream for GenerativeAgent, first generate a streaming URL, and then initiate the SSE stream with that URL

To create the SSE stream URL, POST to `/streams`:

```json
curl -X POST 'https://api.sandbox.asapp.com/generativeagent/v1/streams' \
--header 'asapp-api-id: <API KEY ID>' \
--header 'asapp-api-secret: <API TOKEN>' \
--header 'Content-Type: application/json' \
--data '{}'
```

A successful request returns 200 and the `streamingUrl` to use to create the SSE stream. Additionally it returns a `streamId`. Save this Id and use it to [reconnect SSE](#handle-sse-disconnects "Handle SSE disconnects") in-case the stream disconnects.

```json
{
    "streamId": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
    "streamingUrl": "https://ws-coradnor.asapp.com/push-api/connect/sse?token=token",
    "messageTypes": [
        "generative-agent-message"
    ]
}
```

The streaming URL is only valid for 30 seconds. After that time, the connection will be rejected and you will need to request a new URL.

Initiate the SSE stream by connecting to the URL and handle the events. How you connect to an SSE stream depends on the language you use and what are your preferred libraries. We include an [example in NodeJs](#code-sample "Code sample") below.

### Handle SSE disconnects

If your SSE connection breaks, reestablish the stream using the `streamId` returned in the original request.

```json
curl -X POST 'https://api.sandbox.asapp.com/generativgeagent/v1/streams' \
--header 'asapp-api-id: <API KEY ID>' \
--header 'asapp-api-secret: <API TOKEN>' \
--header 'Content-Type: application/json' \
--data '{ "streamId": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
}
```

A successful request returns 200 and the streaming URL you will reconnect with.

```json
{
   "streamId": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
   "streamingUrl": "https://ws-coradnor.asapp.com/push-api/connect/sse?token=token", 
  "messageTypes": [
    "generative-agent-message"
  ]
}
```

Save the `streamId` to use in your `/analyze` requests. This will send all the GenerativeAgent messages for that analyze request, to this SSE stream.

## Step 2: Handle events

You need to process each event from GenerativeAgent. The data sent via SSE needs to be parsed into a JSON, and then handled accordingly.

Determining the conversation the event pertains to and take the necessary action depending on the event `type`.

For a given analyze request on a conversation, you may receive any of the following event types:

* **`processingStart`**: The bot started processing. This can be used to trigger user feedback such as showing a "typing" indicator.
* **`authenticationRequired`**: Some API Connections require additional User authentication. Refer to [User authentication required](#user-authentication-required "User Authentication Required") for more information.
* **`reply`**: The bot has a reply for the conversation. We will automatically create a message for the bot, but you will need to send back the response to your user. This can be text directly when on a text based system, or your TTS for voice channels.
* **`processingEnd`**: The bot finished processing. This indicates there will be no further events until analyze is called again.
* **`transferToAgent`**: The bot could not handle the request and the conversation should be transferred to an agent.
* **`transferToSystem`**: The bot is transferring control to an external system. This is a system transfer function.

Here is an example set of events where analyze is called:

```json
{
  generativeAgentMessageId: '116aaf51-8180-47b7-9205-9f61c8799c52',
  externalConversationId: '33411121',
  conversationId: '01HMVXRVSA1EGC0CHQTF1X2RN3',
  type: 'processingStart'
}
{
  generativeAgentMessageId: '5c020ad9-4a25-4746-a345-017bb9711dbe',
  externalConversationId: '33411121',
  conversationId: '01HMVXRVSA1EGC0CHQTF1X2RN3',
  type: 'reply',
  reply: {
    messageId: '01HMVXSZANHNGJ49R83HENDAJB',
    text: "I'm happy to help you! One moment please."
  }
}
{
  generativeAgentMessageId: 'd566fda8-3b7c-42a2-ae39-d08b66397238',
  externalConversationId: '33411121',
  conversationId: '01HMVXRVSA1EGC0CHQTF1X2RN3',
  type: 'reply',
  reply: {
    messageId: '01HMVXTDR1AT9CNQXPYKKBPJ7F',
    text: 'You can pay your bill by calling (XXX) XXX-6094, using the Mobile App, or with a customer service agent over the phone (with a $5 fee).'
  }
}
{
  generativeAgentMessageId: 'bba4320f-de53-4874-83b4-6c8704d3620c',
  externalConversationId: '33411121',
  conversationId: '01HMVXRVSA1EGC0CHQTF1X2RN3',
  type: 'processingEnd'
}
```

## User Authentication Required

A key power of GenerativeAgent is it's ability to call your APIs to look up information or perform an action. These are determined by the [API Connections](/generativeagent/configuring/connect-apis) you create.

Some APIs require end user authentication. When this is the case, we sent the `authenticationRequested` event. Work with your ASAPP team to determine those authentication needs and what needs to passed back to ASAPP.

Based on the specifics of your API, you will need to gather the end user authentication information and call [`/authenticate`](/apis/conversations/authenticate-a-user-in-a-conversation) on the conversation:

```json
curl -X POST 'https://api.sandbox.asapp.com/conversation/v1/conversations/[conversation Id]/authenticate' \
--header 'asapp-api-id: <API KEY ID>' \
--header 'asapp-api-secret: <API TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
    "customerExternalId": "[Your Id of the customer]",
    "auth": {
        {{Your predetermined authentication payload}}
    }
}'
```

A successful response returns a 204 response and no body. GenerativeAgent will continue processing and send you subsequent events.

## Code sample

Here is an example of initiate the SSE stream and listening for the events using nodeJS. This uses [axios](https://www.npmjs.com/package/axios) to get the URL and the [EventSource](https://www.npmjs.com/package/eventsource) package for handling the events:

```javascript
import axios from 'axios';
import EventSource from 'eventsource';
const response = await axios.post('https://api.sandbox.asapp.com/generativeagent/v1/streams', {}, {
    headers: {
        'asapp-api-id': '[Your API key id]',
        'asapp-api-secret': '[Your API secret]',
        'Content-Type': 'application/json'
    }
});
console.log('Using streaming URL:', response.data.streamingUrl);
const eventSource = new EventSource(response.data.streamingUrl);
eventSource.onopen = (event) => {
    console.log('Connection opened:', event.type);
};
eventSource.onerror = (error) => {
    console.error('EventSource failed:', error);
    eventSource.close();
};
eventSource.onmessage = (event) => {
    console.log('Received uncategorized data:', event.data);
};
eventSource.addEventListener('status', (event) => {
    console.log('Received status ping:', event.data);
})
eventSource.addEventListener('generative-agent-message', (event) => {
    console.log('Received generative-agent-message:', event.data);
    try {
        const parsedData = JSON.parse(event.data);
        console.log('Parsed data:', parsedData);
        // Handle different event types here
        switch (parsedData.type) {
            case "processingStart":
                console.log("Bot started processing.");
                break;
            case "authenticationRequired":
                console.log("Initiate customer authentication.");
                break;
            case "reply":
                console.log("GenerativeAgent responded:", parsedData.content);
                break;
            case "processingEnd":
                console.log("Bot finished processing");
                break;
            case "transferToAgent":
                console.log("Bot could not handle request, transfer to a live agent.");
                break;
            default:
                console.log("Unknown event type:", parsedData.type);
        }
    } catch (error) {
        console.error('Error parsing event data:', error);
    }
})
```

This example is intended to be illustrative only.

## Event Schema

Each event is a json format with several fields with the following specification:

| Field Name                          | Type         | Description                                                                                                                                                                                                  |
| :---------------------------------- | :----------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| generativeAgentMessageId            | string       | A unique identifier for this webhook request.                                                                                                                                                                |
| conversationId                      | string       | The internal identifier for the conversation from the ASAPP system.                                                                                                                                          |
| externalConversationId              | string       | The external identifier for the conversation from your external system.                                                                                                                                      |
| type                                | string, enum | The type of bot response. It can be one of the following:<ul><li>reply</li><li>processingStart</li><li>processingEnd</li><li>authenticationRequired</li><li>transferToAgent</li><li>systemTransfer</li></ul> |
| reply.\*                            | object       | If the `type` is **reply** then the bot's reply is contained in this object.                                                                                                                                 |
| reply.messageId                     | string       | The identifier of the message sent in the reply                                                                                                                                                              |
| reply.text                          | string       | The message text of the reply                                                                                                                                                                                |
| transferToSystem.\*                 | object       | If the `type` is **transferToSystem** then the variables to be transferred to the external system are contained in this object.                                                                              |
| transferToSystem.referenceVariables | object       | A Hash map of reference variables to be transferred to the external system.                                                                                                                                  |
| transferToSystem.transferVariables  | object       | A Hash map of transfer variables to be transferred to the external system.                                                                                                                                   |
| transferToSystem.currentTaskName    | string       | The name of the current task that is being transferred to the external system.                                                                                                                               |

<Tabs>
  <Tab title="reply">
    ```json
    {
      "generativeAgentMessageId": "d566fda8-3b7c-42a2-ae39-d08b66397238",
      "externalConversationId": "33411121",
      "conversationId": "01HMVXRVSA1EGC0CHQTF1X2RN3",
      "type": "reply",
      "reply": {
        "messageId": "01HMVXTDR1AT9CNQXPYKKBPJ7F",
        "text": "You can pay your bill by calling (XXX) XXX-6094, using the Mobile App, or with a customer service agent over the phone (with a $5 fee)."
      }
    }
    ```
  </Tab>

  <Tab title="processingStart">
    ```json
    {
      "generativeAgentMessageId": "116aaf51-8180-47b7-9205-9f61c8799c52",
      "externalConversationId": "33411121",
      "conversationId": "01HMVXRVSA1EGC0CHQTF1X2RN3",
      "type": "processingStart"
    }
    ```
  </Tab>

  <Tab title="processingEnd">
    ```json
    {
      "generativeAgentMessageId": "bba4320f-de53-4874-83b4-6c8704d3620c",
      "externalConversationId": "33411121",
      "conversationId": "01HMVXRVSA1EGC0CHQTF1X2RN3",
      "type": "processingEnd"
    }
    ```
  </Tab>

  <Tab title="authenticationRequired">
    ```json
    {
      "generativeAgentMessageId": "7d9e4f12-b3a8-4c91-95d6-8ef2a7c31b59",
      "externalConversationId": "33411121",
      "conversationId": "01HMVXRVSA1EGC0CHQTF1X2RN3",
      "type": "authenticationRequired"
    } 
    ```
  </Tab>

  <Tab title="transferToAgent">
    ```json
    {
      "generativeAgentMessageId": "9f47d8e3-c612-4b9a-8d5f-e31a2c4b6789",
      "externalConversationId": "33411121",
      "conversationId": "01HMVXRVSA1EGC0CHQTF1X2RN3",
      "type": "transferToAgent"
    }
    ```
  </Tab>

  <Tab title="transferToSystem">
    ```json
    {
      "generativeAgentMessageId": "bba4320f-de53-4874-83b4-6c8704d3620c",
      "externalConversationId": "33411121",
      "conversationId": "01HMVXRVSA1EGC0CHQTF1X2RN3",
      "type": "transferToSystem",
      "transferToSystem": {
        "referenceVariables": {
          "customerName": "John Smith",
          "accountNumber": "12345",
          "isActive": true
        },
        "transferVariables": {
          "department": "billing",
          "priority": "high",
          "notes": ["Payment pending", "Requires callback"]
        },
        "currentTaskName": "billing_transfer"
      }
    }
    ```
  </Tab>
</Tabs>

## Next Steps

After handling Events from GenerativeAgents, you have control over what is happening during conversations.

You may find one of the following sections helpful in advancing your integration:

<CardGroup>
  <Card title="AutoTranscribe Websocket" href="/generativeagent/integrate/autotranscribe-websocket" />

  <Card title="Example Interactions" href="/generativeagent/integrate/example-interactions" />

  <Card title="Integrate GenerativeAgent" href="/generativeagent/integrate" />
</CardGroup>


# Text-only GenerativeAgent
Source: https://docs.asapp.com/generativeagent/integrate/text-only-generativeagent



You have the option to integrate with GenerativeAgent using only text. This may be helpful if you:

* Have your own Speech-to-Text (STT) and Text-to-Speech (TTS) service.
* Adding GenerativeAgent to a text only channel like SMS or web site chat.

GenerativeAgent works on a loop where you will send text content of the conversation and have GenerativeAgent analyze a conversation, then handle the results from GenerativeAgent.

This process is repeated until GenerativeAgent addresses the user's needs, or GenerativeAgent is unable to help the user and requests a transfer to agent.

Your text-only integration needs to handle:

* Listening and Handling GenerativeAgent events. Create a single SSE stream where events from all conversations are sent.
* Connecting your chat system and trigger GenerativeAgent.

  1. Create a conversation
  2. Add Messages
  3. Analyze a conversation

This diagram shows the interaction between your server and ASAPP, these steps are explained in more detail below:

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-bac0fecf-d073-d2b0-773c-ba672131603b.png" />
</Frame>

## Before you Begin

Before you start integrating to GenerativeAgent, you need to:

* [Get your API Key Id and Secret](/getting-started/developers)
* Ensure your API key has been configured to access GenerativeAgent APIs. Reach out to your ASAPP team if you unsure.
* [Configure Tasks and Functions](/generativeagent/configuring).

## Step 1: Listen and Handle GenerativeAgent Events

GenerativeAgent sends you events during the conversation. All events for all conversations being evaluated by GenerativeAgent are sent through the single [Server-Sent-Event](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events) (SSE) stream..

To create the SSE stream URL, POST to [`/streams`](/apis/generativeagent/create-stream-url):

```bash
curl -X POST 'https://api.sandbox.asapp.com/generativeagent/v1/streams' \
--header 'asapp-api-id: <API KEY ID>' \
--header 'asapp-api-secret: <API TOKEN>' \
--header 'Content-Type: application/json' \
--data '{}'
```

A successful request returns 200 and the streaming URL you will reconnect with.

```json
{
   "streamId": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
   "streamingUrl": "https://ws-coradnor.asapp.com/push-api/connect/sse?token=token", 
  "messageTypes": [
    "generative-agent-message"
  ]
}
```

Save the `streamId`. You will use this later to send the GenerativeAgent events to this SSE stream.

You need to [listen and handle these events](/generativeagent/integrate/handling-events) to enable GenerativeAgent to interact with your users.

## Step 2: Create a Conversation

A `conversation` represents a thread of messages between an end user and one or more agents. GenerativeAgent evaluates and responds in a given conversation.

[Create a `conversation`](/apis/conversations/create-or-update-a-conversation) providing your Ids for the conversation and customer:

```bash
curl -X POST 'https://api.sandbox.asapp.com/conversation/v1/conversations' \
--header 'asapp-api-id: <API KEY ID>' \
--header 'asapp-api-secret: <API TOKEN>' \
--header 'Content-Type: application/json' \
--data '{ 
  "externalId": "1",
  "customer": {   
    "externalId": "[Your id for the customer]",
    "name": "customer name" 
  },
  "timestamp": "2024-01-23T11:42:42Z"
}'
```

A successfully created conversation returns a status code of 200 and the conversation's `id`. Save the conversation id as it is used when calling GenerativeAgent

```json
{"id":"01HNE48VMKNZ0B0SG3CEFV24WM"}
```

## Step 3: Add messages

Whether you are implementing a text based channel or using your own transcription, provide the utterances from your users by creating **`messages`**. A `message` represents a single communication within a conversation.

[Create a `message`](/apis/conversations/create-a-message) providing the text of what your user said:

```bash
curl -X POST 'https://api.sandbox.asapp.com/conversation/v1/conversations/01HNE48VMKNZ0B0SG3CEFV24WM/messages' \
--header 'asapp-api-id: <API KEY ID>' \
--header 'asapp-api-secret: <API TOKEN>' \
--header 'Content-Type: application/json' \
--data '{ 
  "text": "Hello, I would like to upgrade my internet plan to GOLD.",
  "sender": {   
    "role": "customer",
    "externalId": "[Your id for the customer]" 
  },
  "timestamp": "2024-01-23T11:42:42Z"
}'
```

Continue to provide the messages while the conversation progresses.

<Note>
  You can provide a single message as part of the `/analyze` call if that better works with the design of your system.
</Note>

## Step 4: Analyze conversation with GenerativeAgent

Once you have the SSE stream connected and are sending messages, you need to engage GenerativeAgent with a given conversation.

To have GenerativeAgent analyze a conversation, make a [POST request to  `/analyze`](/apis/generativeagent/analyze-conversation):

```bash
curl -X POST 'https://api.sandbox.asapp.com/generativeagent/v1/analyze' \
--header 'asapp-api-id: <API KEY ID>' \
--header 'asapp-api-secret: <API TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
    "conversationId": "01HNE48VMKNZ0B0SG3CEFV24WM",
    "streamId": "01ARZ3NDEKTSV4RRFFQ69G5FAV"
}'
```

Make sure to include the `streamId` created when you started the SSE Stream.

GenerativeAgent evaluates the conversation at that moment of time to determine a response. GenerativeAgent is not aware of any additional messages that are sent while processing.

A successful response returns a 200 and the conversation Id.

```json
{
  "conversationId":"01HNE48VMKNZ0B0SG3CEFV24WM"
}
```

GenerativeAgent's response is communicated by the [events](/generativeagent/integrate/handling-events) sent through the SSE stream.

### Analyze with Message

You have the option to send a message when calling analyze.

```bash
curl -X POST 'https://api.sandbox.asapp.com/generativeagent/v1/analyze' \
--header 'asapp-api-id: <API KEY ID>' \
--header 'asapp-api-secret: <API TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
    "conversationId": "01HNE48VMKNZ0B0SG3CEFV24WM",
    "streamId": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
    "message": {
        "text": "hello, can I see my bill?",
        "sender": {
            "externalId": "321",
            "role": "customer"
        },
        "timestamp": "2024-01-23T11:50:50Z"
    }
}'
```

A successful response returns a 200 status code the id of the conversation and the message that was created.

```json
{
  "conversationId":"01HNE48VMKNZ0B0SG3CEFV24WM",
  "messageId":"01HNE6ZEAC94ENQT1VF2EPZE4Y"
}
```

### Add Input Variables and Task context

As the conversation goes, it is possible to give GenerativeAgent more context of the conversation by using the`taskName` and `inputVariables` attributes.

You can also simulate Tasks and Input Variables in the [Previewer](/generativeagent/configuring/previewer#input-variables)

```bash
curl --request POST \
  --url https://api.sandbox.asapp.com/generativeagent/v1/analyze \
  --header 'Content-Type: application/json' \
  --header 'asapp-api-id: <api-key>' \
  --header 'asapp-api-secret: <api-key>' \
  --data '{
  "conversationId": "01BX5ZZKBKACTAV9WEVGEMMVS0",
  "message": {
    "text": "Hello, I would like to upgrade my internet plan to GOLD.",
    "sender": {
      "role": "agent",
      "externalId": 123
    },
    "timestamp": "2021-11-23T12:13:14.555Z"
  },
  "taskName": "UpgradePlan",
  "inputVariables": {
    "context": "Customer called to upgrade their current plan to GOLD",
    "customer_info": {
      "current_plan": "SILVER",
      "customer_since": "2020-01-01"
    }
  }
}'
```

## Next Steps

With your system implemented into GenerativeAgent, sending messages and engage GenerativeAgent, you are ready to use GenerativeAgent.

You may find these other pages helpful in using GenerativeAgent:

<CardGroup>
  <Card title="Configuring GenerativeAgent" href="/generativeagent/configuring" />

  <Card title="Safety and Troubleshooting" href="/generativeagent/configuring/safety-and-troubleshooting" />

  <Card title="Going Live" href="/generativeagent/go-live" />
</CardGroup>


# UniMRCP Plugin for ASAPP
Source: https://docs.asapp.com/generativeagent/integrate/unimrcp-plugin-for-asapp



ASAPP offers a plugin for speech recognition for the UniMRCP Server (UMS).

<Note>
  Speech-related clients use Media Resource Control Protocol (MRCP) to control media service resources including:

  * **Text-to-Speech (TTS)**
  * **Automatic Speech Recognizers (ASR)**
</Note>

To connect clients with speech processing servers and manage the sessions between them, MRCP relies on other protocols to work. Also, MRCP defines the messages to control the media service resources and it also defines the messages that provide the status of the media service resources.

Once established, the MRCP protocol exchange operates over the control session, allowing your organization to control the media processing resources on the speech resource server.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/generativeagent/unimrcp-overview.png" />
</Frame>

This plugin connects your IVR Platform into the AutoTranscribe Websocket. It is a fast solution for your organization to quickly integrate your IVR application into GenerativeAgent.

By using the ASAPP UniMRCP Plugin, the GenerativeAgent receives text transcripts from your IVR. This way, your organization takes voice media off your IVR and into the ASAPP Cloud.

## Before you Begin

Before you start integrating to GenerativeAgent, you need to:

* [**Get your API Key Id and Secret**](/getting-started/developers)

  For authentication, the UniMRCP server connects with AutoTranscribe using standard websocket authentication. The ASAPP UniMRCP Plugin does not handle authentication, but rather authentication is on your IVR's side of the call.
  Your API credentials are used by the configuration document. For user identification or verification, you must handle it by the IVRs policies and flows.
* Ensure your API key has been configured to access GenerativeAgent APIs and the AutoTranscribe WebSocket. Reach out to your ASAPP team if you are unsure about this.
* **Use ASAPPs ASR**

  Make sure your IVR application uses the ASAPP ASR so AutoTranscribe can receive it and send transcripts to GenerativeAgent.
* [Configure Tasks and Functions](/generativeagent/configuring).

  By using the Plugin, you still need to save customer info and messages. The GenerativeAgent can save that data by sending it into its Chat Core, but your organization can also save the messages either by calling the API or by saving the information from each event handler.

  Your IVR application is in control of when to call /analyze so the GenerativeAgent analyzes the transcripts and replies. The recommended configuration is to call /analyze every time an utterance or transcript is returned.

  Another approach is to call LLMBot when a complete thought/question is provided. Some organizations may find a good solution call /analyze and buffer up transcripts until the customer's thought is complete.

**Implementation steps:**

<Steps>
  <Step title="Listen and Handle GenerativeAgent Events" />

  <Step title="Setup the UniMRCP ASAPP Plugin" />

  <Step title="Manage the Transcripts and send them to GenerativeAgent" />
</Steps>

## Step 1: Listen and Handle GenerativeAgent Events

GenerativeAgent sends events during any conversation. All events for all conversations being evaluated by GenerativeAgent are sent through the single [Server-Sent-Event](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events) (SSE) stream..

You need to [listen and handle these events](/generativeagent/integrate/handling-events) to enable GenerativeAgent to interact with your users.

## Step 2: Setup the UniMRCP ASAPP Plugin

On your UniMRCP server, you need to install and configure the ASAPP UniMRCP Plugin.

### Install the ASAPP UniMRCP Plugin

<Note>
  Go to [ASAPP's UniMCRP Plugin Public Documentation](https://docs.unispeech.io/en/ums/asapp) to install and see its usage
</Note>

### Use the Recommended Plugin Configuration

**Fields & Parameters**

After you install the UniMCRP ASAPP Plugin, you need to configure the request fields so the prompts are sent in the best way and GenerativeAgent gets the most information available.

Having the recommended configuration will ensure GenerativeAgent analyzes each prompt correctly.

Here are the details for the fields with the recommended configuration:

**StartStream Request Fields**

<table class="informaltable frame-void rules-rows">
  <thead>
    <tr>
      <th class="th" colspan="2"><p>Field</p></th>
      <th class="th"><p>Description</p></th>
      <th class="th"><p>Default</p></th>
      <th class="th"><p>Supported Values</p></th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td class="td" rowspan="2"><p>sender</p></td>
      <td class="td"><p>role (required)</p></td>
      <td class="td"><p>A participant role, usually the customer or an agent for human participants.</p></td>
      <td class="td"><p>n/a</p></td>
      <td class="td"><p>"agent", "customer"</p></td>
    </tr>

    <tr>
      <td class="td"><p>externalId (required)</p></td>
      <td class="td"><p>Participant ID from the external system, it should be the same for all interactions of the same individual</p></td>
      <td class="td"><p>n/a</p></td>
      <td class="td"><p>"BL2341334"</p></td>
    </tr>

    <tr>
      <td class="td" colspan="2"><p>language</p></td>
      <td class="td"><p>IETF language tag</p></td>
      <td class="td"><p>en-US</p></td>
      <td class="td"><p>"en-US"</p></td>
    </tr>

    <tr>
      <td class="td" colspan="2"><p>smartFormatting</p></td>

      <td class="td">
        <p>Request for post processing:</p>
        <p>Inverse Text Normalization (convert spoken form to written form), e.g., 'twenty two --> 22'.</p>
        <p>Auto punctuation and capitalization</p>
      </td>

      <td class="td"><p>true</p></td>

      <td class="td">
        <p>true, false</p>
        <p>Recomended: true</p>
        <p>Interpreting transcripts will be more natural and predictable</p>
      </td>
    </tr>

    <tr>
      <td class="td" colspan="2"><p>detailedToken</p></td>
      <td class="td"><p>Has no impact on UniMRCP</p></td>
      <td class="td"><p>false</p></td>

      <td class="td">
        <p>true, false</p>
        <p>Recommended: false</p>
        <p>IVR application does not utilize the word level details</p>
      </td>
    </tr>

    <tr>
      <td class="td" colspan="2"><p>audioRecordingAllowed</p></td>

      <td class="td">
        <p>false: ASAPP will not record the audio</p>
        <p>true: ASAPP may record and store the audio for this conversation</p>
      </td>

      <td class="td"><p>false</p></td>

      <td class="td">
        <p>true, false</p>
        <p>Recommended: true</p>
        <p>Allowing audio recording improves transcript accuracy over time</p>
      </td>
    </tr>

    <tr>
      <td class="td" colspan="2"><p>redactionOutput</p></td>

      <td class="td">
        <p>If detailedToken is true along with value 'redacted' or 'redacted\_and\_unredacted', request will be rejected.</p>
        <p>If no redaction rules configured by the client for 'redacted' or 'redacted\_and\_unredacted', the request will be rejected.</p>
        <p>If smartFormatting is False, requests with value 'redacted' or 'redacted\_and\_unredacted' will be rejected.</p>
      </td>

      <td class="td">
        <p>redacted</p>
        <p>Recommended: <strong>unredacted</strong></p>
      </td>

      <td class="td">
        <p>"redacted", "unredacted","redacted\_and\_unredacted"</p>
        <p>Recommended: unredacted</p>
        <p>IVR application works better with full information available</p>
      </td>
    </tr>
  </tbody>
</table>

**Transcript Message Response Fields**

All Responses go to the MRCP Server, so the only visible return is a VXML return of the field.

| Field     |      | Description                                                                                                                                                                                                      | Format | Example Syntax      |
| :-------- | :--- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----- | :------------------ |
| utterance | text | The written text of the utterance. While an utterance can have multiple alternatives (e.g., 'me two' vs. 'me too') ASAPP provides only the most probable alternative only, based on model prediction confidence. | array  | "Hi, my ID is 123." |

If the `detailedToken` in `startStream` request is set to true, additional fields are provided within the `utterance` array for each `token`:

| Field | Subfield          | Description                                                                                                                                                                                        | Format  | Example Syntax |
| :---- | :---------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------ | :------------- |
| token | content           | Text or punctuation                                                                                                                                                                                | string  | "is", "?"      |
|       | start             | Start time (millisecond) of the token relative to the start of the audio input                                                                                                                     | integer | 170            |
|       | end               | End time (millisecond) audio boundary of the token relative to the start of the audio input, there may be silence after that, so it does not necessarily match with the startMs of the next token. | integer | 200            |
|       | punctuationAfter  | Optional, punctuation attached after the content                                                                                                                                                   | string  | '.'            |
|       | punctuationBefore | Optional, punctuation attached in front of the content                                                                                                                                             | string  | '"'            |

## Step 3: Manage Transcripts

You need to both pass the conversation transcripts to ASAPP, as well as request GenerativeAgent to analyze the conversation.

### Create a Conversation

You need to create the conversation with GenerativeAgent for each IVR call.

A **`conversation`** represents a thread of messages between an end user and one or more agents. GenerativeAgent evaluates and responds in a given conversation.

Create a `conversation` providing your Ids for the conversation and customer:

```json
curl -X POST 'https://api.sandbox.asapp.com/conversation/v1/conversations' \
--header 'asapp-api-id: <API KEY ID>' \
--header 'asapp-api-secret: <API TOKEN>' \
--header 'Content-Type: application/json' \
--data '{ 
  "externalId": "1",
  "customer": {   
    "externalId": "[Your id for the customer]",
    "name": "customer name" 
  },
  "timestamp": "2024-01-23T11:42:42Z"
}'
```

A successfully created conversation returns a status code of 200 and the conversation's id.

```json
{"id":"01HNE48VMKNZ0B0SG3CEFV24WM"}
```

As the conversation goes, it is possible to give GenerativeAgent more context of the conversation by using the`taskName` and `inputVariables` attributes.

You can also simulate Input Variables in the [Previewer](/generativeagent/configuring/previewer#input-variables)

```bash
curl --request POST \
  --url https://api.sandbox.asapp.com/generativeagent/v1/analyze \
  --header 'Content-Type: application/json' \
  --header 'asapp-api-id: <api-key>' \
  --header 'asapp-api-secret: <api-key>' \
  --data '{
  "conversationId": "01BX5ZZKBKACTAV9WEVGEMMVS0",
  "message": {
    "text": "Hello, I would like to upgrade my internet plan to GOLD.",
    "sender": {
      "role": "agent",
      "externalId": 123
    },
    "timestamp": "2021-11-23T12:13:14.555Z"
  },
  "taskName": "UpgradePlan",
  "inputVariables": {
    "context": "Customer called to upgrade their current plan to GOLD",
    "customer_info": {
      "current_plan": "SILVER",
      "customer_since": "2020-01-01"
    }
  }
}'
```

#### Gather transcripts and analyze conversations with GenerativeAgent

After you receive the conversation transcripts from the UniMRCP Plugin, you must call /analyze and other endpoints so GenerativeAgent evaluates the conversation and send a reply.

You can decide when to call the GenerativeAgent, a common strategy is to define an immediate call after a transcript is returned from the MRCP client

Additionally, the GenerativeAgent will make API Calls to your Organization depending on the Tasks and Functions that were configured for the Agent.

Once you have the SSE stream connected and are receiving messages, you need to engage GenerativeAgent with a given conversation. All messages are sent through REST outside of the SSE channels.

To have GenerativeAgent analyze a conversation, make a [POST request to  `/analyze`](/apis/generativeagent/analyze-conversation):

```json
curl -X POST 'https://api.sandbox.asapp.com/generativeagent/v1/analyze' \
--header 'asapp-api-id: <API KEY ID>' \
--header 'asapp-api-secret: <API TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
    "conversationId": "01HNE48VMKNZ0B0SG3CEFV24WM"
}'
```

GenerativeAgent evaluates the transcript at that moment of time to determine a response. GenerativeAgent is not aware of any additional transcript messages that are sent while processing.

A successful response returns a 200 and the conversation Id.

```json
{
  "conversationId":"01HNE48VMKNZ0B0SG3CEFV24WM"
}
```

GenerativeAgent's response is communicated via the [events](/generativeagent/integrate/handling-events).

**Analyze with Message**

You have the option to send a message when calling analyze.

```json
curl -X POST 'https://api.sandbox.asapp.com/generativeagent/v1/analyze' \
--header 'asapp-api-id: <API KEY ID>' \
--header 'asapp-api-secret: <API TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
    "conversationId": "01HNE48VMKNZ0B0SG3CEFV24WM",
    "message": {
        "text": "hello, can I see my bill?",
        "sender": {
            "externalId": "321",
            "role": "customer"
        },
        "timestamp": "2024-01-23T11:50:50Z"
    }
}'
```

A successful response returns a 200 status code the id of the conversation and the message that was created.

```json
{
  "conversationId":"01HNE48VMKNZ0B0SG3CEFV24WM",
  "messageId":"01HNE6ZEAC94ENQT1VF2EPZE4Y"
}
```

## Next Steps

With your system implemented into GenerativeAgent, sending messages and engage GenerativeAgent, you are ready to use GenerativeAgent.

You may find these other pages helpful in using GenerativeAgent:

<CardGroup>
  <Card title="Configuring GenerativeAgent" href="../configuring" />

  <Card title="Safety and Troubleshooting" href="../configuring/safety-and-troubleshooting" />

  <Card title="Going Live" href="../go-live" />
</CardGroup>


# Reporting
Source: https://docs.asapp.com/generativeagent/reporting

Learn how to track and analyze GenerativeAgent's performance.

Monitoring how GenerativeAgent handles customer interactions is critical for ensuring optimal performance and customer satisfaction.

By tracking key metrics around containment and task completion, you can continuously improve GenerativeAgent's effectiveness and identify areas for optimization.

You can access GenerativeAgent reporting data in two ways:

| Reporting Option              | Capabilities                                                                                                                                                                                                                | Availability                                   |
| :---------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------- |
| **Out-of-the-box dashboards** | <ul><li>Get started quickly with pre-built visualizations</li><li>View basic performance metrics like task completion and containment</li></ul>                                                                             | ASAPP Messaging only                           |
| **Data feeds**                | <ul><li>Export raw data for custom analysis</li><li>Combine GenerativeAgent data with your own analytics</li><li>Build custom reports in your BI tools</li><li>Track end-to-end customer journeys across channels</li></ul> | ASAPP Messaging and Standalone GenerativeAgent |

<Note> Dashboards are available only once you are in production. </Note>

## Out-of-the-box dashboards

The fastest way to start monitoring GenerativeAgent is through our pre-built dashboards. To access them depends on whether you are using ASAPP Messaging or running GenerativeAgent standalone.

These dashboards show you:

* Volume and containment over time
* Containment by task
* Intent and task breakdowns

<Note>
  We only provide out-of-the-box dashboards for GenerativeAgent running on [ASAPP Messaging](/messaging-platform).
</Note>

Access GenerativeAgent reporting through the [Historical Insights interface](/messaging-platform/insights-manager#historical-insights):

1. Navigate to **ASAPP Core Digital Dashboards** -> **Automation & Flow** -> **GenerativeAgent**
2. Select **GenerativeAgent Quality Metrics**

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/generativeagent/generativeagent-dashboards.png" />
</Frame>

## Data feeds

For deeper analysis, or to integrate GenerativeAgent metrics with your existing analytics infrastructure, you can pipe GenerativeAgent's data directly into your system using:

* [File Exporter APIs](/reporting/file-exporter) for standalone GenerativeAgent.
* [Download from S3](/reporting/retrieve-messaging-data) if you are using our [Messaging Platform](/messaging-platform).

This approach is recommended when you need to:

* Combine GenerativeAgent metrics with other customer journey data
* Build custom dashboards in your BI tools
* Perform advanced analytics across channels
* Track end-to-end customer interactions

<Tabs>
  <Tab title="File Exporter">
    Use File Exporter to export data from a standalone GenerativeAgent. When exporting data via the File Exporter APIs, you need to specify a `feed` of **generativeagent**.

    Reports are generated hourly.

    Here is an example to get a list of files in the generativeagent feed for a given day:

    ```bash
    curl --request POST \
      --url https://api.sandbox.asapp.com/fileexporter/v1/static/listfeedfiles \
      --header 'Content-Type: application/json' \
      --header 'asapp-api-id: <api-key>' \
      --header 'asapp-api-secret: <api-key>' \
      --data '{
      "feed": "generativeagent",
      "version": "1",
      "format": "jsonl",
      "date": "2024-06-27",
      "interval": "hr=23"
    }'
    ```

    Refer to the [File Exporter documentation](/reporting/file-exporter) for more details on the listing and retrieving files.
  </Tab>

  <Tab title="Download from S3">
    Use S3 to download data exported from the Messaging Platform. When exporting data via S3, you will need to specify the `FEED_NAME` as **generativeagent**.

    Refer to the [Download from S3](/reporting/retrieve-messaging-data) guide for more details on the file structure and how to access the data.
  </Tab>
</Tabs>

## GenerativeAgent data schema

<Card title="Data Reference" icon="table" href="/generativeagent/reporting/data-reference">
  See all available metrics and their definitions in our data reference guide
</Card>


# Developer Quickstart
Source: https://docs.asapp.com/getting-started/developers

Learn how to get started using ASAPPs APIs

Most of ASAPP's products require a combination of configuration and implementation, and making API calls is part of a successful integration.

<Warning> If you are **only** integrating ASAPP Messaging and **no other ASAPP product**, then you can skip this quickstart and go straight to [ASAPP Messaging](/messaging-platform) guide.</Warning>

To get started making API calls, you need to:

* [Log in to the developer portal](#log-in-to-the-developer-portal)
* [Understand Sandbox vs Production](#understanding-sandbox-and-production)
* [Access your application's API Credentials](#access-api-credentials)
* [Make your first API call](#make-first-api-call)

## Log in to the developer portal

The developer portal is where you will:

* Grant access to developers and manage your team.
* Manage your API keys.

As part of [onboarding](/getting-started/intro), you would have appointed someone as the Developer Portal Admin. This user is in control of adding users and adjusting user access within the Dev Portal.

### Managing the developer portal

The developer portal uses **teams** and **apps** to manage access.

The members of your team can have one of the following roles:

* **Owner**: This user controls the team; this user is also called the Developer Portal Admin.
* **App Admin**: These users are able to change the information on applications owned by the team.
* **Viewers**: These users can view API credentials, but cannot change any settings.

Apps represent access to all of ASAPP's products. Your team will already have an app created for you. One app can access all of ASAPP's products. There can be one or more keys for the app; by default, an initial API key will already be generated.

The ASAPP email login or SSO only grants access to the dev portal, all permission and team management must be done from within the developer portal tooling.

## Understand Sandbox and Production

Initially, you only have access to the sandbox environment and we will create a Sandbox team and app for you. The sandbox is where you can initially build your integration but also try out new features before launching in production.

The different environments are represented in ASAPP's API Domains:

| Environment | API Domain                      |
| :---------- | :------------------------------ |
| Sandbox     | `https://api.sandbox.asapp.com` |
| Production  | `https://api.asapp.com`         |

ASAPP's sandbox environment uses the same machine learning models and services as the production environment in order to replicate expected behaviors when interacting with a given endpoint.

<Warning>All requests to ASAPP sandbox and production APIs **must** use HTTPS protocol. Traffic using HTTP will not be redirected to HTTPS.</Warning>

### Moving to Production

Once you are ready to move to launch with real traffic and move to production, request production access. Tell your ASAPP account team which user will be the Production Developer Portal Admin. ASAPP will create a dedicated production team and app that you can manage as you did for the sandbox team and app.

## Access API Credentials

To access your API credentials, once you've logged in:

* Click your username and click Apps
  <Frame>
    <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/getting-started/dev-portal-access.png" />
  </Frame>
* Click your Sandbox App.
* Navigate down to API Keys and copy your API Id and API Secret
  <Frame>
    <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/getting-started/dev-portal-app.png" />
  </Frame>

Save the API Id and Secret. All API requests use these for authentication.

## Make First API Call

With credentials in hand, we can make our first API call. Let's start with creating a `conversation`, the root entity for any interaction within a call center.

This example creates an empty conversation with required id from your system. You need to include the API Id and Secret as `asapp-api-id` and `asapp-api-secret` headers respectively.

```bash
curl -X POST 'https://api.sandbox.asapp.com/conversation/v1/conversations' \
--header 'asapp-api-id: <API KEY ID>' \
--header 'asapp-api-secret: <API TOKEN>' \
--header 'Content-Type: application/json' \
--data '{ 
  "externalId": "con_1",
  "customer": {   
    "externalId": "cust_1234"
  },
  "timestamp": "2024-12-12T11:42:42Z"
}'
```


# Error Handling
Source: https://docs.asapp.com/getting-started/developers/error-handling

Learn how ASAPP returns Errors in the API

When you make an API call to ASAPP and there is an error, you will receive a non `2XX` HTTP status code.

All errors return a `message`, `code`, and `requestId` for that request to help you debug the issue.

The message will usually contain enough information to help you resolve the issue. If you require further help, reach out to support, including the requestId so that they can pinpoint the specific failing API call.

## Error Structure

| Field           | Type   | Description                                                                  |
| :-------------- | :----- | :--------------------------------------------------------------------------- |
| error           | object | The main error object containing details about the error                     |
| error.requestId | string | A unique identifier for the request that resulted in this error              |
| error.message   | string | A detailed description of the error, including the specific validation issue |
| error.code      | string | An error code in the format "HTTP\_STATUS\_CODE-ERROR\_SUBCODE"              |

Here is an example where a timestamp in the request has an incorrect format.

```json
{
  "error":{
    "requestId":"3851a807-f0c3-4873-8ba6-5bad4261f0ca3100",
    "message":"ERROR - [Path '/timestamp'] String 2024-08-14T00:00:00.000K is invalid against requested date format(s) [yyyy-MM-dd'T'HH:mm:ssZ, yyyy-MM-dd'T'HH:mm:ss.[0-9]{1,12}Z]: []]",
    "code":"400-03"
  }
}
```


# Health Check
Source: https://docs.asapp.com/getting-started/developers/health-check

Check the operational status of ASAPP's API platform

ASAPP provides a simple endpoint to check if our API services are operating normally. You can use this to verify the platform's availability or implement automated health monitoring.

## Checking API Health

Send a GET request to the [health check](/apis/health-check/check-asapps-apis-health) endpoint:

```bash
curl https://api.sandbox.asapp.com/v1/health \
  -H "asapp-api-id: YOUR_API_ID" \
  -H "asapp-api-secret: YOUR_API_SECRET"
```

A successful response will return:

```json
{
  "healthCheck": "SUCCESS"
}
```

The status will be either `SUCCESS` when operating normally or `FAILED` if there are service disruptions.


# API Rate Limits and Retry Logic
Source: https://docs.asapp.com/getting-started/developers/rate-limits

Learn about API rate limits and recommended retry logic.

ASAPP implements rate limits on our APIs to ensure system stability and optimal performance for all users. To maintain a smooth integration with our APIs, you need to:

1. Be aware of the rate limits in different environments
2. Implement retry logic to handle rate limit errors effectively

## Rate Limits

| Environment | Daily Limit                                | Daily Limit Reset Time | Spike Arrest Limit              |
| :---------- | :----------------------------------------- | :--------------------- | :------------------------------ |
| Sandbox     | 10,000 requests per AI Service             | 00:00:00 UTC           | 100 requests/second per Product |
| Production  | 50,000 requests per AI Service (default)\* | 00:00:00 UTC           | 100 requests/second per Product |

\*Production limits are configured for each service implementation and are set with ASAPP account teams during request volume forecasting.

ASAPP sets these limits to prevent API abuse rather than restrict regular expected usage. If your implementation is expected to approach or exceed these limits, contact your ASAPP account team in advance to discuss potential changes and prevent service interruptions.

## Behavior When Limits are Reached

If daily limits are reached:

* Calls to the endpoint will receive a 429 'Too Many Requests' response status code for the remainder of the day.
* In cases of suspected abuse, API tokens may be revoked to temporarily suspend access to production services. ASAPP will inform you via ServiceDesk in such cases.

## Recommended Retry Logic

ASAPP recommends implementing the following retry logic using an exponential backoff strategy in response to 429 and 5xx errors:

### On 429 Errors

* 1st retry: 1s delay
* 2nd retry: 2s delay
* 3rd retry: 4s delay

### On 5xx Errors and Other Retriable Codes

* 1st retry: 250ms delay
* 2nd retry: 500ms delay
* 3rd retry: 1000ms delay

<Note>
  Do not implement retries for error codes that typically indicate request errors:

  * 400 Bad Request
  * 403 Forbidden
  * 404 Not Found
</Note>


# Setup ASAPP
Source: https://docs.asapp.com/getting-started/intro

Learn how to get started with ASAPP

To get started with ASAPP, you need to:

1. Create and access your account with ASAPP
2. Invite Users and Developers
3. Configure and Integrate your products

## Create and access your account

The first step with ASAPP is getting your own account. If you haven't already, [request a demo](https://ai-console.asapp.com/). During the initial conversations, an ASAPP member would have asked you for the following:

* Display name of company
* Admin user email: This user will be granted initial admin access and can invite subsequent users.
* Developer email: This is the user who is responsible for the technical integration. They will receive access to the developer portal.

An account will be created for you, this account is sometimes referred to as an **organization name** or **company marker**.

This company marker is your main account with ASAPP and includes all configuration, user management, and login settings for your account.

When you login to the [ASAPP dashboard](https://ai-console.asapp.com/), called the AI Console, you will need to specify your **organization**, and then login with your email.

<Note>At first, login is based on your email, though we do support SSO authentication.</Note>

If you don't have an account, you can [reach out](https://www.asapp.com/get-started) to see a demo and get an account.

### Multiple company markers

Most users only need a single company marker. If you require different sets configuration such as different sub entities with different configuration needs, you may require multiple company markers.

Work with your ASAPP account team to determine the best account structure for your business.

## Invite Users and Developers

Once you have access to your account and the [ASAPP dashboard](https://ai-console.asapp.com/). You need to invite your teammates to access relevant products. Most products are fully managed within the AI Console.

<Note>[ASAPP Messaging](/messaging-platform) has a separate dashboard to configure the platform compared to the [Agent Desk](/messaging-platform/digital-agent-desk) where your agents login and interact with your customers.</Note>

For developers, we would have already requested for your developer's email to get them access to the developer portal where they can manage API Keys. Point your developers to the [developer quickstart](/getting-started/developers).

## Configure and Integrate your products

With access to your account and inviting your users, you need to configure and implement your products.

Each product has its own instructions on how to configure and implement. Follow the appropriate steps per product:

<CardGroup cols={2}>
  <Card title="" icon={<svg width="290" height="35" viewBox="0 0 290 35" fill="none" xmlns="http://www.w3.org/2000/svg">    <g clip-path="url(#clip0_396_950)">    <path fill-rule="evenodd" clip-rule="evenodd" d="M35 17.5C35 27.1166 27.6518 35 17.9145 35C9.43369 35 1.81656 28.9056 0.281043 20.586C0.0967682 19.6652 0 18.7117 0 17.7352L0.00037691 17.6366C0.000125807 17.6068 0 17.5769 0 17.547C0 17.5361 1.6814e-05 17.5252 5.04171e-05 17.5143L0 17.5C0 7.69595 8.1792 0 17.7303 0C27.4138 0 35 7.82797 35 17.5ZM3.13269 17.6743C3.13247 17.6572 3.13228 17.6401 3.13213 17.6229C3.13485 17.3461 3.14762 17.0717 3.17008 16.8001C3.53509 13.2801 6.45073 10.5376 9.99342 10.5376C13.7831 10.5376 16.8553 13.6759 16.8553 17.547C16.8553 21.4182 13.7831 24.5565 9.99342 24.5565C6.24534 24.5565 3.19913 21.4868 3.13269 17.6743ZM9.47632 27.7419C9.64758 27.7509 9.81999 27.7554 9.99342 27.7554C15.5126 27.7554 19.9868 23.1849 19.9868 17.547C19.9868 12.0572 15.7446 7.57956 10.4261 7.34811C11.5048 6.97595 12.6602 6.77419 13.8618 6.77419C19.788 6.77419 24.5921 11.6816 24.5921 17.7352C24.5921 23.7888 19.788 28.6962 13.8618 28.6962C12.2995 28.6962 10.8152 28.3552 9.47632 27.7419ZM17.7303 3.19892C16.5803 3.19892 15.4579 3.33253 14.3792 3.58495C21.7952 3.86289 27.7237 10.0918 27.7237 17.7352C27.7237 24.7502 22.7299 30.5737 16.1757 31.6988C16.7476 31.7663 17.3279 31.8011 17.9145 31.8011C25.8754 31.8011 31.8684 25.3983 31.8684 17.5C31.8684 9.60173 25.6912 3.19892 17.7303 3.19892Z" fill="#8056B0"/>    </g>    <path d="M52.32 24.86C50.92 24.86 49.74 24.5333 48.78 23.88C47.8333 23.2133 47.1267 22.34 46.66 21.26C46.2067 20.1667 45.98 18.96 45.98 17.64C45.98 16.1733 46.2667 14.8733 46.84 13.74C47.4133 12.6067 48.2267 11.7267 49.28 11.1C50.3333 10.4733 51.5533 10.16 52.94 10.16C54.06 10.16 55.0667 10.3667 55.96 10.78C56.8533 11.18 57.5667 11.7667 58.1 12.54C58.6333 13.3133 58.9267 14.2267 58.98 15.28H56.36C56.2933 14.4267 55.94 13.7533 55.3 13.26C54.6733 12.7667 53.86 12.52 52.86 12.52C51.5133 12.52 50.46 12.98 49.7 13.9C48.9533 14.8067 48.58 16.0333 48.58 17.58C48.58 19.06 48.92 20.2733 49.6 21.22C50.28 22.1667 51.3333 22.64 52.76 22.64C53.7867 22.64 54.64 22.3467 55.32 21.76C56 21.1733 56.3867 20.3733 56.48 19.36H52.44V17.08H58.96V24.5H56.68V22.58C56.2933 23.3133 55.7333 23.88 55 24.28C54.2667 24.6667 53.3733 24.86 52.32 24.86ZM66.4264 24.72C65.4397 24.72 64.5597 24.52 63.7864 24.12C63.0264 23.72 62.4264 23.1267 61.9864 22.34C61.5597 21.5533 61.3464 20.6 61.3464 19.48C61.3464 18.4267 61.5464 17.4867 61.9464 16.66C62.3597 15.8333 62.9531 15.1867 63.7264 14.72C64.4997 14.2533 65.4264 14.02 66.5064 14.02C67.9597 14.02 69.1131 14.4333 69.9664 15.26C70.8197 16.0733 71.2464 17.3067 71.2464 18.96V20.14H63.8064C64.0064 21.7933 64.9197 22.62 66.5464 22.62C67.7197 22.62 68.4331 22.1933 68.6864 21.34H71.1264C70.9131 22.4467 70.3731 23.2867 69.5064 23.86C68.6397 24.4333 67.6131 24.72 66.4264 24.72ZM68.8664 18.24C68.8264 16.8267 68.0464 16.12 66.5264 16.12C65.8064 16.12 65.2197 16.3067 64.7664 16.68C64.3264 17.04 64.0331 17.56 63.8864 18.24H68.8664ZM73.5113 14.2H75.9313V15.86C76.2246 15.26 76.6646 14.8067 77.2513 14.5C77.8379 14.18 78.5313 14.02 79.3313 14.02C80.4913 14.02 81.3646 14.3533 81.9513 15.02C82.5513 15.6733 82.8513 16.6 82.8513 17.8V24.5H80.3713V18.2C80.3713 17.56 80.1979 17.0733 79.8513 16.74C79.5046 16.3933 79.0379 16.22 78.4513 16.22C77.7313 16.22 77.1446 16.4667 76.6913 16.96C76.2379 17.44 76.0113 18.1067 76.0113 18.96V24.5H73.5113V14.2ZM90.0983 24.72C89.1116 24.72 88.2316 24.52 87.4583 24.12C86.6983 23.72 86.0983 23.1267 85.6583 22.34C85.2316 21.5533 85.0183 20.6 85.0183 19.48C85.0183 18.4267 85.2183 17.4867 85.6183 16.66C86.0316 15.8333 86.6249 15.1867 87.3983 14.72C88.1716 14.2533 89.0983 14.02 90.1783 14.02C91.6316 14.02 92.7849 14.4333 93.6383 15.26C94.4916 16.0733 94.9183 17.3067 94.9183 18.96V20.14H87.4783C87.6783 21.7933 88.5916 22.62 90.2183 22.62C91.3916 22.62 92.1049 22.1933 92.3583 21.34H94.7983C94.5849 22.4467 94.0449 23.2867 93.1783 23.86C92.3116 24.4333 91.2849 24.72 90.0983 24.72ZM92.5383 18.24C92.4983 16.8267 91.7183 16.12 90.1983 16.12C89.4783 16.12 88.8916 16.3067 88.4383 16.68C87.9983 17.04 87.7049 17.56 87.5583 18.24H92.5383ZM97.1831 14.2H99.6031V16.08C99.7898 15.4667 100.11 14.98 100.563 14.62C101.016 14.26 101.576 14.08 102.243 14.08H103.143V16.52H102.243C101.336 16.52 100.683 16.7733 100.283 17.28C99.8831 17.7733 99.6831 18.5133 99.6831 19.5V24.5H97.1831V14.2ZM107.658 24.72C106.632 24.72 105.805 24.4533 105.178 23.92C104.552 23.3867 104.238 22.6333 104.238 21.66C104.238 19.8867 105.365 18.8533 107.618 18.56L109.798 18.28C110.212 18.2133 110.532 18.1133 110.758 17.98C110.985 17.8333 111.098 17.5867 111.098 17.24C111.098 16.4133 110.478 16 109.238 16C107.878 16 107.092 16.4933 106.878 17.48H104.418C104.592 16.32 105.105 15.4533 105.958 14.88C106.812 14.3067 107.945 14.02 109.358 14.02C110.785 14.02 111.845 14.3067 112.538 14.88C113.232 15.4533 113.578 16.3267 113.578 17.5V24.5H111.278V22.7C110.932 23.34 110.452 23.84 109.838 24.2C109.238 24.5467 108.512 24.72 107.658 24.72ZM106.738 21.46C106.738 21.86 106.878 22.16 107.158 22.36C107.438 22.56 107.832 22.66 108.338 22.66C109.152 22.66 109.812 22.4267 110.318 21.96C110.838 21.4933 111.098 20.9067 111.098 20.2V19.7C110.792 19.82 110.298 19.9267 109.618 20.02L108.398 20.2C107.892 20.2667 107.485 20.3867 107.178 20.56C106.885 20.7333 106.738 21.0333 106.738 21.46ZM120.001 24.5C118.028 24.5 117.041 23.52 117.041 21.56V16.4H115.201V14.2H117.041V11.8L119.541 11.1V14.2H121.701V16.4H119.541V21.18C119.541 21.58 119.621 21.8733 119.781 22.06C119.954 22.2333 120.241 22.32 120.641 22.32H121.921V24.5H120.001ZM123.998 14.2H126.498V24.5H123.998V14.2ZM123.958 10.18H126.558V12.76H123.958V10.18ZM128.09 14.2H130.79L133.57 22.14L136.35 14.2H139.05L135.05 24.5H132.11L128.09 14.2ZM145.098 24.72C144.112 24.72 143.232 24.52 142.458 24.12C141.698 23.72 141.098 23.1267 140.658 22.34C140.232 21.5533 140.018 20.6 140.018 19.48C140.018 18.4267 140.218 17.4867 140.618 16.66C141.032 15.8333 141.625 15.1867 142.398 14.72C143.172 14.2533 144.098 14.02 145.178 14.02C146.632 14.02 147.785 14.4333 148.638 15.26C149.492 16.0733 149.918 17.3067 149.918 18.96V20.14H142.478C142.678 21.7933 143.592 22.62 145.218 22.62C146.392 22.62 147.105 22.1933 147.358 21.34H149.798C149.585 22.4467 149.045 23.2867 148.178 23.86C147.312 24.4333 146.285 24.72 145.098 24.72ZM147.538 18.24C147.498 16.8267 146.718 16.12 145.198 16.12C144.478 16.12 143.892 16.3067 143.438 16.68C142.998 17.04 142.705 17.56 142.558 18.24H147.538ZM157.043 10.5H158.963L164.603 24.5H162.783L161.303 20.72H154.703L153.223 24.5H151.403L157.043 10.5ZM160.683 19.14L158.003 12.28L155.323 19.14H160.683ZM170.922 28.56C169.642 28.56 168.582 28.2467 167.742 27.62C166.902 27.0067 166.429 26.1533 166.322 25.06H167.962C168.055 25.7133 168.349 26.2333 168.842 26.62C169.349 27.0067 170.049 27.2 170.942 27.2C172.982 27.2 174.002 26.2 174.002 24.2V22.18C173.695 22.8333 173.222 23.3267 172.582 23.66C171.942 23.9933 171.255 24.16 170.522 24.16C169.695 24.16 168.942 23.9733 168.262 23.6C167.582 23.2267 167.035 22.6733 166.622 21.94C166.222 21.1933 166.022 20.2933 166.022 19.24C166.022 18.1467 166.235 17.2267 166.662 16.48C167.089 15.72 167.649 15.16 168.342 14.8C169.049 14.4267 169.822 14.24 170.662 14.24C171.475 14.24 172.169 14.4133 172.742 14.76C173.315 15.0933 173.735 15.5067 174.002 16V14.44H175.602V24.04C175.602 25.5067 175.175 26.6267 174.322 27.4C173.482 28.1733 172.349 28.56 170.922 28.56ZM167.702 19.24C167.702 20.3467 167.995 21.2 168.582 21.8C169.182 22.4 169.929 22.7 170.822 22.7C171.689 22.7 172.429 22.42 173.042 21.86C173.655 21.2867 173.962 20.42 173.962 19.26C173.962 18.1133 173.669 17.24 173.082 16.64C172.495 16.0267 171.762 15.72 170.882 15.72C169.989 15.72 169.235 16.02 168.622 16.62C168.009 17.22 167.702 18.0933 167.702 19.24ZM182.927 24.72C182.02 24.72 181.214 24.5333 180.507 24.16C179.8 23.7733 179.24 23.1933 178.827 22.42C178.414 21.6467 178.207 20.6933 178.207 19.56C178.207 18.52 178.4 17.6 178.787 16.8C179.187 15.9867 179.747 15.36 180.467 14.92C181.2 14.4667 182.04 14.24 182.987 14.24C184.32 14.24 185.387 14.62 186.187 15.38C187 16.1267 187.407 17.2933 187.407 18.88V19.92H179.847C179.9 21.04 180.2 21.88 180.747 22.44C181.307 22.9867 182.054 23.26 182.987 23.26C183.64 23.26 184.194 23.12 184.647 22.84C185.1 22.56 185.427 22.1333 185.627 21.56H187.227C187 22.6133 186.487 23.4067 185.687 23.94C184.9 24.46 183.98 24.72 182.927 24.72ZM185.787 18.52C185.787 16.64 184.86 15.7 183.007 15.7C182.127 15.7 181.42 15.9533 180.887 16.46C180.367 16.9533 180.04 17.64 179.907 18.52H185.787ZM190.098 14.44H191.698V16.34C192.018 15.6867 192.478 15.1733 193.078 14.8C193.678 14.4267 194.412 14.24 195.278 14.24C196.385 14.24 197.232 14.5467 197.818 15.16C198.405 15.76 198.698 16.6067 198.698 17.7V24.5H197.058V17.96C197.058 17.2267 196.852 16.6667 196.438 16.28C196.025 15.8933 195.485 15.7 194.818 15.7C194.258 15.7 193.738 15.84 193.258 16.12C192.792 16.3867 192.418 16.78 192.138 17.3C191.872 17.82 191.738 18.4267 191.738 19.12V24.5H190.098V14.44ZM205.213 24.5C204.373 24.5 203.733 24.2867 203.293 23.86C202.853 23.42 202.633 22.78 202.633 21.94V15.88H200.693V14.44H202.633V11.68L204.273 11.22V14.44H206.613V15.88H204.273V21.72C204.273 22.1867 204.366 22.5267 204.553 22.74C204.74 22.9533 205.06 23.06 205.513 23.06H206.833V24.5H205.213Z" fill="#8056B0"/>    <defs>    <clipPath id="clip0_396_950">    <rect width="35" height="35" fill="white"/>    </clipPath>    </defs>    </svg>    } href="/generativeagent" />

  <Card title="" icon={<svg width="290" height="35" viewBox="0 0 290 35" fill="none" xmlns="http://www.w3.org/2000/svg">    <g clip-path="url(#clip0_396_4116)">    <path fill-rule="evenodd" clip-rule="evenodd" d="M16.6622 8.90571C16.4816 13.0794 13.0776 16.4834 8.90388 16.664L0 16.6731C0.415916 7.65431 7.65249 0.41774 16.6713 0L16.6622 8.90571ZM26.08 16.6622C21.8406 16.4742 18.5097 13.1415 18.3218 8.90388L18.3126 0C27.3315 0.415916 34.568 7.65249 34.9839 16.6713L26.08 16.6622ZM26.08 18.325C21.9063 18.5055 18.5023 21.9095 18.3218 26.0832L18.3126 34.9889C27.3315 34.5731 34.568 27.3365 34.9839 18.3177L26.0782 18.3268L26.08 18.325ZM8.90388 18.3227C13.1433 18.5106 16.4742 21.8434 16.6622 26.081L16.6713 34.9849C7.65249 34.5689 0.415916 27.3324 0 18.3135L8.90388 18.3227Z" fill="#8056B0"/>    </g>    <path d="M50.94 10.5H53.88L59.34 24.5H56.58L55.36 21.2H49.46L48.24 24.5H45.48L50.94 10.5ZM54.52 18.88L52.42 13.14L50.3 18.88H54.52ZM64.3536 24.72C63.2203 24.72 62.3469 24.3867 61.7336 23.72C61.1203 23.0533 60.8136 22.1267 60.8136 20.94V14.2H63.3136V20.6C63.3136 21.24 63.4803 21.7267 63.8136 22.06C64.1603 22.3933 64.6203 22.56 65.1936 22.56C65.8736 22.56 66.4203 22.3067 66.8336 21.8C67.2603 21.2933 67.4736 20.62 67.4736 19.78V14.2H69.9536V24.5H67.6136V22.7C67.3336 23.38 66.9136 23.8867 66.3536 24.22C65.7936 24.5533 65.1269 24.72 64.3536 24.72ZM76.4658 24.5C74.4924 24.5 73.5058 23.52 73.5058 21.56V16.4H71.6658V14.2H73.5058V11.8L76.0058 11.1V14.2H78.1658V16.4H76.0058V21.18C76.0058 21.58 76.0858 21.8733 76.2458 22.06C76.4191 22.2333 76.7058 22.32 77.1058 22.32H78.3858V24.5H76.4658ZM84.9825 24.72C83.9692 24.72 83.0758 24.5067 82.3025 24.08C81.5292 23.64 80.9225 23.02 80.4825 22.22C80.0558 21.4067 79.8425 20.4533 79.8425 19.36C79.8425 18.2667 80.0558 17.32 80.4825 16.52C80.9225 15.72 81.5292 15.1067 82.3025 14.68C83.0758 14.24 83.9692 14.02 84.9825 14.02C85.9958 14.02 86.8892 14.24 87.6625 14.68C88.4492 15.1067 89.0558 15.72 89.4825 16.52C89.9225 17.32 90.1425 18.2667 90.1425 19.36C90.1425 20.4533 89.9225 21.4067 89.4825 22.22C89.0558 23.02 88.4492 23.64 87.6625 24.08C86.8892 24.5067 85.9958 24.72 84.9825 24.72ZM82.3825 19.36C82.3825 20.3467 82.6158 21.1 83.0825 21.62C83.5625 22.1267 84.1958 22.38 84.9825 22.38C85.7825 22.38 86.4158 22.1267 86.8825 21.62C87.3625 21.1 87.6025 20.3467 87.6025 19.36C87.6025 18.3867 87.3625 17.6467 86.8825 17.14C86.4158 16.62 85.7825 16.36 84.9825 16.36C84.1958 16.36 83.5625 16.62 83.0825 17.14C82.6158 17.6467 82.3825 18.3867 82.3825 19.36ZM97.578 24.86C96.538 24.86 95.598 24.66 94.758 24.26C93.9313 23.86 93.2713 23.3 92.778 22.58C92.298 21.8467 92.0446 20.9933 92.018 20.02H93.778C93.8713 21.1267 94.2713 21.9533 94.978 22.5C95.6846 23.0467 96.5713 23.32 97.638 23.32C98.598 23.32 99.3446 23.1133 99.878 22.7C100.425 22.2867 100.698 21.7067 100.698 20.96C100.698 20.28 100.485 19.76 100.058 19.4C99.6446 19.04 99.0513 18.7533 98.278 18.54L95.998 17.9C94.758 17.5533 93.8446 17.0867 93.258 16.5C92.6846 15.9 92.398 15.1067 92.398 14.12C92.398 12.8267 92.838 11.8467 93.718 11.18C94.598 10.5 95.758 10.16 97.198 10.16C98.638 10.16 99.8313 10.5 100.778 11.18C101.725 11.86 102.225 12.8667 102.278 14.2H100.518C100.451 13.32 100.105 12.6867 99.478 12.3C98.8646 11.9 98.0846 11.7 97.138 11.7C96.1913 11.7 95.458 11.8933 94.938 12.28C94.418 12.6667 94.158 13.2533 94.158 14.04C94.158 14.7333 94.3646 15.2533 94.778 15.6C95.2046 15.9333 95.8713 16.2267 96.778 16.48L98.858 17.04C100.058 17.36 100.958 17.7933 101.558 18.34C102.171 18.8733 102.478 19.6667 102.478 20.72C102.478 21.6133 102.258 22.3733 101.818 23C101.391 23.6133 100.805 24.08 100.058 24.4C99.3246 24.7067 98.498 24.86 97.578 24.86ZM108.574 24.72C107.521 24.72 106.688 24.4133 106.074 23.8C105.474 23.1867 105.174 22.34 105.174 21.26V14.44H106.814V21.04C106.814 21.7733 107.014 22.3333 107.414 22.72C107.814 23.1067 108.341 23.3 108.994 23.3C109.874 23.3 110.581 22.9667 111.114 22.3C111.661 21.62 111.934 20.7733 111.934 19.76V14.44H113.574V24.5H111.974V22.64C111.654 23.3067 111.208 23.82 110.634 24.18C110.061 24.54 109.374 24.72 108.574 24.72ZM116.973 14.44H118.573V16.1C118.827 15.5133 119.22 15.06 119.753 14.74C120.287 14.4067 120.893 14.24 121.573 14.24C122.267 14.24 122.873 14.4133 123.393 14.76C123.927 15.0933 124.28 15.5867 124.453 16.24C124.733 15.5867 125.18 15.0933 125.793 14.76C126.407 14.4133 127.08 14.24 127.813 14.24C128.747 14.24 129.52 14.5067 130.133 15.04C130.747 15.5733 131.053 16.3267 131.053 17.3V24.5H129.413V17.82C129.413 17.14 129.227 16.62 128.853 16.26C128.493 15.8867 128.02 15.7 127.433 15.7C126.98 15.7 126.553 15.8133 126.153 16.04C125.753 16.2533 125.433 16.5733 125.193 17C124.953 17.4133 124.833 17.92 124.833 18.52V24.5H123.193V17.82C123.193 17.14 123.007 16.62 122.633 16.26C122.273 15.8867 121.8 15.7 121.213 15.7C120.76 15.7 120.333 15.8133 119.933 16.04C119.533 16.2533 119.213 16.5733 118.973 17C118.733 17.4133 118.613 17.92 118.613 18.52V24.5H116.973V14.44ZM134.356 14.44H135.956V16.1C136.21 15.5133 136.603 15.06 137.136 14.74C137.67 14.4067 138.276 14.24 138.956 14.24C139.65 14.24 140.256 14.4133 140.776 14.76C141.31 15.0933 141.663 15.5867 141.836 16.24C142.116 15.5867 142.563 15.0933 143.176 14.76C143.79 14.4133 144.463 14.24 145.196 14.24C146.13 14.24 146.903 14.5067 147.516 15.04C148.13 15.5733 148.436 16.3267 148.436 17.3V24.5H146.796V17.82C146.796 17.14 146.61 16.62 146.236 16.26C145.876 15.8867 145.403 15.7 144.816 15.7C144.363 15.7 143.936 15.8133 143.536 16.04C143.136 16.2533 142.816 16.5733 142.576 17C142.336 17.4133 142.216 17.92 142.216 18.52V24.5H140.576V17.82C140.576 17.14 140.39 16.62 140.016 16.26C139.656 15.8867 139.183 15.7 138.596 15.7C138.143 15.7 137.716 15.8133 137.316 16.04C136.916 16.2533 136.596 16.5733 136.356 17C136.116 17.4133 135.996 17.92 135.996 18.52V24.5H134.356V14.44ZM154.339 24.72C153.379 24.72 152.586 24.4667 151.959 23.96C151.346 23.4533 151.039 22.7267 151.039 21.78C151.039 20.86 151.319 20.1667 151.879 19.7C152.452 19.22 153.199 18.92 154.119 18.8L156.499 18.48C156.966 18.4267 157.319 18.3133 157.559 18.14C157.812 17.9667 157.939 17.6667 157.939 17.24C157.939 16.7067 157.752 16.3 157.379 16.02C157.006 15.7267 156.446 15.58 155.699 15.58C154.886 15.58 154.246 15.7333 153.779 16.04C153.326 16.3467 153.052 16.8 152.959 17.4H151.279C151.412 16.36 151.866 15.5733 152.639 15.04C153.412 14.5067 154.439 14.24 155.719 14.24C158.292 14.24 159.579 15.32 159.579 17.48V24.5H158.019V22.58C157.686 23.2467 157.206 23.7733 156.579 24.16C155.966 24.5333 155.219 24.72 154.339 24.72ZM152.699 21.68C152.699 22.2133 152.879 22.6133 153.239 22.88C153.599 23.1467 154.072 23.28 154.659 23.28C155.246 23.28 155.786 23.1533 156.279 22.9C156.786 22.6467 157.186 22.2867 157.479 21.82C157.786 21.34 157.939 20.7867 157.939 20.16V19.32C157.526 19.52 156.952 19.6667 156.219 19.76L154.719 19.96C154.159 20.0267 153.679 20.1867 153.279 20.44C152.892 20.68 152.699 21.0933 152.699 21.68ZM162.872 14.44H164.472V16.34C164.965 14.9933 165.939 14.32 167.392 14.32H168.112V15.9H167.472C165.499 15.9 164.512 17.1133 164.512 19.54V24.5H162.872V14.44ZM170.264 26.34H171.304C171.851 26.34 172.277 26.2267 172.584 26C172.904 25.7867 173.151 25.4667 173.324 25.04L173.584 24.38L169.404 14.44H171.184L174.364 22.32L177.344 14.44H179.064L174.724 25.46C174.404 26.2733 173.984 26.86 173.464 27.22C172.944 27.5933 172.231 27.78 171.324 27.78H170.264V26.34Z" fill="#8056B0"/>    <defs>    <clipPath id="clip0_396_4116">    <rect width="35" height="35" fill="white"/>    </clipPath>    </defs>    </svg>    } href="/autosummary" />

  <Card title="" icon={<svg width="290" height="35" viewBox="0 0 290 35" fill="none" xmlns="http://www.w3.org/2000/svg">    <g clip-path="url(#clip0_396_829)">    <path d="M33.1082 17.1006C35.1718 14.1916 35.2874 11.2498 33.3758 8.33721C31.4679 5.43154 28.6419 4.17299 24.9746 4.61829C23.3545 1.56304 20.7923 -0.0634403 17.0976 0.00189421C13.3606 0.0672287 10.8535 1.80719 9.33415 5.01202C5.66504 4.67847 2.91229 6.06597 1.15472 9.0748C-0.601035 12.0802 -0.359116 15.0013 1.91163 17.8073C0.566408 19.6246 -0.0365572 21.5537 0.395966 23.6977C0.83032 25.8434 2.01975 27.5731 3.83048 28.9125C5.65404 30.2621 7.7965 30.532 10.0141 30.2845C11.6233 33.3862 14.2183 34.9438 17.7903 34.9043C21.5071 34.8631 24.159 33.2108 25.6307 29.9269C29.3072 30.2156 32.0599 28.8367 33.8285 25.8331C35.6154 22.7967 35.3167 19.8602 33.1082 17.1006ZM27.3535 8.19622C29.3181 8.68108 30.2987 10.029 30.7972 11.7535C31.0537 12.6407 30.8906 13.5107 30.4159 14.3187C30.3463 14.4357 30.2309 14.5268 30.1062 14.6626C29.0542 14.0196 28.0115 13.4384 27.2252 12.5324C26.4225 11.6091 26.2776 10.4554 25.9826 9.28799C25.8781 8.84784 25.9441 8.41801 26.0339 8.10165C26.4664 8.06383 26.9063 8.08618 27.3553 8.19622H27.3535ZM22.2182 9.38084C22.1779 10.3832 22.5718 11.6452 22.5718 11.6452H22.5737C23.1602 13.6912 24.4577 15.2971 26.296 16.5625C26.6992 16.841 27.1115 17.111 27.5202 17.3826C27.0401 17.5614 26.5581 17.7711 26.2905 17.9706C24.8335 18.9334 23.8951 20.2693 23.2665 21.8236C22.8175 22.936 22.7204 24.1051 22.5939 25.2709C21.9176 24.9786 21.4466 24.8445 21.4466 24.8445C21.0306 24.7053 20.6732 24.5523 20.2975 24.4628C18.2192 23.9625 16.1904 24.1326 14.2202 24.9133C13.6576 25.1368 13.1004 25.374 12.5432 25.6113C12.6275 25.2176 12.6258 24.3545 12.6258 24.3545C12.4186 22.7349 11.7406 21.356 10.7123 20.1163C9.95361 19.2034 8.97311 18.5259 7.98344 17.8485C7.89546 17.7884 7.80749 17.7281 7.71952 17.668C8.25468 17.3001 8.82466 16.8875 9.32499 16.4782C9.33415 16.4714 9.34148 16.4645 9.35064 16.4576C9.36531 16.4456 9.37997 16.4335 9.39463 16.4215C9.44228 16.382 9.4881 16.3424 9.52842 16.3011C10.0049 15.8747 10.41 15.3796 10.7655 14.8535C11.6782 13.5055 12.1803 12.0252 12.316 10.4141C12.338 10.1476 12.3582 9.88114 12.3783 9.61295C13.1261 9.92758 13.5604 10.0256 13.5604 10.0256C14.4401 10.4159 15.3161 10.6136 16.2362 10.6875C18.1843 10.844 19.9841 10.378 21.7215 9.59919C21.8865 9.52526 22.0514 9.45133 22.2164 9.3774L22.2182 9.38084ZM16.6577 3.60905C17.8398 3.53683 18.9743 3.64687 19.9823 4.3071C20.5431 4.67503 20.9719 5.14097 21.2633 5.77884C20.1656 6.33935 19.0952 6.88437 17.8728 7.06662C16.6303 7.25231 15.4683 6.88266 14.2422 6.45626C13.806 6.317 13.4467 6.08317 13.1627 5.84246C13.817 4.54609 15.098 3.70533 16.6577 3.60905ZM5.19586 9.86054C6.06091 8.92522 7.16604 8.47304 8.59006 8.49366C8.66337 10.9781 8.16671 13.1462 5.73835 14.4941C5.73835 14.4941 5.23252 14.7641 4.51592 15.0632C3.25868 13.3353 3.86714 11.2996 5.19403 9.86221L5.19586 9.86054ZM5.75851 25.7472C4.77618 24.9098 4.22452 23.8249 4.0779 22.587C3.97893 21.76 4.30333 21.0242 4.71203 20.3261C5.51843 20.5256 7.14222 21.6397 7.75618 22.3601C8.54791 23.2885 8.75317 24.4198 8.97493 25.6199C8.97493 25.6199 9.05557 26.1185 9.07023 26.7753C7.80749 26.9816 6.70786 26.5587 5.75851 25.7505V25.7472ZM14.8525 30.4874C14.4071 30.1692 14.0882 29.6947 13.6246 29.1996C14.8104 28.5445 15.8916 27.9961 17.1525 27.8551C18.3859 27.7175 19.5717 27.9376 20.7538 28.5221C21.1296 28.7336 21.4631 28.9812 21.7472 29.2202C20.3708 31.6909 16.8117 31.8817 14.8525 30.4874ZM30.964 23.0667C30.5461 24.2393 29.8808 25.2314 28.7097 25.8829C28.0243 26.2647 27.315 26.4297 26.4353 26.3059C26.3198 25.1574 26.4884 24.0485 26.8989 22.967C27.3242 21.8442 28.2331 21.0808 29.1935 20.4052C29.1935 20.4052 29.8185 20.0373 30.5185 19.9444C30.5974 20.0648 30.6725 20.1886 30.7403 20.3175C31.2021 21.2133 31.3011 22.1211 30.964 23.0667Z" fill="#8056B0"/>    </g>    <path d="M50.94 10.5H53.88L59.34 24.5H56.58L55.36 21.2H49.46L48.24 24.5H45.48L50.94 10.5ZM54.52 18.88L52.42 13.14L50.3 18.88H54.52ZM64.3536 24.72C63.2203 24.72 62.3469 24.3867 61.7336 23.72C61.1203 23.0533 60.8136 22.1267 60.8136 20.94V14.2H63.3136V20.6C63.3136 21.24 63.4803 21.7267 63.8136 22.06C64.1603 22.3933 64.6203 22.56 65.1936 22.56C65.8736 22.56 66.4203 22.3067 66.8336 21.8C67.2603 21.2933 67.4736 20.62 67.4736 19.78V14.2H69.9536V24.5H67.6136V22.7C67.3336 23.38 66.9136 23.8867 66.3536 24.22C65.7936 24.5533 65.1269 24.72 64.3536 24.72ZM76.4658 24.5C74.4924 24.5 73.5058 23.52 73.5058 21.56V16.4H71.6658V14.2H73.5058V11.8L76.0058 11.1V14.2H78.1658V16.4H76.0058V21.18C76.0058 21.58 76.0858 21.8733 76.2458 22.06C76.4191 22.2333 76.7058 22.32 77.1058 22.32H78.3858V24.5H76.4658ZM84.9825 24.72C83.9692 24.72 83.0758 24.5067 82.3025 24.08C81.5292 23.64 80.9225 23.02 80.4825 22.22C80.0558 21.4067 79.8425 20.4533 79.8425 19.36C79.8425 18.2667 80.0558 17.32 80.4825 16.52C80.9225 15.72 81.5292 15.1067 82.3025 14.68C83.0758 14.24 83.9692 14.02 84.9825 14.02C85.9958 14.02 86.8892 14.24 87.6625 14.68C88.4492 15.1067 89.0558 15.72 89.4825 16.52C89.9225 17.32 90.1425 18.2667 90.1425 19.36C90.1425 20.4533 89.9225 21.4067 89.4825 22.22C89.0558 23.02 88.4492 23.64 87.6625 24.08C86.8892 24.5067 85.9958 24.72 84.9825 24.72ZM82.3825 19.36C82.3825 20.3467 82.6158 21.1 83.0825 21.62C83.5625 22.1267 84.1958 22.38 84.9825 22.38C85.7825 22.38 86.4158 22.1267 86.8825 21.62C87.3625 21.1 87.6025 20.3467 87.6025 19.36C87.6025 18.3867 87.3625 17.6467 86.8825 17.14C86.4158 16.62 85.7825 16.36 84.9825 16.36C84.1958 16.36 83.5625 16.62 83.0825 17.14C82.6158 17.6467 82.3825 18.3867 82.3825 19.36ZM96.058 12.08H91.318V10.5H102.478V12.08H97.738V24.5H96.058V12.08ZM103.77 14.44H105.37V16.34C105.864 14.9933 106.837 14.32 108.29 14.32H109.01V15.9H108.37C106.397 15.9 105.41 17.1133 105.41 19.54V24.5H103.77V14.44ZM113.616 24.72C112.656 24.72 111.863 24.4667 111.236 23.96C110.623 23.4533 110.316 22.7267 110.316 21.78C110.316 20.86 110.596 20.1667 111.156 19.7C111.73 19.22 112.476 18.92 113.396 18.8L115.776 18.48C116.243 18.4267 116.596 18.3133 116.836 18.14C117.09 17.9667 117.216 17.6667 117.216 17.24C117.216 16.7067 117.03 16.3 116.656 16.02C116.283 15.7267 115.723 15.58 114.976 15.58C114.163 15.58 113.523 15.7333 113.056 16.04C112.603 16.3467 112.33 16.8 112.236 17.4H110.556C110.69 16.36 111.143 15.5733 111.916 15.04C112.69 14.5067 113.716 14.24 114.996 14.24C117.57 14.24 118.856 15.32 118.856 17.48V24.5H117.296V22.58C116.963 23.2467 116.483 23.7733 115.856 24.16C115.243 24.5333 114.496 24.72 113.616 24.72ZM111.976 21.68C111.976 22.2133 112.156 22.6133 112.516 22.88C112.876 23.1467 113.35 23.28 113.936 23.28C114.523 23.28 115.063 23.1533 115.556 22.9C116.063 22.6467 116.463 22.2867 116.756 21.82C117.063 21.34 117.216 20.7867 117.216 20.16V19.32C116.803 19.52 116.23 19.6667 115.496 19.76L113.996 19.96C113.436 20.0267 112.956 20.1867 112.556 20.44C112.17 20.68 111.976 21.0933 111.976 21.68ZM122.149 14.44H123.749V16.34C124.069 15.6867 124.529 15.1733 125.129 14.8C125.729 14.4267 126.463 14.24 127.329 14.24C128.436 14.24 129.283 14.5467 129.869 15.16C130.456 15.76 130.749 16.6067 130.749 17.7V24.5H129.109V17.96C129.109 17.2267 128.903 16.6667 128.489 16.28C128.076 15.8933 127.536 15.7 126.869 15.7C126.309 15.7 125.789 15.84 125.309 16.12C124.843 16.3867 124.469 16.78 124.189 17.3C123.923 17.82 123.789 18.4267 123.789 19.12V24.5H122.149V14.44ZM137.724 24.72C136.55 24.72 135.537 24.4467 134.684 23.9C133.83 23.34 133.35 22.5133 133.244 21.42H134.924C135.044 22.1 135.364 22.5933 135.884 22.9C136.417 23.1933 137.064 23.34 137.824 23.34C138.517 23.34 139.057 23.22 139.444 22.98C139.83 22.74 140.024 22.3733 140.024 21.88C140.024 21.4133 139.85 21.0733 139.504 20.86C139.157 20.6333 138.637 20.4533 137.944 20.32L136.604 20.06C135.644 19.8733 134.884 19.5733 134.324 19.16C133.764 18.7467 133.484 18.0933 133.484 17.2C133.484 16.2267 133.83 15.4933 134.524 15C135.23 14.4933 136.164 14.24 137.324 14.24C138.524 14.24 139.477 14.5067 140.184 15.04C140.904 15.56 141.31 16.3133 141.404 17.3H139.724C139.67 16.7133 139.424 16.28 138.984 16C138.544 15.72 137.964 15.58 137.244 15.58C136.55 15.58 136.017 15.7067 135.644 15.96C135.284 16.2133 135.104 16.58 135.104 17.06C135.104 17.54 135.277 17.8933 135.624 18.12C135.97 18.3467 136.477 18.5267 137.144 18.66L138.284 18.88C138.977 19.0133 139.557 19.1667 140.024 19.34C140.49 19.5133 140.877 19.7867 141.184 20.16C141.49 20.5333 141.644 21.0333 141.644 21.66C141.644 22.66 141.27 23.42 140.524 23.94C139.777 24.46 138.844 24.72 137.724 24.72ZM148.239 24.72C147.212 24.72 146.346 24.4933 145.639 24.04C144.932 23.5733 144.406 22.9533 144.059 22.18C143.712 21.3933 143.539 20.52 143.539 19.56C143.539 18.5733 143.726 17.68 144.099 16.88C144.472 16.0667 145.026 15.4267 145.759 14.96C146.506 14.48 147.399 14.24 148.439 14.24C149.652 14.24 150.639 14.56 151.399 15.2C152.159 15.8267 152.579 16.7133 152.659 17.86H150.979C150.939 17.18 150.686 16.66 150.219 16.3C149.766 15.94 149.166 15.76 148.419 15.76C147.339 15.76 146.532 16.1067 145.999 16.8C145.479 17.48 145.219 18.3733 145.219 19.48C145.219 20.5867 145.479 21.4867 145.999 22.18C146.519 22.86 147.292 23.2 148.319 23.2C149.092 23.2 149.712 23.0133 150.179 22.64C150.646 22.2533 150.912 21.6933 150.979 20.96H152.659C152.552 22.1333 152.099 23.0533 151.299 23.72C150.499 24.3867 149.479 24.72 148.239 24.72ZM155.352 14.44H156.952V16.34C157.446 14.9933 158.419 14.32 159.872 14.32H160.592V15.9H159.952C157.979 15.9 156.992 17.1133 156.992 19.54V24.5H155.352V14.44ZM162.754 14.44H164.394V24.5H162.754V14.44ZM162.654 10.38H164.494V12.4H162.654V10.38ZM172.835 24.72C171.995 24.72 171.268 24.54 170.655 24.18C170.055 23.8067 169.608 23.3267 169.315 22.74V24.5H167.755V10.28H169.395V16.32C169.688 15.72 170.128 15.2267 170.715 14.84C171.315 14.44 172.048 14.24 172.915 14.24C173.915 14.24 174.748 14.48 175.415 14.96C176.095 15.4267 176.588 16.0533 176.895 16.84C177.215 17.6133 177.375 18.46 177.375 19.38C177.375 20.3133 177.215 21.1867 176.895 22C176.575 22.8 176.075 23.4533 175.395 23.96C174.715 24.4667 173.861 24.72 172.835 24.72ZM169.395 19.58C169.395 20.62 169.655 21.4933 170.175 22.2C170.708 22.8933 171.508 23.24 172.575 23.24C173.655 23.24 174.441 22.88 174.935 22.16C175.428 21.44 175.675 20.5333 175.675 19.44C175.675 18.3733 175.435 17.5 174.955 16.82C174.488 16.1267 173.721 15.78 172.655 15.78C171.561 15.78 170.741 16.14 170.195 16.86C169.661 17.5667 169.395 18.4733 169.395 19.58ZM184.099 24.72C183.192 24.72 182.386 24.5333 181.679 24.16C180.972 23.7733 180.412 23.1933 179.999 22.42C179.586 21.6467 179.379 20.6933 179.379 19.56C179.379 18.52 179.572 17.6 179.959 16.8C180.359 15.9867 180.919 15.36 181.639 14.92C182.372 14.4667 183.212 14.24 184.159 14.24C185.492 14.24 186.559 14.62 187.359 15.38C188.172 16.1267 188.579 17.2933 188.579 18.88V19.92H181.019C181.072 21.04 181.372 21.88 181.919 22.44C182.479 22.9867 183.226 23.26 184.159 23.26C184.812 23.26 185.366 23.12 185.819 22.84C186.272 22.56 186.599 22.1333 186.799 21.56H188.399C188.172 22.6133 187.659 23.4067 186.859 23.94C186.072 24.46 185.152 24.72 184.099 24.72ZM186.959 18.52C186.959 16.64 186.032 15.7 184.179 15.7C183.299 15.7 182.592 15.9533 182.059 16.46C181.539 16.9533 181.212 17.64 181.079 18.52H186.959Z" fill="#8056B0"/>    <defs>    <clipPath id="clip0_396_829">    <rect width="35" height="35" fill="white"/>    </clipPath>    </defs>    </svg>    } href="/autotranscribe" />

  <Card
    title=""
    icon={<svg width="290" height="28" viewBox="0 0 290 28" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_596_1469)"><mask id="mask0_596_1469" maskUnits="userSpaceOnUse" x="0" y="0" width="29" height="28"><path d="M28.1908 0.0454102H0.074707V27.9305H28.1908V0.0454102Z" fill="white"/></mask><g mask="url(#mask0_596_1469)"><path d="M27.0084 8.73542C28.3256 5.5162 26.8155 1.82558 23.6355 0.492155C20.4554 -0.841271 16.8097 0.687432 15.4924 3.90661C14.1752 7.12579 15.6853 10.8164 18.8654 12.1498C22.0454 13.4833 25.6912 11.9545 27.0084 8.73542Z" fill="#8056B0"/><path d="M6.42546 14.7644C2.98136 14.7644 0.189941 17.6033 0.189941 21.1059C0.189941 24.6086 2.98136 27.4475 6.42546 27.4475C9.86956 27.4475 12.661 24.6086 12.661 21.1059C12.661 17.6033 9.86956 14.7644 6.42546 14.7644Z" fill="#8056B0"/><path d="M27.7115 20.4998C27.4349 17.6213 25.1955 15.2666 22.3733 14.8874C22.0404 14.841 21.71 14.8246 21.3878 14.8328C19.1108 14.8874 16.8983 14.0743 15.2871 12.4373L14.9702 12.1153C13.4478 10.5683 12.6207 8.47008 12.6046 6.28183C12.6046 6.04446 12.5885 5.80436 12.559 5.55879C12.2099 2.63388 9.85232 0.303778 6.96571 0.0418456C3.09098 -0.304669 -0.128562 2.96402 0.215142 6.9012C0.470235 9.8343 2.76607 12.2326 5.6446 12.5873C5.88358 12.6173 6.11987 12.631 6.35349 12.6337C8.50699 12.6501 10.5719 13.4904 12.0944 15.0375L13.0772 16.0361C14.4869 17.4685 15.2415 19.4057 15.3328 21.4303C15.3381 21.5503 15.3462 21.6704 15.3596 21.7932C15.6765 24.8954 18.2569 27.3401 21.3234 27.4438C25.0559 27.5693 28.082 24.3443 27.7115 20.5025V20.4998Z" fill="#8056B0"/></g></g><path d="M43.94 7H46.88L52.34 21H49.58L48.36 17.7H42.46L41.24 21H38.48L43.94 7ZM47.52 15.38L45.42 9.64L43.3 15.38H47.52ZM59.2136 21.36C58.1603 21.36 57.1869 21.16 56.2936 20.76C55.4136 20.36 54.7069 19.78 54.1736 19.02C53.6403 18.2467 53.3536 17.3267 53.3136 16.26H55.9336C56.1869 18.14 57.3003 19.08 59.2736 19.08C60.1003 19.08 60.7336 18.92 61.1736 18.6C61.6136 18.28 61.8336 17.8333 61.8336 17.26C61.8336 16.7533 61.6603 16.3667 61.3136 16.1C60.9669 15.82 60.4736 15.5933 59.8336 15.42L57.7936 14.92C56.3936 14.5867 55.3603 14.1067 54.6936 13.48C54.0403 12.8533 53.7136 11.9933 53.7136 10.9C53.7136 9.51333 54.1869 8.46 55.1336 7.74C56.0936 7.02 57.3336 6.66 58.8536 6.66C60.3869 6.66 61.6603 7.04 62.6736 7.8C63.6869 8.54667 64.2203 9.63333 64.2736 11.06H61.6536C61.4936 9.64667 60.5403 8.94 58.7936 8.94C57.9803 8.94 57.3603 9.09333 56.9336 9.4C56.5203 9.70667 56.3136 10.1533 56.3136 10.74C56.3136 11.3 56.5003 11.72 56.8736 12C57.2469 12.2667 57.8203 12.5 58.5936 12.7L60.5736 13.18C61.8936 13.5 62.8736 13.9467 63.5136 14.52C64.1536 15.08 64.4736 15.8933 64.4736 16.96C64.4736 17.8933 64.2336 18.6933 63.7536 19.36C63.2869 20.0133 62.6536 20.5133 61.8536 20.86C61.0669 21.1933 60.1869 21.36 59.2136 21.36ZM70.9127 7H73.8527L79.3127 21H76.5527L75.3327 17.7H69.4327L68.2127 21H65.4527L70.9127 7ZM74.4927 15.38L72.3927 9.64L70.2727 15.38H74.4927ZM81.4769 7H87.8769C88.8235 7 89.6302 7.20667 90.2969 7.62C90.9769 8.02 91.4835 8.56 91.8169 9.24C92.1635 9.90667 92.3369 10.6267 92.3369 11.4C92.3369 12.24 92.1502 13.0133 91.7769 13.72C91.4169 14.4267 90.8835 14.9933 90.1769 15.42C89.4702 15.8333 88.6169 16.04 87.6169 16.04H84.0369V21H81.4769V7ZM87.3969 13.68C88.1435 13.68 88.7169 13.48 89.1169 13.08C89.5169 12.68 89.7169 12.1467 89.7169 11.48C89.7169 10.84 89.5235 10.3333 89.1369 9.96C88.7502 9.58667 88.1902 9.4 87.4569 9.4H84.0369V13.68H87.3969ZM94.7972 7H101.197C102.144 7 102.951 7.20667 103.617 7.62C104.297 8.02 104.804 8.56 105.137 9.24C105.484 9.90667 105.657 10.6267 105.657 11.4C105.657 12.24 105.471 13.0133 105.097 13.72C104.737 14.4267 104.204 14.9933 103.497 15.42C102.791 15.8333 101.937 16.04 100.937 16.04H97.3572V21H94.7972V7ZM100.717 13.68C101.464 13.68 102.037 13.48 102.437 13.08C102.837 12.68 103.037 12.1467 103.037 11.48C103.037 10.84 102.844 10.3333 102.457 9.96C102.071 9.58667 101.511 9.4 100.777 9.4H97.3572V13.68H100.717ZM108.338 7H110.798L115.258 19.06L119.718 7H122.178V21H120.538V9.22L116.118 21H114.398L109.978 9.22V21H108.338V7ZM129.794 21.22C128.888 21.22 128.081 21.0333 127.374 20.66C126.668 20.2733 126.108 19.6933 125.694 18.92C125.281 18.1467 125.074 17.1933 125.074 16.06C125.074 15.02 125.268 14.1 125.654 13.3C126.054 12.4867 126.614 11.86 127.334 11.42C128.068 10.9667 128.908 10.74 129.854 10.74C131.188 10.74 132.254 11.12 133.054 11.88C133.868 12.6267 134.274 13.7933 134.274 15.38V16.42H126.714C126.768 17.54 127.068 18.38 127.614 18.94C128.174 19.4867 128.921 19.76 129.854 19.76C130.508 19.76 131.061 19.62 131.514 19.34C131.968 19.06 132.294 18.6333 132.494 18.06H134.094C133.868 19.1133 133.354 19.9067 132.554 20.44C131.768 20.96 130.848 21.22 129.794 21.22ZM132.654 15.02C132.654 13.14 131.728 12.2 129.874 12.2C128.994 12.2 128.288 12.4533 127.754 12.96C127.234 13.4533 126.908 14.14 126.774 15.02H132.654ZM140.646 21.22C139.472 21.22 138.459 20.9467 137.606 20.4C136.752 19.84 136.272 19.0133 136.166 17.92H137.846C137.966 18.6 138.286 19.0933 138.806 19.4C139.339 19.6933 139.986 19.84 140.746 19.84C141.439 19.84 141.979 19.72 142.366 19.48C142.752 19.24 142.946 18.8733 142.946 18.38C142.946 17.9133 142.772 17.5733 142.426 17.36C142.079 17.1333 141.559 16.9533 140.866 16.82L139.526 16.56C138.566 16.3733 137.806 16.0733 137.246 15.66C136.686 15.2467 136.406 14.5933 136.406 13.7C136.406 12.7267 136.752 11.9933 137.446 11.5C138.152 10.9933 139.086 10.74 140.246 10.74C141.446 10.74 142.399 11.0067 143.106 11.54C143.826 12.06 144.232 12.8133 144.326 13.8H142.646C142.592 13.2133 142.346 12.78 141.906 12.5C141.466 12.22 140.886 12.08 140.166 12.08C139.472 12.08 138.939 12.2067 138.566 12.46C138.206 12.7133 138.026 13.08 138.026 13.56C138.026 14.04 138.199 14.3933 138.546 14.62C138.892 14.8467 139.399 15.0267 140.066 15.16L141.206 15.38C141.899 15.5133 142.479 15.6667 142.946 15.84C143.412 16.0133 143.799 16.2867 144.106 16.66C144.412 17.0333 144.566 17.5333 144.566 18.16C144.566 19.16 144.192 19.92 143.446 20.44C142.699 20.96 141.766 21.22 140.646 21.22ZM150.841 21.22C149.668 21.22 148.654 20.9467 147.801 20.4C146.948 19.84 146.468 19.0133 146.361 17.92H148.041C148.161 18.6 148.481 19.0933 149.001 19.4C149.534 19.6933 150.181 19.84 150.941 19.84C151.634 19.84 152.174 19.72 152.561 19.48C152.948 19.24 153.141 18.8733 153.141 18.38C153.141 17.9133 152.968 17.5733 152.621 17.36C152.274 17.1333 151.754 16.9533 151.061 16.82L149.721 16.56C148.761 16.3733 148.001 16.0733 147.441 15.66C146.881 15.2467 146.601 14.5933 146.601 13.7C146.601 12.7267 146.948 11.9933 147.641 11.5C148.348 10.9933 149.281 10.74 150.441 10.74C151.641 10.74 152.594 11.0067 153.301 11.54C154.021 12.06 154.428 12.8133 154.521 13.8H152.841C152.788 13.2133 152.541 12.78 152.101 12.5C151.661 12.22 151.081 12.08 150.361 12.08C149.668 12.08 149.134 12.2067 148.761 12.46C148.401 12.7133 148.221 13.08 148.221 13.56C148.221 14.04 148.394 14.3933 148.741 14.62C149.088 14.8467 149.594 15.0267 150.261 15.16L151.401 15.38C152.094 15.5133 152.674 15.6667 153.141 15.84C153.608 16.0133 153.994 16.2867 154.301 16.66C154.608 17.0333 154.761 17.5333 154.761 18.16C154.761 19.16 154.388 19.92 153.641 20.44C152.894 20.96 151.961 21.22 150.841 21.22ZM159.956 21.22C158.996 21.22 158.203 20.9667 157.576 20.46C156.963 19.9533 156.656 19.2267 156.656 18.28C156.656 17.36 156.936 16.6667 157.496 16.2C158.07 15.72 158.816 15.42 159.736 15.3L162.116 14.98C162.583 14.9267 162.936 14.8133 163.176 14.64C163.43 14.4667 163.556 14.1667 163.556 13.74C163.556 13.2067 163.37 12.8 162.996 12.52C162.623 12.2267 162.063 12.08 161.316 12.08C160.503 12.08 159.863 12.2333 159.396 12.54C158.943 12.8467 158.67 13.3 158.576 13.9H156.896C157.03 12.86 157.483 12.0733 158.256 11.54C159.03 11.0067 160.056 10.74 161.336 10.74C163.91 10.74 165.196 11.82 165.196 13.98V21H163.636V19.08C163.303 19.7467 162.823 20.2733 162.196 20.66C161.583 21.0333 160.836 21.22 159.956 21.22ZM158.316 18.18C158.316 18.7133 158.496 19.1133 158.856 19.38C159.216 19.6467 159.69 19.78 160.276 19.78C160.863 19.78 161.403 19.6533 161.896 19.4C162.403 19.1467 162.803 18.7867 163.096 18.32C163.403 17.84 163.556 17.2867 163.556 16.66V15.82C163.143 16.02 162.57 16.1667 161.836 16.26L160.336 16.46C159.776 16.5267 159.296 16.6867 158.896 16.94C158.51 17.18 158.316 17.5933 158.316 18.18ZM172.789 25.06C171.509 25.06 170.449 24.7467 169.609 24.12C168.769 23.5067 168.296 22.6533 168.189 21.56H169.829C169.922 22.2133 170.216 22.7333 170.709 23.12C171.216 23.5067 171.916 23.7 172.809 23.7C174.849 23.7 175.869 22.7 175.869 20.7V18.68C175.562 19.3333 175.089 19.8267 174.449 20.16C173.809 20.4933 173.122 20.66 172.389 20.66C171.562 20.66 170.809 20.4733 170.129 20.1C169.449 19.7267 168.902 19.1733 168.489 18.44C168.089 17.6933 167.889 16.7933 167.889 15.74C167.889 14.6467 168.102 13.7267 168.529 12.98C168.956 12.22 169.516 11.66 170.209 11.3C170.916 10.9267 171.689 10.74 172.529 10.74C173.342 10.74 174.036 10.9133 174.609 11.26C175.182 11.5933 175.602 12.0067 175.869 12.5V10.94H177.469V20.54C177.469 22.0067 177.042 23.1267 176.189 23.9C175.349 24.6733 174.216 25.06 172.789 25.06ZM169.569 15.74C169.569 16.8467 169.862 17.7 170.449 18.3C171.049 18.9 171.796 19.2 172.689 19.2C173.556 19.2 174.296 18.92 174.909 18.36C175.522 17.7867 175.829 16.92 175.829 15.76C175.829 14.6133 175.536 13.74 174.949 13.14C174.362 12.5267 173.629 12.22 172.749 12.22C171.856 12.22 171.102 12.52 170.489 13.12C169.876 13.72 169.569 14.5933 169.569 15.74ZM180.734 10.94H182.374V21H180.734V10.94ZM180.634 6.88H182.474V8.9H180.634V6.88ZM185.735 10.94H187.335V12.84C187.655 12.1867 188.115 11.6733 188.715 11.3C189.315 10.9267 190.048 10.74 190.915 10.74C192.022 10.74 192.868 11.0467 193.455 11.66C194.042 12.26 194.335 13.1067 194.335 14.2V21H192.695V14.46C192.695 13.7267 192.488 13.1667 192.075 12.78C191.662 12.3933 191.122 12.2 190.455 12.2C189.895 12.2 189.375 12.34 188.895 12.62C188.428 12.8867 188.055 13.28 187.775 13.8C187.508 14.32 187.375 14.9267 187.375 15.62V21H185.735V10.94ZM201.93 25.06C200.65 25.06 199.59 24.7467 198.75 24.12C197.91 23.5067 197.436 22.6533 197.33 21.56H198.97C199.063 22.2133 199.356 22.7333 199.85 23.12C200.356 23.5067 201.056 23.7 201.95 23.7C203.99 23.7 205.01 22.7 205.01 20.7V18.68C204.703 19.3333 204.23 19.8267 203.59 20.16C202.95 20.4933 202.263 20.66 201.53 20.66C200.703 20.66 199.95 20.4733 199.27 20.1C198.59 19.7267 198.043 19.1733 197.63 18.44C197.23 17.6933 197.03 16.7933 197.03 15.74C197.03 14.6467 197.243 13.7267 197.67 12.98C198.096 12.22 198.656 11.66 199.35 11.3C200.056 10.9267 200.83 10.74 201.67 10.74C202.483 10.74 203.176 10.9133 203.75 11.26C204.323 11.5933 204.743 12.0067 205.01 12.5V10.94H206.61V20.54C206.61 22.0067 206.183 23.1267 205.33 23.9C204.49 24.6733 203.356 25.06 201.93 25.06ZM198.71 15.74C198.71 16.8467 199.003 17.7 199.59 18.3C200.19 18.9 200.936 19.2 201.83 19.2C202.696 19.2 203.436 18.92 204.05 18.36C204.663 17.7867 204.97 16.92 204.97 15.76C204.97 14.6133 204.676 13.74 204.09 13.14C203.503 12.5267 202.77 12.22 201.89 12.22C200.996 12.22 200.243 12.52 199.63 13.12C199.016 13.72 198.71 14.5933 198.71 15.74Z" fill="#8056B0"/><defs><clipPath id="clip0_596_1469"><rect width="28" height="28" fill="white"/></clipPath></defs></svg>}
    href="/messaging-platform"
  />

  <Card title="" href="/autocompose" icon={<svg width="290" height="35" viewBox="0 0 290 35" fill="none" xmlns="http://www.w3.org/2000/svg">    <g clip-path="url(#clip0_396_625)">    <path fill-rule="evenodd" clip-rule="evenodd" d="M4.8561 9.71219C7.53804 9.71219 9.71219 7.53804 9.71219 4.8561C9.71219 2.17415 7.53804 0 4.8561 0C2.17415 0 0 2.17415 0 4.8561C0 7.53804 2.17415 9.71219 4.8561 9.71219ZM30.032 34.8881C32.714 34.8881 34.8881 32.714 34.8881 30.032C34.8881 27.3501 32.714 25.176 30.032 25.176C27.3501 25.176 25.176 27.3501 25.176 30.032C25.176 32.714 27.3501 34.8881 30.032 34.8881ZM12.5594 5.04009C12.5079 3.68957 13.0174 2.32218 14.0879 1.31631L14.0897 1.31444C15.9339 -0.41915 18.8466 -0.432262 20.7057 1.2854C22.7427 3.16884 22.7895 6.34755 20.8471 8.28999C19.8459 9.29118 18.5169 9.76414 17.2057 9.70795C15.254 9.62553 13.3537 10.3373 11.9722 11.7188L11.7203 11.9707C10.3388 13.3521 9.6261 15.2524 9.70945 17.2043C9.7647 18.5155 9.29268 19.8444 8.29149 20.8456C6.34811 22.7881 3.1694 22.7413 1.28691 20.7042C-0.430754 18.8461 -0.417642 15.9323 1.31594 14.0882C2.32181 13.0187 3.6892 12.5092 5.03973 12.5598C6.99996 12.6329 8.91056 11.937 10.2976 10.5499L10.5496 10.298C11.9367 8.91093 12.6335 7.00033 12.5594 5.04009ZM26.6847 13.915C25.6142 14.9217 25.1056 16.2911 25.158 17.6425C25.2339 19.6037 24.5381 21.5152 23.151 22.9031L22.9056 23.1486C21.5177 24.5365 19.6061 25.2315 17.645 25.1557C16.2934 25.1032 14.9251 25.6127 13.9175 26.6822C12.1819 28.5263 12.1679 31.4409 13.8865 33.3C15.769 35.337 18.9477 35.3838 20.8902 33.4414C21.8904 32.4412 22.3633 31.1122 22.3081 29.8019C22.2257 27.8548 22.9393 25.9573 24.3171 24.5797L24.583 24.3136C25.9616 22.9351 27.8582 22.2223 29.8053 22.3047C31.1156 22.3599 32.4445 21.8879 33.4449 20.8867C35.3872 18.9443 35.3404 15.7656 33.3034 13.8831C31.4443 12.1645 28.5288 12.1786 26.6856 13.914L26.6847 13.915ZM25.1467 5.06015C25.0989 3.71244 25.6094 2.3488 26.6789 1.34479L26.676 1.34761C28.5202 -0.383173 31.4311 -0.395349 33.2882 1.32138C35.3262 3.20387 35.3731 6.38352 33.4306 8.32596C32.437 9.31965 31.1191 9.79262 29.8173 9.74485C27.8384 9.6718 25.9109 10.378 24.5108 11.7781L24.329 11.9598C22.9289 13.36 22.2228 15.2874 22.2957 17.2665C22.3435 18.5682 21.8706 19.886 20.8769 20.8797C19.8832 21.8733 18.5654 22.3463 17.2636 22.2985C15.2846 22.2256 13.3572 22.9317 11.957 24.3319L11.7753 24.5136C10.3751 25.9137 9.66897 27.8412 9.74203 29.8201C9.7898 31.122 9.31683 32.4397 8.32313 33.4334C6.38069 35.3759 3.20105 35.3281 1.31855 33.291C-0.398175 31.4339 -0.385999 28.523 1.34478 26.6789C2.34784 25.6094 3.71241 25.0989 5.06014 25.1467C7.01943 25.216 8.92628 24.5182 10.3124 23.1322L10.5559 22.8886C11.9505 21.4941 12.6576 19.5779 12.591 17.6074C12.547 16.3102 13.02 15 14.0099 14.0099C14.9999 13.02 16.3101 12.547 17.6074 12.5911C19.5779 12.6576 21.495 11.9495 22.8886 10.5559L23.1322 10.3124C24.5182 8.9263 25.216 7.01851 25.1467 5.06015Z" fill="#8056B0"/>    </g>    <path d="M50.94 10.5H53.88L59.34 24.5H56.58L55.36 21.2H49.46L48.24 24.5H45.48L50.94 10.5ZM54.52 18.88L52.42 13.14L50.3 18.88H54.52ZM64.3536 24.72C63.2203 24.72 62.3469 24.3867 61.7336 23.72C61.1203 23.0533 60.8136 22.1267 60.8136 20.94V14.2H63.3136V20.6C63.3136 21.24 63.4803 21.7267 63.8136 22.06C64.1603 22.3933 64.6203 22.56 65.1936 22.56C65.8736 22.56 66.4203 22.3067 66.8336 21.8C67.2603 21.2933 67.4736 20.62 67.4736 19.78V14.2H69.9536V24.5H67.6136V22.7C67.3336 23.38 66.9136 23.8867 66.3536 24.22C65.7936 24.5533 65.1269 24.72 64.3536 24.72ZM76.4658 24.5C74.4924 24.5 73.5058 23.52 73.5058 21.56V16.4H71.6658V14.2H73.5058V11.8L76.0058 11.1V14.2H78.1658V16.4H76.0058V21.18C76.0058 21.58 76.0858 21.8733 76.2458 22.06C76.4191 22.2333 76.7058 22.32 77.1058 22.32H78.3858V24.5H76.4658ZM84.9825 24.72C83.9692 24.72 83.0758 24.5067 82.3025 24.08C81.5292 23.64 80.9225 23.02 80.4825 22.22C80.0558 21.4067 79.8425 20.4533 79.8425 19.36C79.8425 18.2667 80.0558 17.32 80.4825 16.52C80.9225 15.72 81.5292 15.1067 82.3025 14.68C83.0758 14.24 83.9692 14.02 84.9825 14.02C85.9958 14.02 86.8892 14.24 87.6625 14.68C88.4492 15.1067 89.0558 15.72 89.4825 16.52C89.9225 17.32 90.1425 18.2667 90.1425 19.36C90.1425 20.4533 89.9225 21.4067 89.4825 22.22C89.0558 23.02 88.4492 23.64 87.6625 24.08C86.8892 24.5067 85.9958 24.72 84.9825 24.72ZM82.3825 19.36C82.3825 20.3467 82.6158 21.1 83.0825 21.62C83.5625 22.1267 84.1958 22.38 84.9825 22.38C85.7825 22.38 86.4158 22.1267 86.8825 21.62C87.3625 21.1 87.6025 20.3467 87.6025 19.36C87.6025 18.3867 87.3625 17.6467 86.8825 17.14C86.4158 16.62 85.7825 16.36 84.9825 16.36C84.1958 16.36 83.5625 16.62 83.0825 17.14C82.6158 17.6467 82.3825 18.3867 82.3825 19.36ZM98.698 24.86C97.2713 24.86 96.0646 24.5267 95.078 23.86C94.0913 23.1933 93.3513 22.3067 92.858 21.2C92.3646 20.08 92.118 18.8533 92.118 17.52C92.118 16.0133 92.4113 14.7067 92.998 13.6C93.598 12.48 94.4113 11.6267 95.438 11.04C96.4646 10.4533 97.6246 10.16 98.918 10.16C99.958 10.16 100.905 10.3533 101.758 10.74C102.611 11.1133 103.298 11.6667 103.818 12.4C104.351 13.12 104.651 13.98 104.718 14.98H102.958C102.851 13.94 102.418 13.14 101.658 12.58C100.911 12.02 99.9646 11.74 98.818 11.74C97.8713 11.74 97.018 11.96 96.258 12.4C95.5113 12.84 94.9246 13.4867 94.498 14.34C94.0713 15.1933 93.858 16.2267 93.858 17.44C93.858 18.52 94.038 19.5067 94.398 20.4C94.7713 21.28 95.3246 21.98 96.058 22.5C96.7913 23.02 97.6913 23.28 98.758 23.28C99.9313 23.28 100.911 22.9667 101.698 22.34C102.485 21.7133 102.925 20.84 103.018 19.72H104.778C104.698 20.8133 104.378 21.7467 103.818 22.52C103.271 23.2933 102.551 23.88 101.658 24.28C100.765 24.6667 99.778 24.86 98.698 24.86ZM111.739 24.72C110.766 24.72 109.912 24.5133 109.179 24.1C108.446 23.6733 107.879 23.0667 107.479 22.28C107.079 21.48 106.879 20.5467 106.879 19.48C106.879 18.4133 107.079 17.4867 107.479 16.7C107.879 15.9 108.446 15.2933 109.179 14.88C109.912 14.4533 110.766 14.24 111.739 14.24C112.712 14.24 113.566 14.4533 114.299 14.88C115.032 15.2933 115.599 15.9 115.999 16.7C116.399 17.4867 116.599 18.4133 116.599 19.48C116.599 20.5467 116.399 21.48 115.999 22.28C115.599 23.0667 115.032 23.6733 114.299 24.1C113.566 24.5133 112.712 24.72 111.739 24.72ZM108.559 19.48C108.559 20.6533 108.846 21.5667 109.419 22.22C109.992 22.8733 110.766 23.2 111.739 23.2C112.712 23.2 113.486 22.8733 114.059 22.22C114.632 21.5667 114.919 20.6533 114.919 19.48C114.919 18.3067 114.632 17.3933 114.059 16.74C113.486 16.0867 112.712 15.76 111.739 15.76C110.766 15.76 109.992 16.0867 109.419 16.74C108.846 17.3933 108.559 18.3067 108.559 19.48ZM119.298 14.44H120.898V16.1C121.151 15.5133 121.544 15.06 122.078 14.74C122.611 14.4067 123.218 14.24 123.898 14.24C124.591 14.24 125.198 14.4133 125.718 14.76C126.251 15.0933 126.604 15.5867 126.778 16.24C127.058 15.5867 127.504 15.0933 128.118 14.76C128.731 14.4133 129.404 14.24 130.138 14.24C131.071 14.24 131.844 14.5067 132.458 15.04C133.071 15.5733 133.378 16.3267 133.378 17.3V24.5H131.738V17.82C131.738 17.14 131.551 16.62 131.178 16.26C130.818 15.8867 130.344 15.7 129.758 15.7C129.304 15.7 128.878 15.8133 128.478 16.04C128.078 16.2533 127.758 16.5733 127.518 17C127.278 17.4133 127.158 17.92 127.158 18.52V24.5H125.518V17.82C125.518 17.14 125.331 16.62 124.958 16.26C124.598 15.8867 124.124 15.7 123.538 15.7C123.084 15.7 122.658 15.8133 122.258 16.04C121.858 16.2533 121.538 16.5733 121.298 17C121.058 17.4133 120.938 17.92 120.938 18.52V24.5H119.298V14.44ZM136.68 14.44H138.28V16.48C138.534 15.8133 138.967 15.2733 139.58 14.86C140.194 14.4467 140.94 14.24 141.82 14.24C142.66 14.24 143.414 14.4267 144.08 14.8C144.76 15.1733 145.294 15.7467 145.68 16.52C146.08 17.2933 146.28 18.2467 146.28 19.38C146.28 21.0733 145.854 22.3533 145 23.22C144.147 24.0733 143.047 24.5 141.7 24.5C140.14 24.5 139.014 23.9133 138.32 22.74V28.34H136.68V14.44ZM138.32 19.38C138.32 20.5933 138.614 21.5067 139.2 22.12C139.787 22.72 140.547 23.02 141.48 23.02C142.414 23.02 143.167 22.72 143.74 22.12C144.314 21.5067 144.6 20.5933 144.6 19.38C144.6 18.18 144.314 17.28 143.74 16.68C143.18 16.08 142.434 15.78 141.5 15.78C140.554 15.78 139.787 16.08 139.2 16.68C138.614 17.2667 138.32 18.1667 138.32 19.38ZM153.145 24.72C152.172 24.72 151.318 24.5133 150.585 24.1C149.852 23.6733 149.285 23.0667 148.885 22.28C148.485 21.48 148.285 20.5467 148.285 19.48C148.285 18.4133 148.485 17.4867 148.885 16.7C149.285 15.9 149.852 15.2933 150.585 14.88C151.318 14.4533 152.172 14.24 153.145 14.24C154.118 14.24 154.972 14.4533 155.705 14.88C156.438 15.2933 157.005 15.9 157.405 16.7C157.805 17.4867 158.005 18.4133 158.005 19.48C158.005 20.5467 157.805 21.48 157.405 22.28C157.005 23.0667 156.438 23.6733 155.705 24.1C154.972 24.5133 154.118 24.72 153.145 24.72ZM149.965 19.48C149.965 20.6533 150.252 21.5667 150.825 22.22C151.398 22.8733 152.172 23.2 153.145 23.2C154.118 23.2 154.892 22.8733 155.465 22.22C156.038 21.5667 156.325 20.6533 156.325 19.48C156.325 18.3067 156.038 17.3933 155.465 16.74C154.892 16.0867 154.118 15.76 153.145 15.76C152.172 15.76 151.398 16.0867 150.825 16.74C150.252 17.3933 149.965 18.3067 149.965 19.48ZM164.384 24.72C163.211 24.72 162.197 24.4467 161.344 23.9C160.491 23.34 160.011 22.5133 159.904 21.42H161.584C161.704 22.1 162.024 22.5933 162.544 22.9C163.077 23.1933 163.724 23.34 164.484 23.34C165.177 23.34 165.717 23.22 166.104 22.98C166.491 22.74 166.684 22.3733 166.684 21.88C166.684 21.4133 166.511 21.0733 166.164 20.86C165.817 20.6333 165.297 20.4533 164.604 20.32L163.264 20.06C162.304 19.8733 161.544 19.5733 160.984 19.16C160.424 18.7467 160.144 18.0933 160.144 17.2C160.144 16.2267 160.491 15.4933 161.184 15C161.891 14.4933 162.824 14.24 163.984 14.24C165.184 14.24 166.137 14.5067 166.844 15.04C167.564 15.56 167.971 16.3133 168.064 17.3H166.384C166.331 16.7133 166.084 16.28 165.644 16C165.204 15.72 164.624 15.58 163.904 15.58C163.211 15.58 162.677 15.7067 162.304 15.96C161.944 16.2133 161.764 16.58 161.764 17.06C161.764 17.54 161.937 17.8933 162.284 18.12C162.631 18.3467 163.137 18.5267 163.804 18.66L164.944 18.88C165.637 19.0133 166.217 19.1667 166.684 19.34C167.151 19.5133 167.537 19.7867 167.844 20.16C168.151 20.5333 168.304 21.0333 168.304 21.66C168.304 22.66 167.931 23.42 167.184 23.94C166.437 24.46 165.504 24.72 164.384 24.72ZM174.919 24.72C174.013 24.72 173.206 24.5333 172.499 24.16C171.793 23.7733 171.233 23.1933 170.819 22.42C170.406 21.6467 170.199 20.6933 170.199 19.56C170.199 18.52 170.393 17.6 170.779 16.8C171.179 15.9867 171.739 15.36 172.459 14.92C173.193 14.4667 174.033 14.24 174.979 14.24C176.313 14.24 177.379 14.62 178.179 15.38C178.993 16.1267 179.399 17.2933 179.399 18.88V19.92H171.839C171.893 21.04 172.193 21.88 172.739 22.44C173.299 22.9867 174.046 23.26 174.979 23.26C175.633 23.26 176.186 23.12 176.639 22.84C177.093 22.56 177.419 22.1333 177.619 21.56H179.219C178.993 22.6133 178.479 23.4067 177.679 23.94C176.893 24.46 175.973 24.72 174.919 24.72ZM177.779 18.52C177.779 16.64 176.853 15.7 174.999 15.7C174.119 15.7 173.413 15.9533 172.879 16.46C172.359 16.9533 172.033 17.64 171.899 18.52H177.779Z" fill="#8056B0"/>    <defs>    <clipPath id="clip0_396_625">    <rect width="35" height="35" fill="white"/>    </clipPath>    </defs>    </svg>    } />
</CardGroup>


# Audit Logs
Source: https://docs.asapp.com/getting-started/setup/audit-logs

Learn how to view, search, and export audit logs to track changes in AI Console.

All activities in AI Console are saved as events and are viewable in audit logs. These logs provide a detailed record of configuration changes made in AI-Console for AI Services and ASAPP Messaging.

These records are saved indefinitely, providing administrators with a comprehensive historical view of changes made to ASAPP services, including when they were made and by whom.

Administrators of your ASAPP organization can access audit logs.

Audit logs allow you to:

* See the most recent changes made to every resource.
* Investigate a particular historical change associated with a deployment.
* Review activity for a given user or product over the course of weeks or months.

To access Audit Logs:

1. Navigate to the AI-Console home page
2. Select Admin

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-4c72fddf-e958-b9d7-08a1-94132217ed81.png" alt="View of the audit logs landing page." />
</Frame>

The following list displays the resources being tracked:

* **General**
  * Links
  * Custom entities
* **Virtual Agent**
  * Flows
  * Intent routing
* **AutoCompose**
  * Global responses

## Audit Logs Entries

For each audit log record, the following fields are recorded:

| Field         | Description                                                                           |
| :------------ | :------------------------------------------------------------------------------------ |
| Resource type | Type of resource modified.                                                            |
| Resource name | Name of the resource modified.                                                        |
| Event type    | Type of event. Supported fields are create, deploy, undeploy, update, and delete.     |
| Environment   | Environment to which the resource was deployed to. Only applicable for deploy events. |
| User          | Name of user who caused the event.                                                    |
| Timestamp     | Time and date the event occurred, in UTC format.                                      |
| Unique ID     | (Optional) Unique identifier for the resource.                                        |

## Searching Audit Logs

Administrators can use the search bar to look for a specific resource name, or user.

To search your audit logs, navigate to the search bar on the top-right corner of the screen.

<Note>
  The search functionality searches for exact matches with either the resource name, or the user that made the change.
</Note>

Additionally, you can filter the results of the audit logs by using the filter dropdown menus.

You can filter by the following fields:

* Resource type
* Event type
* User
* Date

<Tip>
  You can additionally click on the "timestamp" column to re-order the results by ascending or descending dates:

  <Frame>
    <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-0beb7055-4087-4d8b-da5e-d11b5a3c7b54.png" alt="Timestamp column highlighted on the Audit Logs main view." />
  </Frame>
</Tip>

## Exporting Audit Logs

Administrators can download the audit logs as a CSV file to store and review later. If you export the audit logs as a .csv file after filtering them using the search bar or filters, the downloaded file will also be filtered.

To download the audit logs as a .csv file:

1. Navigate to the Audit Logs section in AI Console.
2. Click on the download button, next to the search bar.

Data in audit logs will be recorded from the time the feature is enabled. Historical activity will not be displayed retroactively.


# Manage Users
Source: https://docs.asapp.com/getting-started/setup/manage-users

Learn how to set up and manage users.

You are in control of user management within ASAPP. This includes inviting users, granting access to applications, and assigning specific permissions for features and tooling.

<Warning> Managing users for ASAPP dashboard is separate from the [Digital Agent Desk](/messaging-platform/digital-agent-desk/user-management)</Warning>

Manage users from within the ASAPP dashboard, including [inviting users](#invite-users), deleting users, and managing [application access and permissions](#application-access-and-permissions).

We also support [SSO](#sso), allowing you to manage user access via your own auth system.

## Invite Users

To Invite Users:

* Navigate to Home > Admin > User management
  <Frame>
    <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/getting-started/user-list.png" />
  </Frame>
* Click Invite Users
* Enter in the email and name for the user.
  * By default, users have the "Basic" role, but you may choose others. We will cover roles and permissions further below.
  * You may invite multiple users at once.
  <Frame>
    <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/getting-started/invite-user.png" />
  </Frame>

## Roles and Permissions

Access to ASAPP is managed via roles. A role is a collection of permissions which dictate what UI elements a user has access to.

By default, all users must have the Basic role, allowing them to log in to the dashboard. But you may create and assign as many roles as you like per given user.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/getting-started/role-list.png" />
</Frame>

### Creating a Role

To create a role:

1. Navigate to Home > Admin > Roles & Permissions.
2. Click "Create Role".
3. Enter a name and description for the role.
4. Select the permissions for the role.
5. Optionally, if you are using SSO, [add IDP mapping](#idp-mapping) to the role user.
6. Click "Save Permission".

### IDP Mapping

If you are using SSO, you can map roles in your Identity Provider (IDP) to the roles in ASAPP, allowing you to manage access to ASAPP via your own IDP.

You must work with your ASAPP account team to determine which claim from your IDP contains the roles list.

For each role in ASAPP, you specify one or more roles within your IDP that should be mapped to it. You can map multiple ASAPP roles to the same IDP role.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/getting-started/idp-mapping.png" />
</Frame>

## SSO

ASAPP supports Single Sign-On (SSO). SSO allows you to manage your team's access through an Identity Provider (IDP). ASAPP supports SSO using OpenID Connect and SAML.

When using SSO, your IDP manages the creation and authentication of user accounts, and determines which roles a user should have in ASAPP. You still need to manage the permissions for a given role within ASAPP via [IDP mapping](#idp-mapping).

If you are interested in using SSO, please reach out to your ASAPP account team to get set up.


# ASAPP Messaging
Source: https://docs.asapp.com/messaging-platform

Use ASAPP Messaging to connect your brand to customers via messaging channels.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/messaging-platform/messaging-platform-home.png" />
</Frame>

ASAPP Messaging is an end-to-end AI-native® messaging platform designed for digital customer service. It enhances digital adoption, maintains customer satisfaction (CSAT), and increases contact center capacity efficiently.

At its core, ASAPP Messaging uses an AI-Native design approach. AI is not just an added feature, but the foundation upon which the entire platform is built.

ASAPP Messaging leverages advanced machine learning algorithms and generative AI to provide comprehensive support for digital customer service. This holistic approach benefits agents, leaders, and customers alike, offering a seamless and intelligent messaging experience across various channels.

### Supported Channels

ASAPP Messaging supports [multiple messaging channels](/messaging-platform/integrations), including:

* [Android SDK](/messaging-platform/integrations/android-sdk "Android SDK")
* [Apple Messages for Business](/messaging-platform/integrations/apple-messages-for-business "Apple Messages for Business")
* [iOS SDK](/messaging-platform/integrations/ios-sdk "iOS SDK")
* [Voice](/messaging-platform/integrations/voice "Voice")
* [Web SDK](/messaging-platform/integrations/web-sdk "Web SDK")
* [WhatsApp Business](/messaging-platform/integrations/whatsapp-business "WhatsApp Business")

## How it works

ASAPP Messaging seamlessly integrates with your existing channels, creating a unified ecosystem for customer interactions and agent support. Here's how it enhances the experience for all stakeholders:

**For your customers**:

* Seamlessly connect with your [preferred messaging channels](#implement-messaging-platform) for a consistent brand experience.
* Benefit from intelligent automation with [**Virtual Agent**](#virtual-agent).

**For your agents**:

* Leverage the powerful [**Digital Agent Desk**](#digital-agent-desk).
* Boost productivity with built-in AI-powered tools like **AutoSummary** and **AutoCompose**.

**For your management team**:

* Gain valuable insights with [**Insights Manager**](#insights-manager)

By seamlessly blending AI capabilities with human expertise, ASAPP Messaging elevates your customer service operations to new heights of efficiency and satisfaction.

### Virtual Agent

Virtual Agent is our cutting-edge automation solution that enables:

* Intelligent intent recognition and seamless routing
* Automating common customer inquiries with natural language.
* Handling dynamic input and secure forms.
* Customizable workflows tailored to your brand's unique requirements

<Card title="Virtual Agent" href="messaging-platform/virtual-agent">Learn more about Virtual Agent</Card>

### Digital Agent Desk

Digital Agent Desk is our AI-enhanced app empowering agents to deliver exceptional customer service via messaging:

* Send and receive messages across multiple channels.
* Manage concurrent conversations with intelligent prioritization.
* Access interaction history for context-aware support.
* Use AI tools like AutoCompose, Autopilot, and AutoSummary for faster Average Handle Time (AHT).
* Intuitive interface with integrated knowledge and customer info.

<Card title="Digital Agent Desk" href="messaging-platform/digital-agent-desk">Learn more about Digital Agent Desk</Card>

### Insights Manager

Insights Manager is our powerful analytics tool to optimize contact center operations:

* Identify and respond to customer trends in real-time
* Monitor contact center activity with intuitive dashboards
* Manage conversation volume and agent workload efficiently
* Gain insights through performance analysis and reporting
* Investigate customer interactions for quality and compliance

Insights Manager provides data-driven insights to improve your customer service operations.

<Card title="Insights Manager" href="messaging-platform/insights-manager">Learn more about Insights Manager</Card>

## Implement ASAPP Messaging

To start using ASAPP Messaging, you need to choose the channels your users will engage with, and configure Agent Desk, Virtual Agent, and Insights Manager to meet your needs.

<CardGroup>
  <Card title="Integrations" href="messaging-platform/integrations">Connect ASAPP to your messaging channels.</Card>
  <Card title="Digital Agent Desk" href="messaging-platform/digital-agent-desk">The main application where agents can communicate with customers through chat (message)</Card>
  <Card title="Feature Releases" href="/messaging-platform/feature-releases">View feature release announcements for ASAPP Messaging</Card>
</CardGroup>


# Digital Agent Desk
Source: https://docs.asapp.com/messaging-platform/digital-agent-desk

Use the Digital Agent Desk to empower agents to deliver fast and exceptional customer service.

The Digital Agent Desk for chat is the main application where agents can communicate with customers. The agent can:

* Send and receive messages across multiple channels.
* Manage concurrent conversations with intelligent prioritization.
* Access interaction history for context-aware support.
* Use AI tools like AutoCompose, Autopilot, and AutoSummary for faster Average Handle Time (AHT).
* Intuitive interface with integrated [knowledge base](/messaging-platform/digital-agent-desk/knowledge-base) and customer info.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-93f27193-68fc-f3ac-f3ae-e392d9ad012e.png" />
</Frame>

## AI tools

Digital Agent Desk capture agent conversations and actions to power Machine Learning (ML) models. These models power a number of AI tools that can be used to help agents deliver exceptional customer service.

<AccordionGroup>
  <Accordion title="AutoPilot">
    Automatically send messages to customers based on the conversation context to allow the agent to focus on meaningful parts of a conversation.

    * **AutoPilot Greeting**: Send a greeting message to the customer when the conversation starts.
    * **AutoPilot Ending**: Send a closing message to the customer when the conversation ends.
    * **AutoPilot Timeout**: Automatically handle closing out conversations where the customer has become inactive.

    <Frame>
      <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/messaging-platform/digital-agent-desk/AP-greeting.png" />
    </Frame>
  </Accordion>

  <Accordion title="AutoSuggest">
    Show full responses to your agent based on the conversation context, allowing your agent to just select a response from the list to quickly reply.

    <Frame>
      <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/messaging-platform/digital-agent-desk/AutoSuggest.gif" />
    </Frame>
  </Accordion>

  <Accordion title="AutoComplete">
    As your agent types, suggest new complete responses. Empowers agents to take advantage of the full response library.

    <Frame>
      <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/messaging-platform/digital-agent-desk/AutoComplete.gif" />
    </Frame>
  </Accordion>

  <Accordion title="Phrase-AutoComplete">
    Propose inline completions as your agent types. Streamlining the typing and response process.

    <Frame>
      <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/messaging-platform/digital-agent-desk/Phrase-AutoComplete.gif" />
    </Frame>
  </Accordion>

  <Accordion title="Augmented Library">
    Agents can use a library of pre-written responses either from your own organization or from their own responses.

    <Frame>
      <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/messaging-platform/digital-agent-desk/Augmented-library.jpeg" />
    </Frame>
  </Accordion>

  <Accordion title="AutoSummary">
    Streamline the post-call work by automatically summarizing the conversation.

    <Frame>
      <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/messaging-platform/digital-agent-desk/AutoSummary-overview.png" />
    </Frame>
  </Accordion>
</AccordionGroup>

## Right-Hand Panel

The right-hand panel is the hub for all agent activity. It provides a range of tools like key customer information, conversation history, knowledge base, and more to help agents deliver fast, accurate, and exceptional customer service.

This data can be directly from ASAPP, or from your own CRM or other systems.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/messaging-platform/digital-agent-desk/right-hand-panel.png" />
</Frame>

## Next Steps

<CardGroup>
  <Card title="Agent Desk Navigation" href="/messaging-platform/digital-agent-desk/agent-desk-navigation">Learn how to navigate the Agent Desk</Card>
  <Card title="Knowledge Base" href="/messaging-platform/digital-agent-desk/knowledge-base">Learn how to set up and use the Knowledge Base</Card>
  <Card title="API Integration" href="/messaging-platform/digital-agent-desk/api-integration">Connect your own systems and CRMs to the Agent Desk</Card>
</CardGroup>


# Digital Agent Desk Navigation
Source: https://docs.asapp.com/messaging-platform/digital-agent-desk/agent-desk-navigation

Overview of the Digital Agent Desk navigation and features.

## App Overview

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-93f27193-68fc-f3ac-f3ae-e392d9ad012e.png" />
</Frame>

1. [Main Navigation](#main-navigation)
2. [Conversation](#conversation)
3. [Agent Solutions](#agent-solutions)

## Main Navigation

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-ce93fa3c-084c-af5c-2d6f-c82c814226a6.png" />
</Frame>

### A. Agent Stats

| **Feature** | **Feature Overview**                                                                                                                                      | **Configurability** |
| :---------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------ |
| Agent Stats | Basic statistics related to chats handled since the agent last logged into Agent Desk (Current Session) or to all chats handled in Agent Desk (All Time). | Core                |

### B. Navigation

| **Feature**            | **Feature Overview**                                                                                                                                            | **Configurability** |
| :--------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------ |
| Concurrency Slots      | The agent can see their concurrent chats and available 'Open Slots' directly in Agent Desk.                                                                     | Configurable        |
| Waiting Timers         | A timer will display, both if the customer is waiting and if the agent is waiting. The customer waiting time displays in larger text and with a badge around it | Core                |
| Last Message Preview   | Preview of the last message a customer sent in chat.                                                                                                            | Core                |
| Color Coded Chat Cards | Unique color assigned to each chat card to help distinguish chats.                                                                                              | Core                |
| Copy Tool              | Hover-over tool to easily copy entities across Agent Desk.                                                                                                      | Core                |

### C. Help & Resources

| Feature            | Feature Overview                                                                                                                                                                        | Configurability |
| :----------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------- |
| Agent Feedback     | Text form for agent to send feedback to ASAPP team (available by default; can be disabled if an agent has an active chat, if an agent is in an available status, or in both instances). | Configurable    |
| Keyboard Shortcuts | List of Keyboard Shortcuts. **Ctrl +S**                                                                                                                                                 | Core            |
| Patent Notice      | List of Patents.                                                                                                                                                                        | Core            |

### D. Preferences

| Feature           | Feature Overview                                  | Configurability |
| :---------------- | :------------------------------------------------ | :-------------- |
| Font Size         | Select the Font Size: **Small,Medium**, **Large** | Core            |
| Color Temperature | Adjust the display to reduce eye strain.          | Core            |

### E. Status Switcher & Log Out

| **Feature**  | **Feature Overview**                                                                                                                    | **Configurability** |
| :----------- | :-------------------------------------------------------------------------------------------------------------------------------------- | :------------------ |
| Agent Status | Configurable list of Agent statuses: **Active**, **After Chat Wrap-Up**, **Coaching**, **Lunch/Break**, **Team Meeting**, **Training**. | Configurable        |
| Go to Admin  | Opens the Admin Dashboard in another tab.                                                                                               | Core                |
| Log Out      | Logs out of Digital Agent Desk                                                                                                          | Core                |

## 2. Conversation Navigation

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-732f40a8-2b5c-f9bc-8b02-f7710ef6eb9a.png" />
</Frame>

### A. Status

| **Feature**                               | **Feature Overview**                                                                                                                                                                                                                           | **Configurability** |
| :---------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------ |
| Active/Away Status                        | Configurable list of 'Away' statuses (instead of binary option 'Active' / 'Away').                                                                                                                                                             | Configurable        |
| Auto Log Out Inactivity and After X Hours | If an agent does not move their mouse for over X hours, auto-log them out of Agent Desk.<br /><br />If an agent is logged in for more than X hours, even if they are active, log them out (unless they are in an active chat with a customer). | Configurable        |

### B. Navigation

| **Feature**            | **Feature Overview**                                                                                                                                                        | **Configurability** |
| :--------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------ |
| Waiting Timers         | A timer will display, both if the customer is waiting and if the agent is waiting.<br /><br />The customer waiting time displays in larger text and with a badge around it. | Core                |
| Last Message Preview   | Preview of the last message a customer sent in chat.                                                                                                                        | Core                |
| Color Coded Chat Cards | Unique color assigned to each chat card to help distinguish chats.                                                                                                          | Core                |
| Copy Tool              | Hover-over tool to easily copy entities across Agent Desk.                                                                                                                  | Core                |

## 3. Conversation

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-11a564e7-82a9-dc12-1260-81300dd4ad31.png" />
</Frame>

### A. Conversation Header

| **Feature**                                 | **Feature Overview**                                                                                                                                                                                                                                                                             | **Configurability** |
| :------------------------------------------ | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------ |
| Chat Duration                               | Indication of how long the customer has been chatting and waiting, at the top of the conversation panel.                                                                                                                                                                                         | Core                |
| **Contextual Actions (From Left to Right)** |                                                                                                                                                                                                                                                                                                  |                     |
| Quick Notes                                 | Ability for an agent to type and save notes during a conversation that will save in Conversation History                                                                                                                                                                                         | Configurable        |
| Secure Messaging                            | Ability for an agent to send an invite to customers to share sensitive information (e.g. credit card number) securely.                                                                                                                                                                           | Configurable        |
| Send to Flow                                | Expose **Send Flow** buttons in the center panel drop-down menu that allow an agent to send the customer back to SRS and into a particular automated flow.                                                                                                                                       | Configurable        |
| Autopilot Forms / Quick Send                | Configurable forms and flows to send to customer and remain connected. You can configure deep links and single step flows.                                                                                                                                                                       | Configurable        |
| Co-Browsing                                 | Ability for an agent to send an invitation to a customer to share their screen. The agent has limited capabilities (can scroll, draw, and focus, but can't click or type).                                                                                                                       | Configurable        |
| **End Controls**                            |                                                                                                                                                                                                                                                                                                  |                     |
| Autopilot Timeout (APTO)                    | Allows an agent to initiate an autopilot flow that checks in and eventually times out an unresponsive customer; timeout suggestions can appear after an initial conversation turn with a live agent                                                                                              | Configurable        |
| Timeout                                     | Ability for the agent to timeout a customer.                                                                                                                                                                                                                                                     | Core                |
| Transfer                                    | Ability for the agent to transfer a customer to another queue or individual agent. Queues are only available for transfer if business hours are open, the queue is not paused, and at least one agent in the queue is online. If needed, specific queues can be excluded from the transfer menu. | Configurable        |
| End Chat                                    | Ability for the agent to close an issue.                                                                                                                                                                                                                                                         | Core                |
| Auto Transfer on Agent Disconnect           | If agents disconnect from Agent Desk for over 60 seconds, ASAPP will auto transfer any currently assigned issues to another agent.                                                                                                                                                               | Core                |
| Auto Requeue if Agent is unresponsive       | When a chat is first connected to an agent, give them X seconds to send their first message. If they exceed this timer, auto-reassign the issue to the next available agent.                                                                                                                     | Configurable        |

### B. Conversation

| **Feature**      | **Feature Overview**                                                                           | **Configurability** |
| :--------------- | :--------------------------------------------------------------------------------------------- | :------------------ |
| Chat Log         | Ability to scroll through the customer's previous conversation history.                        | Core                |
| Message Previews | Ability to see a preview of what the customer is typing before the customer sends the message. | Core                |

### C. Composer

| **Feature**        | **Feature Overview**                                                                                                                                                                                                                     | **Configurability** |
| :----------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------ |
| Autosuggest        | Suggested responses before the agent begins typing based on conversational context.                                                                                                                                                      | Core                |
| Autocomplete       | Suggested responses after the agent begins typing based on conversational context.                                                                                                                                                       | Core                |
| Fluency boosting   | If an agent makes a known spelling error while typing and hits the space bar, ASAPP will auto-correct the spelling mistake. The correction is indicated by a blue underline, and the agent may click on the word to undo the correction. | Core                |
| Profanity handling | Generic list of phrases ASAPP disables agents from sending to customers.                                                                                                                                                                 | Core                |

## 4. Agent Solutions

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-d2eade6f-3ea4-2429-1045-0e2e99db52f6.png" />
</Frame>

### Customer Information

| **Feature**          | **Feature Overview**                                                                                                                                   | **Configurability** |
| :------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------ |
| Customer Profile (A) | Displays customer, company, and specific account information for authenticated customers.                                                              | Configurable        |
| Customer History (B) | A separate tab that gives a quick snapshot of each current and historical interaction with the customer, including time, duration, notes, intent, etc. | Core                |
| Copy Tool (C)        | Hover-over tool to easily copy entities across Agent Desk.                                                                                             | Core                |

### Knowledge Base

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-1f560f6b-20ca-c29e-3e32-23ede646e9f0.png" />
</Frame>

| **Feature**                                                                 | **Feature Overview**                                                                                                                                                         | **Configurability**                                                                     |
| :-------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- |
| [Knowledge Base](/messaging-platform/digital-agent-desk/knowledge-base) (A) | Agents can traverse a folder hierarchy of customer company specific content to search, add a favorite, and send content to customers. Select **Favorites** or **All Files**. | Requires you to upload and maintain Knowledge Base content via Admin or an integration. |
| List of Favorites or All Files (B)                                          | Displays your Favorites or All Files.                                                                                                                                        | Configurable                                                                            |
| Knowledge Base Suggestions (C)                                              | Suggests Knowledge Base articles to agents.                                                                                                                                  | Core                                                                                    |
| Contextual Actions (D)                                                      | Agents can attach an article (send to a customer) or make it a favorite.                                                                                                     | Configurable                                                                            |

### Responses

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-c48fc443-2717-5864-de12-fa5ad0053aa9.png" />
</Frame>

<table class="informaltable frame-void rules-rows">
  <tbody>
    <tr>
      <td class="td"><p><strong>Feature</strong></p></td>
      <td class="td"><p><strong>Feature Overview</strong></p></td>
      <td class="td"><p><strong>Configurability</strong></p></td>
    </tr>

    <tr>
      <td class="td"><p>Custom Responses (A)</p></td>

      <td class="td">
        <p>Agents can create, edit, search, and view custom responses in Agent Desk. Agent Desk uses these custom responses in Auto Suggest. Click <strong>+</strong> to create new custom responses. To edit, hover over a response and select <strong>Edit</strong>. Click the <strong>Search</strong> icon to search custom responses.</p>
        <p>If an agent sends something that isn't in their custom library or the global whitelist, ASAPP recommends it back to them from a growing list of their favorites.</p>
      </td>

      <td class="td"><p>Core</p></td>
    </tr>

    <tr>
      <td class="td">
        <p>Global Responses</p>
        <p>(A)</p>
      </td>

      <td class="td"><p>Agents can search, view, and click-to-insert responses from the global whitelist. Click the <strong>Search</strong> icon to search the global responses.</p></td>
      <td class="td"><p>Core</p></td>
    </tr>

    <tr>
      <td class="td"><p>Navigate Folders (B)</p></td>
      <td class="td"><p>In both the custom and global response libraries, agents can navigate into and out of folders.</p></td>
      <td class="td"><p>Core</p></td>
    </tr>

    <tr>
      <td class="td"><p>Uncategorized Custom Responses (C)</p></td>
      <td class="td"><p>Single custom responses that you add but do not categorize into a specific folder display here.</p></td>
      <td class="td"><p>Core</p></td>
    </tr>

    <tr>
      <td class="td"><p>Click-to-Insert (D)</p></td>
      <td class="td"><p>In both the custom and global response libraries, agents can hover over a response and click <strong>Insert</strong> to insert the full text of the selected response into the typing field.</p></td>
      <td class="td"><p>Core</p></td>
    </tr>

    <tr>
      <td class="td"><p>Chat Takeover</p></td>
      <td class="td"><p>Managers can takeover an agent's chat.</p></td>
      <td class="td"><p>Core</p></td>
    </tr>

    <tr>
      <td class="td"><p>Receive attachments</p></td>
      <td class="td"><p>End customers can send pdf attachments to agents in order to provide more information about their case.</p></td>
      <td class="td"><p>Core</p></td>
    </tr>
  </tbody>
</table>

### Chat Takeover

Administrators (either managers or supervisors) have the option to takeover the chat if the need arises.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-2364cb5d-a75d-d186-998c-b13ea21f4265.png" />
</Frame>

### Wrap-Up

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-752f0436-053c-e023-7d09-15b6c0510a64.png" />
</Frame>

| **Feature**              | **Feature Overview**                                              | **Configurability** |
| :----------------------- | :---------------------------------------------------------------- | :------------------ |
| Chat Notes (A)           | Agents can leave notes during a chat and at the end of a chat.    | Core                |
| End Chat Disposition (C) | Ask the customer if the initial intent was correct.               | Core                |
| End Chat Resolution (D)  | Agents can indicate if an issue is resolved or not while closing. | Core                |


# Agent SSO
Source: https://docs.asapp.com/messaging-platform/digital-agent-desk/agent-sso

Learn how to use Single Sign-On (SSO) to authenticate agents and admin users to the Digital Agent Desk.

ASAPP recommends for our customers to use SSO to authenticate agents and admin users to our applications.

In this scenario:

1. ASAPP is the Service Provider (SP) with the customer acting as the Identity Provider (IDP).
2. The customer's authentication system performs user authentication using their existing customer credentials.
3. ASAPP supports Service Provider Initiated SSO. Customers will provide the SSO URL to the agents and admins.
4. The URL points to the customer's SSO service, which will authenticate the users via their authentication system.
5. Once the user is authenticated, the customer's SSO service will send a SAML assertion, which includes some user information to ASAPP's SSO service.
6. ASAPP uses the information inside the SAML assertion to identify the user and redirect them to the appropriate application.

The diagram below illustrates the IDP-initiated SSO flow.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/messaging-platform/digital-agent-desk/AgentDeskSSO.png" />
</Frame>

## Configuring Single Sign-On via SAML

### Environments

ASAPP supports SSO in non-production and production environments. It is strongly recommended that customers configure SSO in both environments as well.

### Exchange of SAML metadata

Both ASAPP and the customer generate their respective SAML metadata and send the metadata files to one another. The metadata will be different for each environment, therefore they need to be generated once per environment.

Sample metadata file content:

```json
<EntityDescriptor xmlns="urn:oasis:names:tc:SAML:2.0:metadata"
entityID="https://auth.asapp.com/auth/realms/hudson">
    <SPSSODescriptor AuthnRequestsSigned="false" WantAssertionsSigned="false"
        protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol
urn:oasis:names:tc:SAML:1.1:protocol http://schemas.xmlsoap.org/ws/2003/07/secext">
    <KeyDescriptor use="encryption">
     <dsig:KeyInfo xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
      <dsig:KeyName>REDACTED</dsig:KeyName>
      <dsig:X509Data>
       <dsig:X509Certificate>REDACTED</dsig:X509Certificate>
      </dsig:X509Data>
     </dsig:KeyInfo>
    </KeyDescriptor>
 <SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
Location="https://auth.asapp.com/auth/realms/hudson/broker/hudson-saml/endpoint"/>
 <NameIDFormat>urn:oasis:names:tc:SAML:2.0:nameid-format:unspecified
 </NameIDFormat>
 <AssertionConsumerService
      Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
  Location="https://auth.asapp.com/auth/realms/hudson/broker/hudson-saml/endpoint/clients/asapp-saml"
        index="1" isDefault="true" />
     </SPSSODescriptor>
</EntityDescriptor>
```

### SAML Profile Configuration

Next, ASAPP and the customer configures their respective SSO service with each other's SAML profile. This can be achieved by importing the SAML metadata into the SSO service (if it supports a metadata import feature).

### SAML Attributes Configuration

SAML Attributes are key-value fields within the SAML message (also called SAML assertion) that is being sent from the Identity Provider (IDP) to the Service Provider (SP).

ASAPP requires the following fields to be included with the SAML assertion

| **Attribute Name** | **Required** | **Description**                                                                                                                                                                                                                        | **Example**                                 |
| :----------------- | :----------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------ |
| userId             | yes          | user's unique identifier used for authentication. Can be a unique readable value such as user's email or an opaque identifier such as a customer's internal user ID.                                                                   | [jdoe@company.com](mailto:jdoe@company.com) |
| firstName          | yes          | user's first name                                                                                                                                                                                                                      | John                                        |
| lastName           | yes          | user's last name                                                                                                                                                                                                                       | Doe                                         |
| nameAlias          | yes          | user's display name. Allows an agent, based on their personal preference or company's privacy policy, to set an alias to show to the customers they are chatting with. If this is not sent then the agent firstName will be displayed. | John Doe                                    |
| roles              | yes          | the roles the user has within the ASAPP platform. Typically mapped to one or more AD Security Groups on the IDP.                                                                                                                       | representative\|manager                     |

The following fields are not **required** but **desired** to further automate the agent Desk configuration:

| **Attribute Name** | **Required** | **Description**                                                                                                                                                                   | **Example**           |
| :----------------- | :----------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------- |
| groups             | no           | group(s) the user belongs to. This attribute controls the queue(s) that a user is assigned to. Not to be confused with the AD Security Groups (see the **roles** attribute above) | residential\|business |
| concurrency        | no           | number of concurrent chats the user can handle                                                                                                                                    | 5                     |

In addition, any custom fields can be configured in the SAML assertion. See the section below for more details.

### Sending User Data via SAML

ASAPP uses the SAML attribute fields to keep the user data up-to-date in our system. It also allows us to register a new user automatically when a new user logs into the ASAPP application for the first time.

In addition to the required fields that ASAPP needs to identify the user, customers can send additional fields in the SAML assertion that can be used for other purposes such as Reporting. An example can be the Agent Location. These fields are specific per customers. The name and possible values of these fields need to be agreed upon and configured prior to the SAML implementation.

### SSO Testing

SSO testing between the customer and ASAPP must be a coordinated effort due to the nature of the IDP-initiated SSO flow. The customer must provide several user accounts to be used for testing. Generally, the test scenarios are as follows:

1. An agent logs in for the first time. ASAPP observes that a new user record is created and the agent lands on the correct ASAPP application for their role (Desk for a rep, Admin for supervisor/manager).
2. The same agent logs out and logs back in. The agent observes that the correct application still opens.
3. Repeat the same test for another user account, ideally with different roles.

Once testing is completed successfully, then the SSO flow is certified for that environment.

Setting up SSO in the Production environment should follow the same steps.


# API Integration
Source: https://docs.asapp.com/messaging-platform/digital-agent-desk/api-integration

Learn how to connect the Digital Agent Desk to your backend systems.

ASAPP integrates with Your APIs to provide customers and agents with a more rich and personalized interaction.

ASAPP accomplishes this by making backend calls to Customer APIs in real time, providing customers with the latest up-to-date information.

This involves customers exposing the relevant APIs, securely, for ASAPP to make server to server calls.

## Authentication

Customers should wrap their APIs with secure authentication mechanisms, mainly addressing Customer Authentication and API Authentication.

### API Authentication on behalf of the User

ASAPP leverages our customers existing mechanisms of authenticating their customers, which ideally are the same across different channels.

Any identifier issued should have an expiration that is short, but should also allow for a good user experience without the customer having to authenticate multiple times over a session.

* **Cookie-based Authentication**: This is the traditional way where a user posts login credentials to the customer's server and receives a signed cookie, which is stored on the server and a copy on the browser, and will be used in subsequent interactions for the duration of the session. However, where possible a token-based approach is typically preferred.
* **Token-based Authentication:** In this mechanism a user posts login credentials to the customer's server and is issued a signed JSON Web Token (JWT). This token is not stored on the server making all interactions fully stateless. All requests from the client will include the JWT, which only the server can decode to authenticate every request. For more information on generating and signing JSON Web Tokens, please refer to [https://jwt.io/](https://jwt.io/).

**API Endpoint**: `POST /customer_authenticate`

**Request**

```json
curl -X POST https://api.example.com/auth/customer_authenticate \
-H 'cache-control: no-cache' \
-d 'username=<username>&password=<password>'
```

**Response**

```json
{
  "issued_at" : "1570733606449",
  "JWT" : "<JWT>",
  "expires_in" : "28799"
}
```

<Note>
  ASAPP requires direct access to the "customer\_authenticate" API to retrieve JWTs/cookies programmatically for testing.
</Note>

#### Communicating Customer Identifier with ASAPP

The customer may wish to implement any mechanism to authenticate their customers, as long as they can pass the identifier (cookie, JWT etc.) to ASAPP. The methods of passing this value to ASAPP depend on the chat channel used, either for [Web](/messaging-platform/integrations/web-sdk/web-authentication), [iOS](/messaging-platform/integrations/ios-sdk/user-authentication), and [Android](/messaging-platform/integrations/android-sdk/user-authentication).

#### Customer Identifier Requirements

ASAPP uses this customer identifier as a pass through value, either by including it as an HTTP Header or in the Body, when requesting customer data from the backend APIs. Since the Customer Identifier is the only piece of data ASAPP uses to identify users, it should adhere to the following:

* **Unique**: ASAPP will associate every customer chat with this id allowing ASAPP to tie chats from different channels into one single conversation. It is imperative that the Customer Identifier be unique per customer.
* **Consistent**: The Customer Identifier should remain consistent so that even if the customer returns after a significant amount of time, we are able to identify the customer.
* **Opaque**: The Customer Identifier by itself should not contain any customer Personally Identifiable Information (PII). It should be hashed, encoded and/or encrypted so that when used by itself, it is of no value.

### API Authentication using System-level Credential

Customers may wish to secure backend APIs by restricting access for clients to specific resources for a limited amount of time.

You can implement this using various mechanisms like OAuth 2.0, API Keys, System Credentials etc. This section provides details about OAuth using a Client Credentials Grant, which works well for server to server communication.

#### Client Credentials Grant

In this mechanism, the client sends a HTTP POST request with the following parameters in return for an access\_token.

* **grant\_type**
* **client\_id**
* **client\_secret**

**API Endpoint**: `POST /access_token`

**Request**

```json
curl -X POST https://api.example.com/oauth/access_token?grant_type=client_credentials 
\
-H 'cache-control: no-cache' \
-H 'content-type: application/x-www-form-urlencoded' \
-d 'client_id=<client_id>&client_secret=<client_secret>'
```

**Response**

```json
{
  "token_type" : "Bearer",
  "issued_at" : "1570733606449",
  "client_id" : “<client_id>”,
  "access_token" : "<access_token>",
  "scope" : "client_credentials",
  "expires_in" : "28799"
}
```

### API Authorization

The customer may also want to use API keys to provide authorization to specific APIs. API keys are also passed in the HTTP header along with the authentication token.

**API Endpoint:** POST /getprofile

**Request**

```json
curl -X POST https://api.example.com/account/getprofile
-H 'Authorization: Bearer <access_token>' \
-H 'customer-auth: JWT <JWT>' \
-H 'content-type: application/json' \
-H 'api-key: <api_key>' \
```

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-b551c5ab-cc5f-53ef-eb15-3073377c72a6.png" />
</Frame>


# Knowledge Base
Source: https://docs.asapp.com/messaging-platform/digital-agent-desk/knowledge-base

Learn how to integrate your Knowledge Base with the Digital Agent Desk.

Knowledge Base (KB) is a technology used to store structured and unstructured information useful for Agents to reference while servicing Customer enquiries.

You can integrate KB data into ASAPP Desk by manually uploading articles in an offline process or by integrating with a digital system which exposes the content via REST APIs.

Knowledge Base helps Agents access information without the Agent needing to navigate any external systems by surfacing KB content directly within Agent Desk's Right Hand Panel view.

This helps lower the Average Handle Time and increases Concurrency. KB also learns from Agent interactions and suggests articles and helps in Agent Augmentation.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-9066885a-0903-fe42-8192-31ea376b8937.png" />
</Frame>

## Integration

ASAPP can integrate with customer Knowledge Base systems or CRMs to pull data and make it available to Agent Desk. This is accomplished by a dedicated service, which can consume data from external systems that support standard REST APIs. The service layer is flexible enough to integrate with various industry standard Knowledge Base systems as well as in-house developed proprietary ones. The service programmatically retrieves new and updated articles on a regular basis to surface fresh and accurate content to agents in real-time.

Data pulled from external systems is transformed into ASAPP's standard format, and securely stored in S3 and in a database. Refer to the [Data Storage](#data-storage) section below for more details.

### Configuration

The service that integrates with customers is configuration driven so it can interface with different systems supporting different data formats/structures.

ASAPP requires the following information to integrate with APIs:

* REST endpoints and API definitions, data schemas and SLAs
  * URLs, Connection info, and Test Accounts for each environment
  * Authentication and Authorization requirements
  * JSON schema defining requests and responses, preferably Swagger
  * API Host that can handle HTTPS/TLS traffic
  * Resource
  * HTTP Method(s) supported
  * Content Type(s) supported and other Request Headers
  * Error handling documentation
  * Response sizes to expect
  * API Call Rate limits, if any
  * Response time SLAs
* API Response Requirements
  * Every 'article' should contain at least a unique identifier and last updated date timestamp.
  * Hierarchical data needs to clearly define the parent-child relationships
  * Content should not contain any PII/PCI related information
* Refreshing Data
  * On a set cadence as determined and agreed upon by both parties
* Size of data to help in capacity planning and scaling

## Data Storage

Once the service receives KB content, it stores the data in a secure S3 bucket that serves as the source of truth for all Knowledge Base articles. It then structures and packages the data into standard Knowledge Base types: Category, Folder and Article. The service then cleans, processes, and stores the packaged data in a database for further usage.

## Data Processing

ASAPP runs all the Knowledge Base articles stored in the database through a Knowledge Base Ranker service, which ranks articles and feeds Agent Augmentation. Given a set of user utterances, KB Ranker service assigns a score to every article of the Knowledge Base based on how relevant those articles are for that agent at that moment in the conversation. ASAPP determines relevance by taking into account the frequency of words in an article within the corpus of articles, and words of a given subset of utterances.

## Data Refresh

ASAPP can refresh data periodically and schedule it to meet customer needs. ASAPP uses a Unix cron style scheduler to run the refresh job, which allows flexible configuration.

Data Refresh replaces all of the current folders/articles with the new ones received.The refresh does not affect the ranking of articles, as their state is maintained separately.


# Queues and Routing
Source: https://docs.asapp.com/messaging-platform/digital-agent-desk/queues-and-routing

Learn how to manage conversation queues and agent routing in the Digital Agent Desk.

Digital Agent Desk routes customer conversations to the most appropriate agents through a structured workflow:

1. A customer initiates a conversation
2. The system labels the conversation with an Intent
3. Queue Routing evaluates the Intent and additional criteria to select the appropriate Queue
4. The Queue assigns the conversation to an available agent from its associated agent group

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/messaging-platform/digital-agent-desk/routing.png" alt="Issue Routing" />
</Frame>

Work with your ASAPP account team to configure intents, queues, and routing logic that align with your business needs.

## Managing Intents and Queues

An **Intent** classifies each customer conversation (Issue) and serves as the primary method of categorization. ASAPP analyzes conversation data and business requirements to determine the set of available Intents.

During runtime, Machine Learning (ML) models automatically assign the most appropriate Intent to each new Issue.

**Queue Routing** uses these Intents along with other defined criteria to direct conversations to specific Queues (Refered to as [Attributes Based Routing](/messaging-platform/digital-agent-desk/queues-and-routing/attributes-based-routing)). Each **Queue** represents a group of agents qualified to handle particular types of Issues.

<Note>
  ASAPP manages the configuration and maintenance of Intents and Queue Routing. Work with your ASAPP account team to optimize these settings for your business needs.
</Note>

## Optimizing Agent Concurrency

Concurrency controls how many simultaneous conversations each agent manages. Setting appropriate concurrency levels helps balance customer experience with agent workload.

Each agent has an individual concurrency level setting that determines their maximum number of concurrent conversations.

Digital Agent Desk provides several tools to help manage agent workloads:

* [High Effort Issues](#high-effort-issues) - Automatically identifies complex conversations that require more agent attention
* [Flexible Concurrency](#flexible-concurrency) - Dynamically adjusts capacity during natural conversation lulls

### High Effort Issues

By default, each conversation occupies one concurrency slot. However, certain conversations may require more time and attention from agents due to their complexity or scope.

Digital Agent Desk can automatically identify high effort Issues and assign them multiple concurrency slots based on the Intent and other attributes.

For example, a technical troubleshooting conversation might count as two slots, while a simple account update remains one slot. This intelligent slot allocation helps:

* Ensure agents have adequate time for complex customer needs
* Maintain balanced workloads across your team
* Improve customer satisfaction on challenging issues

Work with your ASAPP account team to configure complexity rules that align with your specific business scenarios and agent capabilities.

#### Monitoring High Effort Issues

The Real Time Dashboard displays agents handling high effort issues with a "high effort" icon. Select any agent's name to view their current conversation assignments.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/messaging-platform/digital-agent-desk/high-effort-dashboard.png" alt="High effort dashboard" />
</Frame>

### Flexible Concurrency

Flexible Concurrency maximizes agent productivity by temporarily increasing their conversation capacity during natural downtimes, such as:

* When conversations enter auto-pilot timeout (a period of customer inactivity)
* While agents complete disposition tasks

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/messaging-platform/digital-agent-desk/flex-concurrency.png" alt="Flex concurrency" />
</Frame>

Configure Flexible Concurrency settings per queue to match different conversation types and agent capabilities.

#### Protecting Agents with Flex Protect

During auto-pilot timeout, the system assumes a conversation is temporarily inactive due to customer inactivity. However, customers may return and resume their conversation at any point during this timeout period. Without protection, this can create a challenging situation where an agent who received a new flexible assignment suddenly needs to handle both the returning customer and their new conversation simultaneously.

Flex Protect prevents this type of overload by:

* Assigning a protected status to the agent
* Providing a configurable rest period where no new flexible assignments are allowed for that agent

<Note>
  We recommend enabling Flex Protect as agents may avoid using auto-pilot timeout if they fear being overloaded, leading to longer handle times.
</Note>

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/messaging-platform/digital-agent-desk/flex-protect.png" alt="Flex protect" />
</Frame>

#### Monitoring Flexible Assignments

The Real Time Dashboard displays agents handling flexible assignments with a "flex" icon. Select any agent's name to view their current conversation assignments.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/messaging-platform/digital-agent-desk/flex-dashboard.png" alt="Flex dashboard" />
</Frame>


# Attributes Based Routing
Source: https://docs.asapp.com/messaging-platform/digital-agent-desk/queues-and-routing/attributes-based-routing

Learn how to use Attributes Based Routing (ABR) to route chats to the appropriate Agent Queue.

Attributes Based Routing (ABR) is a rules-based system to determine which Agent Queue an incoming chat should be assigned to.

ASAPP invokes ABR by default after our Machine Learning model classifies a customer's utterances to an Intent and determines that the Intent cannot be serviced by an automated flow.

## Attributes of ABR

Attributes can be any piece of information that customers can pass to ASAPP using the integrated SDKs.

ASAPP natively defines the standard attributes below:

* Intent - This is a code determined by running customer utterances through various different ML models.
  Ex: ACCTINFO, BILLING
* Web URL - This is the webpage that invoked the SDK. You can use any part of the URL as a value to route on.
  Ex: [www.customer.com/consumer/support](http://www.customer.com/consumer/support), [www.customer.com/business/sales](http://www.customer.com/business/sales)
* Channel - This is the channel the chat originated from.
  Ex: Web, iOS

The ASAPP SDK defines additional parameters, which can also be used in ABR. You can define these parameters as part of the ContextProvider.

* Company Subdivision
  Ex: divisionId1, subDivisionId2
* Segments
  Ex: NorthEast, USA, EMEA

You can also define custom customer specific attributes to be used in routing. Customer Information allows definition of any number of attributes as key-value pairs, which can be set per chat and be used for routing to specific agent queues. Please refer to the Customer Information section for more details on how to define custom attributes.

## Configuration

ABR is capable of using any or all of the above attributes to determine which queue to route a chat. The configuration is extremely flexible and can accommodate various complex rules including regular expression matches, as well as multi value matches.

Contact your Implementation Manager to model the routing rules.

## Template for Submitting Rules

Customers can create an Excel document with a sheet for each attribute they would like to define. The sheet name should be the name of the attribute and have two columns, one defining all the possible attribute values and the other column containing the name of the queue to be routed to.

If you are going to use multiple attributes in any different combinations, then you should define these conditions in a separate sheet, dedicating a row for every unique combination.

ASAPP will assume that Excel attribute names that do not follow the ASAPP standard are custom defined and passed in 'Customer Information'.

See the [User Management](/messaging-platform/digital-agent-desk/user-management) section for more information.

## Queue Management

You can define Queues based on business or technical needs. You can define any number of queues and can follow any desired naming convention. You can apply Business Hours to queues individually. For more information on other features and functionality, please contact your Implementation Manager.

You can assign Agents to one or more queues based on skills and/or requirements. Please refer to [User Management](/messaging-platform/digital-agent-desk/user-management) for more details.


# User Management
Source: https://docs.asapp.com/messaging-platform/digital-agent-desk/user-management

Learn how to manage users and roles in the Digital Agent Desk.

You control the User Management (Roles and Permissions) within the Digital Agent Desk.

These roles dictate if a user can authenticate to *Agent Desk*, *Admin Dashboard*, or both. In addition, roles determine what view and data users see in the Admin Dashboard. You can pass User Data to ASAPP via *SSO*, AD/LDAP, or other approved integration.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-6f3c5891-ad4d-bf0b-06f3-31d6bf3b96ac.png" />
</Frame>

This section describes the following:

* [Process Overview](#process-overview)
* [Resource Overview](#resource-overview)
* [Definitions](#definitions "Definitions")

## Process Overview

This is a high-level overview of the User Management setup process.

1. ASAPP demos the Desk/Admin Interface.
2. Call with ASAPP to confirm the access and permission requirements. ASAPP and you complete a Configuration spreadsheet defining all the Roles & Permissions.
3. ASAPP sends you a copy of the Configuration spreadsheet for review and approval. ASAPP will make additional changes if needed and send to you for approval.
4. ASAPP implements and tests the configuration.
5. ASAPP trains you to set up and modify User Management.
6. ASAPP goes live with your new Customer Interaction system.

## Resource Overview

The following table lists and defines all resources:

<table class="informaltable frame-box rules-all">
  <thead>
    <tr>
      <th class="th"><p>Feature</p></th>
      <th class="th"><p>Overview</p></th>
      <th class="th"><p>Resource</p></th>
      <th class="th"><p>Definition</p></th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td class="td" rowspan="2"><p>Agent Desk</p></td>
      <td class="td" rowspan="2"><p>The App where Agents communicate with customers.</p></td>
      <td class="td"><p>Authorization</p></td>
      <td class="td"><p>Allows you to successfully authenticate via Single Sign-On (SSO) into the ASAPP Agent Desk.</p></td>
    </tr>

    <tr>
      <td class="td"><p>Go to Desk</p></td>
      <td class="td"><p>Allows you to click <strong>Go to Desk</strong> from the Nav to open Agent Desk in a new tab. Requires Agent Desk access.</p></td>
    </tr>

    <tr>
      <td class="td"><p>Default Concurrency</p></td>
      <td class="td"><p>The default value for the maximum number of chats a newly added agent can handle at the same time.</p></td>
      <td class="td"><p>Default Concurrency</p></td>
      <td class="td"><p>Sets the default concurrency of all new users with access to Agent Desk if no concurrency was set via the ingest method.</p></td>
    </tr>

    <tr>
      <td class="td"><p>Admin Dashboard</p></td>
      <td class="td"><p>The App where you can monitor agent activity in real-time, view agent metrics, and take operational actions (e.g. biz hours adjustments)</p></td>
      <td class="td"><p>Authorization</p></td>
      <td class="td"><p>Allows you to successfully authenticate via SSO into the ASAPP Admin Dashboard.</p></td>
    </tr>

    <tr>
      <td class="td" rowspan="2"><p>Live Insights</p></td>
      <td class="td" rowspan="2"><p>Dashboard in Admin that displays how each of your queues are performing in real-time. You can drill down into each queue to gain insight into what areas need attention.</p></td>
      <td class="td"><p>Access</p></td>
      <td class="td"><p>Allows you to see Live Insights in the Admin navigation and access it.</p></td>
    </tr>

    <tr>
      <td class="td"><p>Data Security</p></td>
      <td class="td"><p>Limits the agent-level data that certain users can see in Live Insights. If a user is not allowed to see data for any agents who belong to a given queue, that queue will not be visible to that user in Live Insights.</p></td>
    </tr>

    <tr>
      <td class="td" rowspan="4"><p>Historical Reporting</p></td>
      <td class="td" rowspan="4"><p>Dashboard in Admin where you can find data and insights from customer experience and automation all the way to agent performance and workforce management.</p></td>
      <td class="td"><p>Power Analyst Access</p></td>

      <td class="td">
        <p>Allows you to see the Historical Reporting page in the Admin Navigation with Power Analyst access type, which entails the following:</p>

        <ul>
          <li><p>Access to ASAPP Reports</p></li>
          <li><p>Ability to change widget chart type</p></li>
          <li><p>Ability to toggle dimensions and filters on/off for any report</p></li>
          <li><p>Export data per widget and dashboard</p></li>
          <li><p>Cannot share reports to other users</p></li>
          <li><p>Cannot create or copy widgets and dashboards</p></li>
        </ul>
      </td>
    </tr>

    <tr>
      <td class="td"><p>Creator Access</p></td>

      <td class="td">
        <p>Allows you to see the Historical Reporting page in the Admin Navigation with Creator access type, which entails the following:</p>

        <ul>
          <li><p>Power Analyst privileges</p></li>
          <li><p>Can share reports</p></li>
          <li><p>Can create net new widgets and dashboards</p></li>
          <li><p>Can copy widgets and dashboards</p></li>
          <li><p>Can create custom dimensions/calculated metrics</p></li>
        </ul>
      </td>
    </tr>

    <tr>
      <td class="td"><p>Reporting Groups</p></td>

      <td class="td">
        <p>Out-of-the-box groups are:</p>

        <ul>
          <li><p>Everybody: all users</p></li>
          <li><p>Power Analyst: Users with Power Analyst Role</p></li>
          <li><p>Creator: Users with Creator role</p></li>
        </ul>

        <p>If a client has data security enabled for Historical Reporting, policies need to be written to add users to the following 3 groups:</p>

        <ul>
          <li><p>Core: Users who can see the ASAPP Core Reports</p></li>
          <li><p>Contact Center: Users who can see the ASAPP Contact Center Reports</p></li>
          <li><p>All Reports: Users who can see both the ASAPP Contact Center and ASAPP Core Reports</p></li>
        </ul>

        <p>If you have any Creator users, you may want custom groups created. This can be achieved by writing a policy to create reporting groups based on a specific user attribute (i.e. I need reporting groups per queue, where queue is the attribute).</p>
      </td>
    </tr>

    <tr>
      <td class="td"><p>Data Security</p></td>
      <td class="td"><p>Limits the agent-level data that certain users can see in Historical Reporting. If anyone has these policies, then the Core, Contact Center, and All Reports groups should be enabled.</p></td>
    </tr>

    <tr>
      <td class="td"><p>Business Hours</p></td>
      <td class="td"><p>Allows Admin users to set their business hours of operation and holidays on a per queue basis.</p></td>
      <td class="td"><p>Access</p></td>
      <td class="td"><p>Allows you to see Business Hours in the Admin navigation, access it, and make changes.</p></td>
    </tr>

    <tr>
      <td class="td"><p>Triggers</p></td>
      <td class="td"><p>An ASAPP feature that allows you to specify which pages display the ASAPP Chat UI. You can show the ASAPP Chat UI on all pages with the ASAPP Chat SDK embedded and loaded, or on just a subset of those pages.</p></td>
      <td class="td"><p>Access</p></td>
      <td class="td"><p>Allows you to see Triggers in the Admin navigation, access it, and make changes.</p></td>
    </tr>

    <tr>
      <td class="td"><p>Knowledge Base</p></td>
      <td class="td"><p>An ASAPP feature that helps Agents access information without the needing to navigate any external systems by surfacing KB content directly within Agent Desk.</p></td>
      <td class="td"><p>Access</p></td>
      <td class="td"><p>Allows you to see Knowledge Base content in the Admin navigation, access it, and make changes.</p></td>
    </tr>

    <tr>
      <td class="td" rowspan="5"><p>Conversation Manager</p></td>
      <td class="td" rowspan="5"><p>Admin Feature where you can monitor current conversations individually in the Conversation Manager. The Conversation Manager shows all current, queued, and historical conversations handled by SRS, bot, or by a live agent.</p></td>
      <td class="td"><p>Access</p></td>
      <td class="td"><p>Allows you to see Conversation Manager in the Admin navigation and access it.</p></td>
    </tr>

    <tr>
      <td class="td"><p>Conversation Download</p></td>
      <td class="td"><p>Allows you to select 1 or more conversations in Conversation Manager to export to either an HTML or CSV file.</p></td>
    </tr>

    <tr>
      <td class="td"><p>Whisper</p></td>
      <td class="td"><p>Allows you to send an inline, private message to an agent within a currently live chat, selected from the Conversation Manager.</p></td>
    </tr>

    <tr>
      <td class="td"><p>SRS Issues</p></td>
      <td class="td"><p>Allows you to see conversations only handled by SRS in the Conversation Manager.</p></td>
    </tr>

    <tr>
      <td class="td"><p>Data Security</p></td>
      <td class="td"><p>Limits the agent-assisted conversations that certain users can see at the agent-level in the Conversation Manager.</p></td>
    </tr>

    <tr>
      <td class="td" rowspan="4"><p>User Management</p></td>
      <td class="td" rowspan="4"><p>Admin Feature to edit user roles and permissions.</p></td>
      <td class="td"><p>Access</p></td>
      <td class="td"><p>Allows you to see User Management in their Admin navigation, access it, and make changes to queue membership, status, and concurrency per user.</p></td>
    </tr>

    <tr>
      <td class="td"><p>Editable Roles</p></td>
      <td class="td"><p>Allows you to change the role(s) of a user in User Management.</p></td>
    </tr>

    <tr>
      <td class="td"><p>Editable Custom Attributes</p></td>
      <td class="td"><p>Allows you to change the value of a custom user attribute per user in User Management. If Off, then these custom attributes will be read-only in the list of users.</p></td>
    </tr>

    <tr>
      <td class="td"><p>Data Security</p></td>
      <td class="td"><p>Limits the users that certain users can see or edit in User Management.</p></td>
    </tr>
  </tbody>
</table>

## Definitions

The following table defines the key terms related to ASAPP Roles & Permissions.

<table class="informaltable frame-box rules-all">
  <thead>
    <tr>
      <th class="th"><p>Role</p></th>
      <th class="th"><p>Definition</p></th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td class="td"><p>Resource</p></td>
      <td class="td"><p>The ASAPP functionality that you can permission in a certain way. ASAPP determines Resources when features are built.</p></td>
    </tr>

    <tr>
      <td class="td"><p>Action</p></td>
      <td class="td"><p>Describes the possible privileges a user can have on a given resource. (i.e. View Only vs. Edit)</p></td>
    </tr>

    <tr>
      <td class="td"><p>Permission</p></td>
      <td class="td"><p>Action + Resource. ex. "can view Live Insights"</p></td>
    </tr>

    <tr>
      <td class="td"><p>Target</p></td>
      <td class="td"><p>The user or a set of users who are given a permission.</p></td>
    </tr>

    <tr>
      <td class="td"><p>User Attribute</p></td>
      <td class="td"><p>A describing attribute for a client user. User Attributes are either sent to ASAPP via accepted method by the client, or ASAPP Native.</p></td>
    </tr>

    <tr>
      <td class="td"><p>ASAPP Native User Attribute</p></td>

      <td class="td">
        <p>A user attribute that exists within the ASAPP platform without the client needing to send it. Currently:</p>

        <ul>
          <li><p>Role</p></li>
          <li><p>Group</p></li>
          <li><p>Status</p></li>
          <li><p>Concurrency</p></li>
        </ul>
      </td>
    </tr>

    <tr>
      <td class="td"><p>Custom User Attribute</p></td>
      <td class="td"><p>An attribute specific to the client's organization that is sent to ASAPP.</p></td>
    </tr>

    <tr>
      <td class="td"><p>Clarifier</p></td>
      <td class="td"><p>An additional and optional layer of restriction in a policy. Must be defined by a user attribute that already exists in the system.</p></td>
    </tr>

    <tr>
      <td class="td"><p>Policy</p></td>
      <td class="td"><p>An individual rule that assigns a permission to a user or set of users. The structure is generally: Target + Permission (opt. + Clarifier) = Target + Action + Resource (opt. + Clarifier)</p></td>
    </tr>
  </tbody>
</table>


# Feature Releases Overview
Source: https://docs.asapp.com/messaging-platform/feature-releases



Select a product area below to view feature release announcements. Please contact your ASAPP team for more information on exact release rollout and timelines.

* [Digital Agent Desk](/messaging-platform/feature-releases/digital-agent-desk "Digital Agent Desk")
* [Customer Channels](/messaging-platform/feature-releases/customer-channels "Customer Channels")
* [Insights Manager](/messaging-platform/feature-releases/insights-manager "Insights Manager")
* [Voice Agent Desk](/messaging-platform/feature-releases/voice-agent-desk "Voice Agent Desk")
* [Audit Logs in AI-Console](/messaging-platform/feature-releases/ai-console/audit-logs-in-ai-console "Audit Logs in AI-Console")
* [Specific Case Releases](/messaging-platform/feature-releases/specific-case-releases "Specific Case Releases")


# AI Console Overview
Source: https://docs.asapp.com/messaging-platform/feature-releases/ai-console



| Feature Name     | Feature Release Details                                                                                           | Additional Relevant Information (if available) |
| :--------------- | :---------------------------------------------------------------------------------------------------------------- | :--------------------------------------------- |
| Audit Logs       | [Audit Logs](/messaging-platform/feature-releases/ai-console/audit-logs-in-ai-console "Audit Logs in AI-Console") |                                                |
| New AIC Homepage | [New AIC Homepage](/messaging-platform/feature-releases/ai-console/new-aic-homepage "New AIC Homepage")           |                                                |


# Audit Logs in AI-Console
Source: https://docs.asapp.com/messaging-platform/feature-releases/ai-console/audit-logs-in-ai-console



## Feature Release

This is the announcement for an upcoming ASAPP feature. Your ASAPP account team will provide a target release date and can direct you to more detailed information as needed.

## Overview

Audit logs enable administrators to review configuration changes made in AI-Console for AI Services and ASAPP Messaging.

## Use and Impact

By using audit logs, administrators have a historical overview of the configuration changes made to ASAPP services by their organization members. This feature provides control and visibility for administrators by recording all changes made through AI-Console - what is being updated, when, and by whom.

Using records with exact timestamps and users associated with every change, administrators can use audit logs to:

* See the most recent changes made to every ASAPP product.
* Investigate a particular historical change associated with a deployment.
* Review activity for a given user or product over the course of weeks or months.

## How It Works

Watch the following video walkthrough to learn about audit logs:

<iframe width="560" height="315" src="https://fast.wistia.net/embed/iframe/4txwa5fpqj" />

Administrators can log in to AI-Console and navigate to **Audit Logs** to access the logs. By default, the audit logs page displays all records chronologically.

Audit logs are displayed in a table with the following values:

* **User**: The user that made the change.
* **Event Type**: The action made to the resource type. Supported values are CREATE, DEPLOY, UNDEPLOY, UPDATE, and DELETE.
* **Resource Type**: The type of the modified resource. For example, `link`.
* **Resource Name**: The name of the resource being updated. For example, `linkName`.
* **Timestamp**: The UTC timestamp of the change.

## FAQs

1. **At the time of release, would audit logs contain a retroactive chronology of all our activities?**

   Audit logs will include records for the last two months, but will not include historically retroactive records beyond that.

2. **What changes will be recorded in audit logs?**

   All changes made through AI-Console will have associated records in the audit logs.


# New AIC Homepage
Source: https://docs.asapp.com/messaging-platform/feature-releases/ai-console/new-aic-homepage



## Feature Release

This is the announcement for an upcoming ASAPP feature. Your ASAPP account team will provide a target release date and can direct you to more detailed information as needed.

## Overview

We are updating the ASAPP dashboard (AI-Console) home page. The AI Console has a new design to help streamline the experience of new and existing customers

## Use and Impact

The AI-Console homepage is the starting point for most users experience with ASAPP. We are improving this experience to make it easier to navigate to key products. We have made several minor adjustments to enhance using AI-Console, such as showing your most recent activity within the dashboard, and moving admin related activities to the top menu.

## How It Works

Here is a sneak peak at the upcoming changes

**New AI-Console homepage**

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-53cccb80-c96e-c338-5f73-5669ef1a6e3b.png" />
</Frame>

## FAQs

1. **Do I need to do anything to start using this new homepage?**
   The improvements will be made available to all users immediately upon launch.
2. **Does this change what pages I am able to access in AI-Console?**
   No, all existing pages and bookmarks you were able to access before are still available.


# Customer Channels Overview
Source: https://docs.asapp.com/messaging-platform/feature-releases/customer-channels



| Feature Name                                  | Feature Release Details                                                                                                                               | Additional Relevant Information (if available)                                                                                                      |
| :-------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------- |
| GBM Rich Text Support                         | [GBM docs](https://developers.google.com/business-communications/business-messages/guides/build/send#rich_text)                                       | ASAPP will now support GBM's rich text formatting for hyperlinks.                                                                                   |
| Persistent Android Notifications              | [Persistent Android Notifications](https://docs-sdk.asapp.com/product_features/_Android%20SDK%20Persistent%20Notifications%20-%20One-Pager.pdf)       | [Android SDK](/messaging-platform/integrations/android-sdk "Android SDK")                                                                           |
| Apple Messages for Business Rich Links        | [Rich Links in Apple Messages for Business](https://docs-sdk.asapp.com/product_features/ABC%20Rich%20Links%20-%20One-Pager.pdf)                       |                                                                                                                                                     |
| iOS SDK Push Notifications Request            | [Updated iOS SDK Push Notifications](https://docs-sdk.asapp.com/product_features/iOS%20SDK%20Push%20Notifications%20-%20One-Pager.pdf)                | [iOS SDK](/messaging-platform/integrations/ios-sdk "iOS SDK")                                                                                       |
| Web Chat Push Notifications                   | [Web Chat Push Notifications](https://docs-sdk.asapp.com/product_features/Web%20SDK%20Push%20Notifications%20-%20One-Pager.pdf)                       | [Integration: Push Notifications](/messaging-platform/integrations/push-notifications-and-the-mobile-sdks "Push Notifications and the Mobile SDKs") |
| Real-time EWT                                 | [Real-time EWT in Chat SDK](https://docs-sdk.asapp.com/product_features/Real-time%20EWT%20One-Pager%20-%20External.pdf)                               |                                                                                                                                                     |
| Closing Time EWT                              | [Closing Time EWT](https://docs-sdk.asapp.com/product_features/ASAPP%20-%20Customer%20Channels%20-%20Closing%20Time%20EWT.pdf)                        |                                                                                                                                                     |
| Omni Real-Time EWT                            | [Omni Real-Time EWT](https://docs-sdk.asapp.com/product_features/ASAPP%20-%20Customer%20Channels%20-%20Omni%20Realtime%20EWT.pdf)                     |                                                                                                                                                     |
| Queue Automated Check-in Improvements         | [Queue Automated Check-in Improvements](https://docs-sdk.asapp.com/product_features/ASAPP%20-%20Customer%20Channels%20-%20QACI%20Improvements.pdf)    |                                                                                                                                                     |
| Complex Issue Routing                         | [Complex Issue Routing](https://docs-sdk.asapp.com/product_features/ASAPP%20-%20Customer%20Channels%20-%20Complex%20Issue%20Routing.pdf)              |                                                                                                                                                     |
| Quick Replies in Apple Messages for Business  | [Quick Replies in Apple Messages for Business](/messaging-platform/feature-releases/customer-channels/quick-replies-in-apple-messages-for-business)   |                                                                                                                                                     |
| Authentication in Apple Messages for Business | [Authentication in Apple Messages for Business](/messaging-platform/feature-releases/customer-channels/authentication-in-apple-messages-for-business) |                                                                                                                                                     |
| WhatsApp Business                             | [WhatsApp Business](/messaging-platform/feature-releases/customer-channels/whatsapp-business)                                                         | [WhatsApp Business Integration](/messaging-platform/integrations/whatsapp-business "WhatsApp Business")                                             |
| Form Messages for Apple Messages for Business | [Form Messages for Apple Messages for Business](/messaging-platform/feature-releases/customer-channels/form-messages-for-apple-messages-for-business) |                                                                                                                                                     |


# Authentication in Apple Messages for Business
Source: https://docs.asapp.com/messaging-platform/feature-releases/customer-channels/authentication-in-apple-messages-for-business



## Feature Release

This is the announcement for an upcoming ASAPP feature. Your ASAPP account team will provide a target release date and can direct you to more detailed information as needed.

## Overview

ASAPP now supports customer authentication in Apple Messages for Business. With this new functionality, customers can securely log in to their accounts during interactions, allowing them to access personalized experiences in automated flows and when speaking with agents.

|                                                                                                                                    |                                                                                                                                    |
| ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| <Frame><img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-ff53644d-bae2-df1f-d681-7471f00e0c31.png" /></Frame> | <Frame><img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-f78a2f4b-1b19-9ee4-14c6-f68abfb4109e.png" /></Frame> |

## Use and Impact

Customer authentication is intended for any interaction where making use of account information creates a better experience for the customer:

* **Any live interaction with an agent:** Enable your agents to greet and validate who they're speaking with, review historical customer conversations, and quickly reference relevant account attributes.
* **Automated flows:** Present data related to a customer's account (e.g., booking details) or take actions on behalf of the customer (e.g., make a payment).

Identifying a customer in an interaction also adds valuable context when reviewing historical interactions in Insights Manager for reporting or compliance purposes.

Expanding support for customer authentication in this channel should:

1. Reduce the share of interactions that are directed to agents due to customers being unable to access automated flows that require authentication.
2. Reduce the share of interactions that are directed to agents due to customers being unable to access automated flows that require authentication
3. Expand the share of interactions with agents that benefit from account information and conversation history, reducing effort to identify customers and search for account information

## How It Works

**User Experience**

Once implemented, any instance in an ASAPP automated flow that triggers customer authentication today will do so during an interaction in Apple Messages for Business.

When this occurs, Apple Messages for Business will ask the user to login via a button. Once the user clicks the button, they will be brought out of the iMessages app and redirected to a webpage/browser window to sign in. Users will have to sign-in with their credentials every time their authentication token expires.

**Architecture**

User Authentication in Apple Messages for Business utilizes a standards-based approach using an OAuth 2.0 flow with additional key validation and OAuth token encryption steps.

This approach requires companies to implement and host a login page to which Apple Messages for Business will direct the user for authentication.

Visit [Apple Messages for Business integration guide](/messaging-platform/integrations/apple-messages-for-business#customer-authentication) for more information.

<Note>
  Reach out to your ASAPP account team to coordinate on the implementation of customer authentication in Apple Messages for Business.
</Note>

## FAQs

1. **What are the steps required to implement authentication?**

   This primarily depends on if a suitable login page and token endpoint already exists or requires customer development. Your ASAPP account team can provide exact details on the specifications these must meet.

   Configuration is required by ASAPP and on the Apple Business Register. Chat flows that use APIs may require modification to match the rendering capabilities of Apple Messages for Business but this can be done incrementally.

   Testing of the feature can be done in a lower environment prior to production launch. ASAPP implementation time is 6-12 weeks depending on flow complexity, and total customer integration time is dependent on customer dependencies.
2. **If our user base has a broad range of device versions and iOS versions, will they all have the same authentication experience? If not, what needs to be done to ensure that they do?**

   Yes. For iOS versions 15 & 16+, the user experience for authentication will be the same. However, users with devices that run iOS versions earlier than 12 will not be able to access authentication.

   From a technical perspective, different token endpoints will need to be supported simultaneously to allow users across iOS versions 15 and 16+ to access authentication. More specifically, distinct endpoints will be needed to support users with iOS versions 15 or 16+, as well as devices running these iOS versions to test.

   <Note>
     For iOS versions 16+, ASAPP will soon support Apple's newest authentication architecture, which we strongly encourage implementing once it becomes available.
   </Note>
3. **Does authentication happen inline within the chat experience?**

   No. In the current virtual agent experience, a user will see a login button and then be redirected to a webpage to enter their credentials and complete the login action. They will then be automatically redirected to the chat experience within 10 seconds of successfully authenticating.
4. **How many attempts will a user be given to authenticate? Are there configurable limits to this?**

   This is governed by how many retries the customer login page allows.
5. **When is conversation history carried across channels, both from the customer and agent's perspectives?**

   * If a customer is authenticated in the Apple Messages for Business channel, they will see their conversation history for previous authenticated Apple sessions but not their history from other channels.
   * If during an authenticated Apple session, the customer moves to another channel (e.g. Web SDK) and authenticates, the Apple conversation from that session will appear in the new channel. Additionally, as the customer engages via the Web SDK, agent responses will continue to appear in Apple Messages for Business until the token for the Apple session has expired.
   * In all other instances, the conversation history from Apple Messages for Business will not be visible to customers when they start subsequent conversations in other channels.
   * From the agent's perspective, conversation history from all channels is visible in Agent Desk so long as customers have signed in using the same credentials.


# Form Messages for Apple Messages for Business
Source: https://docs.asapp.com/messaging-platform/feature-releases/customer-channels/form-messages-for-apple-messages-for-business



## Feature Release

This is the announcement for an upcoming ASAPP feature. Your ASAPP account team will provide a target release date and can direct you to more detailed information as needed.

## Overview

ASAPP is upgrading several form types to the Form Messages format, native to Apple Messages for Business (AMB). Form Messages are replacements for Omniforms (link to a web form), featuring a rich, multi-page interactive experience for iOS and PadOS users without leaving the Apple Messages application. Form Messages present a single form field per page and allow the customer to review their form entries before submitting them.

<Frame>
  <img style={{height: '500px'}} src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-370fec39-987b-612a-7820-2e213b049e32.gif" alt="Entering and reviewing fields from a Form Message in Apple Messages for Business." />
</Frame>

## Use and Impact

ASAPP offers a convenient solution for gathering customer information in a structured format through the creation of customizable forms. These forms are seamlessly delivered as Form Messages to Apple Messages for Business customers whenever supported. Incorporating Form Messages into Apple Messages for Business enhances the customer experience by providing a seamless and aesthetically pleasing interface that is consistent with other Apple applications.

## How It Works

Watch the video walkthrough below to learn more about Form Messages:

<iframe width="560" height="315" src="https://fast.wistia.net/embed/iframe/d6la1ez6j4" />

### Supported Forms

When a form is sent to a customer in Apple Messages for Business, supported forms will display as a Form Message, which has a single form field on each page and allows the customer to review their form entries before submitting.

Examples of supported form field types include:

* Text
* Name
* Location
* Date
* Phone Number
* Numbers
* Selectors

### Unsupported Forms

Customers will be sent an Omniform rather than an AMB Form Message if one of the following is true:

* The customer is not on an iOS version that supports Form Messages
* It is a Secure Form
* The flow node is configured to have the form disappear when a new message is sent
* There are more than seven fields in the form; this limit exists because there is a known AMB Form Messages issue that requires a customer to start over if they background the Messages app while filling out a form and then return back to it
* Any field has a prefilled value
* Any field has password masking
* If the form has more than one submit button
* The form contains a scale, paragraph, or table field

Contact your ASAPP account team to enable Form Messages and to determine which forms customers will receive as Form Messages.

<Note>
  Form Messages for multilingual forms are not yet supported. If using a Spanish Virtual Agent, Form Messages are not available.
</Note>

## FAQs

1. **Why did I have to start filling out my form from the start after leaving and coming back to it?**

   There is a known AMB Form Messages issue that requires a customer to start over if they background the Messages app while filling out a form and then return back to it.

2. **Can I enable/disable an individual form to be a Form Message?**

   No, it is a company-level configuration. If enabled, all supported forms will be sent as AMB Form Messages.


# Quick Replies in Apple Messages for Business
Source: https://docs.asapp.com/messaging-platform/feature-releases/customer-channels/quick-replies-in-apple-messages-for-business



## Feature Release

This is the announcement for an upcoming ASAPP feature. Your ASAPP account team will provide a target release date and can direct you to more detailed information as needed.

## Overview

ASAPP's automated flows will now support quick replies for customers that use the Apple Messages for Business channel. Quick replies display response options directly in the messaging interface, allowing customers to make an inline choice with a single tap during an ongoing conversation.

<Frame>
  <img height="500" src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-c7100047-15f3-1551-bde7-49e5e9e8c3ba.png" />
</Frame>

## Use and Impact

As in ASAPP's customer channels for web and mobile apps, quick replies are used to give customers a defined set of response options, each of which leads to a corresponding branch in an automated flow. Key use cases for quick replies in automated flows include the following:

1. Discovery questions to better specify a customer issue or account detail
2. Ensuring the customer's issue has been addressed by an automated flow

Using quick replies in Apple Messages for Business is expected to reduce friction that can cause customer drop-off and frustration before fully completing a flow or reaching an agent to better assist with an issue.

## How It Works

Quick reply support in Apple Messages for Business is expected to function similarly to quick replies in ASAPP SDKs for web and mobile apps, with the following differences:

**Number of Quick Replies**\
Apple Messages for Business supports a minimum of two quick replies and a maximum of five per node.

**Push Notification and Selection Confirmation**\
When quick reply options are sent, users receive a push notification if Messages is not open; the title of the message will be 'Choose an option'. Once the user selects a response option, Apple displays a checkmark beside text 'Choose an option' in the Messages UI. This is a default behavior and is not configurable.

**Length of Quick Replies**\
All quick replies will render as a single line of text with a maximum of 24 characters; if the text exceeds 24 characters, it will be truncated with ellipses after the first 21 characters.

**OS Version Support**\
Quick replies are supported in iOS 15.1 and macOS 12.0 or higher; prior operating systems will use the list picker interface.

## FAQs

1. **Is there any work required to adapt existing automated flows to support quick replies in Apple Messages for Business?**\
   Once your ASAPP account team completes a small configuration change, all flows configured with quick replies today will automatically use them in Apple Messages for Business for supported iOS and macOS versions.

   <Note>
     Flows with nodes that have more than five quick reply options will need to be edited to use five or fewer quick replies - any quick replies in excess of the first five will not be visible in this channel. Flows with quick reply text that exceeds 24 characters will need to be shortened or will be shown with ellipses after the first 21 characters in this channel.
   </Note>

2. **Can the list picker experience be selected in AI-Console for designated automated flows or are quick replies the only option?**\
   Currently, if quick replies are enabled, they will be the only supported option across automated flows. The list picker experience will be used for older versions of iOS and macOS.

Visit the [Apple Messages for Business](/messaging-platform/integrations/apple-messages-for-business) integration guide for more information about this channel.


# WhatsApp Business
Source: https://docs.asapp.com/messaging-platform/feature-releases/customer-channels/whatsapp-business



## Feature Release

This is the announcement for an upcoming ASAPP feature. Your ASAPP account team will provide a target release date and can direct you to more detailed information as needed.

## Overview

ASAPP is expanding messaging channel support to WhatsApp Business! Enterprises will now be able to direct customers to WhatsApp to interact with their virtual agent and have conversations with live agents.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-8bc3cef3-6ec9-36d9-f818-4e40140fe37d.png" />
</Frame>

## Use and Impact

Similar to ASAPP's integrations with Apple Messages for Business, support for WhatsApp Business gives enterprises the ability to offer more of their customers robust messaging experiences in their preferred app. This expanded support is intended to create appeal for avid WhatsApp users, encouraging them to select a messaging channel more often and to have more satisfying interactions in a familiar setting.

## How It Works

ASAPP's integration with WhatsApp Business supports similar functionality to what is available in other customer channels. At an overview level, see below for supported and unsupported features:

**Support included:**

* Automated flows
* Deeplinked entry points
* Free-text disambiguation
* Estimated wait time
* Live chat with agents
* Push notifications
* Secure forms
* End-of-chat feedback forms

**Not currently supported:**

* Customer authentication
* Customer history
* Chat Instead entry point
* Customer attributes for routing
* Customer typing preview for agents, typing indicator for customers
* Images sent by customers
* Carousels, attachment, images in automated flows
* New question/welcome back prompts
* Proactive messaging
* Co-browsing

<Note>
  \[Integration documentation is published here]\(./messaging-plat. Reach out to your ASAPP account contact to get started with WhatsApp Business. They can also advise on specific expected behaviors for virtual agent and live chat features in WhatsApp Business as needed.
</Note>

## FAQs

1. **What are the basic setup steps for WhatsApp Business?**

   Enterprises start by [creating a general Business Manager (BM) account with Meta](https://www.facebook.com/business/help/1710077379203657?id=180505742745347) and verify their business.

   While this happens, ASAPP deploys backend services in support of the integration. After creating a BM account, completing business verification, and registering phone numbers, you can then create an official WhatsApp Business Account via the embedded signup flow in AI-Console.

   After setup, your ASAPP account team will work with you on modifying automated flows for use in WhatsApp and coordinate lower environment testing once changes are complete. The final step is to create entry point URL links and QR codes in the WhatsApp Business dashboard, and insert entry points as needed in your customer-facing web and social properties.

2. **How will my current automated flows be displayed in WhatsApp Business?**

   The WhatsApp customer experience is distinct from ASAPP SDKs in several ways - some elements are displayed differently while others are not supported.

   Elements that are displayed differently use message text with links - this includes buttons for quick replies and external links. Similarly, both (a) forms sent by agents and (b) feedback forms at the end of chat also send messages with links to a separate page to complete the survey, after which time users are redirected back to WhatsApp.

   Quick replies in WhatsApp also have different limitations from ASAPP SDKs, supporting a maximum of three quick replies per node and 20 characters per quick reply. Your ASAPP account team will work with you to implement intent routing and flows to account for nodes with unsupported elements, such as authentication and attachments.

3. **Will agents know they are chatting with a customer using WhatsApp?**

   Yes. Agents will see the WhatsApp icon in the left-hand panel of Agent Desk.

4. **Where can I learn more about WhatsApp Business?**

   Visit [business.whatsapp.com](https://business.whatsapp.com/) for official reference material about this customer channel.


# Digital Agent Desk Overview
Source: https://docs.asapp.com/messaging-platform/feature-releases/digital-agent-desk



<table class="informaltable frame-void rules-rows">
  <thead>
    <tr>
      <th class="th"><p>Feature Name</p></th>
      <th class="th"><p>Feature Release Details</p></th>
      <th class="th"><p>Additional Relevant Information (if available)</p></th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td class="td"><p>Multichat View</p></td>

      <td class="td">
        <p><a class="link" href="https://docs-sdk.asapp.com/product_features/ASAPP%20-%20Agent%20Desk%20-%20Multichat%20View.pdf" rel="noopener" target="_blank">Multichat View in Desk</a></p>
        <p><a class="link" href="https://docs-sdk.asapp.com/product_features/ASAPP%20-%20Agent%20Desk%20-%20Chat%20Panel%20&%20Right%20Rail%20Header%20Updates%20-%20Focus%20view.pdf" rel="noopener" target="_blank">Focus View Updates</a></p>
      </td>

      <td class="td" />
    </tr>

    <tr>
      <td class="td"><p>Agent Performance Stats</p></td>
      <td class="td"><p><a class="link" href="https://docs-sdk.asapp.com/product_features/Agent%20Performance%20Stats%20in%20Desk%20.pdf" rel="noopener" target="_blank">Agent Performance Stats in Desk</a></p></td>

      <td class="td" />
    </tr>

    <tr>
      <td class="td"><p>Automatic Chat Finalization</p></td>
      <td class="td"><p><a class="link" href="https://docs-sdk.asapp.com/product_features/Auto-ending%20customer%20ended%20chats.pdf" rel="noopener" target="_blank">Automatic Chat Finalization</a></p></td>

      <td class="td" />
    </tr>

    <tr>
      <td class="td"><p>High Confidence Suggestions</p></td>
      <td class="td"><p><a class="link" href="https://docs-sdk.asapp.com/product_features/ASAPP%20-%20Auto-Suggest%20Enhancement_%20High%20Confidence%20Suggestions.pdf" rel="noopener" target="_blank">Auto-Suggest Enhancements</a></p></td>

      <td class="td" />
    </tr>

    <tr>
      <td class="td"><p>Avert Concurrent Voice & Digital Interactions</p></td>
      <td class="td"><p><a class="link" href="https://docs-sdk.asapp.com/product_features/ASAPP%20-%20Avert%20Concurrent%20Voice%20&%20Digital%20Interactions.pdf" rel="noopener" target="_blank">Avert Concurrent Voice & Digital Interactions</a></p></td>

      <td class="td" />
    </tr>

    <tr>
      <td class="td"><p>Customer History - New Historical Transcript View</p></td>
      <td class="td"><p><a class="link" href="https://docs-sdk.asapp.com/product_features/ASAPP%20-%20Customer%20History%20-%20New%20Transcript%20View.pdf" rel="noopener" target="_blank">New Transcript View</a></p></td>
      <td class="td"><p><a class="link linktype-component" href="/messaging-platform/digital-agent-desk/agent-desk-navigation#3-conversation" title="3. Conversation">Conversation History</a></p></td>
    </tr>

    <tr>
      <td class="td"><p>Knowledge Base Favorite Folders</p></td>
      <td class="td"><p><a class="link" href="https://docs-sdk.asapp.com/product_features/Knowledge%20Base%20Favorite%20Folders.pdf" rel="noopener" target="_blank">Knowledge Base Favorite Folders</a></p></td>
      <td class="td"><p><a class="link linktype-component" href="/messaging-platform/digital-agent-desk/knowledge-base" title="Knowledge Base">Integrations: Knowledge Base</a></p></td>
    </tr>

    <tr>
      <td class="td"><p>Auto-Suggest Response Library</p></td>
      <td class="td"><p><a class="link" href="https://docs-sdk.asapp.com/product_features/ASAPP%20-%20Global%20&%20Custom%20Response%20Library%20Redesign%20(1).pdf" rel="noopener" target="_blank">Auto-Suggest Response Library in the Right Rail</a></p></td>
      <td class="td"><p><a class="link linktype-component" href="/messaging-platform/digital-agent-desk/agent-desk-navigation#c-composer" title="C. Composer">AutoSuggest Feature</a></p></td>
    </tr>

    <tr>
      <td class="td"><p>Desk Redesign: Left Rail, Card, & Color Temperature Setting</p></td>

      <td class="td">
        <p><a class="link" href="https://docs-sdk.asapp.com/product_features/ASAPP%20-%20Agent%20Desk%20(Digital)%20Left%20Rail%20&%20Chat%20Card%20Redesign.pdf" rel="noopener" target="_blank">Left Rail & Card Redesign</a></p>
        <p><a class="link" href="https://docs-sdk.asapp.com/product_features/ASAPP%20-%20Agent%20Desk%20Color%20Temperature%20Setting.pdf" rel="noopener" target="_blank">Color Temperature Setting</a></p>
      </td>

      <td class="td" />
    </tr>

    <tr>
      <td class="td"><p>Knowledge Base Search Enhancement</p></td>
      <td class="td"><p><a class="link" href="https://docs-sdk.asapp.com/product_features/Knowledge%20Base%20Search%20Enhancement.pdf" rel="noopener" target="_blank">KB Search Enhancement</a></p></td>
      <td class="td"><p><a class="link linktype-component" href="/messaging-platform/digital-agent-desk/knowledge-base" title="Knowledge Base">Integrations: Knowledge Base</a></p></td>
    </tr>

    <tr>
      <td class="td"><p>Knowledge Base Navigation Redesign</p></td>
      <td class="td"><p><a class="link" href="https://docs-sdk.asapp.com/product_features/Knowledge%20Base%20Navigation%20Redesign.pdf" rel="noopener" target="_blank">KB Navigation Redesign</a></p></td>
      <td class="td"><p><a class="link linktype-component" href="/messaging-platform/digital-agent-desk/knowledge-base" title="Knowledge Base">Integrations: Knowledge Base</a></p></td>
    </tr>

    <tr>
      <td class="td"><p>Chat Log / Transcript & Composer View Redesign</p></td>

      <td class="td">
        <p><a class="link" href="https://docs-sdk.asapp.com/product_features/Agent%20Desk%20(Digital)%20Chat%20Log%20Redesign%20-%20Updated.pdf" rel="noopener" target="_blank">Digital Desk Chat Log Redesign</a></p>
        <p><a class="link" href="https://docs-sdk.asapp.com/product_features/Agent%20Desk%20(Digital)%20Composer%20View%20Redesign.pdf" rel="noopener" target="_blank">Digital Desk Composer View Redesign</a></p>
      </td>

      <td class="td" />
    </tr>

    <tr>
      <td class="td"><p>Auto-Pilot Forms</p></td>
      <td class="td"><p><a class="link" href="https://docs-sdk.asapp.com/product_features/ASAPP%20-%20Auto-Pilot%20Forms.pdf" rel="noopener" target="_blank">Auto-Pilot Forms</a></p></td>

      <td class="td" />
    </tr>

    <tr>
      <td class="td"><p>Small Breakpoints</p></td>
      <td class="td"><p><a class="link" href="https://docs-sdk.asapp.com/product_features/Small%20Breakpoints%20One-Pager.pdf" rel="noopener" target="_blank">Small Breakpoints</a></p></td>

      <td class="td" />
    </tr>

    <tr>
      <td class="td"><p>Auto-Pilot Greetings</p></td>
      <td class="td"><p><a class="link" href="https://docs-sdk.asapp.com/product_features/ASAPP%20-%20Agent%20Desk%20-%20Auto-Pilot%20Greetings.pdf" rel="noopener" target="_blank">Auto-Pilot Greetings</a></p></td>

      <td class="td" />
    </tr>

    <tr>
      <td class="td"><p>Automatic Summary</p></td>
      <td class="td"><p><a class="link" href="https://docs-sdk.asapp.com/product_features/ASAPP%20-%20Agent%20Desk%20-%20Automatic%20Summary.pdf" rel="noopener" target="_blank">Automatic Summary</a></p></td>

      <td class="td" />
    </tr>

    <tr>
      <td class="td"><p>KB Quick Access Recommendations</p></td>
      <td class="td"><p><a class="link" href="https://docs-sdk.asapp.com/product_features/ASAPP%20-%20Agent%20Desk%20-%20Knowledge%20Base%20Quick%20Access%20Recommendations.pdf" rel="noopener" target="_blank">KB Quick Access Recommendations</a></p></td>

      <td class="td" />
    </tr>

    <tr>
      <td class="td"><p>New Feature Announcements</p></td>
      <td class="td"><p><a class="link" href="https://docs-sdk.asapp.com/product_features/ASAPP%20-%20Agent%20Desk%20-%20New%20Feature%20Announcements.pdf" rel="noopener" target="_blank">New Feature Announcements</a></p></td>
      <td class="td"><p>See new features in Desk</p></td>
    </tr>

    <tr>
      <td class="td"><p>Themeable Desk</p></td>
      <td class="td"><p><a class="link" href="https://docs-sdk.asapp.com/product_features/ASAPP%20-%20Agent%20Desk%20-%20Themeable%20Desk.pdf" rel="noopener" target="_blank">Themeable Desk</a></p></td>
      <td class="td"><p>Includes Dark Mode</p></td>
    </tr>

    <tr>
      <td class="td"><p>AutoSummary Data for Agent Desk</p></td>
      <td class="td"><p><a class="link linktype-component" href="/messaging-platform/feature-releases/digital-agent-desk/autosummary-data-for-agent-desk" title="AutoSummary Data for Agent Desk">AutoSummary Data for Agent Desk</a></p></td>
      <td class="td"><p>New S3 data field for implementations with AutoSummary enabled</p></td>
    </tr>

    <tr>
      <td class="td"><p>Disable Transfer to Same Queue in Agent Desk</p></td>
      <td class="td"><p><a class="xref linktype-component" href="/messaging-platform/feature-releases/digital-agent-desk/disable-transfer-to-same-queue-in-agent-desk" title="Disable Transfer to Same Queue in Agent Desk">Disable Transfer to Same Queue in Agent Desk</a></p></td>

      <td class="td" />
    </tr>

    <tr>
      <td class="td"><p>Transfer to a Paused Queue in Agent Desk</p></td>
      <td class="td"><p><a class="xref linktype-component" href="/messaging-platform/feature-releases/digital-agent-desk/transfer-to-paused-queues-in-agent-desk" title="Transfer to Paused Queues in Agent Desk">Transfer to Paused Queues in Agent Desk</a></p></td>

      <td class="td" />
    </tr>

    <tr>
      <td class="td"><p>Default Status for Agents in Voice and Agent Desk</p></td>
      <td class="td"><p><a class="xref linktype-component" href="/messaging-platform/feature-releases/digital-agent-desk/default-agent-status-in-desk" title="Default Agent Status in Desk">Default Agent Status in Desk</a></p></td>

      <td class="td" />
    </tr>

    <tr>
      <td class="td"><p>Data Insert in Agent Responses</p></td>
      <td class="td"><p><a class="link" href="https://docs-sdk.asapp.com/product_features/ASAPP%20-%20Data%20Insert%20in%20Agent%20Responses.pdf" rel="noopener" target="_blank">Data Insert in Agent Responses</a></p></td>

      <td class="td" />
    </tr>

    <tr>
      <td class="td"><p>Customer History Context</p></td>
      <td class="td"><p><a class="xref linktype-component" href="/messaging-platform/feature-releases/digital-agent-desk/customer-history-context-for-agent-desk" title="Customer History Context for Agent Desk">Customer History Context for Agent Desk</a></p></td>

      <td class="td" />
    </tr>

    <tr>
      <td class="td"><p>Auto-Pilot Endings</p></td>
      <td class="td"><p><a class="xref linktype-component" href="/messaging-platform/feature-releases/digital-agent-desk/auto-pilot-endings-for-agent-desk" title="Auto-Pilot Endings for Agent Desk">Auto-Pilot Endings for Agent Desk</a></p></td>

      <td class="td" />
    </tr>

    <tr>
      <td class="td"><p>Search Queue Names</p></td>
      <td class="td"><p><a class="xref linktype-component" href="/messaging-platform/feature-releases/digital-agent-desk/search-queues-in-agent-desk" title="Search Queues in Agent Desk">Search Queues in Agent Desk</a></p></td>

      <td class="td" />
    </tr>

    <tr>
      <td class="td"><p>Adding a New Field last\_dispositioned\_ts to rep\_activity</p></td>
      <td class="td"><p><a class="link" href="https://docs-sdk.asapp.com/product_features/ASAPP%20-%20AgentDesk-%20Adding%20a%20new%20field%20last_dispositioned_ts%20to%20rep_activity.pdf" rel="noopener" target="_blank">Adding a new field last\_dispositioned\_ts to rep\_activity</a></p></td>

      <td class="td" />
    </tr>

    <tr>
      <td class="td"><p>Send attachments</p></td>
      <td class="td"><p><a class="xref linktype-component" href="/messaging-platform/feature-releases/digital-agent-desk/send-attachments" title="Send Attachments">Send Attachments</a></p></td>
      <td class="td"><p> </p></td>
    </tr>

    <tr>
      <td class="td"><p>Chat Takeover</p></td>
      <td class="td"><p><a class="xref linktype-component" href="/messaging-platform/feature-releases/digital-agent-desk/chat-takeover" title="Chat Takeover">Chat Takeover</a></p></td>

      <td class="td" />
    </tr>
  </tbody>
</table>

Learn more about the Agent Desk (Digital) and its features [here](/messaging-platform/digital-agent-desk "Digital Agent Desk").


# Auto-Pilot Endings for Agent Desk
Source: https://docs.asapp.com/messaging-platform/feature-releases/digital-agent-desk/auto-pilot-endings-for-agent-desk



## Feature Release

This is the announcement for an upcoming ASAPP feature. Your ASAPP account team will provide a target release date and can direct you to more detailed information as needed.

## Overview

Agent Desk can now automate the end-of-chat process for agents, allowing them to opt-in to an Auto-Pilot Ending flow that will take care of the entire check-in and ending process so that agents can focus on more valuable tasks. Agents can turn Auto-pilot Endings on and off globally, edit the message, and personalize it with data inserts (such as 'customer name'), cancel the flow, or even speed it up to close the conversation earlier.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-6ca91a97-4e73-678e-e7e3-72de9f8ce701.png" />
</Frame>

*Auto-Pilot Endings running in Agent Desk with Initial Message queued.*

## Use and Impact

Customers often become unresponsive once they do not need anything else from the agent. To free up their slots to serve other customers waiting in the queue, agents must confirm there is nothing more they can help the customer with before closing the chat. To ensure the customer has a grace period to respond before being disconnected, agents follow a formulaic, multi-step check-in process with the customer prior to ending the chat. In these situations, Auto-Pilot Endings is intended to free up agents' attention for more active conversations, leading to greater agent efficiency.

## How It Works

Watch the video walkthrough below to learn more about Auto-Pilot Endings:

<iframe width="560" height="315" src="https://fast.wistia.net/embed/iframe/7b811v89x6" />

Auto-Pilot Endings enables agents to configure the ending message that is delivered in sequence. Each message is meant to be automatically sent to the customer when they become unresponsive:

### Messages

* **Initial Message** - Asking the customer if there is anything else that needs to be discussed.\
  *Example: "Is there anything else I can help you with?"*

* **Check-in Message** - Confirming whether the customer is still there.\
  *Example: "Are you still with me?"*

* **Second (Closing) Message** - A graceful ending message to close out the conversation. ASAPP can embed the customer name in this message.\
  *Example: "Thank you {FirstName}! It was a pleasure assisting you today. Feel free to reach out if you have any other questions."*

### Procedure

For each conversation, Auto-Pilot Endings follows a simple sequence when enabled:

1. **Suggestion or Manual Start:** Agent Desk will suggest to the agent to start the ending flow, through a pop-up banner at the top of the middle panel, when it predicts the issue has concluded. Agents can also manually start it from the dropdown menu in the header before a suggestion appears.

2. **Initial Message Queued:** Once Auto-Pilot Ending is initiated, Agent Desk shows the agent the initial message that is ready to send to the customer. On the right-hand panel, the notes panel will appear showing agents the automatic summary and free-text notes field. An indicator will show on the left-hand panel chat card along with a timer countdown showing when the initial message will be sent.

3. **Initial Message Sent:** Once the countdown is complete, the initial message is sent and another timer begins waiting for the customer to respond.

4. **Customer Response:** Agent Desk shows a countdown for how long it will wait for a response before sending a Check-in Message. It detects the following customer response types and acts accordingly:

   | Customer Response Type                         | Action                                                                                                                                                                                                                                                                                                                                                                                              |
   | ---------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
   | A. Customer confirms they don’t need more help | Closing Message is queued and sends after its countdown is complete; the chat issue ends. The agent can also choose to end the conversation before the countdown completes. ![Auto-pilot ending showing the closing message and a count down timer.](https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-d77354d8-3b33-6b6c-b14f-c57fc4226f80.png)                                         |
   | B. Customer confirms they need more help       | The Auto-Pilot Endings flow is canceled; the conversation continues as normal. A “new message” signal is sent to the agent to inform him that the customer returned the interaction. ![Autopilot ending canceled message showing along with a new message icon showing on the conversation.](https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-6f3b53eb-31e6-bb50-89d8-d079b385c39c.png) |
   | C. Unresponsive customer                       | A Check-in Message is sent and another timer begins. If the customer remains unresponsive, the Closing Message is sent and the chat issue ends. If the customer responds with any message, the Auto-Pilot Endings flow is canceled and the conversation continues as normal.                                                                                                                        |

### Agent Capabilities

**Manually Ending Auto-Pilot Endings Flow**\
At any time, an agent can click **Cancel** in the Composer window to end the Auto-Pilot Ending flow and return the conversation to its normal state.

**Manually Sending Ending Messages**\
Any time a message is queued, an agent can click **Send now** in the Composer window to bypass the countdown timer, send the message, and move to the next step in the flow.

**Managing Auto-Pilot Endings**\
Under the **Ending** tab in the **Responses** drawer of the right rail of Agent Desk, agents can:

* Enable or disable AutoPilot Endings using a toggle at the top of the tab.
* Customize the wording of the Closing Message; there are two versions of the message, accounting for when Agent Desk is aware and unaware of the customer's first name.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-0c233155-b298-53b0-a8b1-f9f6699c9cfc.png" />
</Frame>

### Feature Configuration

Customers must reach out to their ASAPP contact to configure Auto-Pilot Endings globally for their program:

**Global Default Auto-Pilot Ending Messages**

* Initial Message
* Check-in message
* Closing Message (named customer)
* Closing Message (unidentified customer)

<Note>
  Agents will only be able to personalize the Closing Messages in Agent Desk
</Note>

**Global Default Auto-Pilot Ending Timers**

* Main timer: The time to wait before sending both the initial and closing messages.
* No-response timer: The time to wait to send the check-in message if there's no response from the customer after a check-in message is sent.

## FAQs

1. **How is this feature different from Auto-Pilot Timeout?**\
   Auto-Pilot Timeout is meant for conversations that have stopped abruptly before concluding and is only recommended in those instances. When an agent enables and completes Auto-Pilot Timeout, the flow concludes with a customer being timed out. A timed out customer can resume their conversation and be placed back at the top of the queue if their issue hasn't yet expired. Auto-Pilot Endings is meant for conversations that are clearly ending. When an agent enables Auto-Pilot Endings, the flow concludes with ending the conversation. If the customer wants to chat again, they will be placed back into the queue and treated as a new issue.

2. **How does ASAPP classify the customer's response to the Initial Message to determine whether they are ready to end the conversation or still need help?**\
   When a customer responds to the Initial Message (asking whether they need more help), ASAPP classifies the return message into two categories:

   * A positive response confirming they don't need more help and are done with the conversation
   * A negative response confirming they need more help

   ASAPP uses a classification model trained on both types of responses to make the determination in real-time during the Auto-Pilot Endings flow.


# AutoSummary Data for Agent Desk
Source: https://docs.asapp.com/messaging-platform/feature-releases/digital-agent-desk/autosummary-data-for-agent-desk



## Feature Release

This is the announcement for an upcoming ASAPP feature. Your ASAPP account team will provide a target release date and can direct you to more detailed information as needed.

## Overview

The S3 data table `rep_assignment_disposition` will include a new field called `auto_summary_txt` that shows the automatically generated summary text submitted in Agent Desk for a given assignment. The field `disposition_notes_txt` will remain and continue to show any free-text disposition notes submitted by the agent.

## Use and Impact

The `auto_summary_txt` field will be present for all customers, though it will only show a value if AutoSummary (formerly called Automatic Summaries) is enabled in Agent Desk.

<Note>
  The `auto_summary_txt` field will always be present if AutoSummary is enabled, regardless of the underlying model used to generate summaries.
</Note>

Providing AutoSummary data outside the agent experience gives contact center teams a consistent, high-coverage data source for key events that occur in the conversation. This data source serves as a succinct conversation description for quality assurance purposes that doesn't require teams to read entire transcripts, particularly when manual disposition notes are missing or incomplete.

## How It Works

**Expected Output**

When AutoSummary is enabled, the `auto_summary_txt` shows a string containing each sentence of the automatically generated summary successively in a paragraph, in the order the key events occurred in the conversation. The `disposition_notes_txt` field will show any additional notes as a string.

| Field                   | Description                                                                                                                                                                                                                                                                                                                                                                                                                         |
| :---------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `auto_summary_txt`      | Customer chatted in for help with using their flight credit. Customer explained they were unable to use the credit because their reservation was on hold. Agent explained the customer would need to set the ticket on hold again. Agent informed the customer that they would have to accept voluntary changes to the reservation made under the confirmation code ejzqxr. Agent was unable to help the customer with the booking. |
| `disposition_notes_txt` | pax wanted to make payment using flight credit / informed pax to proceed with vol changes // pax denied                                                                                                                                                                                                                                                                                                                             |

**Agent Edits**

When AutoSummary presents a bulleted summary to agents at disposition time, the agent can choose to remove any bullet before submitting their disposition for the assignment. Removed parts of the summary are not included in `auto_summary_text`.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-9fcc823a-f54c-be5f-c0fb-31fcb5027a91.png" />
</Frame>

## FAQs

1. **When will `auto_summary_text` have a value?**

   * For any assignment where the agent submitted one or more bullets of an automatically generated summary.
   * If an agent removes every bullet in the summary, the `auto_summary_text` field will be empty.
   * If AutoSummary is not enabled, the `auto_summary_text` field will be empty.

2. **Does the type of model used for AutoSummary affect the value in `auto_summary_text`?**

   * If AutoSummary is enabled, the `auto_summary_text` field will have a value regardless of the model used to generate the summary. The underlying model only affects the words used in the generated summary.

3. **How can I tell if AutoSummary is enabled?**

   * When the right-hand panel expands at disposition time, the **Notes** panel shows a bulleted automatic summary above a manual disposition field labeled **Additional Notes**.
   * If AutoSummary is not yet enabled, the **Notes** panel contains summary tags that agents can manually select to be inserted into a manual disposition field below. For more information about the process to enable AutoSummary, reach out to your ASAPP account team.


# Chat Takeover
Source: https://docs.asapp.com/messaging-platform/feature-releases/digital-agent-desk/chat-takeover



## Feature Release

This is the announcement for an upcoming ASAPP feature. Your ASAPP account team will provide a target release date and can direct you to more detailed information as needed.

## Overview

Managers have the ability to take over a chat from either an agent or an unassigned chat in the queue. Managers will then be able to service the chat from Agent Desk.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-1888ee10-a86c-3e97-c22e-17468eb31c7f.png" />
</Frame>

A confirmation modal will appear:

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-de58442d-77e5-418b-057d-1adda7e8afae.png" />
</Frame>

## Use and Impact

Chat Takeover provides managers with the ability to take over both live chats and queued chats. This capability impacts the following ways:

* Close chats where the issue has been resolved but still hasn't been dispositioned.
* Take over complex or convoluted chats.
* Handle part of the queue traffic in high-traffic situations.

## How it Works

Managers can take over a chat by navigating to a specific conversation in Live Insights and clicking on it to open the transcript area. The user can then click on the Takeover button in the upper left-hand corner. A confirmation prompt will appear to ensure the user wants to take over the chat. Once the chat has been transferred, the user will be notified. There is no limit to the number of chats a user can take over.

After that, admins can continue the chat and manage it at will. Users need to ensure they have access to Agent Desk to service the chat they have taken over. Access to the takeover functionality is granted through permissions set up by ASAPP.


# Customer History Context for Agent Desk
Source: https://docs.asapp.com/messaging-platform/feature-releases/digital-agent-desk/customer-history-context-for-agent-desk



## Feature Release

This is the announcement for an upcoming ASAPP feature. Your ASAPP account team will provide a target release date and can direct you to more detailed information as needed.

## Overview

This feature enables Agent Desk users to get context and historical conversation highlights when providing support to an authenticated customer.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-90784a9f-4b21-1e72-aa49-d5c6e6146ce5.png" />
</Frame>

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-87603cc4-5e36-44dd-206f-5e13c33c4bbc.png" />
</Frame>

**Updated "past conversation" indicator in the "Profile" tab, and updated "Past Conversation" tab.**

## Use and Impact

Past Conversations enables agents to provide customers with a more confident, informed, and tailored experience by displaying information about previous conversations with those customers.

This feature improves agents' efficiency and effectiveness by enhancing the retrievability and usefulness of historical conversation data.

As a result, it helps to reduce operational metrics such as Average Handling Time (AHT) and increase effectiveness indicators like the Customer Satisfaction (CSAT) score.

## How It Works

When agents log in to Agent Desk, they will notice a dynamic indicator under the context card's profile tab. This indicator alerts agents of past conversations with the customer and how long ago they occurred, eliminating the need for agents to switch between tabs.

Agents can either click the view button or toggle to the **Past Conversations** tab (formerly labeled **History**).

Past conversations are organized by date, with the most recent conversations showing first.

## FAQs

* **Do I need to configure anything to access this new feature?**

  No, this update will roll out to all Agent Desk users.


# Default Agent Status in Desk
Source: https://docs.asapp.com/messaging-platform/feature-releases/digital-agent-desk/default-agent-status-in-desk



## Feature Release

This is the announcement for an upcoming ASAPP feature. Your ASAPP account team will provide a target release date and can direct you to more detailed information as needed.

## Overview

Administrators can configure a default status for agents for every time they log in.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-0ba5c13b-559b-7208-74fb-bee60de78107.png" />
</Frame>

*Active status selected by default in the Status selection menu.*

## Use and Impact

By default, when agents log in to the platform, they inherit the same status they had when they last logged out. This behavior often leads to downtime if the agents fail to update their status to an active state, creating backlogs in queues as there are fewer agents to allocate chats to than there should be.

This feature allows customers to set a default status, such as available, every time an agent logs in. Administrators can configure this default status for both Voice and Agent desks.

## How It Works

After enabling this feature, whenever an agent logs back into Voice or Agent Desk, their status is automatically changed to a configured default status.

**Configuration**

To automatically set a default status for agents when they log in, contact your ASAPP account team.

## FAQs

1. **Would agents always get a default status even if I don't configure one?**

   No. If you don't configure a default status, your agents will continue to have the same status they had when they last logged out.

2. **Can I choose any default status?**
   Yes. Although setting a default status of "active" would prevent possible delays in assigning messages from a queue, you can configure whatever status you need.


# Disable Transfer to Same Queue in Agent Desk
Source: https://docs.asapp.com/messaging-platform/feature-releases/digital-agent-desk/disable-transfer-to-same-queue-in-agent-desk



## Feature Release

This is the announcement for an upcoming ASAPP feature. Your ASAPP account team will provide a target release date and can direct you to more detailed information as needed.

## Overview

Agent Desk can prevent agents from transferring a customer to another agent in the same queue.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-f4579f6c-c5b2-6ee1-097a-b7c940406fd1.png" />
</Frame>

## Use and Impact

In some situations, transferring customers to the same queue they were waiting in can cause a poor customer experience.

Additionally, agents might transfer customers to the same queue to unassign themselves from the case, causing other agents to have to pick up new or complicated cases.

This feature gives administrators more flexibility in configuring which queues are available to their agents for transfer. It also prevents agents from transferring customers with difficult or time-consuming requests to another agent.

Overall, this feature ensures a better customer experience by preventing possible delays by transferring waiting customers to the same queue.

## How It Works

Enabling this feature removes the queue where the issue is assigned from the transfer menu.

<Note>
  The transfer menu will still show other queues that the agent is assigned to.
</Note>

**Configuration**

To enable this feature, contact your ASAPP account team.


# Search Queues in Agent Desk
Source: https://docs.asapp.com/messaging-platform/feature-releases/digital-agent-desk/search-queues-in-agent-desk



## Feature Release

This is the announcement for an upcoming ASAPP feature. Your ASAPP account team will provide a target release date and can direct you to more detailed information as needed.

## Overview

Agent Desk enables agents to easily transfer conversations to different queues by typing in the queue name and selecting it from a filtered list of results.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-234f2004-2efc-954e-640d-14e8ab5869fc.gif" />
</Frame>

*Search queue name in queue transfer menu.*

## Use and Impact

The search functionality is particularly useful for agents that have a long list of queue choices in the transfer menu.

We expect that a search functionality will help ensure agents select the right queue, reducing the number of transfers to unintended or incorrect queues.

## How It Works

Agents can select the queue to which they want to transfer the conversation by entering its name and choosing it from a filtered list.

<Note>
  The search query will filter only the exact matches of the queue's name.
</Note>


# Send Attachments
Source: https://docs.asapp.com/messaging-platform/feature-releases/digital-agent-desk/send-attachments



## Feature Release

This is the announcement for an upcoming ASAPP feature. Your ASAPP account team will provide a target release date and can direct you to more detailed information as needed.

## Overview

End customers can send pdf attachments to agents in order to provide more information about their case

## Use and Impact

Agents might need to receive PDFs and images in order to complete or service an issue related to a customer chat. Such as a fraud case as they need proof of the transaction.

| Receiving PDFs                                                                                                                     | Receiving Images                                                                                                                   |
| :--------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------- |
| <Frame><img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-38d88ea3-c564-f4c3-4ab8-41c051145768.png" /></Frame> | <Frame><img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-f9d628ed-880a-dae6-d6ee-189d07c90282.png" /></Frame> |

## How it Works

Agents can see the attachment component in a chat with a customer.
Agents can view images in a separate modal and can download and view a PDF.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-8ecf4069-2b40-c674-2577-307f42810d61.png" />
</Frame>

Supported file types

* JPEG
* JPG
* PNG
* PDF

The capability is currently supported on:

* Apple Messaged for Business

Maximum size is 10MB for images and 20MB for PDFs.


# Transfer to Paused Queues in Agent Desk
Source: https://docs.asapp.com/messaging-platform/feature-releases/digital-agent-desk/transfer-to-paused-queues-in-agent-desk



## Feature Release

This is the announcement for an upcoming ASAPP feature. Your ASAPP account team will provide a target release date and can direct you to more detailed information as needed.

## Overview

Agents now have the ability to transfer customers to a paused queue.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-fe379296-a2d6-4add-d8c6-c0b38850c45b.png" />
</Frame>

## Use and Impact

In some cases, the only agents that can properly address a customer's issue are part of a queue that is temporarily paused. To ensure that agents can always redirect customers to the applicable queue, this feature allows agents to transfer customers to a paused queue, even if the wait times are long.

This feature prevents poor customer experience by telling customers to reach out later or sending them to a queue that cannot appropriately help them.

It also saves agents time by enabling them to route the customer to the proper queue when they cannot address the issue.

## How It Works

Administrators might pause a queue if they detect they are getting a higher demand than expected.
When enabled, paused queues appear in the agent's transfer menu with a label indicating their status so that agents can identify them.

<Note>
  When transferring a customer to a paused queue, the customer gets placed at the end of that queue.
</Note>

**Configuration**

To enable your agents to transfer customers to a paused queue, contact your ASAPP account team.


# Insights Manager Overview
Source: https://docs.asapp.com/messaging-platform/feature-releases/insights-manager



<table class="informaltable frame-void rules-rows">
  <thead>
    <tr>
      <th class="th"><p>Feature Name</p></th>
      <th class="th"><p>Feature Release Details</p></th>
      <th class="th"><p>Additional Relevant Information (if available)</p></th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td class="td"><p>AutoPilot Ending Metrics to Dashboards and Feeds</p></td>
      <td class="td"><p><a class="link" href="https://docs-sdk.asapp.com/product_features/ASAPP%20-%20AutoPilot%20Ending%20Metrics%20to%20Dashboards%20and%20Feeds.pdf" rel="noopener" target="_blank">AutoPilot Ending Metrics to Dashboards and Feeds</a></p></td>

      <td class="td" />
    </tr>

    <tr>
      <td class="td"><p>GBM Survey Data into Customer Reporting</p></td>
      <td class="td"><p><a class="link" href="https://docs-sdk.asapp.com/product_features/ASAPP%20-%20Insights%20Manager%20-%20GBM%20Survey%20Data%20into%20Customer%20Reporting.pdf" rel="noopener" target="_blank">GBM Survey Data into Customer Reporting</a></p></td>

      <td class="td" />
    </tr>

    <tr>
      <td class="td"><p>Organizational Groups</p></td>
      <td class="td"><p><a class="link" href="https://docs-sdk.asapp.com/product_features/Organizational%20Group%20update%20One%20Pager.pdf" rel="noopener" target="_blank">Organizational Groups in Admin</a></p></td>

      <td class="td" />
    </tr>

    <tr>
      <td class="td"><p>Chatlog Redesign</p></td>
      <td class="td"><p><a class="link" href="https://docs-sdk.asapp.com/product_features/_Chat%20Log%20Redesign%20in%20Admin%20-%20One%20Pager.pdf" rel="noopener" target="_blank">Chatlog Redesign</a></p></td>

      <td class="td" />
    </tr>

    <tr>
      <td class="td"><p>Customer-Ended Flexible Concurrency Signal</p></td>
      <td class="td"><p><a class="link" href="https://docs-sdk.asapp.com/product_features/Flex%20Concurrency%20v2%20One%20Pager.pdf" rel="noopener" target="_blank">Customer-Ended Flexible Concurrency Signal</a></p></td>

      <td class="td" />
    </tr>

    <tr>
      <td class="td"><p>Historical Reporting Upgrade Release</p></td>
      <td class="td"><p><a class="link" href="https://docs-sdk.asapp.com/product_features/Historical%20Reporting%20Upgrade%20Release%20-%2012_7_2020.pdf" rel="noopener" target="_blank">Historical Reporting Upgrade Release (v1.4.1)</a></p></td>

      <td class="td" />
    </tr>

    <tr>
      <td class="td"><p>Conversation Manager - Experience Updates</p></td>

      <td class="td">
        <p><a class="link" href="https://docs-sdk.asapp.com/product_features/Conversation%20List%20Table%20Experience%20Updates%20--%20one%20pager.pdf" rel="noopener" target="_blank">Table Experience Updates</a></p>
        <p><a class="link" href="https://docs-sdk.asapp.com/product_features/_Change%20to%20transcript%20navigation%20UX%20--%20one%20pager.pdf" rel="noopener" target="_blank">Transcript Navigation Updates</a></p>
      </td>

      <td class="td" />
    </tr>

    <tr>
      <td class="td"><p>Conversation Manager - Optimizations</p></td>

      <td class="td">
        <p><a class="link" href="https://docs-sdk.asapp.com/product_features/Conversation%20Details%20Expander%20-%20One%20Pager.pdf" rel="noopener" target="_blank">Conversation Details Expand on Default</a></p>
        <p><a class="link" href="https://docs-sdk.asapp.com/product_features/Conversation%20List%20-%20Long%20String%20Truncation%20One%20Pager.pdf" rel="noopener" target="_blank">Truncation of Long IDs</a></p>
      </td>

      <td class="td" />
    </tr>

    <tr>
      <td class="td"><p>Live Insights Queue Groups</p></td>
      <td class="td"><p><a class="link" href="https://docs-sdk.asapp.com/product_features/_Realtime%20Queue%20Groups%20One%20Pager%20Announcement.pdf" rel="noopener" target="_blank">Live Insights Queue Groups</a></p></td>

      <td class="td" />
    </tr>

    <tr>
      <td class="td"><p>Flexible Concurrency</p></td>
      <td class="td"><p><a class="link" href="https://docs-sdk.asapp.com/product_features/Flex%20Concurrency%20One%20Pager.pdf" rel="noopener" target="_blank">Flexible Concurrency</a></p></td>

      <td class="td" />
    </tr>

    <tr>
      <td class="td"><p>Sentiment Analysis</p></td>
      <td class="td"><p><a class="link" href="https://docs-sdk.asapp.com/product_features/OnePager%20-%20Sentiment%20Analysis%20(1).pdf" rel="noopener" target="_blank">Sentiment Analysis</a></p></td>

      <td class="td" />
    </tr>

    <tr>
      <td class="td"><p>Conversation Manager - Loading Enhancements</p></td>
      <td class="td"><p><a class="link" href="https://docs-sdk.asapp.com/product_features/ConversationList-LoadingEnhancements.pdf" rel="noopener" target="_blank">Conversation Manager - Loading Enhancements</a></p></td>

      <td class="td" />
    </tr>

    <tr>
      <td class="td"><p>High Queue Mitigation - Custom High Wait Message</p></td>
      <td class="td"><p><a class="link" href="https://docs-sdk.asapp.com/product_features/High%20Queue%20Mitigation%20Tools%20-%20Milestone%202.pdf" rel="noopener" target="_blank">High Queue Mitigation Tools - Milestone 2</a></p></td>

      <td class="td" />
    </tr>

    <tr>
      <td class="td"><p>Custom Attributes in Conversation Manager</p></td>
      <td class="td"><p><a class="link" href="https://docs-sdk.asapp.com/product_features/ASAPP%20-%20Insights%20Manager%20-%20Custom%20Attributes%20in%20Conversation%20Manager.pdf" rel="noopener" target="_blank">Custom Attributes in Conversation Manager</a></p></td>

      <td class="td" />
    </tr>

    <tr>
      <td class="td"><p>Exact Search</p></td>
      <td class="td"><p><a class="link" href="https://docs-sdk.asapp.com/product_features/ASAPP%20-%20Insights%20Manager%20-%20Exact%20Search.pdf" rel="noopener" target="_blank">Exact Search</a></p></td>

      <td class="td" />
    </tr>

    <tr>
      <td class="td"><p>Occupancy and Utilization Update</p></td>
      <td class="td"><p><a class="link" href="https://docs-sdk.asapp.com/product_features/ASAPP%20-%20Insights%20Manager%20-%20Occupancy%20and%20Utilization%20Update.pdf" rel="noopener" target="_blank">Occupancy and Utilization Update</a></p></td>

      <td class="td" />
    </tr>

    <tr>
      <td class="td"><p>Rebrand and Nav Update</p></td>
      <td class="td"><p><a class="link" href="https://docs-sdk.asapp.com/product_features/ASAPP%20-%20Insights%20Manager%20-%20Rebrand%20and%20Nav%20Update.pdf" rel="noopener" target="_blank">Rebrand and Nav Update</a></p></td>

      <td class="td" />
    </tr>

    <tr>
      <td class="td"><p>Conversation Sentiment Enhancements</p></td>
      <td class="td"><p><a class="link" href="https://docs-sdk.asapp.com/product_features/Sentiment%20Enhancements%20in%20Conversation%20Manager.pdf" rel="noopener" target="_blank">Conversation Sentiment Enhancements</a></p></td>

      <td class="td" />
    </tr>

    <tr>
      <td class="td"><p>A new field rep\_unassignment\_ts added to rep\_activity export</p></td>
      <td class="td"><p><a class="link" href="https://docs-sdk.asapp.com/product_features/ASAPP%20-%20Insinghts%20Manager%20-%20Adding%20a%20new%20field%20unassigned_rep_ts%20to%20RepActivity.pdf" rel="noopener" target="_blank">New field rep\_unassignment\_ts added to rep\_activity export</a></p></td>

      <td class="td" />
    </tr>

    <tr>
      <td class="td"><p>Deprecation of company\_id</p></td>
      <td class="td"><p><a class="link" href="https://docs-sdk.asapp.com/product_features/ASAPP%20-%20Insights%20Manager%20-%20Deprecating%20company_id%20_%20Introducing%20company_name.pdf" rel="noopener" target="_blank">Deprecation of company\_id</a></p></td>

      <td class="td" />
    </tr>

    <tr>
      <td class="td"><p>Team and Location tables for Live Insights</p></td>
      <td class="td"><p><a class="xref linktype-fork" href="/messaging-platform/feature-releases/insights-manager/teams-and-locations-tables-for-live-insights" title="Teams and Locations Tables for Live Insights">Teams and Locations Tables for Live Insights</a></p></td>

      <td class="td" />
    </tr>

    <tr>
      <td class="td"><p>Ingest entry\_type dimension via a customer facing feed</p></td>
      <td class="td"><p><a class="link" href="https://docs-sdk.asapp.com/product_features/ASAPP%20-%20Insights%20Manager%20-%20Ingest%20entry_type%20dimension%20via%20a%20customer%20facing%20feed.pdf" rel="noopener" target="_blank">Ingest entry\_type dimension via a customer facing feed</a></p></td>

      <td class="td" />
    </tr>

    <tr>
      <td class="td"><p>Adding an allow-list for known good fields to output from CustomerJourney Feed</p></td>
      <td class="td"><p><a class="link" href="https://docs-sdk.asapp.com/product_features/ASAPP%20-%20Insights%20Manager%20-%20Adding%20an%20allow-list%20for%20known%20good%20fields%20to%20output%20from%20CustomerJourney%20Feed.pdf" rel="noopener" target="_blank">Adding an allow-list for known good fields to output from CustomerJourney Feed</a></p></td>

      <td class="td" />
    </tr>

    <tr>
      <td class="td"><p>Snowflake Cubes Deployment</p></td>
      <td class="td"><p><a class="link" href="https://docs-sdk.asapp.com/product_features/ASAPP%20-%20Snowflake%20Cubes%20Deployment.pdf" rel="noopener" target="_blank">Snowflake Cubes Deployment</a></p></td>

      <td class="td" />
    </tr>

    <tr>
      <td class="td"><p>Overflow Queue Routing</p></td>
      <td class="td"><p><a class="xref linktype-component" href="/messaging-platform/feature-releases/insights-manager/overflow-queue-routing" title="Overflow Queue Routing">Overflow Queue Routing</a></p></td>
      <td class="td"><p>Administrators can redirect traffic from one queue to another.</p></td>
    </tr>
  </tbody>
</table>


# Bulk Close and Transfer Chats
Source: https://docs.asapp.com/messaging-platform/feature-releases/insights-manager/bulk-close-and-transfer-chats



## Feature Release

This is the announcement for an upcoming ASAPP feature. Your ASAPP account team will provide a target release date and can direct you to more detailed information as needed.

## Overview

ASAPP is introducing Bulk Close and Transfer Chats in Live Insights, aimed at improving the ability to manage and alleviate queues with unusual activity.

Bulk Transfer and Closure includes modals and dropdown lists in Live Insights that helps agents use this feature.

## Use and Impact

A queue may be experiencing an unusual activity or high traffic. Either if the issue is unusual activity by agents or users, or if the queue experiences high traffic scenarios, clients need a way to alleviate a queue.

By allowing bulk transfer of chats, a different queue can overtake a part of the traffic, and thus lowering traffic.

By allowing bulk closing, unusual activity is stopped without further effort

## How it Works

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/messaging-platform/insights-manager/bulkchats.png" />
</Frame>

### Bulk Chat Transfer

A user sees a dropdown list and selects the “Transfer all chats” item from the dropdown menu.

A queue selection modal appears to ask: “Select the queue which you want to transfer all chats to?” and they see a downdrop list of all the queue names and need to select a queue name and click transfer chats button.

A toast message appears informing the user that all chats have been transferred.

The end customer does not see a change on their side and assumes they are still waiting in a queue.

### Bulk Chat Closure

A user clicks on the 3 dots in the upper right hand corner of the queue card they want to impact.

The user sees a dropdown list and selects the “End all chats” item from the dropdown menu. A confirmation modal appears to ask: “Are you sure you want to end all chats in this queue?” and they need to select confirm/yes to complete the action of ending all chats.

A toast message appears informing the user that all chats are ended.

The end customer sees the normal “Conversation has  ended” component.


# Overflow Queue Routing
Source: https://docs.asapp.com/messaging-platform/feature-releases/insights-manager/overflow-queue-routing



## Feature Release

This is the announcement for an upcoming ASAPP feature. Your ASAPP account team will provide a target release date and can direct you to more detailed information as needed.

## Overview

Administrators can redirect the traffic from one queue to another queue based on two different rules, namely: business hours and agent availability.

**Business Hours Rule**

The chat traffic from queue A is redirected to queue B when it is later than the open operating business hours for queue B.

**Agent Availability Rule**

The chat traffic from queue A is redirected to queue B when there is no available agent serving queue A.

## Use and Impact

Queue Routing impacts in the following ways:

* Reduce estimated wait time for end-customers
* Support closed queues when it is a legal requirement

## How it Works

Admins can choose to redirect traffic from Queue A to Queue B based on a rule configuration which is set by an ASAPP representative.


# Teams and Locations Tables for Live Insights
Source: https://docs.asapp.com/messaging-platform/feature-releases/insights-manager/teams-and-locations-tables-for-live-insights



## Feature Release

This is the announcement for an upcoming ASAPP feature. Your ASAPP account team will provide a target release date and can direct you to more detailed information as needed.

## Overview

Live Insights now offers a Team and a Locations tab with filtering options that helps to oversee the management of teams and agents. Each tab shows the size and occupancy of each result.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-d3598481-1963-4e8a-702e-ba299ce584f2.png" />
</Frame>

## Use and Impact

Customers assign staff to their queues from various sites/BPOs, which complicates tracking the real-time performance of their agents for administrators. They lack visibility into agent behaviors, outages, and staffing levels across different geographic locations.

Additionally, supervisors are sometimes required to provide hourly updates on agent status (active, on lunch, etc.), necessitating an easy method for accessing this information. The additional teams and location tabs in insights manager make the administrators task of managing their teams across various locations easier and more efficient.

## How It Works

Supervisors can track the following:

### Live Insights

* **Team Tab**
* **Locations Tab**

### Procedure

The administrator can see a list of agents after they have clicked into a particular queue, then selected Performance from the left-hand panel and clicked into the Agents icon on the right-hand panel.

They can further oversee results by performance metrics of the current day and filter both the agent list and metrics by any of the following attributes:

1. **Agent Name**
2. **Location**
3. **Team**
4. **Status**

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-dac80f45-73af-d191-2570-4d26c5a62949.png" />
</Frame>

### Management Capabilities

**Filtering by location**

Each location provides updates of performance and agents names.

**Filtering by site**

Each administrator can provide an hourly update of how many agents are active, on lunch, or in a different state as well as view corresponding metrics

### Feature Configuration

All information on which location and teams an agent belongs to is sourced through the SSO integration with ASAPP. Customers that require any changes to the data should change the respective attribute being passed to ASAPP.

Please contact your ASAPP representative for further information.


# Specific Case Releases Overview
Source: https://docs.asapp.com/messaging-platform/feature-releases/specific-case-releases



| Feature Name                | Feature Release Details                                                                                                                              | Additional Relevant Information (if available) |
| :-------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------- |
| Grouping Data and Filtering | [Grouping Data and Filtering](/messaging-platform/feature-releases/specific-case-releases/grouping-data-and-filtering "Grouping Data and Filtering") |                                                |
| Import and Export Flows     | [Import and Export Flows](/messaging-platform/feature-releases/specific-case-releases/import-and-export-flows "Import and Export Flows")             |                                                |
| Live Insights Metrics       | [Live Insights Metrics](/messaging-platform/feature-releases/specific-case-releases/live-insights-metrics "Live Insights Metrics")                   |                                                |


# Grouping Data and Filtering
Source: https://docs.asapp.com/messaging-platform/feature-releases/specific-case-releases/grouping-data-and-filtering



## Feature Release

This is the announcement for an upcoming ASAPP feature. Your ASAPP account team will provide a target release date and can direct you to more detailed information as needed.

## Overview

Each user is assigned to a group based on their SSO/SAML credentials.
SSO/SAML credentials determine what metrics and chats each user can see in Live Insights, Conversation Manager, and User Management.

## Use and Impact

Different Users now have access to different data, according to their SSO Credentials.

This helps each user to only see what their tasks cover, without need for further filtering or browsing.

Data Grouping results in the following:

* Each BPO is restricted to only the chats that they service
* Workforce Management users are able to see all chats, metrics and agents related to their BPO
* Each agent sees only their respective chats and data
* Each manager is able to see only their teams chats according to the group

Organizations send ASAPP four attributes per user (BPO, Product, Role, Location) and ASAPP will construct a group name from the attributes.

ASAPP will maintain a view of the group structure in order to allow for filtering and queue association

## How it Works

The filters are defined according to attributes provided by each user through SSO, allowing filtering of User manager by groups.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-ce6b8af0-16c9-bd6e-4bf4-daf952264e17.png" />
</Frame>


# Import and Export Flows
Source: https://docs.asapp.com/messaging-platform/feature-releases/specific-case-releases/import-and-export-flows



## Feature Release

This is the announcement for an upcoming ASAPP feature. Your ASAPP account team will provide a target release date and can direct you to more detailed information as needed.

## Overview

Provide flow builders with the ability to promote a flow from lower environments into production environments.

Export Button is available in the lower environment company marker to download a JSON file containing the flow details for a specific version.

Further, there is an import function in the production environment company marker where a user can upload (import) a JSON file with the flow details for a particular version.

## Use and Impact

This feature allows flow builders to export the JSON file for a given flow and then import the JSON file into to the production company marker. This allows the user to promote the flow from the lower environments into the production environment.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-1d325ec6-6a94-5657-6ddb-1abdd31c04cc.png" />
</Frame>

## How it Works

In AI Console, a user navigates to the Flows tab of Virtual Agent to import a version of the flow.

The user navigates to the list of flows in the Virtual Agent tooling and clicks the "Import flow" button. The normal window to find and upload a file on the computer is brought up.

* If the flow already exists it will be auto-incremented to a new version to save it.
* If the flow does not exist it is saved with the associated index file and the version set is #1.
  Users can select the flow and choose to export.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-42835dfd-1a8f-6a92-7962-a7195273add2.png" />
</Frame>

Export pop-up allows users to select the version to export.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-6c87136b-b27b-44ef-cb24-856ef44e97c4.png" />
</Frame>

|                                                                                                                                    |                                                                                                                                    |
| :--------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------- |
| <Frame><img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-7badc145-a63a-3a3a-6bc2-330067ea01e8.png" /></Frame> | <Frame><img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-3dcc627c-e94e-a6df-2381-766f54688f42.png" /></Frame> |

They can also choose an environment to import a flow.


# Live Insights Metrics
Source: https://docs.asapp.com/messaging-platform/feature-releases/specific-case-releases/live-insights-metrics



## Feature Release

This is the announcement for an upcoming ASAPP feature. Your ASAPP account team will provide a target release date and can direct you to more detailed information as needed.

## Overview

A new metric named - Average First Response Time was added in Live Insights to each queue card in order to monitor the amount of time it takes for a customer to receive their first response from an agent.

Additionally, a column named - SLA- was added to the conversations table within a queue card to monitor whether a conversation meets the response SLA time.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-bed027eb-466d-190c-9173-154d3eb33cd6.png" />
</Frame>

## Use and Impact

WorkForce managers need to monitor SLA's in order to respond to changes in capacity as they need to meet contractual commitments.

## How it Works

Workforce management team monitors two key live metrics which are not present in ASAPP's Live Insights.

Some organizations require that the First Response time be within 2 minutes. In order to monitor whether they're meeting this SLA they have a metric named 'Average First Response Time' (definition: the average time consumers wait for the first human response in a conversation).

ASAPP will add a metric named 'Average First Response Time' to each queue card in Live Insights.

<Note>
  The metric is calculated as 'Average First Response Time'= queue wait time + agent time to first response
</Note>

Organizations can monitor which chats have a response time longer than 2 minutes. ASAPP will add a response time column in the conversations tab within the queue card found in Live Insights. The calculation will be Response time= SLA (2 minutes)- response time.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-abb8b24f-933e-71f5-69b3-9ccfd5ba2ca7.png" />
</Frame>


# Voice Agent Desk
Source: https://docs.asapp.com/messaging-platform/feature-releases/voice-agent-desk



<table class="informaltable frame-void rules-rows">
  <thead>
    <tr>
      <th class="th"><p>Feature Name</p></th>
      <th class="th"><p>Feature Release Details</p></th>
      <th class="th"><p>Additional Relevant Information (if available)</p></th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td class="td"><p>Agent Performance Stats</p></td>
      <td class="td"><p><a class="link" href="https://docs-sdk.asapp.com/product_features/Agent%20Performance%20Stats%20in%20Desk%20.pdf" rel="noopener" target="_blank">Agent Performance Stats in Desk</a></p></td>

      <td class="td" />
    </tr>

    <tr>
      <td class="td"><p>KB Center Panel Suggestions Redesign</p></td>
      <td class="td"><p>Please contact your Implementation Manager for further release details.</p></td>

      <td class="td" />
    </tr>

    <tr>
      <td class="td"><p>On-the-fly Notes</p></td>
      <td class="td"><p>Please contact your Implementation Manager for further release details.</p></td>
      <td class="td"><p><a class="link linktype-component" href="/messaging-platform/digital-agent-desk/knowledge-base" title="Knowledge Base">Integrations: Knowledge Base</a></p></td>
    </tr>

    <tr>
      <td class="td"><p>Knowledge Base Favorite Folders</p></td>
      <td class="td"><p><a class="link" href="https://docs-sdk.asapp.com/product_features/Knowledge%20Base%20Favorite%20Folders.pdf" rel="noopener" target="_blank">Knowledge Base Favorite Folders</a></p></td>

      <td class="td" />
    </tr>

    <tr>
      <td class="td"><p>Knowledge Base Quick Access Recommendations</p></td>
      <td class="td"><p>Please contact your Implementation Manager for further release details.</p></td>

      <td class="td" />
    </tr>

    <tr>
      <td class="td"><p>Transcript Preview</p></td>
      <td class="td"><p>Please contact your Implementation Manager for further release details.</p></td>

      <td class="td" />
    </tr>

    <tr>
      <td class="td"><p>Context Card: Recent Calls</p></td>
      <td class="td"><p>Please contact your Implementation Manager for further release details.</p></td>

      <td class="td" />
    </tr>

    <tr>
      <td class="td"><p>Displaying IVR Utterances in Voice Desk</p></td>
      <td class="td"><p>Please contact your Implementation Manager for further release details.</p></td>

      <td class="td" />
    </tr>

    <tr>
      <td class="td"><p>Desk Redesign: Left Rail, Call, & Color Temperature Setting</p></td>

      <td class="td">
        <p><a class="link" href="https://docs-sdk.asapp.com/product_features/ASAPP%20-%20Agent%20Desk%20Color%20Temperature%20Setting.pdf" rel="noopener" target="_blank">Color Temperature Setting</a></p>
        <p>Please contact your Implementation Manager for further release details.</p>
      </td>

      <td class="td" />
    </tr>

    <tr>
      <td class="td"><p>Whisper</p></td>
      <td class="td"><p>Please contact your Implementation Manager for release details.</p></td>

      <td class="td" />
    </tr>

    <tr>
      <td class="td"><p>Chat Log / Transcript Redesign</p></td>
      <td class="td"><p>Please contact your Implementation Manager for further release details.</p></td>

      <td class="td" />
    </tr>

    <tr>
      <td class="td"><p>Automatic Summary</p></td>
      <td class="td"><p><a class="link" href="https://docs-sdk.asapp.com/product_features/ASAPP%20-%20Voice%20Desk%20-%20Automatic%20Summary.pdf" rel="noopener" target="_blank">Automatic Summary</a></p></td>

      <td class="td" />
    </tr>

    <tr>
      <td class="td"><p>Themeable Desk</p></td>
      <td class="td"><p><a class="link" href="https://docs-sdk.asapp.com/product_features/ASAPP%20-%20Voice%20Desk%20-%20Themeable%20Desk.pdf" rel="noopener" target="_blank">Themeable Desk</a></p></td>
      <td class="td"><p>Includes Dark Mode</p></td>
    </tr>
  </tbody>
</table>


# Insights Manager Overview
Source: https://docs.asapp.com/messaging-platform/insights-manager

Analyze metrics, investigate interactions, and uncover insights for data-driven decisions with Insights Manager.

ASAPP's Insights Manager aims to provide relevant and actionable learnings from your data. Insights elevates trends impacting your customers, provides live activity monitoring, volume management tools, in-depth performance analysis and reporting, and tools to conduct investigations on customer interactions.

Insights Manager includes three primary functions:

* Live Insights, to track and monitor agent activity in real-time
* Historical Insights, to perform data analysis and output in-depth reports
* Conversation Manager, to conduct investigations on customer interactions

## Live Insights

Live Insights is your go-to platform to track and monitor agents, conversations, and performance activity in real-time.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/messaging-platform/live-insights.png" />
</Frame>

* Track agent performance in real-time
* Monitor conversations as they happen through the live transcription service
* Whisper to agents as customer interactions happen to guide and course-correct behaviors
* Keep an eye on all your live performance metrics such as handle time, queue volume, and resolution rate
* Mitigate high queue volume to better manage instances of high traffic

<Card title="Live Insights" href="/messaging-platform/insights-manager/live-insights "> Visit Live Insights for a functional breakdown of reporting interfaces and metrics.</Card>

## Historical Insights

Historical Insights is a powerful tool to analyze performance metrics, conduct investigations, and uncover insights to make data-driven decisions.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/messaging-platform/historical-insights.png" />
</Frame>

* Access core performance dashboards pre-populated with your data, and ready to conduct analyses
* Program dashboards provide a deep overview of primary conversation and agent metrics
* Automation & Flow dashboards provide insights into the performance of flow containment, successful automations, and intent performance
* Operation & Workforce Management dashboards provide in-depth data to understand how agents are utilized, and pinpoint areas that are ripe for improvement
* Outcomes dashboards provide a view into the voice of the customer
* Content creators can create and share dashboards with members of your organization
* Automate report sharing based on your preferred schedule. Attach data to automated emails to continue investigations into your preferred tools

## Conversation Manager

Conversation Manager provides robust features to help you conduct investigations on customer interactions. Use the tools provided to find relevant conversations to support your quality control needs, to deepen research initiated in Historical Insights, or to review performance data associated with your conversations.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/messaging-platform/conversation-manager.png" />
</Frame>

* Find all captured conversations, regardless of channels
* Filter and drill-down into conversation content based on performance data, metadata, keywords, and personal customer identifiers
* Review feedback survey data submitted by customers

## Users & Capabilities

Insights Manager supports two main types of users: **Workforce Management Leaders** and **Business Stakeholders**.

| Workforce Management Leaders                                                                                                                                                 | Business Stakeholders                                                                                                                                                          |
| :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Who: Supervisors, Managers, and Front Line Leaders directly involved in the day-to-day management of individual or multiple contact centers.                                 | Who: Business & CX Analysts, Program Managers, and Directors directly working with ASAPP teams to implement and optimize for business goals.                                   |
| What: Managing agent staffing and contact center volume; Monitoring agent performance and customer satisfaction levels; Involved in coaching and quality management efforts. | What: Focused on optimizing for specific business goals; Creating and synthesizing data for end-to-end reporting; Detecting trends and improving customer experience insights. |

### Monitoring Capabilities

|                                | Workforce Management Leaders | Business Stakeholders |
| :----------------------------- | :--------------------------- | :-------------------- |
| Queue Groups & Personalization | ✓                            | ✓                     |
| Queue Performance              | ✓                            | ✓                     |
| Agent Monitoring               | ✓                            | ✓                     |
| CSAT Monitoring                | ✓                            | ✓                     |
| Viewing Live Conversations     | ✓                            | -                     |
| Whisper                        | ✓                            | -                     |
| High Queue Mitigation          | -                            | ✓                     |
| Chat Takeover                  | ✓                            | -                     |
| Queue Overflow Routing         | ✓                            | -                     |

### Reporting Capabilities

|                               | Workforce Management Leaders | Business Stakeholders |
| :---------------------------- | :--------------------------- | :-------------------- |
| Core Historical Reports       | ✓                            | ✓                     |
| Creating & Sharing Reports    | ✓                            | ✓                     |
| Data Definitions / Dictionary | ✓                            | ✓                     |
| Viewing Conversations         | ✓                            | ✓                     |
| Filters                       | ✓                            | ✓                     |
| Notes                         | ✓                            | ✓                     |
| Search                        | ✓                            | ✓                     |
| Export                        | ✓                            | ✓                     |

### Management Capabilities

|                | Workforce Management Leaders | Business Stakeholders |
| :------------- | :--------------------------- | :-------------------- |
| Business Hours | ✓                            | -                     |
| Users          | ✓                            | -                     |


# Live Insights Overview
Source: https://docs.asapp.com/messaging-platform/insights-manager/live-insights

Learn how to use Live Insights to monitor and analyze real-time contact center activity.

Live Insights provides tools to track agent and conversation performance in real-time. You can:

* Monitor all queues
* Monitor alerts
* Drill down into each queue to gain insight into what areas need attention.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/messaging-platform/insights-monitor-operations.png" />
</Frame>

1. The Overview page (All Queues) shows a summary widget for each configured queue.
2. Click a **queue tile** or select a **queue** from the header dropdown to navigate to the Queue Details page.

## Monitor Performance per Queue

The Queue Details page for each queue shows performance across the most important metrics.

All metrics displayed in the dashboard update in true real-time. Metrics can be categorized either as "Right Now" or "Current Period":

* Right Now metrics update immediately upon a change in the ecosystem.
* Current Period metrics will constantly update in aggregate over the day.

## Information Architecture

ASAPP continues to improve the Live Insights experience with new touch points to host live transcripts and to scale up when introducing new metrics and performance signals.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-bf8c4354-9a8c-4681-1308-58e471b6443e.png" />
</Frame>

1. **All Queues** → Provides a performance overview of all queues and queue groups. Also provides customization tools to show/hide queues and create/manage queue groups.
2. **Single Queue and Queue Groups** → These now include two pages:

   * **Conversations:** Displays performance data for all conversations currently connected to an agent, as well as live transcripts and alerts.
   * **Performance:** Displays queue performance data, both for 'right now' and rolling 'since 12 am'. It also provides agent performance data and showcases feedback sent by customers.

### Two Views: Conversations & Performance

<Tabs>
  <Tab title="Conversations">
    <Frame>
      <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/messaging-platform/live-insights.png" />
    </Frame>
  </Tab>

  <Tab title="Performance">
    <Frame>
      <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/messaging-platform/insights-performance-view.png" />
    </Frame>
  </Tab>
</Tabs>

**Conversations:**

Displays performance data for all conversations currently connected to an agent, as well as live transcripts and alerts.

**Performance:**

Displays queue performance data, both for 'right now' and rolling 'since 12 am'. It also provides agent performance data and showcases feedback sent by customers.


# Agent Performance
Source: https://docs.asapp.com/messaging-platform/insights-manager/live-insights/agent-performance

Monitor agent performance in Live Insights.

ASAPP provides robust real-time agent performance data. You can monitor:

* Agent status
* Handle and response time performance
* Agent utilization

In addition, alerts and signals provide context to better understand how agents are performing.

## How to Access Agent Data

You can access agent performance data from the 'Performance' page.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/messaging-platform/insights-manager/accessing-agent-data.png" />
</Frame>

1. **Open agent panel**: To view agent performance data, click the **Agent** icon on the right-side of the screen. A panel opens that contains a list of all agents currently logged into the queue.
2. **Close agent panel**: To close the agent panel, click the **close** icon.

## Agent Real-time Performance Data

Live Insights automatically updates performance data related to agents in real-time every 15 seconds.

## Search for Agents & Sort Data

ASAPP provides tools to organize and find the right content. You can search for a specific agent name or sort the data based on current performance.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/messaging-platform/insights-manager/agent-search.png" />
</Frame>

1. **Find agents**: To find a specific agent, enter the **agent name** in the search field. The list of agents will filter down to the relevant results. To remove the query, delete the **agent name** from the search field.
2. **Sort agents**: You can use each column in the agent panel to sort content. Default: list is sorted by agent name. To sort by a different metric, click the **column name**. To change the sort order, click the **active column name**.

## View Agent Transcripts

You can access live agent transcripts from the 'Agent' panel.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/messaging-platform/insights-manager/agent-conversations-and-filter.png" />
</Frame>

1. **Agents with assignments**: Agents currently taking assignments are underlined in the 'Agent' panel. Click an **underlined agent name** to go to the 'Conversation' page to view relevant agent transcripts.
2. **Agent filter applied**: When you view an agent's transcript, the 'Conversation Activity' table displays only their chats. This is indicated by the filter chip displayed above the list of conversations. To remove the filter, click the **X** icon in the filter chip.


# Alerts, Signals & Mitigation
Source: https://docs.asapp.com/messaging-platform/insights-manager/live-insights/alerts,-signals---mitigation

Use alerts, signals, and mitigation measures to improve agent task efficiency.

To improve user focus and task efficiency, ASAPP elevates various alerts and signals within Live Insights.

These alerts notify users when performance is degrading, when events are detected, or when high queue mitigation measures can be activated based on volume.

## Type of Alerts

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/messaging-platform/insights-manager/alert-types.png" />
</Frame>

Live Insights displays four alert types:

1. **Metric Highlighting**: Highlights metrics that are above their target threshold within Live Insights. You can see the highlights on the Overview page, as well as within single queues and queue groups. The alert will persist until the metric's performance returns below its threshold.
2. **Event-based Alerts**: Detects and records events per conversation and displays them in the conversation activity table.
3. **High Queue Mitigation**: Activates when the queue volume exceeds the target threshold. When active, you can use mitigation measures to reduce queue volume impacts.
4. **High Effort Issue**: Indicates when a high effort issue is awaiting assignment and is currently blocking other issues from being assigned.

## Metric Highlighting

Live Insights highlights metrics that are above their target threshold on the Overview page, as well as within single queues and queue groups.

The alert persists until the metric's performance returns below its threshold.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/messaging-platform/insights-manager/metric-highlight.png" />
</Frame>

Where metrics are highlighted:

1. **Conversation performance**: You can highlight both 'average handle time' and 'average response time'.
2. **Agent performance**: 'Time in status', 'average handle time', and 'average response time'.
3. **Queue performance**: You can highlight queue-level metrics within a single queue, queue groups, or on the Overview page.

## Event-based Alerts

Events are generated from actions taken by agents, customers or you.

Live Insights detects and records these events and displays them alongside conversation data, within the 'alert' column.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/messaging-platform/insights-manager/event-based-alerts.png" />
</Frame>

1. **Conversation events**: These events are related to a unique conversation. The events can be generated from agent actions or your actions.
   * **Customer transfers**: When an agent transfers a customer, Live Insights displays an alert next to the conversation.
   * **Whisper sent**: When you send a whisper message to an agent, Live Insights records and displays the event next to the conversation.
2. **Agent events**: These events impact the agent workload and help you contextualize agent performance. Live Insights displays the events for all targeted agents, within the Agent Performance panel.
   * **High effort**: Agents that are currently handling a high effort issue.
   * **Flex concurrency**: The agent is currently flexed and has a higher than normal utilization.

## High Queue Mitigation

ASAPP provides tools to enable workforce management groups to act fast when queues are or could be anomalously high.

**Tools Overview**

Live Insights can:

* Monitor queue volume for unusually high volume.
* Highlight 'Queued' metric based on severity level.
* Activate 'Custom High Wait Time' messaging and replace Estimated Wait Time messaging.
* Pause queues experiencing extremely high volume and prevent new queue assignments.

**Volume Thresholds:**

Live Insights highlights metrics when they reach past a threshold defined for the queue.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/messaging-platform/insights-manager/high-queue-mitigation-severity.png" />
</Frame>

1. **Low Severity:** detects abnormal activity and has moderate impact on the queue.
2. **High Severity**: detects highly abnormal activity. The queue is severely impacted.

**Mitigation Options:**

<table class="informaltable frame-void rules-rows">
  <tbody>
    <tr>
      <td class="td leftcol"><p><strong>Mitigation</strong></p></td>
      <td class="td leftcol"><p><strong>Severity Threshold</strong></p></td>
      <td class="td leftcol"><p><strong>Features available</strong></p></td>
    </tr>

    <tr>
      <td class="td leftcol">
        <p><strong>Default behavior</strong></p>
        <p>Business as usual. All queues are operating based on this setting.</p>
      </td>

      <td class="td leftcol"><p>None</p></td>

      <td class="td leftcol">
        <ul>
          <li><p>Estimated Wait Time messaging is active.</p></li>
          <li><p>Routing & assignment rules remain unchanged.</p></li>
        </ul>
      </td>
    </tr>

    <tr>
      <td class="td leftcol">
        <p><strong>Custom High Wait Time Message</strong></p>
        <p>Low severity mitigation measure. Replaces Estimated Wait Time messaging.</p>
      </td>

      <td class="td leftcol"><p>Low Severity</p></td>

      <td class="td leftcol">
        <ul>
          <li><p>Estimated Wait Time messaging is replaced with a custom message.</p></li>
          <li><p>Routing & assignment rules remain unchanged.</p></li>
        </ul>
      </td>
    </tr>

    <tr>
      <td class="td leftcol">
        <p><strong>Pausing the Queue</strong></p>
        <p>High severity mitigation measure. Prevents new assignments to the queue.</p>
      </td>

      <td class="td leftcol"><p>High Severity</p></td>

      <td class="td leftcol">
        <ul>
          <li><p>Estimated Wait Time messaging is replaced with a custom message alerting users the queue is currently closed due to high volume.</p></li>
          <li><p>Assignment to the queue is paused.</p></li>
          <li><p>Users currently in the queue remain in the queue.</p></li>
          <li><p>To time out users waiting in the queue, please contact ASAPP.</p></li>
        </ul>
      </td>
    </tr>
  </tbody>
</table>

### Activate Mitigation

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/messaging-platform/insights-manager/high-queue-mitigation-activation.png" />
</Frame>

1. **Mitigation menu options**: When available, Live Insights displays a menu on the relevant queue card in the Overview, as well as on the 'Performance' page of single queues and queue groups. To view those options, click the **menu** icon. The menu icon only displays when you highlight 'Queued'.
2. **Select mitigation**: Based on the severity level, Live Insights displays different mitigation options. Select an **option** to activate it. To remove the mitigation behavior, select **Default behavior**.
3. **Mitigation applied**: When you select a mitigation option, it is indicated on the queue card or on the Performance page.

## High Effort Issues

ASAPP supports a capability to enable agent focus for higher effort issues, while maintaining efficiency.

This feature dynamically adjusts how many concurrent issues an agent should handle while assigned a high effort issue.

### What is a High Effort Issue

ASAPP will route customers based on the expected effort of their issue. All issues, by default, will have an effort of 1.

Any issue with an effort value greater than 1 will be considered "high effort". Reach out to your ASAPP Implementation team to configure high effort rules for your program.

## Feature Definition

* **Slot**: A slot represents a space for a chat to be assigned to an agent. You can assign and configure multiple slots to a single agent via User Management.
* **Effort**: Effort represents what is needed from an agent to solve an issue. For each effort point assigned to an issue, an agent must have an equivalent number of available slots to be assigned that issue. ASAPP determines an issue's effort by its relevant customer attributes.
* **High Effort Time Threshold**: A threshold that sets how much time an agent can parallelize a high effort issue with other issues. You can configure this threshold per queue. This threshold represents the duration of all existing assignments an agent is handling when a high effort issue is next in line.
* **Flex Slot**: All agents have 1 additional slot that can be used if they are eligible to receive a flex assignment or if they are temporarily over-effort when handling a high effort issue.
* **Linear Utilization Level:** A type of Linear Utilization relative to the number of assignments an agent has assigned at a given time, regardless of the assignment workload state.
* **Assignment Workload**: A measure of Linear Workload relative to the number of active assignments an agent has assigned at a given time. An assignment is not considered active if it has caused an agent to become Flex Eligible.
* **Effort Workload**: A measure of Linear Workload relative to the issue effort of all active assignments an agent has assigned at a given time.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-d9e0c484-6703-5c97-858a-13055e603ff6.png" />
</Frame>

### How are high effort issues prioritized and assigned?

ASAPP assigns high effort chats in the order that they entered the queue. You can prioritize high effort chats higher in the queue using customer attributes. This prioritization is optional and not required. A configurable *high effort time threshold* allows each queue to set how much time an agent can parallelize a high effort issue with other assignments.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-aea93058-21b5-38be-9a3c-5cb4dc3871cd.png" />
</Frame>

### How are high effort issues assigned against other issues?

ASAPP assigns high effort issues in order of configured priority and when they entered the queue. An agent will receive a high effort assignment if they meet at least 1 of the following criteria:

* An agent has 0 active assignments.
* An agent has sufficient open slots to receive a high effort assignment.
* The **high effort time threshold** has elapsed for all of an agent's current assignments and the high effort chat's effort would not extend the agent's Effort Workload past their Flex Slot.

### How do high effort issues impact performance?

* High effort issues will not change current behavior for Queue Priority.
* High effort issues will not change current behavior for Flex Eligibility or Flex Protect.
* High effort issues take longer to assign because they have to wait for an agent to have sufficient effort capacity.
* If a set of queues has 50% or more agents in common, then a high effort issue at the front of one queue will hold the issues in the other "shared" queues until it is assigned.

### How do I monitor the impact of high effort issues?

You can view the 'Queued - High Effort' metric in Live Insights on queue detail pages. This metric captures the number of high effort issues currently waiting in the queue. If a high effort issue is first in queue and slows other issues from being assigned, Live Insights displays an alert on this metric. These changes will also be visible for programs that do not have high effort rules configured.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/messaging-platform/insights-manager/high-effort-states.png" />
</Frame>

### How can I tell which agents are handling high effort issues?

In the Agent Right Rail, you can monitor which agents are currently handling high effort issues. ASAPP displays an icon next to the agent's utilization indicating a high effort issue is assigned. These changes will also be visible for programs that do not have high effort rules configured.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/messaging-platform/insights-manager/high-effort-agent-states.png" />
</Frame>


# Customer Feedback
Source: https://docs.asapp.com/messaging-platform/insights-manager/live-insights/customer-feedback

Learn how to view customer feedback in Live Insights.

Live Insights tracks customers that engage with the satisfaction survey.

The Customer Feedback panel displays all feedback received throughout the day.

## Access Customer Feedback

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/messaging-platform/insights-manager/customer-feedback.png" />
</Frame>

1. **Open feedback panel**: To view feedback, click the **Feedback** icon on the right side of the 'Performance' page. The Customer Feedback panel opens.
2. **Time stamp**: Indicates when the feedback was recorded.
3. **Agent name and issue ID**: Indicates the targeted agent, as well as the customer's issue ID.
   * **Issue ID link**: click the **issue ID** to display the transcript in the Conversation Manager.
4. **Feedback**: Feedback left by the customer.
5. **CSAT**: CSAT score calculated based on customer responses to the survey.
6. **Find agent**: You can filter the feedback received by agent. To view feedback related to a specific agent, type the **agent name** in the search field.


# Live Conversations Data
Source: https://docs.asapp.com/messaging-platform/insights-manager/live-insights/live-conversations-data

Learn how to view and interact with live conversations in Live Insights.

You can find all conversations that are currently connected to an agent in Live Insights.

Performance data updates automatically in Live Insights. If a conversation's metrics are outside their target range, alerts display.

## Conversation Activity

The conversation activity table is the bread and butter of real-time monitoring.

You can see all conversations currently assigned to an agent. You can sort content by performance metrics to provide you with the view that is most relevant to your needs. Live Insights automatically refreshes performance data every 15 seconds.

Furthermore, you can access live transcripts for each conversation currently assigned.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/messaging-platform/insights-manager/conversation-activity.png" />
</Frame>

1. **Links**: Provides a quick entry point to view historical transcripts or performance data.
2. **Conversation count & refresh**: Displays the total conversations displayed in the table. Live Insights updates the content automatically every 15 seconds.
3. **Sorting**: You can sort the content by each of the metrics captured for each conversation. You can sort all columns in ascending/descending order. To sort, click the **column header**. Click the **header** again to reverse the sorting order. Default: Ascending by time assigned.
4. **Conversations**: Each conversation currently assigned to an agent displays as a row in the Conversation Activity table. Metrics associated with the conversation display and update dynamically.
5. **Metric highlighting**: Metrics that have assigned thresholds are highlighted. See 'Metrics Highlighting' for more information.
6. **Alerts**: When an event is recorded, it displays in the column. Not all conversations will include an event.

<Tip>
  See [Alerts, Signals & Mitigation](/messaging-platform/insights-manager/live-insights/alerts,-signals---mitigation "Alerts, Signals & Mitigation") for more information.
</Tip>

## Conversation Data Anatomy

Each row in the conversation activity table lists performance data.

The chart below outlines data available in Live Insights for each chat conversation.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/messaging-platform/insights-manager/conversation-data-activity.png" />
</Frame>

1. **Issue ID**: Unique conversation identifier assigned to a customer intent.
2. **Agent name**: Name of the agents handling the conversation.
3. **Channel**: Detected channel the customer is engaging with.
4. **Intent**: Last detected intent prior to the user being assigned to the queue.
5. **Time Assigned**: Time the conversation was assigned to an agent.
6. **Handle time**: Current handle time of the conversation.
7. **Average Response Time**: Average time it takes an agent to reply to customer utterances.
8. **Time Waiting**: Time since the last message that the sender has been waiting for a response.
9. **Alerts**: Event-based signals recorded throughout the conversation.
10. **Queue name**: Name of the queue the issue was assigned to. This feature only displays in Queue Groups. Click the **queue name** to go to the queue details view.

## View a Live Transcript

Each conversation connected to an agent includes a live transcript that you can view.

The transcript updates in real-time. You can send a Whisper to the agent from the transcript.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/messaging-platform/insights-manager/viewing-transcript.png" />
</Frame>

1. **Open transcripts**: To view a transcript, click any **row** in the Conversation Activity table.
2. **Transcript**: The transcript updates in real-time. Handle time is displayed, alongside conversation data (issue ID, agent, channel and intent.)
3. **Close transcripts:** To close a transcript, click the **Close** icon.
4. **Whisper**: A Whisper allows you to send a discrete message within the transcript that agents can see but is hidden from customers.

## Conversations: Current Performance Data

Current queue performance data displays to the right of the activity table.

These metrics encompass all conversations currently in the queue or connected to an agent.

You can view a drill-down, enhanced view of the performance data under the Performance page.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/messaging-platform/insights-manager/current-performance-data.png" />
</Frame>

1. **Queue Activity**: Includes 'Queued', 'Avg current time in queue', 'Average wait time', and 'Average time to assign'.
2. **Volume**: Includes 'Offered', 'Assigned to agent', and 'Time out by agent'.
3. **Handle & Response Time**: Includes 'Average handle time (AHT)', 'Average response time (ART)', and 'Average first response time (AFRT)'


# Metric Definitions
Source: https://docs.asapp.com/messaging-platform/insights-manager/live-insights/metric-definitions

Learn about the metrics available in Live Insights.

## Performance - 'Right Now' Metrics

| **Metric name**                       | **Definition**                                                                                                                                                                                              |
| :------------------------------------ | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Offered**                           | The number of conversations that are currently connected with an agent or waiting in the queue.                                                                                                             |
| **Assigned to Agent**                 | The number of conversations where a customer is currently talking to a live agent.                                                                                                                          |
| **Timed out by Agent**                | Only available as a current period metric for the day.                                                                                                                                                      |
| **Queued**                            | The number of customers who are waiting in the queue to be connected to an agent.                                                                                                                           |
| **Queued - Eligible for Assignment**  | The number of customers who are waiting in the queue, received a check-in message, and replied to it.                                                                                                       |
| **Max Queue Time**                    | The actual wait time of the customer who is positioned last in the given queue.                                                                                                                             |
| **Average Wait Time**                 | The average queue time for all customers who are currently assigned to an agent or waiting in the queue, including 'zero-time' for customers directly assigned to an agent when there were available slots. |
| **Average Time in Queue**             | The average queue time for all customers who are currently waiting in the queue.                                                                                                                            |
| **Average Time to Assign**            | The average queue time for all customers who are currently assigned to an agent, including 'zero-time' for customers directly assigned to an agent when there were available slots.                         |
| **Queue Abandons**                    | Only available as a current period metric for the day.                                                                                                                                                      |
| **Average Abandon Queue Time**        | Only available as a current period metric for the day.                                                                                                                                                      |
| **Queue Abandonment Rate**            | Only available as a current period metric for the day.                                                                                                                                                      |
| **Average Agent Response Time**       | The average amount of time to respond to a customer message across the assignment for agents who are currently handling chats.                                                                              |
| **Average Agent First Response Time** | The average amount of time to send the first line to a customer after the chat was assigned for agents who are currently handling chats.                                                                    |
| **Average Handle Time**               | The time spent across all current chats by an agent per assignment starting from when the chat was assigned to when it is dispositioned.                                                                    |
| **Active Slots**                      | A ratio of the number of currently active conversations to number of concurrent slots for agents who are in an Active status or actively handling chats.                                                    |
| **Occupancy**                         | The percentage of currently assigned chats to the number of agents with slots set to active.                                                                                                                |
| **Concurrency**                       | The percentage of currently assigned chats to the number of agents with currently assigned chats.                                                                                                           |
| **Logged In Agents**                  | The number of agents currently logged in to Agent Desk.                                                                                                                                                     |
| **Active and Away Agents**            | The number of agents with an active-type and away-type label respectively.                                                                                                                                  |
| **Agent Status**                      | The number of agents with each status label.                                                                                                                                                                |

## Agent Metrics

| **Metric name**           | **Definition**                                                                                                                                                                                        |
| :------------------------ | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Agent Name**            | Name of the agent currently logged in to Agent Desk. Agents currently handling assignments have their names underlined. On click, the agent's current assignments display in the 'Conversations' tab. |
| **Agent Status**          | Name of the status selected by the agent in Agent Desk. Green labels represent Available statuses, while orange labels represent Away statuses.                                                       |
| **Time in Status**        | The time an agent has spent in the currently displayed status.                                                                                                                                        |
| **Average Handle time**   | The time spent across all current assignments, starting from when the chat was assigned to when it is dispositioned, for a given agent.                                                               |
| **Average Response Time** | The average amount of time to respond to a customer message across all current assignments for a given agent.                                                                                         |
| **Assignments**           | The number of assignments an agent is currently handling.                                                                                                                                             |

## Conversation Metrics

| **Metric name**           | **Definition**                                                                          |
| :------------------------ | :-------------------------------------------------------------------------------------- |
| **Issue ID**              | Unique conversation identifier assigned to a customer intent.                           |
| **Agent Name**            | Name of the agents handling the conversation.                                           |
| **Channel**               | Channel the customer is engaging with.                                                  |
| **Intent**                | Last detected intent prior to the user being assigned to the queue.                     |
| **Queue Membership**      | Queue the issue was assigned to based on intent classification and queue routing rules. |
| **Time Assigned**         | Time the conversation was assigned to an agent.                                         |
| **Handle Time**           | Current handle time of the conversation.                                                |
| **Average Response Time** | Average time it takes an agent to reply to customer utterances.                         |
| **Time Waiting**          | Time since the last message sender has been awaiting a response.                        |
| **Alerts**                | Event-based signals recorded throughout the conversation.                               |

## Performance - 'Current Period' Metrics (since 12 am)

| **Metric name**                       | **Definition**                                                                                                                                                                                                      |
| :------------------------------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Offered - Total**                   | The total instances where the conversation was either placed in queue or assigned directly to an agent attributed to the time interval the Queue or direct Assignment event (without being placed in queue) occurs. |
| **Assigned to Agent - Total**         | The total instances where the customer was assigned to an agent.                                                                                                                                                    |
| **Timed Out by Agent - Total**        | The total instances assigned to an agent where they "Timed Out" the customer.                                                                                                                                       |
| **Queued - Total**                    | The total instances where a customer was placed in or is currently waiting in the queue to be connected to an agent.                                                                                                |
| **Queued - Eligible for Assignment**  | Only available as a right now metric.                                                                                                                                                                               |
| **Max Queue Time**                    | Only available as a right now metric.                                                                                                                                                                               |
| **Average Wait Time**                 | The average time a customer waited to abandon or be assigned to an agent, including 'zero-time' for customers directly assigned to an agent when there were available slots.                                        |
| **Average Time in Queue**             | The average time a customer waited in queue for those who either abandoned the queue or were assigned to an agent.                                                                                                  |
| **Average Time to Assign**            | The average queue time for all customers who were assigned to an agent, including 'zero-time' for customers directly assigned to an agent when there were available slots.                                          |
| **Queue Abandons**                    | The total count of customers who abandoned the queue.                                                                                                                                                               |
| **Average Abandon Queue Time**        | The average time a customer waited in queue prior to abandoning, either by being dequeued on the web or ending the chat before being assigned to an agent.                                                          |
| **Queue Abandonment Rate**            | The percent of customers who required a visit to the queue and abandoned before being assigned to an agent.                                                                                                         |
| **Average Agent Response Time**       | The average amount of time it takes an agent to respond to a customer message across all assignments.                                                                                                               |
| **Average Agent First Response Time** | The average amount of time it takes an agent to send the first line to a customer after the chat was assigned across all assignments.                                                                               |
| **Average Handle Time**               | The average amount of time spent by an agent per assignment, from when the chat was assigned to when the agent finishes dispositioning the assignment.                                                              |
| **Active Slots**                      | Only available as a right now metric.                                                                                                                                                                               |
| **Occupancy**                         | The percentage of cumulative utilization time to cumulative available time for all agents who handled chats.                                                                                                        |
| **Concurrency**                       | The weighted average number of concurrent chats that agents are handling at once, given an agent is utilized by handling at least one chat.                                                                         |
| **Logged In Agents**                  | Only available as a right now metric.                                                                                                                                                                               |
| **Active and Away Agents**            | Only available as a right now metric.                                                                                                                                                                               |
| **Agent Status**                      | Only available as a right now metric.                                                                                                                                                                               |

## Teams and Locations

You can track the live behaviors of agents by overseeing outages and staff levels at different geographic locations. Furthermore, each team provides hourly updates as to who is active/lunch etc and they want to be able to get this information easily.

Admins see a list of agents when they click into a particular queue and select Performance from the left-hand panel and clicked into the Agents icon on the right-hand panel. Admins can further oversee results by performance metrics of the current day and filter both the agent list and metrics by any of the following attributes:

* **Agent Name**
* **Location**
* **Team**
* **Status**

### Team Table

Admins can filter teams by type of role and review each company assigned to the team. Also, each result shows the size and the occupancy of each team.

Each administrator can provide an hourly update of how many agents are active, on lunch, or in a different state as well as view corresponding metrics.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-28cd97c5-0043-6d41-19f7-f206fa2c9573.png" />
</Frame>

### Location Table

Admins can filter locations by region and review the occupancy and size of each location.

Each location provides updates of performance and agent names.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-8bed415e-39a5-f14e-07bc-d30b485ccd04.png" />
</Frame>


# Navigation
Source: https://docs.asapp.com/messaging-platform/insights-manager/live-insights/navigation

Learn how to navigate the Live Insights interface.

## How to Access Live Insights

* You can access Live Insights from the primary navigation. To open, click the **Live Insights** link.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/messaging-platform/insights-manager/access-live-insights.png" />
</Frame>

## How to Access a Queue or Queue Group

Live Insights provides different views of queue performance data:

* Overview of all queue activity, including queue groups and organizational groups.
* Single queue and queue groups, which display queue and agent performance data.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/messaging-platform/insights-manager/access-queue.png" />
</Frame>

You can access single queue or queue group in two ways:

1. From Overview, **click a tile** → the relevant queue details page opens.
2. From the **queue dropdown**, select a **queue** or **queue group**.

## Navigate Away from a Single Queue or Queue Group

You can navigate back to the Live Insights Overview, or to a different queue or queue group.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/messaging-platform/insights-manager/navigate-away-queue.png" />
</Frame>

1. **Back arrow**: on click, the Live Insights Overview opens.
2. **Queue channel indicator**: indicates if the queue is a voice or chat queue.
3. **Queue dropdown**: on click, you can select a different queue or queue group.

## Channel-based Queues

Queues and queue groups host channel-specific content. ASAPP supports three queue types:

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/messaging-platform/insights-manager/channel-based-queue.png" />
</Frame>

1. **Chat queues**: includes all digital channels such as Apple Messages for Business, Web, SMS, iOS and Android.
2. **Voice queues**: includes all voice channels in one queue.
3. **Queue groups**: groups are made of aggregated queues of a single type. Each group contains either chat queues or voice queues. The number of queues in the queue group displays below the channel icon.

## Access Queue Performance and Conversation Data

Single queues and queue groups include two views: performance data about the queue and conversation activity data.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/messaging-platform/insights-manager/access-queue-performance.png" />
</Frame>

1. **Performance**: Click to access the performance data of the queue, as well as agent performance data and customer feedback.
2. **Conversations**: Click to access conversation activity, view transcripts, and send whisper messages.


# Performance Data
Source: https://docs.asapp.com/messaging-platform/insights-manager/live-insights/performance-data

Learn how to view performance data in Live Insights.

Live Insights provides a comprehensive view of today's performance within each queue and queue group.

You can view performance data for 'right now', as well as for the 'current period', defined as since 12 am. You can also view alerts, signals, and agent performance data on the Performance page.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/messaging-platform/insights-manager/current-performance-data.png" />
</Frame>

1. **Data definitions**: On click, opens a link to view metric definitions within Historical Reporting.
2. **Channel filter**: Filter performance data by channel. On click, channel options display. Select options to automatically filter data.
3. **Performance metrics**: Displays all performance metrics currently available. By default, performance metrics showcase a 'Right Now' view.
4. **Intraday**: Rolling data since the beginning of the day (12 am) is available upon activation. When active, the rolling count or averages since 12 am display.
5. **Agent metrics and feedback data**: On click, displays the Agent performance data or customer feedback received.

## Intraday Data

You can view current performance data ('right now') or view aggregate counts and averages since the beginning of the day ('current period').

These two views provide you with a fuller picture of queue performance and facilitate investigations and contextualization of events.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/messaging-platform/insights-manager/intraday-performance.png" />
</Frame>

1. **Right Now**: Default view. Provides performance data currently captured.
2. **Since 12 am**: Click the **toggle** to display 'current period' metrics.

Some metrics are not available in this configuration.

<Card title="Metrics Definitions" href="/messaging-platform/insights-manager/live-insights/metric-definitions">See Metrics Definitions for more information</Card>

## Filter by Channel

You can segment performance data per channel or by groups of channels.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/messaging-platform/insights-manager/performance-filter.png" />
</Frame>

1. **Channel dropdown**: To filter data per channel, click the **channel** dropdown to activate channel selection.
2. **Channel options**: All available channels display in the channel dropdown. You can select one or more **channels** to filter data by. Once selected, the data will automatically update.


# Queue Overview (All Queues)
Source: https://docs.asapp.com/messaging-platform/insights-manager/live-insights/queue-overview--all-queues-

Learn how to view and customize the performance overview for all queues and queue groups.

Live Insights provides a view of all single queues and queue groups, with a performance overview.

Live Insights highlights metrics that are outside the normal performance range. You can also find customization tools to show/hide queues, or to create and manage queue groups on this page.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/messaging-platform/insights-manager/queue-overview.png" />
</Frame>

1. **Queue count**: Displays the total number of queues available.
2. **Customization**: Tools to customize the display of queues are available to users.
   * Queue visibility: Show/hide queues to customize the Overview page
   * Queue groups: Create new queue groups, edit existing groups.
3. **Single Queues & Queue groups**: Displays performance overview for each queue and queue groups. Each tile leads to a drilled down view.

## Customization

ASAPP supports customization features to change the display of queues, as well as create and manage queue groupings.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/messaging-platform/insights-manager/queue-customization.png" />
</Frame>

To access customization features: click the **Customize** button on the Overview page. Two options appear. Click an **option** to launch the associated customization feature.

## Change Queue Visibility

ASAPP provides tools for you to customize the queues showcased on the Overview page. You can hide Queues based on customization needs.

Click the **Customize** button on the All Queues page to sort and select the **queues** to display.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/messaging-platform/insights-manager/queue-visibility.png" />
</Frame>

1. **Find a queue**: Use the search field to find a specific queue. Type in the **queue name** to filter the list of queues down to relevant matches.
2. **Sort queues**: You can sort in ascending or descending order. Click the **Sort** dropdown to select the desired sort order.
3. **Bulk selection**: To select all queues, or deselect all queues, click the **bulk selection feature** to view all queues. Click again to deselect all queues.
4. **Single queue selection**: select and deselect **queues** in the list. Deselected queues are hidden on the Overview page.
5. **Apply and cancel**: To confirm your selection, click **Apply**. To dismiss changes or close the modal, select **Cancel**.

## Create and Edit Queue Groups

You can create groups of queues to more efficiently monitor performance across multiple queues. When you create a queue group, a drill-down view of the queue group appears.

A queue group behaves similarly to a single queue: you get access to all live transcripts across all queues selected in the group.

You can access Performance data for all agents in the group, as well as consolidated customer feedback.

Queue groups are unique to each user. You can edit and create an unlimited number of queue groups.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/messaging-platform/insights-manager/queue-groups.png" />
</Frame>

1. **Create new group**: Click this **button** to create a new queue group.
2. **Existing queue group**: You can view, edit or delete them.
3. **Organizational group**: Queue groups created by your organization display with a 'Preset' tag. Queues with this tag are visible by all Live Insights users. These groups cannot be edited or deleted.
4. **Edit a group**: To edit an existing queue group, click the **Edit** icon.
5. **Delete a group**: To delete an existing queue group, click the **Delete** icon.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/messaging-platform/insights-manager/queue-groups-edit.png" />
</Frame>

**Edit a queue group:**

1. **Queue group name**: Name assigned to the queue group.
2. **Available queues**: List of all queues that you can add to a group. Select **queues** to add the queues to the group, and vice versa.
3. **Queues added to group**: Queues currently selected appear under the queue name.
4. **Apply and cancel**: To apply changes, click the **Apply** button. To dismiss changes or close the modal, click the **Cancel** button.

## Overflow Queue Routing

Administrators can redirect the traffic from a queue to another.

This helps to reduce overflow and helps to fulfill requirements of the overflowed queue.


# Integration Channels
Source: https://docs.asapp.com/messaging-platform/integrations

Learn about the channels and integrations available for ASAPP Messaging.

ASAPP Messaging offers a wide range of integration options to connect your brand with customers across various channels and enhance your customer service capabilities.

These integrations are divided into two main categories: [Customer Channels](#customer-channels) and [Applications Integrations](#applications-integrations).

**Customer Channels** are the direct touchpoints where your customers can interact with your brand.

<Note>Regardless of which channels you choose to integrate, [Digital Agent Desk](/messaging-platform/digital-agent-desk) standardizes the interaction for your agents into a single interface.</Note>

**Applications Integrations** are designed to enhance the functionality and efficiency of your customer service operations. These integrations cover various aspects such as agent authentication, routing, knowledge management, and user management.

## Customer Channels

<CardGroup>
  <Card title="Android SDK" href="/messaging-platform/integrations/android-sdk" />

  <Card title="Apple Messages for Business" href="/messaging-platform/integrations/apple-messages-for-business" />

  <Card title="iOS SDK" href="/messaging-platform/integrations/ios-sdk" />

  <Card title="Voice" href="/messaging-platform/integrations/voice" />

  <Card title="Web SDK" href="/messaging-platform/integrations/web-sdk" />

  <Card title="WhatsApp Business" href="/messaging-platform/integrations/whatsapp-business" />
</CardGroup>

## Applications Integrations

<CardGroup>
  <Card title="Agent SSO" href="/messaging-platform/digital-agent-desk/agent-sso" />

  <Card title="API Integration" href="/messaging-platform/digital-agent-desk/api-integration" />

  <Card title="Attributes Based Routing" href="/messaging-platform/digital-agent-desk/queues-and-routing/attributes-based-routing" />

  <Card title="Chat Instead" href="/messaging-platform/integrations/chat-instead" />

  <Card title="Customer Authentication" href="/messaging-platform/integrations/customer-authentication" />

  <Card title="Knowledge Base" href="/messaging-platform/digital-agent-desk/knowledge-base" />

  <Card title="Push Notifications and the Mobile SDKs" href="/messaging-platform/integrations/push-notifications-and-the-mobile-sdks" />

  <Card title="User Management" href="/messaging-platform/integrations/user-management" />
</CardGroup>


# Android SDK Overview
Source: https://docs.asapp.com/messaging-platform/integrations/android-sdk

Learn how to integrate the ASAPP Android SDK into your application.

You can integrate ASAPP's Android SDK into your application to provide a seamless messaging experience for your Android customers.

### Android Requirements

ASAPP supports Android 5.0 (API level 21) and up. The SDK currently targets API level 30.

ASAPP distributes the library via a Maven repository and you can import it with Gradle. ASAPP wrote the SDK in Kotlin. You can also use it if you developed your application in Java.

## Getting Started

To get started with Android SDK, you need to:

1. [Gather Required Information](#1-gather-required-information "1. Gather Required Information")
2. [Install the SDK](#2-install-the-sdk "2. Install the SDK")
3. [Configure the SDK](#3-configure-the-sdk "3. Configure the SDK")
4. [Open Chat](#4-open-chat "4. Open Chat")

### 1. Gather Required Information

Before downloading and installing the SDK, please make sure you have the following information. Contact your Implementation Manager at ASAPP if you have any questions.

|                      |                                                                                                                                                                                                                                        |
| :------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| App ID               | Also known as the "Company Marker", assigned by ASAPP.                                                                                                                                                                                 |
| API Host Name        | The fully-qualified domain name used by the SDK to communicate with ASAPP's API. Provided by ASAPP and subject to change based on the stage of implementation.                                                                         |
| Region Code          | The ISO 3166-1 alpha-2 code for the region of the implementation, provided by ASAPP.                                                                                                                                                   |
| Supported Languages  | Your app's supported languages, in order of preference, as an array of language tag strings. Strings can be in the format "\{ISO 639-1 Code}-\{ISO 3166-1 Code}" or "\{ISO 639-1 Code}", such as "en-us" or "en". Defaults to \["en"]. |
| Client Secret        | This can be an empty or random string\* until otherwise notified by ASAPP.                                                                                                                                                             |
| User Identifier      | A username or similar value used to identify and authenticate the customer, provided by the Customer Company.                                                                                                                          |
| Authentication Token | A password-equivalent value, which may or may not expire, used to authenticate the customer that is provided by the Customer Company.                                                                                                  |

\* In the future, the ASAPP-provided client secret will be a string that authorizes the integrated SDK to call the ASAPP API in production. ASAPP recommends fetching this string from a server and storing it securely using Secure Storage; however, as it is one of many layers of security, you can hard-code the client secret.

### 2. Install the SDK

ASAPP distributes the library via a Maven repository and you can import it with Gradle. First, add the ASAPP Maven repository to the top-level `build.gradle` file of your project:

```groovy
repositories {
    maven {
        url  "https://packages.asapp.com/chat/sdk/android"
    }
}
```

Then, add the SDK to your application dependencies:

`implementation 'com.asapp.chatsdk:chat-sdk:<version>'`

Please check the latest Chat SDK version in the [repository](https://gitlab.com/asappinc/public/mobile-sdk/android/-/packages) or [release notes](https://docs-sdk.asapp.com/api/chatsdk/android/releasenotes/).

At this point, sync and rebuild your project to make sure all dependencies are imported successfully. You can also validate the authenticity of the downloaded dependency by following these steps.

### Validate Android SDK Authenticity

You can verify the authenticity of the SDK and make sure that ASAPP generated the binary. The GPG signature is the standard way ASAPP handles Java binaries when this is a requirement.

#### Setup

First, download the ASAPP public key [from here](https://docs-sdk.asapp.com/api/chatsdk/android/security/asapp_public.gpg).

```json
wget -O asapp_public_key.asc https://docs-sdk.asapp.com/api/chatsdk/android/security/asapp_public.gpg
```

#### Verify File Signature

Use the console GPG command to import the key:

```json
gpg --import asapp_public_key.asc
```

You can verify that the public key was imported via `gpg --list-keys`.

Download the ASC file directly from [our repository](https://gitlab.com/asappinc/public/mobile-sdk/android/-/packages). Finally, you can verify the Chat SDK AAR and associated ASC files like so:

```json
gpg --verify chat-sdk-<version>.aar.asc chat-sdk-<version>.aar
```

### 3. Configure the SDK

Use the code below to create a configuration, and initialize the SDK with it. You must pass your `Application` instance.

Refer to the aforementioned [required information](/messaging-platform/integrations/ios-sdk/ios-quick-start). ASAPP recommends you initialize the SDK in your `Application.onCreate`.

```json
import com.asapp.chatsdk.ASAPP
import com.asapp.chatsdk.ASAPPConfig
val asappConfig = ASAPPConfig(
   appId = "my-app-id",
   apiHostName = "my-hostname.test.asapp.com",
   clientSecret = "my-secret")
ASAPP.init(application = this, config = asappConfig)
```

<Note>
  The SDK should only be initialized once and it is possible to update the configuration at runtime.
</Note>

### 4. Open Chat

Once the SDK has been configured and initialized, you can open chat. To do so, use the `openChat(context: Context)` function which will start a new Activity:

```kotlin
ASAPP.instance.openChat(context = this)
```

Once the chat interface is open, you should see an initial state similar to the one below:

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-22b1ac55-782d-e734-1a48-114b7f0e8a88.png" />
</Frame>

## Next Steps

<CardGroup>
  <Card title="Customization" href="/messaging-platform/integrations/android-sdk/customization" />

  <Card title="User Authentication" href="/messaging-platform/integrations/android-sdk/user-authentication" />

  <Card title="Miscellaneous APIs" href="/messaging-platform/integrations/android-sdk/miscellaneous-apis" />

  <Card title="Deep Links and Web Links" href="/messaging-platform/integrations/android-sdk/deep-links-and-web-links" />

  <Card title="Notifications" href="/messaging-platform/integrations/android-sdk/notifications" />
</CardGroup>


# Android SDK Release Notes
Source: https://docs.asapp.com/messaging-platform/integrations/android-sdk/android-sdk-release-notes



The scrolling window below shows release notes for ASAPP's Android SDK.
This content may also be viewed as a stand-alone webpage here: [https://docs-sdk.asapp.com/api/chatsdk/android/releasenotes](https://docs-sdk.asapp.com/api/chatsdk/android/releasenotes)


# Customization
Source: https://docs.asapp.com/messaging-platform/integrations/android-sdk/customization



## Styling

The SDK uses color attributes defined in the ASAPP theme, as well as extra style configuration options set via the style configuration class.

### Themes

To customize the SDK theme, extend the default ASAPP theme in your `styles.xml` file:

```xml
<style name="ASAPPTheme.Chat">
   <item name="asapp_primary">@color/custom_asapp_primary</item>
</style>
```

<Note>
  You must define your color variants for day and night in the appropriate resource files, unless night mode is disabled in your application.
</Note>

ASAPP recommends starting by only customizing `asapp_primary` to be your brand's primary color, and adjusting other colors when necessary for accessibility. `asapp_primary` is used as the message bubble background in most buttons and other controls. The screenshot below shows the default theme (gray primary - center) and custom primary colors on the left and right.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-bc80c9b7-254f-61fd-8b21-9d9221c32d2e.png" />
</Frame>

There are two other colors you may consider customizing for accessibility or to achieve an exact match with your app's theme: `asapp_on_background` and `asapp_on_primary`. `asapp_on_background` is used by other elements that might appear in front of the background. `asapp_on_primary` is used for text and other elements that appear in front of the primary color.

### More Colors

Besides the colors used for [themes](#themes "Themes"), you can override specific colors in a number of categories: the toolbar, chat content, messages, and other elements. You can override all properties mentioned below in the `ASAPPTheme.Chat` style.

The status bar color is `asapp_status_bar` and toolbar colors are `asapp_toolbar` (background), `asapp_nav_button`, `asapp_nav_icon`, and `asapp_nav_text` (foreground).

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-937231b0-dc0e-173c-2bef-603a6825a599.png" />
</Frame>

**General chat content colors**

* `asapp_background`
* `asapp_separator_color`
* `asapp_control_tint`
* `asapp_control_secondary`
* `asapp_control_background`
* `asapp_success`
* `asapp_warning`
* `asapp_failure`

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-a857e313-e965-8a94-be01-52765205c61c.png" />
</Frame>

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-a2e85b80-0e60-e1ee-333c-51a766d98e20.png" />
</Frame>

**Message colors**

* `asapp_messages_list_background`
* `asapp_chat_bubble_sent_text`
* `asapp_chat_bubble_sent_bg`
* `asapp_chat_bubble_reply_text`
* `asapp_chat_bubble_reply_bg`

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-c290271b-9669-616e-4e39-5054d68d2f17.png" />
</Frame>

### Text and Buttons

To customize fonts and colors for both text and buttons, use the `ASAPPCustomTextStyleHandler`. To set this optional handler use `ASAPPStyleConfig.setTextStyleHandler`. Use the given `ASAPPTextStyles`

object to:

* Set a new font family with `updateFonts`. If no new fonts are set, the system default will be used instead.
* Override font sizes, letter spacing, text colors, and text casing styles. You can also customize the font family for each text style individually, if needed.
* Override button colors for normal, highlighted and disabled states.

Example:

```kotlin
ASAPP.instance.getStyleConfig()
   .setTextStyleHandler { context, textStyles ->
       val regular = Typeface.createFromAsset(context.assets, "fonts/NH-Regular.ttf")
       val medium = Typeface.createFromAsset(context.assets, "fonts/Lato-Bold.ttf")
       val black = Typeface.createFromAsset(context.assets, "fonts/Lato-Black.ttf")
       textStyles.updateFonts(regular, medium, black)
       textStyles.body.fontSize = 14f
       val textHighlightColor = ContextCompat.getColor(context, R.color.my_text_hightlight_color)
       textStyles.primaryButton.textHighlighted = textHighlightColor
   }
```

See `ASAPPTextStyles` to see all overridable styles.

<Note>
  `setTextStyleHandler` is called when an ASAPP activity is created. Use the given `Context` object if you access resources to make sure that all customization uses correct resource qualifiers.

  For example: if a user is in chat and toggles Night Mode, the SDK automatically triggers an activity restart. Once the new activity is created, the SDK calls `setTextStyleHandler` with the new night/day context, which will retrieve the correct color variants from your styles.
</Note>

### Atomic Customisations

To customise the styles at an atomic level, you can use the following method. Customizing at the atopmic level will **override any default style** that is being set on the UI views. Use it only if general styling is not sufficient, and you need further customisation. This is optional, and in most cases, you won't need it. Use with caution.

Example:

```kotlin
ASAPP.instance.getStyleConfig()
    .setAtomicViewStyleHandler { context: Context, viewStyles: ASAPPCustomViewStyles ->
        // Update viewStyles as needed
    }
```

## Chat Header

The chat header (toolbar in the chat activity) has no content by default, but you can can add text or icon using `ASAPPStyleConfig`.

### Text Title

To add text to the chat header, pass a String resource to `setChatActivityTitle`. By default, the title will be aligned to start. For example:

```kotlin
ASAPP.instance.getStyleConfig()
    .setChatActivityTitle(R.string.asapp_chat_title)
```

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-b9d4fbc9-cc8a-9acf-070a-47b39d43905f.png" />
</Frame>

### Drawable Title

To add an icon to the chat header use: `setChatActivityToolbarLogo`. You can also center the header content by calling `setIsToolbarTitleOrIconCentered(true)`. For example:

```kotlin
ASAPP.instance.getStyleConfig
    .setChatActivityToolbarLogo(R.drawable.asapp_chat_icon)
    .setIsToolbarTitleOrIconCentered(true)
```

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-2f5e134a-27bf-81f4-9bf8-cd9c277e25d2.png" />
</Frame>

<Caution>
  Icons will have priority in the chat header. If you add both text and icon, only the icon will be used.
</Caution>

## Dark Mode

Android 10 (API 29) introduced Dark Mode (a.k.a night mode, dark theme), with a system UI toggle that allows users to switch between light and dark modes. ASAPP recommends reading the [developer documentation](https://developer.android.com/guide/topics/ui/look-and-feel/darktheme) for more information.

The ASAPP SDK theme defines default colors using the system resource "default" and "night" qualifiers, so chat will react to changes to the system night mode setting.

<Note>
  The ASAPP SDK does not automatically convert any color or image assets in Dark Mode, you must define night variants for each custom asset as described in [Android >Styling>Theming](#themes "Customization").
</Note>

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-b890e869-884e-07ad-b0d9-a564b0550f47.png" />
</Frame>

### Disable or Force a Dark Mode Setting

To disable Dark Mode, or to force Dark Mode for Android API levels below 29, ASAPP recommends using the [AppCompatDelegate.setDefaultNightMode](https://developer.android.com/reference/androidx/appcompat/app/AppCompatDelegate#setDefaultNightMode\(int\)) AndroidX API. This function changes the night mode setting throughout the entire application session, which also includes ASAPP SDK activities.

For example, it is possible to use Dark Mode on Android API 21 with the following:

```kotlin
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES)
```


# Deep Links and Web Links
Source: https://docs.asapp.com/messaging-platform/integrations/android-sdk/deep-links-and-web-links



## Handling Deep Links in Chat

Certain chat flows may present buttons that are deep links to another part of your app. To react to taps on these buttons, implement the `ASAPPDeepLinkHandler` interface:

```kotlin
ASAPP.instance.deepLinkHandler = object : ASAPPDeepLinkHandler {
    override fun handleASAPPDeepLink(deepLink: String, data: JSONObject?, activity: Activity) {
        // Handle deep link.
    }
} 
```

ASAPP provides an `Activity` instance for convenience, in case you need to start a new activity. Please ask your Implementation Manager if you have questions regarding deep link names and data.

## Handling Web Links in Chat

Certain chat flows may present buttons that are web links. To react to taps on these buttons, implement the `ASAPPWebLinkHandler` interface:

```kotlin
ASAPP.instance.webLinkHandler = object : ASAPPWebLinkHandler {
    override fun handleASAPPWebLink(webLink: String, activity: Activity) {
        // Handle web link.
    }
}
```

<Note>
  If you don't implement the handler (see above), the ASAPP SDK will open the link utilizing the system default with `Intent.ACTION_VIEW`.
</Note>

## Implementing Deep Links into Chat

### Getting Started

Please see the Android documentation on [Handling Android App Links](https://developer.android.com/training/app-links).

### Connecting the Pieces

Once you set up a custom URL scheme for your app and handle deep links into your application, you can start chat to pass any data payload extracted from the link:

```json
ASAPP.instance.openChat(context, asappIntent= mapOf("Code": "EXAMPLE_INTENT"))
```


# Miscellaneous APIs
Source: https://docs.asapp.com/messaging-platform/integrations/android-sdk/miscellaneous-apis



## Conversation Status

To get the current `ASAPPConversationStatus`, implement the `conversationStatusHandler` callback:

```kotlin
ASAPP.instance.conversationStatusHandler = { conversationStatus ->
    // Handle conversationStatus.isLiveChat and conversationStatus.unreadMessages
}
```

* If `isLiveChat` is `true`, the customer is currently connected to a live support agent or in a queue.
* The `unreadMessages` integer indicates the number of new messages received since last entering Chat.

### Trigger the Conversation Status Handler

You can trigger this handler in two ways:

1. Manually trigger it with:

```kotlin
ASAPP.instance.fetchConversationStatus()
```

The Chat SDK will fetch the status asynchronously and callback to `conversationStatusHandler` once it is available.

2. The handler may be triggered when a push notification is received if the application is in the foreground. If your application handles Firebase push notifications, use:

```kotlin
class MyFirebaseMessagingService : FirebaseMessagingService() {
    override fun onMessageReceived(message: RemoteMessage) {
        super.onMessageReceived(message)
        val wasFromAsapp = ASAPP.instance.onFirebaseMessageReceived(message)
        // Additional handling...
    }
}
```

<Note>
  The Chat SDK only looks for conversation status data in the payload and doesn't cache or persist analytics. If the push notification was sent from ASAPP, the SDK returns true and triggers the `conversationStatusHandler` callback.
</Note>

## Debug Logs

By default, the SDK only prints error logs to the console output. To allow the SDK to log warnings and debug information, use `setDebugLoggingEnabled`.

```kotlin
ASAPP.instance.setDebugLoggingEnabled(BuildConfig.DEBUG)
```

<Note>
  Disable debug logs for production use.
</Note>

## Clear the Persisted Session

To clear the ASAPP session persisted on disk:

```kotlin
ASAPP.instance.clearSession()
```

<Note>
  Only use this when an identified user signs out. Don't use for anonymous users, as it will cause chat history loss.
</Note>

## Setting an Intent

### Open Chat with an Initial Intent

```kotlin
ASAPP.instance.openChat(context, asappIntent = mapOf("Code" to "EXAMPLE_INTENT"))
```

To set the intent while chat is open, use `ASAPP.instance.setASAPPIntent()`. Only call this if chat is already open. Use `ASAPP.instance.doesASAPPActivityExist` to verify if the user is in chat.

## Handling Chat Events

Implement the `ASAPPChatEventHandler` interface to react to specific chat events:

```kotlin
ASAPP.instance.chatEventHandler = object : ASAPPChatEventHandler {
    override fun handle(name: String, data: Map<String, Any>?) {
        // Handle chat event
    }
}
```

<Note>
  These events relate to user flows inside chat, not user behavior like button clicks.
</Note>

### Implement Chat end

To track the end of a chat, implement the following custom `CHAT_CLOSED` event

<Tip>
  In this example, the event message is set as `Chat is closed`. But you can name it as you wish.
</Tip>

```kotlin
chatEventHandler = object : ASAPPChatEventHandler {
                override fun handle(name: String, data: Map<String, Any>?) {
                    if (name == CustomEvent.CHAT_CLOSED.name) {
                        Toast.makeText(applicationContext,
                            "Chat is closed",
                            Toast.LENGTH_LONG).show()
                    }
                }
            }
```

<Note>
  Chat end implementation is available for the SDK version 10.3.1 and above.
</Note>


# Notifications
Source: https://docs.asapp.com/messaging-platform/integrations/android-sdk/notifications



ASAPP provides the following notifications:

* [Push Notifications](#push-notifications "Push Notifications")
* [Persistent Notifications](#persistent-notifications "Persistent Notifications")

## Push Notifications

ASAPP's systems may trigger push notifications at certain times, such as when an agent sends a message to an end customer who does not currently have the chat interface open. In such scenarios, ASAPP calls your company's API with data that identifies the recipient's device, which triggers push notifications. ASAPP's servers do not communicate with Firebase directly.

ASAPP provides methods in the SDK to register and deregister the customer's device for push notifications.

For a deeper dive on how ASAPP and your company's API handle push notifications, please see our documentation on [Push Notifications and the Mobile SDKs](../push-notifications-and-the-mobile-sdks "Push Notifications and the Mobile SDKs").

In addition to this section, see Android's documentation about [Firebase Cloud Messaging](https://firebase.google.com/docs/cloud-messaging) and specifically how to setup [Android Cloud Messaging](https://firebase.google.com/docs/cloud-messaging/android/client).

### Enable Push Notifications

1. Identify which token you will use to send push notifications to the current user. This token is usually either the Firebase instance ID or an identifier generated by your company's API for this purpose.
2. Then, register the push notification token using:

   ```kotlin
   ASAPP.instance.updatePushNotificationsToken(newToken: String)
   ```

   In case you issue a new token to the current user, you also need to update it in the SDK.

### Disable Push Notifications

In case the user logs out of the application or other related scenarios, you can disable push notifications for the current user by calling:

`ASAPP.instance.disablePushNotifications().`

<Note>
  Call this function before you change `ASAPP.instance.user` (or clear the session) to prevent the customer from receiving unintended push notifications.
</Note>

### Handle Push Notifications

You can verify if ASAPP triggered a push notification and passed a data payload into the SDK.

<Note>
  Your application usually won't receive push notifications from ASAPP if the identified user for this device is connected to chat.
</Note>

For a deeper dive on how Android handles push notifications, please see the Firebase docs on [Receiving Messages in Android](https://firebase.google.com/docs/cloud-messaging/android/receive).

#### Background Push Notifications

If your app receives a push notification while in the background or closed, the system will display the OS notification. Once the user taps the notification, the app starts with `Intent` data from that push notification.

To help differentiate notifications from ASAPP and others your app might receive, ASAPP recommends that the push notification has a `click_action` with the value `asapp.intent.action.OPEN_CHAT`. For more information on how to set a click action, please see the [Firebase documentation](https://firebase.google.com/docs/cloud-messaging/http-server-ref#notification-payload-support). With a click action set to the push notification, you will need to add a new intent filter to match it:

```xml
<activity android:name=".HomeActivity">
    <intent-filter>
        <action android:name="asapp.intent.action.OPEN_CHAT" />
        <category android:name="android.intent.category.DEFAULT" />
    </intent-filter>
</activity>
```

Once you create the activity, check if it's an ASAPP notification, and then open chat with the data:

```kotlin
if (ASAPP.instance.shouldOpenChat(intent)) {
    ASAPP.instance.openChat(context = this, androidIntentExtras = intent.extras)
}
```

The helper function [`shouldOpenChat`](https://docs-sdk.asapp.com/api/chatsdk/android/latest/chatsdk/com.asapp.chatsdk/-a-s-a-p-p/should-open-chat.html) simply checks if the intent action matches the recommended one, but its use is optional.

#### Foreground Push Notifications

When you receive Firebase push notifications while your app is in the foreground, it will call `FirebaseMessagingService.onMessageReceived`. Check if that notification is from ASAPP:

```kotlin
class MyFirebaseMessagingService : FirebaseMessagingService() {
    override fun onMessageReceived(message: RemoteMessage) {
        super.onMessageReceived(message)
        val wasFromAsapp = ASAPP.instance.onFirebaseMessageReceived(message)
        // ...
    }
}
```

For a good user experience, ASAPP recommends providing UI feedback to indicate there are new messages instead of opening chat right away. For example, update the unread message counter for your app's chat badge. You can retrieve that information from: `ASAPP.instance.conversationStatusHandler`.

## Persistent Notifications

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-e28f9066-d931-3745-9a1b-d2f2ff3703a6.png" />
</Frame>

The ASAPP Android SDK will automatically surface a persistent notification when a user joins a queue or is connected to a live agent (starting on v8.4.0). Tapping the notification triggers an intent that takes the user directly into ASAPP Chat. Once the live chat ends or the user leaves the queue, the notification is dismissed.

Persistent notifications are:

* ongoing, not dismissible [notifications](https://developer.android.com/reference/android/app/Notification).
* low priority and do not vibrate or make sounds.
* managed directly by the SDK and do not require integration changes.

ASAPP enables this feature by default. To disable it, please reach out to your ASAPP Implementation Manager.

<Note>
  Persistent notifications are not push notifications, which are created and handled by your application.
</Note>

### Customize Persistent Notifications

#### Notification Title and Icon

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-4796925b-926a-e198-230a-a7aa157a3e21.png" />
</Frame>

To customize the title of persistent notifications, override the following string resource:

```json
<string name="asapp_persistent_notification_title">Chat for Customer Support</string>
```

And to customize the icon, create a new drawable resource with the following identifier (file name):

```json
drawable/asapp_ic_contact_support.xml
```

ASAPP recommends that you do not change the body of persistent notifications.

#### Notification Channel

By default, ASAPP sets the notification to [Notification Channel](https://developer.android.com/reference/android/app/NotificationChannel) `asapp_chat`, but it is possible to customize the channel being used.

To customize the channel used by persistent notifications, override the following string resources:

```json
<string name="asapp_persistent_notification_channel_id">asapp_chat</string>
<string name="asapp_persistent_notification_channel_name">Chat for Customer Support</string>
```


# User Authentication
Source: https://docs.asapp.com/messaging-platform/integrations/android-sdk/user-authentication



As in the Quick Start section, you can connect to chat as an anonymous user by not setting a user, or initializing an `ASAPPUser` with a null customer identifier. However, many chat use cases might require ASAPP to know the identity of the user.

To connect as an identified user, please specify a customer identifier string and a request context provider function. This provider will be called from a background thread, when the SDK makes requests that require customer authentication with your company's servers. The request context provider is a function that returns a map with keys and values agreed upon with ASAPP. Please ask your Implementation Manager if you have questions.

## Example:

```kotlin
val requestContextProvider = object : ASAPPRequestContextProvider {
    override fun getASAPPRequestContext(user: ASAPPUser,
                                        refreshContext:Boolean): Map<String, Any>? {
        return mapOf(
            "Auth" to mapOf(
                "Token" to "example-token"
            )
        )
    }
}
ASAPP.instance.user = ASAPPUser("testuser@example.com", requestContextProvider)
```

## Handle Login Buttons

If you connect to chat anonymously, you may be asked to log in when necessary by being shown a message button:

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-bbfa4b7a-ca23-7407-c592-a8d5df402b5c.png" />
</Frame>

If you then tap the **Sign In** button, the SDK will use the `ASAPPUserLoginHandler` to call to the application. Due to the asynchronous nature of this flow, your application should use the activity lifecycle to provide a result to the SDK.

How to Implement the Sign In Flow

1. Implement the `ASAPPUserLoginHandler` and start your application's `LoginActivity`, including the given request code.
   ```kotlin
   ASAPP.instance.userLoginHandler = object: ASAPPUserLoginHandler {
       override fun loginASAPPUser(requestCode: Int, activity: Activity) {
           val loginIntent = new Intent(activity, LoginActivity::class.java)
           activity.startActivityForResult(loginIntent, requestCode)
       }
   }
   ```
2. If a user successfully signs into your application, update the user instance and then finish your `LoginActivity` with `Activity.RESULT_OK`.
   ```kotlin
   ASAPP.instance.user = ASAPPUser(userIdentifier, contextProvider) 
   setResult(Activity.RESULT_OK)
   finish()
   ```
3. In case a user cancels the operation, finish your `LoginActivity` with `Activity.RESULT_CANCELED`.
   ```kotlin
   setResult(Activity.RESULT_CANCELED)
   finish()
   ```

After your `LoginActivity` finishes, the SDK will capture the result and resume the chat conversation.

## Token Expiration and Refreshing the Context

If the provided token has expired, the SDK will call the [ASAPPRequestContextProvider](https://docs-sdk.asapp.com/api/chatsdk/android/latest/chatsdk/com.asapp.chatsdk/-a-s-a-p-p-request-context-provider) with an `refreshContext` parameter set to `true` indicating that the context must be refreshed. In that case, please make sure to return a map with fresh credentials that can be used to authenticate the user. In case an API call is required to refresh the credentials, make sure to block the calling thread until the updated context can be returned.


# Apple Messages for Business
Source: https://docs.asapp.com/messaging-platform/integrations/apple-messages-for-business



Apple Messages for Business is a service that enables your organization to communicate directly with your customers through your Customer Service Platform (CSP), which in this case will be ASAPP, using the Apple Messages for Business app.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-a8feefc5-c783-d2ae-5698-5d3058141af9.png" />
</Frame>

<Note>
  All third party specifications are subject to change by Apple. As such, this section may become out-of-date. ASAPP will always attempt to use the most up-to-date third-party documentation. If you come across any errors or out-of-date content, please contact your ASAPP representative.
</Note>

## Quick Start Guide

1. Register for an Apple Messages for Business account
2. Specify Entry Points
3. Complete User Experience Review
4. Determine Launch & Throttling Strategy

### Register for an Apple Messages for Business Account

Before integrating with ASAPP's Apple Messages for Business adapter, you must register an account with Apple. See [Apple Messages for Business Getting Started](https://register.apple.com/resources/messages/messaging-documentation/register-your-acct#getting-started) documentation for more details.

### Specify Entry Points

Entry points are where your customers start conversations with your business. You can select from Apple and ASAPP entry points.

#### Apple Entry Points

Apple supports multiple entry points for customers to engage using the Messages app. See [Apple Messages for Business Entry Points](https://register.apple.com/resources/messages/messaging-documentation/customer-journey#entry-points) documentation for more information.

#### ASAPP Entry Point

ASAPP supports the Chat Instead entry point. See the [Chat Instead](/messaging-platform/integrations/chat-instead "Chat Instead") documentation for more information.

### Complete User Experience Review

Apple requires a Brand Experience QA review before the channel can be launched. Please work with your Engagement Manager to prepare and schedule for the QA review. See the [Apple User Experience Review](https://register.apple.com/resources/messages/messaging-documentation/pass-apple-qa) documentation for more information.

### Determine Launch & Throttling Strategy

Depending on the entry points configured, your Engagement Manager will share launch best practices and throttling strategies.

## Customer Authentication

Apple Messages for Business supports Customer Authentication, which allows for a better and personalized customer experience. You can implement Authentication using OAuth.

### OAuth

* Requires OAuth 2.0 implemented by customer
* No support for biometric (fingerprint/Face Id) authentication on device
* Does not require native iOS app

User Authentication in Apple Messages for Business can utilize a standards-based approach using an OAuth 2.0 flow with additional key validation and OAuth token encryption steps.

This approach requires customers to implement and host a login page that Apple Messages for Business will invoke to authenticate the user. Users will have to sign-in with their credentials every time their OAuth token expires.

<Note>
  Additional steps are required to support authorization for users with devices running versions older than iOS 15. Consult your ASAPP account team for more information.
</Note>

#### Latest Authentication Flow

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-4981a05a-081b-9180-1ac9-12f640edffd0.png" />
</Frame>

#### Old Authentication Flow

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-b9a1eb95-8d3b-f80b-e3bb-7c6cd50a8654.jpeg" />
</Frame>

ASAPP requires the following customer functionalities to support the older authentication flow:

* An OAuth 2.0 login flow, including a login page that supports form autofill. This page must be Apple-compliant. See the [Authentication Message](https://register.apple.com/resources/messages/msp-rest-api/type-interactive#authentication-message) documentation for more details.
* Provide an API endpoint for ASAPP to obtain an external user identifier. This should be the same identifier that is supplied via the ASAPP web and mobile SDKs as the CustomerId.
* Provide an endpoint through which to obtain an access token by supplying an authcode. This endpoint must support URL encoded parameters.
* Provide an endpoint that can accepted POST requests in the following format:

  ```json
       Content-Type: application/x-www-form-urlencoded
       grant_type=authorization_code&code=xxxx
       &client_id=yyyy&client_secret=zzzz
  where:
  xxxx=authorization_code value
  yyyy=client_id value
  zzzz=client_secret value
  ```

<Note>
  The authorization request from the device to the customer's login page will always contain response\_type, client\_id, redirect\_uri, scope and state and will be application/x-www-form-urlencoded

  Also note that the older authentication flow is backwards-compatible for iOS versions 16+.
</Note>


# Chat Instead Overview
Source: https://docs.asapp.com/messaging-platform/integrations/chat-instead



Chat Instead is a feature that allows you to prompt customers to chat instead of calling. When customer volume shifts from calls to chat, this reduces costs and improves the customer experience.

You can use any ASAPP SDK to display a menu when a customer taps on a phone number to give them the option to Chat Instead or to call.

To enable this feature:

1. Identify Call buttons or phone numbers on your website that you want to convert into entry points for Chat Instead.
2. Use the Chat Instead API, which is part of the ASAPP SDK.
3. Contact your Implementation Manager to configure Chat Instead.

See the following sections for more information:

* [Android](/messaging-platform/integrations/chat-instead/android "Android")
* [iOS](/messaging-platform/integrations/chat-instead/ios "iOS")
* [Web](/messaging-platform/integrations/chat-instead/web "Web")


# Android
Source: https://docs.asapp.com/messaging-platform/integrations/chat-instead/android



<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-6b0545f1-bbc3-d676-aebd-2e478cc8406f.png" />
</Frame>

## Requirements

Chat Instead requires ASAPP Android Chat SDK 8.0.0 or later, and a valid phone number. Before you proceed, make sure you configure it [correctly](/messaging-platform/integrations/android-sdk).

## Phone Formats

Chat Instead accepts a wide variety of formats. See [tools.ietf.org/html/rfc3966](https://tools.ietf.org/html/rfc3966) for the precise definition. For example, it will accept: "+1 (555) 555-5555" and "555-555-5555".

## Getting Started

There are two ways to add Chat Instead. The easiest way is to add the `ASAPPChatInsteadButton` to the layout and call the `ASAPPChatInsteadButton.init`. Alternatively, you can manage the lifecycle yourself.

### 1. Add an ASAPPChatInsteadButton

You can add this button to any layout, like any other [AppCompatButton](https://developer.android.com/reference/androidx/appcompat/widget/AppCompatButton).

```json
<com.asapp.chatsdk.views.ASAPPChatInsteadButton
    android:id="@+id/button"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="@string/button_chat_instead"
    />
```

After that, be sure to call the `ASAPPChatInsteadButton.init` method. Only the phone number is mandatory. Optionally, you can overwrite the `ASAPPChatInsteadButton.onChannel` and the `ASAPPChatInsteadButton.onError` properties of the button.

### 2. Manual Setup of ASAPPChatInstead

1. Initialize Chat Instead
   Somewhere after the `ASAPP.init` call:
   ```json
   val chatInstead = ASAPPChatInstead.init(phoneNumber)
   ```
   to initialize Chat Instead. Depending on cache, this will trigger a network call so channels are "immediately" available to the user once the fragment is displayed.
   Along with an optional header and a chat icon, you can pass callbacks to be notified when a channel is tapped or an error on a channel happens.
   ASAPP makes both callbacks after Chat Instead has tried to act on the tap.
2. Display Channels
   With the instance returned by `ASAPPChatInstead.init`, call `ASAPPChatInstead.show` whenever you want to display the [BottomSheetDialogFragment](https://developer.android.com/reference/com/google/android/material/bottomsheet/BottomSheetDialogFragment?hl=en). Depending on cache, this might show a loading state.
3. Clear Chat Instead (optional)
   You can interrupt the Chat Instead initial network call, if you call `ASAPPChatInstead.clear`. ASAPP advises you to add the call `onDestroy` for Activities and `onDetachedFromWindow` for Fragments.
   If you call `ASAPPChatInstead.clear` after you create the [BottomSheetDialogFragment](https://developer.android.com/reference/com/google/android/material/bottomsheet/BottomSheetDialogFragment?hl=en) view, it will have no effect.

## Error Handling and Debugging

In the case of problems, look for logs with the "ASAPPChatInstead" tag. Be sure to call `ASAPP.setDebugLoggingEnabled(true)` to enable the logs.
Alternatively, you can set callbacks with `ASAPPChatInstead.init`.

### Troubleshoot Chat Instead Errors

#### Crash Caused by UnsupportedOperationException when Displaying the Fragment

This occurs whenever `asapp_primary` is not defined in the style used by the calling Activity. Please refer to **Customization > Colors**.

#### "Unknown Channel" in the Log or the onError Callback

Talk to your Implementation Manager at ASAPP. ASAPP's Backend sent a channel we don't know how to handle. You might need to upgrade the Android SDK version.

#### "Unknown Error" in the Log

Talk to your Implementation Manager at ASAPP. This might be a bug. Please attach logs and reproduction steps.

#### "Activity Context Not Found" in the Log

It means you are not sending the right context at `ASAPPChatInstead.show`.

## Tablet and Landscape Support

Chat Instead supports these configurations seamlessly.

## Customization

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-7c077e80-61e2-93a7-1d0f-240e32c91769.png" />
</Frame>

### Header

By default it will use the text in `R.string.asapp_chat_instead_default_header`. You can send a different string when initializing Chat Instead, but it's important to know the ASAPP Backend will overwrite it if the call is successful.

### Chat Icon

You can customize the SDK Chat channel icon. By default it will be tinted with `asapp_primary` and `asapp_on_primary`.

<Note>
  If you customize the icon, make sure to test how it looks in Night Mode (a.k.a. Dark Mode).
</Note>

### Colors

Chat Instead uses the ASAPP text styles and colors. For more information on how to customize, go to [Customization](../android-sdk/customization "Customization").

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-961a0a3b-ce7b-5e66-626b-9d8c94629478.png" />
</Frame>

## Remote settings

Chat Instead receives configuration information from ASAPP's Backend (BE), in addition to the channels to display. The configuration enables/disables the feature and selects the device type (mobile, tablet, none). Contact your Implementation Manager at ASAPP if you have any questions.

<Note>
  It's important to know how the BE affects customization. If you provide a header, the BE will overwrite it. On the other hand, the BE cannot overwrite the phone number.
</Note>

## Cache

Chat Instead will temporarily cache the displayed channels to provide a better user experience. The cache is warmed at instantiation. The information will persist through phone restarts. As usual, it won't survive an uninstall or a "clear cache" in App info.


# iOS
Source: https://docs.asapp.com/messaging-platform/integrations/chat-instead/ios



## Pre-requisites

* ASAPP iOS SDK 9.4.0 or later, correctly configured and initialized [see more here](/messaging-platform/integrations/ios-sdk/ios-quick-start).

## Getting Started

Once you've successfully configured and initialized the ASAPP SDK, you can start using Chat Instead for iOS.

1. Create a New Instance.

   ```json
   let chatInsteadViewController =  ASAPPChatInsteadViewController(phoneNumber: phoneNumber, delegate: delegate, title: title, chatIcon: image)
   ```

   |                        |                                                                                                                                                                                                                                                                            |
   | :--------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
   | phoneNumber (required) | The phone number to call when the phone channel is selected. Must be a valid phone number. For more information, see Apple's documentation on [phone links](https://developer.apple.com/library/archive/featuredarticles/iPhoneURLScheme_Reference/PhoneLinks/PhoneLinks). |
   | delegate (required)    | An object that implements `ASAPPChannelDelegate`.                                                                                                                                                                                                                          |
   | title (optional)       | A title (also called the "Chat Instead header title") which is displayed at the top of the Chat Instead UI. (See [Customization](#customization "Customization"))                                                                                                          |
   | image (optional)       | A UI Image that will override the default image for the chat channel. (See [Customization](#customization "Customization"))                                                                                                                                                |

2. Implement two functions that the `ASAPPChannelDelegate` requires:

   ```json
   func channel(_ channel: ASAPPChannel, didFailToOpenWithErrorDescription errorDescription: String?)
   ```

   This is called if there's an error while trying to open a channel.

   ```json
   func didSelectASAPPChatChannel()
   ```

   This opens the ASAPP chat.

   You should use one of these methods:

   ```json
   ASAPP.createChatViewControllerForPresentingFromChatInstead()
   ```

   or

   ```json
   ASAPP.createChatViewControllerForPushingFromChatInstead()
   ```

   to present or push the view controller instance that was returned.

   This means that you must present/push the ASAPP chat view controller inside `didSelectASAPPChatChannel()`.

<Note>
  ASAPP highly recommends initializing `ASAPPChatInsteadViewController` as early as possible for the best user experience.
</Note>

Whenever a channel is selected, ASAPP handles everything by default (except for the chat channel), but you can also handle a channel by yourself by implementing `func shouldOpenChannel(_ channel: ASAPPChannel) -> Bool` and returning false.

3. Show the `chatInsteadViewController` instance by using:

   ```json
   present(chatInsteadViewController, animated: true)
   ```

<Note>
  Only presentation is supported. Pushing the `chatInsteadViewController` instance is not supported and will result in unexpected behavior.
</Note>

## Support for iPad

For the best user experience, you should configure popover mode, which is used on iPad.

Use the `.popover` presentation style and set both the [sourceView](https://developer.apple.com/documentation/uikit/uipopoverpresentationcontroller/1622313-sourceview) and [sourceRect](https://developer.apple.com/documentation/uikit/uipopoverpresentationcontroller/1622324-sourcerect) properties following Apple's conventions:

```json
chatInsteadViewController.modalPresentationStyle = .popover
chatInsteadViewController.popoverPresentationController?.sourceView = aView
chatInsteadViewController.popoverPresentationController?.sourceRect = aRect
```

This will only have an effect when your app is run on iPad.

<Note>
  If you set `modalPresentationStyle` to `.popover` and forget to set `sourceView` and `sourceRect`, the application will crash in runtime. So please be sure to set both if you're using the popover mode.
</Note>

## Customization

You can customize the Chat Instead header title and the chat icon when creating the `ASAPPChatInsteadViewController` instance. (ee [Getting Started](#getting-started "iOS").

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-fe1fe0e0-a7e7-d065-110c-b3b24627847b.png" />
</Frame>

`ASAPPChatInsteadViewController` uses [ASAPPColors](https://docs-sdk.asapp.com/api/chatsdk/ios/latest/Classes/ASAPPColors.html) for styling, so it will automatically use the colors set there (e.g. `primary`, `background`, `onBackground`, etc.), which are the same colors used for customizing the ASAPP chat interface. There is no way to independently change the styling of the Chat Instead UI.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-59879767-4622-5d70-522e-12ca0b7a8f8f.png" />
</Frame>

ASAPP supports [Dark Mode](../ios-sdk/customization#dark-mode-15935 "Dark Mode") by default as long as you enable it.

## Remote settings

When you create an instance of `ASAPPChatInsteadViewController`, it will automatically fetch remote settings to indicate which channels to display. You can configure these settings.

<Note>
  These remote settings will override local ones (i.e. the ones you pass in when creating the `ASAPPChatInsteadViewController` instance).
</Note>

If there's an error while fetching the settings and no local values were set, the defaults will be used.

## Cache

When fetching succeeds, the SDK will cache the remote settings for a short period of time. This cache will be referenced in lieu of repeated fetches. The cache will be valid across multiple app sessions.


# Web
Source: https://docs.asapp.com/messaging-platform/integrations/chat-instead/web



A feature that prompts customers to use Chat instead of calling. When customers shift volume from phone to chat, this reduces costs and improves the customer experience.
When customers tap a phone number, phone button, or any other entry point that the customer company chooses, ASAPP triggers an intercept that gives the customer the option to chat or to call.
In order to enable this feature, please:

1. Identify Entry Points.
   Contact your Implementation Manager to determine the best entry point to Chat Instead on your website. On Mobile, the best entry point is a "Call" button or a clickable phone number. On Desktop, the best entry point is a "Call" button.

<Note>
  ASAPP recommends that you modify your website to display a "Call Us" button (or other similar language) rather than displaying the phone number, and the "Call Us" button should invoke Chat Instead.
</Note>

<Note>
  ASAPP recommends that you also make all entry points telephone links (href="tel" number).
</Note>

<Note>
  The customer company must specify the formatting to display for the phone number that they pass to the [showChatInstead](../web-sdk/web-javascript-api#-showchatinstead- "'showChatInstead'") API: (800) 123-4567
</Note>

**Example Use Case:**

```json
<a href="tel:8001234567" onclick="ASAPP('showChatInstead', {'phoneNumber': '(800) 123-4567'})">(800) 123-4567</a>
```

2. Integrate with the [showChatInstead](../web-sdk/web-javascript-api#-showchatinstead- "'showChatInstead'") API.
3. Chat Instead receives configuration information from ASAPP's Backend (BE), in addition to the channels to display and the order to display them in. Contact your Implementation Manager to turn on Chat Instead and configure these options. If you would like to use Apple Business Chat or other messaging application as an option within Chat Instead, please inform your Implementation Manager.
   This feature is currently available in the mobile Web SDK and desktop Web SDK.

|                                                                                                                                    |                                                                                                                                    |
| :--------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------- |
| <Frame><img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-68cd68ad-607a-e34a-15c6-56dc5abd69a5.png" /></Frame> | <Frame><img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-95f1cc49-fcfd-4273-c20f-c8c13c54bc6d.png" /></Frame> |


# Customer Authentication
Source: https://docs.asapp.com/messaging-platform/integrations/customer-authentication



Customer Authentication enables consistent and personalized conversations across channels and over time. The authentication requirements consist of two main elements:

1. A customer identifier
2. An access token

The source, format, and use of these items depends on the customer's infrastructure and services.  However, where applicable and feasible, ASAPP instills a few direct requirements for integration of these components.

This section outlines the requirements and considerations in the sections below.

Integrations leveraging customer authentication enable two main features of ASAPP:

1. Combination of the conversation history of a customer into a single view to enable the true asynchronous behavior of ASAPP.  This allows a customer to come back over time as well as change communication channels but maintain a consistent state and experience.
2. Validation of a customer and make API calls for a customer's data to display to a representative or directly to the customer.  

The following sequence diagram depicts an example of a customer authentication integration utilizing OAuth customer credentials and a JSON Web Token (JWT) for API calls.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-b551c5ab-cc5f-53ef-eb15-3073377c72a6.png" />
</Frame>

## Identification

### What is a Customer Identifier?

A customer identifier is the first and most important piece of the Customer Authentication strategy. The identifier is the key element to determine:

* when to transition from unauthenticated to authenticated
* when to show previous conversation history within chat

When a customer returns with the same identifier, the customer sees all previous history within web and mobile chat. These identifiers are typically string values of hashed or encrypted account numbers or other internal values. However, it is important to not send identifiable or reusable information as the customer identifier, such as their actual unprotected account numbers or PII.

### Customer Identifier Format

The customer may determine the format of the customer identifier. The ASAPP requirements for the customer identifier are:

* Consistent - the same customer must authenticate using the same customer identifier every time.
* Unique - the customer identifier must represent a unique customer; No two customers can have the same identifier.
* Opaque - ASAPP does not store PII data. The customer must obfuscate the customer identifier so it does not contain PII or any other sensitive data. An example of obfuscation strategy is to generate a hash or an encrypted value of a unique user identifier (e.g. user ID, account number, or email address).
* Traceable - customer-traceable but not ASAPP-traceable.
  * The customer must be able to trace the customer identifier back to a user. However, it cannot be used by ASAPP, or any other party, to trace back to a specific user.
  * The reporting data generated by ASAPP includes the customer identifier. This reporting data is typically used to generate further analytics by the customer. You can use the customer identifier to relate ASAPP's reporting data back to the actual user identifier and record on the customer side.

### Passing the Customer Identifier to ASAPP

Once a customer authenticates a user on their website or app, the customer must retrieve and pass the customer identifier to ASAPP ( typically via the SDK parameters) as part of the conversation authentication flow.

You can find more details for your specific integration in the following sections:

* [Web SDK - Web Authentication](/messaging-platform/integrations/web-sdk/web-authentication "Web Authentication")
* [Android SDK - Chat User Authentication in the Android Integration Walkthrough](/messaging-platform/integrations/android-sdk/user-authentication)
* [iOS SDK - Basic Usage in the iOS SDK Quick Start](/messaging-platform/integrations/ios-sdk/ios-quick-start)iOS SDK

## Tokens

While they are not a hard requirement for Customer Authentication, tokens play an important part in the overall Customer Authentication strategy. Tokens provide a way of securely wrapping all communication between Customers, Customer Companies and ASAPP. You can achieve this when you ensure that every request to a server is accompanied by a signed token, which ASAPP can verify for authenticity.

Some of the benefits of using tokens over other methods, such as cookies, is that tokens are completely stateless and are typically short-lived. The following sections outline some examples of token input, as well as requirements for their use and validation.

### Identity Tokens

Identity tokens are self contained, signed, short-lived tokens containing User Attributes like Name, User Identifiers, Contact Information, Claims, and Roles. The simplest and most common example of such a token is a JSON Web Token, JWT. JWTs contain a Header, Payload and Signature. The Header contains metadata about the token, the Payload contains the user info and claims, and the Signature is the algorithmically signed portion of the token based on the payload. You can find more information about JWTs at [https://jwt.io/](https://jwt.io/).

**Example JWT:**

```json
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
```

### Bearer Tokens

A Bearer Token is a lightweight security token which provides the bearer, or user, access to protected resources. When a user authenticates, a Bearer Token type is issued that contains an access token and a refresh token, along with expiration details. Bearer tokens are short-lived, dynamic access tokens that can be updated throughout a session using a refresh token.

**Example Bearer Token:**

```json
{
  "token_type":"Bearer",
  "access_token":"eyJhbGci....",
  "expires_in":3600,
  "expires_on":1479937454,
  "refresh_token":"0/LTo...."
}
```

### Token Duration

Since every token has an expiration time, you need a way for ASAPP to know when a token is valid and when it expires. A customer can do this by:

* allowing decoding of signed tokens.
* providing an API to validate the token.

#### Token Refresh

You need to refresh expired tokens on either the client side, via the ASAPP SDK, or through an API call. 

You can find SDK token refresh implementation examples at:

* [Web SDK - Web Context Provider](/messaging-platform/integrations/web-sdk/web-contextprovider#authentication "Web ContextProvider")
* [Web SDK - Set Customer](/messaging-platform/integrations/web-sdk/web-javascript-api#setcustomer "'setCustomer'")
* [Android SDK - Context Provider](/messaging-platform/integrations/android-sdk/user-authentication)
* [iOS SDK - Type Aliases](https://docs-sdk.asapp.com/api/chatsdk/ios/latest/Typealiases.html)

#### Token Validation

You need to validate tokens before you can rely on them for API access or user information. Two examples of token validation are:

* **Compare multiple pieces of information** - ASAPP compares a JWT payload against the SDK input of the same attributes, or against response data from a UserProfile API call.
* **Signature Validation** - ASAPP can also validate signatures and decode data if needed. This would require sharing of a trusted public certificate with ASAPP.

## Omni-Channel Strategy

One of the key capabilities of the ASAPP backend is that it supports customer interaction via multiple channels - such as chat on web portals or within mobile apps. This enables a customer to migrate from one channel to another, if they choose, within the same support dialog. In order for this to function, it is important that the process of Customer Authentication be common to all channels. The ASAPP backend should obtain the same access token to access the Customer's API endpoints regardless of the channel that the customer selects. If a customer switches from one channel to another, the access token should remain the same.

## Testing

You need a comprehensive testing strategy to ensure success. This includes the ability to exercise edge cases with various permutations of test account data, as well as utilize the customer login with direct test account credentials.  Operationally, the customer handles customer login credentialing; however, ASAPP requires the ability to simulate the login process in order to execute end to end tests.  This process is crucial in performing test scenarios that require customer authentication. Corollary, it is equally important to ensure complete test scenario coverage with different types of test-based customer accounts.


# iOS SDK Overview
Source: https://docs.asapp.com/messaging-platform/integrations/ios-sdk



Welcome to the ASAPP iOS SDK Overview! This document guides you through the process of integrating ASAPP functionality into your iOS application. It includes the following sections:

* [Quick Start](/messaging-platform/integrations/ios-sdk/ios-quick-start "iOS Quick Start")
* [Customization](/messaging-platform/integrations/ios-sdk/customization "Customization")
* [User Authentication](/messaging-platform/integrations/ios-sdk/user-authentication "User Authentication")
* [Miscellaneous APIs](/messaging-platform/integrations/ios-sdk/miscellaneous-apis "Miscellaneous APIs")
* [Deep Links and Web Links](/messaging-platform/integrations/ios-sdk/deep-links-and-web-links "Deep Links and Web Links")
* [Push Notifications](/messaging-platform/integrations/ios-sdk/push-notifications "Push Notifications")

In addition, you can view the following documentation:

* [iOS SDK Release Notes](/messaging-platform/integrations/ios-sdk/ios-sdk-release-notes "iOS SDK Release Notes")

## Requirements

ASAPP supports iOS 12.0 and up. As a rule, ASAPP supports two major versions behind the latest. Once iOS 15 is released, ASAPP will drop support for iOS 12 and only support iOS 13.0 and up.

The SDK is written in Swift 5 and compiled with support for binary stability, meaning it is compatible with any Swift compiler version greater than or equal to 5.


# Customization
Source: https://docs.asapp.com/messaging-platform/integrations/ios-sdk/customization



## Styling

### Themes

There is one main color that you can set to ensure the ASAPP chat view controller fits with your app's theme: `ASAPP.styles.colors.primary`.

ASAPP recommends starting out only setting `.primary` to be your brand's primary color, and adjusting other colors when necessary for accessibility.

`.primary` is used as the message bubble background and in most buttons and other controls.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-9d0baf87-860b-2383-b391-bdf5bac8d426.png" />
</Frame>

There are two other colors you may consider customizing for accessibility or to achieve an exact match with your app's theme: `ASAPP.styles.colors.onBackground` and `.onPrimary`. `.onBackground` is used for most other elements that might appear in front of the background. `.onPrimary` is used for text and other elements that appear in front of the primary color.

### Fonts

The ASAPP SDK uses the iOS system font family, SF Pro, by default. To use another font family, pass an `ASAPPFontFamily` to `ASAPP.styles.textStyles.updateStyles(for:)`. There are two `ASAPPFontFamily` initializers: one that takes font file names and another that takes `UIFont` references.

```json
let avenirNext = ASAPPFontFamily(
    lightFontName: “AvenirNext-Regular”,
    regularFontName: “AvenirNext-Medium”,
    mediumFontName: “AvenirNext-DemiBold”,
    boldFontName: “AvenirNext-Bold”)!
ASAPP.styles.textStyles.updateStyles(for: avenirNext)
```

## Overrides

The ASAPP SDK API allows you to override many aspects of the design of the chat interface, including [colors](#colors "Colors"), [button styles](#buttons "Buttons"), [navigation bar styles](#navigation-bar-styles "Navigation Bar Styles"), and various [text styles](#text-styles "Text Styles").

### Colors

Besides the colors used for themes, you can override specific colors in a number of categories:

* Navigation bar
* General chat content
* Buttons
* Messages
* Quick replies
* Input field.

All property names mentioned below are under `ASAPP.styles.colors`.

Navigation bar colors are .`navBarBackground`, `.navBarTitle`, `.navBarButton`, and `.navBarButtonActive`.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-639758e9-7260-7b8b-e6e9-9cd67b1c4da7.png" />
</Frame>

General chat content colors are `.background`, `.separatorPrimary`, `.separatorSecondary`, `.controlTint`, `.controlSecondary`, `.controlBackground`, `.success`, `.warning`, and `.failure`.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-78754833-105d-5aad-0c69-ca3fa2bb6043.png" />
</Frame>

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-a57aa919-bbe4-4282-e384-a044374ce33d.png" />
</Frame>

Buttons use sets of colors defined with an `ASAPPButtonColors` initializer. You can override `.textButtonPrimary`, `.buttonPrimary`, and `.buttonSecondary`.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-93c9f7d7-4d6c-e37c-1816-883e33edce1f.png" />
</Frame>

Message colors are `.messagesListBackground`, `.messageText`, `.messageBackground`, `.messageBorder`, `.replyMessageText`, `.replyMessageBackground`, and `.replyMessageBorder`.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-3ba6e44f-0d6a-4e78-df3f-9bf866f4c692.png" />
</Frame>

Quick replies and action buttons also use `ASAPPButtonColors`. You can override `.quickReplyButton` and `.actionButton`.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-b2a23eeb-86b6-0032-f726-a9220f8b0291.png" />
</Frame>

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-6b969a64-d5bc-0067-4f7f-2b160a493f68.png" />
</Frame>

The chat input field uses `ASAPPInputColors`. You can override `.chatInput`.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-bf5cc2e4-5f01-607e-a718-9b640bb8d519.png" />
</Frame>

### Text Styles

ASAPP strongly recommends that you use one font family as described in the [Fonts](#fonts) section. However, if you need to, you may override: `ASAPP.styles.textStyles.navButton`, `.button`, `.actionButton`, `.link`, `.header1`, `.header2`, `.header3`, `.subheader`, `.body`, `.bodyBold`, `.body2`, `.bodyBold2`, `.detail1`, `.detail2`, and `.error`. To update all but the first four with a color, call `ASAPP.styles.textStyles.updateColors(with:)`.

### Navigation Bar Styles

You can override the default `ASAPP.styles.navBarStyles.titlePadding` using `UIEdgeInsets`.

### Buttons

The shape of primary buttons in message attachments, forms, and other dynamic layouts is determined by the value of `ASAPP.styles.primaryButtonRoundingStyle`. The default value is `.radius(0)`. You can set it to a custom radius with `.radius(_:)` or fully rounded with `.pill`.

## Images

### Navigation Bar

There are three images used in the chat view controller's navigation bar that are overridable: the icons for the **close ✕**, **back ⟨**, and **more ⋮** buttons. Each is tinted appropriately, so the image need only be a template in black with an alpha channel. ASAPP displays only one of the **close** and **back** buttons at a time; the former is used when the chat view controller is presented modally, and the latter when pushed onto a navigation stack.

```json
ASAPP.styles.navBarStyles.buttonImages.close
ASAPP.styles.navBarStyles.buttonImages.back
ASAPP.styles.navBarStyles.buttonImages.more
```

Use the `ASAPPCustomImage(image:size:insets:)` initializer to override each:

```json
ASAPP.styles.navBarStyles.buttonImages.more = ASAPPCustomImage(
    image: UIImage(named: “Your More Icon Name”)!,
     size: CGSize(width: 20, height: 20),
     insets: UIEdgeInsets(top: 14, left: 0, bottom: 14, right: 0))
```

### Title View

To use a custom title view, assign `ASAPP.views.chatTitle`. If you set a custom title view, it will override any string you set as `ASAPP.strings.chatTitle`. The title view will be rendered in the center of the navigation bar.

## Dark Mode

Apple introduced Dark Mode in iOS 13. Please see Apple's [Supporting Dark Mode in Your Interface](https://developer.apple.com/documentation/xcode/supporting_dark_mode_in_your_interface) documentation for an overview.

The ASAPP SDK does not automatically convert any colors for use in Dark Mode; you must define dark variants for each custom color at the app level, which the SDK will use automatically when the interface style changes.

ASAPP recommends that you add a Dark Appearance to colors you define in color sets in an asset catalog. Please see [Apple's documentation](https://developer.apple.com/documentation/xcode/supporting_dark_mode_in_your_interface#2993897) for more details. Once you have defined a color set, you can refer to it by name with the `UIColor(named:)` initializer, which was introduced in iOS 11. After you have defined a dark variant for at least the primary color, be sure to set it and flip the Dark Mode flag:

```json
ASAPP.styles.colors.primary = UIColor(named: "Your Primary Color Name")!
ASAPP.styles.isDarkModeAllowed = true
```

<Note>
  ASAPP highly recommends adding a Dark Appearance for any color you set. Please don't forget to define a Dark Appearance for your custom logo if you have set `ASAPP.views.chatTitle`.
</Note>

If your app does not support Dark Mode, ASAPP recommends that you do not change the value of `ASAPP.styles.isDarkModeAllowed` to ensure a consistent user experience.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-60f54608-b0ae-cfae-e5f1-8aeaa67fd66a.png" />
</Frame>

## Orientation

The default value of `ASAPP.styles.allowedOrientations` is `.portraitLocked`, meaning the chat view controller will always render in portrait orientation. To allow landscape orientation on an iPad, set it to `.iPadLandscapeAllowed` instead. There is currently no landscape orientation option for iPhone.

## Strings

Please see the class reference for details on each member of `ASAPPStrings`.


# Deep Links and Web Links
Source: https://docs.asapp.com/messaging-platform/integrations/ios-sdk/deep-links-and-web-links



## Handle Deep Links in Chat

Certain chat flows may present buttons that are deep links to another part of your app. To react to taps on these buttons, implement the `ASAPPDelegate` protocol, including the `chatViewControlledDidTapDeepLink(name:data:)` method. Please ask your Implementation Manager if you have questions regarding deep link names and data.

## Handle Web Links in Chat

Certain chat flows may present buttons that are web links. To react to taps on these buttons, implement the `ASAPPDelegate` protocol, including the `chatViewControllerShouldHandleWebLink(url:)` method. Return true if the ASAPP SDK should open the link in an `SFSafariViewController`; return `false` if you'd like to handle it instead.

## Implement Deep Links into Chat

### Getting Started

Please see Apple's documentation on [Allowing Apps and Websites to Link to Your Content](https://developer.apple.com/documentation/xcode/allowing_apps_and_websites_to_link_to_your_content).

### Connect the Pieces

Once you have set up a custom URL scheme for your app, you can detect links pointing to ASAPP chat within `application(_:open:options:)`. Call one of the four provided methods to create an ASAPP chat view controller:

```json
ASAPP.createChatViewControllerForPushing(fromNotificationWith:)
ASAPP.createChatViewControllerForPresenting(fromNotificationWith:)
ASAPP.createChatViewControllerForPushing(withIntent:)
ASAPP.createChatViewControllerForPresenting(withIntent:)
```


# iOS Quick Start
Source: https://docs.asapp.com/messaging-platform/integrations/ios-sdk/ios-quick-start



If you want to start fast, follow these steps:

1. [Gather Required Information](#1-gather-required-information "1. Gather Required Information")
2. [Download the SDK](#2-download-the-sdk "2. Download the SDK")
3. [Install the SDK](#3-install-the-sdk "3. Install the SDK")
4. [Configure the SDK](#4-configure-the-sdk "4. Configure the SDK")
5. [Open Chat](#5-open-chat "5. Open Chat")

## 1. Gather Required Information

Before downloading and installing the SDK, please make sure you have the following information. Contact your Implementation Manager at ASAPP if you have any questions.

| App ID               | Also known as the "Company Marker", assigned by ASAPP.                                                                                                                                                                                 |
| :------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| API Host Name        | The fully-qualified domain name used by the SDK to communicate with ASAPP's API. Provided by ASAPP and subject to change based on the stage of implementation.                                                                         |
| Region Code          | The ISO 3166-1 alpha-2 code for the region of the implementation, provided by ASAPP.                                                                                                                                                   |
| Supported Languages  | Your app's supported languages, in order of preference, as an array of language tag strings. Strings can be in the format "\{ISO 639-1 Code}-\{ISO 3166-1 Code}" or "\{ISO 639-1 Code}", such as "en-us" or "en". Defaults to \["en"]. |
| Client Secret        | This can be an empty or random string\* until otherwise notified by ASAPP.                                                                                                                                                             |
| User Identifier      | A username or similar value used to identify and authenticate the customer, provided by the Customer Company.                                                                                                                          |
| Authentication Token | A password-equivalent value, which may or may not expire, used to authenticate the customer that is provided by the Customer Company.                                                                                                  |

\* In the future, the ASAPP-provided client secret will be a string that authorizes the integrated SDK to call the ASAPP API in production. ASAPP recommends fetching this string from a server and storing it securely using Secure Storage; however, as it is one of many layers of security, you can hard-code the client secret.

## 2. Download the SDK

Download the iOS SDK from the [ASAPP iOS SDK releases page on GitHub](https://github.com/asappinc/chat-sdk-ios-release/releases).

## 3. Install the SDK

ASAPP provides the SDK as an `.xcframework` with and without bitcode in dynamic and static flavors. If in doubt, ASAPP recommends that you use the dynamic `.xcframework` with bitcode.

Add your chosen flavor of the framework to the "Frameworks, Libraries, and Embedded Content" section of your target's "General" settings.

### Include SDK Resources When Using the Static Framework

Add the provided `ASAPPResources.bundle` to your target's "Frameworks, Libraries, and Embedded Content" and then include it in your target's "Copy Bundle Resources" build phase.

The SDK allows a customer to take and upload photos, [unless these features are disabled through configuration](https://docs-sdk.asapp.com/api/chatsdk/ios/latest/Classes/ASAPP.html#/Permissions). Since iOS 10, Apple requires descriptions for why your app uses the photo library and/or camera, which will be displayed to the customer. If you haven't already, you'll need to add these descriptions to your app's `Info.plist`.

* If you access `Info.plist` via Xcode's plist editor, the description keys are "Privacy - Camera Usage Description" and "Privacy - Photo Library Usage Description".
* If you access `Info.plist` via a text editor, the keys are "NSPhotoLibraryUsageDescription" and "NSCameraUsageDescription".

### Validate iOS SDK Authenticity

ASAPP uses GPG (GNU Privacy Guard) for creating digital signatures. To install on macOS:

1. Using [Homebrew](https://brew.sh), install gpg:
   `brew install gpg`
2. Download the [ASAPP SDK Team public key](https://docs-sdk.asapp.com/api/chatsdk/ios/security/asapp_public.gpg).
3. Add the key to GPG:
   `gpg --import asapp_public.gpg`

Optionally, you can also validate the public key. Please refer to the [GPG documentation](https://www.gnupg.org/documentation/manuals.html) for more information.

Then, you can verify the signature using:

`gpg --verify <-sdk-filename>.sig <sdk-filename>`

ASAPP provides the signature alongside the SDK in each release.

## 4. Configure the SDK

Use the code below to create a config, initialize the SDK with the config, and set an anonymous user. Refer to the aforementioned [Required Information](#1-gather-required-information-15931 "1. Gather Required Information") for more details. ASAPP recommends that you initialize the SDK on launch in `application(_:didFinishLaunchingWithOptions…)`. Please see the [User Authentication](/messaging-platform/integrations/ios-sdk/user-authentication "User Authentication") section for details about how to authenticate an identified user.

```json
import ASAPPSDK
let config = ASAPPConfig(appId: appId,
                         apiHostName: apiHostName,
                         clientSecret: clientSecret,
                         regionCode: regionCode)
ASAPP.initialize(with: config)
ASAPP.user = ASAPPUser(nil, requestContextProvider: { _ in return [:] })
```

## 5. Open Chat

Once the SDK has been initialized with a config and a user has been set, you can create a chat view controller that can then be pushed onto the navigation stack. ASAPP recommends doing so when a navigation bar button is tapped.

```json
let chatViewController =
ASAPP.createChatViewControllerForPushing(fromNotificationWith: nil)!
navigationController?.pushViewController(chatViewController, animated: true)
```

If you prefer to present the chat view controller as a modal, use the `ForPresenting` method instead:

```json
let chatViewController =
ASAPP.createChatViewControllerForPresenting(fromNotificationWith: nil)!
present(chatViewController, animated: true, completion: nil)
```

Once the chat interface is open, you should see an initial state similar to the one below:

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-862d403d-e7b8-5ed0-d8aa-bc4726b65a4b.svg" />
</Frame>


# iOS SDK Release Notes
Source: https://docs.asapp.com/messaging-platform/integrations/ios-sdk/ios-sdk-release-notes



The scrolling window below shows release notes for ASAPP's iOS SDK.
This content may also be viewed as a stand-alone webpage here: [https://docs-sdk.asapp.com/api/chatsdk/ios/releasenotes](https://docs-sdk.asapp.com/api/chatsdk/ios/releasenotes)


# Miscellaneous APIs
Source: https://docs.asapp.com/messaging-platform/integrations/ios-sdk/miscellaneous-apis



## Conversation Status

Call `ASAPP.getChatStatus(success:failure:)` to get the current conversation status. The first parameter of the success handler provides a count of unread messages, while the second indicates whether the chat is live. If `isLive` is true, it means the customer is currently connected to a live customer support agent, even if the user isn't currently on the chat screen or the application is in the background.
**Example:**

```json
ASAPP.getChatStatus(success: { unread, isLive in
    DispatchQueue.main.async { [weak self] in
        self?.updateBadge(count: unread, isLive: isLive)
    }
}, failure: { error in
    print("Could not get chat status: \(error)")
})
```

## Debug Logs

To allow the SDK to print more debugging information to the console, set `ASAPP.debugLogLevel` to.debug. Please see [`ASAPPLogLevel`](https://docs-sdk.asapp.com/api/chatsdk/ios/latest/Enums/ASAPPLogLevel.html) for more options and make sure to set the level to `.errors` or `.none` in release builds.
Example:

```json
#if DEBUG
ASAPP.debugLogLevel = .debug
#else
ASAPP.debugLogLevel = .none
#endif
```

## Clear the Persisted Session

To clear the session persisted on disk, call `ASAPP.clearSavedSession()`. This will also disable push notifications to the customer.

## Set an Intent

To open chat with an initial intent, call one of the two functions below, passing in a dictionary specifying the intent in a format provided by ASAPP. Please ask your Implementation Manager for details.

### Create a Chat View Controller with an Initial Intent

```json
let chat = ASAPP.createChatViewControllerForPushing(withIntent: [“Code”: 
“EXAMPLE_INTENT”])
or
let chat = ASAPP.createChatViewControllerForPresenting(withIntent: 
[“Code”: “EXAMPLE_INTENT”])
```

To set the intent while chat is already open, call `ASAPP.setIntent(_:)`, passing in a dictionary as described above. This should only be called if a chat view controller already exists.

## Handle Chat Events

Certain agreed-upon events may occur during chat. To react to these events, implement the `ASAPPDelegate` protocol, including the `chatViewControllerDidReceiveChatEvent(name:data:)` method. Please ask your Implementation Manager if you have questions regarding chat event names and data.


# Push Notifications
Source: https://docs.asapp.com/messaging-platform/integrations/ios-sdk/push-notifications



## Get Started with Push Notifications

Please see Apple's documentation on the [Apple Push Notification service](https://developer.apple.com/library/archive/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/APNSOverview#//apple_ref/doc/uid/TP40008194-CH8-SW1) and the [User Notifications](https://developer.apple.com/documentation/usernotifications) framework.

## ASAPP Push Notifications

ASAPP's systems may trigger push notifications at certain times, such as when an agent sends a message to a customer who does not currently have the chat interface open. These push notifications are triggered by ASAPP's servers calling your company's API with data that identifies the recipient's device; ASAPP's servers do not communicate with APNs directly. Therefore, we provide methods in the SDK to register and deregister the customer's device for ASAPP push notifications.
For a deeper dive on how push notifications are handled between ASAPP and your company's API, please see our documentation on [Push Notifications and the Mobile SDKs](../push-notifications-and-the-mobile-sdks "Push Notifications and the Mobile SDKs").

### Enable Push Notifications

To enable push notifications for the current user when using the token provided by APNs in `didRegisterForRemoteNotificationsWithDeviceToken(_:)`, call `ASAPP.enablePushNotifications(with deviceToken: Data)`.
To enable push notifications using an arbitrary string that uniquely identifies the device and current user, call `ASAPP.enablePushNotifications(with uuid: String)`.

### Disable Push Notifications

To disable push notifications for the current user on the device, call `ASAPP.disablePushNotifications(failure:)`. The failure handler will be called in the event of an error. Make sure you call this function before you change or clear `ASAPP.user` to prevent the customer receiving push notifications that are not meant for them.

### Handle Push Notifications

Implement `application(_:didReceiveRemoteNotification:[fetchCompletionHandler:])` and pass the `userInfo` dictionary to `ASAPP.canHandleNotification(with:)` to determine if the push notification was triggered by ASAPP. If the function returns `true`, you can then pass `userInfo` to: `ASAPP.createChatViewControllerForPushing(fromNotificationWith:)`.

<Note>
  Your application usually won't receive push notifications from ASAPP if the user is currently connected to chat.
</Note>

### Request Permissions for Push Notifications

When a user joins a queue in the ASAPP mobile app, a prompt screen asks them to enable push notifications and provides some context on the benefits. If the user has already accepted or denied these permissions, they will not receive this prompt.
After enablement, users will receive a push notification every time there is a new message in the app chat. Users only receive push notifications if the app is not active.
You can control this feature remotely. Please contact your Integration Manager for further information. ASAPP highly recommends that you enable this feature.


# User Authentication
Source: https://docs.asapp.com/messaging-platform/integrations/ios-sdk/user-authentication



## Set an ASAPPUser with a Request Context Provider

As in the Quick Start section, you can connect to chat as an anonymous user by specifying a nil user identifier when initializing an `ASAPPUser`. However, many use cases might require ASAPP to know the identity of the customer.
To connect as an identified user, please specify a user identifier string and a request context provider function. This provider will be called from a background thread when the SDK makes requests that require customer authentication with your company's servers. The request context provider is a function that returns a dictionary with keys and values agreed upon with ASAPP. Please ask your Implementation Manager if you have questions.
**Example:**

```json
let requestContextProvider = { needsRefresh in
    return [
        "Auth": [
            "Token": "exampleValue"
        ]
    ]
}
ASAPP.user = ASAPPUser(userIdentifier: "testuser@example.com",
requestContextProvider)
```

## Handle Login Buttons

If a customer connects to chat anonymously, they may be asked to log in when necessary by being shown a message button:

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-38220938-03e4-8029-538b-b2a4e5c694ac.png" />
</Frame>

If the customer then taps on the **Sign In** button, the SDK will call a delegate method: `chatViewControllerDidTapUserLoginButton()`. Please implement this method and set `ASAPP.user` once the customer has logged in. The SDK will detect the change and then authenticate the user. You may set `ASAPP.user` in any thread. Make sure to set the delegate as well: for example, `ASAPP.delegate = self`. See `ASAPPDelegate` for more details.

## Token Expiration and Refresh the Context

In the event that the provided token has expired, the SDK will call the request context provider with an argument that is true, indicating that you must refresh the context. In that case, please make sure to return a dictionary with fresh credentials that the SDK can use to authenticate the user. If the SDK requires an API call to refresh the credentials, please make sure to block the calling thread until you can return the updated context.


# Push Notifications and the Mobile SDKs
Source: https://docs.asapp.com/messaging-platform/integrations/push-notifications-and-the-mobile-sdks



## Use Cases

In ASAPP Chat, users can receive Push Notifications (a.k.a. ASAPP background messages) for the following reasons:

* **New live messages**: if a customer is talking to a live agent and leaves the chat interface, new messages can be delivered via Push Notifications.
* **Proactive messages**: used to notify customers about promotions, reminders, or other relevant information, depending on the requirements of the implementation.

If you are looking for a way to get the most recent Conversation Status, please see the [Android](/messaging-platform/integrations/android-sdk/miscellaneous-apis "Miscellaneous APIs") or [iOS](/messaging-platform/integrations/ios-sdk/miscellaneous-apis "Miscellaneous APIs") documentation.

## Overall Architecture

### Overview 1 - Device Token Registration

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-7cbb0a46-3341-20d6-be56-2df37c3a3667.png" />
</Frame>

Figure 1: Push Notification Overview 1 - Device Token Registration.

### Overview 2 - Sending Push Notifications

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-9739caa6-c60b-c07f-dccf-ad0d17cbe4d2.png" />
</Frame>

Figure 2: Push Notification Overview 2 - Sending Push Notifications

## Device Token

After the Customer App (Figure 1) acquires the Device Token, it is then responsible to register it to the ASAPP SDK. ASAPP's servers use this token to send push notification requests to a Customer-provided API endpoint (Customer Backend), which in turn sends requests to Firebase and/or APNs.

The ASAPP SDK and servers act as the middle-man with regards to the Device Token. In general, the Device Token must be a string that uniquely identifies the device that is defined and generated by the customer.

The Device Token format and content can be customized to include the necessary information for the Customer's Backend service to send the push notifications. As an example, the Device Token can be a base64-encoded JSON Web Token (JWT) that contains the end user information required by the Customer's Backend service.

ASAPP does not need to understand the content of the Device Token; however, the Device Token is persisted within the ASAPP Push Notification system.

<Note>
  Please consult with us if there is a requirement to include one or more PII data fields in the Device Token.

  ASAPP's servers do not communicate directly with Firebase or APNs; it is the responsibility of the customer to do so.
</Note>

## Customer Implementation

This section details the customer work necessary to integrate Push Notifications in two parts: the App and the Backend.

### Customer App

The Customer App manages the Device Token. In order for ASAPP's servers to route notifications properly, the Customer App must register and deregister the token with the ASAPP SDK.

The Customer App also detects when push notifications are received and handles them accordingly.

#### Register for Push Notifications

Please refer to Figure 1 for a high level overview. There are usually two situations where the Customer App will need to register the Device Token:

* **App start**
  After you initialize the ASAPP SDK and set up the ASAPP User properly, register the Device Token.
* **Token update**
  In case the Device Token changes, register the token again.
  Please refer to the specific [Android](/messaging-platform/integrations/android-sdk/notifications#push-notifications "Push Notifications") and [iOS](/messaging-platform/integrations/ios-sdk/push-notifications "Push Notifications") docs for more detailed information.

#### Deregister for Disable Push Notifications

If the user signs out of the Customer App, it is important to call the SDK API to de-register for push notifications.

<Note>
  This must be done before changing the ASAPP user credentials so that the SDK can use those credentials to properly disable Push Notifications for the user who is signing out.
</Note>

<Note>
  If the device token de-registration isn't done properly, there's risk that the device will continue to receive Push Notifications for the user who previously signed out.
</Note>

Please refer to the specific [Android](/messaging-platform/integrations/android-sdk/notifications#push-notifications "Push Notifications") and [iOS](/messaging-platform/integrations/ios-sdk/push-notifications "Push Notifications") docs for more detailed information.

#### Receive Messages in the Foreground

<Note>
  If the user is currently in chat, the message is sent directly to chat via WebSocket and no push notification is sent.
</Note>

See Scenario 2 in Figure 2.

On **Android**: you usually receive foreground Push Notifications via a Firebase callback. To check if this is an ASAPP-generated Push Notification, call `ASAPP.instance.getConversationStatusFromNotification`, which will return a non-null status object. The Customer App can now display user feedback as desired using the status object.

On **iOS**, if you have set a `UNUserNotificationCenterDelegate`, it calls [userNotificationCenter(\_:willPresent:withCompletionHandler:)](https://developer.apple.com/documentation/usernotifications/unusernotificationcenterdelegate/1649518-usernotificationcenter) when a push notification is received while the app is in the foreground. In your implementation of that delegate method, call `ASAPP.canHandleNotification(with: notification.request.userInfo)` to determine if ASAPP generated the notification. An alternative method is to implement [application(\_:didReceiveRemoteNotification:fetchCompletionHandler:)](https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1623013-application), which is called when a push notification is received regardless of whether the app is in the foreground or the background. In both cases, you can access `userInfo["UnreadMessages"]` to determine the number of unread messages.

#### Receive Push Notifications in the Background

See Scenario 1 in Figure 2.

When the App is in the background (or the device is locked), a system push notification displays as usual.

When the user opens the push notification:

* On **Android**: the App opens with an Android Intent. The Customer App can verify if the Intent is from an ASAPP generated Push Notification by calling the utility method `ASAPP.instance.shouldOpenChat` . This should open chat. See more details and code examples in the Android SDK [Handle Push Notifications](/messaging-platform/integrations/android-sdk/notifications#handle-push-notifications "Handle Push Notifications") section.
* On **iOS**: if the app is running in the background, it calls [application(\_:didReceiveRemoteNotification:fetchCompletionHandler:)](https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1623013-application) as above. If the app is not running, the app will start and call [application(\_:didFinishLaunchingWithOptions:)](https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1622921-application), with the notification's payload accessible at `launchOptions[.remoteNotification]`. Once again, call `ASAPP.canHandleNotification(with:)` to determine if ASAPP generated the notification.

### Customer Backend

It is common that the Customer solution already includes middleware that handles Push Notifications. This middleware usually provides the Customer App with the Device Tokens and sends Push Notification requests to Firebase and/or APNs. If the middleware provides an endpoint that can be called to trigger push notifications, ASAPP can integrate with it (given that the authentication strategy is in place). Otherwise, ASAPP requires that the Customer provides or implements an endpoint for this to take place.

ASAPP's Push Notification adapters call the provided endpoint with a previously agreed-upon payload format. The following is a payload example:

```json
{
  authToken: "auth-token",
  deviceToken: "the-device-token",
  payload: {
    aps: {
      alert: {
        title: "New Message",
        body: "Hello, how can we help?"
      }
    },
    ...  
  },
  ...
}
```

## ASAPP Implementation

### ASAPP Backend

For any new Push Notification Integration, ASAPP creates an "adapter" for ASAPP's Notification Hub service. This adapter translates messages sent by Agents to a request that is compatible with the Customer Backend. This usually means that the Notification Hub adapter makes HTTP calls to the Customer's specified endpoint, with a previously agreed-upon payload format.

### ASAPP SDK

The ASAPP Android and iOS SDKs already supply the interfaces and utilities needed for Customer Apps to register and de-register for Push Notifications.

### Testing Environments and QA

From a Quality Assurance standpoint, ASAPP requires access to lower-level environments with credentials so that we can properly develop and test new adapters.


# User Management
Source: https://docs.asapp.com/messaging-platform/integrations/user-management



This section provides an overview of User Management (Roles and Permissions). These roles dictate if an ASAPP user can authenticate to *Agent Desk*, *Admin Dashboard*, or both. In addition, roles determine what view and data users see in the Admin Dashboard. You can pass User Data to ASAPP via *SSO*, AD/LDAP, or other approved integration.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-6f3c5891-ad4d-bf0b-06f3-31d6bf3b96ac.png" />
</Frame>

This section describes the following:

* [Process Overview](#process-overview)
* [Resource Overview](#resource-overview)
* [Definitions](#definitions "Definitions")

## Process Overview

This is a high-level overview of the User Management setup process.

1. ASAPP demos the Desk/Admin Interface.
2. Call with ASAPP to confirm the access and permission requirements. ASAPP and you complete a Configuration spreadsheet defining all the Roles & Permissions.
3. ASAPP sends you a copy of the Configuration spreadsheet for review and approval. ASAPP will make additional changes if needed and send to you for approval.
4. ASAPP implements and tests the configuration.
5. ASAPP trains you to set up and modify User Management.
6. ASAPP goes live with your new Customer Interaction system.

## Resource Overview

The following table lists and defines all resources:

<table class="informaltable frame-box rules-all">
  <thead>
    <tr>
      <th class="th"><p>Feature</p></th>
      <th class="th"><p>Overview</p></th>
      <th class="th"><p>Resource</p></th>
      <th class="th"><p>Definition</p></th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td class="td" rowspan="2"><p>Agent Desk</p></td>
      <td class="td" rowspan="2"><p>The App where Agents communicate with customers.</p></td>
      <td class="td"><p>Authorization</p></td>
      <td class="td"><p>Allows you to successfully authenticate via Single Sign-On (SSO) into the ASAPP Agent Desk.</p></td>
    </tr>

    <tr>
      <td class="td"><p>Go to Desk</p></td>
      <td class="td"><p>Allows you to click <strong>Go to Desk</strong> from the Nav to open Agent Desk in a new tab. Requires Agent Desk access.</p></td>
    </tr>

    <tr>
      <td class="td"><p>Default Concurrency</p></td>
      <td class="td"><p>The default value for the maximum number of chats a newly added agent can handle at the same time.</p></td>
      <td class="td"><p>Default Concurrency</p></td>
      <td class="td"><p>Sets the default concurrency of all new users with access to Agent Desk if no concurrency was set via the ingest method.</p></td>
    </tr>

    <tr>
      <td class="td"><p>Admin Dashboard</p></td>
      <td class="td"><p>The App where you can monitor agent activity in real-time, view agent metrics, and take operational actions (e.g. biz hours adjustments)</p></td>
      <td class="td"><p>Authorization</p></td>
      <td class="td"><p>Allows you to successfully authenticate via SSO into the ASAPP Admin Dashboard.</p></td>
    </tr>

    <tr>
      <td class="td" rowspan="2"><p>Live Insights</p></td>
      <td class="td" rowspan="2"><p>Dashboard in Admin that displays how each of your queues are performing in real-time. You can drill down into each queue to gain insight into what areas need attention.</p></td>
      <td class="td"><p>Access</p></td>
      <td class="td"><p>Allows you to see Live Insights in the Admin navigation and access it.</p></td>
    </tr>

    <tr>
      <td class="td"><p>Data Security</p></td>
      <td class="td"><p>Limits the agent-level data that certain users can see in Live Insights. If a user is not allowed to see data for any agents who belong to a given queue, that queue will not be visible to that user in Live Insights.</p></td>
    </tr>

    <tr>
      <td class="td" rowspan="4"><p>Historical Reporting</p></td>
      <td class="td" rowspan="4"><p>Dashboard in Admin where you can find data and insights from customer experience and automation all the way to agent performance and workforce management.</p></td>
      <td class="td"><p>Power Analyst Access</p></td>

      <td class="td">
        <p>Allows you to see the Historical Reporting page in the Admin Navigation with Power Analyst access type, which entails the following:</p>

        <ul>
          <li><p>Access to ASAPP Reports</p></li>
          <li><p>Ability to change widget chart type</p></li>
          <li><p>Ability to toggle dimensions and filters on/off for any report</p></li>
          <li><p>Export data per widget and dashboard</p></li>
          <li><p>Cannot share reports to other users</p></li>
          <li><p>Cannot create or copy widgets and dashboards</p></li>
        </ul>
      </td>
    </tr>

    <tr>
      <td class="td"><p>Creator Access</p></td>

      <td class="td">
        <p>Allows you to see the Historical Reporting page in the Admin Navigation with Creator access type, which entails the following:</p>

        <ul>
          <li><p>Power Analyst privileges</p></li>
          <li><p>Can share reports</p></li>
          <li><p>Can create net new widgets and dashboards</p></li>
          <li><p>Can copy widgets and dashboards</p></li>
          <li><p>Can create custom dimensions/calculated metrics</p></li>
        </ul>
      </td>
    </tr>

    <tr>
      <td class="td"><p>Reporting Groups</p></td>

      <td class="td">
        <p>Out-of-the-box groups are:</p>

        <ul>
          <li><p>Everybody: all users</p></li>
          <li><p>Power Analyst: Users with Power Analyst Role</p></li>
          <li><p>Creator: Users with Creator role</p></li>
        </ul>

        <p>If a client has data security enabled for Historical Reporting, policies need to be written to add users to the following 3 groups:</p>

        <ul>
          <li><p>Core: Users who can see the ASAPP Core Reports</p></li>
          <li><p>Contact Center: Users who can see the ASAPP Contact Center Reports</p></li>
          <li><p>All Reports: Users who can see both the ASAPP Contact Center and ASAPP Core Reports</p></li>
        </ul>

        <p>If you have any Creator users, you may want custom groups created. This can be achieved by writing a policy to create reporting groups based on a specific user attribute (i.e. I need reporting groups per queue, where queue is the attribute).</p>
      </td>
    </tr>

    <tr>
      <td class="td"><p>Data Security</p></td>
      <td class="td"><p>Limits the agent-level data that certain users can see in Historical Reporting. If anyone has these policies, then the Core, Contact Center, and All Reports groups should be enabled.</p></td>
    </tr>

    <tr>
      <td class="td"><p>Business Hours</p></td>
      <td class="td"><p>Allows Admin users to set their business hours of operation and holidays on a per queue basis.</p></td>
      <td class="td"><p>Access</p></td>
      <td class="td"><p>Allows you to see Business Hours in the Admin navigation, access it, and make changes.</p></td>
    </tr>

    <tr>
      <td class="td"><p>Triggers</p></td>
      <td class="td"><p>An ASAPP feature that allows you to specify which pages display the ASAPP Chat UI. You can show the ASAPP Chat UI on all pages with the ASAPP Chat SDK embedded and loaded, or on just a subset of those pages.</p></td>
      <td class="td"><p>Access</p></td>
      <td class="td"><p>Allows you to see Triggers in the Admin navigation, access it, and make changes.</p></td>
    </tr>

    <tr>
      <td class="td"><p>Knowledge Base</p></td>
      <td class="td"><p>An ASAPP feature that helps Agents access information without the needing to navigate any external systems by surfacing KB content directly within Agent Desk.</p></td>
      <td class="td"><p>Access</p></td>
      <td class="td"><p>Allows you to see Knowledge Base content in the Admin navigation, access it, and make changes.</p></td>
    </tr>

    <tr>
      <td class="td" rowspan="5"><p>Conversation Manager</p></td>
      <td class="td" rowspan="5"><p>Admin Feature where you can monitor current conversations individually in the Conversation Manager. The Conversation Manager shows all current, queued, and historical conversations handled by SRS, bot, or by a live agent.</p></td>
      <td class="td"><p>Access</p></td>
      <td class="td"><p>Allows you to see Conversation Manager in the Admin navigation and access it.</p></td>
    </tr>

    <tr>
      <td class="td"><p>Conversation Download</p></td>
      <td class="td"><p>Allows you to select 1 or more conversations in Conversation Manager to export to either an HTML or CSV file.</p></td>
    </tr>

    <tr>
      <td class="td"><p>Whisper</p></td>
      <td class="td"><p>Allows you to send an inline, private message to an agent within a currently live chat, selected from the Conversation Manager.</p></td>
    </tr>

    <tr>
      <td class="td"><p>SRS Issues</p></td>
      <td class="td"><p>Allows you to see conversations only handled by SRS in the Conversation Manager.</p></td>
    </tr>

    <tr>
      <td class="td"><p>Data Security</p></td>
      <td class="td"><p>Limits the agent-assisted conversations that certain users can see at the agent-level in the Conversation Manager.</p></td>
    </tr>

    <tr>
      <td class="td" rowspan="4"><p>User Management</p></td>
      <td class="td" rowspan="4"><p>Admin Feature to edit user roles and permissions.</p></td>
      <td class="td"><p>Access</p></td>
      <td class="td"><p>Allows you to see User Management in their Admin navigation, access it, and make changes to queue membership, status, and concurrency per user.</p></td>
    </tr>

    <tr>
      <td class="td"><p>Editable Roles</p></td>
      <td class="td"><p>Allows you to change the role(s) of a user in User Management.</p></td>
    </tr>

    <tr>
      <td class="td"><p>Editable Custom Attributes</p></td>
      <td class="td"><p>Allows you to change the value of a custom user attribute per user in User Management. If Off, then these custom attributes will be read-only in the list of users.</p></td>
    </tr>

    <tr>
      <td class="td"><p>Data Security</p></td>
      <td class="td"><p>Limits the users that certain users can see or edit in User Management.</p></td>
    </tr>
  </tbody>
</table>

## Definitions

The following table defines the key terms related to ASAPP Roles & Permissions.

<table class="informaltable frame-box rules-all">
  <thead>
    <tr>
      <th class="th"><p>Role</p></th>
      <th class="th"><p>Definition</p></th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td class="td"><p>Resource</p></td>
      <td class="td"><p>The ASAPP functionality that you can permission in a certain way. ASAPP determines Resources when features are built.</p></td>
    </tr>

    <tr>
      <td class="td"><p>Action</p></td>
      <td class="td"><p>Describes the possible privileges a user can have on a given resource. (i.e. View Only vs. Edit)</p></td>
    </tr>

    <tr>
      <td class="td"><p>Permission</p></td>
      <td class="td"><p>Action + Resource. ex. "can view Live Insights"</p></td>
    </tr>

    <tr>
      <td class="td"><p>Target</p></td>
      <td class="td"><p>The user or a set of users who are given a permission.</p></td>
    </tr>

    <tr>
      <td class="td"><p>User Attribute</p></td>
      <td class="td"><p>A describing attribute for a client user. User Attributes are either sent to ASAPP via accepted method by the client, or ASAPP Native.</p></td>
    </tr>

    <tr>
      <td class="td"><p>ASAPP Native User Attribute</p></td>

      <td class="td">
        <p>A user attribute that exists within the ASAPP platform without the client needing to send it. Currently:</p>

        <ul>
          <li><p>Role</p></li>
          <li><p>Group</p></li>
          <li><p>Status</p></li>
          <li><p>Concurrency</p></li>
        </ul>
      </td>
    </tr>

    <tr>
      <td class="td"><p>Custom User Attribute</p></td>
      <td class="td"><p>An attribute specific to the client's organization that is sent to ASAPP.</p></td>
    </tr>

    <tr>
      <td class="td"><p>Clarifier</p></td>
      <td class="td"><p>An additional and optional layer of restriction in a policy. Must be defined by a user attribute that already exists in the system.</p></td>
    </tr>

    <tr>
      <td class="td"><p>Policy</p></td>
      <td class="td"><p>An individual rule that assigns a permission to a user or set of users. The structure is generally: Target + Permission (opt. + Clarifier) = Target + Action + Resource (opt. + Clarifier)</p></td>
    </tr>
  </tbody>
</table>


# Voice
Source: https://docs.asapp.com/messaging-platform/integrations/voice



The ASAPP Voice Agent Desk includes web-based agent-assist services, which provide telephone agents with a machine learning and natural-language processing powered desktop. Voice Agent Desk augments the agent's ability to respond to inbound telephone calls from end customers.

Voice Agent Desk augments the agents by allowing quick access to relevant customer information and provides actionable suggestions that ASAPP infers from the analysis of the ongoing conversation. The content, actions, and responses ASAPP provides to agents is meant to augment the agent's ability to respond quickly and more effectively to end customers.

Voice Agent Desk interfaces with relevant customer applications to enable desired features.

The ASAPP Voice Agent Desk is not in the call-path but is more of an active listener, and uses two different integrations to provide the real-time augmentation:

* [SIPREC](#glossary "Glossary") - you enable SIP RECording on the customer [Session Border Controllers (SBC)](#glossary "Glossary") and route a copy of the media stream, call information, and metadata per session to ASAPP.
* [CTI](#glossary "Glossary") Events - ASAPP subscribes to telephony events of the voice agents via the CTI server (login, logout, on-hook, off-hook, etc.)

You associate and aggregate the media sessions and CTI events within the ASAPP solution and use them to power the agent augmentation features presented in Voice Agent Desk to the agents.

The ASAPP Voice Agent Desk solution provides agents with the real-time features that automate many of their repeatable tasks. Agents can use Voice Agent Desk for:

* The real-time transcript
* Conversation Summary - where agents add notes and structured data tags that ASAPP suggests as well as disposition the call during the interaction and once it is complete.
* Agents login to Voice Agent Desk via the customer's SSO.
* Customer information (optional)
* Knowledge Base integration (optional)

## Customer Current State Solution

ASAPP works with you to understand your current telephony infrastructure and ecosystem, including the type of voice work assignment platform/s and other capabilities available, such as SIPREC.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-8e1bdfb9-6cc8-a396-f02b-54b6e9034baa.png" />
</Frame>

## Solution Architecture

After the discovery of the customer's current state is complete, ASAPP completes the architecture definition, including integration points into the existing infrastructure. You can deploy the ASAPP [media gateways and media gateway proxies](#glossary "Glossary") within your existing AWS instance or within ASAPP's, providing additional flexibility and control.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-839c65f3-0236-c4c9-1573-b166e65e3b88.png" />
</Frame>

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-0ff10b1d-7e06-7319-9c26-21e4d1695d6e.png" />
</Frame>

### Network Connectivity

ASAPP will determine the network connectivity between your infrastructure and the ASAPP AWS Virtual Private Cloud (VPC) based on the architecture, however, there will be secure connections deployed between your data centers and the ASAPP VPC.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-4f069eaa-5575-b8bc-bff8-ff581945295c.png" />
</Frame>

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-5faecace-de88-de02-cfa4-66cb7cbd1e3e.png" />
</Frame>

### Port Details

You can see ports and protocols in use for the Voice implementation depicted in the following diagram. These definitions provide visibility to your security teams for the provisioning of firewalls and ACL's.

* SIP/SIPREC - TCP (5060, 5070-5072)
  * SBC to Media Gateway Proxies
  * SBC to Media Gateway/s
* Audio Streams - UDP \<RTP/RTCP port range>
* CTI Event Feed - TCP \<vendor specific>
* API Endpoints - TCP 443
  In customer firewalls, you must disable the [SIP Application Layer Gateway (ALG)](#glossary "Glossary") and any 'Threat Detection' features, as they typically interfere with the SIP dialogs and the re-INVITE process.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-5afeb63d-6712-0cea-b0df-04adf439353d.png" />
</Frame>

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-8a91dd1c-f0d5-8378-61e9-a858bb05d416.png" />
</Frame>

### Data Flow

The Voice Agent Desk Data Flow diagram illustrates the [PCI Zone](#glossary "Glossary") within the ASAPP solution. The customer SBC originates the SIPREC sessions and the media streams and sends them to ASAPP media gateways, which repackage the streams into secure WebSockets and sends them to the [Voice Streamer](#glossary "Glossary") within the PCI zone. ASAPP encrypts the data in transit and at rest.

The SBC does not typically encrypt the SIPREC sessions and associated media streams from the SBC to the ASAPP media gateways, but usually encapsulates them within a secure connection. You are responsible for the compliance/security of the network path between the SBC and the media gateways, in accordance with applicable customer policies.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-3190e31d-1fc7-fcc3-57f6-aff9dee85513.png" />
</Frame>

## SIPREC and CTI Correlation and Association

In order to be able to associate the correct audio stream and the correct agent and agent desktop, ASAPP must associate the audio session and the CTI events of the particular agent.

ASAPP assigns voice agents a unique Agent ID and adds it to the SSO profile as a custom attribute. ASAPP will then map this to the Agent ID within ASAPP.

You configure the SBCs to set a unique call identifier, such as [UCID](#glossary "Glossary") (Avaya) or [GUID](#glossary "Glossary")/GUCID (Cisco), etc. on inbound calls, which provides ASAPP the means to correlate the individual SIPREC stream with the CTI events of the correct agent.

The SBCs will initiate a SIPREC session INVITE for each new call. With SIPREC, the customer SBC and the ASAPP media gateway negotiate the media attributes via the [SDP](#glossary "Glossary") offer/answer exchange during the establishment of the session. The codec/s in use today are:

1. G.711
2. G.729

Traffic and load considerations:

* Total number of voice agents using ASAPP -\<total agent count>
* Maximum concurrently logged in agents \<max concurrent agent count>
* Maximum concurrent calls at each SBC pair -\<max number of current offered calls to SBC/s>
* Maximum calls per second at each SBC pair -\<max calls per second offered to the SBC>

### Load Balancing for ASAPP Media Gateway Proxies

In order to distribute traffic across all of the media gateway proxies, the SBCs load balance the SIPREC dialogs to the ASAPP MG Proxies. To facilitate this, you configure the SBCs with a proxy list that provides business continuity and enables the fail-over to the next available proxy if one of the proxies becomes unavailable.

Session Recording Group Example:

The customer data center SBCs use different orders for the media gateway proxy list.

Data Center 1:

1. MG Proxy #1
2. MG Proxy #2
3. MG Proxy #3

Data Center 2:

1. MG Proxy #3
2. MG Proxy #2
3. MG Proxy #1

## Media Failover and Survivability

### Session Border Controller (SBC) to Media Gateways (MG) and Proxies

* Typically unencrypted signaling and audio through a secure connection/private tunnel
  * You can encrypt the traffic in theory, but the SBC has costs and scale limitations associated with encrypting traffic, as well as cost increases to MGs as you will need more instances.
* ASAPP accepts SIPREC dialogs, but initially sets SDP media to "inactive," which pauses the audio while in the IVR and in queue.
  * The ASAPP media gateway will re-invite the session and re-negotiate the media parameters to resume the audio stream when the agent answers the call.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-d5da0e97-893d-32e0-3686-ab027d3132cf.png" />
</Frame>

* SIP RFC handles some level of packet loss and re-transmissions but if the SIP signal is lost, the SIPREC dialog will be torn down and the media will no longer be sent.
* Media is sent via UDP.
  * No retransmissions so packet loss or disconnects result in permanent loss of the audio.
* Proxies are transactionally stateless.
* No audio is ever sent to/through proxies, all audio goes directly to media gateways.
  * Proxies are no longer in the signal path after the first transaction.
* If a proxy fails or is disconnected, SBCs can "hunt" or failover to the next proxy in it's configuration.
  * No existing calls are impacted.
* If media gateways fail or are disconnected, the next SIP transaction will fail and the existing media stream (if resumed) will be sent via UDP to nothing (media is lost).
* Media gateways use regular SIP OPTIONS sent to static proxies that indicate if they are available and their current number of calls.
* Proxies use this active call load to evenly load balance to the least used media gateway.
  * As well as dynamically pick up when a media gateway is no longer available or new ones come online.
* Any inbound calls coming in over ISDN-PRI/TDM trunk facilities will not have associated SIPREC sessions, as these calls do not traverse the SBC.

### Media Gateways to ASAPP Voice Streamers

* Secure websocket initiated per stream (2 per call) to the ASAPP Voice Streamer
* Media gateways do not store media, all processing is done in memory.
* Packet loss can be tolerated a little with TCP retransmissions.
* Buffer overrun audio data in the media gateway is purged instantly (per stream).
* If a secure websocket connection is lost, the media gateway will attempt a limited number of reconnections and then fail.
* If a voice streamer fails, a media gateway will reconnect to a new streamer.
* If a media gateway fails, the SIPREC stream is lost and the SBC can no longer send audio for that group of calls.

## Integration

### API Integration

Integration to existing customer systems enable ASAPP to call for information from those systems to present to the agent, such as:

* customer profile information
* billing history/statements
* customer product purchases
* Knowledge Base

Integration also enables ASAPP to push information to those systems, such as disposition notes and account changes/updates.

ASAPP will work with you to determine use cases for each integration that will add value to the agent and customer experience.

### Custom Call Data from CTI Information

In many instances, CTI will carry end customer specific information about the end customer and the call. This may be in the form of [User-to-User Information (UUI)](#glossary "Glossary"), `Call Variables`, Custom `NamedVariables`, or Custom `KVList UserData`. ASAPP uses this data to provide more information to agents and admins. It may contain information that provides customer identity information, route codes, queue information, customer authentication status, IVR interactions/ outputs, or simply unique identifiers for further data lookup from APIs. ASAPP extracts the custom fields and leverages the data in real-time to provide agents as much information as possible as part of the initial part of the interaction.

Each environment is uniquely different and ASAPP needs to understand what data is available from the CTI events to maximize relevant data to the agent and for voice intelligence processing.

Examples:

**Avaya**

```json
UserToUserInfo: “10000002321489708161;verify=T;english;2012134581”
```

**Cisco**

```json
CallVariable1:10000002321489708161
CallVariable7:en-us
user.AuthDetect:87
```

**Genesys**

```json
userAccount:10000002321489708161
userLanguage:en
userFirstName:John
```

**Twilio**

```json
<Parameter name=”FirstName” value=”John”/>
<Parameter name=”AccountNum” value=”10000002321489708161”/>
<Parameter name=”Language” value=”English”/>
<Parameter name=”VerficationStatus” value=”True”/>
```

### SSO Integration

[Single Sign-On (SSO)](#glossary "Glossary") allows users to sign in to ASAPP using their existing corporate credentials. ASAPP supports [Security Assertion Markup Language](#glossary "Glossary") (SAML) 2.0 Identity Provider (IdP) based authentication. ASAPP requires SSO integration to support implementation.

To enable the SSO integration, the customer must populate and pass the Agent Login ID as a custom attribute in the SAML payload. Then, when a user logs in to ASAPP and authenticates via the existing SSO mechanism, the Agent Login ID value is then passed to ASAPP via SAML assertion for subsequent CTI event correlation.

The ASAPP Voice Agent Desk supports role-based access. You can define a specific role for each user that will determine their permissions within the ASAPP platform. For example, you can define the "app-asappagentprod" role in the Active Directory to send to ASAPP via SAML for those specific users that should have access to ASAPP Voice Agent Desk only. You can define multiple roles for an agent, such as access to Voice Agent Desk, Digital Agent Desk, and Admin Desk. You must define roles for voice agents and supervisors and include them in the SAML payload as a custom attribute.

The table below provides examples of SAML user attributes.

<table class="informaltable frame-void rules-rows">
  <tbody>
    <tr>
      <td class="td"><p><strong>SAML Attribute Values</strong></p></td>
      <td class="td"><p><strong>ASAPP Usage</strong></p></td>
      <td class="td"><p><strong>Examples</strong></p></td>
    </tr>

    <tr>
      <td class="td"><p>Agent Login ID</p></td>
      <td class="td"><p>Provides mapping of the customer telephony agent ID to ASAPP’s internal user ID.</p></td>

      <td class="td">
        <p><code class="code">user.extensionattribute1</code></p>
        <p>or</p>
        <p><code class="code">cti\_agent\_id</code></p>
      </td>
    </tr>

    <tr>
      <td class="td"><p>Givenname</p></td>
      <td class="td"><p>Given name</p></td>
      <td class="td"><p><code class="code">user.givenname</code></p></td>
    </tr>

    <tr>
      <td class="td"><p>Surname</p></td>
      <td class="td"><p>Surname</p></td>
      <td class="td"><p><code class="code">user.surname</code></p></td>
    </tr>

    <tr>
      <td class="td"><p>Mail</p></td>
      <td class="td"><p>Email address</p></td>
      <td class="td"><p><code class="code">user.mail</code></p></td>
    </tr>

    <tr>
      <td class="td"><p>Unique User Identifier</p></td>
      <td class="td"><p>The User ID (authRepId); can be represented as an employee ID or email address.</p></td>
      <td class="td"><p><code class="code">user.employeeid</code> or <code class="code">user.userprincipalname</code></p></td>
    </tr>

    <tr>
      <td class="td"><p>PhysicalDeliveryOfficeName</p></td>
      <td class="td"><p>Physical delivery office name</p></td>
      <td class="td"><p><code class="code">user.physicaldeliveryofficename</code></p></td>
    </tr>

    <tr>
      <td class="td"><p>HireDate</p></td>
      <td class="td"><p>Hire date attribute used by reporting.</p></td>
      <td class="td"><p><code class="code">HireDate</code></p></td>
    </tr>

    <tr>
      <td class="td"><p>Title</p></td>
      <td class="td"><p>Can be used for reporting.</p></td>
      <td class="td"><p><code class="code">Title</code></p></td>
    </tr>

    <tr>
      <td class="td"><p>Role</p></td>
      <td class="td"><p>The roles define what agents can see in the UI and have access to when they login.</p></td>
      <td class="td"><p><code class="code">user.role app-asappadminprod app-asappagentprod</code></p></td>
    </tr>

    <tr>
      <td class="td"><p>Group</p></td>
      <td class="td"><p>For Voice, this is only for reporting purposes. For digital chat this also can be used for queue management.</p></td>
      <td class="td"><p><code class="code">user.groups</code></p></td>
    </tr>
  </tbody>
</table>

## Call Flows

Once an inbound [Automatic Call Distribution (ACD)](#glossary "Glossary") call is connected to an agent, the agent may need to transfer or conference the customer in with another agent/skill group. It is important to identify and document these types of call flows, when the transcript and customer data needs to be provided to another agent due to a change in call state. Then ASAPP will test these call scenarios as part of the QA and UAT testing process.

These scenarios include:

* Cold Transfers
  * The agent transfers the call to a queue (or similar) but does not stay on the call.
* Warm Transfers
  * The agent talks to the receiving agent prior to completing the transfer, in order to prepare the agent with the context of the call/customer issue.
* Conferences
  * The agent conferences in another agent or supervisor and remains on the call.
* Other
  * Customer call back applications or other unique call flows.

## Speech Files for Model Training

To prepare for a production launch, ASAPP will train the speech models on the customer language and vocabulary, which will provide better transcription accuracy. ASAPP will use a set of customer call recordings from previous interactions.

You will need to provide ASAPP with a minimum of 1,000 hours of agent/customer dual-channel/speech separated media files in .wav format with a sample rate of 8000 and signed 16-bit [Pulse-Code Modulation (PCM)](#glossary "Glossary") in order for ASAPP to train the speech recognition models.

* ASAPP will set up an SFTP site in our PCI zone to receive voice media files from you. You will provide an SSH public key and ASAPP will configure the SFTP location within S3.
  * ASAPP prefers that you redact the PCI data from the provided voice recordings. Regardless, ASAPP will use its media redaction technology to remove sensitive customer data (Credit Card Numbers and Social Security Numbers) from the recordings to the extent possible. In addition to the default redaction noted above, ASAPP can customize redaction criteria per your requirements and feature considerations.
* The unredacted voice media files will remain within the [PCI Zone](#glossary "Glossary").
* ASAPP will use a combination of automated and manual transcription to refine our speech models. Data that ASAPP shares with vendors goes through the redaction process described above and is transferred via secured mechanisms such as SFTP.

## Non-Production Lower Environments

As part of our implementation strategy, ASAPP will implement two lower environments for testing (UAT and QA) by both ASAPP and customer resources. It is important that the lower environments do not use production data, including the audio data, as it may contain PCI information or other customer information that you should not expose to the lower environments.

You can implement lower environments using a lab environment, or a production environment.

When using the production infrastructure to support the lower environments, ASAPP separates production traffic from the lower environment traffic. The lower environments will have dedicated inbound numbers and routing that will allow them to be isolated and provide the ability for ASAPP and the customer teams to fully test using non-production traffic.

As part of the environment's buildout, ASAPP will need a way to initiate and terminate test calls. The ASAPP team will use the same soft-client and tools used by agents to login as a voice agent, answer inbound test calls, and simulate the various call flows used within the customer contact center.

ASAPP proposes customers allocate two [Direct Inward Dialing](#glossary "Glossary") (DID)/ [Toll Free Number](#glossary "Glossary") (TFN) numbers, one for each of the two different test environments.

* Demo Environment - A lower environment used by both ASAPP and customers.
* Preprod Environment - A lower environment used by ASAPP QA for testing.

At the SBC level, you should configure the Demo and Preprod DID numbers with their own Session Recording Server (SRS), unique from the production SRS configuration. This will allow the test environments to always have SIPREC turned on, but not send excess/production traffic to ASAPP. This also allows the test environments to operate independently of production. With Oracle/Acme, you can accomplish this with session agents. For Avaya SBCE, you can accomplish this with End Point Flows.

ASAPP will have a separate set of media gateways and media gateway proxies for each environment to ensure traffic and data separation.

The lower environments (not PCI compliant) are for testing only and will not receive actual customer audio. The production environment is where ASAPP transcribes and redacts the audio in a PCI zone.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-9b1f3ae3-1ee4-9930-3cd6-7ca15a0d2501.png" />
</Frame>

## Appendix A - Avaya Configuration Details

This section provides specific configuration details for the solution that leverages Avaya telephony infrastructure.

**Avaya Communication Manager**

* Set Avaya [Internet Protocol - Private Branch Exchange (IP-PBX)](#glossary "Glossary") SIP trunks to 'shared' to ensure the UCID is not reset by the PBX.
  * Change trunk-group x -> page 3 -> UUI Treatment:shared
* Set `SendtoASAI` parameter to 'yes.'
  * Change system-parameters features -> page 13 -> Send UCID to ASAI? Y
  * Add ASAPP voice agents to a new skill, one that is not used for queuing or routing.
  * Configure AES to monitor the new skill.
    * ASAPP will use the `cstaMonitorDevice` service to monitor the ACD skill.
    * ASAPP may also call `cstaMonitorCallsViaDevice` if more call data is needed.

**Avaya AES [TSAPI](#glossary "Glossary") configuration**

* Networking -> Ports -> TSAPI Ports
  * Enabled
  * TSAPI Service Port (450)
    * Firewalls will also need to allow these ports.

| **Connection Type** | **TCP Min Port** | **TCP Max Port** |
| :------------------ | :--------------- | :--------------- |
| unencrypted/TCP     | 1050             | 1065             |
| encrypted/TLS       | 1066             | 1081             |

* AES link to ASAPP connection provisioning
  * Provisioning of new ASAPP Voice skill for monitoring.

## Appendix B - Cisco Configuration Details

This section provides specific configuration details for the solution that leverages Cisco telephony infrastructure.

**Cisco CTI Server configuration**

* ASAPP will connect with the `CTI_SERVICE_ALL_EVENTS`
  * You will need the Preferred `ClientID` (identifier for ASAPP) and `ClientPassword` (if not null) to send the `OPEN_REQ` message.
* Ports 42027 (side A) and 43027 (side B)
  * Instance number if not 0 will increase these ports
  * Firewalls will also need to allow these ports
* `CallVariable`1-10 Definitions/usages
* Custom `NamedVariables` and `NamedArrays` Definitions/usages
* Events currently used by ASAPP:
  * `OPEN_REQ`
  * `OPEN_CONF`
  * `SYSTEM`
  * `AGENT_STATE`
  * `AGENT_PRE_CALL`
  * `BEGIN_CALL`
  * `CALL_DATA_UPDATE`
  * `CALL_CLEARED`
  * `END_CALL`

## Appendix C - Oracle (Acme) Session Border Controller

In order to provide the correlation between the SIPREC session and specific CTI events, ASAPP will use the following approach:

* Session Border Controller
  * Configure the SBC to create an Avaya UCID (universal call identifier) in the SIP header.
    * UCID generation is a native feature for Oracle/Acme Packet session border controller platforms.
      * [Oracle SBC UCID Admin](https://docs.oracle.com/en/industries/communications/enterprise-session-border-controller/8.4.0/configuration/universal-call-identifier-spl#GUID-97456BB9-264F-4290-AB92-8C60F64B9734)
* In the Oracle (Acme Packet) SBCs, load balancing across the ASAPP Media Gateway Proxies requires the use of static IP addresses versus the use of dynamic hostnames.
  * SBC Settings for Media Gateway Proxies - Production and Lower Environments:
    * Transport = TCP
    * SIP OPTIONS = disabled
    * Load Balancing strategy = "hunt"
    * Session-recording-required = disabled
    * Port = 5070

## Glossary

| **Term**                                                  | **Acronym** | **Definition**                                                                                                                                                                                                                  |
| :-------------------------------------------------------- | :---------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Automated Speech Recognition**                          | ASR         | The service that converts speech (audio) to text.                                                                                                                                                                               |
| **Automatic Call Distributor**                            | ACD         | A telephony system that automatically receives incoming calls and distributes them to an available agent. Its purpose is to help inbound contact centers sort and manage large volumes of calls to avoid overwhelming the team. |
| **Computer Telephony Integration**                        | CTI         | The means of linking a call center's telephone systems to a business application. In this case, ASAPP is monitoring agents and receives call state event data via CTI.                                                          |
| **Direct Inward Dialing**                                 | DID         | A service that allows a company to provide individual phone numbers for each employee without a separate physical line.                                                                                                         |
| **Globally Unique IDentifier**                            | GUID        | A numeric label used for information in communications systems. When generated according to the standard methods, GUIDs are, for practical purposes, unique. Also known as Universally Unique IDentifier (UUID)                 |
| **Internet Protocol Private Branch Exchange**             | IP-PBX      | A system that connects phone extensions to the Public Switched Telephone Network (PSTN) and provides internal business communication.                                                                                           |
| **Media Gateway**                                         | MG          | Entry point for all calls from Customer. Receives and forwards SIP and audio data.                                                                                                                                              |
| **Media Gateway Proxy**                                   | MGP         | SIP Proxy, used for SIP signaling to/from customer SBC.                                                                                                                                                                         |
| **Payment Card Industry Data Security Standard**          | PCI DSS     | Payment card industry compliance refers to the technical and operational standards that businesses follow to secure and protect credit card data provided by cardholders and transmitted through card processing transactions.  |
| **Payment Card Industry Zone**                            | PCI Zone    | PCI Level I Certified environment for cardholder data and other sensitive customer data storage (Transport layer security for encryption in transit, encryption at rest, access tightly restricted and monitored).              |
| **Pulse-Code Modulation**                                 | PCM         | Pulse-code modulation is a method used to digitally represent sampled analog signals. It is the standard form of digital audio in digital telephony.                                                                            |
| **Security Assertion Markup Language**                    | SAML        | An open standard for exchanging authentication and authorization data between an identity provider and a service provider.                                                                                                      |
| **Session Border Controller**                             | SBC         | SIP-based voice security platform; source of the SIPREC sessions to ASAPP.                                                                                                                                                      |
| **Session Description Protocol**                          | SDP         | Used between endpoints for negotiation of network metrics, media types, and other associated properties, such as codec and sample size.                                                                                         |
| **Session Initiation Protocol Application-Level Gateway** | SIP ALG     | A firewall function that enables the firewall to inspect the SIP dialog/s. This function should be disabled to prevent SIP dialog interruption.                                                                                 |
| **Session Initiation Protocol Recording**                 | SIPREC      | IETF standard used for establishing recording sessions and reporting of the metadata of the communication sessions.                                                                                                             |
| **Single Sign On**                                        | SSO         | Single sign-on is an authentication scheme that allows a user to log in with a single ID and password to any of several related, yet independent, software systems.                                                             |
| **Toll-Free Number**                                      | TFN         | A service that allows callers to reach businesses without being charged for the call. The called person is charged for the toll-free number.                                                                                    |
| **Telephony Services API**                                | TSAPI       | Telephony server application programming interface (TSAPI) is a computer telephony integration standard that enables telephony and computer telephony integration (CTI) application programming.                                |
| **Universal Call IDentifier**                             | UCID        | UCID assigns a unique number to a call when it enters that call center network. The single UCID can be passed among platforms, and can be used to compile call-related information across platforms and sites.                  |
| **User to User Information**                              | UUI         | The SIP UUI header allows the IVR to insert information about the call/caller and pass it to downstream elements, in this case, Communication Manager. The UUI information is then available via CTI.                           |
| **Voice Streamer**                                        | VS          | Receives SIP and audio data from MG. Gets the audio transcribed into text through the ASR and sends that downstream.                                                                                                            |


# Web SDK Overview
Source: https://docs.asapp.com/messaging-platform/integrations/web-sdk



Welcome to the ASAPP Chat SDK Web Overview!

This document provides an overview of how to integrate the SDK (authenticate, customize, display) and the various API methods and properties you can use to call the ASAPP Chat SDK. In addition, it provides an overview of the ASAPP ContextProvider, which allows you to pass various user information to the Chat SDK.

If you're just getting started with the ASAPP Chat SDK, ASAPP recommends starting with the [Web Quick Start](/messaging-platform/integrations/web-sdk/web-quick-start "Web Quick Start") section. There you will learn the basics of embedding the ASAPP Chat SDK and how to best align it with your site.

ASAPP functionality can be integrated into your website simply, by making sure that a snippet of javascript is included in your site template.

The subsections below provide both an integration overview and detailed documentation covering everything from how to easily get started with your ASAPP integration through how to implement arbitrarily fine-grained customization of the look and feel and the functioning of ASAPP technology to meet your design and functional requirements.

The Web SDK Overview includes the following sections:

* [Web Quick Start](/messaging-platform/integrations/web-sdk/web-quick-start "Web Quick Start")
* [Web Authentication](/messaging-platform/integrations/web-sdk/web-authentication "Web Authentication")
* [Web Customization](/messaging-platform/integrations/web-sdk/web-customization "Web Customization")
* [Web Features](/messaging-platform/integrations/web-sdk/web-features "Web Features")
* [Web JavaScript API](/messaging-platform/integrations/web-sdk/web-javascript-api "Web JavaScript API")
* [Web App Settings](/messaging-platform/integrations/web-sdk/web-app-settings "Web App Settings")
* [Web ContextProvider](/messaging-platform/integrations/web-sdk/web-contextprovider "Web ContextProvider")
* [Web Examples](/messaging-platform/integrations/web-sdk/web-examples "Web Examples")


# Web App Settings
Source: https://docs.asapp.com/messaging-platform/integrations/web-sdk/web-app-settings



This section details the various properties you can provide to the Chat SDK.

These properties are used for various display, feature, and application settings.

Before utilizing these settings, make sure you've [integrated the ASAPP SDK](/messaging-platform/integrations/web-sdk/web-quick-start "Web Quick Start") script on your page.

Once you've integrated the SDK with your site, you can use the [JavaScript API](/messaging-platform/integrations/web-sdk/web-javascript-api "Web JavaScript API") for applying these settings.

The properties available to the ASAPP Chat SDK include:

* [APIHostName](#apihostname "APIHostName")
* [AppId](#appid "AppId")
* [ContextProvider](#contextprovider "ContextProvider")
* [CustomerId](#customerid "CustomerId")
* [Display](#display "Display")
* [Intent](#intent "Intent")
* [Language](#language)
* [onLoadComplete](#onloadcomplete "onLoadComplete")
* [RegionCode](#regioncode "RegionCode")
* [Sound](#sound "Sound")
* [UserLoginHandler](#userloginhandler-11877 "UserLoginHandler")

Each property has three attributes:

* Key - provides the name of the property that you can set.
* Available APIs - lists the [JavaScript APIs](/messaging-platform/integrations/web-sdk/web-javascript-api "Web JavaScript API") that the property is accepted on.
* Value Type - describes the primitive type of value required.

## APIHostName

* Key: `APIHostName`
* Available APIs: [Load](/messaging-platform/integrations/web-sdk/web-javascript-api#load "'load'")
* Value Type: `String`

Sets the ASAPP APIHostName for connecting customers with customer support.

## AppId

* Key: `AppId`
* Available APIs: [Load](/messaging-platform/integrations/web-sdk/web-javascript-api#load "'load'")
* Value Type: `String`

Your unique Company Identifier.

## ContextProvider

* Key: `ContextProvider`
* Available APIs: [Load](/messaging-platform/integrations/web-sdk/web-javascript-api#load "'load'"), ['setCustomer'](/messaging-platform/integrations/web-sdk/web-javascript-api#setcustomer "'setCustomer'")
* Value Type: `Function`

The ASAPP `ContextProvider` is used for passing various information about your users to the Chat SDK. This information may include authentication, analytics, or session information. Please see the in-depth section on [Using the ContextProvider](/messaging-platform/integrations/web-sdk/web-contextprovider "Web ContextProvider") for details about each of the use cases.

## CustomerId

* Key: `CustomerId`
* Available APIs: [Load](/messaging-platform/integrations/web-sdk/web-javascript-api#load "'load'"), ['setCustomer'](/messaging-platform/integrations/web-sdk/web-javascript-api#setcustomer "'setCustomer'")
* Value Type: `String`

The unique identifier for an authenticated customer. This value is typically a customer's login name or account ID. If setting a **`CustomerId`** you must also provide a [ContextProvider ](#contextprovider "ContextProvider")property to pass along their access token and any other required authentication properties.

## Display

* Key: `Display`
* Available APIs: [Load](/messaging-platform/integrations/web-sdk/web-javascript-api#load "'load'")
* Value Type: `Object`

The `Display` setting allows you to customize the presentation aspects of the Chat SDK. The setting is an object that contains each of the customization's you wish to provide.

Read on below for the currently supported keys:

```javascript
ASAPP('load', 
{   "APIHostname": "example-co-api.asapp.com",
    "AppId": "example-co",
    "Display": {
        "Align": "left",
        "AlwaysShowMinimize": true,
        "BadgeColor": "rebeccapurple",
        "BadgeText": "Support",
        "BadgeType": "tray",
        "FrameDraggable": true,
        "FrameStyle": "sidebar",
        "HideBadgeOnLoad": false,
        "Identity": "electronics"
    }
}
```

### Align

* Key: `Align`
* Value Type: `String`
* Accepted Values: `'left'`, `'right'` (default)

Renders the [Chat SDK Badge](/messaging-platform/integrations/web-sdk/web-customization#badge "Badge") and [iframe](/messaging-platform/integrations/web-sdk/web-customization#iframe "iframe") on the left or right side of your page.

### AlwaysShowMinimize

* Key: `AlwaysShowMinimize`
* Value Type: `Boolean`

Determines if the iframe minimize icon displays in the Chat SDK's header. The default `false` value displays the button only on tablet and mobile screen sizes. When set to `true`, the button will also be visible on desktop-sized screens.

### BadgeColor

* Key: `BadgeColor`
* Value Type: `String`
* Accepted Values: `Color Keyword`,`RGB hex value`

Customizes the background color of the [Chat SDK Badge](/messaging-platform/integrations/web-sdk/web-customization#badge "Badge").

This will be the primary color of Proactive Messages and Channel Picker if the PrimaryColor is not provided.

### BadgeText

* Key: `BadgeText`
* Value Type: `String`

Applies a caption to the [Chat SDK Badge](/messaging-platform/integrations/web-sdk/web-customization#badge "Badge").

<Note>
  This setting only works when applying the `BadgeType`:`tray`.
</Note>

### BadgeType

* Key: `BadgeType`
* Value Type: `String`
* Accepted Values: `'tray'`,`'badge'`(default) , `'none'`

`BadgeType: 'tray'`

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-97cd2bcf-644f-e074-98a0-92642e96e750.png" />
</Frame>

`BadgeType: 'badge'`

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-5aae3dc1-edc7-7cc7-b609-8ac390ab04f8.png" />
</Frame>

Customizes the display of the [Chat SDK Badge](/messaging-platform/integrations/web-sdk/web-customization#badge "Badge"). When you set the type to `'tray'`, you may also enter a `BadgeText` value. When you set this to 'none', the badge will not render.

### FrameDraggable

* Key: `FrameDraggable`
* Value Type: `Boolean`

Enabling this setting allows a user to reposition the placement of the [Chat SDK iframe](/messaging-platform/integrations/web-sdk/web-customization#iframe "iframe").

When this is set to `true`, a user can hover over the frame's heading region, then click and drag to reposition the frame. The user's frame position will be recalled as they navigate your site or minimize/open the Chat SDK.

If the user has repositioned the frame, a button will appear allowing them to reset the Chat SDK to its default position.

### FrameStyle

* Key: `FrameStyle`
* Value Type: `String`

Accepted Values: `'sidebar'`, `'default'` (default)

Customizes the layout of the [Chat SDK iframe](/messaging-platform/integrations/web-sdk/web-customization#iframe "iframe").

By default, the frame will appear as a floating window with a responsive height and width. When set to `'sidebar'`, the frame will be docked to the side of the page and take 100% of the browser's viewport height. The`'sidebar'` setting will adjust your page's content as though the user resized their browser viewport.

Use the `Align` setting if you wish to change which side of the page the frame appears on.

### HideBadgeOnLoad

* Key: `HideBadgeOnLoad`
* Value Type: `Boolean`
* Accepted Values: `'true'`,`'false'`(default)

When set to true, [Chat Badge](/messaging-platform/integrations/web-sdk/web-customization#badge "Badge") is not visible on load. You can open the [Chat SDK iframe](/messaging-platform/integrations/web-sdk/web-customization#iframe "iframe") via Proactive Message, [Chat Instead](../chat-instead/web "Web"), or [Show API](/messaging-platform/integrations/web-sdk/web-javascript-api#show "'show'").

Once you open the Chat SDK iframe, Chat Badge will become visible allowing a user to minimize/reopen.

### Identity

* Key: `Identity`
* Value Type: `String`

A string that represents the branding you wish to display on the SDK. Your ASAPP Implementation Manager will help you determine this value.

If set to a non-supported value the Chat SDK will display in a generic, non-branded experience.

### PrimaryColor

* Key: `PrimaryColor`
* Value Type: `String`
* Accepted Values: `Color Keyword`,`RGB hex value`

Customizes the primary color of Proactive Messages and [Chat Instead](/messaging-platform/integrations/chat-instead/web "Web").

This will be the background color of the [Chat SDK Badge](/messaging-platform/integrations/web-sdk/web-customization#badge "Badge") if the BadgeColor is not provided.

## Intent

* Key: `Intent`
* Available APIs: [Load](/messaging-platform/integrations/web-sdk/web-javascript-api#-load- "'load'")
* Value Type: `String`

The intent code that you wish for a user's conversation to initialize with. The setting takes an object, with a required key of `Code`. `Code` accepts a string.

Your team and your ASAPP Implementation Manager will determine the available values.

```javascript
ASAPP('load', {
    APIHostname: 'example-co-api.asapp.com',
    AppId: 'example-co',
    Intent: {
        Code: 'PAYBILL'
    }
});
```

## Language

* Key: `Language`
* Available APIs: [Load](/messaging-platform/integrations/web-sdk/web-javascript-api#load "'load'")
* Value Type: `String`

By Default, the SDK will use English (`en`). You can override this by setting the `Language` property. It accepts a value of:

* `en` for English
* `fr` for French
* `es` for Spanish

ASAPP does not support switching languages mid-session, after a conversation has started. You must set a language before starting a conversation.

<CodeGroup>
  ```javascript English
  ASAPP('load', {
      APIHostname: 'example-co-api.asapp.com',
      AppId: 'example-co',
      Language: 'en'
  });
  ```

  ```javascript French
  ASAPP('load', {
      APIHostname: 'example-co-api.asapp.com',
      AppId: 'example-co',
      Language: 'fr'
  });
  ```
</CodeGroup>

## onLoadComplete

* Key: `onLoadComplete`
* Available APIs: [Load](/messaging-platform/integrations/web-sdk/web-javascript-api#load "'load'")
* Value Type: `Function`

A callback that is triggered once the Chat SDK has finished initializing. This is useful when attaching events via the [Action API](/messaging-platform/integrations/web-sdk/web-javascript-api#action-on-or-off "action: 'on' or 'off'") or whenever you need to perform custom actions to the SDK after it has loaded.

The provided method receives a single argument as a boolean value. If the value is `false`, then the page is not configured to display under the [ASAPP Trigger feature](/messaging-platform/integrations/web-sdk/web-features#triggers "Triggers"). If the value is `true`, then the Chat SDK has loaded and finished appending to your DOM.

```
ASAPP('load', {
    APIHostname: 'example-co-api.asapp.com',
    AppId: 'example-co',
    onLoadComplete: function (isDisplayingChat) {
        console.log('ASAPP Loaded');
        if (isDisplayingChat) {
            ASAPP('on', 'message:received', handleMessageReceivedEvent);
        } else {
            console.log('ASAPP not enabled on this page');
        }
    }
});
```

## RegionCode

* Key: `RegionCode`
* Available APIs: [Load](/messaging-platform/integrations/web-sdk/web-javascript-api#load "'load'")
* Value Type: `String`

Localizes the Chat SDK with a certain region. It accepts a value from the [ISO 3166 alpha-2 country codes](https://www.iso.org/obp/ui/#home) representing the country you wish to localize.

## Sound

* Key: `Sound`
* Available APIs: [Load](/messaging-platform/integrations/web-sdk/web-javascript-api#load "'load'")
* Value Type: `Boolean`

When set to `true`, users will receive an audio notification when they receive a message in the chat log. This defaults to `false`.

## UserLoginHandler

* Key: `UserLoginHandler`
* Available APIs: [Load](/messaging-platform/integrations/web-sdk/web-javascript-api#load "'load'")
* Value Type: `Function`

The `UserLoginHandler` allows you to provide a means of authentication so a user may access account information via the ASAPP Chat SDK. When the Chat SDK determines that a user is unauthorized, a "Log In" button appears. When the user clicks that button, the Chat SDK will call the method you provided. See the [Authentication](/messaging-platform/integrations/web-sdk/web-authentication "Web Authentication") page for options on how you can authenticate your customers. Note: If you do not provide a `UserLoginHandler`, a user will not be able to transition from an anonymous to an authorized session.

When the Chat SDK calls the `UserLoginHandler`, it provides a single argument.

The argument is an object and contains various session information that may be useful to your integration. You and your Implementation Manager determine the information provided.

It may contain things such as [CompanySubdivision](/messaging-platform/integrations/web-sdk/web-contextprovider#company-subdivisions "Company Subdivisions"), [ExternalSessioninformation](/messaging-platform/integrations/web-sdk/web-contextprovider#session-information "Session Information"), and more.

```javascript
ASAPP('load', {
    APIHostname: 'example-co-api.asapp.com',
    AppId: 'example-co',
    UserLoginHandler: function (data) {
        if (data.CompanySubdivision === 'chocolatiers') {
            // Synchronous login
            window.open('/login?makers=tempering')
        } else {
            // Get Customer Id and access_token ...
            var CustomerId = 'Retrieved customer ID';
            var access_token = 'Retrieved access token';
            // Call SetCustomer with retrieved access_token, CustomerId, and ContextProvider
            ASAPP('setCustomer', {
                CustomerId: CustomerId,
                ContextProvider: function (callback) {
                    var context = {
                        Auth: {
                            Token: access_token
                        }
                    };
                    callback(context);
                }
            });
        }
    }
});
```


# Web Authentication
Source: https://docs.asapp.com/messaging-platform/integrations/web-sdk/web-authentication



This section details the process for authenticating your users to the ASAPP Chat SDK.

* [Authenticating at Page Load](#authenticating-at-page-load "Authenticating at Page Load")
* [Authenticating Asynchronously](#authenticating-asynchronously "Authenticating Asynchronously")
* [Using the 'UserLoginHandler' Method](#using-the-userloginhandler-method "Using the 'UserLoginHandler' Method")

Before getting started, make sure you've [embedded the ASAPP Chat SDK](/messaging-platform/integrations/web-sdk/web-quick-start#1-embed-the-script "1. Embed the Script") into your site.

<Note>
  Your site is responsible for the entirety of the user authentication process. This includes the presentation of an interface for login and the maintenance of a session, and for the retrieval and formatting of context data about that user. Please read the section on using the [Authentication with the ContextProvider](/messaging-platform/integrations/web-sdk/web-contextprovider#authentication "Authentication") to understand how you can pass authorization information to the Chat SDK.
</Note>

Once your site has authenticated a user, you can securely pass that authentication forward to the ASAPP Chat environment by making certain calls to the ASAPP Chat SDK (more on those calls below). Your user can then be authenticated both on your web site and in the ASAPP Chat Environment, enabling them to execute within the ASAPP Chat use cases that require authentication.

ASAPP provides two methods for authenticating a user to the ASAPP Chat SDK.

* You can proactively [authenticate your user at page load](#authenticating-at-page-load "Authenticating at Page Load").
* You can [authenticate your user midway through a session](#authenticating-asynchronously "Authenticating Asynchronously") using the [SetCustomer API](/messaging-platform/integrations/web-sdk/web-javascript-api#setcustomer "'setCustomer'").

With rare exceptions, you must also configure [UserLoginHandler](#using-the-userloginhandler-method "Using the 'UserLoginHandler' Method") to enable ASAPP to handle cases where a user requires authentication or re-authentication in the midst of a chat session (e.g., if a user's authentication credentials expire during a chat session.)

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-8ade9d85-5d88-c79d-ac59-de17e894032d.png" />
</Frame>

## Authenticating at Page Load

If a user who is already authenticated with your site requests a page that includes ASAPP chat functionality, you can proactively authenticate that user to the ASAPP SDK at page load time. This allows an authenticated user who initiates a chat session to have immediate access to their account details without having to login again.

To authenticate a user to the ASAPP Chat SDK on page load, use the ASAPP [Load API](/messaging-platform/integrations/web-sdk/web-javascript-api#load "'load'") providing both [ContextProvider](/messaging-platform/integrations/web-sdk/web-app-settings#contextprovider "ContextProvider") and [CustomerId](/messaging-platform/integrations/web-sdk/web-app-settings#customerid "CustomerId") as additional keys in the [Load method](/messaging-platform/integrations/web-sdk/web-javascript-api#load "'load'").

For example:

```javascript
<script>
ASAPP('load', {
    APIHostname: 'examplecompanyapi.asapp.com',
    AppId: 'examplecompany',
    CustomerId: 'UserName123',
    ContextProvider: function (callback) {
        var context = {
            Auth: {
                Body: {
                    token_expiry: '1530021131',
                    token_scope: 'store'
                },
                Token: '3858f62230ac3c915f300c664312c63f'
            },
        };
        callback(context);
    }
});
</script>
```

The sample above initializes the ASAPP Chat SDK with your user's `CustomerId` and a `ContextProvider` incorporating that user's `Auth`.

When a user opens the ASAPP Chat SDK, they will already be authenticated to the chat client and can access account information within the chat without being asked to login again.

## Authenticating Asynchronously

If a user's authentication credentials are not available at page load time, you can authenticate asynchronously using the ASAPP [SetCustomer](/messaging-platform/integrations/web-sdk/web-javascript-api#setcustomer "'setCustomer'") API.

After you've retrieved your user's credentials, you can call the API to authenticate that user with the ASAPP Chat SDK mid-session.

You might want to asynchronously authenticate a user to the ASAPP Chat SDK when (for example) that user has just completed a login flow, or if their credentials are retrieved after the page initially loads, or if a session expires and the user needs to reauthenticate.

The following sample snippet shows how to call the SetCustomer API:

```javascript
<script>
ASAPP('setCustomer', {
    CustomerId: 'UserName123',
    ContextProvider: function (callback) {
        var context = {
            Auth: {
                Token: '3858f62230ac3c915f300c664312c63f'
            },
        };
        callback(context);
    }
});
</script>
```

Once you call the [SetCustomer](/messaging-platform/integrations/web-sdk/web-javascript-api#setcustomer "'setCustomer'") method is called, and as long as the provided `Auth` information remains valid on your backend, any ASAPP Chat SDK actions that require authentication will be properly authenticated.

<Note>
  The SetCustomer method is typically called as part of the [UserLoginHandler](/messaging-platform/integrations/web-sdk/web-app-settings#userloginhandler-11877 "UserLoginHandler").

  See the section on [Using the 'UserLoginHandler' Method](#using-the-userloginhandler-method "Using the 'UserLoginHandler' Method") for a complete picture of how you may want to authenticate a user during an ASAPP Chat SDK session.
</Note>

## Using the 'UserLoginHandler' Method

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-4699ebd3-525e-b694-a3b6-1e329e71fbbd.png" />
</Frame>

```javascript
<script>
ASAPP('load', {
    APIHostname: 'examplecompanyapi.asapp.com',
    AppId: 'examplecompany',
    UserLoginHandler: function () {
        /*
            Use case #1
            1. Redirect the user to a login page
            2. User logs in
            3. Once user is redirected, use `ASAPP('load', ...)`
               API to set authorization at page load
            Use case #2
            1. Show a login modal
            2. Authenticate the user asynchronously
            3. Retrieve and set the customer's ID and access token
               with `ASAPP('setCustomer', ...)`
        */
    }
});
</script>
```


# Web ContextProvider
Source: https://docs.asapp.com/messaging-platform/integrations/web-sdk/web-contextprovider



This section details the various ways you can use the ASAPP ContextProvider with the Chat SDK API. Before using the ContextProvider, make sure you've [integrated the ASAPP SDK](/messaging-platform/integrations/web-sdk/web-quick-start "Web Quick Start") script on your page.

The ASAPP `ContextProvider` is used for passing various information about your users or their sessions to the Chat SDK. It is a key that may be set in the [Load and SetCustomer](/messaging-platform/integrations/web-sdk/web-javascript-api) APIs. The key must be assigned a function that will receive two arguments.

The first argument is a `callback` function. The second argument is a `needsRefresh` boolean indicating whether or not the authorization information needs to be refreshed.

## 'Callback'

After you've retrieved all the context needed for a user, call the `callback` argument with your context object as the sole argument. This will pass your context object to the ASAPP Chat SDK.

## 'needsRefresh'

The `needsRefresh` argument returns a boolean value indicating whether or not your user's authorization has expired.

```json
function contextProviderHandler(callback, needsRefresh) {
    var contextObject = Object.assign(
        {},
        yourGetAnalyticsMethod(),
        yourGetSessionMethod(),
        yourGetAuthenticationMethod()
    );
    if (needsRefresh) {
        Object.assign(contextObject.Auth,
            getUpdatedAuthorization()
        );
    }
    callback(contextObject);
}
ASAPP('setCustomer', {
    CustomerId: yourGetCustomerIdMethod(),
    ContextProvider: contextProviderHandler
}
)
\
;
```

## Authentication

The `ContextProvider` plays an important role in authorizing your users with the ASAPP Chat SDK. Whether your users are always authenticated or transitioning from an anonymous to integrated use case, you must use the ContextProvider's `Auth` key to provide a user's authorization. 

<Note>
  Your site is responsible for retrieving and providing all authorization information. Once provided to ASAPP, your user will be allowed secure access to any integrated use cases.
</Note>

Along with providing a [CustomerId](/messaging-platform/integrations/web-sdk/web-app-settings#customerid "CustomerId"), you'll need to provide any request body with information, cookies, headers, or access tokens required for ASAPP to authorize with your systems.

You may provide this information using the `Auth` key and the following set of nested properties:

```json
function contextProviderHandler(callback, needsRefresh) {
    var contextObject = {
        // Auth key provided to the ContextProvider
        Auth: {
            Body: {
                customParam: 'value'
            },
            Cookies: {
                AuthCookie: 'authCookieValue'
            },
            Headers: {
                'X-Custom-Header': 'value'
            },
            Scopes: ['paybill'],
            Token: 'b34r3r...'
        }
    };
    callback(contextObject);
}
```

Each key within the `Auth` object is optional, but you must provide any necessary information for your authenticated users.

* The `Body`, `Cookies`, and `Headers` keys all accept an object containing any number of key:value pairs.
* The `Scopes` key accepts an array of strings defining which services may be updated with the provided token.
* The `Token` key accepts a single access token string.

Please see the [Authentication](/messaging-platform/integrations/web-sdk/web-authentication "Web Authentication") section for full details on using the `ContextProvider` for authenticating your users.

## Analytics

You may assign analytics data to a user's Chat SDK interactions by using the `CustomerInfo` key. The key is a child of the context object and contains a series of key:value pairs.

Your page is responsible for defining and setting the keys you would like to track. You may define and pass along as many keys as you would like.

A user does not need to be authenticated in order to provide analytics information. The following code snippet shows the `CustomerInfo` key being used to pass along analytics data.

```json
function contextProviderHandler(callback, needsRefresh) {
    var contextObject = {
        CustomerInfo: {
            // Your own key: value pairs
            category: 'payment',
            action: 'ASAPP',
            parent_page: 'Pay my Bill'
        }
    };
    // Return the callback
    callback(contextObject);
}
ASAPP('load', {
    ContextProvider: contextProviderHandler
});
```

<Note>
  You should discuss and agree upon the attribute names with your Implementation Manager.
</Note>

### Customer Info

<Warning>
  **WARNING ABOUT SENSITIVE DATA**

  Do NOT send sensitive data via `CustomerInfo`, `custom_params`, or `customer_params`. For more information, [click here](/security/warning-about-customerinfo-and-sensitive-data "Warning about CustomerInfo and Sensitive Data").
</Warning>

* Key: `CustomerInfo`
* Value Type: `Object`

An object containing a set of key:value pairs that you wish to provide as analytics information. The value of each key must be a string.

## Session Information

The `ContextProvider` may be used for passing existing session information along to the Chat SDK. This is for connecting a user's page session with their SDK session.

You may provide two keys---`ExternalSessionId `and `ExternalSessionType`---for connecting session information. The value of each key is at your discretion.

A user does not need to be authenticated in order to provide session information.

### ExternalSessionId

* Key: `ExternalSessionId`
* Value Type: `String`
* Example Value: `'j6oAOxCWZh...'`
  Your user's unique session identifier. This information can be used for joining your session IDs with ASAPP's session IDs.

### ExternalSessionType

* Key: `ExternalSessionType`
* Value Type: `String`
* Example Value:`'visitID'`

A descriptive label of the type of identifier being passed via the `ExternalSessionId`.

## Company Subdivisions

If your company has multiple entities segmented under a single AppId, you may use the `ContextProvider` to pass the entity information along to the Chat SDK.

To do so, provide the optional `CompanySubdivision`key with a value of your subdivision's identifier. The identifier value will be determined in coordination with your ASAPP Implementation Manager.

### CompanySubdivision

* Key: `CompanySubdivision`
* Value Type: `Object`
* Example Value: `'divisionId'`

An object containing a set of key:value pairs that you wish to provide as analytics information. The value of each key must be a string.

## Segments

If your company needs to group users at a more granular level than [AppId](/messaging-platform/integrations/web-sdk/web-app-settings#appid "AppId") or [CompanySubdivision](#company-subdivisions "Company Subdivisions"), you may use the `Segments` key to apply labels to your reports.

Each key you provide allows you to filter your reporting dashboard by those values.

### Segments

* Key: `Segments`
* Value Type: `Array`
* Example Value: \[`'north america'`, `'usa',``'northeast'`]

The key value must be an array containing a set of strings.


# Web Customization
Source: https://docs.asapp.com/messaging-platform/integrations/web-sdk/web-customization



Once properly installed and configured, the ASAPP Chat SDK embeds two snippets of HTML markup into your host web page:

* [Chat SDK Badge](#badge "Badge")
* [Chat SDK iframe](#iframe "iframe")

This section details how these elements function. In addition, it describes how to [Customize the Chat UI](#customize-the-chat-ui "Customize the Chat UI").

## Badge

The ASAPP Chat SDK Badge is the default interface element your customers can use to open or close the ASAPP Chat iframe.

When a user clicks on this element, it will trigger the [ASAPP('Show')](/messaging-platform/integrations/web-sdk/web-javascript-api#show "'show'") or [ASAPP('Hide')](/messaging-platform/integrations/web-sdk/web-javascript-api#hide"'hide'") APIs.

This toggles the display of the ASAPP Chat SDK iframe.

### Badge Markup

By default. the ASAPP Chat SDK Badge is inserted into your markup as a lightweight `button` element, with a click behavior that toggles the display of the [iframe](#iframe "iframe") element. ASAPP recommends that you use the default badge element so you can take advantage of our latest features as they become available.

However, if you wish to customize the badge, you can do so by either manipulating the CSS associated with the badge, or by hiding/removing the element from your DOM and toggling the display of the iframe using your own custom element. See the [Badge Styling](#asapp-badge-styling "ASAPP Badge Styling") section below for more details on customizing the appearance of the ASAPP Chat SDK Badge.

```json
<button id="asapp-chat-sdk-badge" 
    class="asappChatSDKBadge examplecompany">
    <svg class="icon">...</svg>
    <svg class="icon">...</svg>
</button>
```

### ASAPP Badge Styling

You can customize the ASAPP Chat SDK Badge with CSS using the ID `#asapp-chat-sdk-badge` or classname `.asappChatSDKBadge` selectors. ASAPP recommends that you use [BadgeColor](/messaging-platform/integrations/web-sdk/web-app-settings#display "Display").

The following snippet is an example of how you might use these selectors to customize the element to meet your brand needs:

```css
#asapp-chat-sdk-badge {
    background-color: rebeccapurple;
}
#asapp-chat-sdk-badge:focus,
#asapp-chat-sdk-badge:hover,
#asapp-chat-sdk-badge:active {
    -webkit-tap-highlight-color: rgba(102, 51, 153, .25);
    background-color: #fff;
}
#asapp-chat-sdk-badge .icon {
    fill: #fff;
}
#asapp-chat-sdk-badge:focus .icon,
#asapp-chat-sdk-badge:hover .icon,,
#asapp-chat-sdk-badge:active .icon {
    fill: rebeccapurple;
}
```

### Custom Badge

You can hide the ASAPP Chat SDK Badge and provide your own interface for opening the ASAPP Chat SDK iframe. 

* Set [BadgeType](/messaging-platform/integrations/web-sdk/web-app-settings#display "Display") to none.
* Call [`ASAPP('show')`](/messaging-platform/integrations/web-sdk/web-javascript-api#show "'show'") and/or [`ASAPP('hide')`](/messaging-platform/integrations/web-sdk/web-javascript-api#hide "'hide'")  when your custom badge is clicked to open/close the iframe.
* In order to ensure that the Chat SDK is ready, ASAPP recommends to display your custom badge disabled/loading state at first and then utilize [onLoadComplete](/messaging-platform/integrations/web-sdk/web-app-settings#onloadcomplete "onLoadComplete") to enable it.

**Example:**

In the code example below, the 'Chat with us' button is not clickable until you enable it using onLoadComplete.

Once enabled, a user can click the button to open the ASAPP SDK iframe.

Custom Button:

```html
<button
    id="asapp-custom-button"
    onclick="window.ASAPP(`Show`)"
    disabled
 >
  Chat with us
 </button>
```

Load config example:

```json
<script>
    ASAPP('load', {
                <other configs>…,
                onLoadComplete: shouldDisplayWebChat => {
                    if(shouldDisplayWebChat){
                        document.getElementById('asapp-custom-button').disabled = false;
                    }
                },
 });
</script>   
```

## iframe

The ASAPP Chat SDK iframe contains the interface that your customers will use to interact with the ASAPP platform.

The element is populated with ASAPP-provided functionality and styled elements, but the iframe itself is customizable to your brand's needs.

### iframe Markup

The SDK iframe is instantiated as a lightweight `<iframe>` element whose contents are delivered by the ASAPP platform.

ASAPP recommends using the default iframe sizing, positioning, and functionality so you can take advantage of our latest features as they become available.

However, if you wish to customize this element you can do so by applying functionality and styling to the frame itself. See the iframe Styling section below for details on available customizations.

The following code snippet is an example of the ASAPP Chat SDK iframe markup.

```json
<iframe id="asapp-chat-sdk-iframe"
    title="Customer Support | Chat Window"
    class="asappChatSDKIFrame" frameborder="0"
    src="https://sdk.asapp.com/...">
    ...
</iframe>
```

### iframe Styling

You can customize the ASAPP Chat SDK iframe by using the ID `#asapp-chat-sdk-iframe` or classname `.asappChatSDKIFrame` selectors.

The following snippet is an example of how you may want to use these selectors to customize the element to your brand.

```json
@media only screen and (min-width: 415px) {
    #asapp-chat-sdk-iframe {
        box-shadow: 0 2px 12px 0 rgba(35, 6, 60, .05),
            0 2px 49px 0 rgba(102, 51, 153, .25);
    }
}
```

<Note>
  Modifying the sizing or positioning of the iframe is currently not supported. Change those properties at your own risk; a moved or resized iframe is not guaranteed to work with upcoming releases of the ASAPP platform
</Note>

## Customize the Chat UI

ASAPP will customize the Chat SDK iframe User Interface (UI) in close collaboration with design and business stakeholders. ASAPP will work within your branding guidelines to apply an appropriate color palette, logo, and typeface. There are two particularly technical requirements that we can assess early on to provide a more seamless delivery of requirements:

### 1. Chat Header Logo

The ASAPP SDK Team will embed your logo into the Chat SDK Header. Please provide your logo in the following format:

* SVG format
* Does not exceed 22 pixels in height
* Does not exceed 170 pixels in width
* Should not contain animations
* Should not contain filter effects

If you follow the above guidelines your logo will:

* display at the most optimal size for responsive devices
* sit well within the overall design
* display properly

### 2. Custom Typefaces

Using a custom typeface within the ASAPP Chat SDK requires detailed technical requirements to ensure that the client is performant, caching properly, and displaying the expected fonts. For the best experience, you should provide ASAPP with the following:

* The font should be available in any of the following formats: WOFF2, WOFF, OTF, TTF, and EOT.
* The font should be hosted in the same place that your own site's custom typeface is hosted.
* The same hosted font files should have an `Access-Control-Allow-Origin` that allows `sdk.asapp.com` or `*`.
* The files should have proper cache-control headers as well as GZIP compression. For more information on web font performance enhancements, ASAPP recommends the article: [Web Font Optimization](https://developers.google.com/web/fundamentals/performance/optimizing-content-efficiency/webfont-optimization), published by Google and Ilya Grigorik.
* You acknowledge that you will provide ASAPP with the URLs for each of the hosted font formats for use in a CSS @font-face declaration, hosted on sdk.asapp.com.
* If your font becomes unavailable for display, ASAPP will default to using [Lato](https://fonts.google.com/specimen/Lato), then Arial, Helvetica, or a default sans-serif font.


# Web Examples
Source: https://docs.asapp.com/messaging-platform/integrations/web-sdk/web-examples



This section provides a few common integration scenarios with the ASAPP Chat SDK.

Before continuing, make sure you've [integrated the ASAPP SDK](/messaging-platform/integrations/web-sdk/web-quick-start "Web Quick Start") script on your page. You must have the initial script available before utilizing any of the examples below. Also, be sure that you have a [Trigger](/messaging-platform/integrations/web-sdk/web-features#triggers "Triggers") enabled for the page(s) you wish to display the Chat SDK.

* [Basic Integration (no Authentication)](#basic-integration-no-authentication "Basic Integration (no Authentication)")
* [Basic Integration (With Authentication)](#basic-integration-with-authentication "Basic Integration (With Authentication)")
* [Customizing the Interface](#customizing-the-interface "Customizing the Interface")
* [Advanced Integration](#advanced-integration "Advanced Integration")

## Basic Integration (no Authentication)

The most basic integrations are ones with no customizations to the ASAPP interface and no integrated use cases. If your company is simply providing an un-authed user experience, an integration like the one below may suffice.

ee the [App Settings](/messaging-platform/integrations/web-sdk/web-app-settings "Web App Settings") page for details on the [APIHostname](/messaging-platform/integrations/web-sdk/web-app-settings#apihostname "APIHostName") and [AppId](/messaging-platform/integrations/web-sdk/web-app-settings#appid "AppId") settings. The following code snippet is an example of a non-authenticated integration with the ASAPP Chat SDK.

```json
document.addEventListener('DOMContentLoaded', function () {
    ASAPP('load', {
        APIHostname: 'example-co.api.asapp.com',
        AppId: 'example-co'
    });
});
```

With the above information set, a user will be able to access integrated use cases. If their session or token information has expired, then the user will be presented with a "Sign In" button. Once the user clicks the Sign In button, the Chat SDK will call your provided UserLoginHandler, allowing them to authorize. Here's a sample of what the Sign In button looks like.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-efa8b7d8-cb74-a362-73a8-5af1cd58d9e5.png" />
</Frame>

## Basic Integration (With Authentication)

Integrating the Chat SDK with authenticated users requires the addition of the `CustomerId`, `ContextProvider`, and `UserLoginHandler` keys.

See the [App Settings](/messaging-platform/integrations/web-sdk/web-app-settings "Web App Settings") page for more detailed information on their usage. With each of these keys set, a user will be able to access integrated use cases or be capable of logging in if they are not already.

The following code snippet is an example of providing user credentials for allowing a user to enter integrated use cases.

```json
document.addEventListener('DOMContentLoaded', function () {
    ASAPP('load', {
        APIHostname: 'example-co.api.asapp.com',
        AppId: 'example-co',
        CustomerId: 'hashed-customer-identifier',
        ContextProvider: function (callback, tokenIsExpired) {
            var context = {
                Auth: {
                    Token: 'secure-session-user-token'
                }
            };
            callback(context);
        },
        // If a user's token expires or their user credentials
        // are not available, handle their login path
        UserLoginHandler: function () {
            window.location.href = '/login';
        }
    });
});
```

With the above information set, a user will be able to access integrated use cases. If their session or token information has expired, then the user will be presented with a "Sign In" button.

Once the user clicks the Sign In button, the Chat SDK will call your provided `UserLoginHandler`, allowing them to authorize.

Here's a sample of what the Sign In button looks like.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-cdd86419-d919-b30f-d58f-58a236ccb57e.png" />
</Frame>

## Customizing the Interface

The Chat SDK offers a few basic keys for customizing the interface to your liking.

The `Display` key enables you to perform those customizations as needed. Please see the [Display Settings](/messaging-platform/integrations/web-sdk/web-app-settings#display "Display") section for detailed information on each of the available keys.

The following code snippet shows how to add the Display key to your integration to customize the display settings of the Chat SDK.

```json
document.addEventListener('DOMContentLoaded', function () {
    ASAPP('load', {
        APIHostname: 'example-co.api.asapp.com',
        AppId: 'example-co',
        Display: {
            Align: 'left',
            AlwaysShowMinimize: true,
            BadgeColor: '#36393A',
            BadgeText: 'Chat With Us',
            BadgeType: 'tray',
            FrameDraggable: true,
            FrameStyle: 'sideBar'
        }
    });
});
```

For cases in which you have more specific styling needs, you may utilize the available IDs or classnames for targeting and customizing the Chat SDK elements with CSS.

These selectors are stable and can be used to target the ASAPP Badge and iFrame for specific styling needs.

The following code snippet provides a CSS example showcasing a few advanced style changes.

```json
#asapp-chat-sdk-badge,
#asapp-chat-sdk-badge,
#asapp-chat-sdk-badge {
    border-radius: 25px;
    bottom: 10px;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #36393A;
}
#asapp-chat-sdk-iframe {
    border-radius: 0;
}
```

With the above customizations in place, the Chat SDK Badge will look like the following.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-ef02c2ea-81d6-a600-7880-0f66c789599d.png" />
</Frame>

## Advanced Integration

Here's a more robust example showing how to utilize most of the ASAPP Chat SDK settings.

In the examples below we will define a few helper methods, then pass those helpers to the [Load](/messaging-platform/integrations/web-sdk/web-javascript-api#load "'load'") or [SetCustomer](/messaging-platform/integrations/web-sdk/web-javascript-api#setcustomer "'setCustomer'") APIs.

The following example showcases a [ContextProvider](/messaging-platform/integrations/web-sdk/web-contextprovider "Web ContextProvider") that sets some basic session information, then sets any available user authentication information. Once that information is retrieved, it passes the prepared context to the `callback` so that ASAPP can process each Chat SDK request.

The following code snippet is a ContextProvider example utilizing session expiration conditionals.

```javascript
function asappContextProvider (callback, tokenIsExpired, sessionInfo) {
    var context = {
        CustomerInfo: {
            Region: 'north-america',
            ViewingProduct: 'New Smartphone',
        }
    };
    if (tokenIsExpired || !sessionInfo) {
        sessionInfo = retrieveSessionInfo();
    };
    if (sessionInfo) {
        context.Auth = {
            Cookies: {
                'X-User-Header': sessionInfo.cookies.userValue
            },
            Token: sessionInfo.access_token
        };
    }
    callback(context);
}
```

The next example shows conditional logic for logging a user in on single or multi-page application. You'll likely only need to handle one of the cases in your application.

If a user enters a use case they are not authorized for, they will be presented with a "Sign In" button within the SDK.

When the user clicks that link, it will trigger your provided [UserLoginHandler](/messaging-platform/integrations/web-sdk/web-app-settings#userloginhandler "UserLoginHandler") so you can allow the user to authenticate.

The following code snippet shows a UserLoginHandler utilizing page redirection or modals to log a user in.

```javascript
function asappUserLoginHandler () {
    if (isSinglePageApp) {
        displayUserLoginModal()
            .then(function (customer, sessionInfo) {
                ASAPP('SetCustomer', {
                    CustomerId: customer,
                    ContextProvider: function (callback, tokenIsExpired) {
                        asappContextProvider(callback, tokenIsExpired, sessionInfo)
                    }
                });
            })
    } else {
        window.location.href = '/login';
    }
}
```

The next helper defines the [onLoadComplete](/messaging-platform/integrations/web-sdk/web-app-settings#onloadcomplete "onLoadComplete") handler.

It is used for preparing any additional logic you wish to tie to ASAPP or your own page functionality. The below example checks whether the Chat SDK loaded via a [Trigger](/messaging-platform/integrations/web-sdk/web-features#triggers "Triggers") (via the `isDisplayingChat` argument).

If it's configured to display, it prepares some event bindings through the [Action API](/messaging-platform/integrations/web-sdk/web-javascript-api#action-on-or-off "action: 'on' or 'off'") which in turn call an example metrics service.

The following code snippet shows an `onLoadComplete` handler being used with the isDisplayingChat conditional and Action API.

```javascript
function asappOnLoadComplete (isDisplayingChat) {
    if (isDisplayingChat) {
        // Chat SDK has loaded and exists on the page
        document.body.classList.add('chat-sdk-loaded');
        var customerId = retrieveCurrentSessionOrUserId();
        ASAPP('on', 'issue:new', function (event) {
            metricService('set', 'chat:action', {
                actionName: event.type,
                customerId: customerId,
                externalCustomerId: event.detail.customerId,
                issueId: event.detail.issueId
            })
        });
        ASAPP('on', 'message:received', function (event) {
            metricService('set', 'chat:action', {
                actionName: event.type,
                customerId: customerId,
                externalCustomerId: event.detail.customerId,
                isLiveChat: event.detail.isLiveChat,
                issueId: event.detail.issueId,
                senderType: event.detail.senderType
            })
        });
    } else {
        // Chat SDK is not configured to display on this page.
        // See Display Settings: Triggers documentation
    }
}
```

Finally, we tie everything together. The example below shows a combination of adding the above helper functions to the ASAPP [Load API](/messaging-platform/integrations/web-sdk/web-javascript-api#load "'load'").

It also combines many of the [App Settings](/messaging-platform/integrations/web-sdk/web-app-settings "Web App Settings") available to you and your integration.

```javascript
document.addEventListener('DOMContentLoaded', function () {
    var customerId = retrieveCustomerIdentifier();
    ASAPP('load', {
        APIHostname: 'example-co.api.asapp.com',
        AppId: 'example-co',
        Display: {
            Align: 'left',
            AlwaysShowMinimize: true,
            BadgeColor: 'rebeccapurple',
            BadgeText: 'Chat With Us',
            BadgeType: 'tray',
            FrameDraggable: true,
            FrameStyle: 'sideBar',
            Identity: 'subsidiary-branding'
        },
        Intent: {
            Code: 'PAYBILL'
        },
        RegionCode: 'US',
        Sound: true,
        CustomerId: customerId,
        ContextProvider: asappContextProvider,
        UserLoginHandler: asappUserLoginHandler,
        onLoadComplete: asappOnLoadComplete
    });
});
```


# Web Features
Source: https://docs.asapp.com/messaging-platform/integrations/web-sdk/web-features



This section describes various features that are unique to the ASAPP Web SDK:

* [Triggers](#triggers "Triggers")
* [Deeplinks](#deeplinks-11865 "Deeplinks")

In addition, please see [Chat Instead](/messaging-platform/integrations/chat-instead/web "Web").

## Triggers

A Trigger is an ASAPP feature that allows you to specify which pages display the ASAPP Chat UI. You may choose to show the ASAPP Chat UI on all pages where the ASAPP Chat SDK is [embedded and loaded](/messaging-platform/integrations/web-sdk/web-quick-start "Web Quick Start"), or on just a subset of those pages.

<Note>
  You must enable at least one Trigger in order for the ASAPP Chat UI to display anywhere on your site. Until you define at least one Trigger, the ASAPP Chat UI will not display on your site.
</Note>

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-3a889a32-4401-ec1b-0f96-b73a2243d09a.png" />
</Frame>

Once you've [embedded](/messaging-platform/integrations/web-sdk/web-quick-start#1-embed-the-script "1. Embed the Script") and [loaded](/messaging-platform/integrations/web-sdk/web-javascript-api#load "'load'") the Chat SDK on your web pages, ASAPP will determine whether or not to display the Chat UI on the user's current URL.

URLs that are enabled for displaying the UI are configured by a feature known as Triggers.

<Note>
  You will need to be set up as a user of the ASAPP Admin Control Panel in order to make the changes described below.

  Once you are granted permissions, you may utilize the Triggers as a means of specifying which pages are eligible to show the ASAPP Chat UI.
</Note>

### Creating a Trigger

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-7f1adc53-5b8e-a1f0-2e83-7d85a4b59989.png" />
</Frame>

1. Visit the **Admin > Triggers** section of your Admin Desk.
2. Click the **Add +** button from the Triggers settings page.
3. In the **URL Link** field, enter the URL for the page where you would like to display the ASAPP Chat UI. (See the **Types of Triggers** section below for some example values.)
4. Click **Next >**.
5. Give the Trigger a display name. (Display names are used only on the Triggers settings page to help you organize and manage your triggers.)
6. Click **Save**.
7. You should now see the new entry on your Trigger settings page.
8. Visit the newly configured page on your site to double-check that the ASAPP Chat UI is loading or hiding as you expect.

### Types of Triggers

You may finely control the display of the ASAPP Chat UI on your site by adding as many Triggers as you like.

Triggers can be defined in two different ways: as **Wildcard** and as **Single-Page Triggers**.

#### Wildcard Triggers

You can use the wildcard character in the URL Link field of a Trigger to enable the display of the Chat SDK pages that follow a URL pattern.

The asterisk (i.e., `/*` is the wildcard character you use when defining a Trigger. When you use an asterisk in the URL Link of your Trigger definition, that character will match any sequence of one or more characters.

To set a wildcard for your entire domain, enter a **URL Link** value for your domain name, followed by `/*` (e.g., `example.com/*` ). This will enable the display of the ASAPP Chat UI on all pages of your site.

To enable the ASAPP Chat UI to appear on a more limited set of pages, enter a **URL Link** value that includes the appropriate sub-route path, followed by the `/*` wildcard (e.g., `example.com/settings/*`).

This will cause the Chat UI to display on any pages that start with the URL and sub-route `example.com/settings/`, such as `example.com/settings/profile` and `example.com/settings/payment`.

#### Single-Page Triggers

If you want the ASAPP Chat UI to display on only a few specific pages, you can create a separate Trigger for each of those pages, one at a time, by entering the exact URL for the page you wish to enable in the URL Link field of the Trigger definition.

For example, entering `example.com/customer-support/shipping.html` in the URL Link field of your Trigger definition will enable the ASAPP Chat UI to display on that single page.

## Deeplinks

A feature that defines how the SDK opens hyperlinks when a user clicks a link to another document. In the ASAPP Web SDK, we use the browser's `window.location.origin` API to determine whether the link should open in the same window or a new window.

In order for a link to open in the same window as the user's current SDK window, the `window.location.origin` must return a matching protocol and hostname.

<Note>
  For example, if a user is on `https://www.example.com` and clicks a link to `https://www.example.com/page-two`, the SDK changes the current page to the destination page in the same window.
</Note>

A link opens in a *new* window if there is any difference between the current page and the destination page origin. When a user clicks a link from `https://www.example.com` to `https://subdomain.example.com` , the SDK opens the destination page in a new window due to hostname variation.

A link from `https://example.com` to `http://example.com` also opens a new window due to a mismatched protocol. When a link opens a new window, the user's SDK window remains open.


# Web JavaScript API
Source: https://docs.asapp.com/messaging-platform/integrations/web-sdk/web-javascript-api



This section details the various API methods you can call to the ASAPP Chat SDK.

Before making any API calls, make sure you've [integrated the ASAPP SDK](/messaging-platform/integrations/web-sdk/web-quick-start "Web Quick Start") script on your page.

Once you've integrated the SDK with your site, you can use the JavaScript API to toggle settings in the Chat SDK, trigger events, or send information to ASAPP.

The Chat SDK Web JavaScript API allows you to perform a variety of actions. The most common are: initializing the SDK with the ['load'](#load "'load'")method, setting customer authorizations with ['setCustomer'](#setcustomer "'setCustomer'"), or toggling the display of the iFrame with the ['show'](#show "'show'") or ['hide'](#hide "'hide'") methods.

Read on for details on each of these methods:

* [action: 'on' or 'off'](#action-on-or-off "action: 'on' or 'off'")

* ['getState'](#getstate "'getState'")

* ['hide'](#hide "'hide'")

* ['load'](#load "'load'")

* ['refresh'](#refresh "'refresh'")

* ['send'](#send "'send'")

* ['set'](#set-"'set'")

* ['setCustomer'](#setcustomer "'setCustomer'")

* ['setIntent'](#setintent "'setIntent'")

* ['show'](#show "'show'")

* ['showChatInstead'](#showchatinstead "'showChatInstead'")

[unload](#unload "unload")

## action: 'on' or 'off'

This API subscribes or unsubscribes to events that occur within the Chat SDK. A developer can apply custom behavior, track metrics, and more by subscribing to one of the Chat SDK custom events. To utilize the Action API, pass either the `on` (subscribes) or `off` (unsubscribes) keywords to the `ASAPP` method. The next argument is the name of the event binding.

The final argument is the callback handler you wish to attach. The following code snippet is an example of the Action API subscribing and unsubscribing to the `agent:assigned` and `message:received` events:

```json
function agentAssignedHandler (event) {
    onAgentAssigned(event.detail.issueId, event.detail.externalSenderId);
}
function messageHandler (event) {
    const { isFirstMessage, externalSenderId } = event.detail;
    if (isFirstMessage && externalSenderId) {
        OnAgentInteractive(event.detail.issueId, event.detail.customerId);
    } else if (isFirstMessage === false && isFromRep) {
        ASAPP('off', 'message:received', messageHandler);
    }
}
ASAPP('load', {
    onLoadComplete: () => {
        ASAPP('on', 'agent:assigned', agentAssignedHandler);
        ASAPP('on', 'message:received', messageHandler);
    }
});
```

### Event Object

Each event receives a `CustomEvent` object as the first argument to your event handler. This is a [standard event object](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent) with all typical interfaces. The object has an `event.type` with the name of the event and an `event.detail` key which contains the following custom properties:

`issueId` (Number)

The ASAPP identifier for an individual issue. This ID may change as a user completes and starts new queries to the ASAPP system.

`customerId` (Number)

The ASAPP identifier for a customer. This ID is consistent for authenticated users but may be different for anonymous ones. Anonymous users will have a consistent ID for the duration of their session.

`externalSenderId` (String)

The external identifier you provide to ASAPP that represents an agent identifier. This property will be undefined if the user is not connected with an agent.

### Chat Events

Chat events trigger when a user opens or closes the Chat SDK window. These events do not have any additional event details.

`chat:show`

* Cancellable: true

This event triggers when a user opens the Chat SDK. It may fire multiple times per session if a user repeatedly closes and opens the chat.

`chat:hide`

* Cancellable: true

This event triggers when a user closes the Chat SDK. It may fire multiple times per session if a user repeatedly opens and closes the chat.

### Issue Events

Issue events occur when a change in state of an Issue occurs within the ASAPP system. These events do not have any additional event details.

`issue:new`

* Cancellable: false

This event triggers when a user has opened a new issue. It fires when they first open the Chat SDK or if they complete an issue and start another one.

`issue:end`

* Cancellable: false

This event triggers when a user or agent has ended an issue. It fires when the user has completed an automated support request or when a user/agent ends an active chat.

### Agent Events

Agent events occur when particular actions occur with an agent within ASAPP's system. These events do not have any additional event details.

`agent:assigned`

* Cancellable: false

This event triggers when a user is connected to an agent for the first time. It fires once the user has left an automated support flow and has been connected to a live support agent.

### Message Events

Message events occur when the user receives a message from either SRS or an agent. These events have the following additional event details:

`senderType` (String) 

Returns either `srs` or `agent`.

`isLiveChat` (Boolean) 

Returns `true` when a user is connected with an agent. Returns `false` when a user is within an automated flow.

`isFirstMessage` (Boolean) 

Returns `true` only when a message is the first message received from an agent or SRS. Otherwise returns `false`.

`message:received`

* Cancellable: false

This event triggers whenever the Chat SDK receives a message event to the chat log. It will fire when a user receives a message from SRS or an agent.

## 'getState'

This API returns the current state of Chat SDK session. It accepts a callback which receives the current state object.

```json
ASAPP('getState', function(state) {
    console.log(state);
});
```

### State Object

The state object contains the following keys which give you insight into the user's actions:

`hasContext` (Object) 

Returns the current [context](/messaging-platform/integrations/web-sdk/web-contextprovider "Web ContextProvider") known by the SDK.

`hasCustomerId` (Boolean) 

Returns true when the SDK has been provided with a [CustomerId](/messaging-platform/integrations/web-sdk/web-app-settings#customerid "CustomerId") setting.

`isFullscreen` (Boolean) 

Returns true when the SDK will render in fullscreen for mobile web devices.

`isLiveChat` (Boolean) 

Returns true when the use is connected to an agent.

`isLoggingIn` (Boolean) 

Returns true if the user has been presented with and clicked on a button to Log In.

`isMobile`(Boolean) 

Returns true when the SDK is rendering on a mobile or tablet device.

`isOpen` (Boolean) 

Returns true if the user has the SDK open on the current or had it open on the previous page.

`unreadMessages` (Integer) 

Returns a count of how many messages the user has received since minimizing the SDK.

## 'hide'

This API hides the Chat SDK iframe. See [Show](#-show- "'show'") for revealing the Chat SDK iframe. This method is useful for when you want to close the SDK iframe after certain page interactions or if you've provided a custom Badge entry point.

```json
ASAPP('hide');
```

## 'load'

This API initializes the ASAPP Chat SDK for display on your pages. The method's second argument is an object accepting a variety of properties. The `Load` method has two required properties, [APIHostname](/messaging-platform/integrations/web-sdk/web-app-settings#apihostname "APIHostName") and [AppId](/messaging-platform/integrations/web-sdk/web-app-settings#appid "AppId").

```json
ASAPP('load', {
    APIHostname: 'API_HOSTNAME',
    AppId: 'APP_ID'
});
```

Please see the [SDK Settings](/messaging-platform/integrations/web-sdk/web-app-settings "Web App Settings") page for a list of all the available properties that can be passed to the `Load` API.

## 'refresh'

This API checks to make sure that [Triggers](/messaging-platform/integrations/web-sdk/web-features#triggers "Triggers") work properly when a page URL changes in a SPA (Single-Page Application). You should call this API every time the page URL changes if your website is a SPA.

```json
ASAPP('refresh')
```

## 'send'

This API proactively sends the context object defined in your `contextProviderHandler` function to ASAPP's API. It is primarily used to send information that is used to show a proactive chat prompt when a specific criteria or set of criteria are met. The `Send` API is rate limited to one request for every 5 seconds. It accepts a single argument, represented as an object. This should contain the `CustomerInfo` object, which enables you to send a set of key-value pairs to ASAPP. For example, you could use a key within `CustomerInfo` to indicate that a customer had abandoned their shopping cart. Do not use the send API for transmitting any information that you would consider sensitive or Personally Identifiable Information (PII). The accepted keys are listed below.

### Send Properties

These keys are required when calling the `send` API.

`type` (String) Required

The type of event you're sending to ASAPP. Below are the possible values you may set as an event type:

* '`customer`'. See the "[Event Type: Customer](#event-type-customer "Event Type: Customer")" section below.

`data` (Object)

The data you're attaching to the event. The `data` object contains key and value pairs that are appropriate to the event `type` you are sending.

### Event Type: Customer

This event type sends information about a user's interaction on your site to ASAPP. This allows you to send promotional messages or route them to particular use cases when they interact with the Chat SDK. The `data` for a `customer` event type should be an object containing properties similar to your `CustomerInfo` object.

```json
ASAPP('send', {
    type: 'customer',
    data: {
        "key1": "value1",
        "key2": "value2"
    }
});
```

## 'set'

This API applies various user information to the Chat SDK. Calling this API does not make a network request. The API accepts two arguments. The first is the name of the key you want to update. The second is the value that you wish to assign the key.

```json
ASAPP('set', 'Auth', { Token: '3858f62230ac3c915f300c664312c63f' });
ASAPP('set', 'ExternalSessionId', 'j6oAOxCWZh...');
```

Please see the [Context Provider](/messaging-platform/integrations/web-sdk/web-contextprovider "Web ContextProvider") page for a list of all the properties you can provide to this API.

## 'setCustomer'

This API provides an access token with your customer's account after the Chat SDK has already loaded. This method is useful if a customer logs into their account or if you need to refresh your customer's auth token from time to time. See the [SDK Settings](/messaging-platform/integrations/web-sdk/web-app-settings "Web App Settings") section for details on the [CustomerId](/messaging-platform/integrations/web-sdk/web-app-settings#customerid "CustomerId") (Required), [ContextProvider](/messaging-platform/integrations/web-sdk/web-app-settings#contextprovider "ContextProvider") (Required), and [UserLoginHandler](/messaging-platform/integrations/web-sdk/web-app-settings#userloginhandler "UserLoginHandler") properties accepted for SetCustomer's second argument.

```json
ASAPP('setCustomer', {
    CustomerId: 'a1b2c3x8y9z0',
    ContextProvider: function (callback) {
        var context = {
            Auth: {
                Token: '3858f62230ac3c915f300c664312c63f'
            }
        };
        callback(context);
    }
});
```

## 'setIntent'

This API lets you set an intent after Chat SDK has already been loaded and will take effect even if the user is in chat. ASAPP recommends that you use [Intent](/messaging-platform/integrations/web-sdk/web-app-settings#intent "Intent") via App Settings during load.

This method takes an object as a parameter, with a required key of `Code`. `Code` accepts a string. Your team and your ASAPP Implementation Manager will determine the available values.

```js
ASAPP('setIntent', {Code: 'PAYBILL'});
```

## 'show'

This API shows the Chat SDK iframe. See [Hide](#-hide- "'hide'") for hiding the Chat SDK iframe. This method is useful for when you want to open the SDK iframe after certain page interactions or if you've provided a custom Badge entry point.

```json
ASAPP('show');
```

## 'showChatInstead'

This API displays the [Chat Instead](../chat-instead/web "Web") feature.

This API displays the Chat Instead feature.

In order to enable this feature, please integrate with the `showChatInstead` API and then contact your Implementation Manager.

**Options:**

<table class="informaltable frame-void rules-rows">
  <thead>
    <tr>
      <th class="th"><p>Key</p></th>
      <th class="th"><p>Description</p></th>
      <th class="th"><p>Required</p></th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td class="td"><p><code class="code">phoneNumber</code></p></td>
      <td class="td"><p>Phone number used when a user clicks phone in Chat Instead.</p></td>
      <td class="td"><p>Yes</p></td>
    </tr>

    <tr>
      <td class="td"><p><a class="link linktype-component" href="/messaging-platform/integrations/web-sdk/web-app-settings.html#apihostname" title="APIHostName"><code class="code">APIHostName</code></a></p></td>
      <td class="td"><p>Sets the ASAPP APIHostName for connecting customers with customer support.</p></td>

      <td class="td" rowspan="2">
        <p>No</p>
        <p>(Required if you have not initialized the WebSDK via the <a class="link linktype-component" href="/messaging-platform/integrations/web-sdk/web-javascript-api.html#-load-" title="'load'"><code class="code">Load</code></a> API on the page)</p>
      </td>
    </tr>

    <tr>
      <td class="td"><p><a class="link linktype-component" href="/messaging-platform/integrations/web-sdk/web-app-settings.html#appid" title="AppId"><code class="code">AppId</code></a></p></td>
      <td class="td"><p>Your unique Company Identifier.</p></td>
    </tr>
  </tbody>
</table>

**Example Use Case:**

```json
<a href="tel:8001234567" onclick="ASAPP('showChatInstead', {'phoneNumber': '(800) 123-4567'})">(800) 123-4567</a>
```

## unload

This API removes all the SDK related elements from the DOM (Badge, iframe, and Proactive Messages if any). If the SDK is already open or a user is in live chat, ASAPP will ignore this call. To reload the SDK, you need to call the "Load" API.

```json
ASAPP('unload')
```


# Web Quick Start
Source: https://docs.asapp.com/messaging-platform/integrations/web-sdk/web-quick-start



If you want to start fast, follow these steps:

1. Embed the Script
2. Initialize the SDK
3. Customize the SDK
4. Authenticate Users

In addition, see an example of a [Full Snippet](#full-snippet "Full Snippet").

## 1. Embed the Script

1. Embed the script directly inline. See the instructions below.
2. Use a tag manager to control where and how the scripts load. The ASAPP Chat SDK works with most tag managers. See the tag manager documentation for more detailed instructions.

To enable the ASAPP Chat SDK, you'll first need to paste the [ASAPP Chat SDK Web snippet](#full-snippet) into your site's HTML. You can place it anywhere in your markup, but it's ideal to place it near the top of the `<head>` element.

```
<script> 
(function(w,d,h,n,s){s=d.createElement('script');w[n]=w[n]||function(){(w[n]._=w[n]._||[]).push(arguments)},w[n].Host=h,s.async=1,s.src=h+'/chat-sdk.js',s.type='text/javascript',d.body.appendChild(s)}(window,document,'https://sdk.asapp.com','ASAPP')); 
</script> 
```

This snippet does two things:

1. Creates a `<script>` element that asynchronously downloads the `https://sdk.asapp.com/chat-sdk.js` JavaScript.
2. Creates a global `ASAPP` function that enables you to interact with [ASAPP's JavaScript API](/messaging-platform/integrations/web-sdk/web-javascript-api "Web JavaScript API").

If you're curious, feel free to view the [Full Snippet](#full-snippet "Full Snippet").

## 2. Initialize the SDK

After you [Embed the Script](#1-embed-the-script "1. Embed the Script") into the page, you can start using the [JavaScript API](/messaging-platform/integrations/web-sdk/web-javascript-api "Web JavaScript API") to initialize and display the application.

To initialize the ASAPP Chat SDK, call the `ASAPP('load')` method as seen below:

```
     <script> ASAPP('load', { 
     APIHostname: 'API_HOSTNAME', 
     AppId: 'APP_ID' 
}); 
</script> 
```

**Note:** The `APIHostname` and `AppId` values will be provided to you by ASAPP after coordination between your organization and your ASAPP Implementation Manager. Once these values have been determined and provided, you can make the following updates:

1. Replace `API_HOSTNAME` with the hostname of your ASAPP API location. This string will look something like

   ```screen
   'examplecompanyapi.asapp.com'.
   ```

2. Replace `APP_ID` with your Company Marker identifier. This string will look something like `'examplecompany'`.

Calling `ASAPP('load')` will make a network request to your APIHostname and determine whether or not it should display the Chat SDK Badge. The Badge will display based on your company's business hours, your trigger settings, and whether or not you have enabled the SDK in your Admin control panel.

For more advanced ways to display the ASAPP Chat SDK, see the [JavaScript API Documentation](/messaging-platform/integrations/web-sdk/web-javascript-api "Web JavaScript API").

## 3. Customize the SDK

After you  Embed the Script and Initialize the SDK, the ASAPP Chat SDK should display and function on your web page. You may wish to head to the [Customization](/messaging-platform/integrations/web-sdk/web-customization "Web Customization") section of the documentation to learn how to customize the appearance of the ASAPP Chat SDK.

## 4. Authenticate Users

Some integrations of the ASAPP Chat SDK allow users to access sensitive account information. If any of your use cases fall under this category, please read the [Authentication](/messaging-platform/integrations/web-sdk/web-authentication "Web Authentication") section to ensure your users experience a secure and seamless session.

## Full Snippet

For additional legibility, here's the full Chat SDK Web integration snippet:

```json
(function(win, doc, hostname, namespace, script) {
    script = doc.createElement('script');
    win[namespace] = win[namespace] || function() {
        (win[namespace]._ = win[namespace]._ || []).push(arguments)
    }
    win[namespace].Host = hostname;
    script.async = 1;
    script.src = hostname + '/chat-sdk.js';
    script.type = 'text/javascript';
    doc.body.appendChild(script);
})(window, document, 'https://sdk.asapp.com', 'ASAPP');
```


# WhatsApp Business
Source: https://docs.asapp.com/messaging-platform/integrations/whatsapp-business



WhatsApp Business is a service that enables your organization to communicate directly with your customers in WhatsApp through your Customer Service Platform (CSP), which in this case will be ASAPP.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-a8fc6036-09ca-5466-d058-e0276eec7922.png" />
</Frame>

## Quick Start Guide

1. Create a Business Manager (BM) Account with Meta
2. Create WhatsApp Business Accounts (WABA) in AI-Console
3. Modify Flows and Test
4. Create and Implement Entry Points
5. Determine Launch and Throttling Strategy

### Create a Business Manager (BM) Account

Before integrating with ASAPP's WhatsApp adapter, you must create a Business Manager (BM) account with Meta - visit [this page for account creation](https://www.facebook.com/business/help/1710077379203657?id=180505742745347).

Following account creation, Meta will also request you follow a [business verification](https://www.facebook.com/business/help/1095661473946872?id=180505742745347) process before proceeding.

### Create WhatsApp Business Accounts (WABAs)

Once a Business Manager account is created and verified, proceed to set up WhatsApp Business Accounts (WABAs) using Meta's embedded signup flow in AI-Console's **Messaging Channels** section.

<Note>
  Five total WABAs need to be created: three for lower environments, one for the demo (testing) environment and one for production. Your ASAPP account team can assist with creation of WABAs for lower environments if needed - please reach out with your teams to coordinate account creation.
</Note>

In this signup flow, you will set up an account name, time zone and payment method for the WABA and assign full control permissions to the `ASAPP (System User)`.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-3a15bf96-9209-4bd7-25cc-67e5ee695259.png" />
</Frame>

#### Register Phone Numbers

As part of the signup flow, each WABA must have at least one phone number assigned to it (multiple phone #s per WABA are supported). Before adding a number, you must also create a profile display name, **which must match the name of the Business Manager (BM) account.**

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-3d34fe68-0d11-0120-d9b2-4a95c1a9ad46.png" />
</Frame>

<Note>
  For implementation speed, ASAPP recommends using ASAPP-provisioned phone numbers for the three lower environment WABAs. Your ASAPP account team can guide you through this process.
  All provisioned phone numbers registered to WABAs need to meet [requirements specified by Meta](https://developers.facebook.com/docs/whatsapp/phone-numbers#pick-number).
</Note>

### Modify Flows and Test

The WhatsApp customer experience is distinct from ASAPP SDKs in several ways - some elements of the Virtual Agent are displayed differently while others are not supported. Your ASAPP account team will work with you to implement intent routing and flows to account for nodes with unsupported elements and to validate expected behaviors during testing before launch.

#### Buttons and Forms

All buttons with external links are displayed using message text with a link for each button. See below for an example of two buttons (**Hello, I open a link** and **Hello, I open a view**) that each render as a message with a link:

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-738af325-85a2-2ecd-3052-7770b9b5ab32.png" />
</Frame>

Similarly, forms sent by agents and feedback forms at the end of chat also send messages with links to a separate page to complete the survey. Once the survey is completed, users are redirected back to WhatsApp.

#### Quick Reply Limitations

Quick replies in WhatsApp also have different limitations from other ASAPP SDKs:

* Each node may only include up to three quick reply options; a node with more than three replies will be truncated and only the first three replies will be shown.
* Each quick reply may only include up to 20 characters; a quick reply with more than 20 characters will be truncated and only show the first 17 characters, followed by an ellipsis
* Sending a node that includes both a button in the message and quick replies is not recommended, as the links will be sent to the customer out of order

#### Authentication

The WhatsApp Cloud API currently **does not support authentication**. As such, login nodes should not be used in flows that can be reached by users on WhatsApp.

#### Attachments Cards

Nodes that include attachments, such as cards and carousels, are not supported in this channel.

<Note>
  In addition to differences in the Virtual Agent experience, the live chat experience with an agent also excludes some features that are typically supported:

  * **Images**: Agents will not be able to view images sent by customers. The same is true of voice messages and emojis, which are also part of the WhatsApp interface.
  * **Typing preview and indicators**: Agents will not see typing previews or indicators while the customer is typing. The customer will not see a typing indicator while the agent is typing.
  * **Co-browsing**: This capability is not currently supported in WhatsApp
</Note>

### Create and Implement Entry Points

Entry points are where your customers start conversations with your business. You have the option to embed a WhatsApp entry point into your websites in multiple ways: a clickable logo, text link, on-screen QR code, etc.

You can also direct to WhatsApp from social media pages or using Meta's Ads platform to provide an entry point. Ads are fully configurable within the Meta suite of products and will result in no costs incurred for conversations that originate via interactions with them.

<Note>
  ASAPP does not currently support [Chat Instead](/messaging-platform/integrations/chat-instead "Chat Instead") functionality for WhatsApp.
</Note>

### Determine Launch and Throttling Strategy

Depending on the entry points configured, your ASAPP account team will share launch best practices and throttling strategies.


# Virtual Agent
Source: https://docs.asapp.com/messaging-platform/virtual-agent

Learn how to use Virtual Agent to automate your customer interactions.

Virtual Agent is a set of automation tooling that enables you to automate your customer interactions and route them to the right agents when needed.

Virtual Agent provides a means for better understanding customer issues, offering self-service options, and connecting with live agents when necessary.

Virtual Agent can be deployed to your website or mobile app via our Chat SDKs, or directly to channels like Apple Messages for Businesses.

While you'll start off with a baseline set of [core dialog capabilities](#core-dialog "Core Dialog"), the Virtual Agent will require thoughful configuration to appropriately handle the use cases specific to your business.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-6fff0b03-48d7-8386-cb55-98c5317f9d2e.gif" />
</Frame>

## Customization

Virtual Agent is fully customizable to fit your brand's unique needs. This includes:

* Determing the list of Intents and how they are routed.
* Advanced flows to take in structured and unstructured input.
* Reach out to APIs to both receive and send data.

### Access

The Virtual Agent is configured through the AI-Console. To access AI-Console, log into [Insights Manager](/messaging-platform/insights-manager "Insights Manager"), click on your user icon, and then **Go to AI-Console**. This option will only be available if your organization has granted you permission to access AI-Console.

## How It Works

The Virtual Agent understands what customers say and transforms it into structured data that you can use to define how the Virtual Agent responds. This is accomplished via the following core concepts and components:

### Intents

Intents are the set of reasons that a customer might contact your business and are recognized by the Virtual Agent when the customer first reaches out.

The Virtual Agent can also understand when a user changes intent in the middle of a conversation (see: [digressions](#core-dialog "Core Dialog")).

Our teams can work with you to refine your intent list on an ongoing basis, and train the Virtual Agent to recognize them. Examples include requests to "Pay Bill" or "Reset Password".

Once an intent is recognized, it can be used to determine what happens next in the dialog.

### Intent Routes

Once an intent has been recognized, the next question is "so what?". Intent routes house the logic that determines what will happen after an intent has been recognized.

* Once a customer's intent is classified, the default behaviour is for the Virtual Agent to place the customer in an agent queue
* Alternatively, an intent route can be used to specify a pre-defined flow for the Virtual Agent to execute, which can be used to collect additional information, offer solutions, or link a customer out to self-serve elsewhere.
* To promote flexibility, intent routes can point to different flows based on conditional logic that uses contextual data, like customer channels.

<Card title="Intent Routing" href="/messaging-platform/virtual-agent/intent-routing">For a comprehensive breakdown of the intent list and routes, please refer to the Intent Routing Selection.</Card>

For a comprehensive breakdown of the intent list and routes, please refer to the [Intent Routing](/messaging-platform/virtual-agent/intent-routing "Intent Routing") section.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-b369a8e5-13a9-51fc-4c3e-566c3a983a31.jpg" />
</Frame>

### Flows

Flows define how the Virtual Agent interacts with the customer given a specific situation. They can be as simple as an answer to an FAQ, or as complex as a multi-turn dialog used to offer self-service recommendations. Flows are built through a series of [nodes](#flow-nodes "Flow Nodes") that dictate the flow of the conversation as well as any business logic it needs to perform. Once built, flows can be reached through [intent routing](#intent-routes "Intent Routes"), or redirected to from other flows.

<Card title="Flows" href="/messaging-platform/virtual-agent/flows">For more information on how flows are built, see our Flow Building Guide</Card>

### Core Dialog

While much of what the Virtual Agent does is customized in flows, some fundamental aspects are driven by the Virtual Agent's core dialog system. This system defines the behavior for:

* **Welcome experience**:
  The messages that are sent when a chat window is opened, or a first message is received.
* **Disambiguation**:
  How the Virtual Agent clarifies ambiguous or vague initial utterances.
* **Digressions**:
  How the Virtual Agent handles a new path of dialog when customer expresses a new intent.
* **Enqueuement & waiting**:
  How the Virtual Agent transitions customers to live chat, including enqueuement, wait time, & business hours messaging.
* **Post-live-chat experience**:
  What the Virtual Agent does when a customer concludes an interaction with a Live agent.
* **Error handling**:
  How the Virtual Agent handles API errors or unrecognized customer responses.

If you have any questions about these settings, please contact your ASAPP Team.

## Flow Nodes

Flows are built through a series of nodes that dictate the flow of the conversation as well as any business logic it needs to perform.

1. **Response Node**:
   The most basic function of a flow is to define how the Virtual Agent should converse with the customer.
   This is accomplished through response nodes which allow you to configure Virtual Agent responses, send deeplinks, and classify what customers say in return.
2. **Login Node**
   When building a flow, you may want to force users to login before proceeding to later nodes in a flow.
   This is accomplished by adding a login node to your flow that directs the customer to authenticate in order to proceed.
3. **API Node**
   If API integrations are available within the virtual agent, you are able to leverage those integrations to display data dynamically to customers and to route to different responses based on what is returned from an API.
   API nodes allow for the retrieval of data fields and the usage of that data within a flow.
4. **Redirect Node**
   Flows also have the ability to link to one another through the use of redirect notes.
   This is powerful in situations where the same series of dialog turns appear in multiple flows. Flow redirects allow you to manage those dialog turns in a single location that is referenced by many flows.
5. **Agent Node**
   In cases where the flow is unable to address the customer's concern on its own, an agent node is used to direct the customer to an agent queue.
   The data associated with this customer will be used to determine the live agent queue to put them in.
6. **End Node**
   When your flow has reached its conclusion, an end node wraps up the conversation by confirming whether the customer needs additional help.


# Attributes
Source: https://docs.asapp.com/messaging-platform/virtual-agent/attributes



ASAPP supports attributes that can be routed on to funnel customers to the right flow through [intent routing](/messaging-platform/virtual-agent/intent-routing "Intent Routing").

Attributes tell the virtual agent who the customer is. For example, they indicate if a customer is currently authenticated, which channel the customer is using to communicate with your business, or which services and products the customer is engaged with.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-d249579e-e1f8-163b-0cee-5c9354973281.jpg" />
</Frame>

## Attributes List

The Attributes List contains all the attributes available for intent routing. Here, you'll find the following information displayed in table format:

1. **Attribute name:** display name of the attribute
2. **Definition:** Indicates if the attribute is Standard or Custom. Standard attributes are natively supported by ASAPP. Custom attributes are added in accordance with your business requirements\*
3. **Type:** Indicates the value type of an attribute. There are two possible types: Boolean, or Value.
   a.  **Boolean:** A boolean attribute includes two values. For example: Yes/No, True/False, On/Off.
   b.  **Value:** A value attribute can include any number of values. For example: Market 1, Market 2, Market 3.
4. **Origin Key:** exact value that is passed from the company to ASAPP.

<tip>
  Contact your ASAPP team for more details on how to add a custom attribute.
</tip>

## Attribute Details

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-d4baac8e-2403-7517-0287-052634b85049.png" />
</Frame>

To view specific attribute details, click an **attribute name** to launch the details modal.

1. **Description:** Describes what the attribute is.
2. **Value ID:** Unique, non-editable key that is directly passed to ASAPP for that attribute (can be non-human readable).
3. **Value name:** Display name for the value to describe what the attribute value is. These value names are reflected in intent routing for ease of use.

Descriptions and value names can be edited. To modify these fields, make your changes and click **Save**. On click, changes will be automatically saved, and changes take effect immediately.

<Note>
  There is no support for versioning or adding new attributes and/or values at this time, please contact your ASAPP team for support in this area.
</Note>


# Best Practices
Source: https://docs.asapp.com/messaging-platform/virtual-agent/best-practices



## Designing your Virtual Agent

### 1. Focus on Customer Problems

The most important thing to keep in mind when designing a good flow is whether it is likely to resolve the intent for most of your customers. It can be easy to diverge from this strategy (perhaps because a flow is designed with containment top of mind; perhaps because of inherent business process limitations). But it's the best way you can truly allow customers to self-serve.

### (a) Understanding the Intent

Since flows are invoked when ASAPP classifies an intent, understanding the intent in question is key to successfully designing a flow. The best way to do this is to review recent utterances that have been classified to the intent and categorizing them into more nuanced use cases that your flow must address. This will ensure that the flow you design is complete in its coverage given how customers will enter the flow.

These utterances are accessible through ASAPP Historical Reporting, in the First Utterance table.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-a89adeb3-7316-62c2-c885-910d111a7d8a.png" />
</Frame>

### (b) Ongoing Refinement

Every flow you build can be thought of as a hypothesis for how to effectively understand and respond to your customers in a given scenario. Your ability to refine those hypotheses over time--and test new ones--is key to managing a truly effective virtual agent program that meets your customers needs.

We recommend performing the following steps on a regular basis--at least monthly--to identify opportunities for flow refinement, and improve effectiveness over time.

#### Step 1: Identify opportunity areas in particular flows

1. **Flows with relatively high containment, but a low success rate:** This indicates that customers are dropping out of the flow before they receive useful information.
2. **Flows with the highest negative EndSRS rates:** This indicates that the flow did not meet the customer's needs.

#### Step 2: Determine Likely Causes for Flow Underperformance, Identify Remedies

Once you've identified problematic flows, the next step is to determine why they are under-performing. In most cases you'll quickly identify at least one of the following issues with your flow by reviewing transcripts of issueIDs from Conversation Manager in Insights Manager:

**1. General unhelpfulness or imprecise responses**

Oftentimes flows break down when the virtual agent responds confidently in a manner that is on-topic but completely misses the customers' point. A common example is customers reaching out about a difficulty to log in, only to be sent to the same "forgot your password" experience they were experiencing issues with in the first place. Issues of this type typically receive a negative EndSRS score from the customer, who doesn't believe their problem has been solved.

The key to increase the performance of these flows is to configure the virtual agent to ask further, more specific questions before jumping to conclusions. Following the example above, you could ask "Have you tried resetting your password yet?". Including this question can go a long way to ensure that the customer receives the support they're looking for.

**2. Unrecognized customer responses**

This happens when the customer says or wants to say something that the virtual agent is unable to understand.

In free-text channels, this will result in classification errors where the virtual agent has re-prompted the customer to no avail, or has incorrectly attempted to digress to another intent. You can identify these issues by searching for re-prompt language in transcripts where customers have escalated to an agent from the flow in question. Looking at the customers' problematic response, you can determine how best to improve your flow. If customers' response is reasonable given the prompt, you can introduce a new response route in the flow and train it to understand what the customer is saying. Even if it's a path of dialog you don't want the virtual agent to pursue, it's better for the virtual agent to acknowledge what they said and redirect rather than failing to understand entirely.

**Don't:**

* "Which option would you prefer?"
* "Let's do both"
* "Sorry I didn't understand that. Could you try again?"

**Do:**

* "Which option would you prefer?"
* "Let's do both"
* "Sorry, but we can only accommodate one. Do you have a preference?"

Another option for avoiding unrecognized customer responses in free-text channels, is to rephrase the prompt in a manner that reduces the number of ways that a customer is likely to respond. This is often the best approach in cases where the virtual agent prompt is vague or open-ended.

**Don't:**

* "What issue are you having with your internet?"
* "I think maybe my router is broken"
* "Sorry I didn't understand that. Could you try again?"

**Do:**

* "Is your internet slow, or is it completely down?"
* "It's completely down"

In SDK channels (web or mobile apps), which are driven by quick replies, the concern here is to ensure that customers have the opportunity to respond in the way that makes sense given their situation. A common example failing to provide an "I'm not sure" quick reply option when asking a "yes or no" question. Faced with this situation, customers will often click on "new question" or abandon the chat entirely, leaving very little signal on what they intended. The best way to improve quick reply coverage is to maintain a clear understanding of the different contexts in which a customer might enter the flow---how they conceive of their issue, what information they might or might not have going in, etc. Gaining this perspective is helped greatly by reviewing live chat interactions that relate to the flow in question, and determining whether your flow could have accommodated the customer's situation.

**3. Incorrect classification**

This issue is unique to free-text use cases and happens when the virtual agent thinks the customer said one thing, when in fact the customer meant something else. One example would be a response like "no idea" being misclassified as "no" rather than the expected "I'm not sure."

Another example might be a response triggering a digression (i.e., a change of intent in the middle of a conversation), rather than an expected trained response route. This can happen in flows where you've trained response routes to help clarify a customer's issue but their response sounds like an intent and thus triggers a digression instead of the response route you intended. For example:

```
"I need help with a refund"
"No problem. What is the reason for the refund?"
"My flight got cancelled"
"Are you trying to rebook travel due to a cancelled flight?"\<\< Digression
"No, I'm asking about a refund"
```

While these issues tend to occur infrequently, when you do encounter them, the best place to start is revising the prompt to encourage responses that are less likely to be classified incorrectly. For example, instead of asking an open-ended question like "What is the reason for your refund?"---to which a customer response is very likely to sound like an intent---you can ask directly ("Was your flight cancelled?") or ask for more concrete information from which you can infer the answer ("No problem! What's the confirmation number?").

Alternatively, you can solve issues of incorrect classification by training a specific response route that targets the exact language that is proving problematic. In the case of the unclear "I'm not sure" route, a response route that's trained explicitly to recognize "no idea" might perform better than one that is broadly trained to recognize the long tail of phrases that more or less mean "I'm not sure." In this case, you can point the response route to the same node as your generic "I'm not sure" route to resolve the issue.

**4. Too much friction**

Another cause for underperformance is too much friction in a particular flow. This happens when the virtual agent is asking a lot of the customer.

One type of friction is authentication. Customers don't always remember their specific login or PINs, so authentication requests should be used only when needed. If customers are asked to find their authentication information unnecessarily, many will oftentimes abandon the chat.

Another type of friction is repetitive or redundant steps--particularly around disambiguating the customer. While it's helpful to clarify what a customer wants to do to adequately solve their need, repetitive questions that don't feel like they are progressing the customer forward often lead to a feeling of frustration--and abandonment.

#### Step 3: Version, improve, and track the impact of flow changes

Once you've identified an issue with a specific flow, create a new version of it in AI-Console with one of the remedies outlined above. After you have implemented a new version, you can save and release the new version to a lower environment to test it, and subsequently to production. Then, track the impact in Historical Reporting in Insights Manager by looking at the Flow Success Rate for such flow on the Business Flow Details tab of the Flow Dashboard.

### 2. Know your Channels

Messaging channels have advantages and limitations. Appreciating the differences will help you optimize virtual agents for the channels they live on, and avoid channel-specific pitfalls.

To illustrate this, look at a single flow rendered in Apple Messages for Business vs the ASAPP SDK:

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-1292d466-63c5-f625-2003-effbc90135a4.jpg" />
</Frame>

<Note>
  The ASAPP SDK has quick replies, while Apple Messages for Business supports list pickers.
</Note>

#### (a) General rules of thumb

* Be aware of each channel's strengths and limitations and optimize accordingly--these are described below.
* Pay particular attention to potentially confusing interface states, and compensate by being explicit about how you expect customers to interact with a flow (e.g., "Choose an option below ...")
* Be sure to test the flow on the device/channel it is deployed to in a lower environment.

#### (b) Channel-specific considerations

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-c2c43557-dc9f-4bed-0af4-634b9d0a2a63.png" />
</Frame>

##### ASAPP SDK

The ASAPP SDKs (Web, Android, and iOS) have a number of features that help to build rich virtual agent experiences.

Strengths of SDKs:

1. Quick Replies - surface explicit text options to a customer to tap/click on, and route to the next part of a flow.
2. Authentication / context - with the authentication of customers, the SDK allows for a persistent chat history which provides seamless continuity. Additionally, authentication allows for the direct calling of APIs (e.g. retrieving a bill amount).

Limitations:

* Not as sticky of an experience (i.e. it's not an application the customer has top of mind/high visibility), so the customer may abandon the chat. One cause for this is the lack of guaranteed push notifications -- particularly in the Web SDK.

How to optimize for ASAPP SDKs:

* We encourage you to build more complicated, multi-step flows, leveraging quick replies that keep customers on the rails.

### 3. Promote Function over Form

First and foremost, your virtual agent needs to be effective at facilitating dialog. It may be tempting to prioritize focus on virtual agent tone and voice but that can ultimately detract from virtual agent's functional purpose. Next we'll offer examples that illustrate effective or ineffective dialogs that will help you when building out your flows.

#### (a) It's OK to sound Bot-like

The virtual agent **is** a bot, and it primarily serves a functional purpose. It is much better to be explicit with customers and move the conversation forward, rather than making potential UX sacrifices to sound friendly or human-like. Customers are coming to a virtual agent to solve a specific problem efficiently. Here is a positive example of a greeting that, while bot-like, is clear and effective:

```
"Hello! How can I help you today? Choose from a topic below or type a specific question."
```

#### (b) Tell People How to Interact

Customers interact with virtual agents to solve a problem and/or to achieve something. They benefit from explicit guidance with how they are supposed to interact with the virtual agent. If your flow design expects the customer to do something, tell them upfront. Here is a positive example of clear instructions telling a customer how to interact with the virtual agent:

```
"Please choose an option below so we can best help"
```

#### (c) Set Clear Expectations for Redirects

The virtual agent can't always handle a customer's issue. When you need to redirect the customer to self-serve on a website, or even on a phone number, set clear expectations for what they need to do next. You never want a customer to feel abandoned. Here are two positive examples of very clear instructions about what the customer will need to do next, and what they can expect:

```
"To process your payment and complete your request, you'll need to call us at 1-800-555-5555. **Agents are available** from 8am to 9pm ET, Monday through Friday"
"You can check the status of your order on website by either **entering your order number** or **logging in**".
```

#### (d) Acknowledge Progress & Justify Steps

Think of a bot like a standard interaction funnel -- a customer has to go through multiple steps to achieve an outcome. Acknowledging progress made and justifying steps to the customer makes for a better user experience, and makes it more like for the customer to complete all of the steps (think of a breadcrumb in a checkout flow). The customer should have a sense of where they are in the process. Here's a simple example of orienting a customer to where they are in a process:

```
"We're happy to help answer questions about your bill, but will need you to sign in so we can access your account information."
```

#### (e) Be careful with Personification

Over-personifying your virtual agent can make for a frustrating customer experience:

* **Do** frame language in a more impersonal "we"
* **Don't** make the virtual agent "I"
* **Do** frame the virtual agent as a representative for your company.
* **Don't** give your virtual agent a name / distinct personality.
* **Do** give your virtual agent a warm, action-oriented tone.
* **Don't** give your virtual agent an overly friendly, text-heavy tone.
* **Do** "Great! We can help you pay your bill now. What payment method would you like to use?"
* **Don't** "Great, thank you so much for clarifying that! I am so happy to help you with your bill today."

#### (f) Affirm What Customers Say, Not What the Flow Does

Affirmations help customers feel heard, and they help customers understand what the virtual agent is taking away from their responses. When drafting a virtual agent response, ensure that you match the copy to the variety of customer responses that may precede it -- historical customer responses can be viewed in the utterance table in historical reporting.

If there is a broad set reasons for a customer to end up on a node or a flow, your affirmation should likewise be broad:

* **Do** "We can help with that"
* **Do** "We can help you with your bill"
* **Don't** "We can help you pay your bill online"

Similarly, if there is a narrow set of reasons for a customer to end up in a node or a flow, your affirmation should likewise be narrow. Even then, it's important to not phrase things in such a way that you're putting words in the mouth of the customer, so they don't feel frustrated by the virtual agent.

* **Do** "To set up autopay ..."
* **Don't** "It sounds like you want to set up autopay"
* **Don't** "Okay, so autopay"

In some cases where writing a good affirmation feels particularly tricky, feel free to err on the side of not having one. It's all good so long as the virtual agent responds in an expected manner given what the customer just said.

### 4. Reduce Friction

If interacting with your virtual agent is confusing or hard, people will revert to tried and true escalation pathways like shouting "agent" or just calling in. As you are designing flows, be mindful about the following friction points you could potentially introduce in your flows.

#### (a) Be Judicious with Deep Links

Deep links are used when you link a customer out of chat to self-serve. It is tempting to leverage existing web pages, and to create dozens of flows that are simple link outs. But this often does not provide a good customer experience.

A virtual agent that is mostly single step deep links will feel like a frustrating search engine. Wherever possible, try to solve a customer's problem conversationally within the chat itself. Don't rely on links as a default.

But, when you **do** rely on a deep link, make sure to:

1. Validate the link actually solves the customers intent and is accessible to all customers (e.g. not behind an authentication wall, or only accessible to certain types of customers).
2. Leverage native app links where possible.
3. Be clear about what the customer needs to do when they go to the link and leave the chat experience.

#### (b) Avoid All-or-Nothing Flow Requirements

Be careful with "all or nothing" requirements in a flow; if you want a customer to sign in to allow you to access an API, that's great, but give customers an alternative option at that moment too. Some customers might not remember their password.

When you are at a point in a flow where there is a required step or just one direction a customer can go, think about what alternative answer there could be for a customer. If you don't, those customers might just abandon the virtual agent at that point.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-1faaf89d-b0f3-5849-3819-f1d713cc91d7.jpg" />
</Frame>

### 5. Anticipate Failure

It's tempting to design with the happy path in mind, but customers don't always go down the flow you expect. Anticipate the failure points in a virtual agent, and design for them explicitly.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-becca11d-1103-3bc9-0136-314e9c37e768.png" />
</Frame>

#### (a) Explicit Design for Error Cases

Always imagine something will go wrong when asking the customer to do something:

* When asking customer to complete something manually, give them a response route or a quick reply that allows them to acknowledge it's not working (e.g. the speed test isn't working).
* When asking the customer to self-serve on a web page or in chat: allow them to go down a path in case that doesn't work (e.g. login isn't working).
* When designing flows that involve self-service through APIs: explicitly design for what happens when the API doesn't work.

#### (b) Consider Free Text Errors

In channels where free text is always enabled (i.e.. AMB, SMS), the customer input may not be recognized. We recommend writing language that guides the customer to explicitly understand the types of answers we're expecting. Leverage "else" conditions in your flows (on Response Nodes).

**Don't:**

* "What issue are you having with your internet?"
* "I think maybe my router is broken"
* "Sorry I didn't understand that. Could you try again?"
  **Do:**
* "Is your internet slow, or is it completely down?"
* "I think maybe my router is broken"
* "Sorry I didn't understand that. Is your internet slower than usual, or is your internet completely off?"

## Measuring Virtual Agents

### 1. Flow Success

Containment is a measure of whether a customer was prevented from escalating to an agent; it is the predominant measure in the industry for chatbot effectiveness. ASAPP, however, layers a more stringent definition called "Flow success," which indicates whether or not a customer was actually helped by the virtual agent.

### Important

When you are designing a new flow or modifying an existing flow, be sure to enable flow success when you have provided useful information to the customer.

"Flow success" is defined as when a customer arrives at a screen or receives a response that:

1. Provides useful information addressing the recognized intent of the inquiry.
2. Confirms a completed transaction in a back-end system.
3. Acknowledges the customer has resolved an issue successfully.

With flow success, chronology matters. If a customer starts a flow, and is presented with insightful information (i.e. success), but then escalates to an agent in the middle of a flow (i.e. negation of success), that issue will be recorded as not successful.

### How It Works

Flow success is an event that can be emitted on a [node](/messaging-platform/virtual-agent/flows#node-types "Node Types").

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-13212102-24e9-2e15-aef8-86c92ff5f2a5.jpg" />
</Frame>

It is incumbent on the author of a flow to define which steps in the flow they design could be considered successful.

Default settings:

* **Response Nodes:** When flow reporting status is **on**, the **success** option will be chosen by default.
* **Agent Node:** When flow reporting status is **on**, the **failure** option will be chosen.
* **End & Redirect:** Flow success is not available in the tooling. By default, the End Node question will emit or not emit flow success depending on the customer response.

### 2. Assessing a Flow's Performance

You're able to track your flows' performance on the "Automation Success" report in historical reporting. There you can assess containment metrics and flow success which will help you determine whether a flow is performing according to expectations.

## Tactical Flow Creation Guide

### 1. Naming Nodes

Flows are composed of different node types, which represent a particular state/act of a given flow. When you create a flow, you create a number of different nodes.

We recommend naming nodes to describe what the node accomplishes in a flow. Clear node names will make the data more readable going forward. Here are some best practices to keep in mind:

* Response node (no prompt): name is by the content (e.g. "NoBalanceMessage")
* Response node (with prompt): name by the request (e.g. "RequestSeatPreferences")
* Any node that takes an action of some sort should start with the action being taken and end with what is being acted upon (e.g. "ResetModem")

### 2. Training Response Routes

When you create a Response Node that is expected to classify free text customer input (e.g. "Would you like a one way flight or a round trip flight?"), you need to supply training utterances to train a response route. There are some best practices you should keep in mind:

* Be explicit where possible.
* Vary your language.
* More training utterances is almost always better.
* Keep neighboring routes in mind -- what are the different types of answers you will be training, and how will the responses differ between them?

### 3. Designing Disambiguation

Sometimes customers initiate conversations with vague utterances like "Help with bill" or "Account issues." In these cases the virtual agent understands enough to classify the customer's intent, but not enough to immediately solve their problem.

In these cases, you are able to design a flow that asks follow-up questions to disambiguate the customer's particular need. Based on the customer's response you can redirect them to more granular intents where they can better be helped.

Designing effective disambiguation starts with reviewing historical conversations to get a sense of what types of issues customer's are having related to the vague intent. Once you've determined these, you'll want to optimize your prompt and response routes for the channel your designing for:

#### (a) ASAPP SDKs

These channels are driven by quick replies only, meaning that the customer can only choose an option that is provided by the virtual agent. Here, the prompt matters less than the response branches / quick replies you write. Just make sure they map to things a customer would say---even if multiple response routes lead to the same place. For example:

```
We're happy to help! Please choose an option below:
-   Billing history
-   Billing complaint
-   Billing question
-   Something else
```

#### (b) Free-Text Channels, with Optional Quick Replies (Post-iOS 15 AMB)

These channels offer quick replies, but do not prevent customers from responding with free text. The key here is optimizing your question to increase the likelihood that customers choose a quick reply.

```
We're happy to help! Please tap on one of the options below:
-   Billing history
-   Billing complaint
-   Billing question
-   Something else
```

#### (c) Free-Text-Only Channels (Pre iOS 15 AMB, SMS )

These channels are often the most challenging, as the customer could respond in any number of ways, and given the minimal context of the conversation it's challenging to train the virtual agent to adequately understand all of them. Similar to other channels, the objective is to prompt in a manner that limits how customers are likely to respond. The simplest approach here is to list out options as part of your prompt:

```
Please tell us more about your billing needs. You can say things like "Billing history" "Question" "Complaint" or "Something else"
```

### 4. Message Length

Keep messages to be short and to the point. Walls of text can be intimidating. Never allow an individual message to exceed 400 characters (or, even less if there are spaces)..

An example of something to avoid:

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-d7b8258c-b614-ff7a-ad5a-f94c488d6a9d.jpg" />
</Frame>

### 5. Quick Replies

Quick Replies should be short and to the point. Some things to keep in mind when writing Quick Replies:

* Avoid punctuation
* Use sentence case capitalization, unless you're referring to a specific product or feature.
* Keep to at least two and up to five quick replies per node.
  * While this is generally best practice, it is required for Quick Replies in Apple Messages for Business.
  * If there are more than 3 Quick Replies, the list will be truncated to the first 3 in WhatsApp Business
* External channels have character limits and any Quick Replies longer than these limits will be truncated:
  * Apple Messages for Business: 24 characters maximum
  * WhatsApp Business: 20 characters maximum


# Flows
Source: https://docs.asapp.com/messaging-platform/virtual-agent/flows

Learn how to build flows to define how the virtual agent interacts with the customer.

Flows define how the virtual agent interacts with the customer. They can be as simple as an answer to an FAQ, or as complex as a multi-turn dialog used to offer self-service recommendations.

Flows are built through a series of [nodes](getting-started#flow-nodes "Flow Nodes") that dictate the flow of the conversation as well as any business logic it needs to perform. Once built, flows can be reached from intents, or redirected to from other flows.

## Flows List

In the flows page, you will find a list of existing flows for your business. The following information displays in table format:

* **Flow Name**
  A unique flow name, with letters and numbers only.
* **Flow Description**
  A brief description that describes the objective of the flow.
* **Traffic from Intent**
  Intents can be routed to specific flows through [intent routing](/messaging-platform/virtual-agent/intent-routing "Intent Routing"). In this column, you will see which intents route to the respective flow.
  You can click the intent to navigate to the specific [intent routing detail page](/messaging-platform/virtual-agent/intent-routing#intent-routing-detail-page "Intent Routing Detail Page") to view routing behavior details.
* **Traffic from Redirect**
  Flows have the ability to link to one another through the use of [redirect nodes](#redirect-node "Redirect Node"). In this column, you will be able to see which existing flows redirect to the respective flow. You can click the flow to navigate to the specific [flow builder page](#flow-builder "Flow Builder") to view flow details.

## Flow Builder

The flow builder consists of three major parts:

1. Flow Graph
2. Node Configuration Panel
3. Toolbar

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-2e31ab13-f4ee-ceee-c22a-f245d0af9f7c.jpg" />
</Frame>

### Flow Graph

The Flow Graph is a visual representation of the conversation flow you're designing, and displays all possible paths of dialog as you create them.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-61217916-747e-69d4-fc86-34b2e2708503.jpg" />
</Frame>

#### Select Nodes

Each node in the graph can be selected by clicking anywhere on the node. Upon selection, the node configuration panel will automatically expand on the right.

#### Flow Graph Zoom

You can zoom in on particular parts of the flow by using the zoom percentage bar at the bottom right or using your computer trackpad or mouse.

### Node Configuration Panel

The node configuration panel allows you to manage settings and configure routing rules for the following [node types](#node-types "Node Types"):

* [Response Node](#node-types "Node Types"): configure virtual agent responses, send deeplinks, and classify what customers say in return.
* [Login Node](#login-node "Login Node"): direct the customer to authenticate before proceeding in the flow.
* [Redirect Node](#redirect-node "Redirect Node"): redirect customer to another flow.
* [Agent Node](#agent-node "Agent Node"): direct the customer to an agent queue.
* [End Node](#end-node "End Node"): wrap up the conversation by confirming whether the customer needs additional help.
* [API Node](#api-node): use API fields dynamically in your flows.

### Toolbar

The toolbar displays the flow name and allows to you perform a number of different functions:

1. [Version Dropdown:](#navigate-flow-versions "Navigate Flow Versions") view and toggle through multiple versions of the flow.
2. [Version Indicators](#version-indicators "Version Indicators"): keep track of flow version deployment to Test or Production environments
3. [Manage Versions](#manage-versions "Manage Versions"): manage flow version deployment to Test or Production environments
4. [Preview](#preview-flow "Preview Flow"): click to preview your current flow version in real-time
5. More Actions:
   * Copy link to test: Navigate to your demo environment to test a flow.
   * Flow Settings: View flow information such as name, description, and flow shortcut.

Learn more: [Save, Deploy, and Test](#save-new-flow "Save New Flow")

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-9948b1a1-3bf0-5c6c-b7b4-b5108a168b53.jpg" />
</Frame>

## Node Types

### Response Node

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/messaging-platform/NodeResponse.png" />
</Frame>

The **Response** node allows you to configure virtual agent responses, send deeplinks, and classify what customers say in return. It consists of three sections:

1. **Content**
2. **Routing**
3. **Advanced Settings**

### Content

The **Content** section allows you to specify the responses and deeplinks that will be sent to the customer. You can add as many of either as you like by clicking **Add Content** and selecting from the menu.

Once added, this content can be easily reordered by dragging, or deleted by hovering over the content block and clicking the trash icon. In the flow graph, you will be able to preview how the content will be displayed to the customer.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-14590ffb-dd26-1a48-5ebe-05db63fb8363.jpg" />
</Frame>

#### Responses

Any response text you specify will be sent to the customer when they reach the node.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-84c5c765-de30-25c9-c32b-5de3ab523672.jpg" />
</Frame>

#### Deeplinks

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-38b352a6-f2d5-0ae0-d93d-c5ae1d9e923d.jpg" />
</Frame>

After selecting **Deeplink** from the **Add Content** menu, the following additional fields will appear:

* **Link to**: select an existing link from the dropdown or directly [create a new link](/messaging-platform/virtual-agent/links#create-a-link "Create a Link").
  If you select an existing link, you can click **View link definition** to open the specific [link details](/messaging-platform/virtual-agent/links#edit-a-link "Edit a Link") in a new tab.
* **Call to action**: define the accompanying text that the customer will click on in order to navigate to the link.
* **Hide button after new message**: choose to remove the deeplink after a new response appears to prevent users from navigating to the link past this node.

### Routing

The **Routing** section is where you will configure what happens after the content is sent.

You have two options:

* **Jump to node**
  Choosing to **Jump to node** allows you to define a default routing rule that will execute immediately after the node content has been delivered to the user.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-f74dc1d8-2dee-eee0-bea5-c75cd13dcb06.jpg" />
</Frame>

* **Wait for response**

  Choosing to **Wait for response** means that the virtual agent will pause until the customer responds, then attempt to classify their response and branch accordingly. When this option is selected, you'll need to specify the branches and [quick reply text](#quick-replies "Quick Replies") for each type of response you wish the virtual agent to classify. See [Branch Classifiers](#branch-classifiers "Branch Classifiers") section for more detailed information.

  <Frame>
    <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-de9b034a-8962-3900-0949-21b147a981f7.jpg" />
  </Frame>

Flows cannot end on a response node. To appropriately end a flow after a response node, please route to an [End node](#end-node "End Node").

#### Branch Classifiers

When **Wait for response** is selected for routing, you can define the branches for each type of response you wish the virtual agent to classify.

There are two types of branch classifiers that you can use:

* **System classifiers**
  ASAPP supports pre-trained system templates to classify free text user input. You can use branches like `CONFIRM` or `DENY` that are already trained by our system and are readily available for use for polar (yes/no) questions. You do not need to supply training utterances for system classifiers.

  <Frame>
    <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-c020323d-4882-3db7-a342-d892c0cdbf46.png" />
  </Frame>

* **Custom classifiers**
  If pre-trained classifiers do not meet your needs, define your own custom branches and supply training utterances. You must give your branch classifier a **Display Name** and supply at least five training utterances to train this custom classification. Learn more about how to best train your custom branches in the [Training response route](/messaging-platform/virtual-agent/best-practices#2-training-response-routes "2. Training Response Routes") section.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-1cff1b12-002a-49ee-254d-1a0a13a0faa2.gif" />
</Frame>

#### Quick Replies

For each branch classifier, you should define the corresponding **Quick Reply text**. These will appear in our SDKs (web, mobile) and third-party channels as tapable options.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-f4cd3e23-d37a-355f-7005-60d313f6f8ac.png" />
</Frame>

### Advanced Settings

In the **Advanced Settings** section, you can set flow success reporting for the response node.

#### Flow Success

Flow success attempts to accurately measure whether a customer has successfully self-served through the virtual agent. You measure this by setting the appropriate flow reporting status on certain nodes within a flow. Learn more: [How do I determine flow success?](/messaging-platform/virtual-agent/best-practices#measuring-virtual-agents "Measuring Virtual Agents")

To set flow reporting status for response nodes:

1. Toggle **Set flow reporting status** on.
2. By default, **Success** is selected for response nodes but this can be modified for your particular flow.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-0f71f580-39ab-009d-9a6a-8fcc3dffbd8d.jpg" />
</Frame>

### Login Node

The **Login Node** enables customer authentication within a flow. In this node, you can define the following:

* **Content**
* **Routing**
* **Advanced Settings**

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-d6a3bc59-4453-bb6d-5eb7-3ad75343e33f.jpg" />
</Frame>

#### Content

The **Content** section allows you to define the text to be shown to the customer to accompany the login action. All login nodes will have default text which you can modify to suit your particular flow needs.

* **Message text**: Define the main text that will prompt the customer to login
* **Call to action**: Define the accompanying text that the customer will click on in order to login
* **Text sent to indicate that a login is in process**: customize the text that is sent after the customer has tried to log in.

In the flow graph, you can preview how the content will be displayed to the customer.

#### Routing

Flows cannot end on a login node. The **Routing** section is where you can configure what happens after a customer successfully logs in or optionally configure branches for exceptional conditions.

##### On login

In the **On login** section, you must define the default routing rule that will execute after the customer successfully logs in.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-4f888e5e-6173-307c-8153-6e6267fad35e.png" />
</Frame>

##### On response

Similar to response nodes, you can optionally add response branches in the **On response** section to account for exceptional conditions that may occur when a customer is trying to authenticate, such as login errors or retries and refreshes.

Please see [Branch Classifiers](#branch-classifiers "Branch Classifiers") on the response node for more information on how to configure these routing rules.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-dd1d24fc-c9d3-eb94-551f-0f484dfdfc7a.png" />
</Frame>

##### Else

In the **Else** section, you can define what happens if login is unsuccessful and we do not recognize customer responses.

#### Advanced Settings

In **Advanced Settings**, you have the option to **Force reauthentication** which will prompt all customers to log in again, regardless of current authentication state.

### API Node

The API node allows you to use API fields dynamically in your flows. The data you retrieve on an API node can be used for two things:

1. **Displaying the data** on subsequent nodes.
2. **Routing to different nodes** based on the data.

#### Data Request

The **Data Request** section allows you to add data fields from an existing API integration.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-1afa3ec6-da35-0ba0-403d-abcd778b2055.png" />
</Frame>

Select **Add data fields** to choose objects from existing integrations, which will allow you to add collections of data fields to the node. There is a search bar that allows you to easily search through the available fields.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-6bd04609-3365-b170-5abd-10e137481de3.png" />
</Frame>

After you select objects, all of the referenced fields will automatically populate in the API node.

In addition to objects and arrays, you can request actions.

<Note>
  You can only select one action per node; selecting an action will automatically disable the selection of additional objects, actions, and arrays.
</Note>

#### Input Parameters

Some actions require input parameters for the API call, which you can define in AI-Console. In the node edit panel, you can see a field for defining parameters that will be passed as part of the API call. This field leverages curly brackets: click the **curly bracket** icon or select the **shift>\{** or **}** keys to choose the API value to pass as an input parameter.

<Note>
  Only valid data can be used for input parameters; objects or arrays will not be surfaced through curly brackets.
</Note>

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-02e0a722-3e1c-4c35-bffd-3c9a83368472.png" />
</Frame>

#### Displaying Data

You are easily able to display API fields from an API node in subsequent response nodes. This field leverages curly brackets: click the **curly bracket** icon or select the **shift>\{** or **}** keys in the Response Node Content section to choose API values to display, which will render as a dynamic API field in the flow graph.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-269410d7-d017-6c4b-df6f-f4a8ec743a8f.png" />
</Frame>

When you click on the API field itself, data format options appear that will allow you to specify exactly what format to display to the end user.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-e456368d-92a6-a6ee-0df0-6df089265ac0.png" />
</Frame>

#### Routing to Different Nodes

Routing and data operators allow you to specify different flow branching based on what is returned from an API. This leverages the same framework as routing on other nodes, but provides additional functionality around operators to give you flexibility in configuring routing conditions.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-859bd96a-74c6-3435-abfd-d39baf90ffa0.png" />
</Frame>

Operators allow you to contextually define conditions to route on.

#### Error Handling

API nodes provide default error handling, but you are able to create custom error handling on the node itself if desired. You can specify where a user should be directed in the event of an error with the API call.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-9bbe352a-b20c-b737-ee22-76aa11d6bc6e.png" />
</Frame>

#### API Library

API fields are available under the integrations menu. In this page, you can view and search through all available objects and associated data fields.

### Redirect Node

The **Redirect Node** serves to link flows with one another by directing the customer to a separate flow. A Redirect Node does not display content to the customer.

In this node, you can define the following:

* **Destination**
* **Routing**
* **Advanced Settings**

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-7cd585e4-f3dc-f4f5-7f0d-959444c1e7d7.jpg" />
</Frame>

#### Destination

The **Destination** section allows you to define where to redirect the customer. You can redirect to an existing **flow** or an **intent**.

* Select **Flow** to redirect to an individual flow destination.
* Select **Intent** to redirect the customer to solve for a broader issue intent that may route them to different flows depending on the [intent routing rules](/messaging-platform/virtual-agent/intent-routing "Intent Routing").

Depending on the option you select, you will be able to select the destination flow or intent from the dropdown.

#### Routing (Return Upon Completion)

Redirect nodes can end your flow or you can choose to have the customer return your flow after the destination flow has completed. To do so, toggle on **Return upon completion**. After doing so, you can define the default routing rule that will execute upon customer return.

### Agent Node

The **Agent Node** enables you to direct the customer to an agent queue in order to help resolve their issue. The data associated with this customer will be used to determine the live agent queue to put them in.

#### Advanced Settings

In the Advanced Settings section, you can set flow success reporting for the agent node.

##### Flow Success

Flow success attempts to accurately measure whether a customer has successfully self-served through the virtual agent. This is measured by setting the appropriate flow reporting status on certain nodes within a flow. Learn more: [How do I determine flow success?](/messaging-platform/virtual-agent/best-practices#measuring-virtual-agents "Measuring Virtual Agents")

For agent nodes, this is always considered a failure.

To set flow reporting status for agent nodes:

1. Toggle **Set flow reporting status** on.
2. By default, **Failure** will be selected for agent nodes

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-59f2fa3b-2f13-9a04-9e50-9145adfe99ff.jpg" />
</Frame>

### End Node

The **End Node** wraps up the conversation by confirming whether the customer needs additional help.

#### Advanced Settings

In the **Advanced Settings** section, you can select the end Semantic Response Score (SRS) options (see below) for your flow.

By default, all three options will be selected when an end node is added, thus presenting all three options for the customer to select from. You can expand the section to modify these options to present to the customer.

##### End SRS Options

At the end of a flow, the virtual agent will ask the customer: "Is there anything else we can help you with today?"\*

After the above message is sent, there are three options available for the customer to select from:

* **"Thanks, I'm all set"**
  A customer selecting this **positive** option will prompt the virtual agent to wrap up and resolve the issue.
* **"I have another question"**
  A customer selecting this **neutral** option will prompt the virtual agent to ask the customer what their question is.
* **"My question has not been answered"**
  A customer selecting this **negative** option will prompt the virtual agent to escalate the customer into agent chat to help resolve their issue.
  \*Exact end SRS options and text may vary. Please contact your ASAPP team for more details.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-015c83bb-4604-d342-9502-495ecdfe6b53.jpg" />
</Frame>

## Quick Start: Flows

### Create Flow

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-23846669-6400-d259-9dd6-c05a934628c4.png" />
</Frame>

Click **Create** to trigger a dialog for creating a new flow. The following data must be provided:

* **Name:** Give a unique name for your flow, using letters and numbers only.
* **Description:** Give a brief description of the purpose of the flow.

<Tip>
  Avoid vague flow names. Using clear names & descriptions allow others to quickly distinguish the purpose of your flow. We recommend following an "Objective +**Topic**" naming convention, such as: Find **Food** or Pay **Bill**.
</Tip>

Click **Next** to go to the flow builder where you will design and build your flow using the various [node types](#node-types "Node Types").

### Preview Flow

You can preview your flow as you are building it!

In the toolbar, select the **eye** icon to open the in-line preview. This panel will then allow you to preview the version of the flow that is currently displayed. As you are actively editing a flow, select this icon at any time to preview your progress.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-2b6a0023-418f-349a-12de-97db59756c41.gif" />
</Frame>

To preview a previously saved version of the flow, navigate to the flow version in the [version dropdown](#version-indicators "Version Indicators"), then click the **eye** icon to preview.

#### Preview Capabilities

There are a few capabilities to leverage in preview:

* **Re-setting:** puts you back to the first node of the flow and allows you to test it again.
* **Debug information:** opens a panel that provides more detailed insights into where you are in a flow and the associated metadata with your preview.
* **Close:** close the in-line preview.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-dec4da7d-9bec-9a29-7db9-6c4753edefd4.gif" />
</Frame>

#### Preview with Mocked Data

The real time preview also has the ability to preview integrated flows using mocked data. By mocking data directly in the preview, you can test different flow paths based on the different values an API can return.

1. Define Request
   * You can define if the request is a success or failure when previewing. Each API node is treated as a separate call in the preview experience.
   <Frame>
     <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-cc121ffe-4697-fdb1-03b1-2980bac31e27.png" />
   </Frame>
2. View and Edit Mock Data Fields

   * For a successful API call, you can view and edit mock data fields, which will inform the subsequent flow path in the preview.
   * By default, all returned values are selected and pre-filled. Values set in the preview will be cached until you leave the flow builder, to prevent the need to re-enter each mock data form.

   <Frame>
     <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-fe3f5af7-9ac8-9360-a9a3-e60a0df2dd16.png" />
   </Frame>

### Save New Flow

When you are building a new flow, the following buttons will display in the toolbar:

* **Discard changes:** remove all unsaved changes made to the flow.
* **Save:** save changes to the flow as a new version or override an existing version.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-a6181873-136b-6d04-a38a-242e99e922e0.png" />
</Frame>

To save your new flow, select **Save**.

### Deploy New Flow

Newly created flows (i.e. the initial version) will **immediately deploy to test environments and production**. These new flows can be deployed without harm since customers will not be able to invoke the flow unless there are incoming routes due to [intent routing](/messaging-platform/virtual-agent/intent-routing "Intent Routing").

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-8b66727a-30bd-703f-b094-cbd7ead452eb.png" />
</Frame>

### Test New Flow

After deploying your flow to test, navigate to your respective test environment in order to verify your flow changes:

1. In the upper right corner of the toolbar, click the icon for **More actions**.
2. Select **Copy link to demo**.
3. Copy the **Flow Shortcut**.
4. Choose to **Go to demo env.**
5. Once there, select the chat bubble and paste the flow shortcut into the text entry to start testing your flow.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-816ae3d2-cfd5-ee62-9836-a9cda9b906e0.gif" />
</Frame>

### Edit & Save New Version

You can make changes to your new flow by selecting a node and making edits in the [Node Configuration Panel](#node-configuration-panel "Node Configuration Panel").

Once you are ready to save your changes, select **Save**. Since the current version of the flow is already deployed to production, you will **NOT** be able to save over the current version and **MUST** save as a new version to prevent unintentional changes to flows in production.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-3111bc91-7f92-b557-7111-4b8dd2be242b.png" />
</Frame>

For future flow versions that are not deployed to production, you will be able to save your changes as a **new flow version** or to overwrite the **current flow version**.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-515f5f10-8a76-5910-5f97-2dc89d381378.png" />
</Frame>

### Deploy Version to Test

After saving, you will be directed to **Manage Versions** where you will manage which flow version is deployed to test environments and to production..

<Caution>
  All flows should be verified in test environments, such as demo or pre-production environments before production. Therefore, new flow versions **MUST** be deployed to test **PRIOR** to [deployment in production](#deploy-version-to-prod "Deploy Version to Prod").
</Caution>

To deploy a flow version to test environments:

1. Select the new version you want to deploy in the version dropdown for **Test**.
2. After selection, click **Save**.
3. Flow version will deploy to all lower test environments within 5-10 minutes.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-75491e14-8dfe-c56c-c837-a68c6e2c37e8.png" />
</Frame>

### Test Version

After deploying your flow to test, navigate to your respective test environment in order to verify your flow changes:

1. In the upper right corner of the toolbar, click the icon for **More actions**.
2. Select **Copy link to demo**.
3. Copy the **Flow Shortcut**.
4. Choose to **Go to demo env**.
5. Once there, select the chat bubble and paste the flow shortcut into the text entry to start testing your flow.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-bd6031aa-5804-3dbe-9039-33c57496abd3.gif" />
</Frame>

### Deploy Version to Prod

After verifying the expected flow behavior in **Test**, you can deploy the flow version to production, which will impact customers if there the [flow is routed from an intent](/messaging-platform/virtual-agent/intent-routing "Intent Routing"):

1. Select the version you want to deploy in the version dropdown for **Prod**.
2. After selection, click **Save**.
3. Flow version will deploy to Production within 5-10 minutes.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-26bbd80b-9cc8-e943-f1b4-b71f99d1a049.png" />
</Frame>

### Manage Versions

When you are simply viewing a flow without making any changes, **Manage Versions** will always be at the top of the toolbar for you to manage flow version deployments. Upon selection, the versions that are currently deployed to Test and Prod environments will display, which you can edit as appropriate.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-259c265c-031d-8f63-ee2f-aadc8e9760a9.png" />
</Frame>

In addition to version deployments, you can view any existing [intents that route to this flow](/messaging-platform/virtual-agent/intent-routing "Intent Routing") in **Incoming Routes**. Upon selection, you will be directed to the specific [intent detail](/messaging-platform/virtual-agent/intent-routing#intent-routing-detail-page "Intent Routing Detail Page") page where you can view the intent routing rules.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-d955ad2e-56f9-1792-02cc-85b016188de7.gif" />
</Frame>

### Navigate Flow Versions

Many flows may iterate through multiple versions. You can toggle to view previous flow versions using the version dropdown:

1. Next to the flow name, click the version dropdown in the toolbar.
2. Selecting the version you want to view.
3. Once selected, the version details will display in the flow graph.
4. You can click any node to start editing that specific flow version.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-ca2f1cdb-930a-b714-013b-9ae194266186.png" />
</Frame>

#### Version Indicators

As flow versions are iteratively edited and deployed to Test and Prod, there are a few indicators in the toolbar to help the you quickly understand which version is being edited and which versions have been deployed to an environment:

* **Unsaved changes**
  If the version is denoted with an asterisk along with a filled gray indicator of "Unsaved Changes", the flow version is currently being edited and must be saved before navigating away from the page.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-b95f0c45-4c6e-96b8-6c0c-d2b15793d74c.png" />
</Frame>

* **Unreleased version**
  If a version is denoted with a hollow *gray* indicator *Unreleased version* , the flow version is saved but not deployed to any environment.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-2db8fb16-cfde-04b6-400e-f92ec9bcb40f.png" />
</Frame>

* **Available in test**
  If a version is denoted with a hollow *orange* indicator of *Available in test*, the flow version is deployed to test environments (e.g. demo) but it is **not routed** from an intent.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-093b439c-2133-7dee-faa1-610f7f5ecda7.png" />
</Frame>

* **Live in test**
  If a version is denoted with a filled *orange* indicator of *Live in test*, the flow version is deployed to test environments (e.g. demo) and it is **routed from an intent**.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-988c703d-5e62-c8ea-e50d-273c003cd99b.png" />
</Frame>

* **Available in prod**
  If a version is denoted with a hollow *green* indicator of *Available in prod*, the flow version is deployed to the production environment but it is **not routed** from an intent.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-b619f575-64b7-c3f6-afd2-ad76bd2a4691.png" />
</Frame>

* **Live in prod**
  If a version is denoted with a filled *green* indicator of *Live in prod*, the flow version is deployed to the production environment and it **is routed from an intent which can be reached by customers**.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-8f2ad53d-9de5-1270-5a4a-6edeeb115f68.png" />
</Frame>

* **Available in test and prod**
  If a version is denoted with a hollow *green* indicator of *Available in test and prod*, the flow version is deployed to test environments (e.g. demo) but it is **not routed** from an intent.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-a2a4d66c-428f-7424-e856-f4c681fc63d9.png" />
</Frame>

* **Live in test and prod**
  If a version is denoted with a filled *green* indicator of *Live in test and prod*, the flow version is deployed to all environments and it **is routed from an intent which can be reached by customers**.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-3e9419cd-0a3e-5fba-ba93-58bc786f6e27.png" />
</Frame>

#### View Intent Routing

If a flow is **routed from an intent** (e.g. Live in...), you can hover over these indicators to view and navigate to the respective intent routing page.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-d021a99f-b1fa-82d0-7629-7425bfebac9b.png" />
</Frame>


# Glossary
Source: https://docs.asapp.com/messaging-platform/virtual-agent/glossary



|                                       |                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| :------------------------------------ | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Term**                              | **Definition**                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| **Agent Node**                        | A flow node used to direct customers to a live agent.                                                                                                                                                                                                                                                                                                                                                                                                              |
| **AI-Console**                        | A web-based application for managing your implementation of ASAPP's virtual agent.                                                                                                                                                                                                                                                                                                                                                                                 |
| **AMB**                               | See "Apple Messages for Business"                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| **Ambiguous Utterance**               | Customer utterances characterized by having multiple distinct meanings like "My battery died." This is contrasted from "vague" utterances which are characterized by having broad, but still distinct meaning ( e.g. "Phone issue").                                                                                                                                                                                                                               |
| **Apple Messages for Business (AMB**) | Offers the ability for customers to chat with businesses directly in the Apple Messages app. Includes dedicated uis to facilitate more efficient interactions than would be possible using traditional SMS, as well as support for highly impactful entry points in Siri Suggestions and chat intercepts for customers who tap on phone numbers while on their iOS device. Learn more at: [apple.com/ios/business-chat](https://www.apple.com/ios/business-chat/). |
| **ASAPP Team**                        | Your direct representatives at ASAPP, inclusive of your assigned Solutions Architect, Customer Success Manager, and Implementation Manager.                                                                                                                                                                                                                                                                                                                        |
| **Business Flow**                     | Business Flows are flows that are built to resolve a customer need as indicated by their intent. This is in contrast to "Non-Business Flows," which are flows that serve more generic purposes such as greeting a customer, disambiguating an utterance, or enabling customers to log in or connect with an agent.                                                                                                                                                 |
| **Chat SDKs**                         | Embeddable chat UI that ASAPP offers for web, iOS, and Android applications. Each SDK supports quick replies, rich components and various other content interactions to facilitate conversations between businesses and their customers.                                                                                                                                                                                                                           |
| **Classification**                    | Refers to the process of classifying the customer's intent by analyzing the language they use.                                                                                                                                                                                                                                                                                                                                                                     |
| **Containment**                       | The success rate of the virtual agent prevents human interaction.                                                                                                                                                                                                                                                                                                                                                                                                  |
| **Core Dialog**                       | Refers to the settings that define how the virtual agent behaves in common dialog scenarios like initial welcome, live chat enquement, digressions (triggering a new intent in the middle of a flow), and error handling.                                                                                                                                                                                                                                          |
| **Customer**                          | Your customer who is engaging with your virtual agent.                                                                                                                                                                                                                                                                                                                                                                                                             |
| **Customer Channels**                 | The set of UIs and applications that your customers can use to engage with your business. Includes chat SDKs, Apple Messages for Business, SMS, etc.                                                                                                                                                                                                                                                                                                               |
| **Deeplinks**                         | Links that send users directly to a web page or to a specific page in an app.                                                                                                                                                                                                                                                                                                                                                                                      |
| **Dialog Turns**                      | The conversational steps required for a virtual agent to acquire the relevant information from the end-user.                                                                                                                                                                                                                                                                                                                                                       |
| **Disambiguation**                    | The process whereby the virtual agent gets clarification from the consumer on what is meant by the customer's message. Disambiguation is often triggered when the customer's message matches multiple intents.                                                                                                                                                                                                                                                     |
| **End Node**                          | The flow node used to end a flow and trigger end SRS options (See: Semantic Response Score)                                                                                                                                                                                                                                                                                                                                                                        |
| **Enqueuement**                       | Refers to the process where a customer is waiting in queue to chat with a live agent.                                                                                                                                                                                                                                                                                                                                                                              |
| **Flow**                              | Flows define how the virtual agent interacts with the customer given a specific situation. They are built through a series of nodes.                                                                                                                                                                                                                                                                                                                               |
| **Flow Success**                      | Metric to accurately measure whether a customer has successfully self-served through the virtual agent.                                                                                                                                                                                                                                                                                                                                                            |
| **Free Text**                         | The unstructured customer utterances that can be freely typed and submitted without Autocomplete or quick replies.                                                                                                                                                                                                                                                                                                                                                 |
| **Insights Manager**                  | The operational hub through which users can monitor traffic and conversations in real time, gain insights through Historical Reporting, and manage queues and queue settings. Learn more in the [Insights Manager overview](../insights-manager "Insights Manager").                                                                                                                                                                                               |
| **Intent**                            | Intents are the set of reasons that a customer might contact your business and are recognized by the virtual agent when the customer first reaches out. The virtual agent can also understand when a user changes intent in the middle of a conversation (see: digressions).                                                                                                                                                                                       |
| **Intent Code**                       | Unique, capitalized identifier for an intent.                                                                                                                                                                                                                                                                                                                                                                                                                      |
| **Intent Routes**                     | The logic that determines what will happen after an intent has been recognized.                                                                                                                                                                                                                                                                                                                                                                                    |
| **Library**                           | The panel that houses content that can be used within intent routing and flows.                                                                                                                                                                                                                                                                                                                                                                                    |
| **Login Node**                        | A flow node used to enable customer authentication within a flow.                                                                                                                                                                                                                                                                                                                                                                                                  |
| **Multi-Turn Dialog**                 | Questions that should be filtered or refined to determine the correct answer.                                                                                                                                                                                                                                                                                                                                                                                      |
| **Node**                              | Functional objects used in flows to dictate the conversation as well as any business logic it needs to perform.                                                                                                                                                                                                                                                                                                                                                    |
| **Queue**                             | A group of agents assigned to handle a particular set of issues or types of incoming customers.                                                                                                                                                                                                                                                                                                                                                                    |
| **Quick Reply**                       | The set of buttons that customers can directly choose to respond to the virtual agent.                                                                                                                                                                                                                                                                                                                                                                             |
| **Redirect Node**                     | A flow node used to link to other flows.                                                                                                                                                                                                                                                                                                                                                                                                                           |
| **Response Node**                     | A flow node used to configure virtual agent responses, send deeplinks, and classify what customers say in return.                                                                                                                                                                                                                                                                                                                                                  |
| **Response Routes**                   | On a response node, the set of routes defined to classify a customer response and branch accordingly. Users will define the training data and quick reply text for each type of response.                                                                                                                                                                                                                                                                          |
| **Routing (within flows)**            | On any given node, the set of rules that determine what node the virtual agent should execute next.                                                                                                                                                                                                                                                                                                                                                                |
| **Self-Serve**                        | Regarding the virtual agent, self-serve refers to cases where the virtual agent helps a customer resolve their issue without the need for human agent intervention.                                                                                                                                                                                                                                                                                                |
| **Semantic Response Score (SRS)**     | Options presented at the end of a flow to help gauge whether or not the virtual agent met the customer's needs.                                                                                                                                                                                                                                                                                                                                                    |
| **User**                              | Refers to the user of AI-Console. Users of the chat experience are referred to as "customers."                                                                                                                                                                                                                                                                                                                                                                     |
| **Vague Utterance**                   | Customer utterances characterized by having broad, but still distinct meaning ( e.g. "Phone issue"). This is contrasted from "ambiguous" utterances which are characterized by having multiple distinct meanings like "My battery died."                                                                                                                                                                                                                           |
| **Virtual Agent**                     | The ASAPP "Virtual agent" is chat-based, multi-channel artificial intelligence that can understand customer issues, offer self-service options, and connect customers with live agents when necessary.                                                                                                                                                                                                                                                             |


# Intent Routing
Source: https://docs.asapp.com/messaging-platform/virtual-agent/intent-routing

Learn how to route intents to flows or agents.

Intents are the set of reasons that a customer might contact your business and are recognized by the virtual agent when the customer first reaches out. Our ASAPP teams work with you to optimize your intent list on an ongoing basis.

Within intent routing, you can view the full list of intents and the routing behavior after an intent is recognized. Creators have the ability to modify this behavior.

## Navigate to Intent Routing

You can access **Intent Routing** in the **Virtual Agent** navigation panel.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-490c14f9-66e3-c787-0652-918c1d8a9741.png" />
</Frame>

## Intent Routing List

On the intent routing page, you will find a filterable list of intents along with their routing information. The following information is displayed in the table:

1. **Intent name:** displays the name of the intent, as well as a brief description on what it is.
2. **Code:** unique identifier for each intent.
3. **Routing:** displays the flow routing rules currently configured for an intent, if available.
   a. If the intent is routed to one or more flows, the column will list such flow(s).
   b. If the intent is not routed to any flow, the column will display an 'Add Route...'. These intents will immediately direct customers to an agent queue.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-3830fab9-0151-d19e-f041-b5e643be398c.png" />
</Frame>

## Intent Routing Detail Page

Clicking on a specific intent in the list will direct you to a page where routing behavior for the intent can be defined. The intent detail page is broken down as follows:

1. **Routing behavior**
2. **Conditional rules and default flow**
3. **Intent information**
4. **Intent toolbar**

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-84f63b73-4877-f487-44e2-4a27f19956d9.jpg" />
</Frame>

### Routing Behavior

Routing behavior for a specific intent is determined by selecting one of the following options:

1. **Route to a live agent**
   When the intent is identified, the customer will be immediately directed to an agent queue. This is the default selection for any new intents unless configured otherwise.
2. **Route to a flow**
   When the intent is identified, the customer will be directed to a flow in accordance with the [conditional rules](#conditional-rules-and-default-flow) that you will subsequently define.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-2ca3faf8-99e8-e73f-c913-74597e8ea743.jpg" />
</Frame>

### Conditional Rules and Default Flow

If an intent is configured to be [routed to a flow](#routing-behavior), you have the option to build conditional rules and route to a flow only when the conditions are validated TRUE. If all the conditional rules are invalid, customers will be routed to a [default flow](#default-flow) of your choosing.

#### Add Conditional Route

To add a new conditional route:

1. Select **Add Conditional Route**.
2. Define a conditional statement in the **Conditional Route** editor by:
   a. Selecting an available [attribute](/messaging-platform/virtual-agent/attributes) as target from the drop-down menu and choose the value to validate against. E.g. authentication equals true.
   i. Multiple conditions can be added by clicking **Add Conditions**. Once added, they can be reordered by dragging, or deleted by clicking the trash can icon.
   b. Selecting the flow to route customers to, if the conditions are validated in the dropdown.
   c. Click **Apply** to save your changes.
3. Edit or delete a route by hovering over the route and selecting the respective icons.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-8315c4fb-6104-fa40-2de3-fa36e6ccbb50.jpg" />
</Frame>

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-f56b7fee-db9a-8407-75e1-3780abc55fae.jpg" />
</Frame>

#### Multiple Conditional Routes

You can add multiple conditional rules that can route to different flows. You can reorder these conditions by dragging the conditional rule from the icon on the left. Once saved, conditions are evaluated from top to bottom, with the customer being routed to the first flow for which the conditions are validated. If no conditional route is valid, the customer will be routed to the [default flow](#default-flow).

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-c372598b-9b88-245a-484a-1e28874355f1.jpg" />
</Frame>

#### Default Flow

A default flow must be selected if the routing behavior is defined to [route to a flow](#routing-behavior).

Customers will be routed to the selected default flow if no conditional routes exist, or if none of the conditional routes were valid.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-51481dd0-0bbd-42c7-e844-72bed309c4ae.jpg" />
</Frame>

### Intent Information

The **Intent Information** panel will display the intent name, code, and description for easy reference as you are viewing or editing intent routes.

The **Assigned routes** will display any flow(s) that are currently routed from the intent.

### Intent Toolbar

When you are editing intent routing, the following buttons will display in the toolbar:

* **Discard changes**: remove all unsaved changes.
* **Save**: save changes to intent routing.

## Save Intent Routing

To save any changes to intent routing, click **Save** from the toolbar. By default, when saving an intent route, it is immediately released to production. There is currently no versioning available when saving intent routes.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-94dd9013-0395-da3f-8c6f-495e6dc91bac.jpg" />
</Frame>

### Test a Different Intent Route in Test Environments

To avoid impacting customer routing and assignments in production you can test a particular intent route in a test environment before releasing it to customers by following the steps below:

* In the **Conditional Route** editor, add a condition that targets the 'InTest' attribute.
  a. The value assigned to 'InTest' should equal 'TRUE'.
  b. Select the flow that you want to test the routing for.
  c. Click **Apply**.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-208dce90-e0fb-9870-ed7e-c3054739b2f5.jpg" />
</Frame>

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-51e06cce-a649-31d5-acc3-b171b0ba7c92.jpg" />
</Frame>

To fully release the intent route to Production, delete the conditional statement and update the routing to the new flow.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-6670c56c-3d7a-ea61-ee7f-ace22fec6c2b.gif" />
</Frame>

## Test Intent Routes

Intent routes can be tested in demo environments. To test an intent route:

1. Access your demo environment.
2. Type `INTENT_INTENTCODE`, where `INTENTCODE` is the code associated with the intent you want to test. Please note that this is case sensitive.
3. Press **Enter** to test intent routes for that intent.


# Links
Source: https://docs.asapp.com/messaging-platform/virtual-agent/links

Learn how to manage external links and URLs that direct customers to web pages.

ASAPP provides a powerful mechanism to manage external links and URLs that direct customers to web pages. Links are predominantly used in flows, core dialogs, and customer profiles.

## Links List

The Links list page displays a list of all links available to use in AI-Console. When a link is created, it can be attached to content in a node in Flow Tooling, included in the Customer Profile panels, assigned to a View, etc.

Here, you'll find the **Link name & URL**. When adding a link to a flow or other feature, you will be required to add it from a list of all link names.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/messaging-platform/LinksPage.png" />
</Frame>

## Create a Link

To create a link:

1. From the **Links** landing page, click the **+** button at the bottom right.
2. A modal window will open.
3. **Link name:** Provide a name for the link. Make the name descriptive so that other users can recognize its purpose.
4. **URL:** Include the full external URL, including **http\://** (e.g., `http://example.com/about`).
5. **Channel Targets:** This feature is optional. It allows users to create a link variant that targets customers using a specific channel. See details below.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-39985f99-da5e-8997-87ba-dda6b9156a76.png" />
</Frame>

### Add a Channel Target Variant

1. Click **Add Channel Target** to add a URL variant. A new input field will be added.
   a. **URL Override:** Include the URL variant for the targeted channel. Please follow the same URL syntax as described under **Create a Link**.
   b. **Channel Target:** From the drop-down menu, select which channel to target. Bear in mind that a single variant per channel is currently supported.
2. **Delete targets:** To remove a target, click the **Delete** icon.
3. **Save:** To save the link, click the **Save** button. The link will not be active until it is assigned to a flow, customer profile or any other feature that supports **Links**.
4. **Cancel:** On click, all changes will be cleared.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-86cb8d7f-ba8f-6c01-8926-4f0cae6d3b80.png" />
</Frame>

### Link Assignments

Once a link has been created, it can be sent to customers in flows. The **Links** feature will keep tabs on where each link has been assigned and provide quick access to those feature areas.

When viewing a specific link, the Usage section indicates which flows are currently using the respective link. On click, you can navigate directly to the flow. When a link is not assigned in any flow, 'Not yet assigned' will be displayed.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-80058a33-eb5c-5c76-3e89-8e7a35b2a5af.png" />
</Frame>

## Edit a Link

Link changes are global, which means that saved changes are immediately pushed to all features that reference the link.

1. From the **Links** landing page, click the **link name** you want to edit.
2. **Link ID:** After a link is saved for the first time, a unique identifier is automatically assigned to the link. This identifier does not change over time, including when the link is edited.
   a. The **Link ID** can be referenced in **Historical Reporting** for your reporting needs.
3. Assign changes to the configurations.
4. **Save:** When changes are complete, click **Save** to automatically apply the changes.

## Delete a Link

Links can be deleted, but only if they are not currently assigned. To delete a link that is assigned, remove the assignments first.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-bdf4a69c-fadd-918a-e277-aa4f7c3826eb.png" />
</Frame>

1. If the link is assigned: When opening the Link modal, the **Delete** button will be disabled. The delete function will remain disabled until all link assignments have been removed.
2. If the link is not assigned: The link can be deleted by clicking on the **Delete** button on the bottom-left area of the link modal.


# Reporting and Insights
Source: https://docs.asapp.com/reporting



ASAPP reports data back via several channels, each with different use cases:

<CardGroup>
  <Card title="File Exporter" href="/reporting/file-exporter">Retrieve data and reports via a secure API for programmatic access to ASAPP data.</Card>
  <Card title="S3 Reports" href="/reporting/retrieve-messaging-data">Download data and reports via S3.</Card>
  <Card title="Real Time Event API" href="/reporting/real-time-event-api">Access real-time data from ASAPP Messaging.</Card>
  <Card title="Send data to ASAPP" href="/reporting/send-sftp">Send data to ASAPP via S3 or SFTP.</Card>
  <Card title="Metadata Ingestion" href="/reporting/metadata-ingestion">Send conversation, agent, and customer metadata.</Card>
</CardGroup>

## Batch vs Realtime

One high-level differentiating feature of these channels is how the underlying data is processed for reporting:

* **Real-time**: Processed data flows to the reporting channel as it happens.
* **Batch**: Processed data aggregates into time-based buckets, delivered with some delay to the reporting channel.

For reference:

* Reports visible in ASAPP's Desk/Admin are considered *real-time reports*.
* RTCI reports are *real-time reports*.
* ASAPP's S3 reports are *batch reports,* delivered with a predictable time delay.
* Historical Reports are *batch reports*.

Often, metrics similar in both name and in underlying definition are delivered both via batch and via real-time channels.

This can be confusing: a metric in viewed in a real-time context (say, via ASAPP's Desk/Admin) might well differ in value from a similar metric viewed in a time-delayed batch context (say, via a report delivered by S3).

***In fact, customers should not expect that values for similar metrics will line up across real-time and batch reporting channels.***

The short explanation for such differences is that **real-time and batch processed metrics are necessarily calculated using different underlying data sets** (with the real-time set current up-to-the-minute, and the batch set delayed as a function of the time bucketing aggregation).

It is expected that different underlying data will yield different reported values for your metrics between delivery channels.

The balance of this document provides a few concrete examples to further explain the variance you will typically see between real-time and batch reported values for similar metrics.

### Batch vs Real-time Metric Discrepancies

Real-time metrics are calculated with a continual process, where computations are evaluated repeatedly with the most current data available.

With multiple active and potentially geographically dispersed instances of an application communicating asynchronously across a global message bus, at times the data used to calculate real-time metrics can be intermediate or incomplete.

On the other hand, metrics computed using batch processing are computed with all available, terminal data for each reported interaction, and so can provide a more accurate metric at the expense of a time delay vs real-time reporting.

ASAPP S3 reports, for example, are normally computed over hours or days, and can therefore incorporate the most complete set of data points required to calculate a metric.

As a simplified example, let's consider a metric that shows a daily average for customer satisfaction ratings. Let's assume:

* the day starts at 8:00AM
* batch processing works against hourly aggregate buckets
* batch calculations run at 5 minutes past the hour
* it is a *very slow* day :)

Over the course of our pretend day, the following interactions are handled by the system:

| TIME     | Rating | Real-time avg for day | batch avg for day |
| :------- | :----- | :-------------------- | :---------------- |
| 8:00 AM  | 4      | 4                     | N/A               |
| 8:05 AM  | 4      | 4                     | N/A               |
| 8:10 AM  | 4      | 4                     | N/A               |
| 12:00 PM | 1      | 3.25                  | 4                 |
| 12:05 PM | 1      | 2.8                   | 4                 |
| 1:10 PM  | 4      | 3                     | 2.8               |

At 8:00 AM, batch processing will not have incorporated the rating that was provided at 8:00AM. So the average rating can't be computed for a batch report. Since real-time reporting has access to up-to-the-minute data, real-time reporting shows a value of 4 for the daily average customer satisfaction rating.

At 12:00PM, the real-time metric shows an average satisfaction over 4 transactions as 3.25. The batch system shows the average satisfaction rating as 4 over 3 transactions, since the 12:00 transaction has not yet been incorporated into the batch processing calculation. Given our example scenario, the interactions at 12:00 and 12:05 would not be incorporated into the batch reported metric until 1:05PM.

In this simplified example, the batch processed metric would align with the real-time metric around 2:05 PM, once both the batch metric and the real-time metric are calculated against the same underlying data set.

The next example shows how values provided by real-time vs batch processing might show inconsistent values for "rep assigned time".

```json
8:00AM: NEW ISSUE
8:01AM: ENQUEUED
8:02AM: REP ASSIGNED: rep0
8:03AM: REP UNASSIGNED
8:04AM: REENQUEUED
8:05AM: REP ASSIGNED: rep0
8:06AM: ...
```

With real time reporting, the value for rep\_assigned\_time might show either 8:02AM or 8:05AM, depending on when the data is read and the real-time metric is viewed.

Batch processed data, however, will have the complete historical data, and so will consistently report 8:02AM for the rep\_assigned\_time.

Batch processed data and real-time processed data are almost always looking at different underlying data sets. Batch data is complete but time-delayed and real-time data is up-to-the-minute but not necessarily complete.

As long as the data sets underlying real-time vs. batch reporting differ, customers should expect that the metrics calculated from those different data sets will differ more often than not.


# ASAPP Messaging Feed Schemas
Source: https://docs.asapp.com/reporting/asapp-messaging-feeds



The tables below provide detailed information regarding the schema for exported data files that we can make available to you for ASAPP Messaging.

{/* <Note> You can also view the [JSON representation of these schemas](/reporting/asapp-messaging-feeds-json). </Note> */}

### Table: admin\_activity

The admin\_activity table tracks ONLINE/OFFLINE statuses and logged in time in seconds for agents who use Admin.

**Sync Time:** 1h

**Unique Condition:** company\_marker, rep\_id, status\_description, status\_start\_ts

| Column                | Type         | Description                                           | Example             | Aggregates | Notes | Date Added          | Date Modified       | Ignore | PII | release state | Specific Use | Feature Group |
| :-------------------- | :----------- | :---------------------------------------------------- | :------------------ | :--------- | :---- | :------------------ | :------------------ | :----- | :-- | :------------ | :----------- | :------------ |
| rep\_id               | varchar(191) | The ASAPP rep/agent identifier.                       | 123008              |            |       | 2020-11-10 00:00:00 | 2020-11-10 00:00:00 | no     |     |               |              |               |
| rep\_name             | varchar(191) | Name of agent                                         | John                |            |       | 2020-11-10 00:00:00 | 2020-11-10 00:00:00 | no     |     |               |              |               |
| status\_description   | varchar      | Indicates status of the agent.                        | ONLINE              |            |       | 2020-11-10 00:00:00 | 2020-11-10 00:00:00 | no     |     |               |              |               |
| status\_start\_ts     | datetime     | Timestamp at which this agent entered that status.    | 2018-06-10 14:23:00 |            |       | 2020-11-10 00:00:00 | 2020-11-10 00:00:00 | no     |     |               |              |               |
| status\_end\_ts       | datetime     | Timestamp at which this agent exited that status.     | 2018-06-10 14:23:00 |            |       | 2020-11-10 00:00:00 | 2020-11-10 00:00:00 | no     |     |               |              |               |
| status\_time\_seconds | double       | Time in seconds that the agents spent in that status. | 2353.23             |            |       | 2020-11-10 00:00:00 | 2020-11-10 00:00:00 | no     |     |               |              |               |
| company\_name         | varchar(255) | Name of the company associated with the data.         | acme                |            |       | 2025-01-09 00:00:00 | 2025-01-09 00:00:00 | no     |     |               |              |               |

### Table: agent\_journey\_rep\_event\_frequency

Aggregated counts of various agent journey event types partitioned by rep\_id

**Sync Time:** 1d

**Unique Condition:** primary-key: rep\_id, event\_type, company\_marker, instance\_ts

| Column                | Type         | Description                                                                                                                                                                                                                                                                                                                                                 | Example                          | Aggregates | Notes | Date Added          | Date Modified       | Ignore | PII | release state | Specific Use | Feature Group |
| :-------------------- | :----------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------- | :--------- | :---- | :------------------ | :------------------ | :----- | :-- | :------------ | :----------- | :------------ |
| instance\_ts          | timestamp    | The time window of computed elements.  This window is usually 15 minutes or 1 hour depending on the generation time. Times are rounded down to the nearest interval (for a time of 12:34 and an interval of 15m, this is 12:30). As an example, for a 15 minute interval an instance\_ts of 12:30 implies events from 12:30 -> 12:45. All times are in UTC. | 2019-11-08 14:00:06.957000+00:00 |            |       | 2022-01-31 00:00:00 | 2022-01-31 00:00:00 | no     |     |               |              |               |
| company\_marker       | varchar(191) | The ASAPP company marker.                                                                                                                                                                                                                                                                                                                                   | spear, aa                        |            |       | 2022-01-31 00:00:00 | 2022-01-31 00:00:00 | no     |     |               |              |               |
| rep\_id               | varchar(191) | The ASAPP rep/agent identifier.                                                                                                                                                                                                                                                                                                                             | 123008                           |            |       | 2022-01-31 00:00:00 | 2022-01-31 00:00:00 | no     |     |               |              |               |
| event\_type           | varchar(191) | agent journey event type on record                                                                                                                                                                                                                                                                                                                          | CUSTOMER\_TIMEOUT, TEXT\_MESSAGE |            |       | 2022-01-31 00:00:00 | 2022-01-31 00:00:00 | no     |     |               |              |               |
| event\_count          | bigint       | count of the agent journey event type on record                                                                                                                                                                                                                                                                                                             |                                  |            |       | 2022-01-31 00:00:00 | 2022-01-31 00:00:00 | no     |     |               |              |               |
| disconnected\_count   | bigint       | number of times that a rep disconnected for less than 1 hour                                                                                                                                                                                                                                                                                                |                                  |            |       | 2022-01-31 00:00:00 | 2022-01-31 00:00:00 | no     |     |               |              |               |
| disconnected\_seconds | bigint       | cumulative number of seconds that a rep disconnected for less than 1 hour                                                                                                                                                                                                                                                                                   |                                  |            |       | 2022-01-31 00:00:00 | 2022-01-31 00:00:00 | no     |     |               |              |               |

### Table: autopilot\_flow

This table contains factual data about autopilot flow.

**Sync Time:** 1h

**Unique Condition:** company\_marker, issue\_id, form\_start\_ts

| Column                     | Type                        | Description                                                                                                                                                                                                                                                                                                                                                 | Example                              | Aggregates | Notes | Date Added          | Date Modified       | Ignore | PII | release state | Specific Use | Feature Group |
| :------------------------- | :-------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------- | :--------- | :---- | :------------------ | :------------------ | :----- | :-- | :------------ | :----------- | :------------ |
| instance\_ts               | timestamp                   | The time window of computed elements.  This window is usually 15 minutes or 1 hour depending on the generation time. Times are rounded down to the nearest interval (for a time of 12:34 and an interval of 15m, this is 12:30). As an example, for a 15 minute interval an instance\_ts of 12:30 implies events from 12:30 -> 12:45. All times are in UTC. | 2019-11-08 14:00:06.957000+00:00     |            |       | 2022-03-09 00:00:00 | 2022-03-09 00:00:00 | no     |     |               |              |               |
| company\_id                | bigint                      | DEPRECATED 2024-03-25                                                                                                                                                                                                                                                                                                                                       | 10001                                |            |       | 2022-03-09 00:00:00 | 2022-03-09 00:00:00 | no     |     |               |              |               |
| issue\_id                  | bigint                      | The ASAPP issue or conversation id.                                                                                                                                                                                                                                                                                                                         | 21352352                             |            |       | 2022-03-09 00:00:00 | 2022-03-09 00:00:00 | no     |     |               |              |               |
| customer\_id               | bigint                      | The ASAPP internal customer identifier.                                                                                                                                                                                                                                                                                                                     | 123008                               |            |       | 2022-03-09 00:00:00 | 2022-03-09 00:00:00 | no     |     |               |              |               |
| rep\_id                    | varchar(191)                | The ASAPP rep/agent identifier.                                                                                                                                                                                                                                                                                                                             | 123008                               |            |       | 2022-03-09 00:00:00 | 2022-03-09 00:00:00 | no     |     |               |              |               |
| rep\_assigned\_ts          | timestamp without time zone |                                                                                                                                                                                                                                                                                                                                                             |                                      |            |       | 2022-03-09 00:00:00 | 2022-03-09 00:00:00 | no     |     |               |              |               |
| form\_start\_ts            | timestamp without time zone | Timestamp of autopilot form/flow being recommended by MLE or timestamp of flow sent from quick send. issue\_id + form\_recommended\_event\_ts should be unique                                                                                                                                                                                              |                                      |            |       | 2022-03-09 00:00:00 | 2022-03-09 00:00:00 | no     |     |               |              |               |
| form\_dismissed\_event\_ts | timestamp without time zone | Timestamp of recommended autopilot form being dismissed.                                                                                                                                                                                                                                                                                                    |                                      |            |       | 2022-03-09 00:00:00 | 2022-03-09 00:00:00 | no     |     |               |              |               |
| form\_presented\_event\_ts | timestamp without time zone | Timestamp the autopilot form being presented to end user.                                                                                                                                                                                                                                                                                                   |                                      |            |       | 2022-03-09 00:00:00 | 2022-03-09 00:00:00 | no     |     |               |              |               |
| form\_submitted\_event\_ts | timestamp without time zone | Timestamp the autopilot form being submitted by end user                                                                                                                                                                                                                                                                                                    |                                      |            |       | 2022-03-09 00:00:00 | 2022-03-09 00:00:00 | no     |     |               |              |               |
| flow\_id                   | varchar(255)                | An ASAPP identifier assigned to a particular flow executed during a customer event or request.                                                                                                                                                                                                                                                              | 347bdddb-d3a1-45fc-bbcd-dbd3a175fc1c |            |       | 2022-03-09 00:00:00 | 2022-03-09 00:00:00 | no     |     |               |              |               |
| flow\_name                 | varchar(255)                | The ASAPP text name for a given flow which was executed during a customer event or request.                                                                                                                                                                                                                                                                 | FirstChatMessage, AccountNumberFlow  |            |       | 2022-03-09 00:00:00 | 2022-03-09 00:00:00 | no     |     |               |              |               |
| form\_start\_from          | character varying(191)      | How the flow is being sent by the agent. manual: sent manually from the quick send dropdown in desk accept: sent by accept recommendation by ML server                                                                                                                                                                                                      |                                      |            |       | 2022-03-09 00:00:00 | 2022-03-09 00:00:00 | no     |     |               |              |               |
| is\_secure\_form           | boolean                     | Is this a secure form flow.                                                                                                                                                                                                                                                                                                                                 | false                                |            |       | 2022-03-09 00:00:00 | 2022-03-09 00:00:00 | no     |     |               |              |               |
| queue\_id                  | integer                     | The ASAPP queue identifier which the issue was placed.                                                                                                                                                                                                                                                                                                      | 210001                               |            |       | 2022-03-09 00:00:00 | 2022-03-09 00:00:00 | no     |     |               |              |               |
| asapp\_mode                | varchar(191)                | Mode of the desktop that the rep is logged into (CHAT or VOICE).                                                                                                                                                                                                                                                                                            | CHAT, VOICE                          |            |       | 2022-03-09 00:00:00 | 2022-03-09 00:00:00 | no     |     |               |              |               |
| company\_name              | varchar(255)                | Name of the company associated with the data.                                                                                                                                                                                                                                                                                                               | acme                                 |            |       | 2022-03-09 00:00:00 | 2022-03-09 00:00:00 | no     |     |               |              |               |

### Table: convos\_intents

The convos\_intents table lists the current state for intent and utterance information associated with a conversation/issue that had events within the identified 15 minute time window. This table will include unended conversations.

**Sync Time:** 1h

**Unique Condition:** issue\_id

| Column                     | Type         | Description                                                                                                                                        | Example                                     | Aggregates | Notes | Date Added          | Date Modified       | Ignore | PII | release state | Specific Use | Feature Group |
| :------------------------- | :----------- | :------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------ | :--------- | :---- | :------------------ | :------------------ | :----- | :-- | :------------ | :----------- | :------------ |
| conversation\_id           | bigint       | deprecated: 2019-09-25                                                                                                                             | 21352352                                    |            |       | 2018-11-07 00:00:00 | 2018-11-07 00:00:00 | no     |     |               |              |               |
| first\_agent\_id           | varchar(191) | deprecated: 2019-09-25                                                                                                                             | 123008                                      |            |       | 2018-11-07 00:00:00 | 2018-11-07 00:00:00 | no     |     |               |              |               |
| customer\_id               | bigint       | The ASAPP internal customer identifier.                                                                                                            | 123008                                      |            |       | 2018-11-07 00:00:00 | 2018-11-07 00:00:00 | no     |     |               |              |               |
| first\_utterance\_ts       | varchar(255) | The timestamp of the first customer utterance for an issue.                                                                                        | 2018-09-05 19:58:06                         |            |       | 2018-11-07 00:00:00 | 2018-11-07 00:00:00 | no     |     |               |              |               |
| first\_utterance\_text     | varchar(255) | Time of the first customer message in the conversation.                                                                                            | 'Pay my bill', 'Check service availability' |            |       | 2018-11-07 00:00:00 | 2018-11-07 00:00:00 | no     |     |               |              |               |
| first\_intent\_code        | varchar(255) | Code name which are used for classifying customer queries in first interaction.                                                                    | PAYBILL, COVERAGE                           |            |       | 2018-11-07 00:00:00 | 2018-11-07 00:00:00 | no     |     |               |              |               |
| first\_intent\_code\_alt   | varchar(255) | Alternative second best code name which are used for classifying customer queries in first interaction.                                            | PAYBILL, COVERAGE                           |            |       | 2018-11-07 00:00:00 | 2018-11-07 00:00:00 | no     |     |               |              |               |
| final\_intent\_code        | varchar(255) | The final code name classifying the customer's query, based on the flow navigated; defaults to the first interaction code if no flow was followed. | PAYBILL, COVERAGE                           |            |       | 2018-11-07 00:00:00 | 2018-11-07 00:00:00 | no     |     |               |              |               |
| intent\_path               | varchar(255) | A comma-separated list of all intent codes from the customer’s flow navigation. If no flow was navigated, this will match the first intent code.   | OUTAGE,CANT\_CONNECT                        |            |       | 2018-11-07 00:00:00 | 2018-11-07 00:00:00 | no     |     |               |              |               |
| disambig\_count            | bigint       | The number of times a disambiguation event was presented for an issue.                                                                             | 2                                           |            |       | 2018-11-07 00:00:00 | 2018-11-07 00:00:00 | no     |     |               |              |               |
| ftd\_visit                 | boolean      | Indicates whether free-text disambiguation was used to help the customer present a clearer intent, based on the number of texts sent to AI.        | true, false                                 |            |       | 2018-11-07 00:00:00 | 2018-11-07 00:00:00 | no     |     |               |              |               |
| faq\_id                    | varchar(255) | The last FAQ identifier presented for an issue.                                                                                                    | FORGOT\_LOGIN\_faq                          |            |       | 2018-11-07 00:00:00 | 2018-11-07 00:00:00 | no     |     |               |              |               |
| final\_action\_destination | varchar(255) | The last deep-link URL clicked during the issue resolution process.                                                                                | asapp-pil://acme/JSONataDeepLink            |            |       | 2018-11-07 00:00:00 | 2018-11-07 00:00:00 | no     |     |               |              |               |
| is\_first\_intent\_correct | boolean      | Indicates whether the initial intent associated with the chat was correct, based on feedback from the agent.                                       | true, false                                 |            |       | 2018-11-07 00:00:00 | 2018-11-07 00:00:00 | no     |     |               |              |               |
| issue\_id                  | bigint       | The ASAPP issue or conversation id.                                                                                                                | 21352352                                    |            |       | 2019-09-27 00:00:00 | 2019-09-27 00:00:00 | no     |     |               |              |               |
| first\_rep\_id             | varchar(191) | The first ASAPP rep/agent identifier found in a window of time.                                                                                    | 123008                                      |            |       | 2019-09-27 00:00:00 | 2019-09-27 00:00:00 | no     |     |               |              |               |
| company\_name              | varchar(255) | Name of the company associated with the data.                                                                                                      | acme                                        |            |       | 2019-11-01 00:00:00 | 2024-05-24 00:00:00 | no     |     |               |              |               |

### Table: convos\_intents\_ended

The convos\_intents\_ended table lists the current state for intent and utterance information associated with a  conversation/issue that have had events within the identified 15 minute time window. This table will filter out unended conversations.

**Sync Time:** 1h

**Unique Condition:** issue\_id

| Column                     | Type         | Description                                                                                                                                        | Example                                          | Aggregates | Notes | Date Added          | Date Modified       | Ignore | PII | release state | Specific Use | Feature Group |
| :------------------------- | :----------- | :------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------------------- | :--------- | :---- | :------------------ | :------------------ | :----- | :-- | :------------ | :----------- | :------------ |
| conversation\_id           | bigint       | deprecated: 2019-09-25                                                                                                                             | 21352352                                         |            |       | 2018-11-07 00:00:00 | 2019-01-11 00:00:00 | no     |     |               |              |               |
| first\_agent\_id           | varchar(191) | deprecated: 2019-09-25                                                                                                                             | 123008                                           |            |       | 2018-11-07 00:00:00 | 2019-01-11 00:00:00 | no     |     |               |              |               |
| customer\_id               | bigint       | The ASAPP internal customer identifier.                                                                                                            | 123008                                           |            |       | 2018-11-07 00:00:00 | 2018-11-07 00:00:00 | no     |     |               |              |               |
| first\_utterance\_ts       | varchar(255) | Timestamp of the first customer message in the conversation.                                                                                       | 2018-09-05 19:58:06T00:01:16.203000+00:00        |            |       | 2018-11-07 00:00:00 | 2018-11-07 00:00:00 | no     |     |               |              |               |
| first\_utterance\_text     | varchar(255) | First message from the customer.                                                                                                                   | I need to pay my bill.                           |            |       | 2018-11-07 00:00:00 | 2018-11-07 00:00:00 | no     |     |               |              |               |
| first\_intent\_code        | varchar(255) | Code name which are used for classifying customer queries in first interaction                                                                     | PAYBILL                                          |            |       | 2018-11-07 00:00:00 | 2018-11-07 00:00:00 | no     |     |               |              |               |
| first\_intent\_code\_alt   | varchar(255) | alternative second best code name which are used for classifying customer queries in first interaction.                                            | PAYBILL                                          |            |       | 2018-11-07 00:00:00 | 2018-11-07 00:00:00 | no     |     |               |              |               |
| final\_intent\_code        | varchar(255) | The final code name classifying the customer's query, based on the flow navigated; defaults to the first interaction code if no flow was followed. | PAYBILL                                          |            |       | 2018-11-07 00:00:00 | 2018-11-07 00:00:00 | no     |     |               |              |               |
| intent\_path               | varchar(255) | A comma-separated list of all intent codes from the customer’s flow navigation. If no flow was navigated, this will match the first intent code.   | OUTAGE, CANT\_CONNECT                            |            |       | 2018-11-07 00:00:00 | 2018-11-07 00:00:00 | no     |     |               |              |               |
| disambig\_count            | bigint       | The number of times a disambiguation event was presented for an issue.                                                                             | 2                                                |            |       | 2018-11-07 00:00:00 | 2018-11-07 00:00:00 | no     |     |               |              |               |
| ftd\_visit                 | boolean      | Indicates whether free-text disambiguation was used to help the customer present a clearer intent, based on the number of texts sent to AI.        | false, true                                      |            |       | 2018-11-07 00:00:00 | 2018-11-07 00:00:00 | no     |     |               |              |               |
| faq\_id                    | varchar(255) | The last faq-id presented for an issue.                                                                                                            | FORGOT\_LOGIN\_faq                               |            |       | 2018-11-07 00:00:00 | 2018-11-07 00:00:00 | no     |     |               |              |               |
| final\_action\_destination | varchar(255) | The last deep-link URL clicked during the issue resolution process.                                                                                | asapp-pil://acme-mobile/protection-plan-features |            |       | 2018-11-07 00:00:00 | 2018-11-07 00:00:00 | no     |     |               |              |               |
| is\_first\_intent\_correct | boolean      | Indicates whether the initial intent associated with the chat was correct, based on feedback from the agent.                                       | true, false                                      |            |       | 2018-11-07 00:00:00 | 2018-11-07 00:00:00 | no     |     |               |              |               |
| issue\_id                  | bigint       | The ASAPP issue or conversation id.                                                                                                                | 21352352                                         |            |       | 2018-11-07 00:00:00 | 2018-11-07 00:00:00 | no     |     |               |              |               |
| first\_rep\_id             | varchar(191) | The first ASAPP rep/agent identifier found in a window of time.                                                                                    | 123008                                           |            |       | 2018-11-07 00:00:00 | 2018-11-07 00:00:00 | no     |     |               |              |               |
| company\_name              | varchar(255) | Name of the company associated with the data.                                                                                                      | acme                                             |            |       | 2019-11-01 00:00:00 | 2024-05-24 00:00:00 | no     |     |               |              |               |

### Table: convos\_metadata

This convos\_metadata table contains data associated with a conversation/ issue during a specific 15 minute window. This table will include data from unended conversations. Expect to see columns containing the app\_version, the conversation\_end timestamp and whether it was escalated to chat or not.

**Sync Time:** 1h

**Unique Condition:** issue\_id

| Column                                        | Type                        | Description                                                                                                                                                                                                 | Example                                                                       | Aggregates | Notes | Date Added          | Date Modified       | Ignore | PII | release state | Specific Use | Feature Group |
| :-------------------------------------------- | :-------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------- | :--------- | :---- | :------------------ | :------------------ | :----- | :-- | :------------ | :----------- | :------------ |
| company\_id                                   | bigint                      | DEPRECATED 2024-03-25                                                                                                                                                                                       | 10001                                                                         |            |       | 2018-11-26 00:00:00 | 2018-11-26 00:00:00 | no     |     |               |              |               |
| company\_subdivision                          | varchar(255)                | String identifier for the company subdivision associated with the conversation.                                                                                                                             | ACMEsubcorp                                                                   |            |       | 2018-11-26 00:00:00 | 2018-11-26 00:00:00 | no     |     |               |              |               |
| company\_segments                             | varchar(255)                | String with comma separated segments for the company enclosed by square brackets.                                                                                                                           | marketing,promotions                                                          |            |       | 2018-11-26 00:00:00 | 2018-11-26 00:00:00 | no     |     |               |              |               |
| first\_utterance\_ts                          | timestamp                   | Timestamp of the first customer message in the conversation.                                                                                                                                                | 2018-09-05 19:58:06                                                           |            |       | 2018-11-26 00:00:00 | 2018-11-26 00:00:00 | no     |     |               |              |               |
| first\_utterance\_text                        | varchar(255)                | First message content from the customer.                                                                                                                                                                    | "Hello, please assist me"                                                     |            |       | 2019-01-11 00:00:00 | 2019-01-11 00:00:00 | no     |     |               |              |               |
| issue\_created\_ts                            | timestamp                   | Timestamp of the "NEW\_ISSUE" event for an issue.                                                                                                                                                           | 2018-09-05 19:58:06                                                           |            |       | 2019-10-15 00:00:00 | 2019-10-15 00:00:00 | no     |     |               |              |               |
| last\_event\_ts                               | timestamp                   | The timestamp of the last event for an issue.                                                                                                                                                               | 2018-09-05 19:58:06                                                           |            |       | 2019-09-16 00:00:00 | 2019-09-16 00:00:00 | no     |     |               |              |               |
| last\_srs\_event\_ts                          | timestamp without time zone | Timestamp of the last bot assisted event.                                                                                                                                                                   | 2018-09-05 19:58:06                                                           |            |       | 2018-11-26 00:00:00 | 2018-11-26 00:00:00 | no     |     |               |              |               |
| conversation\_end\_ts                         | timestamp                   | Timestamp when the conversation ended.                                                                                                                                                                      | 2018-09-05 19:58:06                                                           |            |       | 2018-11-26 00:00:00 | 2018-11-26 00:00:00 | no     |     |               |              |               |
| issue\_id                                     | bigint                      | The ASAPP issue or conversation id.                                                                                                                                                                         | 21352352                                                                      |            |       | 2018-11-26 00:00:00 | 2018-11-26 00:00:00 | no     |     |               |              |               |
| session\_id                                   | varchar(128)                | The ASAPP session identifier. It is a uuid generated by the chat backend. Note: a session may contain several conversations.                                                                                | 347bdddb-d3a1-45fc-bbcd-dbd3a175fc1c                                          |            |       | 2018-11-26 00:00:00 | 2020-10-24 00:00:00 | no     |     |               |              |               |
| session\_type                                 | character varying(255)      | ASAPP session type.                                                                                                                                                                                         | asapp-uuid                                                                    |            |       | 2018-11-26 00:00:00 | 2020-10-24 00:00:00 | no     |     |               |              |               |
| session\_event\_type                          | character varying(255)      | Basic type of the session event.                                                                                                                                                                            | UPDATE, CREATE                                                                |            |       | 2018-11-26 00:00:00 | 2020-10-24 00:00:00 | no     |     |               |              |               |
| internal\_session\_id                         | character varying(255)      | Internal identifier for the ASAPP session.                                                                                                                                                                  | 347bdddb-d3a1-45fc-bbcd-dbd3a175fc1c                                          |            |       | 2019-04-30 00:00:00 | 2019-04-30 00:00:00 | no     |     |               |              |               |
| internal\_session\_type                       | character varying(255)      | An ASAPP session type for internal use.                                                                                                                                                                     | asapp-uuid                                                                    |            |       | 2018-11-26 00:00:00 | 2018-11-26 00:00:00 | no     |     |               |              |               |
| internal\_user\_identifier                    | varchar(255)                | The ASAPP customer identifier while using the asapp system. This identifier may represent either a rep or a customer. Use the internal\_user\_type field to determine which type the identifier represents. | 123004                                                                        |            |       | 2018-11-26 00:00:00 | 2018-11-26 00:00:00 | no     |     |               |              |               |
| internal\_user\_session\_type                 | varchar(255)                | The customer ASAPP session type.                                                                                                                                                                            | customer                                                                      |            |       | 2018-11-26 00:00:00 | 2018-11-26 00:00:00 | no     |     |               |              |               |
| external\_session\_id                         | character varying(255)      | Client-provided session identifier passed to the SDK during chat initialization.                                                                                                                            | 062906ff-3821-4b5d-9443-ed4fecbda129                                          |            |       | 2018-11-26 00:00:00 | 2020-10-24 00:00:00 | no     |     |               |              |               |
| external\_session\_type                       | character varying(255)      | Client-provided session type passed to the SDK during chat initialization.                                                                                                                                  | visitID                                                                       |            |       | 2018-11-26 00:00:00 | 2020-10-24 00:00:00 | no     |     |               |              |               |
| external\_user\_id                            | varchar(255)                | Customer identifier provided by the client, available if the customer is authenticated.                                                                                                                     | EECACBD227CCE91BAF5128DFF4FFDBEC                                              |            |       | 2018-11-26 00:00:00 | 2020-10-24 00:00:00 | no     |     |               |              |               |
| external\_user\_type                          | varchar(255)                | The type of external user identifier.                                                                                                                                                                       | acme\_CUSTOMER\_ACCOUNT\_ID                                                   |            |       | 2018-11-26 00:00:00 | 2020-10-24 00:00:00 | no     |     |               |              |               |
| external\_issue\_id                           | character varying(255)      | Client-provided issue identifier passed to the SDK (currently unused).                                                                                                                                      |                                                                               |            |       | 2018-11-26 00:00:00 | 2020-10-24 00:00:00 | no     |     |               |              |               |
| external\_channel                             | character varying(255)      | Client-provided customer channel passed to the SDK (currently unused).                                                                                                                                      |                                                                               |            |       | 2018-11-26 00:00:00 | 2020-10-24 00:00:00 | no     |     |               |              |               |
| customer\_id                                  | bigint                      | ASAPP customer id                                                                                                                                                                                           | 1470001                                                                       |            |       | 2018-11-26 00:00:00 | 2018-11-26 00:00:00 | no     |     |               |              |               |
| escalated\_to\_chat                           | bigint                      | Flag indicating whether the issue was escalated to an agent. false, true                                                                                                                                    | 1                                                                             |            |       | 2018-11-26 00:00:00 | 2020-10-24 00:00:00 | no     |     |               |              |               |
| platform                                      | varchar(255)                | A value indicating which consumer platform was used.                                                                                                                                                        | ios, android, web                                                             |            |       | 2018-11-26 00:00:00 | 2018-11-26 00:00:00 | no     |     |               |              |               |
| device\_type                                  | varchar(255)                | The last device type used by the customer for an issue.                                                                                                                                                     | mobile, tablet, desktop, watch, unknown                                       |            |       | 2019-06-17 00:00:00 | 2019-06-17 00:00:00 | no     |     |               |              |               |
| first\_agent\_id                              | varchar(191)                | deprecated: 2019-09-25                                                                                                                                                                                      | 123008                                                                        |            |       | 2022-01-04 00:00:00 | 2022-01-04 00:00:00 | no     |     |               |              |               |
| last\_agent\_id                               | varchar(191)                | deprecated: 2019-09-25                                                                                                                                                                                      | 123008                                                                        |            |       | 2022-01-04 00:00:00 | 2022-01-04 00:00:00 | no     |     |               |              |               |
| external\_agent\_id                           | varchar(255)                | deprecated: 2019-09-25                                                                                                                                                                                      | 347bdddb-d3a1-45fc-bbcd-dbd3a175fc1c                                          |            |       | 2022-01-04 00:00:00 | 2022-01-04 00:00:00 | no     |     |               |              |               |
| assigned\_to\_rep\_time                       | timestamp                   | Time when the issue was first assigned to a rep, if applicable.                                                                                                                                             | 2018-09-05 19:58:06                                                           |            |       | 2018-11-26 00:00:00 | 2018-11-26 00:00:00 | no     |     |               |              |               |
| disposition\_event\_type                      | varchar(255)                | Event type indicating how the conversation ended.                                                                                                                                                           | resolved, unresolved, timeout                                                 |            |       | 2018-11-26 00:00:00 | 2018-11-26 00:00:00 | no     |     |               |              |               |
| disposition\_ts                               | timestamp                   | Timestamp when the rep exited the issue or conversation.                                                                                                                                                    | 2018-09-05 19:58:06                                                           |            |       | 2018-11-26 00:00:00 | 2018-11-26 00:00:00 | no     |     |               |              |               |
| termination\_event\_type                      | varchar(255)                | Event type indicating the reason for conversation termination.                                                                                                                                              | customer, agent, autoend                                                      |            |       | 2018-11-26 00:00:00 | 2018-11-26 00:00:00 | no     |     |               |              |               |
| disposition\_notes                            | text                        | Notes added by the last rep after marking the chat as completed.                                                                                                                                            | "The customer wanted to pay his bill. We successfully processed his payment." |            |       | 2018-11-26 00:00:00 | 2018-11-26 00:00:00 | no     |     |               |              |               |
| ended\_resolved                               | integer                     | 1 if the rep marked the conversation resolved, 0 otherwise.                                                                                                                                                 | 1, 0                                                                          |            |       | 2019-04-30 00:00:00 | 2019-04-30 00:00:00 | no     |     |               |              |               |
| ended\_unresolved                             | integer                     | 1 if the rep marked the conversation unresolved, 0 otherwise.                                                                                                                                               | 0, 1                                                                          |            |       | 2019-04-30 00:00:00 | 2019-04-30 00:00:00 | no     |     |               |              |               |
| ended\_timeout                                | integer                     | 1 if the customer timed out or abandoned chat, 0 otherwise.                                                                                                                                                 | 0, 1                                                                          |            |       | 2019-04-30 00:00:00 | 2019-04-30 00:00:00 | no     |     |               |              |               |
| ended\_auto                                   | integer                     | 1 if the rep did not disposition the issue and it was auto-ended.                                                                                                                                           | 0, 1                                                                          |            |       | 2019-04-30 00:00:00 | 2019-04-30 00:00:00 | no     |     |               |              |               |
| ended\_other                                  | integer                     | 1 if the customer or rep terminated the issue but the rep didn't disposition the issue.                                                                                                                     | 0, 1                                                                          |            |       | 2019-04-30 00:00:00 | 2019-04-30 00:00:00 | no     |     |               |              |               |
| app\_version\_asapp                           | varchar(255)                | ASAPP API version used during customer event or request.                                                                                                                                                    | com.asapp.api\_api:-2f1a053f70c57f94752e7616b66f56d7bf1d6675                  |            |       | 2018-11-26 00:00:00 | 2018-11-26 00:00:00 | no     |     |               |              |               |
| app\_version\_client                          | varchar(255)                | ASAPP SDK version used during customer event or request.                                                                                                                                                    | web-sdk-4.0.0                                                                 |            |       | 2018-11-26 00:00:00 | 2018-11-26 00:00:00 | no     |     |               |              |               |
| session\_metadata                             | character varying(65535)    | Additional metadata information about the session, provided by the client.                                                                                                                                  |                                                                               |            |       | 2018-11-26 00:00:00 | 2018-11-26 00:00:00 | no     |     |               |              |               |
| last\_sequence\_id                            | integer                     | Last sequence identifier associated with the issue.                                                                                                                                                         | 115                                                                           |            |       | 2019-04-30 00:00:00 | 2019-04-30 00:00:00 | no     |     |               |              |               |
| issue\_queue\_id                              | varchar(255)                | Queue identifier associated with the issue.                                                                                                                                                                 | 20001                                                                         |            |       | 2019-04-30 00:00:00 | 2019-04-30 00:00:00 | no     |     |               |              |               |
| issue\_queue\_name                            | varchar(255)                | Queue name associated with the issue.                                                                                                                                                                       | acme-wireless-english                                                         |            |       | 2019-04-30 00:00:00 | 2019-04-30 00:00:00 | no     |     |               |              |               |
| csat\_rating                                  | double precision            | Customer Satisfaction (CSAT) rating for the issue.                                                                                                                                                          | 400.0                                                                         |            |       | 2019-04-30 00:00:00 | 2019-04-30 00:00:00 | no     |     |               |              |               |
| sentiment\_valence                            | character varying(50)       | Sentiment of the issue.                                                                                                                                                                                     | Neutral, Negative                                                             |            |       | 2019-04-30 00:00:00 | 2019-04-30 00:00:00 | no     |     |               |              |               |
| deep\_link\_queue                             | character varying(65535)    | Deeplink queued for the issue.                                                                                                                                                                              |                                                                               |            |       | 2019-04-30 00:00:00 | 2019-04-30 00:00:00 | no     |     |               |              |               |
| end\_srs\_selection                           | character varying(65535)    | User selected button upon end\_srs.                                                                                                                                                                         |                                                                               |            |       | 2019-04-30 00:00:00 | 2019-04-30 00:00:00 | no     |     |               |              |               |
| trigger\_link                                 | VARCHAR                     | deprecated: 2020-04-25 aliases: current\_page\_url                                                                                                                                                          |                                                                               |            |       | 2022-01-04 00:00:00 | 2022-01-04 00:00:00 | no     |     |               |              |               |
| auth\_state                                   | varchar(3)                  | Flag indicating if the user is authenticated.                                                                                                                                                               | false, true                                                                   |            |       | 2019-04-30 00:00:00 | 2019-04-30 00:00:00 | no     |     |               |              |               |
| auth\_external\_token\_id                     | character varying(65535)    | Encrypted user identifier, provided by the client system, associated with the first authentication event for an issue.                                                                                      | 82EFDDADC5466501443E3E61ED640162                                              |            |       | 2019-05-15 00:00:00 | 2019-05-17 00:00:00 | no     |     |               |              |               |
| auth\_source                                  | character varying(65535)    | Source of the first authentication event for an issue.                                                                                                                                                      | ivr-url                                                                       |            |       | 2019-05-15 00:00:00 | 2019-05-17 00:00:00 | no     |     |               |              |               |
| auth\_external\_user\_type                    | character varying(65535)    | External user type of the first authentication event for an issue.                                                                                                                                          | ACME\_CUSTOMER\_ACCOUNT\_ID                                                   |            |       | 2019-05-15 00:00:00 | 2019-05-17 00:00:00 | no     |     |               |              |               |
| auth\_external\_user\_id                      | character varying(65535)    | User ID provided by the client for the first authentication event.                                                                                                                                          | 9BE62CCD564D6982FF305DEBCEAABBB5                                              |            |       | 2019-05-15 00:00:00 | 2019-07-16 00:00:00 | no     |     |               |              |               |
| is\_review\_required                          | boolean                     | Flag indicates whether an admin must review this issue. data type: boolean data type: boolean                                                                                                               | true, false                                                                   |            |       | 2019-07-24 00:00:00 | 2019-07-24 00:00:00 | no     |     |               |              |               |
| mid\_issue\_auth\_ts                          | timestamp without time zone | Time when the user authenticates during the middle of an issue,                                                                                                                                             | 2020-01-11 08:13:26.094                                                       |            |       | 2019-07-24 00:00:00 | 2019-07-24 00:00:00 | no     |     |               |              |               |
| first\_rep\_id                                | varchar(191)                | ASAPP provided identifier for the first rep involved with the issue.                                                                                                                                        | 60001                                                                         |            |       | 2019-09-26 00:00:00 | 2019-09-26 00:00:00 | no     |     |               |              |               |
| last\_rep\_id                                 | varchar(191)                | ASAPP provided identifier for the last rep involved with the issue.                                                                                                                                         | 60001                                                                         |            |       | 2019-09-26 00:00:00 | 2019-09-26 00:00:00 | no     |     |               |              |               |
| external\_rep\_id                             | varchar(255)                | Client-provided identifier for the rep.                                                                                                                                                                     | 0671018510                                                                    |            |       | 2019-09-26 00:00:00 | 2019-09-26 00:00:00 | no     |     |               |              |               |
| company\_name                                 | varchar(255)                | Name of the company associated with the data.                                                                                                                                                               | acme                                                                          |            |       | 2019-11-01 00:00:00 | 2024-05-24 00:00:00 | no     |     |               |              |               |
| first\_voice\_customer\_state                 | varchar(255)                | Initial state assigned to the customer when using voice.                                                                                                                                                    | IDENTIFIED                                                                    |            |       | 2019-11-21 00:00:00 | 2019-11-21 00:00:00 | no     |     |               |              |               |
| first\_voice\_customer\_state\_ts             | timestamp                   | 2020-01-11 08:13:26.094                                                                                                                                                                                     | 2018-09-05 19:58:06                                                           |            |       | 2019-11-21 00:00:00 | 2019-11-21 00:00:00 | no     |     |               |              |               |
| first\_voice\_identified\_customer\_state\_ts | timestamp                   | Time when the customer was first assigned an IDENTIFIED state.                                                                                                                                              | 2020-01-11 08:13:26.094                                                       |            |       | 2019-11-21 00:00:00 | 2019-11-21 00:00:00 | no     |     |               |              |               |
| first\_voice\_verified\_customer\_state\_ts   | timestamp                   | Time when the customer was first assigned an VERIFIED state.                                                                                                                                                | 2020-01-11 08:13:26.094                                                       |            |       | 2019-11-21 00:00:00 | 2019-11-21 00:00:00 | no     |     |               |              |               |
| merged\_ts                                    | timestamp                   | Time when the issue was merged into another issue. data type: timestamp                                                                                                                                     | 2020-01-11 08:13:26.094                                                       |            |       | 2019-12-28 00:00:00 | 2019-12-28 00:00:00 | no     |     |               |              |               |
| desk\_mode\_flag                              | bigint                      | Bitmap encodes if agent handled voice-issue ASAPP desk, had engagement with ASAPP desk. bitmap: 0: null, 1: 'VOICE', 2: 'DESK', 4: 'ENGAGEMENT',  8: 'INACTIVITY' NULL for non voice issues                 | 0, 1, 2, 5, 7                                                                 |            |       | 2020-02-19 00:00:00 | 2020-02-19 00:00:00 | no     |     |               |              |               |
| desk\_mode\_string                            | varchar(191)                | Decodes the desk\_mode flag. Current possible values (Null, 'VOICE', 'VOICE\_DESK', 'VOICE\_DESK\_ENGAGEMENT','VOICE\_INACTIVITY'). NULL for non voice issues.                                              | VOICE\_DESK                                                                   |            |       | 2020-02-19 00:00:00 | 2020-02-19 00:00:00 | no     |     |               |              |               |
| current\_page\_url                            | varchar(2000)               | URL link (stripped of parameters) that triggered the start chat event. Only applicable for WEB platforms. aliases: trigger\_link                                                                            | https:[www.acme.corp/billing/viewbill](http://www.acme.corp/billing/viewbill) |            |       | 2020-04-24 00:00:00 | 2020-04-24 00:00:00 | no     |     |               |              |               |
| raw\_current\_page\_url                       |                             | Full URL link (including parameters) that triggered the chat event. Only applicable for WEB platforms. aliases: raw\_trigger\_link                                                                          |                                                                               |            |       | 2020-04-25 00:00:00 | 2020-04-25 00:00:00 | no     |     |               |              |               |
| language\_code                                | VARCHAR(32)                 | Language code for the issue\_id                                                                                                                                                                             | English                                                                       |            |       | 2022-01-04 00:00:00 | 2022-01-04 00:00:00 | no     |     |               |              |               |

### Table: convos\_metadata\_ended

The convos\_metadata table contains data associated with a conversation/issue during a specific 15 minute window. Expect to see columns containing the app\_version, the conversation\_end timestamp and whether it was escalated to chat or not. This table will filter out data from unended conversations. This export removes any unended issues and any issues which contained no chat activity.

**Sync Time:** 1h

**Unique Condition:** issue\_id

| Column                                        | Type                        | Description                                                                                                                                                                                                               | Example                                                                                  | Aggregates | Notes | Date Added                       | Date Modified                    | Ignore | PII | release state | Specific Use | Feature Group |
| :-------------------------------------------- | :-------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :--------------------------------------------------------------------------------------- | :--------- | :---- | :------------------------------- | :------------------------------- | :----- | :-- | :------------ | :----------- | :------------ |
| company\_id                                   | bigint                      | DEPRECATED 2024-03-25                                                                                                                                                                                                     | 10001                                                                                    |            |       | 2018-11-26 00:00:00              | 2018-11-26 00:00:00              | no     |     |               |              |               |
| company\_subdivision                          | varchar(255)                | String identifier for the company subdivision associated with the conversation.                                                                                                                                           | ACMEsubcorp                                                                              |            |       | 2018-11-26 00:00:00              | 2018-11-26 00:00:00              | no     |     |               |              |               |
| company\_segments                             | varchar(255)                | String with comma separated segments for the company enclosed by square brackets.                                                                                                                                         | marketing,promotions                                                                     |            |       | 2018-11-26 00:00:00              | 2018-11-26 00:00:00              | no     |     |               |              |               |
| first\_utterance\_ts                          | timestamp                   | Timestamp of the first customer message in the conversation.                                                                                                                                                              | 2019-09-22T13:12:26.073000+00:00                                                         |            |       | 2018-11-26 00:00:00              | 2018-11-26 00:00:00              | no     |     |               |              |               |
| first\_utterance\_text                        | varchar(65535)              | First message content from the customer.                                                                                                                                                                                  | "Hello, please assist me"                                                                |            |       | 2019-01-11 00:00:00              | 2022-06-08 00:00:00              | no     |     |               |              |               |
| issue\_created\_ts                            | timestamp                   | Timestamp when the "NEW\_ISSUE" event occurred.                                                                                                                                                                           | 2019-11-21T19:11:01.748000+00:00                                                         |            |       | 2019-10-15 13:12:26.073000+00:00 | 2019-10-15 13:12:26.073000+00:00 | no     |     |               |              |               |
| last\_event\_ts                               | timestamp                   | Timestamp of the last event in the issue.                                                                                                                                                                                 | 2019-09-23T14:00:09.043000+00:00                                                         |            |       | 2019-09-16 00:00:00              | 2019-09-16 00:00:00              | no     |     |               |              |               |
| last\_srs\_event\_ts                          | timestamp without time zone | Timestamp of the last bot assisted event.                                                                                                                                                                                 | 2019-09-22T13:12:26.131000+00:00                                                         |            |       | 2018-11-26 00:00:00              | 2018-11-26 00:00:00              | no     |     |               |              |               |
| conversation\_end\_ts                         | timestamp                   | Timestamp when the conversation ended.                                                                                                                                                                                    | 2019-10-08T14:00:07.395000+00:00                                                         |            |       | 2018-11-26 00:00:00              | 2018-11-26 00:00:00              | no     |     |               |              |               |
| issue\_id                                     | bigint                      | The ASAPP issue or conversation id.                                                                                                                                                                                       | 21352352                                                                                 |            |       | 2018-11-26 00:00:00              | 2018-11-26 00:00:00              | no     |     |               |              |               |
| session\_id                                   | varchar(128)                | The ASAPP session identifier. It is a uuid generated by the chat backend. Note: a session may contain several conversations.                                                                                              | 347bdddb-d3a1-45fc-bbcd-dbd3a175fc1c                                                     |            |       | 2018-11-26 00:00:00              | 2020-10-24 00:00:00              | no     |     |               |              |               |
| session\_type                                 | character varying(255)      | ASAPP session type.                                                                                                                                                                                                       | asapp-uuid                                                                               |            |       | 2018-11-26 00:00:00              | 2020-10-24 00:00:00              | no     |     |               |              |               |
| session\_event\_type                          | character varying(255)      | Basic type of the session event.                                                                                                                                                                                          | CREATE, UPDATE, DELETE                                                                   |            |       | 2018-11-26 00:00:00              | 2019-01-11 00:00:00              | no     |     |               |              |               |
| internal\_session\_id                         | character varying(255)      | Internal identifier for the ASAPP session.                                                                                                                                                                                | 347bdddb-d3a1-45fc-bbcd-dbd3a175fc1c                                                     |            |       | 2019-01-11 00:00:00              | 2019-01-11 00:00:00              | no     |     |               |              |               |
| internal\_session\_type                       | character varying(255)      | An ASAPP session type for internal use.                                                                                                                                                                                   | asapp-uuid                                                                               |            |       | 2019-01-11 00:00:00              | 2019-01-11 00:00:00              | no     |     |               |              |               |
| internal\_user\_identifier                    | varchar(255)                | The ASAPP customer identifier while using the asapp system.  This identifier may represent either a rep or a customer. Use the the internal\_user\_session\_type field to determine which type the identifier represents. | 123004                                                                                   |            |       | 2018-11-26 00:00:00              | 2018-12-06 00:00:00              | no     |     |               |              |               |
| internal\_user\_session\_type                 | varchar(255)                | The customer ASAPP session type.                                                                                                                                                                                          | customer                                                                                 |            |       | 2018-11-26 00:00:00              | 2018-11-26 00:00:00              | no     |     |               |              |               |
| external\_session\_id                         | character varying(255)      | Client-provided session identifier passed to the SDK during chat initialization.                                                                                                                                          | 062906ff-3821-4b5d-9443-ed4fecbda129                                                     |            |       | 2018-11-26 00:00:00              | 2020-10-24 00:00:00              | no     |     |               |              |               |
| external\_session\_type                       | character varying(255)      | Client-provided session type passed to the SDK during chat initialization.                                                                                                                                                | visitID                                                                                  |            |       | 2018-11-26 00:00:00              | 2020-10-24 00:00:00              | no     |     |               |              |               |
| external\_user\_id                            | varchar(255)                | Customer identifier provided by the client, available if the customer is authenticated.                                                                                                                                   | MjU0ZTRiMDQyNDVlNTcyNWNlOTljNmI1NDc2NWQzNzdmNmJmZTFjZDgyY2IwMzc3MDkwZDI5YmQwZDlkODJhNA== |            |       | 2018-11-26 00:00:00              | 2020-10-24 00:00:00              | no     |     |               |              |               |
| external\_user\_type                          | varchar(255)                | The type of external user identifier.                                                                                                                                                                                     | acme\_CUSTOMER\_ACCOUNT\_ID                                                              |            |       | 2018-11-26 00:00:00              | 2020-10-24 00:00:00              | no     |     |               |              |               |
| external\_issue\_id                           | character varying(255)      | Client-provided issue identifier passed to the SDK (currently unused).                                                                                                                                                    |                                                                                          |            |       | 2018-11-26 00:00:00              | 2020-10-24 00:00:00              | no     |     |               |              |               |
| external\_channel                             | character varying(255)      | Client-provided customer channel passed to the SDK (currently unused).                                                                                                                                                    |                                                                                          |            |       | 2018-11-26 00:00:00              | 2020-10-24 00:00:00              | no     |     |               |              |               |
| customer\_id                                  | bigint                      | An ASAPP customer identifier.                                                                                                                                                                                             | 1470001                                                                                  |            |       | 2018-11-26 00:00:00              | 2018-11-26 00:00:00              | no     |     |               |              |               |
| escalated\_to\_chat                           | bigint                      | 1 if an issue escalated to live chat, 0 if not                                                                                                                                                                            | 1                                                                                        |            |       | 2018-11-26 00:00:00              | 2018-11-26 00:00:00              | no     |     |               |              |               |
| platform                                      | varchar(255)                | The consumer platform in use.                                                                                                                                                                                             | ios, android, web, voice                                                                 |            |       | 2018-11-26 00:00:00              | 2018-11-26 00:00:00              | no     |     |               |              |               |
| device\_type                                  | varchar(255)                | The last device type used by the customer for an issue.                                                                                                                                                                   | mobile, tablet, desktop, watch, unknown                                                  |            |       | 2019-06-17 00:00:00              | 2019-06-17 00:00:00              | no     |     |               |              |               |
| first\_agent\_id                              | varchar(191)                | deprecated: 2019-09-25                                                                                                                                                                                                    | 123008                                                                                   |            |       | 2018-11-26 00:00:00              | 2018-11-26 00:00:00              | no     |     |               |              |               |
| last\_agent\_id                               | varchar(191)                | deprecated: 2019-09-25                                                                                                                                                                                                    | 123008                                                                                   |            |       | 2018-11-26 00:00:00              | 2018-11-26 00:00:00              | no     |     |               |              |               |
| external\_agent\_id                           | varchar(255)                | deprecated: 2019-09-25                                                                                                                                                                                                    | 347bdddb-d3a1-45fc-bbcd-dbd3a175fc1c                                                     |            |       | 2018-11-26 00:00:00              | 2018-11-26 00:00:00              | no     |     |               |              |               |
| assigned\_to\_rep\_time                       | timestamp                   | Timestamp when the issue was first assigned to a rep, if applicable.                                                                                                                                                      | 2018-09-05 19:58:06T16:14:57.289000+00:00                                                |            |       | 2018-11-26 00:00:00              | 2018-11-26 00:00:00              | no     |     |               |              |               |
| disposition\_event\_type                      | varchar(255)                | Event type indicating how the conversation ended.                                                                                                                                                                         | resolved, unresolved, timeout                                                            |            |       | 2018-11-26 00:00:00              | 2018-11-26 00:00:00              | no     |     |               |              |               |
| disposition\_ts                               | timestamp                   | Timestamp when the rep exited the issue or conversation.                                                                                                                                                                  | 2018-09-05 19:58:06T16:14:57.289000+00:00                                                |            |       | 2018-11-26 00:00:00              | 2018-11-26 00:00:00              | no     |     |               |              |               |
| termination\_event\_type                      | varchar(255)                | Event type indicating the reason for conversation termination.                                                                                                                                                            | customer, agent, autoend                                                                 |            |       | 2018-11-26 00:00:00              | 2018-11-26 00:00:00              | no     |     |               |              |               |
| disposition\_notes                            | text                        | Notes added by the last rep after marking the chat as completed.                                                                                                                                                          | "The customer wanted to pay his bill. We successfully processed his payment."            |            |       | 2018-11-26 00:00:00              | 2018-11-26 00:00:00              | no     |     |               |              |               |
| ended\_resolved                               | integer                     | Indicator (1 or 0) for whether the rep marked the conversation as resolved.                                                                                                                                               | 1, 0                                                                                     |            |       | 2019-04-30 00:00:00              | 2019-05-01 00:00:00              | no     |     |               |              |               |
| ended\_unresolved                             | integer                     | Indicator (1 or 0) for whether the rep marked the conversation as unresolved.                                                                                                                                             | 0, 1                                                                                     |            |       | 2019-04-30 00:00:00              | 2019-05-01 00:00:00              | no     |     |               |              |               |
| ended\_timeout                                | integer                     | Indicator (1 or 0) for whether the customer abandoned or timed out of the chat.                                                                                                                                           | 0, 1                                                                                     |            |       | 2019-04-30 00:00:00              | 2019-04-30 00:00:00              | no     |     |               |              |               |
| ended\_auto                                   | integer                     | Indicator (1 or 0) for whether the issue was auto-ended without rep disposition.                                                                                                                                          | 0, 1                                                                                     |            |       | 2019-04-30 00:00:00              | 2019-05-01 00:00:00              | no     |     |               |              |               |
| ended\_other                                  | integer                     | Indicator (1 or 0) for whether the customer or rep terminated the issue without rep disposition.                                                                                                                          | 0, 1                                                                                     |            |       | 2019-04-30 00:00:00              | 2019-05-01 00:00:00              | no     |     |               |              |               |
| app\_version\_asapp                           | varchar(255)                | ASAPP API version used during customer event or request.                                                                                                                                                                  | com.asapp.api\_api:-b393f2d920bb74ce5bbc4174ac5748acff6e8643                             |            |       | 2018-11-26 00:00:00              | 2018-11-26 00:00:00              | no     |     |               |              |               |
| app\_version\_client                          | varchar(255)                | ASAPP SDK version used during customer event or request.                                                                                                                                                                  | web-sdk-4.0.2                                                                            |            |       | 2018-11-26 00:00:00              | 2018-11-26 00:00:00              | no     |     |               |              |               |
| session\_metadata                             | character varying(65535)    | Additional metadata information about the session, provided by the client.                                                                                                                                                |                                                                                          |            |       | 2018-11-26 00:00:00              | 2018-11-26 00:00:00              | no     |     |               |              |               |
| last\_sequence\_id                            | integer                     | Last sequence identifier associated with the issue.                                                                                                                                                                       | 25                                                                                       |            |       | 2019-01-11 00:00:00              | 2019-01-11 00:00:00              | no     |     |               |              |               |
| issue\_queue\_id                              | varchar(255)                | Queue identifier associated with the issue.                                                                                                                                                                               | 2001                                                                                     |            |       | 2019-01-11 00:00:00              | 2019-01-11 00:00:00              | no     |     |               |              |               |
| issue\_queue\_name                            | varchar(255)                | Queue name associated with the issue.                                                                                                                                                                                     | acme-mobile-english                                                                      |            |       | 2019-01-11 00:00:00              | 2019-01-11 00:00:00              | no     |     |               |              |               |
| csat\_rating                                  | double precision            | Customer Satisfaction (CSAT) rating for the issue.                                                                                                                                                                        | 400.0                                                                                    |            |       | 2019-01-11 00:00:00              | 2019-01-11 00:00:00              | no     |     |               |              |               |
| sentiment\_valence                            | character varying(50)       | Sentiment of the issue.                                                                                                                                                                                                   | Neutral, Negative                                                                        |            |       | 2019-01-11 00:00:00              | 2019-01-11 00:00:00              | no     |     |               |              |               |
| deep\_link\_queue                             | character varying(65535)    | Deeplink queued for the issue.                                                                                                                                                                                            |                                                                                          |            |       | 2019-01-11 00:00:00              | 2019-01-11 00:00:00              | no     |     |               |              |               |
| end\_srs\_selection                           | character varying(65535)    | User selected button option at the end of the session.                                                                                                                                                                    |                                                                                          |            |       | 2019-01-11 00:00:00              | 2019-01-11 00:00:00              | no     |     |               |              |               |
| trigger\_link                                 | VARCHAR                     | deprecated: 2020-04-25 aliases: current\_page\_url                                                                                                                                                                        |                                                                                          |            |       | 2018-11-26 00:00:00              | 2018-11-26 00:00:00              | no     |     |               |              |               |
| auth\_state                                   | varchar(3)                  | Flag indicating if the user is authenticated.                                                                                                                                                                             | 0, 1                                                                                     |            |       | 2018-11-26 00:00:00              | 2018-11-26 00:00:00              | no     |     |               |              |               |
| auth\_external\_token\_id                     | character varying(65535)    | A client provided field. Encrypted user ID from client system associated with the first authentication event for an issue.                                                                                                | 82EFDDADC5466501443E3E61ED640162                                                         |            |       | 2019-05-15 00:00:00              | 2019-05-17 00:00:00              | no     |     |               |              |               |
| auth\_source                                  | character varying(65535)    | The source of the first authentication event for an issue.                                                                                                                                                                | ivr-url                                                                                  |            |       | 2019-05-15 00:00:00              | 2019-05-17 00:00:00              | no     |     |               |              |               |
| auth\_external\_user\_type                    | character varying(65535)    | An external user type of the first authentication event for an issue.                                                                                                                                                     | ACME\_CUSTOMER\_ACCOUNT\_ID                                                              |            |       | 2019-05-15 00:00:00              | 2019-05-17 00:00:00              | no     |     |               |              |               |
| auth\_external\_user\_id                      | character varying(65535)    | External user ID provided by the client for the first authentication event.                                                                                                                                               | 9BE62CCD564D6982FF305DEBCEAABBB5                                                         |            |       | 2019-05-15 00:00:00              | 2019-07-16 00:00:00              | no     |     |               |              |               |
| is\_review\_required                          | boolean                     | Flag indicates whether an admin must review this issue. data type: boolean                                                                                                                                                | true, false                                                                              |            |       | 2019-07-24 00:00:00              | 2019-07-24 00:00:00              | no     |     |               |              |               |
| mid\_issue\_auth\_ts                          | timestamp without time zone | Time when the user authenticates during the middle of an issue.                                                                                                                                                           | 2020-01-18T03:43:41.414000+00:00                                                         |            |       | 2019-07-24 00:00:00              | 2019-07-24 00:00:00              | no     |     |               |              |               |
| first\_rep\_id                                | varchar(191)                | Identifier for the first rep involved with the issue.                                                                                                                                                                     | 60001                                                                                    |            |       | 2019-09-26 00:00:00              | 2019-09-26 00:00:00              | no     |     |               |              |               |
| last\_rep\_id                                 | varchar(191)                | Identifier for the last rep involved with the issue.                                                                                                                                                                      | 60001                                                                                    |            |       | 2019-09-26 00:00:00              | 2019-09-26 00:00:00              | no     |     |               |              |               |
| external\_rep\_id                             | varchar(255)                | Client-provided identifier for the rep.                                                                                                                                                                                   | 347bdddb-d3a1-45fc-bbcd-dbd3a175fc1c                                                     |            |       | 2019-09-26 00:00:00              | 2019-09-26 00:00:00              | no     |     |               |              |               |
| company\_name                                 | varchar(255)                | Name of the company associated with the data.                                                                                                                                                                             | acme                                                                                     |            |       | 2019-11-01 00:00:00              | 2024-05-24 00:00:00              | no     |     |               |              |               |
| first\_voice\_customer\_state                 | varchar(255)                | Initial state assigned to the customer when using voice.                                                                                                                                                                  | IDENTIFIED, VERIFIED                                                                     |            |       | 2019-11-21 00:00:00              | 2019-11-21 00:00:00              | no     |     |               |              |               |
| first\_voice\_customer\_state\_ts             | timestamp                   | Timestamp when the customer was first assigned a state.                                                                                                                                                                   | 2020-01-18T03:43:41.414000+00:00                                                         |            |       | 2019-11-21 00:00:00              | 2019-11-21 00:00:00              | no     |     |               |              |               |
| first\_voice\_identified\_customer\_state\_ts | timestamp                   | Time when the customer was first assigned an IDENTIFIED state.                                                                                                                                                            | 2020-01-18T03:43:41.414000+00:00                                                         |            |       | 2019-11-21 00:00:00              | 2019-11-21 00:00:00              | no     |     |               |              |               |
| first\_voice\_verified\_customer\_state\_ts   | timestamp                   | Time when the customer was first assigned an VERIFIED state.                                                                                                                                                              | 2020-01-18T03:43:41.414000+00:00                                                         |            |       | 2019-11-21 00:00:00              | 2019-11-21 00:00:00              | no     |     |               |              |               |
| merged\_ts                                    | timestamp                   | Time when the issue was merged into another issue. data type: timestamp                                                                                                                                                   | 2020-01-18T03:43:41.414000+00:00                                                         |            |       | 2019-12-28 00:00:00              | 2019-12-28 00:00:00              | no     |     |               |              |               |
| desk\_mode\_flag                              | bigint                      | Bitmap encodes if agent handled voice-issue ASAPP desk, had engagement with ASAPP desk. bitmap: 0: null, 1: 'VOICE', 2: 'DESK', 4: 'ENGAGEMENT',  8: 'INACTIVITY' NULL for non voice issues                               | 0, 1, 2, 5, 7                                                                            |            |       | 2020-02-19 00:00:00              | 2020-02-19 00:00:00              | no     |     |               |              |               |
| desk\_mode\_string                            | varchar(191)                | Decodes the desk\_mode flag. Current possible values (Null, 'VOICE', 'VOICE\_DESK', 'VOICE\_DESK\_ENGAGEMENT','VOICE\_INACTIVITY'). NULL for non voice issues.                                                            | VOICE\_DESK                                                                              |            |       | 2020-02-19 00:00:00              | 2020-02-19 00:00:00              | no     |     |               |              |               |
| current\_page\_url                            | varchar(2000)               | URL link (stripped of parameters) that triggered the start chat event. Only applicable for WEB platforms. aliases: trigger\_link                                                                                          | https:[www.acme.corp/billing/viewbill](http://www.acme.corp/billing/viewbill)            |            |       | 2020-04-25 00:00:00              | 2020-04-25 00:00:00              | no     |     |               |              |               |
| raw\_current\_page\_url                       |                             | Full URL link (including parameters) that triggered the chat event. Only applicable for WEB platforms. aliases: raw\_trigger\_link                                                                                        |                                                                                          |            |       | 2020-04-25 00:00:00              | 2020-04-25 00:00:00              | no     |     |               |              |               |

### Table: convos\_metrics

The convos\_metrics table contains counts of various metrics associated with an issue/conversation(e.g. "attempted to chat", "assisted"). The table contains data associated with an issue during a given 15 minute window. The convos\_metrics table will include unended conversation data.

**Sync Time:** 1h

**Unique Condition:** issue\_id

| Column                                   | Type         | Description                                                                                                                                                                                                                                                                                                             | Example                                 | Aggregates | Notes | Date Added          | Date Modified       | Ignore | PII | release state | Specific Use | Feature Group |
| :--------------------------------------- | :----------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------- | :--------- | :---- | :------------------ | :------------------ | :----- | :-- | :------------ | :----------- | :------------ |
| company\_subdivision                     | varchar(255) | String identifier for the company subdivision associated with the conversation.                                                                                                                                                                                                                                         | ACMEsubcorp                             |            |       | 2018-11-06 00:00:00 | 2018-11-06 00:00:00 | no     |     |               |              |               |
| company\_segments                        | varchar(255) | String with comma separated segments for the company enclosed by square brackets.                                                                                                                                                                                                                                       | marketing,promotions                    |            |       | 2018-11-06 00:00:00 | 2018-11-06 00:00:00 | no     |     |               |              |               |
| first\_utterance\_ts                     | timestamp    | Time of the first customer message in the conversation.                                                                                                                                                                                                                                                                 | 2019-05-16T02:47:13+00:00               |            |       | 2018-11-06 00:00:00 | 2018-11-06 00:00:00 | no     |     |               |              |               |
| conversation\_id                         | bigint       | deprecated: 2019-09-25                                                                                                                                                                                                                                                                                                  | 21352352                                |            |       | 2018-11-06 00:00:00 | 2018-11-14 00:00:00 | no     |     |               |              |               |
| customer\_id                             | bigint       | The ASAPP internal customer identifier.                                                                                                                                                                                                                                                                                 | 123008                                  |            |       | 2018-11-06 00:00:00 | 2018-11-06 00:00:00 | no     |     |               |              |               |
| platform                                 | varchar(255) | The platform which was used by the customer for a particular event or request (web, ios, android, applebiz, voice).                                                                                                                                                                                                     | web, ios, android, applebiz, voice      |            |       | 2018-11-06 00:00:00 | 2018-11-06 00:00:00 | no     |     |               |              |               |
| device\_type                             | varchar(255) | Last device type used by the customer for an issue.                                                                                                                                                                                                                                                                     | mobile, tablet, desktop, watch, unknown |            |       | 2019-06-18 00:00:00 | 2019-06-18 00:00:00 | no     |     |               |              |               |
| assisted                                 | tinyint(1)   | Flag indicates whether a rep was assigned and responded to the issue (1 if yes, 0 if no).                                                                                                                                                                                                                               | 0, 1                                    |            |       | 2018-11-06 00:00:00 | 2018-11-06 00:00:00 | no     |     |               |              |               |
| total\_handle\_time                      | double       | Total time in seconds that reps spent handling the issue, from assignment to disposition.                                                                                                                                                                                                                               | 168.093                                 |            |       | 2019-03-05 00:00:00 | 2019-03-05 00:00:00 | no     |     |               |              |               |
| total\_lead\_time                        | double       | Total time in seconds the customer spent interacting during the conversation, from assignment to last utterance.                                                                                                                                                                                                        | 163.222                                 |            |       | 2018-11-06 00:00:00 | 2019-03-05 00:00:00 | no     |     |               |              |               |
| total\_wrap\_up\_time                    | double       | Total time in seconds spent by reps wrapping up the conversation, calculated as the difference between handle and lead time.                                                                                                                                                                                            | 4.871                                   |            |       | 2018-11-06 00:00:00 | 2019-03-05 00:00:00 | no     |     |               |              |               |
| total\_session\_time                     | double       | Total time the customer spent seeking resolution, including time in queue and up until the conversation end event.                                                                                                                                                                                                      | 190.87900018692017                      |            |       | 2018-11-06 00:00:00 | 2019-03-05 00:00:00 | no     |     |               |              |               |
| customer\_sent\_msgs                     | double       | The total number of messages sent by the customer, including typed and tapped messages                                                                                                                                                                                                                                  | 1, 3, 5                                 |            |       | 2018-11-06 00:00:00 | 2018-11-06 00:00:00 | no     |     |               |              |               |
| agent\_sent\_msgs                        |              | deprecated: 2019-09-25                                                                                                                                                                                                                                                                                                  |                                         |            |       | 2018-11-06 00:00:00 | 2018-11-06 00:00:00 | no     |     |               |              |               |
| auto\_generated\_msgs                    | bigint(20)   | The number of messages sent by the AI system.                                                                                                                                                                                                                                                                           | 0,2                                     |            |       | 2018-11-06 00:00:00 | 2018-11-06 00:00:00 | no     |     |               |              |               |
| first\_rep\_response\_count              | bigint(20)   | The number of first responses by reps, post-assignment. This field will increment if there are transfers and timeouts and then reassigned and a rep answers. This field will NOT increment if a rep is assigned but doesn't get a chance to answer.                                                                     | 0, 1                                    |            |       | 2018-11-06 00:00:00 | 2018-11-06 00:00:00 | no     |     |               |              |               |
| total\_seconds\_to\_first\_rep\_response | bigint(20)   | Total time in seconds that passed before the rep responded to the customer.                                                                                                                                                                                                                                             | 407.5679998397827                       |            |       | 2018-11-06 00:00:00 | 2018-11-06 00:00:00 | no     |     |               |              |               |
| agent\_response\_count                   |              | deprecated: 2019-09-25                                                                                                                                                                                                                                                                                                  |                                         |            |       | 2018-11-06 00:00:00 | 2018-11-06 00:00:00 | no     |     |               |              |               |
| customer\_response\_count                | bigint(20)   | The total number of responses (excluding messages) sent by the customer.                                                                                                                                                                                                                                                | 0, 4                                    |            |       | 2018-11-06 00:00:00 | 2018-11-06 00:00:00 | no     |     |               |              |               |
| total\_rep\_seconds\_to\_respond         | double       | Total time in seconds the rep took to respond to the customer.                                                                                                                                                                                                                                                          | 407.5679998397827                       |            |       | 2018-11-06 00:00:00 | 2018-11-06 00:00:00 | no     |     |               |              |               |
| total\_cust\_seconds\_to\_respond        | double       | Total time in seconds the customer took to respond to the rep.                                                                                                                                                                                                                                                          | 65.87400007247925                       |            |       | 2018-11-06 00:00:00 | 2018-11-06 00:00:00 | no     |     |               |              |               |
| time\_in\_queue                          | double       | The cumulative time in seconds spent in queue, including all re-queues.                                                                                                                                                                                                                                                 | 78.30999994277954                       |            |       | 2018-11-06 00:00:00 | 2018-11-06 00:00:00 | no     |     |               |              |               |
| auto\_suggest\_msgs                      | bigint(20)   | Total time spent by the customer in the queue, including any re-queues.                                                                                                                                                                                                                                                 | 0, 1, 3                                 |            |       | 2018-11-06 00:00:00 | 2018-11-06 00:00:00 | no     |     |               |              |               |
| auto\_complete\_msgs                     | bigint(20)   | The number of autocomplete messages sent by a rep.                                                                                                                                                                                                                                                                      | 0, 1, 3                                 |            |       | 2018-11-06 00:00:00 | 2018-11-06 00:00:00 | no     |     |               |              |               |
| auto\_wait\_for\_agent\_msgs             | bigint       | deprecated: 2019-09-25                                                                                                                                                                                                                                                                                                  |                                         |            |       | 2018-11-06 00:00:00 | 2018-11-06 00:00:00 | no     |     |               |              |               |
| customer\_wait\_for\_agent\_msgs         | bigint       | deprecated: 2019-09-25                                                                                                                                                                                                                                                                                                  |                                         |            |       | 2018-11-06 00:00:00 | 2018-11-06 00:00:00 | no     |     |               |              |               |
| attempted\_chat                          | tinyint(1)   | TinyInt value indicates if there was an attempt to connect the customer to an rep. A value of 1 if the customer receives an out of business hours message or if a customer was asked to wait for a rep. Also a value of 1 if customer was escalated to chat. deprecation-date: 2020-04-14 expected-eol-date: 2021-10-15 | 0, 1                                    |            |       | 2018-11-06 00:00:00 | 2019-07-26 00:00:00 | no     |     |               |              |               |
| out\_business\_ct                        | bigint       | The number of times that a customer received an out of business hours message.                                                                                                                                                                                                                                          | 0, 2                                    |            |       | 2018-11-06 00:00:00 | 2019-04-23 00:00:00 | no     |     |               |              |               |
| issue\_id                                | bigint       | The ASAPP issue or conversation id.                                                                                                                                                                                                                                                                                     | 21352352                                |            |       | 2019-09-27 00:00:00 | 2019-09-27 00:00:00 | no     |     |               |              |               |
| rep\_sent\_msgs                          | bigint(20)   | The number of messages a rep sent.                                                                                                                                                                                                                                                                                      | 0, 6, 7                                 |            |       | 2019-09-27 00:00:00 | 2019-09-27 00:00:00 | no     |     |               |              |               |
| rep\_response\_count                     | bigint(20)   | The count of responses (not messages) sent by the reps. (Note: A FAQ or send-to-flow should count as a response, since from the perspective of the customer they are getting a response of some kind.)                                                                                                                  | 0, 5, 6                                 |            |       | 2019-09-27 00:00:00 | 2019-09-27 00:00:00 | no     |     |               |              |               |
| auto\_wait\_for\_rep\_msgs               | bigint(20)   | The number of times a user was asked to wait for a rep.                                                                                                                                                                                                                                                                 | 0, 1, 2                                 |            |       | 2019-09-27 00:00:00 | 2019-09-27 00:00:00 | no     |     |               |              |               |
| customer\_wait\_for\_rep\_msgs           | bigint(20)   | The number of times a user asked to  speak with a rep.                                                                                                                                                                                                                                                                  | 0, 1                                    |            |       | 2019-09-27 00:00:00 | 2019-09-27 00:00:00 | no     |     |               |              |               |
| hold\_ct                                 | bigint       | The number of times the customer was placed on hold. This applies to VOICE only.                                                                                                                                                                                                                                        | 0, 1, 2                                 |            |       | 2019-11-08 00:00:00 | 2019-11-08 00:00:00 | no     |     |               |              |               |
| total\_hold\_time\_seconds               | float        | The total amount of time in seconds that the customer was placed on hold.  This applies to VOICE only.                                                                                                                                                                                                                  | 180.4639995098114                       |            |       | 2019-11-08 00:00:00 | 2019-11-08 00:00:00 | no     |     |               |              |               |
| company\_name                            | varchar(255) | Name of the company associated with the data.                                                                                                                                                                                                                                                                           | acme                                    |            |       | 2019-11-01 00:00:00 | 2024-05-24 00:00:00 | no     |     |               |              |               |

### Table: convos\_metrics\_ended

The convos\_metrics table contains counts of various metrics associated with an issue/conversation(e.g. "attempted to chat", "assisted"). The table contains data associated with an issue during a given 15 minute window. This table will filter out unended conversations and issues with no activity.

**Sync Time:** 1h

**Unique Condition:** issue\_id

| Column                                   | Type         | Description                                                                                                                                                                                                                                                                          | Example                                 | Aggregates | Notes | Date Added          | Date Modified       | Ignore | PII | release state | Specific Use | Feature Group |
| :--------------------------------------- | :----------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------- | :--------- | :---- | :------------------ | :------------------ | :----- | :-- | :------------ | :----------- | :------------ |
| company\_subdivision                     | varchar(255) | String identifier for the company subdivision associated with the conversation.                                                                                                                                                                                                      | ACMEsubcorp                             |            |       | 2018-11-06 00:00:00 | 2018-11-06 00:00:00 | no     |     |               |              |               |
| company\_segments                        | varchar(255) | String with comma separated segments for the company enclosed by square brackets.                                                                                                                                                                                                    | marketing,promotions                    |            |       | 2018-11-06 00:00:00 | 2018-11-06 00:00:00 | no     |     |               |              |               |
| first\_utterance\_ts                     | timestamp    | Time of the first customer message in the conversation.                                                                                                                                                                                                                              | 2018-09-05 19:58:06                     |            |       | 2018-11-06 00:00:00 | 2018-11-06 00:00:00 | no     |     |               |              |               |
| conversation\_id                         | bigint       | deprecated: 2019-09-25                                                                                                                                                                                                                                                               | 21352352                                |            |       | 2018-11-06 00:00:00 | 2018-11-06 00:00:00 | no     |     |               |              |               |
| customer\_id                             | bigint       | The ASAPP internal customer identifier.                                                                                                                                                                                                                                              | 123008                                  |            |       | 2018-11-06 00:00:00 | 2018-11-06 00:00:00 | no     |     |               |              |               |
| platform                                 | varchar(255) | The platform which was used by the customer for a particular event or request (web, ios, android, applebiz, voice).                                                                                                                                                                  | web, ios, android, applebiz, voice      |            |       | 2018-11-06 00:00:00 | 2018-11-06 00:00:00 | no     |     |               |              |               |
| device\_type                             | varchar(255) | The last device type used by the customer.                                                                                                                                                                                                                                           | mobile, tablet, desktop, watch, unknown |            |       | 2019-06-18 00:00:00 | 2019-06-18 00:00:00 | no     |     |               |              |               |
| assisted                                 | tinyint(1)   | Flag indicates whether a rep was assigned and responded to the issue (1 if yes, 0 if no).                                                                                                                                                                                            | 0,1                                     |            |       | 2018-11-06 00:00:00 | 2018-11-06 00:00:00 | no     |     |               |              |               |
| total\_handle\_time                      | double       | Total time in seconds that reps spent handling the issue, from assignment to disposition.                                                                                                                                                                                            | 718.968                                 |            |       | 2019-03-05 00:00:00 | 2019-03-05 00:00:00 | no     |     |               |              |               |
| total\_lead\_time                        | double       | Total time in seconds the customer spent interacting during the conversation, from assignment to last utterance.                                                                                                                                                                     | 715.627                                 |            |       | 2018-11-06 00:00:00 | 2019-03-05 00:00:00 | no     |     |               |              |               |
| total\_wrap\_up\_time                    | double       | Total time in seconds spent by reps wrapping up the conversation, calculated as the difference between handle and lead time.                                                                                                                                                         | 27.583                                  |            |       | 2018-11-06 00:00:00 | 2019-03-05 00:00:00 | no     |     |               |              |               |
| total\_session\_time                     | double       | Total time the customer spent seeking resolution, including time in queue and up until the conversation end event.                                                                                                                                                                   | 1441.0329999923706                      |            |       | 2018-11-06 00:00:00 | 2019-03-05 00:00:00 | no     |     |               |              |               |
| customer\_sent\_msgs                     | double       | The total number of messages sent by the customer, including typed and tapped messages                                                                                                                                                                                               | 2, 1                                    |            |       | 2018-11-06 00:00:00 | 2018-11-06 00:00:00 | no     |     |               |              |               |
| agent\_sent\_msgs                        |              | deprecated: 2019-09-25                                                                                                                                                                                                                                                               |                                         |            |       | 2018-11-06 00:00:00 | 2018-11-06 00:00:00 | no     |     |               |              |               |
| auto\_generated\_msgs                    | bigint(20)   | The number of messages sent by SRS.                                                                                                                                                                                                                                                  | 5, 3                                    |            |       | 2018-11-06 00:00:00 | 2018-11-06 00:00:00 | no     |     |               |              |               |
| first\_rep\_response\_count              | bigint(20)   | The number of first responses by reps, post-assignment. This field will increment if there are transfers and timeouts and then reassigned and a rep answers. This field will NOT increment if a rep is assigned but doesn't get a chance to answer.                                  | 0, 1                                    |            |       | 2018-11-06 00:00:00 | 2018-11-06 00:00:00 | no     |     |               |              |               |
| total\_seconds\_to\_first\_rep\_response | bigint(20)   | Total time in seconds that passed before the rep responded to the customer.                                                                                                                                                                                                          | 4.291000127792358                       |            |       | 2018-11-06 00:00:00 | 2018-11-06 00:00:00 | no     |     |               |              |               |
| agent\_response\_count                   |              | deprecated: 2019-09-25                                                                                                                                                                                                                                                               |                                         |            |       | 2018-11-06 00:00:00 | 2018-11-06 00:00:00 | no     |     |               |              |               |
| customer\_response\_count                | bigint(20)   | The total number of responses (excluding messages) sent by the customer.                                                                                                                                                                                                             | 3, 0, 8                                 |            |       | 2018-11-06 00:00:00 | 2018-11-06 00:00:00 | no     |     |               |              |               |
| total\_rep\_seconds\_to\_respond         | double       | Total time in seconds the rep took to respond to the customer.                                                                                                                                                                                                                       | 240.28499960899353                      |            |       | 2018-11-06 00:00:00 | 2018-11-06 00:00:00 | no     |     |               |              |               |
| total\_cust\_seconds\_to\_respond        | double       | Total time in seconds the customer took to respond to the rep.                                                                                                                                                                                                                       | 227.27100014686584                      |            |       | 2018-11-06 00:00:00 | 2018-11-06 00:00:00 | no     |     |               |              |               |
| time\_in\_queue                          | double       | Total time spent by the customer in the queue, including any re-queues.                                                                                                                                                                                                              | 71.74499988555908                       |            |       | 2018-11-06 00:00:00 | 2018-11-06 00:00:00 | no     |     |               |              |               |
| auto\_suggest\_msgs                      | bigint(20)   | The number of autosuggest messages sent by rep.                                                                                                                                                                                                                                      | 0, 3, 4                                 |            |       | 2018-11-06 00:00:00 | 2018-11-06 00:00:00 | no     |     |               |              |               |
| auto\_complete\_msgs                     | bigint(20)   | The number of autocomplete messages sent by rep.                                                                                                                                                                                                                                     | 0, 1, 2                                 |            |       | 2018-11-06 00:00:00 | 2018-11-06 00:00:00 | no     |     |               |              |               |
| auto\_wait\_for\_agent\_msgs             | bigint       | deprecated: 2019-09-25                                                                                                                                                                                                                                                               |                                         |            |       | 2018-11-06 00:00:00 | 2018-11-06 00:00:00 | no     |     |               |              |               |
| customer\_wait\_for\_agent\_msgs         | bigint       | deprecated: 2019-09-25                                                                                                                                                                                                                                                               |                                         |            |       | 2018-11-06 00:00:00 | 2018-11-06 00:00:00 | no     |     |               |              |               |
| attempted\_chat                          | tinyint(1)   | A binary value of 1 indicates if there was an attempt to connect the customer to a rep. Also if a customer receives an out of business hours message or if customer was asked to wait for a rep or was escalated to chat. deprecation-date: 2020-04-14 expected-eol-date: 2021-10-15 | 0, 1                                    |            |       | 2018-11-06 00:00:00 | 2019-03-05 00:00:00 | no     |     |               |              |               |
| out\_business\_ct                        | bigint       | The number of times that a customer received an out of business hours message.                                                                                                                                                                                                       | 0, 1                                    |            |       | 2018-11-06 00:00:00 | 2019-04-23 00:00:00 | no     |     |               |              |               |
| issue\_id                                | bigint       | The ASAPP issue or conversation id.                                                                                                                                                                                                                                                  | 21352352                                |            |       | 2019-09-27 00:00:00 | 2019-09-27 00:00:00 | no     |     |               |              |               |
| rep\_sent\_msgs                          | bigint(20)   | The number of messages a rep sent.                                                                                                                                                                                                                                                   | 0, 4, 7                                 |            |       | 2019-09-27 00:00:00 | 2019-09-27 00:00:00 | no     |     |               |              |               |
| rep\_response\_count                     | bigint(20)   | The number of first responses by reps, post-assignment. This field will increment if there are transfers and timeouts and then reassigned and a rep answers. This field will NOT increment if a rep is assigned but doesn't get a chance to answer.                                  | 0, 1, 20                                |            |       | 2019-09-27 00:00:00 | 2019-09-27 00:00:00 | no     |     |               |              |               |
| auto\_wait\_for\_rep\_msgs               | bigint(20)   | The number of times a user was asked to wait for a rep.                                                                                                                                                                                                                              | 0, 3, 4                                 |            |       | 2019-09-27 00:00:00 | 2019-09-27 00:00:00 | no     |     |               |              |               |
| customer\_wait\_for\_rep\_msgs           | bigint(20)   | The number of times a user asked to speak with a rep.                                                                                                                                                                                                                                | 0, 1, 2                                 |            |       | 2019-09-27 00:00:00 | 2019-09-27 00:00:00 | no     |     |               |              |               |
| hold\_ct                                 | bigint       | The number of times the customer was placed on hold.  This field applies to VOICE.                                                                                                                                                                                                   | 0, 1, 2                                 |            |       | 2019-11-08 00:00:00 | 2019-11-08 00:00:00 | no     |     |               |              |               |
| total\_hold\_time\_seconds               | float        | The total amount of time in seconds that the customer was placed on hold.  This field applies to VOICE.                                                                                                                                                                              | 53.472                                  |            |       | 2019-11-08 00:00:00 | 2019-11-08 00:00:00 | no     |     |               |              |               |
| company\_name                            | varchar(255) | Name of the company associated with the data.                                                                                                                                                                                                                                        | acme                                    |            |       | 2019-11-01 00:00:00 | 2019-11-01 00:00:00 | no     |     |               |              |               |

### Table: convos\_summary\_tags

The convos\_summary\_tags table contains information regarding all AI generated auto-summary tags populated by the system when a rep initiates the "end chat" disposition process.

**Sync Time:** 1h

**Unique Condition:** company\_id, issue\_id, summary\_tag\_presented

| Column                       | Type                     | Description                                                                                                                                                                                                                                                                                                                                                 | Example                                                                         | Aggregates | Notes | Date Added          | Date Modified       | Ignore | PII | release state | Specific Use | Feature Group |
| :--------------------------- | :----------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------ | :--------- | :---- | :------------------ | :------------------ | :----- | :-- | :------------ | :----------- | :------------ |
| instance\_ts                 | timestamp                | The time window of computed elements.  This window is usually 15 minutes or 1 hour depending on the generation time. Times are rounded down to the nearest interval (for a time of 12:34 and an interval of 15m, this is 12:30). As an example, for a 15 minute interval an instance\_ts of 12:30 implies events from 12:30 -> 12:45. All times are in UTC. | 2019-11-08 14:00:06.957000+00:00                                                |            |       | 2019-12-20 00:00:00 | 2019-12-20 00:00:00 | no     |     |               |              |               |
| issue\_id                    | bigint                   | The ASAPP issue or conversation id.                                                                                                                                                                                                                                                                                                                         | 21352352                                                                        |            |       | 2019-12-20 00:00:00 | 2019-12-20 00:00:00 | no     |     |               |              |               |
| company\_id                  | bigint                   | DEPRECATED 2024-03-25                                                                                                                                                                                                                                                                                                                                       | 10001                                                                           |            |       | 2019-12-20 00:00:00 | 2019-12-20 00:00:00 | no     |     |               |              |               |
| company\_subdivision         | varchar(255)             | String identifier for the company subdivision associated with the conversation.                                                                                                                                                                                                                                                                             | ACMEsubcorp                                                                     |            |       | 2019-12-20 00:00:00 | 2019-12-20 00:00:00 | no     |     |               |              |               |
| company\_segments            | varchar(255)             | String with comma separated segments for the company enclosed by square brackets.                                                                                                                                                                                                                                                                           | marketing,promotions                                                            |            |       | 2019-12-20 00:00:00 | 2019-12-20 00:00:00 | no     |     |               |              |               |
| rep\_id                      | varchar(191)             | The ASAPP rep/agent identifier.                                                                                                                                                                                                                                                                                                                             | 123008                                                                          |            |       | 2019-12-20 00:00:00 | 2019-12-20 00:00:00 | no     |     |               |              |               |
| queue\_id                    | integer                  | The identifier of the group to which the rep (who dispositioned the issue) belongs.                                                                                                                                                                                                                                                                         | 20001                                                                           |            |       | 2019-12-20 00:00:00 | 2019-12-20 00:00:00 | no     |     |               |              |               |
| queue\_name                  | varchar(255)             | The name of the group to which the rep (who dispositioned the issue) belongs.                                                                                                                                                                                                                                                                               | acme-mobile-english                                                             |            |       | 2019-12-20 00:00:00 | 2019-12-20 00:00:00 | no     |     |               |              |               |
| disposition\_ts              | timestamp                | The time at which the rep dispositioned this issue (Exits the screen/frees up a slot).                                                                                                                                                                                                                                                                      | 2020-01-18T00:21:41.423000+00:00                                                |            |       | 2019-12-20 00:00:00 | 2019-12-20 00:00:00 | no     |     |               |              |               |
| summary\_tag\_presented      | character varying(65535) | The name of the auto-summary tag populated by the system when a rep ends an issue. The value is an empty string if no tag was populated but the rep.                                                                                                                                                                                                        | '(customer)-(cancel)-(phone)', '(rep)-(add)-(account)'                          |            |       | 2019-12-20 00:00:00 | 2019-12-20 00:00:00 | no     |     |               |              |               |
| summary\_tag\_selected\_bool | boolean                  | Boolean field returns true if a rep selects the summary\_tag\_presented.                                                                                                                                                                                                                                                                                    | false, true                                                                     |            |       | 2019-12-20 00:00:00 | 2019-12-20 00:00:00 | no     |     |               |              |               |
| disposition\_notes           | text                     | Notes that the rep took when dispositioning the chat. Can be generated from free text or the chat summary tags.                                                                                                                                                                                                                                             | 'no response from customer', 'edu cust on activation handling porting requests' |            |       | 2019-12-20 00:00:00 | 2019-12-20 00:00:00 | no     |     |               |              |               |
| company\_name                | varchar(255)             | Name of the company associated with the data.                                                                                                                                                                                                                                                                                                               | acme                                                                            |            |       | 2019-12-20 00:00:00 | 2019-12-20 00:00:00 | no     |     |               |              |               |

### Table: csid\_containment

The csid\_containment table tracks and organizes customer interactions by associating them with a unique session identifier (csid) with 30min window timeframe. It consolidates data related to customer sessions, including associated issue\_ids, session durations, and indicators of containment success. Containment success measures whether an issue was resolved within a session without escalation. This table is critical for analyzing customer interaction patterns, evaluating the effectiveness of issue resolution processes, and identifying areas for improvement.

**Sync Time:** 1h

**Unique Condition:** csid, company\_name

| Column                            | Type                        | Description                                                                                                                                                                                                                                                                                                                                                 | Example                                 | Aggregates | Notes       | Date Added          | Date Modified       | Ignore              | PII                 | release state | Specific Use | Feature Group |   |   |
| :-------------------------------- | :-------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------- | :--------- | :---------- | :------------------ | :------------------ | :------------------ | :------------------ | :------------ | :----------- | :------------ | - | - |
| instance\_ts                      | timestamp                   | The time window of computed elements.  This window is usually 15 minutes or 1 hour depending on the generation time. Times are rounded down to the nearest interval (for a time of 12:34 and an interval of 15m, this is 12:30). As an example, for a 15 minute interval an instance\_ts of 12:30 implies events from 12:30 -> 12:45. All times are in UTC. | 2019-11-08 14:00:06.957000+00:00        |            |             | 2018-11-06 00:00:00 | 2018-11-06 00:00:00 | no                  |                     |               |              |               |   |   |
| company\_id                       | bigint                      | DEPRECATED 2024-03-25                                                                                                                                                                                                                                                                                                                                       | 10001                                   |            |             | 2018-11-06 00:00:00 | 2018-11-06 00:00:00 | no                  |                     |               |              |               |   |   |
| company\_subdivision              | varchar(255)                | String identifier for the company subdivision associated with the conversation.                                                                                                                                                                                                                                                                             | ACMEsubcorp                             |            |             | 2018-11-06 00:00:00 | 2018-11-06 00:00:00 | no                  |                     |               |              |               |   |   |
| company\_segments                 | varchar(255)                | String with comma separated segments for the company enclosed by square brackets.                                                                                                                                                                                                                                                                           | marketing,promotions                    |            |             | 2018-11-06 00:00:00 | 2018-11-06 00:00:00 | no                  |                     |               |              |               |   |   |
| customer\_id                      | bigint                      | The customer identifier on which this session is based, after merge if applicable.                                                                                                                                                                                                                                                                          | 123008                                  |            |             | 2018-11-06 00:00:00 | 2018-11-07 00:00:00 | no                  |                     |               |              |               |   |   |
| external\_customer\_id            | varchar(255)                | The customer identifier as provided by the client.                                                                                                                                                                                                                                                                                                          | 347bdddb-d3a1-45fc-bbcd-dbd3a175fc1c    |            |             | 2018-11-06 00:00:00 | 2018-11-06 00:00:00 | no                  |                     |               |              |               |   |   |
| csid                              | varchar(255)                | Unique identifier for a continuous period of activity for a given customer, starting at the specified timestamp.                                                                                                                                                                                                                                            | '24790001\_2018-09-24T22:17:41.341'     |            |             | 2018-11-06 00:00:00 | 2018-11-06 00:00:00 | no                  |                     |               |              |               |   |   |
| csid\_start\_ts                   | timestamp without time zone | The start time of the customer's session.                                                                                                                                                                                                                                                                                                                   | 2019-12-23T16:00:10.072000+00:00        |            |             | 2018-11-06 00:00:00 | 2018-11-06 00:00:00 | no                  |                     |               |              |               |   |   |
| csid\_end\_ts                     | timestamp without time zone | The end time of the active session.                                                                                                                                                                                                                                                                                                                         | 2019-12-23T16:00:10.072000+00:00        |            |             | 2018-11-06 00:00:00 | 2018-11-06 00:00:00 | no                  |                     |               |              |               |   |   |
| agents\_involved                  |                             | deprecated: 2019-09-25                                                                                                                                                                                                                                                                                                                                      |                                         |            |             | 2018-11-06 00:00:00 | 2018-11-06 00:00:00 | no                  |                     |               |              |               |   |   |
| included\_issues                  | character varying(65535)    | Pipe-delimited list of issues involved in this period of customer activity.                                                                                                                                                                                                                                                                                 | '2044970001                             | 2045000001 | 2045010001' |                     |                     | 2018-11-06 00:00:00 | 2018-11-06 00:00:00 | no            |              |               |   |   |
| is\_contained                     | boolean                     | Flag indicating whether reps were involved with any issues during this csid.                                                                                                                                                                                                                                                                                | true, false                             |            |             | 2018-11-06 00:00:00 | 2018-11-06 00:00:00 | no                  |                     |               |              |               |   |   |
| event\_count                      | bigint                      | The number of customer (only) events active during this csid.                                                                                                                                                                                                                                                                                               | 21                                      |            |             | 2018-11-06 00:00:00 | 2018-11-06 00:00:00 | no                  |                     |               |              |               |   |   |
| fgsrs\_event\_count               | bigint                      | The number of FGSRS events during this csid.                                                                                                                                                                                                                                                                                                                | 5                                       |            |             | 2019-08-30 00:00:00 | 2019-08-30 00:00:00 | no                  |                     |               |              |               |   |   |
| was\_enqueued                     | boolean                     | Flag indicating if enqueued events existed for this session.                                                                                                                                                                                                                                                                                                | true, false                             |            |             | 2018-11-06 00:00:00 | 2018-11-06 00:00:00 | no                  |                     |               |              |               |   |   |
| rep\_msgs                         | bigint                      | Count of text messages sent by reps during this csid.                                                                                                                                                                                                                                                                                                       | 6                                       |            |             | 2018-11-06 00:00:00 | 2018-11-06 00:00:00 | no                  |                     |               |              |               |   |   |
| messages\_sent                    | bigint                      | Number of text messages typed or quick replies clicked by the customer during this csid.                                                                                                                                                                                                                                                                    | 4                                       |            |             | 2018-11-06 00:00:00 | 2018-11-06 00:00:00 | no                  |                     |               |              |               |   |   |
| has\_customer\_utterance          | boolean                     | Flag indicating if the csid contains customer messages.                                                                                                                                                                                                                                                                                                     | true, false                             |            |             | 2018-11-06 00:00:00 | 2018-11-06 00:00:00 | no                  |                     |               |              |               |   |   |
| attempted\_escalate               | boolean                     | A boolean value indicating if the customer or flow tried (or succeeded) to reach a rep.                                                                                                                                                                                                                                                                     | false, true                             |            |             | 2018-11-06 00:00:00 | 2018-11-06 00:00:00 | no                  |                     |               |              |               |   |   |
| last\_platform                    | VARCHAR(191)                | Flag indicating if the customer or flow attempted or succeeded in reaching a rep.                                                                                                                                                                                                                                                                           | ANDROID, WEB, IOS                       |            |             | 2018-11-06 00:00:00 | 2018-11-06 00:00:00 | no                  |                     |               |              |               |   |   |
| last\_device\_type                | VARCHAR(191)                | Last device type used by the customer                                                                                                                                                                                                                                                                                                                       | mobile, tablet, desktop, watch, unknown |            |             | 2019-06-18 00:00:00 | 2019-06-18 00:00:00 | no                  |                     |               |              |               |   |   |
| first\_auth\_source               | character varying(65535)    | First source of the authentication event for a csid.                                                                                                                                                                                                                                                                                                        | ivr-url                                 |            |             | 2019-05-15 00:00:00 | 2019-05-15 00:00:00 | no                  |                     |               |              |               |   |   |
| last\_auth\_source                | character varying(65535)    | Last source of the authentication event for a csid.                                                                                                                                                                                                                                                                                                         | ivr-url                                 |            |             | 2019-05-15 00:00:00 | 2019-05-15 00:00:00 | no                  |                     |               |              |               |   |   |
| distinct\_auth\_source\_path      | character varying(65535)    | Comma-separated list of all distinct authentication event sources for the csid.                                                                                                                                                                                                                                                                             | ivr-url, facebook                       |            |             | 2019-05-15 00:00:00 | 2019-05-15 00:00:00 | no                  |                     |               |              |               |   |   |
| first\_auth\_external\_user\_type | character varying(65535)    | The first external user type of the authentication event for a csid.                                                                                                                                                                                                                                                                                        | client\_CUSTOMER\_ACCOUNT\_ID           |            |             | 2019-05-15 00:00:00 | 2019-05-15 00:00:00 | no                  |                     |               |              |               |   |   |
| last\_auth\_external\_user\_type  | character varying(65535)    | The last external user type of the authentication event for a csid.                                                                                                                                                                                                                                                                                         | client\_CUSTOMER\_ACCOUNT\_ID           |            |             | 2019-05-15 00:00:00 | 2019-05-15 00:00:00 | no                  |                     |               |              |               |   |   |
| first\_auth\_external\_user\_id   | character varying(65535)    | Client-provided field for the first external user ID linked to an authentication event.                                                                                                                                                                                                                                                                     | 64b0959a65a63dec32e1be04fe755be1        |            |             | 2019-05-15 00:00:00 | 2019-05-15 00:00:00 | no                  |                     |               |              |               |   |   |
| last\_auth\_external\_user\_id    | character varying(65535)    | Client-provided field for the last external user ID linked to an authentication event.                                                                                                                                                                                                                                                                      | 64b0959a65a63dec32e1be04fe755be1        |            |             | 2019-05-15 00:00:00 | 2019-05-15 00:00:00 | no                  |                     |               |              |               |   |   |
| first\_auth\_external\_token\_id  | character varying(65535)    | A client provided field. The first encrypted user ID from client system associated with an authentication event.                                                                                                                                                                                                                                            | 82EFDDADC5466501443E3E61ED640162        |            |             | 2019-05-15 00:00:00 | 2019-05-15 00:00:00 | no                  |                     |               |              |               |   |   |
| last\_auth\_external\_token\_id   | character varying(65535)    | A client provided field. The last encrypted user ID from client system associated with an authentication event.                                                                                                                                                                                                                                             | 82EFDDADC5466501443E3E61ED640162        |            |             | 2019-05-15 00:00:00 | 2019-05-15 00:00:00 | no                  |                     |               |              |               |   |   |
| reps\_involved                    | varchar(4096)               | Pipe-delimited list of reps associated with any issues during this session.                                                                                                                                                                                                                                                                                 | '209000                                 | 2020001'   |             |                     | 2018-11-06 00:00:00 | 2018-11-06 00:00:00 | no                  |               |              |               |   |   |
| company\_name                     | varchar(255)                | Name of the company associated with the data.                                                                                                                                                                                                                                                                                                               | acme                                    |            |             | 2019-11-01 00:00:00 | 2024-05-24 00:00:00 | no                  |                     |               |              |               |   |   |

### Table: csid\_containment\_1d

The csid\_containment table tracks and organizes customer interactions by associating them with a unique session identifier (csid) with 24 hours of window timeframe. It consolidates data related to customer sessions, including associated issue\_ids, session durations, and indicators of containment success. Containment success measures whether an issue was resolved within a session without escalation. This table is critical for analyzing customer interaction patterns, evaluating the effectiveness of issue resolution processes, and identifying areas for improvement.

**Sync Time:** 1h

**Unique Condition:** csid, company\_name

| Column                            | Type                        | Description                                                                                                                                                                                                                                                                                                                                                 | Example                                 | Aggregates | Notes       | Date Added          | Date Modified       | Ignore              | PII                 | release state | Specific Use | Feature Group |   |   |
| :-------------------------------- | :-------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------- | :--------- | :---------- | :------------------ | :------------------ | :------------------ | :------------------ | :------------ | :----------- | :------------ | - | - |
| instance\_ts                      | timestamp                   | The time window of computed elements.  This window is usually 15 minutes or 1 hour depending on the generation time. Times are rounded down to the nearest interval (for a time of 12:34 and an interval of 15m, this is 12:30). As an example, for a 15 minute interval an instance\_ts of 12:30 implies events from 12:30 -> 12:45. All times are in UTC. | 2019-11-08 14:00:06.957000+00:00        |            |             | 2018-01-15 00:00:00 | 2018-01-15 00:00:00 | no                  |                     |               |              |               |   |   |
| company\_id                       | bigint                      | DEPRECATED 2024-03-25                                                                                                                                                                                                                                                                                                                                       | 10001                                   |            |             | 2018-01-15 00:00:00 | 2018-01-15 00:00:00 | no                  |                     |               |              |               |   |   |
| company\_subdivision              | varchar(255)                | String identifier for the company subdivision associated with the conversation.                                                                                                                                                                                                                                                                             | ACMEsubcorp                             |            |             | 2018-01-15 00:00:00 | 2018-01-15 00:00:00 | no                  |                     |               |              |               |   |   |
| company\_segments                 | varchar(255)                | String with comma separated segments for the company enclosed by square brackets.                                                                                                                                                                                                                                                                           | marketing,promotions                    |            |             | 2018-01-15 00:00:00 | 2018-01-15 00:00:00 | no                  |                     |               |              |               |   |   |
| customer\_id                      | bigint                      | The customer identifier on which this session is based, after merge if applicable.                                                                                                                                                                                                                                                                          | 123008                                  |            |             | 2018-01-15 00:00:00 | 2018-11-07 00:00:00 | no                  |                     |               |              |               |   |   |
| external\_customer\_id            | varchar(255)                | The customer identifier as provided by the client.                                                                                                                                                                                                                                                                                                          | 347bdddb-d3a1-45fc-bbcd-dbd3a175fc1c    |            |             | 2018-01-15 00:00:00 | 2018-01-15 00:00:00 | no                  |                     |               |              |               |   |   |
| csid                              | varchar(255)                | Unique identifier for a continuous period of activity for a given customer, starting at the specified timestamp.                                                                                                                                                                                                                                            | '24790001\_2018-09-24T22:17:41.341'     |            |             | 2018-01-15 00:00:00 | 2018-01-15 00:00:00 | no                  |                     |               |              |               |   |   |
| csid\_start\_ts                   | timestamp without time zone | The start time of the customer's session.                                                                                                                                                                                                                                                                                                                   | 2019-12-23T16:00:10.072000+00:00        |            |             | 2018-01-15 00:00:00 | 2018-01-15 00:00:00 | no                  |                     |               |              |               |   |   |
| csid\_end\_ts                     | timestamp without time zone | The end time of the active session.                                                                                                                                                                                                                                                                                                                         | 2019-12-23T16:00:10.072000+00:00        |            |             | 2018-01-15 00:00:00 | 2018-01-15 00:00:00 | no                  |                     |               |              |               |   |   |
| agents\_involved                  |                             | deprecated: 2019-09-25                                                                                                                                                                                                                                                                                                                                      |                                         |            |             | 2018-01-15 00:00:00 | 2018-01-15 00:00:00 | no                  |                     |               |              |               |   |   |
| included\_issues                  | character varying(65535)    | Pipe-delimited list of issues involved in this period of customer activity.                                                                                                                                                                                                                                                                                 | '2044970001                             | 2045000001 | 2045010001' |                     |                     | 2018-01-15 00:00:00 | 2018-01-15 00:00:00 | no            |              |               |   |   |
| is\_contained                     | boolean                     | Flag indicating whether reps were involved with any issues during this csid.                                                                                                                                                                                                                                                                                | true, false                             |            |             | 2018-01-15 00:00:00 | 2018-01-15 00:00:00 | no                  |                     |               |              |               |   |   |
| event\_count                      | bigint                      | The number of customer (only) events active during this csid.                                                                                                                                                                                                                                                                                               | 21                                      |            |             | 2018-01-15 00:00:00 | 2018-01-15 00:00:00 | no                  |                     |               |              |               |   |   |
| fgsrs\_event\_count               | bigint                      | The number of FGSRS events during this csid.                                                                                                                                                                                                                                                                                                                | 5                                       |            |             | 2019-08-30 00:00:00 | 2019-08-30 00:00:00 | no                  |                     |               |              |               |   |   |
| was\_enqueued                     | boolean                     | Flag indicating if enqueued events existed for this session.                                                                                                                                                                                                                                                                                                | true, false                             |            |             | 2018-01-15 00:00:00 | 2018-01-15 00:00:00 | no                  |                     |               |              |               |   |   |
| rep\_msgs                         | bigint                      | Count of text messages sent by reps during this csid.                                                                                                                                                                                                                                                                                                       | 6                                       |            |             | 2018-01-15 00:00:00 | 2018-01-15 00:00:00 | no                  |                     |               |              |               |   |   |
| messages\_sent                    | bigint                      | Number of text messages typed or quick replies clicked by the customer during this csid.                                                                                                                                                                                                                                                                    | 4                                       |            |             | 2018-01-15 00:00:00 | 2018-01-15 00:00:00 | no                  |                     |               |              |               |   |   |
| has\_customer\_utterance          | boolean                     | Flag indicating if the csid contains customer messages.                                                                                                                                                                                                                                                                                                     | true, false                             |            |             | 2018-01-15 00:00:00 | 2018-01-15 00:00:00 | no                  |                     |               |              |               |   |   |
| attempted\_escalate               | boolean                     | A boolean value indicating if the customer or flow tried (or succeeded) to reach a rep.                                                                                                                                                                                                                                                                     | false, true                             |            |             | 2018-01-15 00:00:00 | 2018-01-15 00:00:00 | no                  |                     |               |              |               |   |   |
| last\_platform                    | VARCHAR(191)                | Flag indicating if the customer or flow attempted or succeeded in reaching a rep.                                                                                                                                                                                                                                                                           | ANDROID, WEB, IOS                       |            |             | 2018-01-15 00:00:00 | 2018-01-15 00:00:00 | no                  |                     |               |              |               |   |   |
| last\_device\_type                | VARCHAR(191)                | Last device type used by the customer                                                                                                                                                                                                                                                                                                                       | mobile, tablet, desktop, watch, unknown |            |             | 2019-06-18 00:00:00 | 2019-06-18 00:00:00 | no                  |                     |               |              |               |   |   |
| first\_auth\_source               | character varying(65535)    | First source of the authentication event for a csid.                                                                                                                                                                                                                                                                                                        | ivr-url                                 |            |             | 2019-05-15 00:00:00 | 2019-05-15 00:00:00 | no                  |                     |               |              |               |   |   |
| last\_auth\_source                | character varying(65535)    | Last source of the authentication event for a csid.                                                                                                                                                                                                                                                                                                         | ivr-url                                 |            |             | 2019-05-15 00:00:00 | 2019-05-15 00:00:00 | no                  |                     |               |              |               |   |   |
| distinct\_auth\_source\_path      | character varying(65535)    | Comma-separated list of all distinct authentication event sources for the csid.                                                                                                                                                                                                                                                                             | ivr-url, facebook                       |            |             | 2019-05-15 00:00:00 | 2019-05-15 00:00:00 | no                  |                     |               |              |               |   |   |
| first\_auth\_external\_user\_type | character varying(65535)    | The first external user type of the authentication event for a csid.                                                                                                                                                                                                                                                                                        | client\_CUSTOMER\_ACCOUNT\_ID           |            |             | 2019-05-15 00:00:00 | 2019-05-15 00:00:00 | no                  |                     |               |              |               |   |   |
| last\_auth\_external\_user\_type  | character varying(65535)    | The last external user type of the authentication event for a csid.                                                                                                                                                                                                                                                                                         | client\_CUSTOMER\_ACCOUNT\_ID           |            |             | 2019-05-15 00:00:00 | 2019-05-15 00:00:00 | no                  |                     |               |              |               |   |   |
| first\_auth\_external\_user\_id   | character varying(65535)    | Client-provided field for the first external user ID linked to an authentication event.                                                                                                                                                                                                                                                                     | 64b0959a65a63dec32e1be04fe755be1        |            |             | 2019-05-15 00:00:00 | 2019-05-15 00:00:00 | no                  |                     |               |              |               |   |   |
| last\_auth\_external\_user\_id    | character varying(65535)    | Client-provided field for the last external user ID linked to an authentication event.                                                                                                                                                                                                                                                                      | 64b0959a65a63dec32e1be04fe755be1        |            |             | 2019-05-15 00:00:00 | 2019-05-15 00:00:00 | no                  |                     |               |              |               |   |   |
| first\_auth\_external\_token\_id  | character varying(65535)    | A client provided field. The first encrypted user ID from client system associated with an authentication event.                                                                                                                                                                                                                                            | 82EFDDADC5466501443E3E61ED640162        |            |             | 2019-05-15 00:00:00 | 2019-05-15 00:00:00 | no                  |                     |               |              |               |   |   |
| last\_auth\_external\_token\_id   | character varying(65535)    | A client provided field. The last encrypted user ID from client system associated with an authentication event.                                                                                                                                                                                                                                             | 82EFDDADC5466501443E3E61ED640162        |            |             | 2019-05-15 00:00:00 | 2019-05-15 00:00:00 | no                  |                     |               |              |               |   |   |
| reps\_involved                    | varchar(4096)               | Pipe-delimited list of reps associated with any issues during this session.                                                                                                                                                                                                                                                                                 | '209000                                 | 2020001'   |             |                     | 2018-01-15 00:00:00 | 2018-01-15 00:00:00 | no                  |               |              |               |   |   |
| company\_name                     | varchar(255)                | Name of the company associated with the data.                                                                                                                                                                                                                                                                                                               | acme                                    |            |             | 2019-11-01 00:00:00 | 2024-05-24 00:00:00 | no                  |                     |               |              |               |   |   |

### Table: customer\_feedback

The customer\_feedback table contains the feedback regarding how well their issue was resolved. This table contains columns such as the feedback question prompted at issue completion, the customer response and the last rep identifier which was associated with an issue\_id.

**Sync Time:** 1d

**Unique Condition:** issue\_id, company\_marker, last\_rep\_id, question, instance\_ts

| Column               | Type                     | Description                                                                                                                                                                                                                                                                                                                                                 | Example                                                                                                                | Aggregates | Notes | Date Added          | Date Modified       | Ignore | PII | release state | Specific Use | Feature Group |
| :------------------- | :----------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------- | :--------- | :---- | :------------------ | :------------------ | :----- | :-- | :------------ | :----------- | :------------ |
| instance\_ts         | timestamp                | The time window of computed elements.  This window is usually 15 minutes or 1 hour depending on the generation time. Times are rounded down to the nearest interval (for a time of 12:34 and an interval of 15m, this is 12:30). As an example, for a 15 minute interval an instance\_ts of 12:30 implies events from 12:30 -> 12:45. All times are in UTC. | 2019-11-08 14:00:06.957000+00:00                                                                                       |            |       | 2018-08-14 00:00:00 | 2018-08-14 00:00:00 | no     |     |               |              |               |
| conversation\_id     | bigint                   | deprecated: 2019-09-25                                                                                                                                                                                                                                                                                                                                      | 21352352                                                                                                               |            |       | 2018-08-14 00:00:00 | 2018-08-14 00:00:00 | no     |     |               |              |               |
| last\_agent\_id      | varchar(191)             | deprecated: 2019-09-25                                                                                                                                                                                                                                                                                                                                      | 123008                                                                                                                 |            |       | 2018-08-14 00:00:00 | 2018-08-14 00:00:00 | no     |     |               |              |               |
| question             | character varying(65535) | Question presented to the user.                                                                                                                                                                                                                                                                                                                             | VOC Score, endSRS rating, What did the agent do well, or what could the agent have done better? (1000 character limit) |            |       | 2018-08-14 00:00:00 | 2018-08-14 00:00:00 | no     |     |               |              |               |
| question\_category   | character varying(65535) | The question category type.                                                                                                                                                                                                                                                                                                                                 | rating, comment, levelOfEffort                                                                                         |            |       | 2018-08-14 00:00:00 | 2018-08-14 00:00:00 | no     |     |               |              |               |
| question\_type       | character varying(65535) | The type of question.                                                                                                                                                                                                                                                                                                                                       | rating, scale, radio                                                                                                   |            |       | 2018-08-14 00:00:00 | 2018-08-14 00:00:00 | no     |     |               |              |               |
| answer               | character varying(65535) | The customer's answer to the question.                                                                                                                                                                                                                                                                                                                      | 0, 1, 17, yes                                                                                                          |            |       | 2018-08-14 00:00:00 | 2018-08-14 00:00:00 | no     |     |               |              |               |
| ordering             | integer                  | The sequence or order of the question.                                                                                                                                                                                                                                                                                                                      | 0, 1, 3, 5                                                                                                             |            |       | 2018-08-14 00:00:00 | 2018-08-14 00:00:00 | no     |     |               |              |               |
| issue\_id            | bigint                   | The ASAPP issue or conversation id.                                                                                                                                                                                                                                                                                                                         | 21352352                                                                                                               |            |       | 2019-09-27 00:00:00 | 2019-09-27 00:00:00 | no     |     |               |              |               |
| last\_rep\_id        | varchar(191)             | The last ASAPP rep/agent identifier found in a window of time.                                                                                                                                                                                                                                                                                              | 123008                                                                                                                 |            |       | 2019-09-27 00:00:00 | 2019-09-27 00:00:00 | no     |     |               |              |               |
| company\_name        | varchar(255)             | Name of the company associated with the data.                                                                                                                                                                                                                                                                                                               | acme                                                                                                                   |            |       | 2019-11-01 00:00:00 | 2024-05-24 00:00:00 | no     |     |               |              |               |
| company\_subdivision | varchar(255)             | String identifier for the company subdivision associated with the conversation.                                                                                                                                                                                                                                                                             | ACMEsubcorp                                                                                                            |            |       | 2021-09-10 00:00:00 | 2021-09-10 00:00:00 | no     |     |               |              |               |
| company\_segments    | varchar(255)             | String with comma separated segments for the company enclosed by square brackets.                                                                                                                                                                                                                                                                           | marketing,promotions                                                                                                   |            |       | 2021-09-10 00:00:00 | 2021-09-10 00:00:00 | no     |     |               |              |               |
| platform             | varchar(255)             | The platform which was used by the customer for a particular event or request (web, ios, android, applebiz, voice).                                                                                                                                                                                                                                         | web, ios, android, applebiz, voice                                                                                     |            |       | 2021-09-10 00:00:00 | 2021-09-10 00:00:00 | no     |     |               |              |               |
| feedback\_type       | character varying(65535) | The classification of feedback provided by the customer.                                                                                                                                                                                                                                                                                                    | FEEDBACK\_AGENT, etc                                                                                                   |            |       | 2021-09-10 00:00:00 | 2021-09-10 00:00:00 | no     |     |               |              |               |
| feedback\_form\_type | character varying(65535) | Indicates the type of feedback form completed by the customer.                                                                                                                                                                                                                                                                                              | ASAPP\_CSAT, GBM                                                                                                       |            |       | 2021-09-10 00:00:00 | 2021-09-10 00:00:00 | no     |     |               |              |               |

### Table: customer\_params

The customer\_params table contains information which the client sends to ASAPP. The table may have multiple rows associated with one issue\_id. Clients specify the information to store using a JSON entry which may contain multiple semicolon separated (key, value) pairs.

**Sync Time:** 1d

**Unique Condition:** event\_id, param\_key

| Column               | Type                     | Description                                                                                                                                                                                                                                                                                                                                                 | Example                                                        | Aggregates | Notes | Date Added          | Date Modified       | Ignore | PII | release state | Specific Use | Feature Group |
| :------------------- | :----------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------- | :--------- | :---- | :------------------ | :------------------ | :----- | :-- | :------------ | :----------- | :------------ |
| instance\_ts         | timestamp                | The time window of computed elements.  This window is usually 15 minutes or 1 hour depending on the generation time. Times are rounded down to the nearest interval (for a time of 12:34 and an interval of 15m, this is 12:30). As an example, for a 15 minute interval an instance\_ts of 12:30 implies events from 12:30 -> 12:45. All times are in UTC. | 2019-11-08 14:00:06.957000+00:00                               |            |       | 2019-01-25 00:00:00 | 2019-01-25 00:00:00 | no     |     |               |              |               |
| event\_ts            | timestamp                | The time at which this event was fired.                                                                                                                                                                                                                                                                                                                     | 2019-11-08 14:00:06.957000+00:00                               |            |       | 2019-01-25 00:00:00 | 2019-01-25 00:00:00 | no     |     |               |              |               |
| issue\_id            | bigint                   | The ASAPP issue or conversation id.                                                                                                                                                                                                                                                                                                                         | 21352352                                                       |            |       | 2019-01-25 00:00:00 | 2019-01-25 00:00:00 | no     |     |               |              |               |
| company\_id          | bigint                   | DEPRECATED 2024-03-25                                                                                                                                                                                                                                                                                                                                       | 10001                                                          |            |       | 2019-01-25 00:00:00 | 2019-01-25 00:00:00 | no     |     |               |              |               |
| company\_subdivision | varchar(255)             | The subdivision of the company.                                                                                                                                                                                                                                                                                                                             | ACMEsubcorp                                                    |            |       | 2019-01-25 00:00:00 | 2019-01-25 00:00:00 | no     |     |               |              |               |
| company\_segments    | varchar(255)             | The segments of the company.                                                                                                                                                                                                                                                                                                                                | marketing,promotions                                           |            |       | 2019-01-25 00:00:00 | 2019-01-25 00:00:00 | no     |     |               |              |               |
| customer\_id         | bigint                   | The ASAPP internal customer identifier.                                                                                                                                                                                                                                                                                                                     | 123008                                                         |            |       | 2019-01-25 00:00:00 | 2019-01-25 00:00:00 | no     |     |               |              |               |
| rep\_id              | varchar(191)             | deprecated: 2022-06-30                                                                                                                                                                                                                                                                                                                                      | 123008                                                         |            |       | 2019-01-25 00:00:00 | 2019-01-25 00:00:00 | no     |     |               |              |               |
| referring\_page\_url | character varying(65535) | The URL of the page the user navigated from.                                                                                                                                                                                                                                                                                                                | [https://www.acme.com/wireless](https://www.acme.com/wireless) |            |       | 2019-01-25 00:00:00 | 2019-01-25 00:00:00 | no     |     |               |              |               |
| event\_id            | character varying(256)   | A unique identifier for the event within the customer parameter payload.                                                                                                                                                                                                                                                                                    |                                                                |            |       | 2019-07-29 00:00:00 | 2019-07-29 00:00:00 | no     |     |               |              |               |
| platform             | varchar(255)             | The platform the customer is using to interact with ASAPP.                                                                                                                                                                                                                                                                                                  | 08679ded-38b7-11ea-9c44-debfe2011fef                           |            |       | 2019-07-29 00:00:00 | 2019-07-29 00:00:00 | no     |     |               |              |               |
| session\_id          | varchar(128)             | The websocket UUID associated with the current request's session.                                                                                                                                                                                                                                                                                           | 347bdddb-d3a1-45fc-bbcd-dbd3a175fc1c                           |            |       | 2019-07-29 00:00:00 | 2019-07-29 00:00:00 | no     |     |               |              |               |
| auth\_state          | boolean                  | Flag indicating if the user is authenticated.                                                                                                                                                                                                                                                                                                               | true, false                                                    |            |       | 2019-07-29 00:00:00 | 2019-07-29 00:00:00 | no     |     |               |              |               |
| params               | character varying(65535) | A string representation of the JSON parameters.                                                                                                                                                                                                                                                                                                             | `{"Key1":"Value1"; "Key2":"Value2"}`                           |            |       | 2019-01-25 00:00:00 | 2019-01-25 00:00:00 | no     |     |               |              |               |
| param\_key           | character varying(255)   | A value of a specific key within the parameter JSON.                                                                                                                                                                                                                                                                                                        | Key1                                                           |            |       | 2019-01-25 00:00:00 | 2019-01-25 00:00:00 | no     |     |               |              |               |
| param\_value         | character varying(65535) | The value corresponding with the specific key in param\_key.                                                                                                                                                                                                                                                                                                | Value1                                                         |            |       | 2019-01-25 00:00:00 | 2019-01-25 00:00:00 | no     |     |               |              |               |
| company\_name        | varchar(255)             | Name of the company associated with the data.                                                                                                                                                                                                                                                                                                               | acme                                                           |            |       | 2019-11-01 00:00:00 | 2024-05-24 00:00:00 | no     |     |               |              |               |
| current\_page\_url   | varchar(2000)            | The URL of the page where the customer initiated the ASAPP chat.                                                                                                                                                                                                                                                                                            | [https://www.asapp.com](https://www.asapp.com)                 |            |       | 2021-09-16 00:00:00 | 2021-09-16 00:00:00 | no     |     |               |              |               |

### Table: customer\_params\_hourly

The customer\_params table contains information which the client sends to ASAPP. The table may have multiple rows associated with one issue\_id. Clients specify the information to store using a JSON entry which may contain multiple semicolon separated (key, value) pairs.

**Sync Time:** 1h

**Unique Condition:** event\_id, param\_key

| Column               | Type                     | Description                                                                                                                                                                                                                                                                                                                                                 | Example                                                        | Aggregates | Notes | Date Added          | Date Modified       | Ignore | PII | release state | Specific Use | Feature Group |
| :------------------- | :----------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------- | :--------- | :---- | :------------------ | :------------------ | :----- | :-- | :------------ | :----------- | :------------ |
| instance\_ts         | timestamp                | The time window of computed elements.  This window is usually 15 minutes or 1 hour depending on the generation time. Times are rounded down to the nearest interval (for a time of 12:34 and an interval of 15m, this is 12:30). As an example, for a 15 minute interval an instance\_ts of 12:30 implies events from 12:30 -> 12:45. All times are in UTC. | 2019-11-08 14:00:06.957000+00:00                               |            |       | 2019-01-25 00:00:00 | 2019-01-25 00:00:00 | no     |     |               |              |               |
| event\_ts            | timestamp                | The time at which this event was fired.                                                                                                                                                                                                                                                                                                                     | 2019-11-08 14:00:06.957000+00:00                               |            |       | 2019-01-25 00:00:00 | 2019-01-25 00:00:00 | no     |     |               |              |               |
| issue\_id            | bigint                   | The ASAPP issue or conversation id.                                                                                                                                                                                                                                                                                                                         | 21352352                                                       |            |       | 2019-01-25 00:00:00 | 2019-01-25 00:00:00 | no     |     |               |              |               |
| company\_id          | bigint                   | DEPRECATED 2024-03-25                                                                                                                                                                                                                                                                                                                                       | 10001                                                          |            |       | 2019-01-25 00:00:00 | 2019-01-25 00:00:00 | no     |     |               |              |               |
| company\_subdivision | varchar(255)             | The subdivision of the company.                                                                                                                                                                                                                                                                                                                             | ACMEsubcorp                                                    |            |       | 2019-01-25 00:00:00 | 2019-01-25 00:00:00 | no     |     |               |              |               |
| company\_segments    | varchar(255)             | The segments of the company.                                                                                                                                                                                                                                                                                                                                | marketing,promotions                                           |            |       | 2019-01-25 00:00:00 | 2019-01-25 00:00:00 | no     |     |               |              |               |
| customer\_id         | bigint                   | The ASAPP internal customer identifier.                                                                                                                                                                                                                                                                                                                     | 123008                                                         |            |       | 2019-01-25 00:00:00 | 2019-01-25 00:00:00 | no     |     |               |              |               |
| rep\_id              | varchar(191)             | deprecated: 2022-06-30                                                                                                                                                                                                                                                                                                                                      | 123008                                                         |            |       | 2019-01-25 00:00:00 | 2019-01-25 00:00:00 | no     |     |               |              |               |
| referring\_page\_url | character varying(65535) | The URL of the page the user navigated from.                                                                                                                                                                                                                                                                                                                | [https://www.acme.com/wireless](https://www.acme.com/wireless) |            |       | 2019-01-25 00:00:00 | 2019-01-25 00:00:00 | no     |     |               |              |               |
| event\_id            | character varying(256)   | A unique identifier for the event within the customer parameter payload.                                                                                                                                                                                                                                                                                    |                                                                |            |       | 2019-07-29 00:00:00 | 2019-07-29 00:00:00 | no     |     |               |              |               |
| platform             | varchar(255)             | The platform the customer is using to interact with ASAPP.                                                                                                                                                                                                                                                                                                  | 08679ded-38b7-11ea-9c44-debfe2011fef                           |            |       | 2019-07-29 00:00:00 | 2019-07-29 00:00:00 | no     |     |               |              |               |
| session\_id          | varchar(128)             | The websocket UUID associated with the current request's session.                                                                                                                                                                                                                                                                                           | 347bdddb-d3a1-45fc-bbcd-dbd3a175fc1c                           |            |       | 2019-07-29 00:00:00 | 2019-07-29 00:00:00 | no     |     |               |              |               |
| auth\_state          | boolean                  | Flag indicating if the user is authenticated.                                                                                                                                                                                                                                                                                                               | true, false                                                    |            |       | 2019-07-29 00:00:00 | 2019-07-29 00:00:00 | no     |     |               |              |               |
| params               | character varying(65535) | A string representation of the JSON parameters.                                                                                                                                                                                                                                                                                                             | `{"Key1":"Value1"; "Key2":"Value2"}`                           |            |       | 2019-01-25 00:00:00 | 2019-01-25 00:00:00 | no     |     |               |              |               |
| param\_key           | character varying(255)   | A value of a specific key within the parameter JSON.                                                                                                                                                                                                                                                                                                        | Key1                                                           |            |       | 2019-01-25 00:00:00 | 2019-01-25 00:00:00 | no     |     |               |              |               |
| param\_value         | character varying(65535) | The value corresponding with the specific key in param\_key.                                                                                                                                                                                                                                                                                                | Value1                                                         |            |       | 2019-01-25 00:00:00 | 2019-01-25 00:00:00 | no     |     |               |              |               |
| company\_name        | varchar(255)             | Name of the company associated with the data.                                                                                                                                                                                                                                                                                                               | acme                                                           |            |       | 2019-11-01 00:00:00 | 2024-05-24 00:00:00 | no     |     |               |              |               |
| current\_page\_url   | varchar(2000)            | The URL of the page where the customer initiated the ASAPP chat.                                                                                                                                                                                                                                                                                            | [https://www.asapp.com](https://www.asapp.com)                 |            |       | 2021-09-16 00:00:00 | 2021-09-16 00:00:00 | no     |     |               |              |               |

### Table: dim\_queues

The dim\_queues table creates a mapping of queue\_id to queue\_name. This is an hourly snapshot of information.

**Sync Time:** 1h

**Unique Condition:** queue\_key, company\_marker

| Column        | Type         | Description                                            | Example | Aggregates | Notes | Date Added          | Date Modified       | Ignore | PII | release state | Specific Use | Feature Group |
| :------------ | :----------- | :----------------------------------------------------- | :------ | :--------- | :---- | :------------------ | :------------------ | :----- | :-- | :------------ | :----------- | :------------ |
| company\_id   | bigint       | DEPRECATED 2024-03-25                                  | 10001   |            |       | 2022-01-27 00:00:00 | 2022-01-27 00:00:00 | no     |     |               |              |               |
| queue\_key    | bigint       | Numeric primary key for dim queues                     | 100001  |            |       | 2022-01-27 00:00:00 | 2022-01-27 00:00:00 | no     |     |               |              |               |
| queue\_id     | integer      | The ASAPP queue identifier which the issue was placed. | 210001  |            |       | 2022-01-27 00:00:00 | 2022-01-27 00:00:00 | no     |     |               |              |               |
| queue\_name   | varchar(255) | Name of the queue.                                     | Voice   |            |       | 2022-01-27 00:00:00 | 2022-01-27 00:00:00 | no     |     |               |              |               |
| company\_name | varchar(255) | Name of the company associated with the data.          | acme    |            |       | 2025-01-27 00:00:00 | 2025-01-27 00:00:00 | no     |     |               |              |               |

### Table: flow\_completions

The purpose of this table is to list the flow success information, any negation data, and other associated metadata for all issues. This table provides insights into the success or failure of any issue. Flow Success refers to the successful completion of a predefined process or interaction flow without interruptions, errors, or escalations, as determined by specific business logic.

**Sync Time:** 1h

**Unique Condition:** company\_id, issue\_id, flow\_name, flow\_status\_ts, success\_event\_details

| Column                    | Type                        | Description                                                                                                           | Example                                             | Aggregates | Notes | Date Added          | Date Modified       | Ignore | PII | release state | Specific Use | Feature Group |
| :------------------------ | :-------------------------- | :-------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------- | :--------- | :---- | :------------------ | :------------------ | :----- | :-- | :------------ | :----------- | :------------ |
| conversation\_id          | bigint                      | deprecated: 2019-09-25                                                                                                | 21352352                                            |            |       | 2018-11-14 00:00:00 | 2019-09-12 00:00:00 | no     | no  |               |              |               |
| company\_id               | bigint                      | DEPRECATED 2024-03-25                                                                                                 | 10001                                               |            |       | 2018-11-14 00:00:00 | 2018-11-14 00:00:00 | no     |     |               |              |               |
| company\_subdivision      | varchar(255)                | String identifier for the company subdivision associated with the conversation.                                       | ACMEsubcorp                                         |            |       | 2018-11-14 00:00:00 | 2018-11-14 00:00:00 | no     |     |               |              |               |
| company\_segments         | varchar(255)                | String with comma separated segments for the company enclosed by square brackets.                                     | marketing,promotions                                |            |       | 2018-11-14 00:00:00 | 2018-11-14 00:00:00 | no     |     |               |              |               |
| platform                  | varchar(255)                | The customer's platform.                                                                                              | web, ios, android, applebiz, voice                  |            |       | 2018-11-14 00:00:00 | 2018-11-14 00:00:00 | no     |     |               |              |               |
| customer\_id              | bigint                      | The ASAPP internal customer identifier.                                                                               | 123008                                              |            |       | 2018-11-14 00:00:00 | 2018-11-14 00:00:00 | no     |     |               |              |               |
| external\_user\_id        | varchar(255)                | Client-provided identifier for customer, Available if the customer is authenticated.                                  | 347bdddb-d3a1-45fc-bbcd-dbd3a175fc1c                |            |       | 2018-11-14 00:00:00 | 2018-11-14 00:00:00 | no     |     |               |              |               |
| customer\_session\_id     | character varying(65535)    | The ASAPP application session identifier for this customer.                                                           | c5d7afcc-89b9-43cc-90e2-b869bb2be883                |            |       | 2018-11-14 00:00:00 | 2018-11-14 00:00:00 | no     |     |               |              |               |
| success\_rule\_id         | character varying(256)      | The tag denoting whether the flow was successful within this issue.                                                   | LINK\_RESOLVED, TOOLING\_SUCCESS                    |            |       | 2018-11-14 00:00:00 | 2018-11-14 00:00:00 | no     |     |               |              |               |
| success\_event\_details   | character varying(65535)    | Any additional metadata about this success rule.                                                                      | asapp-pil://acme/grande-shop, EndSRSPositiveMessage |            |       | 2018-11-14 00:00:00 | 2018-11-14 00:00:00 | no     |     |               |              |               |
| success\_event\_ts        | timestamp without time zone | The time at which the flow success occurred.                                                                          | 2019-12-03T01:43:17.079000+00:00                    |            |       | 2018-11-14 00:00:00 | 2018-11-14 00:00:00 | no     |     |               |              |               |
| negation\_rule\_id        | character varying(256)      | The tag denoting the last negation event that reverted a previous success.                                            | TOOLING\_NEGATION, NEG\_QUESTION\_NOT\_ANSWERED     |            |       | 2018-11-14 00:00:00 | 2018-11-14 00:00:00 | no     |     |               |              |               |
| negation\_event\_ts       | timestamp without time zone | The time at which this negation occurred.                                                                             | 2019-12-03T01:49:19.875000+00:00                    |            |       | 2018-11-14 00:00:00 | 2018-11-14 00:00:00 | no     |     |               |              |               |
| is\_flow\_success\_event  | boolean                     | True if this event was not negated directly, false otherwise.                                                         | true, false                                         |            |       | 2018-11-14 00:00:00 | 2018-11-14 00:00:00 | no     |     |               |              |               |
| is\_flow\_success\_issue  | boolean                     | True if a success event occurred within this issue and no negation event occurred within this issue, false otherwise. | true, false                                         |            |       | 2018-11-14 00:00:00 | 2018-11-14 00:00:00 | no     |     |               |              |               |
| issue\_id                 | bigint                      | The ASAPP issue or conversation id.                                                                                   | 21352352                                            |            |       | 2019-09-27 00:00:00 | 2019-09-27 00:00:00 | no     |     |               |              |               |
| company\_name             | varchar(255)                | Name of the company associated with the data.                                                                         | acme                                                |            |       | 2019-11-01 00:00:00 | 2019-11-01 00:00:00 | no     |     |               |              |               |
| last\_relevant\_event\_ts |                             | Timestamp of the most recent relevant event (success or negation) detected for this issue.                            | 2020-01-02T19:13:27.698000+00:00                    |            |       | 2019-12-10 00:00:00 | 2019-12-10 00:00:00 | no     |     |               |              |               |

### Table: flow\_detail

The purpose of the flow\_detail table is to list out the data associated with each node traversed during an issue lifespan. A usage of this table is to understand the path a particular issue traversed trhough a flow node by node.

**Sync Time:** 1h

**Unique Condition:** event\_ts, issue\_id, event\_type

| Column              | Type                     | Description                                                                                                                  | Example                                                              | Aggregates | Notes | Date Added          | Date Modified       | Ignore | PII | release state | Specific Use | Feature Group |
| :------------------ | :----------------------- | :--------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------- | :--------- | :---- | :------------------ | :------------------ | :----- | :-- | :------------ | :----------- | :------------ |
| event\_ts           | timestamp                | The time of an given event.  All times are in UTC.                                                                           | 2019-11-08 14:00:06.957000+00:00                                     |            |       | 2018-08-14 00:00:00 | 2018-08-14 00:00:00 | no     |     |               |              |               |
| event\_type         | varchar(191)             | The type of event within a given flow.                                                                                       | MESSAGE\_DISPLAYED                                                   |            |       | 2018-08-14 00:00:00 | 2018-08-14 00:00:00 | no     | no  |               |              |               |
| conversation\_id    | bigint                   | deprecated: 2019-09-25                                                                                                       | 21352352                                                             |            |       | 2018-08-14 00:00:00 | 2018-08-27 00:00:00 | no     | no  |               |              |               |
| session\_id         | varchar(128)             | The ASAPP session identifier. It is a uuid generated by the chat backend. Note: a session may contain several conversations. | 347bdddb-d3a1-45fc-bbcd-dbd3a175fc1c                                 |            |       | 2018-08-14 00:00:00 | 2018-08-14 00:00:00 | no     |     |               |              |               |
| flow\_id            | varchar(255)             | An ASAPP identifier assigned to a particular flow executed during a customer event or request.                               | 347bdddb-d3a1-45fc-bbcd-dbd3a175fc1c                                 |            |       | 2018-08-14 00:00:00 | 2018-08-14 00:00:00 | no     |     |               |              |               |
| flow\_name          | varchar(255)             | The ASAPP text name for a given flow which was executed during a customer event or request.                                  | FirstChatMessage, AccountNumberFlow                                  |            |       | 2018-08-14 00:00:00 | 2018-08-14 00:00:00 | no     |     |               |              |               |
| event\_name         | character varying(65535) | The event name within a given flow.                                                                                          | FirstChatMessage, SuccessfulPaymentNode                              |            |       | 2018-08-14 00:00:00 | 2018-08-14 00:00:00 | no     | no  |               |              |               |
| link\_resolved\_pil | character varying(65535) | An asapp internal URI for the link.                                                                                          | asapp-pil://acme/bill-history                                        |            |       | 2018-08-14 00:00:00 | 2018-08-14 00:00:00 | no     | no  |               |              |               |
| link\_resolved\_pdl | character varying(65535) | The resolved host deep link or web link.                                                                                     | [https://www.acme.com/BillHistory](https://www.acme.com/BillHistory) |            |       | 2018-08-14 00:00:00 | 2018-08-14 00:00:00 | no     | no  |               |              |               |
| issue\_id           | bigint                   | The ASAPP issue or conversation id.                                                                                          | 21352352                                                             |            |       | 2019-09-27 00:00:00 | 2019-09-27 00:00:00 | no     |     |               |              |               |
| company\_name       | varchar(255)             | Name of the company associated with the data.                                                                                | acme                                                                 |            |       | 2019-11-01 00:00:00 | 2024-05-24 00:00:00 | no     |     |               |              |               |

### Table: intents

The intents table contains a list of intent codes and other information associated with the intent codes. Information in the table includes flow\_name and short\_description.

**Sync Time:** 1d

**Unique Condition:** code, company\_marker

| Column                  | Type                    | Description                                                                                                                                                                               | Example                                                                | Aggregates | Notes | Date Added          | Date Modified       | Ignore | PII | release state | Specific Use | Feature Group |
| :---------------------- | :---------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------- | :--------- | :---- | :------------------ | :------------------ | :----- | :-- | :------------ | :----------- | :------------ |
| code                    | character varying(128)  | The ASAPP internal code for a given intent.                                                                                                                                               | ACCTNUM                                                                |            |       | 2018-07-26 00:00:00 | 2018-07-26 00:00:00 | no     | no  |               |              |               |
| name                    | character varying(256)  | The user-friendly name associated with an intent.                                                                                                                                         | Get account number                                                     |            |       | 2018-07-26 00:00:00 | 2018-07-26 00:00:00 | no     | no  |               |              |               |
| intent\_type            | character varying(128)  | The hierarchical classification of this intent.                                                                                                                                           | SYSTEM, LEAF, PARENT                                                   |            |       | 2018-07-26 00:00:00 | 2021-11-24 00:00:00 | no     | no  |               |              |               |
| short\_description      | character varying(1024) | A short description for the intent code.                                                                                                                                                  | 'Users asking to get their account number.', 'Television error codes.' |            |       | 2018-07-26 00:00:00 | 2019-02-12 00:00:00 | no     | no  |               |              |               |
| flow\_name              | varchar(255)            | The ASAPP flow code attached to this intent code.                                                                                                                                         | AccountNumberFlow                                                      |            |       | 2018-12-13 00:00:00 | 2018-12-13 00:00:00 | no     | no  |               |              |               |
| default\_disambiguation | boolean                 | True if the intents are part of the first "welcome" screen of disambiguation buttons presented to a customer, false otherwise.                                                            | false, true                                                            |            |       | 2018-12-13 00:00:00 | 2018-12-13 00:00:00 | no     | no  |               |              |               |
| actions                 | character varying(4096) | Describes the type of action for the customer interface (e.g., "flow" for forms, "link" for URLs, or "text" for help content). An empty value indicates no specific action or automation. | flow, link, test, NULL                                                 |            |       | 2018-12-20 00:00:00 | 2018-12-20 00:00:00 | no     | no  |               |              |               |
| company\_name           | varchar(255)            | Name of the company associated with the data.                                                                                                                                             | acme                                                                   |            |       | 2019-11-01 00:00:00 | 2021-04-09 00:00:00 | no     |     |               |              |               |
| deleted\_ts             |                         | The date when this intent was removed. If blank or null, the intent is still active as of the export. An intent can be "undeleted" at a later date.                                       | NULL, 2018-12-13 01:23:34                                              |            |       | 2021-11-23 00:00:00 | 2021-11-23 00:00:00 | no     | no  |               |              |               |

### Table: issue\_callback\_3d

The issue\_callback table relates issues from the same customer during a three day window. This table will help measure customer callback rate, the rate at which the same customer recontacts within a three day period. The issue\_callback table is applicable only to specific clients.

**Sync Time:** 1h

**Unique Condition:** issue\_id

| Column                                     | Type                        | Description                                                                                                                                                                                                                                                                                                                                                 | Example                          | Aggregates | Notes | Date Added          | Date Modified       | Ignore | PII | release state | Specific Use | Feature Group |
| :----------------------------------------- | :-------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------- | :--------- | :---- | :------------------ | :------------------ | :----- | :-- | :------------ | :----------- | :------------ |
| instance\_ts                               | timestamp                   | The time window of computed elements.  This window is usually 15 minutes or 1 hour depending on the generation time. Times are rounded down to the nearest interval (for a time of 12:34 and an interval of 15m, this is 12:30). As an example, for a 15 minute interval an instance\_ts of 12:30 implies events from 12:30 -> 12:45. All times are in UTC. | 2019-11-08 14:00:06.957000+00:00 |            |       | 2019-11-14 00:00:00 | 2019-11-14 00:00:00 | no     |     |               |              |               |
| issue\_id                                  | bigint                      | The ASAPP issue or conversation id.                                                                                                                                                                                                                                                                                                                         | 21352352                         |            |       | 2019-11-14 00:00:00 | 2019-11-14 00:00:00 | no     |     |               |              |               |
| company\_id                                | bigint                      | DEPRECATED 2024-03-25                                                                                                                                                                                                                                                                                                                                       | 10001                            |            |       | 2019-11-14 00:00:00 | 2019-11-14 00:00:00 | no     |     |               |              |               |
| company\_subdivision                       | varchar(255)                | String identifier for the company subdivision associated with the conversation.                                                                                                                                                                                                                                                                             | ACMEsubcorp                      |            |       | 2019-11-14 00:00:00 | 2019-11-14 00:00:00 | no     |     |               |              |               |
| company\_segments                          | varchar(255)                | String with comma separated segments for the company enclosed by square brackets.                                                                                                                                                                                                                                                                           | marketing,promotions             |            |       | 2019-11-14 00:00:00 | 2019-11-14 00:00:00 | no     |     |               |              |               |
| customer\_id                               | bigint                      | The ASAPP internal customer identifier.                                                                                                                                                                                                                                                                                                                     | 123008                           |            |       | 2019-11-14 00:00:00 | 2019-11-14 00:00:00 | no     |     |               |              |               |
| issue\_created\_ts                         | timestamp                   | Timestamp when the issue ID is created.                                                                                                                                                                                                                                                                                                                     | 2018-09-05 19:58:06              |            |       | 2019-11-14 00:00:00 | 2019-11-14 00:00:00 | no     |     |               |              |               |
| issue\_disconnect\_ts                      | timestamp without time zone | Timestamp when the issue ID is Disconnected.                                                                                                                                                                                                                                                                                                                |                                  |            |       | 2019-11-14 00:00:00 | 2019-11-14 00:00:00 | no     |     |               |              |               |
| issue\_cutoff\_ts                          | timestamp without time zone | The timestamp when the callback period expires for an issue. This is calculated as 3 days after the issue\_disconnect\_ts.                                                                                                                                                                                                                                  |                                  |            |       | 2019-11-14 00:00:00 | 2019-11-14 00:00:00 | no     |     |               |              |               |
| next\_callback\_issue\_id                  | bigint                      | The ID of the next issue created by the same customer. This must occur between issue\_disconnect\_ts and issue\_cutoff\_ts. Null if no such issue exists.                                                                                                                                                                                                   |                                  |            |       | 2019-11-14 00:00:00 | 2019-11-14 00:00:00 | no     |     |               |              |               |
| next\_callback\_issue\_created\_ts         | timestamp without time zone | Time when the next\_callback\_issue was created.                                                                                                                                                                                                                                                                                                            |                                  |            |       | 2019-11-14 00:00:00 | 2019-11-14 00:00:00 | no     |     |               |              |               |
| time\_btwn\_next\_callback\_issue\_seconds | double precision            | The duration in seconds between issue\_disconnect\_ts and next\_callback\_issue\_created\_ts                                                                                                                                                                                                                                                                |                                  |            |       | 2019-11-14 00:00:00 | 2019-11-14 00:00:00 | no     |     |               |              |               |
| callback\_prev\_issue\_id                  | bigint                      | The ID of any previous issue created by the same customer, provided it was disconnected within 3 days of the current issue's create\_ts. Null if no such issue exists.                                                                                                                                                                                      |                                  |            |       | 2019-11-14 00:00:00 | 2019-11-14 00:00:00 | no     |     |               |              |               |
| callback\_prev\_issue\_created\_ts         | timestamp without time zone | The timestamp when the callback\_prev\_issue was created.                                                                                                                                                                                                                                                                                                   |                                  |            |       | 2019-11-14 00:00:00 | 2019-11-14 00:00:00 | no     |     |               |              |               |
| callback\_prev\_issue\_disconnect\_ts      | timestamp without time zone | The timestamp when the callback\_prev\_issue was disconnected.                                                                                                                                                                                                                                                                                              |                                  |            |       | 2019-11-14 00:00:00 | 2019-11-14 00:00:00 | no     |     |               |              |               |
| time\_btwn\_callback\_prev\_issue\_seconds | double precision            | The duration in seconds between callback\_prev\_issue\_disconnect\_ts and issue\_created\_ts.                                                                                                                                                                                                                                                               |                                  |            |       | 2019-11-14 00:00:00 | 2019-11-14 00:00:00 | no     |     |               |              |               |
| company\_name                              | varchar(255)                | Name of the company associated with the data.                                                                                                                                                                                                                                                                                                               | acme                             |            |       | 2019-11-14 00:00:00 | 2019-11-14 00:00:00 | no     |     |               |              |               |

### Table: issue\_entity\_genagent

hourly snapshot of issue grain generative\_agent data including both dimensions and metrics aggregated over "all time" (two days in practice).

**Sync Time:** 1h

**Unique Condition:** company\_marker, issue\_id

| Column                                                | Type         | Description                                                                                                                                                                                                                                                                                                                                                 | Example                              | Aggregates | Notes | Date Added          | Date Modified       | Ignore | PII | release state | Specific Use | Feature Group        |
| :---------------------------------------------------- | :----------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------- | :--------- | :---- | :------------------ | :------------------ | :----- | :-- | :------------ | :----------- | :------------------- |
| company\_name                                         | varchar(255) | Name of the company associated with the data.                                                                                                                                                                                                                                                                                                               | acme                                 |            |       | 2024-11-08 00:00:00 | 2024-11-08 00:00:00 | no     |     |               |              |                      |
| issue\_id                                             | bigint       | The ASAPP issue or conversation id.                                                                                                                                                                                                                                                                                                                         | 21352352                             |            |       | 2024-11-08 00:00:00 | 2024-11-08 00:00:00 | no     |     |               |              |                      |
| instance\_ts                                          | timestamp    | The time window of computed elements.  This window is usually 15 minutes or 1 hour depending on the generation time. Times are rounded down to the nearest interval (for a time of 12:34 and an interval of 15m, this is 12:30). As an example, for a 15 minute interval an instance\_ts of 12:30 implies events from 12:30 -> 12:45. All times are in UTC. | 2019-11-08 14:00:06.957000+00:00     |            |       | 2024-11-08 00:00:00 | 2024-11-08 00:00:00 | no     |     |               |              |                      |
| generative\_agent\_turns\_\_turn\_ct                  | int          | Number of turns ( one cycle of interaction between Generative Agent and a user)                                                                                                                                                                                                                                                                             | 1                                    |            |       | 2024-11-08 00:00:00 | 2024-11-08 00:00:00 | no     |     |               |              |                      |
| generative\_agent\_turns\_\_turn\_duration\_ms\_sum   | bigint       | Total duration in milliseconds between PROCESSING\_START and PROCESSING\_END across all turns.                                                                                                                                                                                                                                                              | 2                                    |            |       | 2024-11-08 00:00:00 | 2024-11-08 00:00:00 | no     |     |               |              |                      |
| generative\_agent\_turns\_\_utterance\_ct             | int          | Number of generative\_agent utterances.                                                                                                                                                                                                                                                                                                                     | 2                                    |            |       | 2024-11-08 00:00:00 | 2024-11-08 00:00:00 | no     |     |               |              |                      |
| generative\_agent\_turns\_\_contains\_escalation      | boolean      | Indicates if any turn in the conversation resulted in an escalation to a human agent.                                                                                                                                                                                                                                                                       | 1                                    |            |       | 2024-11-08 00:00:00 | 2024-11-08 00:00:00 | no     |     |               |              |                      |
| generative\_agent\_tasks\_\_first\_task\_name         | varchar(255) | Name of the first task initiated by the generative agent.                                                                                                                                                                                                                                                                                                   | SomethingElse                        |            |       | 2024-11-08 00:00:00 | 2024-11-08 00:00:00 | no     |     |               |              |                      |
| generative\_agent\_tasks\_\_last\_task\_name          | varchar(255) | Name of the last task initiated by the generative agent.                                                                                                                                                                                                                                                                                                    | SomethingElse                        |            |       | 2024-11-08 00:00:00 | 2024-11-08 00:00:00 | no     |     |               |              |                      |
| generative\_agent\_tasks\_\_task\_ct                  | int          | Number of tasks entered by generative\_agent.                                                                                                                                                                                                                                                                                                               | 2                                    |            |       | 2024-11-08 00:00:00 | 2024-11-08 00:00:00 | no     |     |               |              |                      |
| generative\_agent\_tasks\_\_configuration\_id         | varchar(255) | The configuration version responsible for the actions of the generative agent.                                                                                                                                                                                                                                                                              | 4ea5b399-f969-49c6-8318-e2c39a98e817 |            |       | 2024-11-08 00:00:00 | 2024-11-08 00:00:00 | no     |     |               |              |                      |
| generative\_agent\_tasks\_\_used\_hila                |              | Boolean representing if the conversation used a HILA escalation. True doesn't guarantee that there was a HILA response in the conversation.                                                                                                                                                                                                                 | TRUE                                 |            |       | 2024-11-08 00:00:00 | 2024-11-08 00:00:00 | no     |     |               |              | genagent\_tasks      |
| generative\_agent\_monitoring\_\_flagged\_for\_review |              | Boolean representing if the conversation has at least one suggested review flag.                                                                                                                                                                                                                                                                            | TRUE                                 |            |       | 2024-11-08 00:00:00 | 2024-11-08 00:00:00 | no     |     |               |              | genagent\_monitoring |
| generative\_agent\_monitoring\_\_review\_flags\_ct    |              | Number of review flags.                                                                                                                                                                                                                                                                                                                                     | 2                                    |            |       | 2024-11-08 00:00:00 | 2024-11-08 00:00:00 | no     |     |               |              | genagent\_monitoring |
| generative\_agent\_monitoring\_\_evaluation\_ct       |              | Number of evaluations.                                                                                                                                                                                                                                                                                                                                      | 10                                   |            |       | 2024-11-08 00:00:00 | 2024-11-08 00:00:00 | no     |     |               |              | genagent\_monitoring |

### Table: issue\_entry

This table shows data about how a user began an interaction with the sdk by issue

**Sync Time:** 1h

**Unique Condition:** company\_marker, issue\_id

| Column                | Type                     | Description                                                                                                                                                                                                                                                                                                                                                 | Example                                        | Aggregates | Notes | Date Added          | Date Modified       | Ignore | PII | release state | Specific Use | Feature Group |
| :-------------------- | :----------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------- | :--------- | :---- | :------------------ | :------------------ | :----- | :-- | :------------ | :----------- | :------------ |
| instance\_ts          | timestamp                | The time window of computed elements.  This window is usually 15 minutes or 1 hour depending on the generation time. Times are rounded down to the nearest interval (for a time of 12:34 and an interval of 15m, this is 12:30). As an example, for a 15 minute interval an instance\_ts of 12:30 implies events from 12:30 -> 12:45. All times are in UTC. | 2019-11-08 14:00:06.957000+00:00               |            |       | 2024-07-01 00:00:00 | 2024-07-01 00:00:00 | no     |     |               |              |               |
| issue\_created\_ts    | timestamp                | timestamp of the "NEW\_ISSUE" event for an issue                                                                                                                                                                                                                                                                                                            | 2018-09-05 19:58:06                            |            |       | 2024-07-01 00:00:00 | 2024-07-01 00:00:00 | no     |     |               |              |               |
| company\_id           | bigint                   | The ASAPP identifier of the company or test data source.                                                                                                                                                                                                                                                                                                    | 10001                                          |            |       | 2024-07-01 00:00:00 | 2024-07-01 00:00:00 | no     |     |               |              |               |
| company\_subdivision  | varchar(255)             | String identifier for the company subdivision associated with the conversation.                                                                                                                                                                                                                                                                             | ACMEsubcorp                                    |            |       | 2024-07-01 00:00:00 | 2024-07-01 00:00:00 | no     |     |               |              |               |
| company\_segments     | varchar(255)             | String with comma separated segments for the company enclosed by square brackets.                                                                                                                                                                                                                                                                           | marketing,promotions                           |            |       | 2024-07-01 00:00:00 | 2024-07-01 00:00:00 | no     |     |               |              |               |
| issue\_id             | bigint                   | The ASAPP issue or conversation id.                                                                                                                                                                                                                                                                                                                         | 21352352                                       |            |       | 2024-07-01 00:00:00 | 2024-07-01 00:00:00 | no     |     |               |              |               |
| entry\_type           | character varying(384)   | Initiation source of the first activity for the Issue ID was from a proactive invitation, reactive button click, deep-link ask-secondary-question, etc. examples: PROACTIVE,REACTIVE,ASK,DEEPLINK                                                                                                                                                           |                                                |            |       | 2024-07-01 00:00:00 | 2024-07-01 00:00:00 | no     |     |               |              |               |
| treatment\_type       | varchar(64)              | Indicates whether proactive messaging is configured to route the customer to an automated flow or a live agent.                                                                                                                                                                                                                                             | QUEUE\_PAUSED                                  |            |       | 2024-07-01 00:00:00 | 2024-07-01 00:00:00 | no     |     |               |              |               |
| rule\_name            | character varying(65535) | Name of the logical set of criteria met by the customer to trigger a proactive invitation or reactive button display.                                                                                                                                                                                                                                       |                                                |            |       | 2024-07-01 00:00:00 | 2024-07-01 00:00:00 | no     |     |               |              |               |
| is\_new\_conversation | boolean                  | Indicates whether the issue was created as a new conversation when the customer was not engaged in any ongoing or active issue.                                                                                                                                                                                                                             |                                                |            |       | 2019-11-15 00:00:00 | 2019-11-15 00:00:00 | no     |     |               |              |               |
| is\_new\_user         | boolean                  | Indicates if this is the first issue from the customer.                                                                                                                                                                                                                                                                                                     |                                                |            |       | 2019-11-15 00:00:00 | 2019-11-15 00:00:00 | no     |     |               |              |               |
| current\_page\_url    | varchar(2000)            | The URL of the page where the SDK was displayed.                                                                                                                                                                                                                                                                                                            | [https://www.asapp.com](https://www.asapp.com) |            |       | 2024-07-01 00:00:00 | 2024-07-01 00:00:00 | no     |     |               |              |               |
| referring\_page\_url  | character varying(65535) | The URL of the page that directed the user to the current page.                                                                                                                                                                                                                                                                                             |                                                |            |       | 2024-07-01 00:00:00 | 2024-07-01 00:00:00 | no     |     |               |              |               |
| client\_uuid          | character varying(36)    | The UUID generated (that only ever lasts fifteen minutes or so) on each fresh sdk cache that can identify a unique human. For internal debbuging, it won't go to sync (exactly as it comes from the source without any transformation)                                                                                                                      | c3944019-24d3-4887-8794-045cd61d5a22           |            |       | 2024-07-01 00:00:00 | 2021-06-01 00:00:00 | no     |     |               |              |               |
| company\_name         | varchar(255)             | Name of the company associated with the data.                                                                                                                                                                                                                                                                                                               | acme                                           |            |       | 2024-07-01 00:00:00 | 2024-07-01 00:00:00 | no     |     |               |              |               |

### Table: issue\_omnichannel

This table captures omnichannel tracking events related with the different platforms we have. (Initially only ABC)

**Sync Time:** 1h

**Unique Condition:** company\_marker, issue\_id, third\_party\_customer\_id

| Column                     | Type                     | Description                                                                                                                                                                                                                                                                                                                                                 | Example                           | Aggregates | Notes | Date Added          | Date Modified       | Ignore | PII | release state | Specific Use | Feature Group |
| :------------------------- | :----------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------- | :--------- | :---- | :------------------ | :------------------ | :----- | :-- | :------------ | :----------- | :------------ |
| instance\_ts               | timestamp                | The time window of computed elements.  This window is usually 15 minutes or 1 hour depending on the generation time. Times are rounded down to the nearest interval (for a time of 12:34 and an interval of 15m, this is 12:30). As an example, for a 15 minute interval an instance\_ts of 12:30 implies events from 12:30 -> 12:45. All times are in UTC. | 2019-11-08 14:00:06.957000+00:00  |            |       | 2020-06-02 00:00:00 | 2020-06-02 00:00:00 | no     |     |               |              |               |
| issue\_id                  | bigint                   | The ASAPP issue or conversation id.                                                                                                                                                                                                                                                                                                                         | 21352352                          |            |       | 2020-06-02 00:00:00 | 2020-06-02 00:00:00 | no     |     |               |              |               |
| company\_id                | bigint                   | DEPRECATED 2024-03-25                                                                                                                                                                                                                                                                                                                                       | 10001                             |            |       | 2020-06-02 00:00:00 | 2020-06-02 00:00:00 | no     |     |               |              |               |
| omni\_source               | character varying(191)   | The source of the information.                                                                                                                                                                                                                                                                                                                              | 'ABC'                             |            |       | 2020-06-03 00:00:00 | 2020-06-03 00:00:00 | no     |     |               |              |               |
| opaque\_id                 | varchar(191)             | deprecated: 2020-09-11                                                                                                                                                                                                                                                                                                                                      | 'urn:mbid:XXXXXX'                 |            |       | 2020-06-03 00:00:00 | 2020-11-09 00:00:00 | no     |     |               |              |               |
| external\_intent           | character varying(65535) | The intention or purpose of the chat as specified by the business, such as account\_question. deprecated: 2020-09-11                                                                                                                                                                                                                                        | 'account\_question'               |            |       | 2020-06-03 00:00:00 | 2020-11-09 00:00:00 | no     |     |               |              |               |
| external\_group            | character varying(65535) | Group identifier for the message, as specified by the business, such as department name. deprecated: 2020-09-11                                                                                                                                                                                                                                             | 'credit\_card\_department'        |            |       | 2020-06-03 00:00:00 | 2020-11-09 00:00:00 | no     |     |               |              |               |
| first\_utterance           | character varying(191)   | Captures the text of the first customer statement in an issue.                                                                                                                                                                                                                                                                                              |                                   |            |       | 2020-06-03 00:00:00 | 2020-06-03 00:00:00 | no     |     |               |              |               |
| event\_ts                  | timestamp                | deprecated: 2020-09-11                                                                                                                                                                                                                                                                                                                                      | 2019-11-08 14:00:06.957000+00:00  |            |       | 2020-06-02 00:00:00 | 2020-06-02 00:00:00 | no     |     |               |              |               |
| third\_party\_customer\_id | character varying(65535) | An encrypted identifier which is permanently mapped to an ASAPP customer.                                                                                                                                                                                                                                                                                   | 'urn:mbid:XXXXXX'                 |            |       | 2020-07-23 00:00:00 | 2020-07-23 00:00:00 | no     |     |               |              |               |
| external\_context\_1       | character varying(65535) | Provides traffic source or customer context from external platforms, including Apple Business Chat Group ID and Google Business Messaging Entry Point.                                                                                                                                                                                                      | 'credit\_card\_department'        |            |       | 2020-07-23 00:00:00 | 2020-07-23 00:00:00 | no     |     |               |              |               |
| external\_context\_2       | character varying(65535) | Provides additional traffic source or customer context from external platforms, including Apple Business Chat Intent ID and Google Business Messaging Place ID.                                                                                                                                                                                             | 'account\_question'               |            |       | 2020-07-23 00:00:00 | 2020-07-23 00:00:00 | no     |     |               |              |               |
| created\_ts                | timestamp                | Timestamp at which the message was sent.                                                                                                                                                                                                                                                                                                                    | '2019-11-08T14:00:06.95700000:00' |            |       | 2020-07-23 00:00:00 | 2020-07-23 00:00:00 | no     |     |               |              |               |
| company\_name              | varchar(255)             | Name of the company associated with the data.                                                                                                                                                                                                                                                                                                               | acme                              |            |       | 2025-01-09 00:00:00 | 2025-01-09 00:00:00 | no     |     |               |              |               |

### Table: issue\_queues

The purpose for the issue\_queues table is to capture relevant data associated with an issue in a wait queue. Data captured includes the issue\_id, the enqueue time, the rep, the event type and flowname. This is captured in 15 minute windows of time.

**Sync Time:** 1h

**Unique Condition:** issue\_id, queue\_id, enter\_queue\_ts

| Column                      | Type                        | Description                                                                                                                                                                                                                                                                                                                                                 | Example                                       | Aggregates | Notes | Date Added          | Date Modified       | Ignore | PII | release state | Specific Use | Feature Group |
| :-------------------------- | :-------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------- | :--------- | :---- | :------------------ | :------------------ | :----- | :-- | :------------ | :----------- | :------------ |
| instance\_ts                | timestamp                   | The time window of computed elements.  This window is usually 15 minutes or 1 hour depending on the generation time. Times are rounded down to the nearest interval (for a time of 12:34 and an interval of 15m, this is 12:30). As an example, for a 15 minute interval an instance\_ts of 12:30 implies events from 12:30 -> 12:45. All times are in UTC. | 2019-11-08 14:00:06.957000+00:00              |            |       | 2018-08-14 00:00:00 | 2018-08-14 00:00:00 | no     |     |               |              |               |
| agent\_id                   | bigint                      | deprecated: 2019-09-25                                                                                                                                                                                                                                                                                                                                      | 123008                                        |            |       | 2018-08-14 00:00:00 | 2018-08-14 00:00:00 | no     |     |               |              |               |
| conversation\_id            | bigint                      | deprecated: 2019-09-25                                                                                                                                                                                                                                                                                                                                      | 21352352                                      |            |       | 2018-08-14 00:00:00 | 2018-08-14 00:00:00 | no     |     |               |              |               |
| company\_subdivision        | varchar(255)                | String identifier for the company subdivision associated with the conversation.                                                                                                                                                                                                                                                                             | ACMEsubcorp                                   |            |       | 2018-08-14 00:00:00 | 2018-08-14 00:00:00 | no     |     |               |              |               |
| company\_segments           | varchar(255)                | String with comma separated segments for the company enclosed by square brackets.                                                                                                                                                                                                                                                                           | marketing,promotions                          |            |       | 2018-08-14 00:00:00 | 2018-08-14 00:00:00 | no     |     |               |              |               |
| enter\_queue\_ts            | timestamp without time zone | Timestamp when the issue was added to the queue.                                                                                                                                                                                                                                                                                                            | 2019-12-26T18:25:22.836000+00:00              |            |       | 2018-08-14 00:00:00 | 2018-08-14 00:00:00 | no     |     |               |              |               |
| exit\_queue\_ts             | timestamp                   | Timestamp when the issue was removed from the queue.                                                                                                                                                                                                                                                                                                        | 2019-12-26T18:25:28.552000+00:00              |            |       | 2018-08-14 00:00:00 | 2018-08-14 00:00:00 | no     |     |               |              |               |
| queue\_id                   | integer                     | ASAPP queue identifier which the issue was placed.                                                                                                                                                                                                                                                                                                          | 20001                                         |            |       | 2018-08-14 00:00:00 | 2018-08-14 00:00:00 | no     |     |               |              |               |
| queue\_name                 | varchar(255)                | Queue name which the issue was placed.                                                                                                                                                                                                                                                                                                                      | Acme Residential, Acme Wireless               |            |       | 2018-08-14 00:00:00 | 2018-08-14 00:00:00 | no     |     |               |              |               |
| abandoned                   | boolean                     | Flag indicating whether the issue was abandoned.                                                                                                                                                                                                                                                                                                            | true, false                                   |            |       | 2018-08-14 00:00:00 | 2018-08-14 00:00:00 | no     |     |               |              |               |
| enqueue\_time               | double precision            | Duration in seconds that the issue spent in the queue.                                                                                                                                                                                                                                                                                                      | 5.716000080108643                             |            |       | 2018-08-14 00:00:00 | 2018-08-14 00:00:00 | no     |     |               |              |               |
| exit\_queue\_eventtype      | character varying(65535)    | Reason the customer exited the queue.                                                                                                                                                                                                                                                                                                                       | CUSTOMER\_TIMEDOUT, 	NEW\_REP                 |            |       | 2018-08-14 00:00:00 | 2018-08-14 00:00:00 | no     |     |               |              |               |
| rep\_id                     | varchar(191)                | The ASAPP rep/agent identifier.                                                                                                                                                                                                                                                                                                                             | 123008                                        |            |       | 2019-09-27 00:00:00 | 2019-09-27 00:00:00 | no     |     |               |              |               |
| enter\_queue\_eventtype     | character varying(65535)    | Reason the customer entered the queue.                                                                                                                                                                                                                                                                                                                      | TRANSFER\_REQUESTED, SRS\_HIER\_AND\_TREEWALK |            |       | 2018-08-14 00:00:00 | 2018-08-14 00:00:00 | no     |     |               |              |               |
| enter\_queue\_eventflags    | bigint                      | Event causing the issue to be enqueued.                                                                                                                                                                                                                                                                                                                     | (1=customer, 2=rep, 4=bot)                    |            |       | 2018-08-14 00:00:00 | 2018-08-14 00:00:00 | no     |     |               |              |               |
| enter\_queue\_flow\_name    | character varying(65535)    | Name of the flow which the issue was in before being enqueued.                                                                                                                                                                                                                                                                                              | LiveChatAgentsBusyFlow                        |            |       | 2018-08-14 00:00:00 | 2018-08-14 00:00:00 | no     |     |               |              |               |
| enter\_queue\_message\_name | character varying(65535)    | Message name within the flow which the user was in before being enqueued.                                                                                                                                                                                                                                                                                   | someoneWillBeWithYou, shortWaitFormNode       |            |       | 2018-08-14 00:00:00 | 2018-08-14 00:00:00 | no     |     |               |              |               |
| exit\_queue\_eventflags     | bigint                      | Event causing the issue to be deenqueued.                                                                                                                                                                                                                                                                                                                   | (1=customer, 2=rep, 4=bot)                    |            |       | 2018-08-14 00:00:00 | 2018-08-14 00:00:00 | no     |     |               |              |               |
| issue\_id                   | bigint                      | The ASAPP issue or conversation id.                                                                                                                                                                                                                                                                                                                         | 21352352                                      |            |       | 2019-09-27 00:00:00 | 2019-09-27 00:00:00 | no     |     |               |              |               |
| company\_name               | varchar(255)                | Name of the company associated with the data.                                                                                                                                                                                                                                                                                                               | acme                                          |            |       | 2019-11-01 00:00:00 | 2024-05-24 00:00:00 | no     |     |               |              |               |

### Table: issue\_sentiment

The issue\_sentiment table captures sentiment analysis information related to customer issues. Each row represents an issue and its associated sentiment score or classification. This table helps track customer sentiment trends, assess the emotional tone of interactions, and support decision-making for issue resolution strategies.

**Sync Time:** 1d

**Unique Condition:** issue\_id

| Column           | Type                     | Description                                                                                                                                                                                                                                                                                                                                                 | Example                          | Aggregates | Notes | Date Added          | Date Modified       | Ignore | PII | release state | Specific Use | Feature Group |
| :--------------- | :----------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------- | :--------- | :---- | :------------------ | :------------------ | :----- | :-- | :------------ | :----------- | :------------ |
| instance\_ts     | timestamp                | The time window of computed elements.  This window is usually 15 minutes or 1 hour depending on the generation time. Times are rounded down to the nearest interval (for a time of 12:34 and an interval of 15m, this is 12:30). As an example, for a 15 minute interval an instance\_ts of 12:30 implies events from 12:30 -> 12:45. All times are in UTC. | 2019-11-08 14:00:06.957000+00:00 |            |       | 2018-07-26 00:00:00 | 2018-09-29 00:00:00 | no     |     |               |              |               |
| conversation\_id | bigint                   | deprecated: 2019-09-25                                                                                                                                                                                                                                                                                                                                      | 21352352                         |            |       | 2018-07-26 00:00:00 | 2018-07-26 00:00:00 | no     |     |               |              |               |
| score            | double precision         | The sentiment score applied to this issue.                                                                                                                                                                                                                                                                                                                  | 0.5545974373817444, -1000.0      |            |       | 2018-07-26 00:00:00 | 2018-07-26 00:00:00 | no     |     |               |              |               |
| status           | character varying(65535) | Reason for the sentiment score, which may be NULL                                                                                                                                                                                                                                                                                                           | CONVERSATION\_TOO\_SHORT         |            |       | 2018-07-26 00:00:00 | 2018-07-26 00:00:00 | no     |     |               |              |               |
| issue\_id        | bigint                   | The ASAPP issue or conversation id.                                                                                                                                                                                                                                                                                                                         | 21352352                         |            |       | 2019-09-27 00:00:00 | 2019-09-27 00:00:00 | no     |     |               |              |               |
| company\_name    | varchar(255)             | Name of the company associated with the data.                                                                                                                                                                                                                                                                                                               | acme                             |            |       | 2019-11-01 00:00:00 | 2024-05-24 00:00:00 | no     |     |               |              |               |

### Table: issue\_session\_merge

A list of the merged issues that have occurred as a result of transferring to a queue during a cold transfer and the first issue\_id associated with this new issue\_id. Only relevant for VOICE. activate-date: 2024-01-17

**Sync Time:** 1h

**Unique Condition:** issue\_id, session\_id

| Column                    | Type         | Description                                                                                                                                                                                                                                                                                                                                                 | Example                                            | Aggregates | Notes | Date Added          | Date Modified       | Ignore | PII | release state | Specific Use | Feature Group |
| :------------------------ | :----------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------- | :--------- | :---- | :------------------ | :------------------ | :----- | :-- | :------------ | :----------- | :------------ |
| instance\_ts              | timestamp    | The time window of computed elements.  This window is usually 15 minutes or 1 hour depending on the generation time. Times are rounded down to the nearest interval (for a time of 12:34 and an interval of 15m, this is 12:30). As an example, for a 15 minute interval an instance\_ts of 12:30 implies events from 12:30 -> 12:45. All times are in UTC. | 2019-11-08 14:00:06.957000+00:00                   |            |       |                     |                     | no     |     |               |              |               |
| company\_id               | bigint       | DEPRECATED 2024-03-25                                                                                                                                                                                                                                                                                                                                       | 10001                                              |            |       | 2020-02-05 00:00:00 | 2020-02-05 00:00:00 | no     |     |               |              |               |
| company\_name             | varchar(255) | Name of the company associated with the data.                                                                                                                                                                                                                                                                                                               | acme                                               |            |       |                     |                     | no     |     |               |              |               |
| issue\_id                 | bigint       | The ASAPP issue or conversation id.                                                                                                                                                                                                                                                                                                                         | 21352352                                           |            |       | 2020-02-05 00:00:00 | 2020-02-05 00:00:00 | no     |     |               |              |               |
| customer\_id              | bigint       | The ASAPP internal customer identifier.                                                                                                                                                                                                                                                                                                                     | 123008                                             |            |       | 2020-02-05 00:00:00 | 2020-02-05 00:00:00 | no     |     |               |              |               |
| session\_id               | varchar(128) | The ASAPP session identifier. It is a uuid generated by the chat backend. Note: a session may contain several conversations.                                                                                                                                                                                                                                | 'guid:2348001002-0032128785-2172846080-0001197432' |            |       | 2020-02-05 00:00:00 | 2020-02-05 00:00:00 | no     |     |               |              |               |
| issue\_created\_ts        | timestamp    | Timestamp this issue\_id was created.                                                                                                                                                                                                                                                                                                                       | 2018-09-05 19:58:06                                |            |       | 2020-02-05 00:00:00 | 2020-02-05 00:00:00 | no     |     |               |              |               |
| first\_issue\_id          | bigint       | The first issue\_id for this session.                                                                                                                                                                                                                                                                                                                       | 21352352                                           |            |       | 2020-02-05 00:00:00 | 2020-02-05 00:00:00 | no     |     |               |              |               |
| first\_issue\_created\_ts | timestamp    | Timestamp when the NEW\_ISSUE event occurred for the first issue\_id associated with this session.                                                                                                                                                                                                                                                          | 2018-09-05 19:58:06                                |            |       | 2020-02-05 00:00:00 | 2020-02-05 00:00:00 | no     |     |               |              |               |
| last\_issue\_id           | bigint       | The last issue\_id associated with this session.                                                                                                                                                                                                                                                                                                            | 21352352                                           |            |       | 2020-02-05 00:00:00 | 2020-02-05 00:00:00 | no     |     |               |              |               |
| last\_issue\_created\_ts  | timestamp    | Timestamp when the NEW\_ISSUE event occurred for the last issue\_id associated with this session                                                                                                                                                                                                                                                            | 2018-09-05 19:58:06                                |            |       | 2020-02-05 00:00:00 | 2020-02-05 00:00:00 | no     |     |               |              |               |

### Table: issue\_type

The purpose of the issue\_type table is to capture any client specific naming of issue parameters. This captures per issue the initial "issue type name" which the client has specified. This is captured in 15 minute window increments.

**Sync Time:** 1h

**Unique Condition:** company\_id, customer\_id, issue\_id

| Column               | Type                        | Description                                                                                                                                                                                                                                                                                                                                                 | Example                          | Aggregates | Notes | Date Added          | Date Modified       | Ignore | PII | release state | Specific Use | Feature Group |
| :------------------- | :-------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------- | :--------- | :---- | :------------------ | :------------------ | :----- | :-- | :------------ | :----------- | :------------ |
| instance\_ts         | timestamp                   | The time window of computed elements.  This window is usually 15 minutes or 1 hour depending on the generation time. Times are rounded down to the nearest interval (for a time of 12:34 and an interval of 15m, this is 12:30). As an example, for a 15 minute interval an instance\_ts of 12:30 implies events from 12:30 -> 12:45. All times are in UTC. | 2019-11-08 14:00:06.957000+00:00 |            |       | 2019-08-12 00:00:00 | 2019-08-12 00:00:00 | no     |     |               |              |               |
| prechat\_survey\_ts  | timestamp without time zone | Timestamp when the pre-chat survey was completed to route the issue to an expert.                                                                                                                                                                                                                                                                           | 2019-08-07 19:34:18.844          |            |       | 2019-08-12 00:00:00 | 2019-08-12 00:00:00 | no     |     |               |              |               |
| type\_change\_ts     | timestamp without time zone | The timestamp when the issue type was changed (e.g. escalated from question.) Null if the issue type was not changed.                                                                                                                                                                                                                                       | 2019-08-07 19:45:57.325          |            |       | 2019-08-12 00:00:00 | 2019-08-12 00:00:00 | no     |     |               |              |               |
| issue\_id            | bigint                      | The ASAPP issue or conversation id.                                                                                                                                                                                                                                                                                                                         | 21352352                         |            |       | 2019-08-12 00:00:00 | 2019-08-12 00:00:00 | no     |     |               |              |               |
| company\_id          | bigint                      | DEPRECATED 2024-03-25                                                                                                                                                                                                                                                                                                                                       | 10001                            |            |       | 2019-08-12 00:00:00 | 2019-08-12 00:00:00 | no     |     |               |              |               |
| company\_subdivision | varchar(255)                | String identifier for the company subdivision associated with the conversation.                                                                                                                                                                                                                                                                             | ACMEsubcorp                      |            |       | 2019-08-12 00:00:00 | 2019-08-12 00:00:00 | no     |     |               |              |               |
| company\_segments    | varchar(255)                | String with comma separated segments for the company enclosed by square brackets.                                                                                                                                                                                                                                                                           | marketing,promotions             |            |       | 2019-08-12 00:00:00 | 2019-08-12 00:00:00 | no     |     |               |              |               |
| customer\_id         | bigint                      | The ASAPP internal customer identifier.                                                                                                                                                                                                                                                                                                                     | 123008                           |            |       | 2019-08-12 00:00:00 | 2019-08-12 00:00:00 | no     |     |               |              |               |
| queue\_id            | integer                     | The unique identifier for the queue to which the issue was routed.                                                                                                                                                                                                                                                                                          | 20001                            |            |       | 2019-08-12 00:00:00 | 2019-08-12 00:00:00 | no     |     |               |              |               |
| rep\_id              | varchar(191)                | The ASAPP rep/agent identifier.                                                                                                                                                                                                                                                                                                                             | 123008                           |            |       | 2019-08-12 00:00:00 | 2019-08-12 00:00:00 | no     |     |               |              |               |
| issue\_type          | character varying(65535)    | Current type of the issue (question or escalation).                                                                                                                                                                                                                                                                                                         | ESCALATION                       |            |       | 2019-08-12 00:00:00 | 2019-08-12 00:00:00 | no     |     |               |              |               |
| initial\_type        | character varying(65535)    | Original type of the issue when it was created.                                                                                                                                                                                                                                                                                                             | QUESTION                         |            |       | 2019-08-12 00:00:00 | 2019-08-12 00:00:00 | no     |     |               |              |               |
| subsidiary\_name     | character varying(65535)    | Name of the company to which this issue is associated.                                                                                                                                                                                                                                                                                                      | ACMEsubsid                       |            |       | 2019-08-12 00:00:00 | 2019-08-12 00:00:00 | no     |     |               |              |               |
| channel\_type        | character varying(65535)    | Indicates the channel (voice or chat) if the issue started as ESCALATION, or null otherwise.                                                                                                                                                                                                                                                                | CALL                             |            |       | 2019-08-12 00:00:00 | 2019-08-12 00:00:00 | no     |     |               |              |               |
| company\_name        | varchar(255)                | Name of the company associated with the data.                                                                                                                                                                                                                                                                                                               | acme                             |            |       | 2019-11-01 00:00:00 | 2024-05-24 00:00:00 | no     |     |               |              |               |

### Table: knowledge\_base

This table captures interactions with articles in the knowledge base. An article can be viewed, attached to a chat and marked as favorite

**Sync Time:** 1h

**Unique Condition:** company\_id, issue\_id, article\_id, event\_ts

| Column                 | Type                        | Description                                                                                                                                                                                                                                                                                                               | Example                                | Aggregates | Notes | Date Added          | Date Modified       | Ignore | PII | release state | Specific Use | Feature Group |
| :--------------------- | :-------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :------------------------------------- | :--------- | :---- | :------------------ | :------------------ | :----- | :-- | :------------ | :----------- | :------------ |
| issue\_id              | bigint                      | The ASAPP issue or conversation id.                                                                                                                                                                                                                                                                                       | 21352352                               |            |       | 2019-12-20 00:00:00 | 2019-12-20 00:00:00 | no     |     |               |              |               |
| company\_id            | bigint                      | DEPRECATED 2024-03-25                                                                                                                                                                                                                                                                                                     | 10001                                  |            |       | 2019-12-20 00:00:00 | 2019-12-20 00:00:00 | no     |     |               |              |               |
| article\_id            | character varying(65535)    | The knowledge base identifier for the article.                                                                                                                                                                                                                                                                            | 5, 16580001                            |            |       | 2019-12-20 00:00:00 | 2019-12-20 00:00:00 | no     |     |               |              |               |
| interaction            | character varying(8)        | An indicator of whether the article was viewed or attached to a chat.                                                                                                                                                                                                                                                     | 'Viewed', 'Attached'                   |            |       | 2019-12-20 00:00:00 | 2019-12-20 00:00:00 | no     |     |               |              |               |
| is\_favorited          | boolean                     | Indicates whether the article is marked as a favorite.                                                                                                                                                                                                                                                                    | TRUE, FALSE                            |            |       | 2019-12-20 00:00:00 | 2019-12-20 00:00:00 | no     |     |               |              |               |
| company\_name          | varchar(255)                | Name of the company associated with the data.                                                                                                                                                                                                                                                                             | acme                                   |            |       | 2019-12-20 00:00:00 | 2019-12-20 00:00:00 | no     |     |               |              |               |
| event\_ts              | timestamp                   | The time of an given event.  All times are in UTC.                                                                                                                                                                                                                                                                        | 2019-11-08 14:00:06.957000+00:00       |            |       | 2019-12-20 00:00:00 | 2019-12-20 00:00:00 | no     |     |               |              |               |
| event\_type            | varchar(191)                | Either Interaction events requested: ('OPEN\_ARTICLE', 'PAPERCLIP\_ARTICLE') or Recommendation events requested: ('DISPLAYED','AGENT\_HOVERED', 'AGENT\_CLICKED\_EXTERNAL\_ARTICLE\_LINK', 'AGENT\_CLICKED\_THUMBS\_UP' 'AGENT\_CLICKED\_THUMBS\_DOWN', 'AGENT\_CLICKED\_EXPAND\_CARD', 'AGENT\_CLICKED\_COLLAPSE\_CARD') | CUSTOMER\_TIMEOUT, TEXT\_MESSAGE       |            |       | 2019-12-20 00:00:00 | 2019-12-20 00:00:00 | no     |     |               |              |               |
| event\_name            | character varying(191)      | A string that determines if the action comes from an Interaction event or a Recommendation event                                                                                                                                                                                                                          | 'INTERACTION', 'SUGGESTION'            |            |       | 2019-12-20 00:00:00 | 2019-12-20 00:00:00 | no     |     |               |              |               |
| rep\_id                | varchar(191)                | The ASAPP rep/agent identifier.                                                                                                                                                                                                                                                                                           | 123008                                 |            |       | 2020-03-30 00:00:00 | 2020-03-30 00:00:00 | no     |     |               |              |               |
| rep\_assigned\_ts      | timestamp without time zone | timestamp of the NEW\_REP event                                                                                                                                                                                                                                                                                           |                                        |            |       | 2020-10-15 00:00:00 | 2020-10-15 00:00:00 | no     |     |               |              |               |
| article\_category      | character varying(191)      | Category to distinguish between flows and knowledge base articles. REGULAR is for knowledge base articles. FLOWS is for flows recommendation.                                                                                                                                                                             | 'REGULAR'                              |            |       | 2020-10-15 00:00:00 | 2020-10-15 00:00:00 | no     |     |               |              |               |
| discovery\_type        | character varying(256)      | How article was presented/discovered. (recommendation, quick\_access\_kbr, favorite, search, filebrowser)                                                                                                                                                                                                                 | recommendation                         |            |       | 2021-03-09 00:00:00 | 2021-03-09 00:00:00 | no     |     |               |              |               |
| position               | integer                     | Position of article recommendation when multiple recommendations are presented. Default is 1 when a single recommendation is presented.                                                                                                                                                                                   | 1                                      |            |       | 2021-03-09 00:00:00 | 2021-03-09 00:00:00 | no     |     |               |              |               |
| span\_id               | varchar(128)                | Identifier for a recommendation. Can be used to tie a recommendation to an interaction such as HOVER, OPEN\_ARTICLE.                                                                                                                                                                                                      | 'coo9c7b8-7a50-11eb-b13e-8ad0401b5458' |            |       | 2021-03-09 00:00:00 | 2021-03-09 00:00:00 | no     |     |               |              |               |
| article\_name          |                             | Short description of the article.                                                                                                                                                                                                                                                                                         | 500                                    |            |       | 2021-03-09 00:00:00 | 2021-03-09 00:00:00 | no     |     |               |              |               |
| is\_paperclip\_enabled |                             | Flag which indicates whether the article is paper clipped (Bookmark).                                                                                                                                                                                                                                                     | TRUE                                   |            |       | 2021-03-09 00:00:00 | 2021-03-09 00:00:00 | no     |     |               |              |               |
| external\_article\_id  |                             | Identifier for external article id.                                                                                                                                                                                                                                                                                       | 4567                                   |            |       | 2021-03-09 00:00:00 | 2021-03-09 00:00:00 | no     |     |               |              |               |

### Table: live\_agent\_opportunities

The live\_agent\_opportunities table tracks instances where automated processes, such as chatbots or virtual assistants, escalate a conversation or issue to a live agent. It offers insights into the effectiveness of automation, the reasons behind escalations, and key metrics for improving both customer experience and agent performance. The term "Opportunity" refers to the period from when the conversation is handed over to an agent until its closure.

**Sync Time:** 1h

**Unique Condition:** issue\_id, customer\_id, opportunity\_ts

| Column                                  | Type                        | Description                                                                                                                                                                                                                                                                                                                                                 | Example                                 | Aggregates | Notes | Date Added          | Date Modified       | Ignore | PII | release state | Specific Use | Feature Group |
| :-------------------------------------- | :-------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------- | :--------- | :---- | :------------------ | :------------------ | :----- | :-- | :------------ | :----------- | :------------ |
| instance\_ts                            | timestamp                   | The time window of computed elements.  This window is usually 15 minutes or 1 hour depending on the generation time. Times are rounded down to the nearest interval (for a time of 12:34 and an interval of 15m, this is 12:30). As an example, for a 15 minute interval an instance\_ts of 12:30 implies events from 12:30 -> 12:45. All times are in UTC. | 2019-11-08 14:00:06.957000+00:00        |            |       | 2019-07-01 00:00:00 | 2019-07-01 00:00:00 | no     |     |               |              |               |
| company\_id                             | bigint                      | DEPRECATED 2024-03-25                                                                                                                                                                                                                                                                                                                                       | 10001                                   |            |       | 2019-07-01 00:00:00 | 2019-07-01 00:00:00 | no     |     |               |              |               |
| company\_subdivision                    | varchar(255)                | String identifier for the company subdivision associated with the conversation.                                                                                                                                                                                                                                                                             | ACMEsubcorp                             |            |       | 2019-07-01 00:00:00 | 2019-07-01 00:00:00 | no     |     |               |              |               |
| company\_segments                       | varchar(255)                | String with comma separated segments for the company enclosed by square brackets.                                                                                                                                                                                                                                                                           | marketing,promotions                    |            |       | 2019-07-01 00:00:00 | 2019-07-01 00:00:00 | no     |     |               |              |               |
| customer\_id                            | bigint                      | The ASAPP internal customer identifier.                                                                                                                                                                                                                                                                                                                     | 123008                                  |            |       | 2019-07-01 00:00:00 | 2019-07-01 00:00:00 | no     |     |               |              |               |
| rep\_id                                 | varchar(191)                | The identifier of the rep this opportunity was assigned to or null if it was never assigned.                                                                                                                                                                                                                                                                | 123008                                  |            |       | 2019-07-01 00:00:00 | 2019-07-01 00:00:00 | no     |     |               |              |               |
| opportunity\_ts                         | timestamp                   | Timestamp of the opportunity event.                                                                                                                                                                                                                                                                                                                         | 2020-01-06 23:13:50.617                 |            |       | 2019-07-01 00:00:00 | 2019-07-01 00:00:00 | no     |     |               |              |               |
| issue\_id                               | bigint                      | The ASAPP issue or conversation id.                                                                                                                                                                                                                                                                                                                         | 21352352                                |            |       | 2019-07-01 00:00:00 | 2019-07-01 00:00:00 | no     |     |               |              |               |
| platform                                | varchar(255)                | The platform which was used by the customer for a particular event or request (web, ios, android, applebiz, voice).                                                                                                                                                                                                                                         | web, ios, android, applebiz, voice      |            |       | 2019-07-01 00:00:00 | 2019-07-01 00:00:00 | no     |     |               |              |               |
| device\_type                            | varchar(255)                | Last device type used by the customer.                                                                                                                                                                                                                                                                                                                      | mobile, tablet, desktop, watch, unknown |            |       | 2019-07-01 00:00:00 | 2019-07-01 00:00:00 | no     |     |               |              |               |
| first\_opportunity                      | boolean                     | Indicator of whether this is the first opportunity for this issue.                                                                                                                                                                                                                                                                                          | true, false                             |            |       | 2019-07-01 00:00:00 | 2019-07-01 00:00:00 | no     |     |               |              |               |
| triggered\_when\_busy                   | boolean                     | Indicator of whether the customer was asked if they wanted to wait for an agent.                                                                                                                                                                                                                                                                            | true                                    |            |       | 2019-07-01 00:00:00 | 2019-07-01 00:00:00 | no     |     |               |              |               |
| triggered\_outside\_hours               | boolean                     | Indicator of whether the customer was told they are outside of business hours.                                                                                                                                                                                                                                                                              | false                                   |            |       | 2019-07-01 00:00:00 | 2019-07-01 00:00:00 | no     |     |               |              |               |
| queue\_id                               | integer                     | Identifier of the agent group this opportunity will be routed to.                                                                                                                                                                                                                                                                                           | 2001                                    |            |       | 2019-07-01 00:00:00 | 2019-07-01 00:00:00 | no     |     |               |              |               |
| queue\_name                             | varchar(255)                | Name of the queue this opportunity will be routed to.                                                                                                                                                                                                                                                                                                       | Residential                             |            |       | 2019-07-01 00:00:00 | 2019-07-01 00:00:00 | no     |     |               |              |               |
| intent\_code                            | character varying(128)      | The most recent intent code used for routing this issue.                                                                                                                                                                                                                                                                                                    | SALESFAQ, BILLINFO                      |            |       | 2019-07-01 00:00:00 | 2019-07-01 00:00:00 | no     |     |               |              |               |
| event\_type                             | varchar(191)                | The event\_type of this opportunity. This can be useful to determine if this is a transfer, etc.                                                                                                                                                                                                                                                            | NEW\_REP, SRS\_HIER\_AND\_TREEWALK      |            |       | 2019-07-01 00:00:00 | 2019-07-01 00:00:00 | no     |     |               |              |               |
| previous\_event\_type                   | character varying(65535)    | The event\_type that occurred prior to this opportunity. This can be useful to determine if the customer was previously transferred or timed out.                                                                                                                                                                                                           | SRS\_HIER\_AND\_TREEWALK                |            |       | 2019-07-01 00:00:00 | 2019-07-01 00:00:00 | no     |     |               |              |               |
| flow\_name                              | varchar(255)                | The flow associated with the routing intent, if any.                                                                                                                                                                                                                                                                                                        | ForceChatFlow                           |            |       | 2019-07-01 00:00:00 | 2019-07-01 00:00:00 | no     |     |               |              |               |
| by\_request                             | boolean                     | Indicator of whether the customer explicitly request to speak to an agent (i.e. intent code has an AGENT as a parent).                                                                                                                                                                                                                                      | true, false                             |            |       | 2019-07-01 00:00:00 | 2019-07-01 00:00:00 | no     |     |               |              |               |
| by\_end\_srs                            | boolean                     | Indicator of whether this opportunity occurred because of a negative end srs response.                                                                                                                                                                                                                                                                      | true, false                             |            |       | 2019-07-01 00:00:00 | 2019-07-01 00:00:00 | no     |     |               |              |               |
| by\_api\_error                          | boolean                     | Indicator of whether this opportunity occurred because of an error in partner API.                                                                                                                                                                                                                                                                          | true, false                             |            |       | 2019-10-21 00:00:00 | 2019-10-21 00:00:00 | no     |     |               |              |               |
| by\_design                              | boolean                     | Indicator of whether intent\_code is not null AND not by\_request AND not by\_end\_srs AND not by\_api\_error. Note this includes cases where a flow sends the customer to an agent if it has not successfully solved the problem. (ex: I am still not connected after a reset my router flow.)                                                             | true, false                             |            |       | 2019-07-01 00:00:00 | 2019-07-01 00:00:00 | no     |     |               |              |               |
| by\_other                               | boolean                     | Catch all indicattor for all cases that are not by request, design or end\_srs. This generally happens if we are missing the intent code, either because of an API error or because of a data bug.                                                                                                                                                          | true, false                             |            |       | 2019-07-01 00:00:00 | 2019-07-01 00:00:00 | no     |     |               |              |               |
| enqueued\_ts                            | timestamp                   | The time which this opportunity was sent to a queue, or null if it never was enqueued.                                                                                                                                                                                                                                                                      | 2020-01-06 23:13:50.617                 |            |       | 2019-07-01 00:00:00 | 2019-07-01 00:00:00 | no     |     |               |              |               |
| exit\_queue\_ts                         | timestamp                   | Time at which the customer exited the queue.                                                                                                                                                                                                                                                                                                                | 2020-01-06 23:13:50.617                 |            |       | 2019-07-01 00:00:00 | 2019-07-01 00:00:00 | no     |     |               |              |               |
| abandoned\_ts                           | TIMESTAMP                   | The datetime when the customer abandoned the queue.                                                                                                                                                                                                                                                                                                         | 2020-01-06 23:13:50.617                 |            |       | 2019-07-01 00:00:00 | 2019-07-01 00:00:00 | no     |     |               |              |               |
| assigned\_ts                            | timestamp                   | Timestamp when the opportunity was assigned to a representative; null if it was never assigned.                                                                                                                                                                                                                                                             | 2020-01-03T18:54:45.140000+00:00        |            |       | 2019-07-01 00:00:00 | 2019-07-01 00:00:00 | no     |     |               |              |               |
| escalation\_initiated\_ts               | timestamp                   | The lesser of enqueued and assigned time, null if never escalated.                                                                                                                                                                                                                                                                                          | 2020-01-06 23:13:50.617                 |            |       | 2019-06-04 00:00:00 | 2019-06-04 00:00:00 | no     |     |               |              |               |
| rep\_first\_response\_ts                | TIMESTAMP                   | The time when a rep first responded to the customer.                                                                                                                                                                                                                                                                                                        | 2020-01-06 23:13:50.617                 |            |       | 2019-07-01 00:00:00 | 2019-07-01 00:00:00 | no     |     |               |              |               |
| dispositioned\_ts                       | timestamp                   | The time at which the rep dispositioned this issue (Exits the screen/frees up a slot).                                                                                                                                                                                                                                                                      | 2020-01-06 23:13:50.617                 |            |       | 2019-07-01 00:00:00 | 2019-07-01 00:00:00 | no     |     |               |              |               |
| customer\_end\_ts                       | timestamp without time zone | The time at which customer ended the issue, if the customer ended the issue.                                                                                                                                                                                                                                                                                | 2020-01-06 23:13:50.617                 |            |       | 2019-07-01 00:00:00 | 2019-07-01 00:00:00 | no     |     |               |              |               |
| disposition\_event\_type                | varchar(255)                | Event type indicating how the conversation ended.                                                                                                                                                                                                                                                                                                           | resolved, timedout                      |            |       | 2019-07-01 00:00:00 | 2019-07-01 00:00:00 | no     |     |               |              |               |
| cust\_utterance\_count                  | bigint                      | Count of customer utterances from issue\_assigned\_ts to dispositioned\_ts                                                                                                                                                                                                                                                                                  | 4                                       |            |       | 2019-07-01 00:00:00 | 2019-07-01 00:00:00 | no     |     |               |              |               |
| rep\_utterance\_count                   | bigint                      | Count of rep utterances from issue\_assigned\_ts to dispositioned\_ts                                                                                                                                                                                                                                                                                       | 5                                       |            |       | 2019-07-01 00:00:00 | 2019-07-01 00:00:00 | no     |     |               |              |               |
| cust\_response\_ct                      | int                         | Total count of responses by customer. Max of one message following a rep message counted as a response.                                                                                                                                                                                                                                                     | 3                                       |            |       | 2019-07-01 00:00:00 | 2019-07-01 00:00:00 | no     |     |               |              |               |
| rep\_response\_ct                       | int                         | Total count of responses by agent. Max of one message following a customer message counted as a response.                                                                                                                                                                                                                                                   | 10                                      |            |       | 2019-07-01 00:00:00 | 2019-07-01 00:00:00 | no     |     |               |              |               |
| is\_ghost\_customer                     | boolean                     | True if the customer was assigned to a rep but never responded to the rep.                                                                                                                                                                                                                                                                                  | true, false                             |            |       | 2019-07-01 00:00:00 | 2019-07-01 00:00:00 | no     |     |               |              |               |
| handle\_time\_seconds                   | double precision            | Time in seconds spent an agent working on a particular assignment. Time between assignment and disposition event                                                                                                                                                                                                                                            | 824.211                                 |            |       | 2019-07-01 00:00:00 | 2019-07-01 00:00:00 | no     |     |               |              |               |
| lead\_time\_seconds                     | double precision            | Time in seconds spent by an agent leading the conversation. Time between assignment and time of last utterance by THE CUSTOMER. If no utterance by customer, Lead time is total\_handle\_time.                                                                                                                                                              | 101.754                                 |            |       | 2019-07-01 00:00:00 | 2019-07-01 00:00:00 | no     |     |               |              |               |
| wrap\_up\_time\_seconds                 | double precision            | Time in seconds spent by an agent wrapping up the conversation. Defined as total\_handle\_time-total\_lead\_time.                                                                                                                                                                                                                                           | 61.989                                  |            |       | 2019-07-01 00:00:00 | 2019-07-01 00:00:00 | no     |     |               |              |               |
| accepted\_wait\_ts                      | timestamp without time zone | Timestamp at which the customer was sent a message confirming they had been placed into a queue.                                                                                                                                                                                                                                                            | 2019-09-11T14:15:59.312000+00:00        |            |       | 2019-07-01 00:00:00 | 2019-07-01 00:00:00 | no     |     |               |              |               |
| is\_transfer                            | boolean                     | Indicator whether this opportunity is due to a transfer.                                                                                                                                                                                                                                                                                                    | true, false                             |            |       | 2019-07-01 00:00:00 | 2019-07-01 00:00:00 | no     |     |               |              |               |
| is\_reengagement                        | boolean                     | Indicator whether this opportunity is due to the user returning from a timeout.                                                                                                                                                                                                                                                                             | true, false                             |            |       | 2019-07-01 00:00:00 | 2019-07-01 00:00:00 | no     |     |               |              |               |
| is\_conversation\_initiation            | boolean                     | Indicator of whether this opportunity is from a conversation initiation (i.e. not from transfer or reengagement).                                                                                                                                                                                                                                           | true, false                             |            |       | 2019-07-01 00:00:00 | 2019-07-01 00:00:00 | no     |     |               |              |               |
| company\_name                           | varchar(255)                | Name of the company associated with the data.                                                                                                                                                                                                                                                                                                               | acme                                    |            |       | 2019-11-01 00:00:00 | 2024-05-24 00:00:00 | no     |     |               |              |               |
| from\_queue\_id                         | bigint                      | The identifier of the group from which the issue was transferred.                                                                                                                                                                                                                                                                                           | 30001                                   |            |       | 2019-12-18 00:00:00 | 2019-12-18 00:00:00 | no     |     |               |              |               |
| from\_queue\_name                       | character varying(191)      | The name of the group from which the issue was transferred.                                                                                                                                                                                                                                                                                                 | service, General                        |            |       | 2019-12-18 00:00:00 | 2019-12-18 00:00:00 | no     |     |               |              |               |
| from\_rep\_id                           | bigint                      | The identifier of the rep from which the issue was transferred.                                                                                                                                                                                                                                                                                             | 81001                                   |            |       | 2019-12-18 00:00:00 | 2019-12-18 00:00:00 | no     |     |               |              |               |
| is\_check\_in\_reengagement             | boolean                     | Is this opportunity due to the user coming back within a 24h period after being timed-out for not answering a check-in prompt on time.                                                                                                                                                                                                                      | true                                    |            |       | 2020-01-14 00:00:00 | 2020-01-14 00:00:00 | no     |     |               |              |               |
| desk\_mode\_flag                        | bigint                      | Bitmap encodes if agent handled voice-issue ASAPP desk, had engagement with ASAPP desk. bitmap: 0: null, 1: 'VOICE', 2: 'DESK', 4: 'ENGAGEMENT',  8: 'INACTIVITY' NULL for non voice issues                                                                                                                                                                 | 0, 1, 2, 5, 7                           |            |       | 2020-02-19 00:00:00 | 2020-02-19 00:00:00 | no     |     |               |              |               |
| desk\_mode\_string                      | varchar(191)                | Decodes the desk\_mode flag. Current possible values (Null, 'VOICE', 'VOICE\_DESK', 'VOICE\_DESK\_ENGAGEMENT','VOICE\_INACTIVITY'). NULL for non voice issues.                                                                                                                                                                                              | VOICE\_DESK                             |            |       | 2020-02-19 00:00:00 | 2020-02-19 00:00:00 | no     |     |               |              |               |
| merged\_from\_issue\_id                 | bigint                      | The issue id before the merge                                                                                                                                                                                                                                                                                                                               | 21352352                                |            |       | 2020-06-30 00:00:00 | 2020-06-30 00:00:00 | no     |     |               |              |               |
| merged\_ts                              | timestamp                   | the time the merge occurred                                                                                                                                                                                                                                                                                                                                 | 2019-11-08T14:00:06.957000+00:00        |            |       | 2020-06-30 00:00:00 | 2020-06-30 00:00:00 | no     |     |               |              |               |
| exclusive\_phrase\_auto\_complete\_msgs | bigint                      | Count of utterances where at least one phrase autocomplete was accepted/sent and no other augmentation was used.                                                                                                                                                                                                                                            |                                         |            |       | 2021-08-02 00:00:00 | 2021-08-02 00:00:00 | no     |     |               |              |               |
| autopilot\_ending\_msgs\_ct             | integer                     | Number of autopilot endings                                                                                                                                                                                                                                                                                                                                 | 2                                       |            |       | 2024-04-19 00:00:00 | 2024-04-19 00:00:00 | no     |     |               |              |               |

### Table: queue\_check\_ins

Exports for each 15 min window of Queue Check in events

**Sync Time:** 1h

**Unique Condition:** company\_id, issue\_id, customer\_id, check\_in\_ts

| Column                              | Type                        | Description                                                                                                                                                                                                                                                                                                                                                 | Example                          | Aggregates | Notes | Date Added          | Date Modified       | Ignore | PII | release state | Specific Use | Feature Group |
| :---------------------------------- | :-------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------- | :--------- | :---- | :------------------ | :------------------ | :----- | :-- | :------------ | :----------- | :------------ |
| issue\_id                           | bigint                      | The ASAPP issue or conversation id.                                                                                                                                                                                                                                                                                                                         | 21352352                         |            |       | 2020-01-02 00:00:00 | 2020-01-02 00:00:00 | no     |     |               |              |               |
| customer\_id                        | bigint                      | The ASAPP internal customer identifier.                                                                                                                                                                                                                                                                                                                     | 123008                           |            |       | 2020-01-02 00:00:00 | 2020-01-02 00:00:00 | no     |     |               |              |               |
| company\_id                         | bigint                      | DEPRECATED 2024-03-25                                                                                                                                                                                                                                                                                                                                       | 10001                            |            |       | 2020-01-02 00:00:00 | 2020-01-02 00:00:00 | no     |     |               |              |               |
| instance\_ts                        | timestamp                   | The time window of computed elements.  This window is usually 15 minutes or 1 hour depending on the generation time. Times are rounded down to the nearest interval (for a time of 12:34 and an interval of 15m, this is 12:30). As an example, for a 15 minute interval an instance\_ts of 12:30 implies events from 12:30 -> 12:45. All times are in UTC. | 2019-11-08 14:00:06.957000+00:00 |            |       | 2020-01-02 00:00:00 | 2020-01-02 00:00:00 | no     |     |               |              |               |
| check\_in\_ts                       | timestamp without time zone | Timestamp at which the check in message was prompted to the customer.                                                                                                                                                                                                                                                                                       | 2018-06-10 14:23:00              |            |       | 2020-01-02 00:00:00 | 2020-01-02 00:00:00 | no     |     |               |              |               |
| wait\_time\_threshold\_ts           | timestamp without time zone | Timestamp at which the queue wait time threshold was reached.                                                                                                                                                                                                                                                                                               | 2018-06-10 14:22:58              |            |       | 2020-01-02 00:00:00 | 2020-01-02 00:00:00 | no     |     |               |              |               |
| check\_in\_result                   | character varying(9)        | The result of the check in message, either the customer 'Accepted' or was 'Dequeued'.                                                                                                                                                                                                                                                                       | 'Dequeued'                       |            |       | 2020-01-02 00:00:00 | 2020-01-02 00:00:00 | no     |     |               |              |               |
| check\_in\_result\_ts               | timestamp without time zone | Timestamp at which the result of the check in message was received.                                                                                                                                                                                                                                                                                         | 2018-06-10 14:24:00              |            |       | 2020-01-02 00:00:00 | 2020-04-24 00:00:00 | no     |     |               |              |               |
| company\_name                       | varchar(255)                | Name of the company associated with the data.                                                                                                                                                                                                                                                                                                               | acme                             |            |       | 2019-03-23 00:00:00 | 2019-03-23 00:00:00 | no     |     |               |              |               |
| wait\_time\_threshold\_ct\_distinct | bigint                      | Quantity of times the queue wait time threshold was reached before getting the check in message.                                                                                                                                                                                                                                                            | 2                                |            |       | 2020-04-25 00:00:00 | 2020-04-25 00:00:00 | no     |     |               |              |               |
| queue\_id                           | integer                     | The ASAPP queue identifier which the issue was placed.                                                                                                                                                                                                                                                                                                      | 20001                            |            |       | 2020-06-11 00:00:00 | 2020-06-11 00:00:00 | no     |     |               |              |               |
| queue\_name                         | varchar(255)                | The queue name which the issue was placed.                                                                                                                                                                                                                                                                                                                  | Acme Residential, Acme Wireless  |            |       | 2020-06-11 00:00:00 | 2020-06-11 00:00:00 | no     |     |               |              |               |
| opportunity\_ts                     | timestamp                   | Timestamp of the opportunity event                                                                                                                                                                                                                                                                                                                          | 2023-01-02 19:58:06              |            |       | 2020-01-02 00:00:00 | 2020-01-02 00:00:00 | no     |     |               |              |               |

### Table: quick\_reply\_buttons

The quick\_reply\_button\_interaction table contains information associated with a specific quick\_reply\_button, its final intent and any aggregation counts over the day (e.g. escalated\_to\_chat, escalation\_requested). Aggregated for a 24 hour period. Only ended issues are counted.

**Sync Time:** 1d

**Unique Condition:** company\_id, company\_subdivision, company\_segments, final\_intent\_code, quick\_reply\_button\_text, escalated\_to\_chat, escalation\_requested, quick\_reply\_button\_index

| Column                         | Type                     | Description                                                                                                                                                                                                                                                                                                                                                 | Example                          | Aggregates | Notes | Date Added          | Date Modified       | Ignore | PII | release state | Specific Use | Feature Group |
| :----------------------------- | :----------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------- | :--------- | :---- | :------------------ | :------------------ | :----- | :-- | :------------ | :----------- | :------------ |
| instance\_ts                   | timestamp                | The time window of computed elements.  This window is usually 15 minutes or 1 hour depending on the generation time. Times are rounded down to the nearest interval (for a time of 12:34 and an interval of 15m, this is 12:30). As an example, for a 15 minute interval an instance\_ts of 12:30 implies events from 12:30 -> 12:45. All times are in UTC. | 2019-11-08 14:00:06.957000+00:00 |            |       | 2019-02-12 00:00:00 | 2019-02-12 00:00:00 | no     |     |               |              |               |
| company\_id                    | bigint                   | DEPRECATED 2024-03-25                                                                                                                                                                                                                                                                                                                                       | 10001                            |            |       | 2019-02-12 00:00:00 | 2019-02-12 00:00:00 | no     |     |               |              |               |
| company\_subdivision           | varchar(255)             | String identifier for the company subdivision associated with the conversation.                                                                                                                                                                                                                                                                             | ACMEsubcorp                      |            |       | 2019-02-12 00:00:00 | 2019-02-12 00:00:00 | no     |     |               |              |               |
| company\_segments              | varchar(255)             | String with comma separated segments for the company enclosed by square brackets.                                                                                                                                                                                                                                                                           | marketing,promotions             |            |       | 2019-02-12 00:00:00 | 2019-02-12 00:00:00 | no     |     |               |              |               |
| final\_intent\_code            | character varying(255)   | The last intent code of the flow which the user navigated.                                                                                                                                                                                                                                                                                                  | PAYBILL                          |            |       | 2019-02-12 00:00:00 | 2019-02-12 00:00:00 | no     |     |               |              |               |
| escalated\_to\_chat            | bigint                   | 1 if an issue escalated to live chat, 0 if not.                                                                                                                                                                                                                                                                                                             | 1                                |            |       | 2019-02-12 00:00:00 | 2019-02-12 00:00:00 | no     |     |               |              |               |
| escalation\_requested          | integer                  | 1 if customer was asked to wait for an agent or if a customer asked to speak to an agent.                                                                                                                                                                                                                                                                   | 1                                |            |       | 2019-02-12 00:00:00 | 2019-02-12 00:00:00 | no     |     |               |              |               |
| quick\_reply\_button\_text     | character varying(65535) | The text of the quick reply button.                                                                                                                                                                                                                                                                                                                         | 'Billing'                        |            |       | 2019-02-12 00:00:00 | 2019-02-12 00:00:00 | no     |     |               |              |               |
| quick\_reply\_button\_index    | integer                  | The position of the quick reply button shown.                                                                                                                                                                                                                                                                                                               | (1,2,3)                          |            |       | 2019-02-12 00:00:00 | 2019-02-12 00:00:00 | no     |     |               |              |               |
| quick\_reply\_displayed\_count | bigint                   | The number of times this button was shown.                                                                                                                                                                                                                                                                                                                  | 42                               |            |       | 2019-02-12 00:00:00 | 2019-02-12 00:00:00 | no     |     |               |              |               |
| quick\_reply\_selected\_count  | bigint                   | The number of times this button was selected.                                                                                                                                                                                                                                                                                                               | 42                               |            |       | 2019-02-12 00:00:00 | 2019-02-12 00:00:00 | no     |     |               |              |               |
| company\_name                  | varchar(255)             | Name of the company associated with the data.                                                                                                                                                                                                                                                                                                               | acme                             |            |       | 2019-11-01 00:00:00 | 2024-05-24 00:00:00 | no     |     |               |              |               |

### Table: reps

The rep table contains a listing of data regarding each rep. Expected data includes their name, the rep id, their slot configuration and the rep status. This rep data is collected daily.

**Sync Time:** 1d

**Unique Condition:** rep\_id

| Column         | Type                        | Description                                                                         | Example                              | Aggregates | Notes | Date Added          | Date Modified       | Ignore | PII | release state | Specific Use | Feature Group |
| :------------- | :-------------------------- | :---------------------------------------------------------------------------------- | :----------------------------------- | :--------- | :---- | :------------------ | :------------------ | :----- | :-- | :------------ | :----------- | :------------ |
| created\_ts    | timestamp                   | The timestamp of when record gets generated.                                        | 2019-02-19T21:31:43+00:00            |            |       | 2018-09-21 00:00:00 | 2018-09-21 00:00:00 | no     |     |               |              |               |
| agent\_id      | bigint                      | deprecated: 2019-09-25                                                              | 123008                               |            |       | 2018-09-21 00:00:00 | 2018-09-21 00:00:00 | no     |     |               |              |               |
| crm\_agent\_id | varchar(255)                | deprecated: 2019-09-25                                                              | 347bdddb-d3a1-45fc-bbcd-dbd3a175fc1c |            |       | 2018-09-21 00:00:00 | 2018-09-21 00:00:00 | no     |     |               |              |               |
| name           | varchar(255)                | The rep name as imported from the CRM.                                              | Smith, Anne                          |            |       | 2018-09-21 00:00:00 | 2018-09-21 00:00:00 | no     |     |               |              |               |
| max\_slot      | smallint                    | The number of slots or concurrent conversations this rep can have at the same time. | 4                                    |            |       | 2018-09-21 00:00:00 | 2018-09-21 00:00:00 | no     |     |               |              |               |
| disabled\_time | timestamp without time zone | The time when this rep was removed from the ASAPP system.                           | 2019-02-27T12:56:34+00:00            |            |       | 2018-09-21 00:00:00 | 2018-09-21 00:00:00 | no     |     |               |              |               |
| agent\_status  |                             | deprecated: 2019-09-25                                                              |                                      |            |       | 2018-09-21 00:00:00 | 2018-09-21 00:00:00 | no     |     |               |              |               |
| rep\_id        | varchar(191)                | The ASAPP rep/agent identifier.                                                     | 123008                               |            |       | 2018-09-21 00:00:00 | 2018-09-21 00:00:00 | no     |     |               |              |               |
| crm\_rep\_id   |                             | The rep identifer from the client system.                                           | monica.rosa                          |            |       | 2019-09-26 00:00:00 | 2019-09-26 00:00:00 | no     |     |               |              |               |
| rep\_status    | varchar(255)                | The last known status of the rep at UTC midnight.                                   | 80001                                |            |       | 2019-09-26 00:00:00 | 2019-09-26 00:00:00 | no     |     |               |              |               |
| company\_name  | varchar(255)                | Name of the company associated with the data.                                       | acme                                 |            |       | 2019-11-01 00:00:00 | 2024-05-24 00:00:00 | no     |     |               |              |               |

### Table: rep\_activity

The rep\_activity table tracks status and slot information of each agent over time, including time spent in each status and time utilized in chats. In this table, the data is captured in 15 minute increments throughout the day. instance\_ts is actually the 15-minute window in question, and is part of the primary key. It does not indicate the last time a relevant event happened as in other tables. Windows may be re-stated when information from a later window amends them, for example to account for additional utilized time.

**Sync Time:** 1h

**Unique Condition:** company\_id, instance\_ts, rep\_id, status\_id, in\_status\_starting\_ts

| Column                    | Type                        | Description                                                                                                                                                                                                       | Example                               | Aggregates | Notes | Date Added          | Date Modified       | Ignore | PII | release state | Specific Use | Feature Group |
| :------------------------ | :-------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------ | :--------- | :---- | :------------------ | :------------------ | :----- | :-- | :------------ | :----------- | :------------ |
| instance\_ts              | timestamp                   | The start of the 15-minute time window under observation. As an example, for a 15 minute interval an instance\_ts of 12:30 implies activity from 12:30 to 12:45.                                                  | 2019-11-08 14:00:00                   |            |       | 2018-10-01 00:00:00 | 2018-10-01 00:00:00 | no     |     |               |              |               |
| update\_ts                | timestamp without time zone | The timestamp at which the last event for this record occurred.  This usually represents the status end or the end of the last conversation handled in this status.                                               | 2018-06-10 14:24:00                   |            |       | 2019-12-16 00:00:00 | 2019-12-16 00:00:00 | no     |     |               |              |               |
| export\_ts                |                             | The end of the time window for which this record was exported.                                                                                                                                                    | 2018-06-10 14:30:00                   |            |       | 2019-12-16 00:00:00 | 2019-12-16 00:00:00 | no     |     |               |              |               |
| agent\_id                 | bigint                      | deprecated: 2019-09-25                                                                                                                                                                                            | 123008                                |            |       | 2018-10-01 00:00:00 | 2018-10-01 00:00:00 | no     |     |               |              |               |
| company\_subdivision      | varchar(255)                | The company subdivision relates to the customer issue and is not relevant to reps. Intentionally left blank.                                                                                                      | ACMEsubcorp                           |            |       | 2018-10-01 00:00:00 | 2018-10-01 00:00:00 | no     |     |               |              |               |
| company\_segments         | varchar(255)                | The company segments field relates to the customer issue and is not relevant to reps. Intentionally left blank.                                                                                                   | marketing,promotions                  |            |       | 2018-10-01 00:00:00 | 2018-10-01 00:00:00 | no     |     |               |              |               |
| agent\_name               |                             | deprecated: 2019-09-25                                                                                                                                                                                            |                                       |            |       | 2018-10-01 00:00:00 | 2018-10-01 00:00:00 | no     |     |               |              |               |
| status\_id                | character varying(65535)    | The ASAPP identifier for a given status.                                                                                                                                                                          | OFFLINE, 1                            |            |       | 2018-10-01 00:00:00 | 2018-10-01 00:00:00 | no     |     |               |              |               |
| status\_description       | character varying(65535)    | The human text name for a given status.                                                                                                                                                                           |                                       |            |       | 2018-10-01 00:00:00 | 2018-10-01 00:00:00 | no     |     |               |              |               |
| orig\_status\_description | character varying(191)      | The text of the status before alteration for disconnects.                                                                                                                                                         | Available, Away, Coffee Break, Active |            |       | 2020-01-07 00:00:00 | 2020-01-07 00:00:00 | no     |     |               |              |               |
| in\_status\_starting\_ts  | timestamp without time zone | Inside this 15m window, what time did the agent enter this status.                                                                                                                                                | 2020-01-08T19:32:38.352000+00:00      |            |       | 2018-10-01 00:00:00 | 2018-10-01 00:00:00 | no     |     |               |              |               |
| linear\_ute\_time         | double precision            | Time in seconds the agent spent handling at least one issue in this status within this 15-minute time window.                                                                                                     | 253.34, 0.0, 5.046                    |            |       | 2019-03-05 00:00:00 | 2019-03-05 00:00:00 | no     |     |               |              |               |
| cumul\_ute\_time          | double precision            | The collective time in seconds the agent spent handling all issues in this status within this 15-minute time window. This time may exceed the status time due to concurrency slots.                               | 498.82, 0.0, 0.428                    |            |       | 2019-03-05 00:00:00 | 2019-03-05 00:00:00 | no     |     |               |              |               |
| unutilized\_time          | double precision            | The time in seconds the agent spent not handling any issues in this status within this 15-minute time window.                                                                                                     | 37.60, 0.0                            |            |       | 2019-03-05 00:00:00 | 2019-03-05 00:00:00 | no     |     |               |              |               |
| window\_status\_time      | double precision            | The length of time which the agent was inside this status in seconds.                                                                                                                                             | 0.107, 900.0                          |            |       | 2018-10-01 00:00:00 | 2018-10-01 00:00:00 | no     |     |               |              |               |
| total\_status\_time       | double precision            | Time in seconds that the agents spent in this status including contiguous time spent outside of this 15-minute time window.                                                                                       | 5.046, 0.107                          |            |       | 2018-10-01 00:00:00 | 2018-10-01 00:00:00 | no     |     |               |              |               |
| max\_slots                | integer                     | The number of issue slots or concurrency values which the rep set for themselves for this window.                                                                                                                 | 3, 2                                  |            |       | 2018-10-01 00:00:00 | 2018-10-01 00:00:00 | no     |     |               |              |               |
| status\_end\_ts           | timestamp without time zone | The timestamp at which this agent exited the designated state. Note that this time may be null or after the next instance\_ts, which implies that the agent did not change statuses within this 15-minute window. | 2018-06-10 14:23:00                   |            |       | 2020-01-07 00:00:00 | 2020-01-07 00:00:00 | no     |     |               |              |               |
| rep\_id                   | varchar(191)                | The ASAPP rep/agent identifier.                                                                                                                                                                                   | 123008                                |            |       | 2019-09-27 00:00:00 | 2019-09-27 00:00:00 | no     |     |               |              |               |
| rep\_name                 | varchar(191)                | The name of this rep. Jane Doe                                                                                                                                                                                    | John                                  |            |       | 2019-09-27 00:00:00 | 2019-09-27 00:00:00 | no     |     |               |              |               |
| company\_name             | varchar(255)                | Name of the company associated with the data.                                                                                                                                                                     | acme                                  |            |       | 2019-11-01 00:00:00 | 2024-05-24 00:00:00 | no     |     |               |              |               |
| desk\_mode                | varchar(191)                | The mode of the desktop which the agent is logged into.  Modes include CHAT or VOICE.                                                                                                                             | 'CHAT', 'VOICE'                       |            |       | 2019-12-10 00:00:00 | 2019-12-10 00:00:00 | no     |     |               |              |               |
| last\_dispositioned\_ts   | timestamp                   | Timestamp at which rep gets unassigned for a given rep status started at a given time                                                                                                                             | 2018-06-10 14:24:00                   |            |       | 2024-05-29 00:00:00 | 2024-05-29 00:00:00 | no     |     |               |              |               |

### Table: rep\_assignment\_disposition

This view contains information relating to rep-disposition responses.

**Sync Time:** 1h

**Unique Condition:** company\_id, issue\_id, rep\_id, rep\_assigned\_ts

| Column                                         | Type                        | Description                                                                                                                                                                       | Example  | Aggregates | Notes | Date Added          | Date Modified       | Ignore | PII | release state | Specific Use | Feature Group |
| :--------------------------------------------- | :-------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------- | :--------- | :---- | :------------------ | :------------------ | :----- | :-- | :------------ | :----------- | :------------ |
| company\_id                                    | bigint                      | DEPRECATED 2024-03-25                                                                                                                                                             | 10001    |            |       | 2020-09-03 00:00:00 | 2020-09-03 00:00:00 | no     |     |               |              |               |
| issue\_id                                      | bigint                      | The ASAPP issue or conversation id.                                                                                                                                               | 21352352 |            |       | 2020-09-03 00:00:00 | 2020-09-03 00:00:00 | no     |     |               |              |               |
| rep\_id                                        | varchar(191)                | The ASAPP rep/agent identifier.                                                                                                                                                   | 123008   |            |       | 2020-09-03 00:00:00 | 2020-09-03 00:00:00 | no     |     |               |              |               |
| rep\_assigned\_ts                              | timestamp without time zone | The timestamp at which the issue was assigned to the rep.                                                                                                                         |          |            |       | 2020-09-03 00:00:00 | 2020-09-03 00:00:00 | no     |     |               |              |               |
| disposition\_event                             | character varying(65535)    | The event type associated with the disposition event                                                                                                                              |          |            |       | 2020-09-03 00:00:00 | 2020-09-03 00:00:00 | no     |     |               |              |               |
| disposition\_notes\_txt                        | character varying(65535)    | Disposition notes associated with the disposition event                                                                                                                           |          |            |       | 2020-09-03 00:00:00 | 2020-09-03 00:00:00 | no     |     |               |              |               |
| disposition\_notes\_valid                      | boolean                     | Boolean value to indicate if the notes are different than blank or null.                                                                                                          |          |            |       | 2020-09-03 00:00:00 | 2020-09-03 00:00:00 | no     |     |               |              |               |
| crm\_offered\_ts                               | timestamp without time zone | Timestamp of the last CRM offered event.                                                                                                                                          |          |            |       | 2020-09-03 00:00:00 | 2020-09-03 00:00:00 | no     |     |               |              |               |
| crm\_outcome\_ts                               | timestamp without time zone | Timestamp of the last CRM outcome event.                                                                                                                                          |          |            |       | 2020-09-03 00:00:00 | 2020-09-03 00:00:00 | no     |     |               |              |               |
| crm\_is\_success                               | boolean                     | Boolean value to indicate if the disposition event is successfully sent to partner CRM                                                                                            |          |            |       | 2020-09-03 00:00:00 | 2020-09-03 00:00:00 | no     |     |               |              |               |
| crm\_error\_type                               | character varying(65535)    | This field indicates the type of an error occured in the pipeline.                                                                                                                |          |            |       | 2020-09-03 00:00:00 | 2020-09-03 00:00:00 | no     |     |               |              |               |
| crm\_error\_source                             | character varying(65535)    | This field indicates where in the pipeline the event is failed to publish.                                                                                                        |          |            |       | 2020-09-03 00:00:00 | 2020-09-03 00:00:00 | no     |     |               |              |               |
| presented\_tags                                | character varying(65535)    | Unique list of all summary tags presented to agent for this assignment.                                                                                                           |          |            |       | 2020-09-03 00:00:00 | 2020-09-03 00:00:00 | no     |     |               |              |               |
| selected\_tags                                 | character varying(65535)    | Unique list of all summary tags selected by agent for this assignment.                                                                                                            |          |            |       | 2020-09-03 00:00:00 | 2020-09-03 00:00:00 | no     |     |               |              |               |
| notes\_presented\_tags                         | character varying(65535)    | Unique list of the summary tags presented to agent at the OTF NOTES state for this assignment.                                                                                    |          |            |       | 2020-09-03 00:00:00 | 2020-09-03 00:00:00 | no     |     |               |              |               |
| notes\_selected\_tags                          | character varying(65535)    | Unique list of the summary tags selected by agent at the OTF NOTES state for this assignment.                                                                                     |          |            |       | 2020-09-03 00:00:00 | 2020-09-03 00:00:00 | no     |     |               |              |               |
| assignment\_end\_presented\_tags               | character varying(65535)    | Unique list of the summary tags presented to agent at the end of assignment state.                                                                                                |          |            |       | 2020-09-03 00:00:00 | 2020-09-03 00:00:00 | no     |     |               |              |               |
| assignment\_end\_selected\_tags                | character varying(65535)    | Unique list of the summary tags selected by agent at the end of assignment state.                                                                                                 |          |            |       | 2020-09-03 00:00:00 | 2020-09-03 00:00:00 | no     |     |               |              |               |
| presented\_tags\_ct\_distinct                  | bigint                      | Distinct count of all summary tags presented to agent for this assignment.                                                                                                        |          |            |       | 2020-09-03 00:00:00 | 2020-09-03 00:00:00 | no     |     |               |              |               |
| selected\_tags\_ct\_distinct                   | bigint                      | Distinct count of all summary tags selected by agent for this assignment.                                                                                                         |          |            |       | 2020-09-03 00:00:00 | 2020-09-03 00:00:00 | no     |     |               |              |               |
| notes\_presented\_tags\_ct\_distinct           | bigint                      | Distinct count of the summary tags presented to agent at the OTF NOTES state for this assignment.                                                                                 |          |            |       | 2020-09-03 00:00:00 | 2020-09-03 00:00:00 | no     |     |               |              |               |
| notes\_selected\_tags\_ct\_distinct            | bigint                      | Distinct count of the summary tags selected by agent at the OTF NOTES state for this assignment.                                                                                  |          |            |       | 2020-09-03 00:00:00 | 2020-09-03 00:00:00 | no     |     |               |              |               |
| assignment\_end\_presented\_tags\_ct\_distinct | bigint                      | Distinct count of the summary tags presented to agent at the end of assignment state.                                                                                             |          |            |       | 2020-09-03 00:00:00 | 2020-09-03 00:00:00 | no     |     |               |              |               |
| assignment\_end\_selected\_tags\_ct\_distinct  | bigint                      | Distinct count of the summary tags selected by agent at the end of assignment state.                                                                                              |          |            |       | 2020-09-03 00:00:00 | 2020-09-03 00:00:00 | no     |     |               |              |               |
| company\_name                                  | varchar(255)                | Name of the company associated with the data.                                                                                                                                     | acme     |            |       | 2020-09-03 00:00:00 | 2020-09-03 00:00:00 | no     |     |               |              |               |
| auto\_summary\_txt                             | character varying(65535)    | Text of the automatic generative summary of this assignment, if applicable. Note that this field will be null of no auto summary could be found or if the feature is not enabled. |          |            |       | 2023-02-16 00:00:00 | 2023-02-16 00:00:00 | no     |     |               |              |               |

### Table: rep\_attributes

The rep attributes table contains various data associated with a rep such as their given role. This table may not exist or may be empty if the client chooses to use rep\_hierarchy instead. This is a daily snapshot of information.

**Sync Time:** 1d

**Unique Condition:** rep\_attribute\_id, rep\_id, created\_ts

| Column               | Type                    | Description                                              | Example                              | Aggregates | Notes | Date Added          | Date Modified       | Ignore | PII | release state | Specific Use | Feature Group |
| :------------------- | :---------------------- | :------------------------------------------------------- | :----------------------------------- | :--------- | :---- | :------------------ | :------------------ | :----- | :-- | :------------ | :----------- | :------------ |
| created\_ts          | timestamp               | The date this agent was created.                         | 2019-06-24T18:02:05+00:00            |            |       | 2018-08-14 00:00:00 | 2018-08-14 00:00:00 | no     |     |               |              |               |
| agent\_id            | bigint                  | deprecated: 2019-09-25                                   | 123008                               |            |       | 2018-08-14 00:00:00 | 2018-08-14 00:00:00 | no     |     |               |              |               |
| attribute\_name      | character varying(64)   | The attribute key value.                                 | role, companygroup, jobcode          |            |       | 2018-08-14 00:00:00 | 2018-08-14 00:00:00 | no     |     |               |              |               |
| attribute\_value     | character varying(1024) | The attribute value associated with the attribute\_name. | manager, representative, lead        |            |       | 2018-08-14 00:00:00 | 2018-08-14 00:00:00 | no     |     |               |              |               |
| agent\_attribute\_id |                         | deprecated: 2019-09-25                                   |                                      |            |       | 2018-08-14 00:00:00 | 2018-08-14 00:00:00 | no     |     |               |              |               |
| external\_agent\_id  | varchar(255)            | deprecated: 2019-09-25                                   | 347bdddb-d3a1-45fc-bbcd-dbd3a175fc1c |            |       | 2018-08-14 00:00:00 | 2018-08-14 00:00:00 | no     |     |               |              |               |
| rep\_id              | varchar(191)            | The ASAPP rep/agent identifier.                          | 123008                               |            |       | 2019-09-27 00:00:00 | 2019-09-27 00:00:00 | no     |     |               |              |               |
| rep\_attribute\_id   | bigint                  | The ASAPP identifier for this attribute.                 | 1200001                              |            |       | 2019-09-27 00:00:00 | 2019-09-27 00:00:00 | no     |     |               |              |               |
| external\_rep\_id    | varchar(255)            | Client-provided identifier for the rep.                  | 347bdddb-d3a1-45fc-bbcd-dbd3a175fc1c |            |       | 2019-09-27 00:00:00 | 2019-09-27 00:00:00 | no     |     |               |              |               |
| company\_name        | varchar(255)            | Name of the company associated with the data.            | acme                                 |            |       | 2019-11-01 00:00:00 | 2024-05-24 00:00:00 | no     |     |               |              |               |

### Table: rep\_augmentation

The rep\_augmentation table tracks a specific issue and rep; and calculates metrics on augmentation types and counts of usages of augmentation. This table will allow billing for the augmentation feature per each issue.

**Sync Time:** 1h

**Unique Condition:** issue\_id

| Column                                  | Type         | Description                                                                                                                                                                                                                                                                                                                                                 | Example                          | Aggregates | Notes | Date Added          | Date Modified       | Ignore | PII | release state | Specific Use | Feature Group |
| :-------------------------------------- | :----------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------- | :--------- | :---- | :------------------ | :------------------ | :----- | :-- | :------------ | :----------- | :------------ |
| instance\_ts                            | timestamp    | The time window of computed elements.  This window is usually 15 minutes or 1 hour depending on the generation time. Times are rounded down to the nearest interval (for a time of 12:34 and an interval of 15m, this is 12:30). As an example, for a 15 minute interval an instance\_ts of 12:30 implies events from 12:30 -> 12:45. All times are in UTC. | 2019-11-08 14:00:06.957000+00:00 |            |       | 2018-11-27 00:00:00 | 2018-11-27 00:00:00 | no     |     |               |              |               |
| conversation\_id                        | bigint       | deprecated: 2019-09-25                                                                                                                                                                                                                                                                                                                                      | 21352352                         |            |       | 2018-11-27 00:00:00 | 2018-11-27 00:00:00 | no     |     |               |              |               |
| company\_id                             | bigint       | DEPRECATED 2024-03-25                                                                                                                                                                                                                                                                                                                                       | 10001                            |            |       | 2018-11-27 00:00:00 | 2018-11-27 00:00:00 | no     |     |               |              |               |
| company\_subdivision                    | varchar(255) | String identifier for the company subdivision associated with the conversation.                                                                                                                                                                                                                                                                             | ACMEsubcorp                      |            |       | 2018-11-27 00:00:00 | 2018-11-27 00:00:00 | no     |     |               |              |               |
| company\_segments                       | varchar(255) | String with comma separated segments for the company enclosed by square brackets.                                                                                                                                                                                                                                                                           | marketing,promotions             |            |       | 2018-11-27 00:00:00 | 2018-11-27 00:00:00 | no     |     |               |              |               |
| customer\_id                            | bigint       | The ASAPP internal customer identifier.                                                                                                                                                                                                                                                                                                                     | 123008                           |            |       | 2018-11-27 00:00:00 | 2018-11-27 00:00:00 | no     |     |               |              |               |
| agent\_id                               | bigint       | deprecated: 2019-09-25                                                                                                                                                                                                                                                                                                                                      | 123008                           |            |       | 2018-11-27 00:00:00 | 2018-11-27 00:00:00 | no     |     |               |              |               |
| external\_customer\_id                  | varchar(255) | The customer identifier as provided by the client.                                                                                                                                                                                                                                                                                                          |                                  |            |       | 2018-11-27 00:00:00 | 2018-11-27 00:00:00 | no     |     |               |              |               |
| conversation\_end\_ts                   | timestamp    | Timestamp when the conversation ended.                                                                                                                                                                                                                                                                                                                      | 2018-06-23 21:23:53              |            |       | 2018-11-27 00:00:00 | 2018-11-27 00:00:00 | no     |     |               |              |               |
| auto\_suggest\_msgs                     | bigint       | The number of autosuggest prompts used by the rep.                                                                                                                                                                                                                                                                                                          | 3                                |            |       | 2018-11-27 00:00:00 | 2018-11-27 00:00:00 | no     |     |               |              |               |
| auto\_complete\_msgs                    | bigint       | The number of autocompletion prompts used by the rep.                                                                                                                                                                                                                                                                                                       | 2                                |            |       | 2018-11-27 00:00:00 | 2018-11-27 00:00:00 | no     |     |               |              |               |
| did\_customer\_timeout                  | boolean      | Boolean value indicating whether the customer timed out.                                                                                                                                                                                                                                                                                                    | false, true                      |            |       | 2018-11-27 00:00:00 | 2018-11-27 00:00:00 | no     |     |               |              |               |
| is\_rep\_resolved                       | boolean      | Boolean value indicating whether the rep marked this conversation resolved.                                                                                                                                                                                                                                                                                 | true, false                      |            |       | 2018-11-27 00:00:00 | 2018-11-27 00:00:00 | no     |     |               |              |               |
| is\_billable                            | boolean      | Boolean value indicating whether the rep marked the conversation resolved after using autocomplete or autosuggest.                                                                                                                                                                                                                                          | true, false                      |            |       | 2018-11-27 00:00:00 | 2018-11-27 00:00:00 | no     |     |               |              |               |
| custom\_auto\_suggest\_msgs             | bigint       | The number of custom autocompletion prompts used by the rep (is a subset of auto\_suggest\_msgs).                                                                                                                                                                                                                                                           | 2                                |            |       | 2019-09-25 00:00:00 | 2019-09-25 00:00:00 | no     |     |               |              |               |
| custom\_auto\_complete\_msgs            | bigint       | The number of custom autosuggest prompts used by the rep (is a subset of auto\_complete\_msgs).                                                                                                                                                                                                                                                             | 2                                |            |       | 2019-09-25 00:00:00 | 2019-09-25 00:00:00 | no     |     |               |              |               |
| drawer\_msgs                            | bigint       | The number of custom drawer messages used by the rep.                                                                                                                                                                                                                                                                                                       | 2                                |            |       | 2019-09-25 00:00:00 | 2019-09-25 00:00:00 | no     |     |               |              |               |
| kb\_search\_msgs                        | bigint       | The number of messages used from knowledge base search.                                                                                                                                                                                                                                                                                                     | 2                                |            |       | 2019-09-25 00:00:00 | 2019-09-25 00:00:00 | no     |     |               |              |               |
| kb\_recommendation\_msgs                | bigint       | The number of messages used from knowledge base recommendations.                                                                                                                                                                                                                                                                                            | 2                                |            |       | 2019-09-25 00:00:00 | 2019-09-25 00:00:00 | no     |     |               |              |               |
| issue\_id                               | bigint       | The ASAPP issue or conversation id.                                                                                                                                                                                                                                                                                                                         | 21352352                         |            |       | 2019-09-27 00:00:00 | 2019-09-27 00:00:00 | no     |     |               |              |               |
| rep\_id                                 | varchar(191) | Last rep\_id that worked on this issue.                                                                                                                                                                                                                                                                                                                     | 123008                           |            |       | 2019-09-27 00:00:00 | 2019-09-27 00:00:00 | no     |     |               |              |               |
| company\_name                           | varchar(255) | Name of the company associated with the data.                                                                                                                                                                                                                                                                                                               | acme                             |            |       | 2019-11-01 00:00:00 | 2024-05-24 00:00:00 | no     |     |               |              |               |
| is\_autopilot\_timeout\_msgs            |              | Number of autopilot timeout messages.                                                                                                                                                                                                                                                                                                                       | 2                                |            |       | 2020-06-11 00:00:00 | 2020-06-11 00:00:00 | no     |     |               |              |               |
| phrase\_auto\_complete\_presented\_msgs | integer      | Count of utterances where at least one phrase autocomplete was suggested/presented.                                                                                                                                                                                                                                                                         |                                  |            |       | 2020-06-24 00:00:00 | 2020-06-24 00:00:00 | no     |     |               |              |               |
| cume\_phrase\_auto\_complete\_presented | integer      | Total number of phrase autocomplete suggestions per issue.                                                                                                                                                                                                                                                                                                  |                                  |            |       | 2020-06-24 00:00:00 | 2020-06-24 00:00:00 | no     |     |               |              |               |
| phrase\_auto\_complete\_msgs            | integer      | Count of utterances where at least one phrase autocomplete was accepted/sent.                                                                                                                                                                                                                                                                               |                                  |            |       | 2020-06-24 00:00:00 | 2020-06-24 00:00:00 | no     |     |               |              |               |
| cume\_phrase\_auto\_complete            | integer      | Total number of phrase autocompletes per issue.                                                                                                                                                                                                                                                                                                             |                                  |            |       | 2020-06-24 00:00:00 | 2020-06-24 00:00:00 | no     |     |               |              |               |
| exclusive\_phrase\_auto\_complete\_msgs | integer      | Count of utterances where at least one phrase autocomplete was accepted/sent and no other augmentation was used.                                                                                                                                                                                                                                            |                                  |            |       | 2020-06-24 00:00:00 | 2020-06-24 00:00:00 | no     |     |               |              |               |

### Table: rep\_convos

The rep\_convos table captures metrics associated with a rep and an issue. Expected metrics include "average response time", "cumulative customer response time",  "disposition type" and "handle time". This data is captured in 15 minute window increments.

**Sync Time:** 1h

**Unique Condition:** issue\_id, rep\_id, issue\_assigned\_ts

| Column                                  | Type                        | Description                                                                                                                                                                                                                                                                                                                                                 | Example                                         | Aggregates | Notes | Date Added          | Date Modified       | Ignore | PII | release state | Specific Use | Feature Group |
| :-------------------------------------- | :-------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :---------------------------------------------- | :--------- | :---- | :------------------ | :------------------ | :----- | :-- | :------------ | :----------- | :------------ |
| instance\_ts                            | timestamp                   | The time window of computed elements.  This window is usually 15 minutes or 1 hour depending on the generation time. Times are rounded down to the nearest interval (for a time of 12:34 and an interval of 15m, this is 12:30). As an example, for a 15 minute interval an instance\_ts of 12:30 implies events from 12:30 -> 12:45. All times are in UTC. | 2019-11-08 14:00:06.957000+00:00                |            |       | 2018-09-01 00:00:00 | 2018-09-01 00:00:00 | no     |     |               |              |               |
| conversation\_id                        | bigint                      | deprecated: 2019-09-25                                                                                                                                                                                                                                                                                                                                      | 21352352                                        |            |       | 2018-09-01 00:00:00 | 2018-09-01 00:00:00 | no     |     |               |              |               |
| agent\_id                               | bigint                      | deprecated: 2019-09-25                                                                                                                                                                                                                                                                                                                                      | 123008                                          |            |       | 2018-09-01 00:00:00 | 2018-09-01 00:00:00 | no     |     |               |              |               |
| company\_subdivision                    | varchar(255)                | String identifier for the company subdivision associated with the conversation.                                                                                                                                                                                                                                                                             | ACMEsubcorp                                     |            |       | 2018-09-01 00:00:00 | 2018-09-01 00:00:00 | no     |     |               |              |               |
| company\_segments                       | varchar(255)                | String with comma separated segments for the company enclosed by square brackets.                                                                                                                                                                                                                                                                           | marketing,promotions                            |            |       | 2018-09-01 00:00:00 | 2018-09-01 00:00:00 | no     |     |               |              |               |
| issue\_assigned\_ts                     | timestamp without time zone | The time when an issue was first assigned to this rep.                                                                                                                                                                                                                                                                                                      | 2019-10-31T18:37:37.848000+00:00                |            |       | 2018-09-01 00:00:00 | 2018-09-01 00:00:00 | no     |     |               |              |               |
| agent\_first\_response\_ts              |                             | deprecated: 2019-09-25                                                                                                                                                                                                                                                                                                                                      |                                                 |            |       | 2018-09-01 00:00:00 | 2018-09-01 00:00:00 | no     |     |               |              |               |
| dispositioned\_ts                       | timestamp                   | The time when the issue left the rep's screen.                                                                                                                                                                                                                                                                                                              | 2019-10-31T18:46:39.869000+00:00                |            |       | 2018-09-01 00:00:00 | 2018-09-01 00:00:00 | no     |     |               |              |               |
| customer\_end\_ts                       | timestamp without time zone | The time at which the customer ended the issue.  This may be NULL.                                                                                                                                                                                                                                                                                          | 2019-10-31T18:46:12.559000+00:00                |            |       | 2018-09-01 00:00:00 | 2018-09-01 00:00:00 | no     |     |               |              |               |
| disposition\_event\_type                | varchar(255)                | Event type indicating how the conversation ended.                                                                                                                                                                                                                                                                                                           | rep, customer, batch (system/auto ended), batch |            |       | 2018-09-01 00:00:00 | 2018-09-01 00:00:00 | no     |     |               |              |               |
| cust\_utterance\_count                  | bigint                      | The count of customer utterances from issue\_assigned\_ts to dispositioned\_ts.                                                                                                                                                                                                                                                                             | 5                                               |            |       | 2018-09-01 00:00:00 | 2018-09-01 00:00:00 | no     |     |               |              |               |
| rep\_utterance\_count                   | bigint                      | The count of rep utterances from issue\_assigned\_ts to dispositioned\_ts.                                                                                                                                                                                                                                                                                  | 5                                               |            |       | 2018-09-01 00:00:00 | 2018-09-01 00:00:00 | no     |     |               |              |               |
| handle\_time\_seconds                   | double precision            | Total time in seconds that reps spent handling the issue, from assignment to disposition.                                                                                                                                                                                                                                                                   | 428.9                                           |            |       | 2019-03-19 00:00:00 | 2019-03-20 00:00:00 | no     |     |               |              |               |
| lead\_time\_seconds                     | double precision            | Total time in seconds the customer spent interacting during the conversation, from assignment to last utterance.                                                                                                                                                                                                                                            | 320.05                                          |            |       | 2019-03-19 00:00:00 | 2019-03-20 00:00:00 | no     |     |               |              |               |
| wrap\_up\_time\_seconds                 | double precision            | Total time in seconds spent by reps wrapping up the conversation, calculated as the difference between handle and lead time.                                                                                                                                                                                                                                | 3.614                                           |            |       | 2019-03-19 00:00:00 | 2019-03-20 00:00:00 | no     |     |               |              |               |
| rep\_response\_ct                       | int                         | The total count of responses by the rep. Max of one message following a customer message counted as a response.                                                                                                                                                                                                                                             | 5                                               |            |       | 2019-05-17 00:00:00 | 2019-05-17 00:00:00 | no     |     |               |              |               |
| cust\_response\_ct                      | int                         | The total count of responses by the customer. Max of one message following a rep message counted as a response.                                                                                                                                                                                                                                             | 12                                              |            |       | 2019-05-17 00:00:00 | 2019-05-17 00:00:00 | no     |     |               |              |               |
| auto\_suggest\_msgs                     | bigint                      | The number of autosuggest prompts used by the rep (inclusive of custom\_auto\_suggest\_msgs).                                                                                                                                                                                                                                                               | 5                                               |            |       | 2019-07-29 00:00:00 | 2019-07-29 00:00:00 | no     |     |               |              |               |
| auto\_complete\_msgs                    | bigint                      | The number of autocompletion prompts used by the rep (inclusive of custom\_auto\_complete\_msgs).                                                                                                                                                                                                                                                           | 5                                               |            |       | 2019-07-29 00:00:00 | 2019-07-29 00:00:00 | no     |     |               |              |               |
| custom\_auto\_suggest\_msgs             | bigint                      | The number of custom autocompletion prompts used by the rep (is a subset of auto\_suggest\_msgs).                                                                                                                                                                                                                                                           | 2                                               |            |       | 2019-09-25 00:00:00 | 2019-09-25 00:00:00 | no     |     |               |              |               |
| custom\_auto\_complete\_msgs            | bigint                      | The number of custom autosuggest prompts used by the rep (is a subset of auto\_complete\_msgs).                                                                                                                                                                                                                                                             | 2                                               |            |       | 2019-09-25 00:00:00 | 2019-09-25 00:00:00 | no     |     |               |              |               |
| drawer\_msgs                            | bigint                      | The number of custom drawer messages used by the rep.                                                                                                                                                                                                                                                                                                       | 2                                               |            |       | 2019-09-25 00:00:00 | 2019-09-25 00:00:00 | no     |     |               |              |               |
| kb\_search\_msgs                        | bigint                      | The number of messages used by the rep from the knowledge base searches.                                                                                                                                                                                                                                                                                    | 2                                               |            |       | 2019-09-25 00:00:00 | 2019-09-25 00:00:00 | no     |     |               |              |               |
| kb\_recommendation\_msgs                | bigint                      | The number of messages used by the rep from the knowledge base recommendations.                                                                                                                                                                                                                                                                             | 2                                               |            |       | 2019-09-25 00:00:00 | 2019-09-25 00:00:00 | no     |     |               |              |               |
| is\_ghost\_customer                     | boolean                     | Boolean value indicating if the customer was assigned a rep but never responded.                                                                                                                                                                                                                                                                            | true, false                                     |            |       | 2019-05-17 00:00:00 | 2019-05-17 00:00:00 | no     |     |               |              |               |
| first\_response\_seconds                | bigint                      | The total time taken by the rep to send the first message, once the message was assigned.                                                                                                                                                                                                                                                                   | 26.148                                          |            |       | 2019-05-17 00:00:00 | 2019-05-17 00:00:00 | no     |     |               |              |               |
| cume\_rep\_response\_seconds            | bigint                      | The total time across the assignment for the rep to send response messages.                                                                                                                                                                                                                                                                                 | 53.243                                          |            |       | 2019-05-17 00:00:00 | 2019-05-17 00:00:00 | no     |     |               |              |               |
| max\_rep\_response\_seconds             | double precision            | The maximum time across the assignment for the rep to send a response message.                                                                                                                                                                                                                                                                              | 77.965                                          |            |       | 2019-05-17 00:00:00 | 2019-05-17 00:00:00 | no     |     |               |              |               |
| avg\_rep\_response\_seconds             | double precision            | The average time across assignment for the rep to send response messages.                                                                                                                                                                                                                                                                                   | 22.359                                          |            |       | 2019-05-17 00:00:00 | 2019-05-17 00:00:00 | no     |     |               |              |               |
| cume\_cust\_response\_seconds           | bigint                      | The total time across the assignment for the customer to send response messages.                                                                                                                                                                                                                                                                            | 332.96                                          |            |       | 2019-05-17 00:00:00 | 2019-05-17 00:00:00 | no     |     |               |              |               |
| issue\_id                               | bigint                      | The ASAPP issue or conversation id.                                                                                                                                                                                                                                                                                                                         | 21352352                                        |            |       | 2019-09-27 00:00:00 | 2019-09-27 00:00:00 | no     |     |               |              |               |
| rep\_id                                 | varchar(191)                | The ASAPP rep/agent identifier.                                                                                                                                                                                                                                                                                                                             | 123008                                          |            |       | 2019-09-27 00:00:00 | 2019-09-27 00:00:00 | no     |     |               |              |               |
| rep\_first\_response\_ts                | datetime                    | The time when a rep first responded to the customer.                                                                                                                                                                                                                                                                                                        | 2019-10-31T18:38:03.996000+00:00                |            |       | 2019-09-27 00:00:00 | 2019-09-27 00:00:00 | no     |     |               |              |               |
| hold\_ct                                | bigint                      | The total count that this rep was part of a hold call. This field is not applicable to chat.                                                                                                                                                                                                                                                                | 1                                               |            |       | 2019-11-19 00:00:00 | 2019-11-19 00:00:00 | no     |     |               |              |               |
| cume\_hold\_time\_seconds               | double precision            | The total duration of time the rep placed the customer on hold across the call. This field is not applicable to chat. 93.30                                                                                                                                                                                                                                 |                                                 |            |       | 2019-11-19 00:00:00 | 2019-11-19 00:00:00 | no     |     |               |              |               |
| company\_name                           | varchar(255)                | Name of the company associated with the data.                                                                                                                                                                                                                                                                                                               | acme                                            |            |       | 2019-11-01 00:00:00 | 2024-05-24 00:00:00 | no     |     |               |              |               |
| client\_mode                            | varchar(191)                | The communication mode used by the customer for a given issue (CHAT or VOICE).                                                                                                                                                                                                                                                                              | CHAT, VOICE                                     |            |       | 2019-12-10 00:00:00 | 2019-12-10 00:00:00 | no     |     |               |              |               |
| cume\_cross\_talk\_seconds              | numeric(38,5)               | Total duration of time where both agent and customer were speaking. Only relevant for voice client mode.                                                                                                                                                                                                                                                    |                                                 |            |       | 2019-12-28 00:00:00 | 2019-12-28 00:00:00 | no     |     |               |              |               |
| desk\_mode\_flag                        | bigint                      | Bitmap encodes if agent handled voice-issue ASAPP desk, had engagement with ASAPP desk. bitmap: 0: null, 1: 'VOICE', 2: 'DESK', 4: 'ENGAGEMENT',  8: 'INACTIVITY' NULL for non voice issues                                                                                                                                                                 | 0, 1, 2, 5, 7                                   |            |       | 2020-02-19 00:00:00 | 2020-02-19 00:00:00 | no     |     |               |              |               |
| desk\_mode\_string                      | varchar(191)                | Decodes the desk\_mode flag. Current possible values (Null, 'VOICE', 'VOICE\_DESK', 'VOICE\_DESK\_ENGAGEMENT','VOICE\_INACTIVITY'). NULL for non voice issues.                                                                                                                                                                                              | VOICE\_DESK                                     |            |       | 2020-02-19 00:00:00 | 2020-02-19 00:00:00 | no     |     |               |              |               |
| queue\_id                               | integer                     | The ASAPP queue identifier which the issue was placed.                                                                                                                                                                                                                                                                                                      | 20001                                           |            |       | 2021-04-08 00:00:00 | 2021-04-08 00:00:00 | no     |     |               |              |               |
| autopilot\_timeout\_msgs                | integer                     | Number of autopilot timeout messages.                                                                                                                                                                                                                                                                                                                       | 2                                               |            |       | 2021-08-02 00:00:00 | 2021-08-02 00:00:00 | no     |     |               |              |               |
| exclusive\_phrase\_auto\_complete\_msgs | integer                     | Count of utterances where at least one phrase autocomplete was accepted/sent and no other augmentation was used.                                                                                                                                                                                                                                            |                                                 |            |       | 2021-08-02 00:00:00 | 2021-08-02 00:00:00 | no     |     |               |              |               |
| custom\_click\_to\_insert\_msgs         | integer                     | Total count of custom click\_to\_insert messages.                                                                                                                                                                                                                                                                                                           |                                                 |            |       | 2021-08-02 00:00:00 | 2021-08-02 00:00:00 | no     |     |               |              |               |
| ms\_auto\_suggest\_msgs                 | integer                     | Total count of multi-sentence auto-suggest messages.                                                                                                                                                                                                                                                                                                        |                                                 |            |       | 2021-08-02 00:00:00 | 2021-08-02 00:00:00 | no     |     |               |              |               |
| ms\_auto\_complete\_msgs                | integer                     | Total count of multi-sentence auto-complete messages.                                                                                                                                                                                                                                                                                                       |                                                 |            |       | 2021-08-02 00:00:00 | 2021-08-02 00:00:00 | no     |     |               |              |               |
| ms\_auto\_suggest\_custom\_msgs         | integer                     | Total count of custom multi-sentence auto-suggest messages.                                                                                                                                                                                                                                                                                                 |                                                 |            |       | 2021-08-02 00:00:00 | 2021-08-02 00:00:00 | no     |     |               |              |               |
| ms\_auto\_complete\_custom\_msgs        | integer                     | Total count of custom multi-sentence auto-complete messages.                                                                                                                                                                                                                                                                                                |                                                 |            |       | 2021-08-02 00:00:00 | 2021-08-02 00:00:00 | no     |     |               |              |               |
| autopilot\_form\_msgs                   | bigint                      | Number of autopilot form messages.                                                                                                                                                                                                                                                                                                                          | 2                                               |            |       | 2021-08-02 00:00:00 | 2021-08-02 00:00:00 | no     |     |               |              |               |
| click\_to\_insert\_global\_msgs         | integer                     | Number of click to insert messages.                                                                                                                                                                                                                                                                                                                         | 2                                               |            |       | 2023-02-15 00:00:00 | 2023-02-15 00:00:00 | no     |     |               |              |               |
| autopilot\_greeting\_msgs               | bigint                      | Number of autopilot greeting messages.                                                                                                                                                                                                                                                                                                                      | 2                                               |            |       | 2023-02-15 00:00:00 | 2023-02-15 00:00:00 | no     |     |               |              |               |
| augmented\_msgs                         | bigint                      | Number of augmented messages.                                                                                                                                                                                                                                                                                                                               | 2                                               |            |       | 2023-02-22 00:00:00 | 2023-02-22 00:00:00 | no     |     |               |              |               |
| autopilot\_ending\_msgs\_ct             | integer                     | Number of autopilot endings                                                                                                                                                                                                                                                                                                                                 | 2                                               |            |       | 2024-04-19 00:00:00 | 2024-04-19 00:00:00 | no     |     |               |              |               |

### Table: rep\_hierarchy

The rep\_hierarchy table contains the rep and their direct reports and their manager.  This is a daily snapshot of rep hierarchy information. This table may be empty and if empty, then consult rep\_attributes.

**Sync Time:** 1d

**Unique Condition:** subordinate\_rep\_id, superior\_rep\_id

| Column                  | Type                    | Description                                                                                              | Example                        | Aggregates | Notes | Date Added          | Date Modified       | Ignore | PII | release state | Specific Use | Feature Group |
| :---------------------- | :---------------------- | :------------------------------------------------------------------------------------------------------- | :----------------------------- | :--------- | :---- | :------------------ | :------------------ | :----- | :-- | :------------ | :----------- | :------------ |
| subordinate\_agent\_id  |                         | deprecated: 2019-09-25                                                                                   |                                |            |       | 2018-08-14 00:00:00 | 2018-08-14 00:00:00 | no     |     |               |              |               |
| superior\_agent\_id     |                         | deprecated: 2019-09-25                                                                                   |                                |            |       | 2018-08-14 00:00:00 | 2018-08-14 00:00:00 | no     |     |               |              |               |
| reporting\_relationship | character varying(1024) | Relationship between subordinate and superior reps, e.g. "superiors\_superior" for skip-level reporting. | superior, 	superiors\_superior |            |       | 2018-08-14 00:00:00 | 2018-08-14 00:00:00 | no     |     |               |              |               |
| subordinate\_rep\_id    | bigint                  | ASAPP rep identifier that is the subordinate of the superior\_rep\_id.                                   | 110001                         |            |       | 2019-09-27 00:00:00 | 2019-09-27 00:00:00 | no     |     |               |              |               |
| superior\_rep\_id       | bigint                  | Superior rep id that is the superior of the subordinate\_rep\_id.                                        | 20001                          |            |       | 2019-09-27 00:00:00 | 2019-09-27 00:00:00 | no     |     |               |              |               |
| company\_name           | varchar(255)            | Name of the company associated with the data.                                                            | acme                           |            |       | 2019-11-01 00:00:00 | 2024-05-24 00:00:00 | no     |     |               |              |               |

### Table: rep\_utilized

The rep\_utilized table tracks a rep's activity and how much time they spend in each state. It shows utilization time and total minutes per state, recorded in 15-minute intervals throughout the day. The instance\_ts field represents the 15-minute window and is part of the primary key. It doesn’t show the most recent event like in other tables. The data may be updated if later information changes it, such as adding more utilization time. Utilization refers to the rep’s efficiency.

**Sync Time:** 1h

**Unique Condition:** instance\_ts, rep\_id, desk\_mode, max\_slots, company\_marker

| Column                                       | Type         | Description                                                                                                                                                                                 | Example              | Aggregates | Notes | Date Added          | Date Modified       | Ignore | PII | release state | Specific Use | Feature Group |
| :------------------------------------------- | :----------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :------------------- | :--------- | :---- | :------------------ | :------------------ | :----- | :-- | :------------ | :----------- | :------------ |
| instance\_ts                                 | timestamp    | The start of the 15-minute time window under observation. As an example, for a 15 minute interval an instance\_ts of 12:30 implies activity from 12:30 to 12:45.                            | 2019-11-08 14:00:00  |            |       | 2019-03-11 00:00:00 | 2019-03-11 00:00:00 | no     |     |               |              |               |
| update\_ts                                   |              | Timestamp at which the last event for this record occurred - usually the last status end or conversation end that was active in this window deprecated: 2020-11-09                          | 2019-06-10 14:24:00  |            |       | 2020-01-29 00:00:00 | 2020-01-29 00:00:00 | no     |     |               |              |               |
| export\_ts                                   |              | The end of the time window for which this record was exported.                                                                                                                              | 2019-06-10 14:30:00  |            |       | 2020-01-29 00:00:00 | 2020-01-29 00:00:00 | no     |     |               |              |               |
| company\_id                                  | bigint       | The ASAPP identifier of the company or test data source.                                                                                                                                    | 10001                |            |       | 2019-03-11 00:00:00 | 2019-03-11 00:00:00 | no     |     |               |              |               |
| company\_subdivision                         | varchar(255) | Relates to the customer issue, not relevant to reps. Intentionally left blank.                                                                                                              | ACMEsubcorp          |            |       | 2019-03-11 00:00:00 | 2019-03-11 00:00:00 | no     |     |               |              |               |
| company\_segments                            | varchar(255) | Relates to the customer issue, not relevant to reps. Intentionally left blank.                                                                                                              | marketing,promotions |            |       | 2019-03-11 00:00:00 | 2019-03-11 00:00:00 | no     |     |               |              |               |
| rep\_id                                      | varchar(191) | The ASAPP rep/agent identifier.                                                                                                                                                             | 123008               |            |       | 2019-03-11 00:00:00 | 2019-03-11 00:00:00 | no     |     |               |              |               |
| rep\_name                                    | varchar(191) | The name of the rep.                                                                                                                                                                        | John Doe             |            |       | 2019-03-11 00:00:00 | 2019-03-11 00:00:00 | no     |     |               |              |               |
| max\_slots                                   | integer      | Maximum chat concurrency slots enabled for this rep.                                                                                                                                        | 2                    |            |       | 2019-03-11 00:00:00 | 2019-03-11 00:00:00 | no     |     |               |              |               |
| cum\_logged\_in\_min                         | bigint       | Cumulative Logged In Time (min) -- Total cumulative time (linear time x max slots) the rep logged into tthe agent desktop.                                                                  | 120                  |            |       | 2019-03-11 00:00:00 | 2019-03-11 00:00:00 | no     |     |               |              |               |
| lin\_logged\_in\_min                         | bigint       | Linear Logged In Time (min) -- Total linear time rep logged into agent desktop.                                                                                                             | 60                   |            |       | 2019-03-11 00:00:00 | 2019-03-11 00:00:00 | no     |     |               |              |               |
| cum\_avail\_min                              | bigint       | Cumulative Available Time (min) -- Total cumulative time (linear time x max slots) the rep logged into agent desktop while in the "Available" state.                                        | 90                   |            |       | 2019-03-11 00:00:00 | 2019-03-11 00:00:00 | no     |     |               |              |               |
| lin\_avail\_min                              | bigint       | Linear Available Time (min) -- Total linear time the rep logged into the agent desktop while in the "Available" state.                                                                      | 45                   |            |       | 2019-03-11 00:00:00 | 2019-03-11 00:00:00 | no     |     |               |              |               |
| cum\_busy\_min                               | bigint       | Cumulative Busy Time (min) -- Total cumulative time (linear time x max slots) the rep logged into agent desktop while in a "Busy" state.                                                    | 30                   |            |       | 2019-03-11 00:00:00 | 2019-03-11 00:00:00 | no     |     |               |              |               |
| lin\_busy\_min                               | bigint       | Linear Busy Time (min) -- Total linear time rep logged into agent desktop while in a "Busy" state.                                                                                          | 15                   |            |       | 2019-03-11 00:00:00 | 2019-03-11 00:00:00 | no     |     |               |              |               |
| cum\_prebreak\_min                           | bigint       | Cumulative Busy Time - Pre-Break (min) -- Total cumulative time (linear time x max slots) rep logged into agent desktop while in the Pre-Break vesion of the "Busy" state.                  | 10                   |            |       | 2019-03-11 00:00:00 | 2019-03-11 00:00:00 | no     |     |               |              |               |
| lin\_prebreak\_min                           | bigint       | Linear Busy Time - Pre-Break (min) -- Total linear time the rep logged into Agent Desktop while in the Pre-Break vesion of Busy state                                                       | 5.6                  |            |       | 2019-03-11 00:00:00 | 2019-03-11 00:00:00 | no     |     |               |              |               |
| cum\_ute\_total\_min                         | bigint       | Cumulative Utilized Time (min) -- Total cumulative time (linear time x active slots) the rep logged into agent desktop and utilized over all states.                                        | 27.71                |            |       | 2019-03-11 00:00:00 | 2019-03-11 00:00:00 | no     |     |               |              |               |
| lin\_ute\_total\_min                         | bigint       | Linear Utilized Time (min) -- Total linear time rep logged into agent desktop and utilized over all states.                                                                                 | 5.5                  |            |       | 2019-03-11 00:00:00 | 2019-03-11 00:00:00 | no     |     |               |              |               |
| cum\_ute\_avail\_min                         | bigint       | Cumulative Utilized Time While Available (min) -- Total cumulative time (linear time x active slots) rep logged into agent desktop and utilized while in the "Available" state.             | 11.5                 |            |       | 2019-03-11 00:00:00 | 2019-03-11 00:00:00 | no     |     |               |              |               |
| lin\_ute\_avail\_min                         | bigint       | Linear Utilized Time While Available (min) -- Total linear time rep logged into agent desktop and utilized while in the "Available" state.                                                  | 5.93                 |            |       | 2019-03-11 00:00:00 | 2019-03-11 00:00:00 | no     |     |               |              |               |
| cum\_ute\_busy\_min                          | bigint       | Cumulative Busy Time - While Chatting (min) -- Total cumulative time (linear time x active slots) rep logged into agent desktop while in a Busy state and handling at least one assignment. | 7.38                 |            |       | 2019-03-11 00:00:00 | 2019-03-11 00:00:00 | no     |     |               |              |               |
| lin\_ute\_busy\_min                          | bigint       | Linear Utilized Time While Busy (min) -- Total linear time rep logged into agent desktop while in a Busy state and handling at least one assignment.                                        | 3.44                 |            |       | 2019-03-11 00:00:00 | 2019-03-11 00:00:00 | no     |     |               |              |               |
| cum\_ute\_prebreak\_min                      | bigint       | Cumulative Utilized Time While Busy Pre-Break (min) -- Cumulative time rep logged into agent desktop and utilized while in the "Pre-Break Busy" state.                                      | 5.35                 |            |       | 2019-03-11 00:00:00 | 2019-03-11 00:00:00 | no     |     |               |              |               |
| lin\_ute\_prebreak\_min                      | bigint       | Linear Utilized Time While Busy Pre-Break (min) -- Linear time rep logged into agent desktop and utilized while in the "Pre-Break Busy" state.                                              | 3.65                 |            |       | 2019-03-11 00:00:00 | 2019-03-11 00:00:00 | no     |     |               |              |               |
| labor\_min                                   | bigint       | Total linear time rep logged into agent desktop in the available state, plus cumulative time rep was handling issues in any "Busy" state.                                                   | 18.44                |            |       | 2019-03-11 00:00:00 | 2019-03-11 00:00:00 | no     |     |               |              |               |
| busy\_clicks\_ct                             | bigint       | Busy Clicks -- Number of times the rep moved from an active to a busy state.                                                                                                                | 1                    |            |       | 2019-05-10 00:00:00 | 2019-05-10 00:00:00 | no     |     |               |              |               |
| ute\_ratio                                   |              | Utilization ratio - cumulative utilized time divided by linear total potential labor time.                                                                                                  | 1.71                 |            |       | 2019-03-11 00:00:00 | 2019-03-11 00:00:00 | no     |     |               |              |               |
| act\_ratio                                   |              | Active utilization ratio - cumulative utilized time in the available state divided by total labor time.                                                                                     | 1.67                 |            |       | 2019-03-11 00:00:00 | 2019-03-11 00:00:00 | no     |     |               |              |               |
| company\_name                                | varchar(255) | Name of the company associated with the data.                                                                                                                                               | acme                 |            |       | 2019-11-01 00:00:00 | 2025-01-27 00:00:00 | no     |     |               |              |               |
| desk\_mode                                   | varchar(191) | The mode of the desktop that the agent is logged into - whether CHAT or VOICE.                                                                                                              | 'CHAT', 'VOICE'      |            |       | 2019-12-10 00:00:00 | 2019-12-10 00:00:00 | no     |     |               |              |               |
| lin\_utilization\_level\_over\_min           | bigint       | Total linear time in minutes when rep has no assignment Total linear time in minute when rep's assignments is greater than rep's max slot                                                   | 120                  |            |       | 2020-11-09 00:00:00 | 2020-11-09 00:00:00 | no     |     |               |              |               |
| lin\_utilization\_level\_full\_min           | bigint       | Total linear time in minute when rep's assignments is equal to rep's max slot                                                                                                               | 120                  |            |       | 2020-11-09 00:00:00 | 2020-11-09 00:00:00 | no     |     |               |              |               |
| lin\_utilization\_level\_light\_min          | bigint       | Total linear time in minute when rep's assignments is less than rep's max slot                                                                                                              | 120                  |            |       | 2020-11-09 00:00:00 | 2020-11-09 00:00:00 | no     |     |               |              |               |
| workload\_level\_no\_min                     | bigint       | Total time in minute when rep has no active assignment                                                                                                                                      | 120                  |            |       | 2020-11-09 00:00:00 | 2020-11-09 00:00:00 | no     |     |               |              |               |
| workload\_level\_over\_min                   | bigint       | Total time in minute when rep's active assignment is greater than rep's max slot                                                                                                            | 120                  |            |       | 2020-11-09 00:00:00 | 2020-11-09 00:00:00 | no     |     |               |              |               |
| workload\_level\_full\_min                   | bigint       | Total time in minute when rep's active assignment is equal to rep's max slot                                                                                                                | 120                  |            |       | 2020-11-09 00:00:00 | 2020-11-09 00:00:00 | no     |     |               |              |               |
| workload\_level\_light\_min                  | bigint       | Total time in minute when rep's active assignment is less than rep's max slot                                                                                                               | 120                  |            |       | 2020-11-09 00:00:00 | 2020-11-09 00:00:00 | no     |     |               |              |               |
| flex\_protect\_min                           | bigint       | Total time in minute when rep is flex protected                                                                                                                                             | 120                  |            |       | 2020-11-09 00:00:00 | 2020-11-09 00:00:00 | no     |     |               |              |               |
| cum\_weighted\_min                           |              |                                                                                                                                                                                             |                      |            |       | 2019-03-11 00:00:00 | 2019-03-11 00:00:00 | no     |     |               |              |               |
| cum\_weighted\_seconds                       | bigint       | Total effort\_workload when a rep has active assignments                                                                                                                                    | 10                   |            |       | 2019-03-11 00:00:00 | 2019-03-11 00:00:00 | no     |     |               |              |               |
| cum\_ute\_weighted\_avail\_unflexed\_seconds | bigint       | Total time weighted in seconds when a rep is available                                                                                                                                      | 160                  |            |       | 2019-03-11 00:00:00 | 2019-03-11 00:00:00 | no     |     |               |              |               |
| cum\_weighted\_inactive\_seconds             | bigint       | Total effort\_workload when a rep has no active assignments                                                                                                                                 | 10                   |            |       | 2019-03-11 00:00:00 | 2019-03-11 00:00:00 | no     |     |               |              |               |

### Table: sms\_events

Exports for each 15 min window of SMS flow events

**Sync Time:** 1h

**Unique Condition:** company\_id, sms\_flow\_id

| Column                              | Type                        | Description                                                                                   | Example                                         | Aggregates | Notes | Date Added          | Date Modified       | Ignore | PII | release state | Specific Use | Feature Group |
| :---------------------------------- | :-------------------------- | :-------------------------------------------------------------------------------------------- | :---------------------------------------------- | :--------- | :---- | :------------------ | :------------------ | :----- | :-- | :------------ | :----------- | :------------ |
| sms\_flow\_id                       | character varying(65535)    | The flow identifier.                                                                          | 019bf9e4-a01a-4420-b419-459659a1b50e            |            |       | 2019-11-08 00:00:00 | 2019-11-08 00:00:00 | no     |     |               |              |               |
| external\_session\_id               | character varying(65535)    | The session identifier received from the client.                                              | 772766038                                       |            |       | 2019-11-08 00:00:00 | 2019-11-08 00:00:00 | no     |     |               |              |               |
| message\_sent\_result               | character varying(6)        | The status of a SMS request received from the 3rd party SMS provider.                         | 'Sent'                                          |            |       | 2019-11-08 00:00:00 | 2019-11-08 00:00:00 | no     |     |               |              |               |
| message\_sent\_result\_status\_code | character varying(65535)    | The failure reason received from 3rd party SMS provider.                                      | 30001 (Queue Overflow), 30004 (Message Blocked) |            |       | 2019-11-08 00:00:00 | 2019-11-08 00:00:00 | no     |     |               |              |               |
| message\_character\_count           | integer                     | The SMS message's character count.                                                            | 29                                              |            |       | 2019-11-08 00:00:00 | 2019-11-08 00:00:00 | no     |     |               |              |               |
| partner\_triggered\_ts              | timestamp without time zone | The date and time in which a partner sends a SMS request to ASAPP.                            | 2018-03-03 12:23:52                             |            |       | 2019-11-08 00:00:00 | 2019-11-08 00:00:00 | no     |     |               |              |               |
| provider\_sent\_ts                  | timestamp without time zone | The date and time in which ASAPP sends a SMS request from 3rd party SMS provider.             | 2018-03-03 12:23:52                             |            |       | 2019-11-08 00:00:00 | 2019-11-08 00:00:00 | no     |     |               |              |               |
| provider\_status\_ts                | timestamp without time zone | The date and time in which the 3rd party SMS provider sends back the status of a SMS request. | 2018-03-03 12:23:52                             |            |       | 2019-11-08 00:00:00 | 2019-11-08 00:00:00 | no     |     |               |              |               |
| company\_subdivision                | varchar(255)                | String identifier for the company subdivision associated with the conversation.               | ACMEsubcorp                                     |            |       | 2019-11-08 00:00:00 | 2019-11-08 00:00:00 | no     |     |               |              |               |
| company\_segments                   | varchar(255)                | String with comma separated segments for the company enclosed by square brackets.             | marketing,promotions                            |            |       | 2019-11-08 00:00:00 | 2019-11-08 00:00:00 | no     |     |               |              |               |
| company\_id                         | bigint                      | The ASAPP identifier of the company or test data source.                                      | 10001                                           |            |       | 2019-11-08 00:00:00 | 2019-11-08 00:00:00 | no     |     |               |              |               |
| company\_name                       | varchar(255)                | Name of the company associated with the data.                                                 | acme                                            |            |       | 2019-11-08 00:00:00 | 2020-03-23 00:00:00 | no     |     |               |              |               |

### Table: transfers

The purpose of the transfers table is to capture information associated with an issue transfer between reps. The data is captured per 15 minute window.

**Sync Time:** 1h

**Unique Condition:** company\_id, issue\_id, rep\_id, timestamp\_req

| Column                           | Type                        | Description                                                                                                                                                                                                                                                                                                                                                 | Example                               | Aggregates | Notes | Date Added          | Date Modified       | Ignore | PII | release state | Specific Use | Feature Group |
| :------------------------------- | :-------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------ | :--------- | :---- | :------------------ | :------------------ | :----- | :-- | :------------ | :----------- | :------------ |
| instance\_ts                     | timestamp                   | The time window of computed elements.  This window is usually 15 minutes or 1 hour depending on the generation time. Times are rounded down to the nearest interval (for a time of 12:34 and an interval of 15m, this is 12:30). As an example, for a 15 minute interval an instance\_ts of 12:30 implies events from 12:30 -> 12:45. All times are in UTC. | 2019-11-08 14:00:06.957000+00:00      |            |       | 2018-08-03 00:00:00 | 2018-08-03 00:00:00 | no     |     |               |              |               |
| timestamp\_req                   | timestamp without time zone | The date and time when the transfer was requested.                                                                                                                                                                                                                                                                                                          | 2019-06-11T13:27:09.470000+00:00      |            |       | 2018-08-03 00:00:00 | 2018-08-03 00:00:00 | no     |     |               |              |               |
| timestamp\_reply                 | timestamp without time zone | The date and time when the transfer request was received.                                                                                                                                                                                                                                                                                                   | 2019-06-11T13:31:58.537000+00:00      |            |       | 2018-08-03 00:00:00 | 2018-08-03 00:00:00 | no     |     |               |              |               |
| conversation\_id                 | bigint                      | deprecated: 2019-09-25                                                                                                                                                                                                                                                                                                                                      | 21352352                              |            |       | 2018-08-03 00:00:00 | 2018-08-03 00:00:00 | no     |     |               |              |               |
| agent\_id                        | bigint                      | deprecated: 2019-09-25                                                                                                                                                                                                                                                                                                                                      | 123008                                |            |       | 2018-08-03 00:00:00 | 2018-08-03 00:00:00 | no     |     |               |              |               |
| company\_id                      | bigint                      | DEPRECATED 2024-03-25                                                                                                                                                                                                                                                                                                                                       | 10001                                 |            |       | 2018-08-04 00:00:00 | 2018-08-04 00:00:00 | no     |     |               |              |               |
| company\_subdivision             | varchar(255)                | String identifier for the company subdivision associated with the conversation.                                                                                                                                                                                                                                                                             | ACMEsubcorp                           |            |       | 2018-10-04 00:00:00 | 2018-10-04 00:00:00 | no     |     |               |              |               |
| company\_segments                | varchar(255)                | String with comma separated segments for the company enclosed by square brackets.                                                                                                                                                                                                                                                                           | marketing,promotions                  |            |       | 2018-10-04 00:00:00 | 2018-10-04 00:00:00 | no     |     |               |              |               |
| requested\_agent\_transfer       |                             | deprecated: 2019-09-25                                                                                                                                                                                                                                                                                                                                      |                                       |            |       | 2018-08-03 00:00:00 | 2018-08-03 00:00:00 | no     |     |               |              |               |
| group\_transfer\_to              | character varying(65535)    | The group identifier where the issue was transferred.                                                                                                                                                                                                                                                                                                       | 20001                                 |            |       | 2018-08-03 00:00:00 | 2018-08-03 00:00:00 | no     |     |               |              |               |
| group\_transfer\_to\_name        | character varying(191)      | The group name where the issue was transferred.                                                                                                                                                                                                                                                                                                             | acme-mobile-eng                       |            |       | 2018-08-04 00:00:00 | 2018-08-04 00:00:00 | no     |     |               |              |               |
| group\_transfer\_from            | character varying(65535)    | The group identifier which transferred the issue.                                                                                                                                                                                                                                                                                                           | 87001                                 |            |       | 2018-08-04 00:00:00 | 2018-08-04 00:00:00 | no     |     |               |              |               |
| group\_transfer\_from\_name      | character varying(191)      | The group name which transferred the issue. acme-residential-eng                                                                                                                                                                                                                                                                                            |                                       |            |       | 2018-08-04 00:00:00 | 2018-08-04 00:00:00 | no     |     |               |              |               |
| actual\_agent\_transfer          |                             | deprecated: 2019-09-25                                                                                                                                                                                                                                                                                                                                      |                                       |            |       | 2018-08-03 00:00:00 | 2018-08-03 00:00:00 | no     |     |               |              |               |
| accepted                         | boolean                     | A boolean flag indicating whether the transfer was accepted.                                                                                                                                                                                                                                                                                                | true, false                           |            |       | 2018-08-03 00:00:00 | 2018-08-03 00:00:00 | no     |     |               |              |               |
| is\_auto\_transfer               | boolean                     | A boolean flag indicating whether this was an auto-transfer.                                                                                                                                                                                                                                                                                                | true, false                           |            |       | 2019-07-22 00:00:00 | 2019-07-22 00:00:00 | no     |     |               |              |               |
| exit\_transfer\_event\_type      | character varying(65535)    | The event type which concluded the transfer.                                                                                                                                                                                                                                                                                                                | TRANSFER\_ACCEPTED, CONVERSATION\_END |            |       | 2019-07-22 00:00:00 | 2019-07-22 00:00:00 | no     |     |               |              |               |
| transfer\_button\_clicks         | bigint                      | The number of times a rep requested a transfer from transfer initiation to when the transfer was received.                                                                                                                                                                                                                                                  | 1                                     |            |       | 2019-08-22 00:00:00 | 2019-08-22 00:00:00 | no     |     |               |              |               |
| issue\_id                        | bigint                      | The ASAPP issue or conversation id.                                                                                                                                                                                                                                                                                                                         | 21352352                              |            |       | 2019-09-27 00:00:00 | 2019-09-27 00:00:00 | no     |     |               |              |               |
| rep\_id                          | varchar(191)                | The ASAPP rep/agent identifier.                                                                                                                                                                                                                                                                                                                             | 123008                                |            |       | 2019-09-27 00:00:00 | 2019-09-27 00:00:00 | no     |     |               |              |               |
| requested\_rep\_transfer         | bigint                      | The rep which requested the transfer.                                                                                                                                                                                                                                                                                                                       | 1070001                               |            |       | 2019-09-27 00:00:00 | 2019-09-27 00:00:00 | no     |     |               |              |               |
| actual\_rep\_transfer            | bigint                      | The rep which received the transfer.                                                                                                                                                                                                                                                                                                                        | 250001                                |            |       | 2019-09-27 00:00:00 | 2019-09-27 00:00:00 | no     |     |               |              |               |
| company\_name                    | varchar(255)                | Name of the company associated with the data.                                                                                                                                                                                                                                                                                                               | acme                                  |            |       | 2019-11-01 00:00:00 | 2024-05-24 00:00:00 | no     |     |               |              |               |
| requested\_group\_transfer\_id   | bigint                      | The group identifier where the transfer was initially requested.                                                                                                                                                                                                                                                                                            | 123455                                |            |       | 2019-12-13 00:00:00 | 2019-12-13 00:00:00 | no     |     |               |              |               |
| requested\_group\_transfer\_name | character varying(191)      | The group name where the transfer was initially requested.                                                                                                                                                                                                                                                                                                  | support                               |            |       | 2019-12-13 00:00:00 | 2019-12-13 00:00:00 | no     |     |               |              |               |
| route\_code\_to                  | varchar(191)                | IVR routing code indicating the customer contact reason to which the issue is being transferred into                                                                                                                                                                                                                                                        | 2323                                  |            |       | 2018-08-03 00:00:00 | 2018-08-03 00:00:00 | no     |     |               |              |               |
| route\_code\_from                | varchar(191)                | IVR routing code indicating the customer contact reason from the previous assignment                                                                                                                                                                                                                                                                        | 2323                                  |            |       | 2018-08-03 00:00:00 | 2018-08-03 00:00:00 | no     |     |               |              |               |

### Table: utterances

The purpose of the utterances table is to list out each utterance and associated data which was captured during a conversation. This table will include data associated with ongoing conversations which are unended.

**Sync Time:** 1h

**Unique Condition:** created\_ts, issue\_id, sender\_id

| Column               | Type                        | Description                                                                                                                                                                                                                                                                                                                                                 | Example                                                                  | Aggregates | Notes | Date Added          | Date Modified       | Ignore | PII | release state | Specific Use | Feature Group |
| :------------------- | :-------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------- | :--------- | :---- | :------------------ | :------------------ | :----- | :-- | :------------ | :----------- | :------------ |
| instance\_ts         | timestamp                   | The time window of computed elements.  This window is usually 15 minutes or 1 hour depending on the generation time. Times are rounded down to the nearest interval (for a time of 12:34 and an interval of 15m, this is 12:30). As an example, for a 15 minute interval an instance\_ts of 12:30 implies events from 12:30 -> 12:45. All times are in UTC. | 2019-11-08 14:00:06.957000+00:00                                         |            |       | 2018-07-13 00:00:00 | 2018-07-13 00:00:00 | no     |     |               |              |               |
| created\_ts          | timestamp                   | The date and time which the message was sent.                                                                                                                                                                                                                                                                                                               | 2019-12-17T17:11:41.626000+00:00                                         |            |       | 2018-07-13 00:00:00 | 2018-07-13 00:00:00 | no     |     |               |              |               |
| conversation\_id     | bigint                      | deprecated: 2019-09-25                                                                                                                                                                                                                                                                                                                                      | 21352352                                                                 |            |       | 2018-07-13 00:00:00 | 2018-07-13 00:00:00 | no     |     |               |              |               |
| company\_subdivision | varchar(255)                | String identifier for the company subdivision associated with the conversation.                                                                                                                                                                                                                                                                             | ACMEsubcorp                                                              |            |       | 2018-07-13 00:00:00 | 2018-07-13 00:00:00 | no     |     |               |              |               |
| company\_segments    | varchar(255)                | String with comma separated segments for the company enclosed by square brackets.                                                                                                                                                                                                                                                                           | marketing,promotions                                                     |            |       | 2018-07-13 00:00:00 | 2018-07-13 00:00:00 | no     |     |               |              |               |
| sequence\_id         | integer                     | deprecated: 2019-09-26                                                                                                                                                                                                                                                                                                                                      |                                                                          |            |       | 2018-07-13 00:00:00 | 2018-07-13 00:00:00 | no     |     |               |              |               |
| sender\_id           | bigint                      | The identifier of the person who sent the message.                                                                                                                                                                                                                                                                                                          |                                                                          |            |       | 2018-07-13 00:00:00 | 2018-07-13 00:00:00 | no     |     |               |              |               |
| sender\_type         | character varying(191)      | The type of sender.                                                                                                                                                                                                                                                                                                                                         | customer, bot, rep, rep\_note, rep\_whisper                              |            |       | 2018-07-13 00:00:00 | 2018-07-13 00:00:00 | no     |     |               |              |               |
| utterance\_type      | character varying(65535)    | The type of utterance sent.                                                                                                                                                                                                                                                                                                                                 | autosuggest, autocomplete, script, freehand                              |            |       | 2018-07-13 00:00:00 | 2018-07-13 00:00:00 | no     |     |               |              |               |
| sent\_to\_agent      | boolean                     | deprecated: 2019-09-25                                                                                                                                                                                                                                                                                                                                      |                                                                          |            |       | 2018-07-13 00:00:00 | 2018-07-13 00:00:00 | no     |     |               |              |               |
| utterance            | character varying(65535)    | Text sent from a bot or human (i.e. customer, rep, expert).                                                                                                                                                                                                                                                                                                 | 'Upgrade current device', 'Is there anything else we can help you with?' |            |       | 2018-07-13 00:00:00 | 2018-07-13 00:00:00 | no     |     |               |              |               |
| issue\_id            | bigint                      | The ASAPP issue or conversation id.                                                                                                                                                                                                                                                                                                                         | 21352352                                                                 |            |       | 2019-09-27 00:00:00 | 2019-09-27 00:00:00 | no     |     |               |              |               |
| sent\_to\_rep        |                             | A boolean flag indicating if an utterance was sent from a customer to a rep.                                                                                                                                                                                                                                                                                | true, false                                                              |            |       | 2019-09-27 00:00:00 | 2019-09-27 00:00:00 | no     |     |               |              |               |
| utterance\_start\_ts | timestamp without time zone | This timestamp marks the time when a person began speaking in the voice platform. In chat platforms or non-voice generated messages, this timestamp will be NULL.                                                                                                                                                                                           | NULL, 2019-10-18T18:45:00+00:00                                          |            |       | 2019-12-06 00:00:00 | 2019-12-06 00:00:00 | no     |     |               |              |               |
| utterance\_end\_ts   | timestamp without time zone | This timestamp marks the time when a person finished speaking in the voice platform. In chat platforms or non-voice generated messages, this timestamp will be NULL.                                                                                                                                                                                        | NULL, 2019-10-18T18:45:00+00:00                                          |            |       | 2019-12-06 00:00:00 | 2019-12-06 00:00:00 | no     |     |               |              |               |
| company\_name        | varchar(255)                | Name of the company associated with the data.                                                                                                                                                                                                                                                                                                               | acme                                                                     |            |       | 2019-11-01 00:00:00 | 2024-05-24 00:00:00 | no     |     |               |              |               |
| event\_uuid          | varchar(36)                 | A UUID uniquely identifying each utterance record                                                                                                                                                                                                                                                                                                           | 347bdddb-d3a1-45fc-bbcd-dbd3a175fc1c                                     |            |       | 2020-10-23 00:00:00 | 2020-10-23 00:00:00 | no     |     |               |              |               |

### Table: voice\_intents

The voice intents table includes fields that provide visibility to the customer's contact reason for the call

**Sync Time:** 1h

**Unique Condition:** company\_marker, issue\_id

| Column              | Type         | Description                                                                                                                                                                                                                                                                                                                                                 | Example                          | Aggregates | Notes | Date Added          | Date Modified       | Ignore | PII | release state | Specific Use | Feature Group |
| :------------------ | :----------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------- | :--------- | :---- | :------------------ | :------------------ | :----- | :-- | :------------ | :----------- | :------------ |
| instance\_ts        | timestamp    | The time window of computed elements.  This window is usually 15 minutes or 1 hour depending on the generation time. Times are rounded down to the nearest interval (for a time of 12:34 and an interval of 15m, this is 12:30). As an example, for a 15 minute interval an instance\_ts of 12:30 implies events from 12:30 -> 12:45. All times are in UTC. | 2019-11-08 14:00:06.957000+00:00 |            |       | 2021-08-10 00:00:00 | 2021-08-10 00:00:00 | no     |     |               |              |               |
| issue\_id           | bigint       | The ASAPP issue or conversation id.                                                                                                                                                                                                                                                                                                                         | 21352352                         |            |       | 2021-08-10 00:00:00 | 2021-08-10 00:00:00 | no     |     |               |              |               |
| company\_id         | bigint       | DEPRECATED 2024-03-25                                                                                                                                                                                                                                                                                                                                       | 10001                            |            |       | 2021-08-10 00:00:00 | 2021-08-10 00:00:00 | no     |     |               |              |               |
| voice\_intent\_code | varchar(255) | Voice intent code with the highest score associated to the issue                                                                                                                                                                                                                                                                                            | PAYBILL                          |            |       | 2021-08-10 00:00:00 | 2021-08-10 00:00:00 | no     |     |               |              |               |
| voice\_intent\_name | varchar(255) | Voice intent name with the highest score associated to the issue                                                                                                                                                                                                                                                                                            | Payment history                  |            |       | 2021-08-10 00:00:00 | 2021-08-10 00:00:00 | no     |     |               |              |               |
| company\_name       | varchar(255) | Name of the company associated with the data.                                                                                                                                                                                                                                                                                                               | acme                             |            |       | 2025-01-27 00:00:00 | 2025-01-27 00:00:00 | no     |     |               |              |               |

<Note> Last Updated: 2025-03-04 23:55:50 UTC </Note>


# File Exporter
Source: https://docs.asapp.com/reporting/file-exporter

Learn how to use File Exporter to retrieve data from Standalone ASAPP Services.

Use ASAPP's File Exporter service to securely retrieve AI Services data via API. The service provides a specific link to access the requested data based on the file parameters of the request that include the feed, version, format, date, and time interval of interest.

The File Exporter service is meant to be used as a batch mechanism for exporting data to your data warehouse, either on a scheduled basis (e.g. nightly, weekly) or for ad hoc analyses. Data that populates feeds for the File Exporter service updates once daily at 2:00AM UTC.

<Note>
  Data feeds are not available by default. Reach out to your ASAPP account contact to ensure data feeds are enabled for your implementation.
</Note>

## Before You Begin

To use ASAPP's APIs, all apps must be registered through the AI Services Developer Portal. Once registered, each app will be provided unique API keys for ongoing use.

<Tip>
  Get your API credentials and learn how to set up AI Service APIs by visiting our [Developer Quick Start Guide](/getting-started/developers).
</Tip>

## Endpoints

The File Exporter service uses six parameters to specify a target file:

* `feed`: The name of the data feed of interest
* `version`: The version number of the feed
* `format`: The file format
* `date`: The date of interest
* `interval`: The time interval of interest
* `fileName`: The data file name

Each parameter is retrieved from a dedicated endpoint. Once all parameters are retrieved, the target file is retrieved using the endpoint (`/fileexporter/v1/static/getfeedfile`), which takes these parameters in the request and returns a URL.

* `POST` `/fileexporter/v1/static/listfeeds`
  Use this endpoint to retrieve an array of feed names available for your implementation.
* `POST` `/fileexporter/v1/static/listfeedversions`
  Use this endpoint to retrieve an array of versions available for a given data feed.
* `POST` `/fileexporter/v1/static/listfeedformats`
  Use this endpoint to retrieve an array of available file formats for a given feed and version.
* `POST` `/fileexporter/v1/static/listfeeddates`
  Use this endpoint to retrieve an array of available dates for a given feed/version/format.
* `POST` `/fileexporter/v1/static/listfeedintervals`
  Use this endpoint to retrieve an array of available intervals for a given feed/version/format/date.
* `POST` `/fileexporter/v1/static/listfeedfiles`
  Use this endpoint to retrieve an array of file names for a given feed/version/format/date/interval.
* `POST` `/fileexporter/v1/static/getfeedfile`
  Use this endpoint to retrieve a single file URL for the data specified using parameters returned from the above endpoints.

<Tip>
  Values for `file` will differ based on the requested `date` and `interval` parameters. Always call this endpoint prior to calling `/getfeedfile`.
</Tip>

<Tip>
  In the `getfeedfile` request, all parameters are required except `interval`
</Tip>

### Endpoint List

1. `POST /fileexporter/v1/static/listfeeds`
   Retrieve an array of feed names available for your implementation.

2. `POST /fileexporter/v1/static/listfeedversions`
   Retrieve an array of versions available for a given data feed.

3. `POST /fileexporter/v1/static/listfeedformats`
   Retrieve an array of available file formats for a given feed and version.

4. `POST /fileexporter/v1/static/listfeeddates`
   Retrieve an array of available dates for a given feed/version/format.

5. `POST /fileexporter/v1/static/listfeedintervals`
   Retrieve an array of available intervals for a given feed/version/format/date.

6. `POST /fileexporter/v1/static/listfeedfiles`
   Retrieve an array of file names for a given feed/version/format/date/interval.

   <Tip>
     Values for `file` will differ based on the requested `date` and `interval` parameters. Always call this endpoint prior to calling `/getfeedfile`.
   </Tip>

7. `POST /fileexporter/v1/static/getfeedfile`
   Retrieve a single file URL for the data specified using parameters returned from the above endpoints.

   <Tip>
     In the `getfeedfile` request, all parameters are required except `interval`
   </Tip>

## Making Routine Requests

Only two requests are needed for exporting data on an ongoing basis for different timeframes. To export a file each time, make these two calls:

1. Call `/listfeedfiles`
   using the same `feed`, `version`, `format` parameters, and alter the `date` and `interval` parameters as necessary (`interval` is optional) to specify the time period of the data file you wish to retrieve.
   In response, you will receive the name(s) of the `file` needed for making the next request.

2. Call `/getfeedfile`
   with the same parameters as above and the `file` name parameter returned from `/listfeedfiles`. In response, you will receive the access `url`.

3. Call `/listfeedfiles` using the same `feed`, `version`, `format` parameters, and alter the `date` and `interval` parameters as necessary (`interval` is optional) to specify the time period of the data file you wish to retrieve. In response, you will receive the name(s) of the `file` needed for making the next request.

4. Call `/getfeedfile` with the same parameters as above and the `file` name parameter returned from `/listfeedfiles`. In response, you will receive the access `url`.

Your final request to `/getfeedfile` for the file `url` would look like this:

```json
{
  "feed": "feed_test",
  "version": "version=1",
  "format": "format=jsonl",
  "date": "dt=2022-06-27",
  "fileName": "file1.jsonl"
}
```

## Data Feeds

File Exporter makes the following data feeds available:

1. **Conversation State**: `staging_conversation_state`
   Combines ASAPP conversation identifiers with metadata including summaries, augmentation counts, intent, crafting times, and important timestamps.
2. **Utterance State**: `staging_utterance_state`
   Combines ASAPP utterance identifiers with metadata including sender type, augmentations, crafting times, and important timestamps. **NOTE:** Does not include utterance text.
3. **Utterances**: `utterances`
   Combines ASAPP conversation and utterance identifiers with utterance text and timestamps. Identifiers can be used to join utterance text with metadata from utterance state feed.
4. **Free-Text Summaries**: `autosummary_free_text`
   Retrieves data from free-text summaries generated by AutoSummary. This feed has one record per free-text summary produced and can have multiple summaries per conversation .
5. **Feedback**: `autosummary_feedback`
   Retrieves the text of the feedback submitted by the agent. Developers can join this feed to the AutoSummary free-text feed using the summary ID.
6. **Structured Data**: `autosummary_structured_data`
   Retrieves structured data to extract information and insights from conversations in the form of yes/no answers (up to 20) from summaries generated by AutoSummary.

[Click here to view the full schema](/reporting/fileexporter-feeds) for each feed table.

<Note>
  Feed table names that include the prefix `staging_` are not referencing a lower environment; table names have no connection to environments.
</Note>


# File Exporter Feed Schema
Source: https://docs.asapp.com/reporting/fileexporter-feeds



The tables below provide detailed information regarding the schema for exported data files that we can make available to you via the File Exporter API.

### Table: autosummary\_feedback

The autosummary feedback table stores summary text submitted by the agent after they have reviewed and edited it. This export will be sent daily and contains the hour for time zone conversion later.

**Sync Time:** 1d

**Unique Condition:** company\_marker, conversation\_id, summary\_id

| Column                     | Type         | Description                                                                                                                                                                                                                                                                                                                                                 | Example                                             | Aggregates | Notes | Date Added | Date Modified | Ignore | PII | release state | Specific Use | Feature Group |
| :------------------------- | :----------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------- | :--------- | :---- | :--------- | :------------ | :----- | :-- | :------------ | :----------- | :------------ |
| instance\_ts               | timestamp    | The time window of computed elements.  This window is usually 15 minutes or 1 hour depending on the generation time. Times are rounded down to the nearest interval (for a time of 12:34 and an interval of 15m, this is 12:30). As an example, for a 15 minute interval an instance\_ts of 12:30 implies events from 12:30 -> 12:45. All times are in UTC. | 2019-11-08 14:00:06.957000+00:00                    |            |       |            |               | no     |     |               | common       |               |
| conversation\_id           | string       | Unique identifier generated by the ASAPP application for the issue or conversation.                                                                                                                                                                                                                                                                         | ABC21352352                                         |            |       |            |               | no     |     |               | common       |               |
| external\_conversation\_id | VARCHAR(255) | Client-provided issue identifier.                                                                                                                                                                                                                                                                                                                           | vjs654                                              |            |       |            |               | no     |     |               | common       |               |
| agent\_id                  | varchar(255) | The agent identifier in the conversation provided by the customer.                                                                                                                                                                                                                                                                                          | cba321                                              |            |       |            |               | no     |     |               | common       |               |
| summary\_id                | VARCHAR(36)  | Unique identifier for AutoSummary feedback and free-text summary events                                                                                                                                                                                                                                                                                     | 57ffe572-e9dc-4546-963b-29d90b0d92a9                |            |       |            |               | no     |     |               | AutoSummary  |               |
| autosummary\_feedback\_ts  | timestamp    | The timestamp of the autosummary\_feedback\_summary event.                                                                                                                                                                                                                                                                                                  | 2023-05-01 14:00:09                                 |            |       |            |               | no     |     |               | AutoSummary  |               |
| autosummary\_feedback      | string       | Text submitted with agent edits, summarizing the conversation from the autosummary freetext API call.                                                                                                                                                                                                                                                       | Customer chatted in to check whether the app worked |            |       |            |               | no     |     |               | AutoSummary  |               |
| company\_marker            | varchar(255) | Identifier of the customer-company.                                                                                                                                                                                                                                                                                                                         | agnostic                                            |            |       |            |               | no     |     |               | common       |               |
| dt                         | varchar(255) | Date string when summary feedback was submitted.                                                                                                                                                                                                                                                                                                            | 2019-11-08                                          |            |       |            |               | no     |     |               | common       |               |
| hr                         | varchar(255) | Hour string when summary feedback was submitted.                                                                                                                                                                                                                                                                                                            | 18                                                  |            |       |            |               | no     |     |               | common       |               |

### Table: autosummary\_free\_text

The autosummary free text table stores the raw output of ASAPP's API. It is the unedited summary initially shown to the agent to be reviewed. This export will be sent daily and contains the hour for time zone conversion later.

**Sync Time:** 1d

**Unique Condition:** company\_marker, conversation\_id, summary\_id

| Column                             | Type         | Description                                                                                                                                                                                                                                                                                                                                                 | Example                                             | Aggregates | Notes | Date Added | Date Modified | Ignore | PII | release state | Specific Use | Feature Group |
| :--------------------------------- | :----------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------- | :--------- | :---- | :--------- | :------------ | :----- | :-- | :------------ | :----------- | :------------ |
| instance\_ts                       | timestamp    | The time window of computed elements.  This window is usually 15 minutes or 1 hour depending on the generation time. Times are rounded down to the nearest interval (for a time of 12:34 and an interval of 15m, this is 12:30). As an example, for a 15 minute interval an instance\_ts of 12:30 implies events from 12:30 -> 12:45. All times are in UTC. | 2019-11-08 14:00:06.957000+00:00                    |            |       |            |               | no     |     |               | common       |               |
| conversation\_id                   | string       | Unique identifier generated by the ASAPP application for the issue or conversation.                                                                                                                                                                                                                                                                         | ABC21352352                                         |            |       |            |               | no     |     |               | common       |               |
| external\_conversation\_id         | VARCHAR(255) | Client-provided issue identifier.                                                                                                                                                                                                                                                                                                                           | vjs654                                              |            |       |            |               | no     |     |               | common       |               |
| agent\_id                          | varchar(255) | The agent identifier in the conversation provided by the customer.                                                                                                                                                                                                                                                                                          | cba321                                              |            |       |            |               | no     |     |               | common       |               |
| summary\_id                        | VARCHAR(36)  | Unique identifier for AutoSummary feedback and free-text summary events                                                                                                                                                                                                                                                                                     | 57ffe572-e9dc-4546-963b-29d90b0d92a9                |            |       |            |               | no     |     |               | AutoSummary  |               |
| autosummary\_free\_text\_ts        | timestamp    | The timestamp of the autosummary\_free\_text\_summary event.                                                                                                                                                                                                                                                                                                | 2023-05-01 14:00:09                                 |            |       |            |               | no     |     |               | AutoSummary  |               |
| autosummary\_free\_text            | string       | Unedited text summarizing the conversation at the time of the autosummary free text API call.                                                                                                                                                                                                                                                               | Customer chatted in to check whether the app worked |            |       |            |               | no     |     |               | AutoSummary  |               |
| is\_autosummary\_feedback\_used    | integer      | An indicator that the AutoSummary had a feedback summary.                                                                                                                                                                                                                                                                                                   | 1                                                   |            |       |            |               | no     |     |               | AutoSummary  |               |
| is\_autosummary\_feedback\_edited  | integer      | An indicator that the AutoSummary had a feedback summary that was edited.                                                                                                                                                                                                                                                                                   | 0                                                   |            |       |            |               | no     |     |               | AutoSummary  |               |
| autosummary\_free\_text\_length    | integer      | Length of the FreeText AutoSummaries. Will only have a value when there is both freetext and feedback summaries.                                                                                                                                                                                                                                            | 54                                                  |            |       |            |               | no     |     |               | AutoSummary  |               |
| autosummary\_feedback\_length      | integer      | Length of the Feedback AutoSummaries. Will only have a value when there is both freetext and feedback summaries.                                                                                                                                                                                                                                            | 54                                                  |            |       |            |               | no     |     |               | AutoSummary  |               |
| autosummary\_levenshtein\_distance | integer      | Levenshtein edit distances between the AutoSummaries FreeText and Feedback. Will only have a value when there is both freetext and feedback summaries.                                                                                                                                                                                                      | 0                                                   |            |       |            |               | no     |     |               | AutoSummary  |               |
| autosummary\_sentences\_removed    | string       | autosummary\_sentences\_removed contain the sentenses that are generated in freetext summary and got edited or removed feedback summary.                                                                                                                                                                                                                    | Customer called to pay their bill                   |            |       |            |               | no     |     |               | AutoSummary  |               |
| autosummary\_sentences\_added      | string       | autosummary\_sentences\_added contain the sentenses that are added as part of feedback summary in compared to freetext summary.                                                                                                                                                                                                                             | Customer called to pay the bill                     |            |       |            |               | no     |     |               | AutoSummary  |               |
| company\_marker                    | varchar(255) | Identifier of the customer-company.                                                                                                                                                                                                                                                                                                                         | agnostic                                            |            |       |            |               | no     |     |               | common       |               |
| dt                                 | varchar(255) | Date string when summary feedback was submitted.                                                                                                                                                                                                                                                                                                            | 2019-11-08                                          |            |       |            |               | no     |     |               | common       |               |
| hr                                 | varchar(255) | Hour string when summary feedback was submitted.                                                                                                                                                                                                                                                                                                            | 18                                                  |            |       |            |               | no     |     |               | common       |               |

### Table: autosummary\_structured\_data

The autosummary structured data table stores the raw output of ASAPP's API. These structured data outputs consist of LLM generated answers to yes/no questions along with extracted entities based on configuration settings. These outputs can be aggregated and packaged into business insights. This export will be sent daily and contains the hour for time zone conversion later.

**Sync Time:** 1d

**Unique Condition:** company\_marker, conversation\_id, structured\_data\_id, structured\_data\_field\_id

| Column                            | Type         | Description                                                                                                                                                                                                                                                                                                                                                 | Example                              | Aggregates | Notes | Date Added | Date Modified | Ignore | PII | release state | Specific Use | Feature Group |
| :-------------------------------- | :----------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------- | :--------- | :---- | :--------- | :------------ | :----- | :-- | :------------ | :----------- | :------------ |
| instance\_ts                      | timestamp    | The time window of computed elements.  This window is usually 15 minutes or 1 hour depending on the generation time. Times are rounded down to the nearest interval (for a time of 12:34 and an interval of 15m, this is 12:30). As an example, for a 15 minute interval an instance\_ts of 12:30 implies events from 12:30 -> 12:45. All times are in UTC. | 2019-11-08 14:00:06.957000+00:00     |            |       |            |               | no     |     |               | common       |               |
| conversation\_id                  | string       | Unique identifier generated by the ASAPP application for the issue or conversation.                                                                                                                                                                                                                                                                         | ABC21352352                          |            |       |            |               | no     |     |               | common       |               |
| external\_conversation\_id        | VARCHAR(255) | Client-provided issue identifier.                                                                                                                                                                                                                                                                                                                           | vjs654                               |            |       |            |               | no     |     |               | common       |               |
| agent\_id                         | varchar(255) | The agent identifier in the conversation provided by the customer.                                                                                                                                                                                                                                                                                          | cba321                               |            |       |            |               | no     |     |               | common       |               |
| structured\_data\_id              | varchar(36)  | Unique identifier for AutoSummary structured data event                                                                                                                                                                                                                                                                                                     | 57ffe572-e9dc-4546-963b-29d90b0d92a9 |            |       |            |               | no     |     |               | common       |               |
| structured\_data\_ts              | timestamp    | The timestamp of the autosummary\_structured\_data event.                                                                                                                                                                                                                                                                                                   | 2023-05-01 14:00:09                  |            |       |            |               | no     |     |               | common       |               |
| structured\_data\_field\_id       | varchar(255) | The structured data id.                                                                                                                                                                                                                                                                                                                                     | q\_issue\_escalated                  |            |       |            |               | no     |     |               | common       |               |
| structured\_data\_field\_name     | varchar(255) | The structured data name.                                                                                                                                                                                                                                                                                                                                   | Issue escalated                      |            |       |            |               | no     |     |               | common       |               |
| structured\_data\_field\_value    | varchar(255) | The structured data value.                                                                                                                                                                                                                                                                                                                                  | No                                   |            |       |            |               | no     |     |               | common       |               |
| structured\_data\_field\_category | varchar(255) | The structured data category.                                                                                                                                                                                                                                                                                                                               | Outcome                              |            |       |            |               | no     |     |               | common       |               |
| company\_marker                   | varchar(255) | Identifier of the customer-company.                                                                                                                                                                                                                                                                                                                         | agnostic                             |            |       |            |               | no     |     |               | common       |               |
| dt                                | varchar(255) | Date string when summary structured data was generated.                                                                                                                                                                                                                                                                                                     | 2019-11-08                           |            |       |            |               | no     |     |               | common       |               |
| hr                                | varchar(255) | Hour string when summary structured data was generated.                                                                                                                                                                                                                                                                                                     | 18                                   |            |       |            |               | no     |     |               | common       |               |

### Table: contact\_entity\_generative\_agent

hourly snapshot of contact grain generative\_agent data including both dimensions and metrics aggregated over "all time" (two days in practice).

**Sync Time:** 1h

**Unique Condition:** company\_marker, conversation\_id, contact\_id

| Column                                              | Type         | Description                                                                                                                                                                                                                                                                                                                                                 | Example                              | Aggregates | Notes | Date Added          | Date Modified       | Ignore | PII | release state | Specific Use | Feature Group |
| :-------------------------------------------------- | :----------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------- | :--------- | :---- | :------------------ | :------------------ | :----- | :-- | :------------ | :----------- | :------------ |
| company\_marker                                     | string       | The ASAPP identifier of the company or test data source.                                                                                                                                                                                                                                                                                                    | acme                                 |            |       | 2025-01-06 00:00:00 | 2025-01-06 00:00:00 | no     |     |               |              |               |
| conversation\_id                                    | string       | Unique identifier generated by the ASAPP application for the issue or conversation.                                                                                                                                                                                                                                                                         | ABC21352352                          |            |       | 2025-01-06 00:00:00 | 2025-01-06 00:00:00 | no     |     |               |              |               |
| contact\_id                                         | string       |                                                                                                                                                                                                                                                                                                                                                             |                                      |            |       | 2025-01-06 00:00:00 | 2025-01-06 00:00:00 | no     |     |               |              |               |
| instance\_ts                                        | timestamp    | The time window of computed elements.  This window is usually 15 minutes or 1 hour depending on the generation time. Times are rounded down to the nearest interval (for a time of 12:34 and an interval of 15m, this is 12:30). As an example, for a 15 minute interval an instance\_ts of 12:30 implies events from 12:30 -> 12:45. All times are in UTC. | 2019-11-08 14:00:06.957000+00:00     |            |       | 2025-01-06 00:00:00 | 2025-01-06 00:00:00 | no     |     |               |              |               |
| generative\_agent\_turns\_\_turn\_ct                | int          | Number of turns.                                                                                                                                                                                                                                                                                                                                            | 1                                    |            |       | 2025-01-06 00:00:00 | 2025-01-06 00:00:00 | no     |     |               |              |               |
| generative\_agent\_turns\_\_turn\_duration\_ms\_sum | bigint       | Total number of milliseconds between PROCESSING\_START and PROCESSING\_END across all turns.                                                                                                                                                                                                                                                                | 2                                    |            |       | 2025-01-06 00:00:00 | 2025-01-06 00:00:00 | no     |     |               |              |               |
| generative\_agent\_turns\_\_utterance\_ct           | int          | Number of generative\_agent utterances.                                                                                                                                                                                                                                                                                                                     | 2                                    |            |       | 2025-01-06 00:00:00 | 2025-01-06 00:00:00 | no     |     |               |              |               |
| generative\_agent\_turns\_\_contains\_escalation    | boolean      | Boolean indicating the presence of a turn in the conversation that ended with an indication to escalate to a human agent.                                                                                                                                                                                                                                   | 1                                    |            |       | 2025-01-06 00:00:00 | 2025-01-06 00:00:00 | no     |     |               |              |               |
| generative\_agent\_turns\_\_is\_contained           | boolean      | Boolean indicating whether or not the conversation was contained (NOT generative\_agent\_turns\_\_contains\_escalation).                                                                                                                                                                                                                                    | 1                                    |            |       | 2025-01-06 00:00:00 | 2025-01-06 00:00:00 | no     |     |               |              |               |
| generative\_agent\_tasks\_\_first\_task\_name       | varchar(255) | Name of the first task entered by generative\_agent.                                                                                                                                                                                                                                                                                                        | SomethingElse                        |            |       | 2025-01-06 00:00:00 | 2025-01-06 00:00:00 | no     |     |               |              |               |
| generative\_agent\_tasks\_\_last\_task\_name        | varchar(255) | Name of the last task entered by generative\_agent.                                                                                                                                                                                                                                                                                                         | SomethingElse                        |            |       | 2025-01-06 00:00:00 | 2025-01-06 00:00:00 | no     |     |               |              |               |
| generative\_agent\_tasks\_\_task\_ct                | int          | Number of tasks entered by generative\_agent.                                                                                                                                                                                                                                                                                                               | 2                                    |            |       | 2025-01-06 00:00:00 | 2025-01-06 00:00:00 | no     |     |               |              |               |
| generative\_agent\_tasks\_\_configuration\_id       | varchar(255) | The configuration version that produced generative\_agent actions.                                                                                                                                                                                                                                                                                          | 4ea5b399-f969-49c6-8318-e2c39a98e817 |            |       | 2025-01-06 00:00:00 | 2025-01-06 00:00:00 | no     |     |               |              |               |

### Table: staging\_conversation\_state

This issue-grain table provides a consolidated view of metrics produced across multiple ASAPP services for a given issue. The table is populated daily and includes hour-level data for time zone conversion.

**Sync Time:** 1d

**Unique Condition:** company\_marker, conversation\_id, dt, hr

| Column                                             | Type         | Description                                                                                                                                                                                                                                                                                                                                                 | Example                                               | Aggregates | Notes | Date Added | Date Modified | Ignore | PII | release state | Specific Use   | Feature Group |
| :------------------------------------------------- | :----------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :---------------------------------------------------- | :--------- | :---- | :--------- | :------------ | :----- | :-- | :------------ | :------------- | :------------ |
| conversation\_id                                   | timestamp    | Unique identifier generated by the ASAPP application for the issue or conversation.                                                                                                                                                                                                                                                                         | ABC21352352                                           |            |       |            |               | no     |     |               | Conversation   |               |
| instance\_ts                                       | timestamp    | The time window of computed elements.  This window is usually 15 minutes or 1 hour depending on the generation time. Times are rounded down to the nearest interval (for a time of 12:34 and an interval of 15m, this is 12:30). As an example, for a 15 minute interval an instance\_ts of 12:30 implies events from 12:30 -> 12:45. All times are in UTC. | 2019-11-08 14:00:06.957000+00:00                      |            |       |            |               | no     |     |               | Conversation   |               |
| first\_event\_ts                                   | timestamp    | Timestamp of the first event associated with the conversation\_id.                                                                                                                                                                                                                                                                                          | 2018-06-23 21:28:23                                   |            |       |            |               | no     |     |               | Conversation   |               |
| conversation\_start\_ts                            | timestamp    | Timestamp indicating the start of the conversation as provided by the customer; this will be null if is not provided or conversation started on a previous day. Alternative timestamps include the customer\_first\_utterance\_ts and agent\_first\_response\_ts timestamps or the first\_event\_ts (earliest time for ASAPP involvement).                  | 2019-11-08 14:00:07                                   |            |       |            |               | no     |     |               | Conversation   |               |
| external\_conversation\_id                         | VARCHAR(255) | The conversation id provided by the customer.                                                                                                                                                                                                                                                                                                               | 750068130001                                          |            |       |            |               | no     |     |               | Conversation   |               |
| conversation\_customer\_effective\_ts              | timestamp    | The timestamp of the last change to the customer\_id provided by the customer.                                                                                                                                                                                                                                                                              | 2019-11-08 14:00:07                                   |            |       |            |               | no     |     |               | Conversation   |               |
| customer\_id                                       | varchar(255) | The customer identifier provided by the customer.                                                                                                                                                                                                                                                                                                           | abc123                                                |            |       |            |               | no     |     |               | Conversation   |               |
| conversation\_agent\_effective\_ts                 | timestamp    | The timestamp of the last change to the agent\_id provided by the customer.                                                                                                                                                                                                                                                                                 | 2019-11-08 14:00:07                                   |            |       |            |               | no     |     |               | Conversation   |               |
| last\_agent\_id                                    | varchar(191) | The last agent identifier in the conversation provided by the customer.                                                                                                                                                                                                                                                                                     | abc123                                                |            |       |            |               | no     |     |               | Conversation   |               |
| all\_agent\_ids                                    |              | A list of all the agent identifiers within the conversation provided by the customer.                                                                                                                                                                                                                                                                       | \[abc123,abc456]                                      |            |       |            |               | no     |     |               | Conversation   |               |
| customer\_utterance\_ct                            |              | Count of all customer messages.                                                                                                                                                                                                                                                                                                                             | 5                                                     |            |       |            |               | no     |     |               | Conversation   |               |
| agent\_utterance\_ct                               |              | Count of all agent messages.                                                                                                                                                                                                                                                                                                                                | 16                                                    |            |       |            |               | no     |     |               | Conversation   |               |
| customer\_first\_utterance\_ts                     | timestamp    | Timestamp of the first customer utterance.                                                                                                                                                                                                                                                                                                                  | 2019-11-08 14:00:07                                   |            |       |            |               | no     |     |               | Conversation   |               |
| agent\_first\_utterance\_ts                        |              | Timestamp of the first agent utterance.                                                                                                                                                                                                                                                                                                                     | 2019-11-08 14:00:07                                   |            |       |            |               | no     |     |               | Conversation   |               |
| customer\_last\_utterance\_ts                      | timestamp    | Timestamp of the last customer utterance.                                                                                                                                                                                                                                                                                                                   | 2019-11-08 14:00:07                                   |            |       |            |               | no     |     |               | Conversation   |               |
| agent\_last\_utterance\_ts                         |              | Timestamp of the last agent utterance.                                                                                                                                                                                                                                                                                                                      | 2019-11-08 14:00:07                                   |            |       |            |               | no     |     |               | Conversation   |               |
| autosuggest\_utterance\_ct                         |              | Count of utterances where AutoSuggest was used.                                                                                                                                                                                                                                                                                                             | 6                                                     |            |       |            |               | no     |     |               | AutoCompose    |               |
| autocomplete\_utterance\_ct                        |              | Count of utterances where AutoComplete was used.                                                                                                                                                                                                                                                                                                            | 2                                                     |            |       |            |               | no     |     |               | AutoCompose    |               |
| phrase\_autocomplete\_utterance\_ct                |              | Count of utterances where Phrase AutoComplete was used.                                                                                                                                                                                                                                                                                                     | 0                                                     |            |       |            |               | no     |     |               | AutoCompose    |               |
| custom\_drawer\_utterance\_ct                      |              | Count of utterances where Custom Drawer was used.                                                                                                                                                                                                                                                                                                           | 1                                                     |            |       |            |               | no     |     |               | AutoCompose    |               |
| custom\_insert\_utterance\_ct                      |              | Count of utterances where Custom Insert was used.                                                                                                                                                                                                                                                                                                           | 0                                                     |            |       |            |               | no     |     |               | AutoCompose    |               |
| global\_insert\_utterance\_ct                      |              | Count of utterances where Global Insert was used.                                                                                                                                                                                                                                                                                                           | 1                                                     |            |       |            |               | no     |     |               | AutoCompose    |               |
| fluency\_apply\_utterance\_ct                      |              | Count of utterances where Fluency Apply was used.                                                                                                                                                                                                                                                                                                           | 0                                                     |            |       |            |               | no     |     |               | AutoCompose    |               |
| fluency\_undo\_utterance\_ct                       |              | Count of utterances where Fluency Undo was used.                                                                                                                                                                                                                                                                                                            | 0                                                     |            |       |            |               | no     |     |               | AutoCompose    |               |
| autosummary\_structured\_summary\_tags\_event\_ts  | timestamp    | The timestamp of the last autosummary\_structured\_summary\_tags event.                                                                                                                                                                                                                                                                                     | 2019-11-08 14:00:07                                   |            |       |            |               | no     |     |               | AutoSummary    |               |
| autosummary\_tags                                  | string       | Comma-separated list of tags or codes indicating key topics of this conversation.                                                                                                                                                                                                                                                                           | `{"server":"some-server","server_version":"unknown"}` |            |       |            |               | no     |     |               | AutoSummary    |               |
| autosummary\_free\_text\_summary\_event\_ts        | timestamp    | The timestamp of the last autosummary\_free\_text\_summary event.                                                                                                                                                                                                                                                                                           | 2019-11-08 14:00:07                                   |            |       |            |               | no     |     |               | AutoSummary    |               |
| autosummary\_text                                  | string       | Text summarizing the conversation.                                                                                                                                                                                                                                                                                                                          | Unresponsive Customer.                                |            |       |            |               | no     |     |               | AutoSummary    |               |
| is\_autosummary\_structured\_summary\_tags\_used   |              | An indicator that the conversation had AutoSummary structured summary tags. When aggregating from conversation by day to conversation use MAX().                                                                                                                                                                                                            | 1                                                     |            |       |            |               | no     |     |               | AutoSummary    |               |
| is\_autosummary\_free\_text\_summary\_used         |              | An indicator that the conversations had AutoSummary free text summary. When aggregating from conversation by day to conversation use MAX().                                                                                                                                                                                                                 | 1                                                     |            |       |            |               | no     |     |               | AutoSummary    |               |
| is\_autosummary\_feedback\_used                    | int          | An indicator that the conversation had AutoSummary feedback summary. When aggregating from conversation by day to conversation use MAX().                                                                                                                                                                                                                   | 1                                                     |            |       |            |               | no     |     |               | AutoSummary    |               |
| is\_autosummary\_used                              |              | An indicator that the conversation that had any response (tag, free text, feedback) in Autosummary. When aggregating from conversation by day to conversation use MAX().                                                                                                                                                                                    | 1                                                     |            |       |            |               | no     |     |               | AutoSummary    |               |
| is\_autosummary\_feedback\_edited                  | int          | An indicator that the conversation had at least one AutoSummary that received Feedback with an edited summary. When aggregating from conversation by day to conversation use MAX().                                                                                                                                                                         | 1                                                     |            |       |            |               | no     |     |               | Conversation   |               |
| autosummary\_feedback\_ct                          | bigint       | Count of AutoSummaries that received Feedback for the conversation.                                                                                                                                                                                                                                                                                         | 4                                                     |            |       |            |               | no     |     |               | Conversation   |               |
| autosummary\_feedback\_edited\_ct                  | bigint       | Count of AutoSummaries that received edited Feedback for the conversation.                                                                                                                                                                                                                                                                                  | 3                                                     |            |       |            |               | no     |     |               | Conversation   |               |
| autosummary\_free\_text\_length\_sum               | bigint       | Sum of the length of all the FreeText AutoSummaries for the conversation.                                                                                                                                                                                                                                                                                   | 80                                                    |            |       |            |               | no     |     |               | Conversation   |               |
| autosummary\_feedback\_length\_sum                 | bigint       | Sum of the length of all the Feedback AutoSummaries for the conversation.                                                                                                                                                                                                                                                                                   | 120                                                   |            |       |            |               | no     |     |               | Conversation   |               |
| autosummary\_levenshtein\_distance\_sum            | bigint       | Sum of the Levenshtein edit distances between the AutoSummaries FreeText and Feedback.                                                                                                                                                                                                                                                                      | 40                                                    |            |       |            |               | no     |     |               | Conversation   |               |
| first\_intent\_effective\_ts                       | timestamp    | The timestamp of the last first\_intent event.                                                                                                                                                                                                                                                                                                              | 2019-11-08 14:00:07                                   |            |       |            |               | no     |     |               | JourneyInsight |               |
| first\_intent\_message\_id                         | string       | The id of the message that was sent with the first intent.                                                                                                                                                                                                                                                                                                  | 01GA9V1F2B7Q4Y8REMRZ2SXVRT                            |            |       |            |               | no     |     |               | JourneyInsight |               |
| first\_intent\_intent\_code                        | string       | The intent code associated with the rule that was sent as the first intent within the conversation.                                                                                                                                                                                                                                                         | INCOMPLETE                                            |            |       |            |               | no     |     |               | JourneyInsight |               |
| first\_intent\_intent\_name                        | string       | The intent name correspondent to the intent\_code that was sent as the first intent within the conversation.                                                                                                                                                                                                                                                | INCOMPLETE                                            |            |       |            |               | no     |     |               | JourneyInsight |               |
| first\_intent\_is\_known\_good                     | boolean      | Indicates if the classification for the first\_intent data comes from a known good.                                                                                                                                                                                                                                                                         | FALSE                                                 |            |       |            |               | no     |     |               | JourneyInsight |               |
| conversation\_metadata\_effective\_ts              | timestamp    | The timestamp of the last conversation metadata                                                                                                                                                                                                                                                                                                             | 2019-11-08 14:00:07                                   |            |       |            |               | no     |     |               | Metadata       |               |
| conversation\_metadata\_lob\_id                    | string       | Line of business ID from Conversation Metadata                                                                                                                                                                                                                                                                                                              | 1038                                                  |            |       |            |               | no     |     |               | Metadata       |               |
| conversation\_metadata\_lob\_name                  | string       | Line of business descriptive name from Conversation Metadata                                                                                                                                                                                                                                                                                                | manufacturing                                         |            |       |            |               | no     |     |               | Metadata       |               |
| conversation\_metadata\_agent\_group\_id           | string       | Agent group ID from Conversation Metadata                                                                                                                                                                                                                                                                                                                   | group59                                               |            |       |            |               | no     |     |               | Metadata       |               |
| conversation\_metadata\_agent\_group\_name         | string       | Agent group descriptive name from Conversation Metadata                                                                                                                                                                                                                                                                                                     | groupXYZ                                              |            |       |            |               | no     |     |               | Metadata       |               |
| conversation\_metadata\_agent\_routing\_code       | string       | Agent routing attribute from Conversation Metadata                                                                                                                                                                                                                                                                                                          | route-13988                                           |            |       |            |               | no     |     |               | Metadata       |               |
| conversation\_metadata\_campaign                   | string       | Campaign from Conversation Metadata                                                                                                                                                                                                                                                                                                                         | campaign-A                                            |            |       |            |               | no     |     |               | Metadata       |               |
| conversation\_metadata\_device\_type               | string       | Client device type from Conversation Metadata                                                                                                                                                                                                                                                                                                               | TABLET                                                |            |       |            |               | no     |     |               | Metadata       |               |
| conversation\_metadata\_platform                   | string       | Client platform type from Conversation Metadata                                                                                                                                                                                                                                                                                                             | IOS                                                   |            |       |            |               | no     |     |               | Metadata       |               |
| conversation\_metadata\_company\_segment           | \[]string    | Company segment from Conversation Metadata                                                                                                                                                                                                                                                                                                                  | \["Sales","Marketing"]                                |            |       |            |               | no     |     |               | Metadata       |               |
| conversation\_metadata\_company\_subdivision       | string       | Company subdivision from Conversation Metadata                                                                                                                                                                                                                                                                                                              | operating                                             |            |       |            |               | no     |     |               | Metadata       |               |
| conversation\_metadata\_business\_rule             | string       | Business rule from Conversation Metadata                                                                                                                                                                                                                                                                                                                    | Apply customer's discount                             |            |       |            |               | no     |     |               | Metadata       |               |
| conversation\_metadata\_entry\_type                | string       | Type of entry from Conversation Metadata, e.g., proactive vs reactive                                                                                                                                                                                                                                                                                       | reactive                                              |            |       |            |               | no     |     |               | Metadata       |               |
| conversation\_metadata\_operating\_system          | string       | Operating system from Conversation Metadata                                                                                                                                                                                                                                                                                                                 | OPERATING\_SYSTEM\_MAC\_OS                            |            |       |            |               | no     |     |               | Metadata       |               |
| conversation\_metadata\_browser\_type              | string       | Browser type from Conversation Metadata                                                                                                                                                                                                                                                                                                                     | Safari                                                |            |       |            |               | no     |     |               | Metadata       |               |
| conversation\_metadata\_browser\_version           | string       | Browser version from Conversation Metadata                                                                                                                                                                                                                                                                                                                  | 14.1.2                                                |            |       |            |               | no     |     |               | Metadata       |               |
| contact\_journey\_contact\_id                      | string       | (NULLIFIED) Conversation Contact ID                                                                                                                                                                                                                                                                                                                         |                                                       |            |       |            |               | no     |     |               | Contact        |               |
| contact\_journey\_last\_conversation\_inactive\_ts | timestamp    | Last time the conversation went inactive (may be limited to voice conversations)                                                                                                                                                                                                                                                                            | 2023-06-11 18:45:29                                   |            |       |            |               | no     |     |               | Contact        |               |
| contact\_journey\_first\_contact\_utterance\_ts    | timestamp    | First utterance in the contact                                                                                                                                                                                                                                                                                                                              | 2023-06-11 18:32:21                                   |            |       |            |               | no     |     |               | Contact        |               |
| contact\_journey\_last\_contact\_utterance\_ts     | timestamp    | Last utterance in the contact                                                                                                                                                                                                                                                                                                                               | 2023-06-11 18:40:29                                   |            |       |            |               | no     |     |               | Contact        |               |
| contact\_journey\_contact\_start\_ts               | timestamp    | First event in the contact                                                                                                                                                                                                                                                                                                                                  | 2023-06-11 18:30:29                                   |            |       |            |               | no     |     |               | Contact        |               |
| contact\_journey\_contact\_end\_ts                 | timestamp    | Last event in the contact                                                                                                                                                                                                                                                                                                                                   | 2023-06-11 18:58:29                                   |            |       |            |               | no     |     |               | Contact        |               |
| aug\_metrics\_effective\_ts                        | timestamp    | Timestamp of the last augmentation metrics event                                                                                                                                                                                                                                                                                                            | "2023-08-09T19:21:34.224620050Z"                      |            |       |            |               | no     |     |               | AutoCompose    |               |
| augmented\_utterances\_ct                          |              | Count of all utterances that used any augmentation feature (excluding fluency)                                                                                                                                                                                                                                                                              | 100                                                   |            |       |            |               | no     |     |               | AutoCompose    |               |
| multiple\_augmentation\_features\_used\_ct         |              | Count utterances where multiple augmentation features (excluding fluency) were used                                                                                                                                                                                                                                                                         | 100                                                   |            |       |            |               | no     |     |               | AutoCompose    |               |
| autosuggest\_ct                                    |              | Count of utterances where only AutoSuggest augmentation is used (excluding fluency)                                                                                                                                                                                                                                                                         | 100                                                   |            |       |            |               | no     |     |               | AutoCompose    |               |
| autocomplete\_ct                                   |              | Count of utterances where only AutoComplete augmentation is used (excluding fluency)                                                                                                                                                                                                                                                                        | 100                                                   |            |       |            |               | no     |     |               | AutoCompose    |               |
| phrase\_autocomplete\_ct                           |              | Count of utterances where only Phrase AutoComplete augmentation is used (excluding fluency)                                                                                                                                                                                                                                                                 | 100                                                   |            |       |            |               | no     |     |               | AutoCompose    |               |
| custom\_drawer\_ct                                 |              | Count of utterances where only Custom Drawer augmentation is used (excluding fluency)                                                                                                                                                                                                                                                                       | 100                                                   |            |       |            |               | no     |     |               | AutoCompose    |               |
| custom\_insert\_ct                                 |              | Count of utterances where only Custom Insert augmentation is used (excluding fluency)                                                                                                                                                                                                                                                                       | 100                                                   |            |       |            |               | no     |     |               | AutoCompose    |               |
| global\_insert\_ct                                 |              | Count of utterances where only Global Insert augmentation is used (excluding fluency)                                                                                                                                                                                                                                                                       | 100                                                   |            |       |            |               | no     |     |               | AutoCompose    |               |
| unknown\_augmentation\_ct                          |              | Count of utterances where only an unidentified augmentation was used (excluding fluency)                                                                                                                                                                                                                                                                    | 100                                                   |            |       |            |               | no     |     |               | AutoCompose    |               |
| fluency\_apply\_ct                                 |              | Count of utterances where Fluency Apply augmentation is used                                                                                                                                                                                                                                                                                                | 100                                                   |            |       |            |               | no     |     |               | AutoCompose    |               |
| fluency\_undo\_ct                                  |              | Count of utterances where Fluency Undo augmentation is used                                                                                                                                                                                                                                                                                                 | 100                                                   |            |       |            |               | no     |     |               | AutoCompose    |               |
| message\_edits\_ct                                 | bigint       | Total accumulated sum of the number of characters entered or deleted by the user and not by augmentation, after the most recent augmentation that replaces all text in the composer (AUTOSUGGEST, AUTOCOMPLETE, CUSTOM\_DRAWER). If the agent selected a suggestion and sends without any changes, this number is 0.                                        | 100                                                   |            |       |            |               | no     |     |               | AutoCompose    |               |
| time\_to\_action\_seconds                          | float        | Total accumulated sum of the number of seconds between the agent sending their previous message and their first action for composing this message.                                                                                                                                                                                                          | 100                                                   |            |       |            |               | no     |     |               | AutoCompose    |               |
| crafting\_time\_seconds                            | float        | Total accumulated sum of the number of seconds between the agent's first action and last action for composing this message.                                                                                                                                                                                                                                 | 100                                                   |            |       |            |               | no     |     |               | AutoCompose    |               |
| dwell\_time\_seconds                               | float        | Total accumulated sum of the number of seconds between the agent's last action for composing this message and the message being sent                                                                                                                                                                                                                        | 100                                                   |            |       |            |               | no     |     |               | AutoCompose    |               |
| phrase\_autocomplete\_presented\_ct                | bigint       | Total accumulated sum of the number of phrase autocomplete suggestions presented to the agent. Resets when augmentation\_type resets                                                                                                                                                                                                                        | 100                                                   |            |       |            |               | no     |     |               | AutoCompose    |               |
| phrase\_autocomplete\_selected\_ct                 | bigint       | Total accumulated sum of the number of phrase autocomplete suggestions selected by the agent. Resets when augmentation\_type resets.                                                                                                                                                                                                                        | 100                                                   |            |       |            |               | no     |     |               | AutoCompose    |               |
| single\_intent\_effective\_ts                      | timestamp    | The timestamp of the last single intent event.                                                                                                                                                                                                                                                                                                              | 2019-11-08 14:00:07                                   |            |       |            |               | no     |     |               |                |               |
| single\_intent\_intent\_code                       | string       | Intent code                                                                                                                                                                                                                                                                                                                                                 | CHECK\_COVERAGE                                       |            |       |            |               | no     |     |               |                |               |
| single\_intent\_intent\_name                       | string       | Intent name                                                                                                                                                                                                                                                                                                                                                 | Check Coverage                                        |            |       |            |               | no     |     |               |                |               |
| single\_intent\_messages\_considered\_ct           | bigint       | How many utterances were consided to calculate a single intent code.                                                                                                                                                                                                                                                                                        | 2                                                     |            |       |            |               | no     |     |               |                |               |
| company\_marker                                    | string       | Identifier of the customer-company.                                                                                                                                                                                                                                                                                                                         | agnostic                                              |            |       |            |               | no     |     |               | Conversation   |               |
| dt                                                 | string       | Date string representing the date during which the conversation state happened.                                                                                                                                                                                                                                                                             | 2019-11-08                                            |            |       |            |               | no     |     |               | Conversation   |               |
| hr                                                 | string       | Hour string representing the hour during which the conversation state happened.                                                                                                                                                                                                                                                                             | 18                                                    |            |       |            |               | no     |     |               | Conversation   |               |

### Table: staging\_utterance\_state

This utterance-grain table contains insights for individual conversation messages. Each record in this dataset represents an individual utterance, or message, within a conversation. The table is populated daily and includes hour-level data for time zone conversion purposes.

**Sync Time:** 1d

**Unique Condition:** company\_marker, conversation\_id, message\_id

| Column                                       | Type         | Description                                                                                                                                                                                                                                                                                                                                                 | Example                              | Aggregates | Notes | Date Added | Date Modified | Ignore | PII | release state | Specific Use | Feature Group |
| :------------------------------------------- | :----------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------- | :--------- | :---- | :--------- | :------------ | :----- | :-- | :------------ | :----------- | :------------ |
| conversation\_id                             | string       | Unique identifier generated by the ASAPP application for the issue or conversation.                                                                                                                                                                                                                                                                         | ABC21352352                          |            |       |            |               | no     |     |               | Conversation |               |
| message\_id                                  | string       | This is the ULID id of a given message.                                                                                                                                                                                                                                                                                                                     | 01GASGE3WAG84BGARCS238Z0FG           |            |       |            |               | no     |     |               | Conversation |               |
| instance\_ts                                 | timestamp    | The time window of computed elements.  This window is usually 15 minutes or 1 hour depending on the generation time. Times are rounded down to the nearest interval (for a time of 12:34 and an interval of 15m, this is 12:30). As an example, for a 15 minute interval an instance\_ts of 12:30 implies events from 12:30 -> 12:45. All times are in UTC. | 2019-11-08 14:00:06.957000+00:00     |            |       |            |               | no     |     |               | Conversation |               |
| chat\_message\_event\_ts                     | timestamp    | The timestamp of the last chat\_message event.                                                                                                                                                                                                                                                                                                              | 2018-06-23 21:28:23                  |            |       |            |               | no     |     |               | Conversation |               |
| external\_conversation\_id                   | VARCHAR(255) | The issue or conversation id from the customer/client perspective.                                                                                                                                                                                                                                                                                          | ffe8a632-545f-4c2e-a0ae-c296e6ad4a22 |            |       |            |               | no     |     |               | Conversation |               |
| sender\_type                                 | string       | The type of sender.                                                                                                                                                                                                                                                                                                                                         | SENDER\_CUSTOMER                     |            |       |            |               | no     |     |               | Conversation |               |
| sender\_id                                   | string       | Unique identifier of the sender user.                                                                                                                                                                                                                                                                                                                       | ffe8a632-545f-4c2e-a0ae-c296e6ad4a25 |            |       |            |               | no     |     |               | Conversation |               |
| private\_message\_ct                         | bigint       | Number of private messages, a private message is only when it was between agents/admins not the customer.                                                                                                                                                                                                                                                   | 1                                    |            |       |            |               | no     |     |               | Conversation |               |
| tags                                         | string       | Key-value map of additional properties.                                                                                                                                                                                                                                                                                                                     | {}                                   |            |       |            |               | no     |     |               | Conversation |               |
| utterance\_augmentations\_effective\_ts      | timestamp    | The timestamp of the last utterance\_augmentations event.                                                                                                                                                                                                                                                                                                   | 2018-06-23 21:28:23                  |            |       |            |               | no     |     |               | AutoCompose  |               |
| augmentation\_type\_list                     | string       | DEPRECATED Type of augmentation used. If multiple augmentations were used, a comma-separated list of types.                                                                                                                                                                                                                                                 | AUTOSUGGEST,AUTOCOMPLETE             |            |       |            |               | no     |     |               | AutoCompose  |               |
| num\_edits\_ct                               | bigint       | Number of edits made to an augmented message.                                                                                                                                                                                                                                                                                                               | 2                                    |            |       |            |               | no     |     |               | AutoCompose  |               |
| selected\_suggestion\_text                   | string       | DEPRECATED The text inserted into the composer by the last augmentation that replaced all text (AUTOSUGGEST,                                                                                                                                                                                                                                                | Hi. How may I help you?              |            |       |            |               | no     |     |               | AutoCompose  |               |
| time\_to\_action\_seconds                    | float        | Number of seconds between the agent sending their previous message and their first action for composing                                                                                                                                                                                                                                                     | 3.286                                |            |       |            |               | no     |     |               | AutoCompose  |               |
| crafting\_time\_seconds                      | float        | Number of seconds between the agent's first action and last action for composing this message.                                                                                                                                                                                                                                                              | 0.0                                  |            |       |            |               | no     |     |               | AutoCompose  |               |
| dwell\_time\_seconds                         | float        | Number of seconds between the agent's last action for composing this message and the message being sent.                                                                                                                                                                                                                                                    | 0.844                                |            |       |            |               | no     |     |               | AutoCompose  |               |
| phrase\_autocomplete\_presented\_ct          | bigint       | Number of phrase autocomplete suggestions presented to the agent.                                                                                                                                                                                                                                                                                           | 1                                    |            |       |            |               | no     |     |               | AutoCompose  |               |
| phrase\_autocomplete\_selected\_ct           | bigint       | Number of phrase autocomplete suggestions selected by the agent.                                                                                                                                                                                                                                                                                            | 0                                    |            |       |            |               | no     |     |               | AutoCompose  |               |
| utterance\_message\_metrics\_effective\_ts   | timestamp    | The timestamp of the last utterance\_message\_metrics event.                                                                                                                                                                                                                                                                                                | 2018-06-23 21:28:23                  |            |       |            |               | no     |     |               | Conversation |               |
| utterance\_length                            | int          | Length of utterance message.                                                                                                                                                                                                                                                                                                                                | 13                                   |            |       |            |               | no     |     |               | Conversation |               |
| agent\_metadata\_effective\_ts               | timestamp    | The timestamp of the last agent\_metadata event.                                                                                                                                                                                                                                                                                                            | 2018-06-23 21:28:23                  |            |       |            |               | no     |     |               | Conversation |               |
| agent\_metadata\_external\_agent\_id         | string       | The external rep/agent identifier.                                                                                                                                                                                                                                                                                                                          | abc123                               |            |       |            |               | no     |     |               | Conversation |               |
| agent\_metadata\_event\_ts                   | timestamp    | The timestamp of when this event happened (system driven).                                                                                                                                                                                                                                                                                                  | 2018-06-23 21:28:23                  |            |       |            |               | no     |     |               | Conversation |               |
| agent\_metadata\_start\_ts                   | timestamp    | The timestamp of when the agent started.                                                                                                                                                                                                                                                                                                                    | 2018-06-23 21:28:23                  |            |       |            |               | no     |     |               | Conversation |               |
| agent\_metadata\_lob\_id                     | string       | Line of business id.                                                                                                                                                                                                                                                                                                                                        | lobId\_7                             |            |       |            |               | no     |     |               | Conversation |               |
| agent\_metadata\_lob\_name                   | string       | Line of business descriptive name.                                                                                                                                                                                                                                                                                                                          | lobName\_7                           |            |       |            |               | no     |     |               | Conversation |               |
| agent\_metadata\_group\_id                   | string       | Group id.                                                                                                                                                                                                                                                                                                                                                   | groupId\_7                           |            |       |            |               | no     |     |               | Conversation |               |
| agent\_metadata\_group\_name                 | string       | Group descriptive name.                                                                                                                                                                                                                                                                                                                                     | groupName\_7                         |            |       |            |               | no     |     |               | Conversation |               |
| agent\_metadata\_location                    | string       | Agent's supervisor Id.                                                                                                                                                                                                                                                                                                                                      | supervisorId\_7                      |            |       |            |               | no     |     |               | Conversation |               |
| agent\_metadata\_languages                   | string       | Agent's languages.                                                                                                                                                                                                                                                                                                                                          | `[{"value":"en-us"}]`                |            |       |            |               | no     |     |               | Conversation |               |
| agent\_metadata\_concurrency                 | int          | Number of issues that the agent can take at a time.                                                                                                                                                                                                                                                                                                         | 3                                    |            |       |            |               | no     |     |               | Conversation |               |
| agent\_metadata\_category\_label             | string       | An agent category label that indicates the types of workflows these agents have access to or problems they solve.                                                                                                                                                                                                                                           | categoryLabel\_7                     |            |       |            |               | no     |     |               | Conversation |               |
| agent\_metadata\_account\_access\_level      | string       | Agent levels mapping to the level of access they have to make changes to customer accounts.                                                                                                                                                                                                                                                                 | accountAccessLevel\_7                |            |       |            |               | no     |     |               | Conversation |               |
| agent\_metadata\_ranking                     | int          | Agent's rank.                                                                                                                                                                                                                                                                                                                                               | 2                                    |            |       |            |               | no     |     |               | Conversation |               |
| agent\_metadata\_vendor                      | string       | Agent's vendor.                                                                                                                                                                                                                                                                                                                                             | vendor\_7                            |            |       |            |               | no     |     |               | Conversation |               |
| agent\_metadata\_job\_title                  | string       | Agent's job title.                                                                                                                                                                                                                                                                                                                                          | jobTitle\_7                          |            |       |            |               | no     |     |               | Conversation |               |
| agent\_metadata\_job\_role                   | string       | Agent's role.                                                                                                                                                                                                                                                                                                                                               | jobRole\_7                           |            |       |            |               | no     |     |               | Conversation |               |
| agent\_metadata\_work\_shift                 | string       | The hours or shift name they work.                                                                                                                                                                                                                                                                                                                          | workShift\_7                         |            |       |            |               | no     |     |               | Conversation |               |
| agent\_metadata\_attributes\_attr\_01\_name  | string       | Name of the arbitrary attribute (not indexed or used internally, used as pass through).                                                                                                                                                                                                                                                                     | name                                 |            |       |            |               | no     |     |               | Conversation |               |
| agent\_metadata\_attributes\_attr\_01\_value | string       | Value of the arbitrary attribute (not indexed or used internally, used as pass through).                                                                                                                                                                                                                                                                    | attr1\_name                          |            |       |            |               | no     |     |               | Conversation |               |
| agent\_metadata\_attributes\_attr\_02\_name  | string       | Name of the arbitrary attribute (not indexed or used internally, used as pass through).                                                                                                                                                                                                                                                                     | name                                 |            |       |            |               | no     |     |               | Conversation |               |
| agent\_metadata\_attributes\_attr\_02\_value | string       | Value of the arbitrary attribute (not indexed or used internally, used as pass through).                                                                                                                                                                                                                                                                    | attr2\_name                          |            |       |            |               | no     |     |               | Conversation |               |
| agent\_metadata\_attributes\_attr\_03\_name  | string       | Name of the arbitrary attribute (not indexed or used internally, used as pass through).                                                                                                                                                                                                                                                                     | name                                 |            |       |            |               | no     |     |               | Conversation |               |
| agent\_metadata\_attributes\_attr\_03\_value | string       | Value of the arbitrary attribute (not indexed or used internally, used as pass through).                                                                                                                                                                                                                                                                    | attr3\_name                          |            |       |            |               | no     |     |               | Conversation |               |
| agent\_metadata\_attributes\_attr\_04\_name  | string       | Name of the arbitrary attribute (not indexed or used internally, used as pass through).                                                                                                                                                                                                                                                                     | name                                 |            |       |            |               | no     |     |               | Conversation |               |
| agent\_metadata\_attributes\_attr\_04\_value | string       | Value of the arbitrary attribute (not indexed or used internally, used as pass through).                                                                                                                                                                                                                                                                    | attr4\_name                          |            |       |            |               | no     |     |               | Conversation |               |
| agent\_metadata\_attributes\_attr\_05\_name  | string       | Name of the arbitrary attribute (not indexed or used internally, used as pass through).                                                                                                                                                                                                                                                                     | name                                 |            |       |            |               | no     |     |               | Conversation |               |
| agent\_metadata\_attributes\_attr\_05\_value | string       | Value of the arbitrary attribute (not indexed or used internally, used as pass through).                                                                                                                                                                                                                                                                    | attr5\_name                          |            |       |            |               | no     |     |               | Conversation |               |
| agent\_metadata\_attributes\_attr\_06\_name  | string       | Name of the arbitrary attribute (not indexed or used internally, used as pass through).                                                                                                                                                                                                                                                                     | name                                 |            |       |            |               | no     |     |               | Conversation |               |
| agent\_metadata\_attributes\_attr\_06\_value | string       | Value of the arbitrary attribute (not indexed or used internally, used as pass through).                                                                                                                                                                                                                                                                    | attr6\_name                          |            |       |            |               | no     |     |               | Conversation |               |
| agent\_metadata\_attributes\_attr\_07\_name  | string       | Name of the arbitrary attribute (not indexed or used internally, used as pass through).                                                                                                                                                                                                                                                                     | name                                 |            |       |            |               | no     |     |               | Conversation |               |
| agent\_metadata\_attributes\_attr\_07\_value | string       | Value of the arbitrary attribute (not indexed or used internally, used as pass through).                                                                                                                                                                                                                                                                    | attr7\_name                          |            |       |            |               | no     |     |               | Conversation |               |
| agent\_metadata\_attributes\_attr\_08\_name  | string       | Name of the arbitrary attribute (not indexed or used internally, used as pass through).                                                                                                                                                                                                                                                                     | name                                 |            |       |            |               | no     |     |               | Conversation |               |
| agent\_metadata\_attributes\_attr\_08\_value | string       | Value of the arbitrary attribute (not indexed or used internally, used as pass through).                                                                                                                                                                                                                                                                    | attr8\_name                          |            |       |            |               | no     |     |               | Conversation |               |
| agent\_metadata\_attributes\_attr\_09\_name  | string       | Name of the arbitrary attribute (not indexed or used internally, used as pass through).                                                                                                                                                                                                                                                                     | name                                 |            |       |            |               | no     |     |               | Conversation |               |
| agent\_metadata\_attributes\_attr\_09\_value | string       | Value of the arbitrary attribute (not indexed or used internally, used as pass through).                                                                                                                                                                                                                                                                    | attr9\_name                          |            |       |            |               | no     |     |               | Conversation |               |
| agent\_metadata\_attributes\_attr\_10\_name  | string       | Name of the arbitrary attribute (not indexed or used internally, used as pass through).                                                                                                                                                                                                                                                                     | name                                 |            |       |            |               | no     |     |               | Conversation |               |
| agent\_metadata\_attributes\_attr\_10\_value | string       | Value of the arbitrary attribute (not indexed or used internally, used as pass through).                                                                                                                                                                                                                                                                    | attr10\_name                         |            |       |            |               | no     |     |               | Conversation |               |
| augmented\_utterances\_ct                    | int          | Count of all utterances that used any augmentation feature (excluding fluency)                                                                                                                                                                                                                                                                              | 1                                    |            |       |            |               | no     |     |               | AutoCompose  |               |
| multiple\_augmentation\_features\_used\_ct   | int          | Count utterances where multiple augmentation features (excluding fluency) were used.                                                                                                                                                                                                                                                                        | 1                                    |            |       |            |               | no     |     |               | AutoCompose  |               |
| autosuggest\_ct                              | int          | Count of utterances where only AutoSuggest augmentation is used (excluding fluency)                                                                                                                                                                                                                                                                         | 1                                    |            |       |            |               | no     |     |               | AutoCompose  |               |
| autocomplete\_ct                             | int          | Count of utterances where only AutoComplete augmentation is used (excluding fluency)                                                                                                                                                                                                                                                                        | 1                                    |            |       |            |               | no     |     |               | AutoCompose  |               |
| phrase\_autocomplete\_ct                     | int          | Count of utterances where only Phrase AutoComplete augmentation is used (excluding fluency)                                                                                                                                                                                                                                                                 | 1                                    |            |       |            |               | no     |     |               | AutoCompose  |               |
| custom\_drawer\_ct                           | int          | Count of utterances where only Custom Drawer augmentation is used (excluding fluency)                                                                                                                                                                                                                                                                       | 1                                    |            |       |            |               | no     |     |               | AutoCompose  |               |
| custom\_insert\_ct                           | int          | Count of utterances where only Custom Insert augmentation is used (excluding fluency)                                                                                                                                                                                                                                                                       | 1                                    |            |       |            |               | no     |     |               | AutoCompose  |               |
| global\_insert\_ct                           | int          | Count of utterances where only Global Insert augmentation is used (excluding fluency)                                                                                                                                                                                                                                                                       | 1                                    |            |       |            |               | no     |     |               | AutoCompose  |               |
| unknown\_augmentation\_ct                    | int          | Count of utterances where only an unidentified augmentation was used (excluding fluency)                                                                                                                                                                                                                                                                    | 1                                    |            |       |            |               | no     |     |               | AutoCompose  |               |
| fluency\_apply\_ct                           | int          | Count of utterances where Fluency Apply augmentation is used                                                                                                                                                                                                                                                                                                | 1                                    |            |       |            |               | no     |     |               | AutoCompose  |               |
| fluency\_undo\_ct                            | int          | Count of utterances where Fluency Undo augmentation is used                                                                                                                                                                                                                                                                                                 | 1                                    |            |       |            |               | no     |     |               | AutoCompose  |               |
| company\_marker                              | string       | Identifier of the customer-company.                                                                                                                                                                                                                                                                                                                         | agnostic                             |            |       |            |               | no     |     |               | Conversation |               |
| dt                                           | string       | Date string representing the date during which the utterance state happened.                                                                                                                                                                                                                                                                                | 2018-06-23                           |            |       |            |               | no     |     |               | Conversation |               |
| hr                                           | string       | Hour string representing the hour during which the utterance state happened.                                                                                                                                                                                                                                                                                | 21                                   |            |       |            |               | no     |     |               | Conversation |               |

### Table: utterances

This S3 captures raw utterances, enabling customers to map message IDs and metadata to specific utterances. Each record in this feed represents an individual message within a conversation, providing utterance-level insights. The feed remains minimal and secure, including a comprehensive mapping of message IDs to their corresponding utterances, information not available in the utterance state file. For security purposes, this feed will only be accessible externally, retaining a maximum of 32 days of data before purging. The feed will be exported daily, with time-stamped data for time zone conversion.

**Sync Time:** 1d

**Unique Condition:** company\_marker, conversation\_id, message\_id

| Column                     | Type         | Description                                                                                                                                                                                                                                                                                                                                                 | Example                              | Aggregates | Notes | Date Added | Date Modified | Ignore | PII | release state | Specific Use | Feature Group |
| :------------------------- | :----------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------- | :--------- | :---- | :--------- | :------------ | :----- | :-- | :------------ | :----------- | :------------ |
| conversation\_id           | string       | Unique identifier generated by the ASAPP application for the issue or conversation.                                                                                                                                                                                                                                                                         | ABC21352352                          |            |       |            |               | no     |     |               | Conversation |               |
| message\_id                |              | This is the ULID id of a given message.                                                                                                                                                                                                                                                                                                                     | 01GASGE3WAG84BGARCS238Z0FG           |            |       |            |               | no     |     |               | Conversation |               |
| instance\_ts               | timestamp    | The time window of computed elements.  This window is usually 15 minutes or 1 hour depending on the generation time. Times are rounded down to the nearest interval (for a time of 12:34 and an interval of 15m, this is 12:30). As an example, for a 15 minute interval an instance\_ts of 12:30 implies events from 12:30 -> 12:45. All times are in UTC. | 2019-11-08 14:00:06.957000+00:00     |            |       |            |               | no     |     |               | Conversation |               |
| chat\_message\_event\_ts   |              | The timestamp of the last chat\_message event.                                                                                                                                                                                                                                                                                                              | 2018-06-23 21:28:23                  |            |       |            |               | no     |     |               | Conversation |               |
| external\_conversation\_id | VARCHAR(255) | The issue or conversation id from the customer/client perspective.                                                                                                                                                                                                                                                                                          | ffe8a632-545f-4c2e-a0ae-c296e6ad4a22 |            |       |            |               | no     |     |               | Conversation |               |
| utterance                  |              | Text of the utterance message.                                                                                                                                                                                                                                                                                                                              | Hello, I need to talk to an agent    |            |       |            |               | no     |     |               | Conversation |               |
| company\_marker            | string       | Identifier of the customer-company.                                                                                                                                                                                                                                                                                                                         | agnostic                             |            |       |            |               | no     |     |               | Conversation |               |
| dt                         | string       | Date string representing the date during which the utterance state happened.                                                                                                                                                                                                                                                                                | 2018-06-23                           |            |       |            |               | no     |     |               | Conversation |               |
| hr                         | string       | Hour string representing the hour during which the utterance state happened.                                                                                                                                                                                                                                                                                | 21                                   |            |       |            |               | no     |     |               | Conversation |               |

<Note> Last Updated: 2025-01-16 06:37:08 UTC </Note>


# Metadata Ingestion API
Source: https://docs.asapp.com/reporting/metadata-ingestion

Learn how to send metadata via Metadata Ingestion API.

Customers with AI Services implementations use ASAPP's Metadata Ingestion API to send key attributes about conversations, customers, and agents. Metadata can be joined with AI Service output data to sort and filter reports and analyses using attributes important to your business.

<Note>
  Metadata Ingestion API is not accessible by default. Reach out to your ASAPP account contact to ensure it is enabled for your implementation.
</Note>

## Before You Begin

ASAPP provides an AI Services [Developer Portal](/getting-started/developers). Within the portal, developers can:

* Access relevant API documentation (e.g., OpenAPI reference schemas)
* Access API keys for authorization
* Manage user accounts and apps

In order to use ASAPP's APIs, all apps must be registered through the portal. Once registered, each app will be provided unique API keys for ongoing use.

<Tip>
  Visit the [Get Started](/getting-started/developers) page on the Developer Portal for instructions on creating a developer account, managing teams and apps, and setup for using AI Service APIs.
</Tip>

## Endpoints

The Metadata Ingestion endpoints are used to send information about agents, conversations, and customers. Metadata can be sent for a single entity (e.g., one agent) or for multiple entities at once (e.g., several hundred agents) in a batch format.

### Agent

The OpenAPI specification for each agent endpoint shows the types of metadata that are accepted. Examples include information about lines of business, groups, locations, supervisors, languages spoken, vendor, job role, and email.

The endpoints also accept custom-defined `attributes` in key-value pairs if no existing field in the schema suits the type of metadata you wish to upload.

* [`POST /metadata-ingestion/v1/single-agent-metadata`](/apis/metadata/add-an-agent-metadata)
  * Use this endpoint to add metadata for a single agent.

* [`POST /metadata-ingestion/v1/many-agent-metadata`](/apis/metadata/add-multiple-agent-metadata)
  * Use this endpoint to add metadata for a batch of agents all at once.

### Conversation

The OpenAPI specification for each conversation endpoint shows the types of metadata that are accepted. Examples include unique identifiers, lines of business, group and subdivision identifiers, routing codes, associated campaigns and business rules, browser and device information.

The endpoints also accept custom-defined `attributes` in key-value pairs if no existing field in the schema suits the type of metadata you wish to upload.

* [`POST /metadata-ingestion/v1/single-convo-metadata`](/apis/metadata/add-a-conversation-metadata)
  * Use this endpoint to add metadata for a single conversation.

* [`POST /metadata-ingestion/v1/many-convo-metadata`](/apis/metadata/add-multiple-conversation-metadata)
  * Use this endpoint to add metadata for a batch of conversations all at once.

### Customer

The OpenAPI specification for each customer endpoint shows the types of metadata that are accepted. Examples include unique identifiers, statuses, contact details, and location information.

The endpoints also accept custom-defined `attributes` in key-value pairs if no existing field in the schema suits the type of metadata you wish to upload.

* [`POST /metadata-ingestion/v1/single-customer-metadata`](/apis/metadata/add-a-customer-metadata)
  * Use this endpoint to add metadata for a single customer.

* [`POST /metadata-ingestion/v1/many-customer-metadata`](/apis/metadata/add-multiple-customer-metadata)
  * Use this endpoint to add metadata for a batch of customers all at once.


# Building a Real-Time Event API
Source: https://docs.asapp.com/reporting/real-time-event-api

Learn how to implement ASAPP's real-time event API to receive activity, journey, and queue state updates.

ASAPP provides real-time access to events, enabling customers to power internal use cases.

Typical use cases that benefit from real-time ASAPP events include:

* Tracking the end-user journey through ASAPP
* Supporting workforce management needs
* Integrating with customer-maintained CRM systems

ASAPP's real-time events provide raw data. Complex processing, such as aggregation or deduplication, is handled by batch analytics and reporting.

ASAPP presently supports three real-time event feeds:

1. **Activity**: Agent status change events, for tracking schedule adherence
2. **Journey**: Events denoting milestones in a conversation, for tracking the customer journey
3. **Queue State**: Updates on queues for tracking size and estimated wait times

In order to utilize these available real-time events, a customer will need to configure an API endpoint service under the customer's control. The balance of this document provides information about the high-level tasks a customer will need to accomplish in order to receive real-time events from ASAPP, as well as further information on the events available from ASAPP.

## Architecture Discussion

Upon a customer's request, ASAPP can provide several types of real-time event data.

<Note>
  Note that ASAPP can separately enhance standard real-time events to accommodate specific customer requirements. Such enhancements would usually be specified and implemented as part of ASAPP's regular product development process.
</Note>

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-2d5ba1ef-2f1f-b9be-e56a-83915c699934.png" alt="Data-ERTAPI-Arch" />
</Frame>

The diagram above provides a high-level view of how a customer-maintained service that receives real-time ASAPP events might be designed; a service that runs on ASAPP-controlled infrastructure will push real-time event data to one or more HTTP endpoints maintained by the customer. For each individual event, the ASAPP service makes one POST request to the endpoint.

Event data will be transmitted using mTLS-based authentication (See the separate document [Securing Endpoints with Mutual TLS](/reporting/secure-data-retrieval#certificate-configuration) for details).

### Customer Requirements

* The customer must implement a POST API endpoint to handle the event messages.
* The customer and ASAPP must develop the mTLS authentication integration to secure the API endpoint
* All ASAPP real-time "raw" events will post to the same endpoint; the customer is expected to filter the received events to their needs based on name and event type.
* Each ASAPP real-time "processed" reporting feed can be configured to post to one arbitrary endpoint, at the customer's specified preference (i.e., each feed can post to a separate URI, or each can post to the same URI, or any combination required by the customer's use case.)

It should be noted that real-time events do not implement the de-duplication and grouping of ASAPP's batch reporting feeds; rather these real-time events provide building blocks for the customer to aggregate and build on. When making use of ASAPP's real-time events, the customer will be responsible for grouping, de-duplication, and aggregation of related events as required by the customer's particular use case. The events include metadata fields to facilitate such tasks.

### Endpoint Sizing

The endpoint configured by the customer should provisioned with sufficient scale to receive events at the rate generated by the customer's ASAPP implementation. As a rule of thumb, customers can expect:

* A voice call will generate on the order of 100 events per issue
* A text chat will generate on the order of 10 events per issue

So, for example, if the customer's application services 1000 issues per minute, that customer should expect their endpoint to receive 10,000 -- 100,000 messages per minute, or on the order of 1,000 messages per second.

### Endpoint Configuration

ASAPP can configure its service with the following parameters:

* **url:** The destination URL of the customer API endpoint that is set up to handle POST http requests.
* **timeout\_ms:** The number of milliseconds to wait for a HTTP 200 "OK" response before timing out.
* **retries:** The number of times to retry to send a message after a failed delivery.
* **(optional)event\_list:** List of `event_types` to send.

<Note>
  If `event_type` is empty it will default to send all events for this feed.
  List the necessary `event_type` to reduce unnecessary traffic.
</Note>

If the number of retries is exceeded and the customer's API is unable to handle any particular message, that message will be dropped. Real-time information lost in this way will typically be available in historical reporting feeds.

## Real-time Overview

ASAPP's standard real-time events include data representing human interactions and general issue lifecycle information from the ASAPP feeds named `com.asapp.event.activity`, `com.asapp.event.journey`, and `com.asapp.event.queue`.

In the future, when additional event sources are added, the event source will be reflected in the name of the stream.

## Payload Schema

Each of ASAPP's feeds will deliver a single event's data in a payload comprised of a two-level JSON object. The delivered payload includes:

1. Routing metadata at the top level common to all events.
   *A small set of fields that should always be present for all events, used for routing, filtering, and deduplication.*
2. Metadata common to all events.
   *These fields should usually be present for all events to provide meta-information on the event. Some fields may be omitted if they do not apply to the specific feed.*
3. Data specific to the event feed.
   *Some fields may be omitted but the same total set can be expected for each event of the same origin*
4. Details specific to the event type.

Null fields will be omitted -- the customer's API is expected to interpret missing keys as null.

**Versioning**

Minor-versions upgrades to the events are expected to be backwards-compatible; major-version updates typically include an interface-breaking change that may require the customer to update their API in order to take advantage of new features.

## Activity Feed

The agent activity feed provides a series of events for agent login and status changes. ASAPP processes the event data minimally before pushing it into the `activity` feed to:

* Convert internal flags to meaningful human-readable strings
* Filter the feed to include only data fields of potential interest to the customer

<Note>
  ASAPP's `activity` feed does not implement complex event processing (e.g., aggregation based on time windows, groups of events, de-duplication, or system state tracking). Any required aggregation or deduplication should be executed by the customer after receiving `activity` events.
</Note>

### Sample Event JSON

```json
{
  "api_version": "v1.3.0",
  "name": "com.asapp.event.activity",
  "meta_data": {
    "create_time": "2022-06-21T20:10:24.411Z",
    "event_time": "2022-06-21T20:10:24.411Z",
    "session_id": "string",
    "issue_id": "string",
    "company_subdivision": "string",
    "company_id": "string",
    "company_segments": [
      "string"
    ],
    "client_id": "string",
    "client_type": "SMS"
  },
  "data": {
    "rep_id": "string",
    "desk_mode": "UNKNOWN",
    "rep_name": "string",
    "agent_given_name": "string",
    "agent_family_name": "string",
    "agent_display_name": "string",
    "external_rep_id": "string",
    "max_slots": 0,
    "queue_ids": [
      "string"
    ],
    "queue_names": [
      "string"
    ]
  },
  "event_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "event_type": "UNKNOWN",
  "details": {
    "status_updated_ts": "2022-06-21T20:10:24.411Z",
    "status_description": "string",
    "routing_status_updated_ts": "2022-06-21T20:10:24.411Z",
    "routing_status": "UNKNOWN",
    "assignment_load_updated_ts": "2022-06-21T20:10:24.411Z",
    "assigned_customer_ct": 0,
    "previous_routing_status_updated_ts": "2022-06-21T20:10:24.411Z",
    "previous_routing_status": "UNKNOWN",
    "previous_routing_status_duration_sec": 0,
    "previous_routing_status_start_ts": "2022-06-21T20:10:24.411Z",
    "utilization_5_min_updated_ts": "2022-06-21T20:10:24.411Z",
    "utilization_5_min_window_start_ts": "2022-06-21T20:10:24.411Z",
    "utilization_5_min_window_end_ts": "2022-06-21T20:10:24.411Z",
    "utilization_5_min_any_status": {
      "linear_sec": 0,
      "linear_utilized_sec": 0,
      "cumulative_sec": 0,
      "cumulative_utilized_sec": 0
    },
    "utilization_5_min_active": {
      "linear_sec": 0,
      "linear_utilized_sec": 0,
      "cumulative_sec": 0,
      "cumulative_utilized_sec": 0
    },
    "utilization_5_min_away": {
      "linear_sec": 0,
      "linear_utilized_sec": 0,
      "cumulative_sec": 0,
      "cumulative_utilized_sec": 0
    },
    "utilization_5_min_offline": {
      "linear_sec": 0,
      "linear_utilized_sec": 0,
      "cumulative_sec": 0,
      "cumulative_utilized_sec": 0
    },
    "utilization_5_min_wrapping_up": {
      "linear_sec": 0,
      "linear_utilized_sec": 0,
      "cumulative_sec": 0,
      "cumulative_utilized_sec": 0
    }
  }
}
```

### Field Explanations

| Field                   | Description                                                                                                          |
| :---------------------- | :------------------------------------------------------------------------------------------------------------------- |
| api\_version            | Major and minor version of the API, compatible with the base major version                                           |
| name                    | Source of this event stream - use for filtering / routing                                                            |
| event\_type             | Event type within the stream - use for filtering / routing                                                           |
| event\_id               | Unique ID of an event, used to identify identical duplicate events                                                   |
| meta\_data.create\_time | UTC creation time of this message                                                                                    |
| meta\_data.event\_time  | UTC time the event happened within the system - usually some ms before create time                                   |
| meta\_data.session\_id  | Customer-side identifier to link events together based on customer session. May be null for system-generated events. |
| meta\_data.client\_id   | May include client type, device, and version, if present in the event headers                                        |
| data.rep\_id            | Internal ASAPP identifier of an agent                                                                                |
| details                 | These fields vary based on the individual event type - only fields relevant to the event type will be present        |

<Note>
  Adding the `event_list` filter in the configuration allows the receiver of the real-time feed to indicate for which event types they want to receive an Activity message.

  This message will still contain all the fields that have been populated, as the events are being accumulated in the Activity message for that same `rep_id`.

  For example: If the `event_list` contains only `agent_activity_status_updated`, the Activity messages will still contain all the fields (`status_description`, `routing_status`, `previous_routing_status`, `assigned_customer_ct`, `utilization_5_min_active`, etc), but will only be sent whenever the agent status was updated.
</Note>

### Event Types

* `agent_activity_identity_updated`
* `agent_activity_status_updated`
* `agent_activity_capacity_updated`
* `agent_activity_assignment_load_updated`
* `agent_activity_routing_status_updated`
* `agent_activity_previous_routing_status`
* `agent_activity_queue_membership`
* `agent_activity_utilization_5_min`

## Journey Feed

The customer journey feed tracks important events in the customer's interaction with ASAPP. ASAPP processes the event data before pushing it into the `journey` feed to:

* Collect conversation and session events into a single feed of the customer journey
* Add metadata properties to the events to assist with contextualizing the events

<Note>
  This feature is available only for ASAPP Messaging.
</Note>

<Note>
  ASAPP's `journey` feed does not implement aggregation. Any aggregation or deduplication required by the customer's use case will need to be executed by the customer after receiving `journey` events.
</Note>

### Sample Event JSON

```json
{
    "api_version": "string",
    "name": "com.asapp.event.journey",
    "meta_data": {
      "create_time": "2024-08-06T13:57:43.053Z",
      "event_time": "2024-08-06T13:57:43.053Z",
      "session_id": "string",
      "issue_id": "string",
      "company_subdivision": "string",
      "company_id": "string",
      "company_segments": [
        "string"
      ],
      "client_id": "string",
      "client_type": "UNKNOWN"
    },
    "data": {
      "customer_id": "string",
      "opportunity_origin": "UNKNOWN",
      "opportunity_id": "string",
      "queue_id": "string",
      "session_id": "string",
      "session_type": "string",
      "user_id": "string",
      "user_type": "string",
      "session_update_ts": "2024-08-06T13:57:43.053Z",
      "agent_id": "string",
      "agent_name": "string",
      "agent_given_name": "string",
      "agent_family_name": "string",
      "agent_display_name": "string",
      "queue_name": "string",
      "external_agent_id": "string"
    },
    "event_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "event_type": "ISSUE_CREATED",
    "details": {
      "issue_start_ts": "2024-08-06T13:57:43.053Z",
      "intent_code": "string",
      "business_intent_code": "string",
      "flow_node_type": "string",
      "flow_node_name": "string",
      "intent_code_path": "string",
      "business_intent_code_path": "string",
      "flow_name_path": "string",
      "business_flow_name_path": "string",
      "issue_ended_ts": "2024-08-06T13:57:43.053Z",
      "survey_responses": [
        {
          "question": "string",
          "question_category": "string",
          "question_type": "string",
          "answer": "string",
          "ordering": 0
        }
      ],
      "survey_submit_ts": "2024-08-06T13:57:43.053Z",
      "last_flow_action_called_ts": "2024-08-06T13:57:43.053Z",
      "last_flow_action_called_node_name": "string",
      "last_flow_action_called_action_id": "string",
      "last_flow_action_called_version": "string",
      "last_flow_action_called_inputs": {
        "additionalProp1": {
          "value": "string",
          "value_type": "VALUE_TYPE_UNKNOWN"
        },
        "additionalProp2": {
          "value": "string",
          "value_type": "VALUE_TYPE_UNKNOWN"
        },
        "additionalProp3": {
          "value": "string",
          "value_type": "VALUE_TYPE_UNKNOWN"
        }
      },
      "detected_ts": "2024-08-06T13:57:43.053Z",
      "escalated_ts": "2024-08-06T13:57:43.053Z",
      "queued_ts": "2024-08-06T13:57:43.053Z",
      "assigned_ts": "2024-08-06T13:57:43.053Z",
      "abandoned_ts": "2024-08-06T13:57:43.053Z",
      "queued_ms": 0,
      "opportunity_ended_ts": "2024-08-06T13:57:43.053Z",
      "ended_type": "string",
      "assigment_ended_ts": "2024-08-06T13:57:43.053Z",
      "handle_ms": 0,
      "is_ghost_customer": true,
      "last_agent_utterance_ts": "2024-08-06T13:57:43.053Z",
      "agent_utterance_ct": 0,
      "agent_first_response_ms": 0,
      "timeout_ts": "2024-08-06T13:57:43.053Z",
      "last_customer_utterance_ts": "2024-08-06T13:57:43.053Z",
      "customer_utterance_ct": 0,
      "is_resolved": true,
      "customer_ended_ts": "2024-08-06T13:57:43.053Z",
      "customer_params_field_01": "string",
      "customer_params_field_02": "string",
      "customer_params_field_03": "string",
      "customer_params_field_04": "string",
      "customer_params_field_05": "string",
      "customer_params_field_06": "string",
      "customer_params_field_07": "string",
      "customer_params_field_08": "string",
      "customer_params_field_09": "string",
      "customer_params_field_10": "string",
      "customer_params_key_name_01": "string",
      "customer_params_key_name_02": "string",
      "customer_params_key_name_03": "string",
      "customer_params_key_name_04": "string",
      "customer_params_key_name_05": "string",
      "customer_params_key_name_06": "string",
      "customer_params_key_name_07": "string",
      "customer_params_key_name_08": "string",
      "customer_params_key_name_09": "string",
      "customer_params_key_name_10": "string",
      "uploaded_files_list": [
            {
                "file_upload_event_id": "string",
                "file_upload_ts": "2024-10-03T12:30:55.123Z",
                "file_name": "string",
                "file_mime_type": "UNKNOWN",
                "file_size_mb": 0,
                "file_image_width": 0,
                "file_image_height": 0
            }
      ]
    }
  }
```

### Field Explanations

| Field                           | Description                                                                                            |
| :------------------------------ | :----------------------------------------------------------------------------------------------------- |
| api\_version                    | Major and minor version of the API, compatible with the base major version                             |
| name                            | Source of this event stream - use for filtering / routing                                              |
| event\_type                     | Event type within the stream - use for filtering / routing                                             |
| event\_id                       | Unique ID of an event, used to identify identical duplicate events                                     |
| meta\_data.create\_time         | UTC creation time of this message                                                                      |
| meta\_data.event\_time          | UTC time the event happened within the system - usually some ms before create time                     |
| meta\_data.session\_id          | Customer-side identifier to link events together based on customer session                             |
| meta\_data.issue\_id            | ASAPP internal tracking of a conversation - used to tie events together in the ASAPP system            |
| meta\_data.company\_subdivision | Filtering metadata                                                                                     |
| meta\_data.company\_segments    | Filtering metadata                                                                                     |
| meta\_data.client\_id           | May include client type, device, and version                                                           |
| data.customer\_id               | Internal ASAPP identifier of the customer                                                              |
| data.rep\_id                    | Internal ASAPP identifier of an agent. Will be null if no rep is assigned                              |
| data.group\_id                  | Internal ASAPP identifier of a company group or queue. Will be null if not routed to a group of agents |
| details                         | The details of the event. All details are omitted when empty                                           |

### Event Types

* `ISSUE_CREATED`
* `ISSUE_ENDED`
* `INTENT_CHANGE`
* `FIRST_INTENT_UPDATED`
* `INTENT_PATH_UPDATED`
* `NODE_VISITED`
* `LINK_RESOLVED`
* `FLOW_SUCCESS`
* `FLOW_SUCCESS_NEGATED`
* `END_SRS_RESPONSE`
* `SURVEY_SUBMITTED`
* `CONVERSATION_ENDED`
* `CUSTOMER_ENDED`
* `ISSUE_SESSION_UPDATED`
* `DETECTED`
* `OPPORTUNITY_ENDED`
* `OPPORTUNITY_ESCALATED`
* `QUEUED`
* `QUEUE_ABANDONED`
* `TIMED_OUT`
* `TEXT_MESSAGE`
* `FIRST_OPPORTUNITY`
* `QUEUED_DURATION`
* `CUSTOMER_RESPONSE_BY_OPPORTUNITY`
* `ISSUE_OPPORTUNITY_QUEUE_INFO_UPDATED`
* `ASSIGNED`
* `ASSIGNMENT_ENDED`
* `AGENT_RESPONSE_BY_OPPORTUNITY`
* `SUPERVISOR_UTTERANCE_BY_OPPORTUNITY`
* `AGENT_FIRST_RESPONDED`
* `ISSUE_ASSIGNMENT_AGENT_INFO_UPDATED`
* `LAST_FLOW_ACTION_CALLED`
* `JOURNEY_CUSTOMER_PARAMETERS`
* `FILE_UPLOAD_DETECTED`

<Note>
  Adding the `event_list` filter in the configuration allows the receiver of the real-time feed to indicate for which event types they want to receive a Journey message.

  This message will still contain all the fields that have been populated, as the events are being accumulated in the Journey message for that same `issue_id`.

  Example: if the `event_list` contains only `SURVEY_SUBMITTED` the Journey messages will still contain all the fields (`issue_start_ts`, `assigned_ts`, `survey_responses`, etc), but will only be sent whenever the survey submitted event happens.
</Note>

## Queue State Feed

The queue state feed provides a set of events describing the state of a queue over the course of time. ASAPP processes the event data before pushing it into the `queue` feed to:

* Collect queue volume, queue time and queue hours events into a single feed of the queue state
* Add metadata properties to the events to assist with contextualizing the events

<Note>
  ASAPP's `queue` feed does not implement aggregation. Any aggregation or deduplication required by the customer's use case will need to be executed by the customer after receiving `queue` events.
</Note>

### Sample Event JSON

```json
{
  "api_version": "v1.3.0",
  "name": "com.asapp.event.queue",
  "meta_data": {
    "create_time": "2022-06-21T20:02:54.418Z",
    "event_time": "2022-06-21T20:02:54.418Z",
    "session_id": "string",
    "issue_id": "string",
    "company_subdivision": "string",
    "company_id": "string",
    "company_segments": [
      "string"
    ],
    "client_id": "string",
    "client_type": "SMS"
  },
  "data": {
    "queue_id": "string",
    "queue_name": "string",
    "business_hours_time_zone_offset_minutes": 0,
    "business_hours_time_zone_name": "string",
    "business_hours_start_minutes": [
      0
    ],
    "business_hours_end_minutes": [
      0
    ],
    "holiday_closed_dates": [
      "2022-06-21T20:02:54.418Z"
    ],
    "queue_capping_enabled": true,
    "queue_capping_estimated_wait_time_seconds": "Unknown Type: float",
    "queue_capping_size": 0,
    "queue_capping_fallback_size": 0
  },
  "event_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "event_type": "UNKNOWN",
  "details": {
    "last_queue_size": 0,
    "last_queue_size_ts": "2022-06-21T20:02:54.418Z",
    "last_queue_size_update_type": "UNKNOWN",
    "estimated_wait_time_updated_ts": "2022-06-21T20:02:54.418Z",
    "estimated_wait_time_seconds": "Unknown Type: float",
    "estimated_wait_time_is_available": true
  }
}
```

### Field Explanations

| Field                                               | Description                                                                                                                                                    |
| :-------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| api\_version                                        | Major and minor version of the API, compatible with the base major version                                                                                     |
| name                                                | Source of this event stream - use for filtering / routing                                                                                                      |
| meta\_data.create\_time                             | UTC creation time of this message                                                                                                                              |
| meta\_data.event\_time                              | UTC time the event happened within the system - usually some ms before create time                                                                             |
| meta\_data.session\_id                              | Customer-side identifier to link events together based on customer session. May be null for system-generated events.                                           |
| meta\_data.issue\_id                                | ASAPP internal tracking of a conversation - used to tie events together in the ASAPP system                                                                    |
| meta\_data.company\_subdivision                     | Filtering metadata                                                                                                                                             |
| meta\_data.company\_id                              | The short name used to uniquely identify the company associated with this event. This will be constant for any feed integration.                               |
| meta\_data.company\_segments                        | Filtering metadata                                                                                                                                             |
| meta\_data.client\_id                               | May include client type, device, and version                                                                                                                   |
| meta\_data.client\_type                             | The lower-cardinality, more general classification of the client used for the customer interaction                                                             |
| data.queue\_id                                      | Internal ASAPP ID for this queue                                                                                                                               |
| data.queue\_name                                    | The name of the queue                                                                                                                                          |
| data.business\_hours\_time\_zone\_offset\_minutes   | The number of minutes offset from UTC for calculating or displaying business hours                                                                             |
| data.business\_hours\_time\_zone\_name              | A time zone name used for display or lookup                                                                                                                    |
| data.business\_hours\_start\_minutes                | A list of offsets (in minutes from Sunday at 0:00) that correspond to the time the queue transitions from closed to open                                       |
| data.business\_hours\_end\_minutes                  | Same as business\_hours\_start\_minutes but for the transition from open to closed                                                                             |
| data.holiday\_closed\_dates                         | A list of dates currently configured as holidays                                                                                                               |
| data.queue\_capping\_enabled                        | Indicates if any queue capping is applied when enqueueing issues                                                                                               |
| data.queue\_capping\_estimated\_wait\_time\_seconds | If the estimated wait time exceeds this threshold (in seconds), the queue will be capped. Zero is no threshold.                                                |
| data.queue\_capping\_size                           | If the queue size is greater than or equal to this threshold, the queue will be capped. Zero is no threshold. This applies independent of estimated wait time. |
| data.queue\_capping\_fallback\_size                 | If there is no estimated wait time and the queue size is greater than or equal to this threshold, the queue will be capped. Zero is no threshold.              |
| event\_id                                           | Unique ID of an event, used to identify identical duplicate events                                                                                             |
| event\_type                                         | Event type within the stream - use for filtering / routing                                                                                                     |
| details.last\_queue\_size                           | The latest size of the queue                                                                                                                                   |
| details.last\_queue\_size\_ts                       | Time when the latest queue size update happened                                                                                                                |
| details.last\_queue\_size\_update\_type             | The reason for the latest queue size change                                                                                                                    |
| details.estimated\_wait\_time\_updated\_ts          | Time when the estimate was last updated                                                                                                                        |
| details.estimated\_wait\_time\_seconds              | The number of seconds a user at the end of the queue can expect to wait                                                                                        |
| details.estimated\_wait\_time\_is\_available        | Indicates if there is enough data to provide an estimate                                                                                                       |

### Event Types

* `queue_info_updated`
* `queue_size_updated`
* `queue_estimated_wait_time_updated`
* `business_hours_settings_updated`
* `holiday_settings_updated`
* `queue_capping_settings_updated`
* `queue_mitigation_updated`
* `queue_availability_updated`


# Retrieving Data for ASAPP Messaging
Source: https://docs.asapp.com/reporting/retrieve-messaging-data

Learn how to retrieve data from ASAPP Messaging

ASAPP provides secure access to your messaging application data through SFTP (Secure File Transfer Protocol).

The data exported will need to be [deduplicated](#removing-duplicate-data) before importing into your system.

<Note>
  If you're retrieving data from ASAPP's AI Services, use [File Exporter](/reporting/file-exporter) instead.
</Note>

## Download Data via SFTP

To download data from ASAPP via SFTP, you need to:

<Steps>
  <Step title="Generate a SSH key pair">
    You need to generate a SSH key pair and share the public key with ASAPP.

    <Accordion title="Generating a SSH key pair">
      If you don't have one already, you can generate one using the ssh-keygen command.

      ```bash
      ssh-keygen -b 4096
      ```

      This will walk you creating a key pair.
    </Accordion>

    Share your `<keyname>.pub` file with your ASAPP team.
  </Step>

  <Step title="Connect to SFTP server">
    To connect to the SFTP server, you will need to use the following information:

    * Host: `prod-data-sftp.asapp.com`
    * Port: `22`
    * Username: `sftp{company name}`
      <Note>
        If you are unsure what your company name is, please reach out to your ASAPP account team.
      </Note>

    You should not use a password for SSH directly as you will be using the SSH key pair to authenticate.

    <Note>
      If you have a passphrase on your SSH key, you will need to enter it when prompted.
    </Note>
  </Step>

  <Step title="Download data">
    Once connected, you can download or upload files. The folder structure and file names have a naming standard indicating the feed type and time of export, and other relevant information:

    <Tabs>
      <Tab title="Path Structure">
        `/FEED_NAME/version=VERSION_NUMBER/format=FORMAT_NAME/dt=DATE/hr=HOUR/mi=MINUTE/DATAFILE(S)`

        | Path Element    | Description                                                                                                                                       |
        | :-------------- | :------------------------------------------------------------------------------------------------------------------------------------------------ |
        | **FEED\_NAME**  | The name of the table, extract, feed, etc.                                                                                                        |
        | **version**     | The version of the feed at hand. Changes whenever the schema, meaning of a column, etc., changes in a way that could break existing integrations. |
        | **format**      | The format of the exported data. Almost always, this will be JSON Lines.\*                                                                        |
        | **dt**          | The YYYY-MM-DD formatted date corresponding to the exported data.                                                                                 |
        | **hr**          | The hour of the day the data was exported.                                                                                                        |
        | **mi**          | The minute of the hour the data was exported.                                                                                                     |
        | **DATAFILE(s)** | The filename or filenames of the exported feed partition.                                                                                         |

        <Note>
          It is possible to have duplicate entries within a given data feed for a given day. You need to [remove duplicates](#removing-duplicate-data) before importing it.
        </Note>
      </Tab>

      <Tab title="File Naming">
        File names that correspond to an exported feed partition will have names in the following form:

        `\{FEED_NAME\}\{FORMAT\}\{SPLIT_NUMBER\}.\{COMPRESSION\}.\{ENCRYPTION\}`

        | File name element | Description                                                                                                                                                                                                                                                                                                                                                 |
        | :---------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
        | **FEED\_NAME**    | The feed name from which this partition is exported.                                                                                                                                                                                                                                                                                                        |
        | **FORMAT**        | .jsonl                                                                                                                                                                                                                                                                                                                                                      |
        | **SPLIT\_NUMBER** | (optional) In the event that a particular partition's export needs to be split across multiple physical files in order to accommodate file size constraints, each split file will be suffixed with a dot followed by a two-digit incrementing sequence. If the whole partition can fit in a single file, no SPLIT\_NUMBER will be present in the file name. |
        | **COMPRESSION**   | (optional) .gz will be appended to the file name if the file is gzip compressed.                                                                                                                                                                                                                                                                            |
        | **ENCRYPTION**    | (optional) In the atypical case where a file written to the SFTP store is doubly encrypted, the filename will have a .enc extension.                                                                                                                                                                                                                        |
      </Tab>
    </Tabs>

    ### Verifying the Data Export is Complete

    New Export files are continuously being generated depending on the feed and the export schedule. You can check the `_SUCCESS` file to verify that the export is complete.

    Upon completing the generating for a particular partition, ASAPP will create an EMPTY file named `_SUCCESS` to the same path as the export file or files. This `_SUCCESS` file acts as a flag indicating that the generation for the associated partition is complete. A `_SUCCESS` file will be written even if there is no available data selected for export for the partition at hand.

    Until the `_SUCCESS` file is created, ASAPP's export is in progress and you should not import the associated data file. You should check for this file before downloading any data partition.

    ### General Data Formatting Notes

    All ASAPP exports are formatted as follows:

    * Files are in [JSON Lines format](http://jsonlines.org/).
    * ASAPP export files are UTF-8 encoded.
    * Control characters are escaped.
    * Files are formatted with Unix-style line endings.
  </Step>
</Steps>

## Removing Duplicate Data

ASAPP continuously generates data, which means newer files may contain updated versions of previously exported records. To ensure you're working with the most up-to-date information, you need to remove duplicate data by keeping only the latest version of each record and discarding older duplicates.

To remove duplicates from the feeds, download the latest instance of a feed, and use the **Unique Conditions** as the "primary key" for that feed.

Each table's unique conditions are listed in the relevant [feed schema](/reporting/asapp-messaging-feeds).

### Example

In order to remove duplicates from the table [`convos_metrics`](/reporting/asapp-messaging-feeds#table-convos-metrics), use this query:

```sql
SELECT *
FROM
    (SELECT
    *,
    ROW_NUMBER() OVER (partition by {{ primary_key }} order by {{ logical_timestamp}} DESC, {{ insertion_timestamp }} DESC) as row_idx
    FROM convos_metrics
    )
WHERE row_idx = 1
```

We partition by the `primary_key` for that table and get the latest data using order by `logical_timestamp`DESC in the subquery. Then we only select where `row_idx` = 1 to only pull the latest information we have for each `issue_id`.

### Schema Adjustments

We will occasionally extend the schema of an existing feed to add new columns. Your system should be able to handle these changes gracefully.

We will communicate any changes to the schema via your ASAPP account team.

You can also enable automated schema evolution detection and identify any changes using `export_docs.yaml`, which is generated each day and sent via the S3 feed. By incorporating this into the workflows, you can maintain a proactive stance, ensuring uninterrupted service and a smooth transition in the event of schema adjustments.

## Export Schema

We publish a [schema for each feed](/reporting/asapp-messaging-feeds). These schemas include the unique conditions for each table that you can use to remove duplicates from your data.

<Note>
  If you are retrieving data from Standalone Services, you need to use [File Exporter](/reporting/file-exporter).
</Note>


# Secure Data Retrieval
Source: https://docs.asapp.com/reporting/secure-data-retrieval

Learn how to set up secure communication between ASAPP and your real-time event API.

# Secure Data Retrieval

Communication between ASAPP and a customer's real-time event API endpoint is secured using TLS, specifically Mutual-TLS (mTLS). This document provides details on the expected configuration of the mTLS-secured connection between ASAPP and the customer application.

## Overview

Mutual TLS requires that both server and client authenticate using digital certificates. The mTLS-secured integration with ASAPP relies on public certificate authorities (CAs). In this scenario, clients and servers host certificates issued by trusted public CAs (like Digicert, Symantec, etc.).

## Certificate Configuration

To further secure the connection, ASAPP requires the following additional configurations:

1. ASAPP's client certificate will contain a unique identifier in the "Subject" field. Customers can use this identifier to confirm that the presented certificate is from a legitimate ASAPP service. This identifier will be based on client identification conventions mutually agreed upon by ASAPP and the customer (e.g., UUIDs, namespaces).

2. Both server and client certificates will have validities of less than 3 years, in accordance with industry best practices.

3. Server certificates must have the "Extended Key Usage" field support "TLS Web Server Authentication" only. Client certificates must have the "Extended Key Usage" field support "TLS Web Client Authentication" only.

4. Minimum key sizes for client/server certificates should be:
   * 3072-bit for RSA
   * 256-bit for AES

## TLS/HTTPS Settings

REST endpoints must only support TLSv1.3 when setting up HTTPS connections. Older versions support weak ciphers that can be broken if a sufficient number of packets are captured.

### Supported Ciphers

Ensure that only the following ciphers (or equivalent) are supported by each endpoint:

* TLS\_ECDHE\_ECDSA\_WITH\_AES\_256\_GCM\_SHA384
* TLS\_ECDHE\_RSA\_WITH\_AES\_128\_GCM\_SHA256
* TLS\_ECDHE\_RSA\_WITH\_AES\_256\_GCM\_SHA384
* TLS\_ECDHE\_ECDSA\_WITH\_CHACHA20\_POLY1305\_SHA256
* TLS\_ECDHE\_ECDSA\_WITH\_CHACHA20\_POLY1305
* TLS\_ECDHE\_RSA\_WITH\_CHACHA20\_POLY1305\_SHA256
* TLS\_ECDHE\_RSA\_WITH\_CHACHA20\_POLY1305

### Session Limits

TLS settings should limit each session to a short period. TLS libraries like OpenSSL set this to 300 seconds by default, which is sufficiently secure. A short session limits the usage of per-session AES keys, preventing potential brute-force analysis by attackers who capture session packets.

<Note>
  Qualys provides a free tool called SSLTest ([https://www.ssllabs.com/ssltest/](https://www.ssllabs.com/ssltest/)) to check for common issues in server TLS configuration. We recommend using this tool to test your public TLS endpoints before deploying to production.
</Note>


# Transmitting Data via S3
Source: https://docs.asapp.com/reporting/send-s3



S3 is the supported mechanism for ongoing data transmissions, though can also be used for one-time transfers where needed. ASAPP customers can transmit the following types of data to S3:

* Call center data attributes
* Conversation transcripts from messaging or voice interactions
* Recorded call audio files
* Sales records with attribution metadata

## Getting Started

### Your Target S3 Buckets

ASAPP will provide you with a set of S3 buckets to which you may securely upload your data files, as well as a dedicated set of credentials authorized to write to those buckets. See the next section for more on those credentials.

For clarity, ASAPP name buckets use the following convention:

`s3://asapp-\{env\}-\{company_name\}-imports-\{aws-region\}`

<table class="informaltable frame-void rules-rows">
  <thead>
    <tr>
      <th class="th leftcol"><p>Key</p></th>
      <th class="th leftcol"><p>Description</p></th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td class="td leftcol"><p>env</p></td>
      <td class="td leftcol"><p>Environment (prod, pre\_prod, test)</p></td>
    </tr>

    <tr>
      <td class="td leftcol"><p>company\_name</p></td>

      <td class="td leftcol">
        <p>The company name: acme, duff, stark\_industries, etc.</p>
        <p><strong>Note:</strong> company name should not have spaces within.</p>
      </td>
    </tr>

    <tr>
      <td class="td leftcol"><p>aws-region</p></td>

      <td class="td leftcol">
        <p>us-east-1</p>
        <p><strong>Note:</strong> this is the current region supported for your ASAPP instance.</p>
      </td>
    </tr>
  </tbody>
</table>

So, for example, an S3 bucket set up to receive pre-production data from ACME would be named:

`s3://asapp-pre_prod-acme-imports-us-east-1`

#### S3 Target for Historical Transcripts

ASAPP has a distinct target location for sending historical transcripts for AI Services and will provide an exclusive access folder to which transcripts should be uploaded. The S3 bucket location follows this naming convention:

`asapp-customers-sftp-\{env\}-\{aws-region\}`

Values for `env` and `aws-region` are set in the same way as above. As an example, an S3 bucket to receive transcripts for use in production is named:

`asapp-customers-sftp-prod-us-east-1`

<Note>
  See the [Historical Transcript File Structure](/reporting/send-s3#historical-transcript-file-structure "Historical Transcript File Structure") section more information on how to format transcript files for transmission.
</Note>

### Encryption

ASAPP ensures that the data you write to your dedicated S3 buckets is encrypted in transit using TLS/SSL and encrypted at rest using AES256.

### Your Dedicated Export AWS Credentials

ASAPP will provide you with a set of AWS credentials that allow you to securely upload data to your designated S3 buckets. (Since you need write access in order to upload data to S3, you'll need to use a different set of credentials than the read-only credentials you might already have.)

In order for ASAPP to securely send credentials to you, you must provide ASAPP with a public GPG key that we can use to encrypt a file containing those credentials.

<Note>
  GitHub provides one of many good available  tutorials on GPG key generation here: [https://help.github.com/en/articles/generating-a-new-gpg-key](https://help.github.com/en/articles/generating-a-new-gpg-key) .
</Note>

It's safe to send your public GPG key to ASAPP using any available channel. Please do NOT provide ASAPP with your private key.

Once you've provided ASAPP with your public GPG key, we'll forward to you an expiring https link pointing to an S3-hosted file containing credentials that have permissions to write to your dedicated S3 target buckets.

<Caution>
  ASAPP's standard practice is to have these links expire after 24 hours.
</Caution>

The file itself will be encrypted using your public GPG key. Once you decrypt the provided file using your private GPG key, your credentials will be contained within a tab delimited file with the following structure:

`id     secret      bucket     sub-folder (if any)`

## Data File Formatting and Preparation

**General Requirements:**

* Files should be UTF-8 encoded.
* Control characters should be escaped.
* You may provide files as CSV or JSONL format, but we strongly recommend JSONL where possible. (CSV files are just too fragile.)
* If you send a CSV file, ASAPP recommends that you include a header. Otherwise, your CSV must provide columns in the exact order listed below.
* When providing a CSV file, you must provide an explicit null value (as the unquoted string: `NULL` ) for missing or empty values.

### Call Center Data File Structure

The table below shows the required fields to include in your uploaded call center data.

<table class="informaltable frame-void rules-rows">
  <thead>
    <tr>
      <th class="th leftcol"><p>FIELD NAME</p></th>
      <th class="th leftcol"><p>REQUIRED?</p></th>
      <th class="th leftcol"><p>FORMAT</p></th>
      <th class="th leftcol"><p>EXAMPLE</p></th>
      <th class="th leftcol"><p>NOTES</p></th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td class="td leftcol"><p><strong>customer\_id</strong></p></td>
      <td class="td leftcol"><p>Yes</p></td>
      <td class="td leftcol"><p>String</p></td>
      <td class="td leftcol"><p>347bdddb-d3a1-45fc-bbcd-dbd3a175fc1c</p></td>
      <td class="td leftcol"><p>External User ID. This is a hashed version of the client ID.</p></td>
    </tr>

    <tr>
      <td class="td leftcol"><p><strong>conversation\_id</strong></p></td>
      <td class="td leftcol"><p>No</p></td>
      <td class="td leftcol"><p>String</p></td>
      <td class="td leftcol"><p>21352352</p></td>
      <td class="td leftcol"><p>If filled in, should map to ASAPP's system.  May be empty, if the customer has not had a conversation with ASAPP.</p></td>
    </tr>

    <tr>
      <td class="td leftcol"><p><strong>call\_start</strong></p></td>
      <td class="td leftcol"><p>Yes</p></td>
      <td class="td leftcol"><p>Timestamp</p></td>
      <td class="td leftcol"><p>2020-01-03T20:02:13Z</p></td>
      <td class="td leftcol"><p>ISO 8601 formatted UTC timestamp.  Time/date call is received by the system.</p></td>
    </tr>

    <tr>
      <td class="td leftcol"><p><strong>call\_end</strong></p></td>
      <td class="td leftcol"><p>Yes</p></td>
      <td class="td leftcol"><p>Timestamp</p></td>
      <td class="td leftcol"><p>2020-01-03T20:02:13Z</p></td>

      <td class="td leftcol">
        <p>ISO 8601 formatted UTC timestamp.  Time/date call ends.</p>
        <p><strong>Note:</strong> duration of call should be Call End - Call Start.</p>
      </td>
    </tr>

    <tr>
      <td class="td leftcol"><p><strong>call\_assigned\_to\_agent</strong></p></td>
      <td class="td leftcol"><p>No</p></td>
      <td class="td leftcol"><p>Timestamp</p></td>
      <td class="td leftcol"><p>2020-01-03T20:02:13Z</p></td>
      <td class="td leftcol"><p>ISO 8601 formatted UTC timestamp. The date/time the call was answered by the agent.</p></td>
    </tr>

    <tr>
      <td class="td leftcol"><p><strong>customer\_type</strong></p></td>
      <td class="td leftcol"><p>No</p></td>
      <td class="td leftcol"><p>String</p></td>
      <td class="td leftcol"><p>Wireless Premier</p></td>
      <td class="td leftcol"><p>Customer account classification by client.</p></td>
    </tr>

    <tr>
      <td class="td leftcol"><p><strong>survey\_offered</strong></p></td>
      <td class="td leftcol"><p>No</p></td>
      <td class="td leftcol"><p>Bool</p></td>
      <td class="td leftcol"><p>true/false</p></td>
      <td class="td leftcol"><p>Whether a survey was offered or not.</p></td>
    </tr>

    <tr>
      <td class="td leftcol"><p><strong>survey\_taken</strong></p></td>
      <td class="td leftcol"><p>No</p></td>
      <td class="td leftcol"><p>Bool</p></td>
      <td class="td leftcol"><p>true/false</p></td>
      <td class="td leftcol"><p>When a survey was offered, whether it was completed or not.</p></td>
    </tr>

    <tr>
      <td class="td leftcol"><p><strong>survey\_answer</strong></p></td>
      <td class="td leftcol"><p>No</p></td>
      <td class="td leftcol"><p>String</p></td>

      <td class="td leftcol" />

      <td class="td leftcol"><p>Survey answer</p></td>
    </tr>

    <tr>
      <td class="td leftcol"><p><strong>toll\_free\_number</strong></p></td>
      <td class="td leftcol"><p>No</p></td>
      <td class="td leftcol"><p>String</p></td>
      <td class="td leftcol"><p>888-929-1467</p></td>

      <td class="td leftcol">
        <p>Client phone number (toll free number) used to call in that allows for tracking different numbers, particularly ones referred directly by SRS.</p>
        <p>If websource or click to call, the web campaign is passed instead of TFN.</p>
      </td>
    </tr>

    <tr>
      <td class="td leftcol"><p><strong>ivr\_intent</strong></p></td>
      <td class="td leftcol"><p>No</p></td>
      <td class="td leftcol"><p>String</p></td>
      <td class="td leftcol"><p>Power Outage</p></td>
      <td class="td leftcol"><p>Phone pathing logic for routing to the appropriate agent group or providing self-service resolution. Could be multiple values.</p></td>
    </tr>

    <tr>
      <td class="td leftcol"><p><strong>ivr\_resolved</strong></p></td>
      <td class="td leftcol"><p>No</p></td>
      <td class="td leftcol"><p>Bool</p></td>
      <td class="td leftcol"><p>true/false</p></td>
      <td class="td leftcol"><p>Caller triggered a self-service response from the IVR and then disconnected.</p></td>
    </tr>

    <tr>
      <td class="td leftcol"><p><strong>ivr\_abandoned</strong></p></td>
      <td class="td leftcol"><p>No</p></td>
      <td class="td leftcol"><p>Bool</p></td>
      <td class="td leftcol"><p>true/false</p></td>
      <td class="td leftcol"><p>Caller disconnected without receiving a self-service response from IVR nor being placed in live agent queue.</p></td>
    </tr>

    <tr>
      <td class="td leftcol"><p><strong>agent\_queue\_assigned</strong></p></td>
      <td class="td leftcol"><p>No</p></td>
      <td class="td leftcol"><p>String</p></td>
      <td class="td leftcol"><p>Wireless Sales</p></td>
      <td class="td leftcol"><p>Agent group/agent skill group (aka queue name)</p></td>
    </tr>

    <tr>
      <td class="td leftcol"><p><strong>time\_in\_queue</strong></p></td>
      <td class="td leftcol"><p>No</p></td>
      <td class="td leftcol"><p>Integer</p></td>
      <td class="td leftcol"><p>600</p></td>
      <td class="td leftcol"><p>Seconds caller waits in queue to be assigned to an agent.</p></td>
    </tr>

    <tr>
      <td class="td leftcol"><p><strong>queue\_abandoned</strong></p></td>
      <td class="td leftcol"><p>No</p></td>
      <td class="td leftcol"><p>Bool</p></td>
      <td class="td leftcol"><p>true/false</p></td>
      <td class="td leftcol"><p>Caller disconnected after being assigned to a live agent queue but before being assigned to an agent.</p></td>
    </tr>

    <tr>
      <td class="td leftcol"><p><strong>call\_handle\_time</strong></p></td>
      <td class="td leftcol"><p>No</p></td>
      <td class="td leftcol"><p>Integer</p></td>
      <td class="td leftcol"><p>650</p></td>
      <td class="td leftcol"><p>Call duration in seconds from call assignment event to call disconnect event.</p></td>
    </tr>

    <tr>
      <td class="td leftcol"><p><strong>call\_wrap\_time</strong></p></td>
      <td class="td leftcol"><p>No</p></td>
      <td class="td leftcol"><p>Integer</p></td>
      <td class="td leftcol"><p>30</p></td>
      <td class="td leftcol"><p>Duration in seconds from call disconnect event to end of agent wrap event.</p></td>
    </tr>

    <tr>
      <td class="td leftcol"><p><strong>transfer</strong></p></td>
      <td class="td leftcol"><p>No</p></td>
      <td class="td leftcol"><p>String</p></td>
      <td class="td leftcol"><p>Sales Group</p></td>
      <td class="td leftcol"><p>Agent queue name if call was transferred. NA or Null value for calls not transferred.</p></td>
    </tr>

    <tr>
      <td class="td leftcol"><p><strong>disposition\_category</strong></p></td>
      <td class="td leftcol"><p>No</p></td>
      <td class="td leftcol"><p>String</p></td>
      <td class="td leftcol"><p>Change plan</p></td>
      <td class="td leftcol"><p>Categorical outcome selection from agent. Alternatively, could be category like 'Resolved', 'Unresolved', 'Transferred', 'Referred'.</p></td>
    </tr>

    <tr>
      <td class="td leftcol"><p><strong>disposition\_notes</strong></p></td>
      <td class="td leftcol"><p>No</p></td>
      <td class="td leftcol"><p>String</p></td>

      <td class="td leftcol" />

      <td class="td leftcol"><p>Notes from agent regarding the disposition of the call.</p></td>
    </tr>

    <tr>
      <td class="td leftcol"><p><strong>transaction\_completed</strong></p></td>
      <td class="td leftcol"><p>No</p></td>
      <td class="td leftcol"><p>String</p></td>
      <td class="td leftcol"><p>Upgrade Completed, Payment Processed</p></td>
      <td class="td leftcol"><p>Name of transaction type completed by call agent on behalf of customer. Could contain multiple delimited values. May not be available for all agents.</p></td>
    </tr>

    <tr>
      <td class="td leftcol"><p><strong>caller\_account\_value</strong></p></td>
      <td class="td leftcol"><p>No</p></td>
      <td class="td leftcol"><p>Decimal</p></td>
      <td class="td leftcol"><p>129.45</p></td>
      <td class="td leftcol"><p>Current account value of customer.</p></td>
    </tr>
  </tbody>
</table>

### Historical Transcript File Structure

ASAPP accepts uploads for historical conversation transcripts for both voice calls and chats.

The fields described below must be the columns in your uploaded .CSV table.

Each row in the uploaded .CSV table should correspond to one sent message.

| FIELD NAME                   | REQUIRED? | FORMAT    | EXAMPLE                          | NOTES                                             |
| :--------------------------- | :-------- | :-------- | :------------------------------- | :------------------------------------------------ |
| **conversation\_externalId** | Yes       | String    | 3245556677                       | Unique identifier for the conversation            |
| **sender\_externalId**       | Yes       | String    | 6433421                          | Unique identifier for the sender of the message   |
| **sender\_role**             | Yes       | String    | agent                            | Supported values are 'agent', 'customer' or 'bot' |
| **text**                     | Yes       | String    | Happy to help, one moment please | Message from sender                               |
| **timestamp**                | Yes       | Timestamp | 2022-03-16T18:42:24.488424Z      | ISO 8601 formatted UTC timestamp                  |

<Note>
  Proper transcript formatting and sampling ensures data is usable for model training. Please ensure transcripts conform to the following:

  **Formatting**

  * Each utterance is clearly demarcated and sent by one identified sender
  * Utterances are in chronological order and complete, from beginning to very end of the conversation
  * Where possible, transcripts include the full content of the conversation rather than an abbreviated version. For example, in a digital messaging conversation:

  <table class="informaltable frame-void rules-rows">
    <thead>
      <tr>
        <th class="th"><p>Full</p></th>
        <th class="th"><p>Abbreviated</p></th>
      </tr>
    </thead>

    <tbody>
      <tr>
        <td class="td">
          <p><strong>Agent</strong>: Choose an option from the list below</p>
          <p><strong>Agent</strong>: (A) 1-way ticket (B) 2-way ticket (C) None of the above</p>
          <p><strong>Customer</strong>: (A) 1-way ticket</p>
        </td>

        <td class="td">
          <p><strong>Agent</strong>: Choose an option from the list below</p>
          <p><strong>Customer</strong>: (A)</p>
        </td>
      </tr>
    </tbody>
  </table>

  **Sampling**

  * Transcripts are from a wide range of dates to avoid seasonality effects; random sampling over a 12-month period is recommended
  * Transcripts mimic the production conversations on which models will be used - same types of participants, same channel (voice, messaging), same business unit
  * There are no duplicate transcripts
</Note>

**Transmitting Transcripts to S3**

Historical transcripts are sent to a distinct S3 target separate from other data imports.

<Note>
  Please refer to the [S3 Target for Historical Transcripts](/reporting/send-s3#your-target-s3-buckets "Your Target S3 Buckets") section for details.
</Note>

### Sales Methods & Attribution Data File Structure

The table below shows the required fields to be included in your uploaded sales methods and attribution data.

| FIELD NAME                        | REQUIRED? | FORMAT    | EXAMPLE                               | NOTES                                                                                                                                                                                                                    |
| :-------------------------------- | :-------- | :-------- | :------------------------------------ | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **transaction\_id**               | Yes       | String    | 1d71dce2-a50c-11ea-bb37-0242ac130002  | An identifier which is unique within the customer system to track this transaction.                                                                                                                                      |
| **transaction\_time**             | Yes       | Timestamp | 2007-04-05T14:30:05.123Z              | ISO 8601 formatted UTC timestamp. Details potential duplicates and also attribute to the right period of time                                                                                                            |
| **transaction\_value\_one\_time** | No        | Float     | 65.25                                 | Single value of initial purchase.                                                                                                                                                                                        |
| **transaction\_value\_recurring** | No        | Float     | 7.95                                  | Recurring value of subscription purchase.                                                                                                                                                                                |
| **customer\_category**            | No        | String    | US                                    | Custom category value per client.                                                                                                                                                                                        |
| **customer\_subcategory**         | No        | String    | wireless                              | Custom subcategory value per client.                                                                                                                                                                                     |
| **external\_customer\_id**        | No        | String    | 34762720001                           | External User ID. This is hashed version of the client ID. In order to attribute to ASAPP metadata, one of these will be required (Customer ID or Conversation ID)                                                       |
| **issue\_id**                     | No        | String    | 1E10412200CC60EEABBF32                | IF filled in, should map to ASAPP's system. May be empty, if the customer has not had a conversation with ASAPP. In order to attribute to ASAPP metadata, one of these will be required (Customer ID or Conversation ID) |
| **external\_session\_id**         | Yes       | String    | 1a09ff6d-3d07-45dc-8fa9-4936bfc4e3e5  | External session id so we can track a customer                                                                                                                                                                           |
| **product\_category**             | No        | String    | Wireless Internet                     | Category of product purchased.                                                                                                                                                                                           |
| **product\_subcategory**          | No        | String    | Broadband                             | Subcategory of product purchased.                                                                                                                                                                                        |
| **product\_name**                 | No        | String    | Broadband Gold Package                | The name of the product.                                                                                                                                                                                                 |
| **product\_id**                   | No        | String    | WI-BBGP                               | The identifier of the product.                                                                                                                                                                                           |
| **product\_quantity**             | Yes       | Integer   | 1                                     | A number indicating the quantity of the product purchased.                                                                                                                                                               |
| **product\_value\_one\_time**     | No        | Float     | 60.00                                 | Value of the product for one time purchase.                                                                                                                                                                              |
| **product\_value\_recurring**     | No        | Float     | 55.00                                 | Value of the product for recurring purchase.                                                                                                                                                                             |

## Uploading Data to S3

At a high level, uploading your data is a three step process:

1. Build and format your files for upload, as detailed above.
2. Construct a "target path" for those files following the convention in the section "Constructing your Target Path" below.
3. Signal the completion of your upload by writing an empty \_SUCCESS file to your "target path", as described in the section "Signaling that your upload is complete" below.

### Constructing your target path

ASAPP's automation will use the S3 filename of your upload when deciding how to process your data file, where the filename is formatted as follows:

`s3://BUCKET_NAME/FEED_NAME/version=VERSION_NUMBER/format=FORMAT_NAME/dt=DATE/hr=HOUR/mi=MINUTE/DATAFILE_NAME(S)`

The following table details the convention that ASAPP follows when handling uploads:

### Signaling that Your Upload Is Complete

Upon completing a data upload, you must upload an EMPTY file named \_SUCCESS to the same path as your uploaded file, as a flag that indicates your data upload is complete. Until this file is uploaded, ASAPP will assume that the upload is in progress and will not import the associated data file.

As an example, let's say you're uploading one day of call center data in a set of files.

### Incremental and Snapshot Modes

You may provide data to ASAPP as either Incremental or Snapshot data. The value you provide us in the `format` field discussed above, tells ASAPP whether to treat the data you provide as Incremental or Snapshot data.

When importing data using **Incremental** mode, ASAPP will **append** the given data to the existing data imported for that `FEED_NAME`. When you specify **Incremental** mode, you are telling ASAPP that for a given date, the data which was uploaded is for that day only.  If you use the value `dt=2018-09-02` in your constricted filename, you are indicating that the data contained in that file includes records from `2018-09-02 00:00:00 UTC` → `2018-09-02 23:59:59 UTC`.

When importing data using **Snapshot** mode, ASAPP will **replace** any existing data for the indicated `FEED_NAME` with the contents of the uploaded file. When you specify **Snapshot** mode, ASAPP treats the uploaded data as a complete record from "the time history started" until that particular day end.  A date of `2018-09-02` means the data includes, effectively, all things from `1970-01-01 00:00:00 UTC` → `2018-09-02 23:59:59 UTC`.

### Other Upload Notes and Tips

1. Make sure the structure for the imported file (whether columnar or json formatted) matches the current import standards (see below for details)
2. Data imports are scheduled daily, 4 hours after UTC midnight (for the previous day's data)
3. In the event that you upload historical data (i.e., from older dates than are currently in the system), please inform your ASAPP team so a complete re-import can be scheduled.
4. Snapshot data must go into a format=snapshot\_\{type} folder.
5. Providing a Snapshot allows you to provide all historical data at once.  In effect, this reloads the entire table rather than appending data as in the non-snapshot case.

### Upload Example

The example below assumes a shell terminal with python 2.7+ installed.

```json
# install aws cli (assumes python)
pip install awscli
# configure your S3 credentials if not already done
aws configure
# push the files for 2019-01-20 for the call_center_issues import
# for a company named `umbrella-corp` to your local drive in production
aws s3 cp /location/of/your/file.csv s3://asapp-prod-umbrella-corp-imports-us-east-1/call_center_issues/version=1/format=csv/dt=2019-01-20/
aws s3 cp _SUCCESS s3://asapp-prod-umbrella-corp-imports-us-east-1/call_center_issues/version=1/format=csv/dt=2019-01-20/
# you should see some files now in the s3 location
aws s3 ls s3://asapp-prod-umbrella-corp-imports-us-east-1/call_center_issues/version=1/format=csv/dt=2019-01-20/
    file.csv
    _SUCCESS
```


# Transmitting Data to SFTP
Source: https://docs.asapp.com/reporting/send-sftp



SFTP is the supported mechanism for **one-time data transmissions**, typically used for sending training data files during the implementation phase prior to initial launch. ASAPP customers can transmit the following types of training data via SFTP:

* Conversation transcripts from messaging or voice interactions
* Recorded call audio files
* Free-text agent notes associated with messaging or voice interactions

## Getting Started

ASAPP will require you to provide the following information to set up the SFTP site.

* An SSH public key.  This should use RSA encryption with a key length of 4096 bits.

ASAPP will provide you a username to associate with the key. This will be of the form: `sftp<company marker>` where the company marker will be selected by ASAPP.  For example a username could be: `sftptestcompany`

In your network, open port 22 outbound to sftp.us-east-1.asapp.com.

## Data File Formatting and Preparation

**General Requirements:**

* Files should be UTF-8 encoded.
* Control characters should be escaped.
* You may provide files as CSV or JSONL format, but we strongly recommend JSONL where possible. (CSV files are just too fragile.)
* If you send a CSV file, ASAPP recommends that you include a header. Otherwise, your CSV must provide columns in the exact order listed below.
* When providing a CSV file, you must provide an explicit null value (as the unquoted string: `NULL` ) for missing or empty values.

### Call Center Data File Structure

The table below shows the required fields to include in your uploaded call center data.

<table class="informaltable frame-void rules-rows">
  <thead>
    <tr>
      <th class="th leftcol"><p>FIELD NAME</p></th>
      <th class="th leftcol"><p>REQUIRED?</p></th>
      <th class="th leftcol"><p>FORMAT</p></th>
      <th class="th leftcol"><p>EXAMPLE</p></th>
      <th class="th leftcol"><p>NOTES</p></th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td class="td leftcol"><p><strong>customer\_id</strong></p></td>
      <td class="td leftcol"><p>Yes</p></td>
      <td class="td leftcol"><p>String</p></td>
      <td class="td leftcol"><p>347bdddb-d3a1-45fc-bbcd-dbd3a175fc1c</p></td>
      <td class="td leftcol"><p>External User ID. This is a hashed version of the client ID.</p></td>
    </tr>

    <tr>
      <td class="td leftcol"><p><strong>conversation\_id</strong></p></td>
      <td class="td leftcol"><p>No</p></td>
      <td class="td leftcol"><p>String</p></td>
      <td class="td leftcol"><p>21352352</p></td>
      <td class="td leftcol"><p>If filled in, should map to ASAPP's system.  May be empty, if the customer has not had a conversation with ASAPP.</p></td>
    </tr>

    <tr>
      <td class="td leftcol"><p><strong>call\_start</strong></p></td>
      <td class="td leftcol"><p>Yes</p></td>
      <td class="td leftcol"><p>Timestamp</p></td>
      <td class="td leftcol"><p>2020-01-03T20:02:13Z</p></td>
      <td class="td leftcol"><p>ISO 8601 formatted UTC timestamp.  Time/date call is received by the system.</p></td>
    </tr>

    <tr>
      <td class="td leftcol"><p><strong>call\_end</strong></p></td>
      <td class="td leftcol"><p>Yes</p></td>
      <td class="td leftcol"><p>Timestamp</p></td>
      <td class="td leftcol"><p>2020-01-03T20:02:13Z</p></td>

      <td class="td leftcol">
        <p>ISO 8601 formatted UTC timestamp.  Time/date call ends.</p>
        <p><strong>Note:</strong> duration of call should be Call End - Call Start.</p>
      </td>
    </tr>

    <tr>
      <td class="td leftcol"><p><strong>call\_assigned\_to\_agent</strong></p></td>
      <td class="td leftcol"><p>No</p></td>
      <td class="td leftcol"><p>Timestamp</p></td>
      <td class="td leftcol"><p>2020-01-03T20:02:13Z</p></td>
      <td class="td leftcol"><p>ISO 8601 formatted UTC timestamp. The date/time the call was answered by the agent.</p></td>
    </tr>

    <tr>
      <td class="td leftcol"><p><strong>customer\_type</strong></p></td>
      <td class="td leftcol"><p>No</p></td>
      <td class="td leftcol"><p>String</p></td>
      <td class="td leftcol"><p>Wireless Premier</p></td>
      <td class="td leftcol"><p>Customer account classification by client.</p></td>
    </tr>

    <tr>
      <td class="td leftcol"><p><strong>survey\_offered</strong></p></td>
      <td class="td leftcol"><p>No</p></td>
      <td class="td leftcol"><p>Bool</p></td>
      <td class="td leftcol"><p>true/false</p></td>
      <td class="td leftcol"><p>Whether a survey was offered or not.</p></td>
    </tr>

    <tr>
      <td class="td leftcol"><p><strong>survey\_taken</strong></p></td>
      <td class="td leftcol"><p>No</p></td>
      <td class="td leftcol"><p>Bool</p></td>
      <td class="td leftcol"><p>true/false</p></td>
      <td class="td leftcol"><p>When a survey was offered, whether it was completed or not.</p></td>
    </tr>

    <tr>
      <td class="td leftcol"><p><strong>survey\_answer</strong></p></td>
      <td class="td leftcol"><p>No</p></td>
      <td class="td leftcol"><p>String</p></td>

      <td class="td leftcol" />

      <td class="td leftcol"><p>Survey answer</p></td>
    </tr>

    <tr>
      <td class="td leftcol"><p><strong>toll\_free\_number</strong></p></td>
      <td class="td leftcol"><p>No</p></td>
      <td class="td leftcol"><p>String</p></td>
      <td class="td leftcol"><p>888-929-1467</p></td>

      <td class="td leftcol">
        <p>Client phone number (toll free number) used to call in that allows for tracking different numbers, particularly ones referred directly by SRS.</p>
        <p>If websource or click to call, the web campaign is passed instead of TFN.</p>
      </td>
    </tr>

    <tr>
      <td class="td leftcol"><p><strong>ivr\_intent</strong></p></td>
      <td class="td leftcol"><p>No</p></td>
      <td class="td leftcol"><p>String</p></td>
      <td class="td leftcol"><p>Power Outage</p></td>
      <td class="td leftcol"><p>Phone pathing logic for routing to the appropriate agent group or providing self-service resolution. Could be multiple values.</p></td>
    </tr>

    <tr>
      <td class="td leftcol"><p><strong>ivr\_resolved</strong></p></td>
      <td class="td leftcol"><p>No</p></td>
      <td class="td leftcol"><p>Bool</p></td>
      <td class="td leftcol"><p>true/false</p></td>
      <td class="td leftcol"><p>Caller triggered a self-service response from the IVR and then disconnected.</p></td>
    </tr>

    <tr>
      <td class="td leftcol"><p><strong>ivr\_abandoned</strong></p></td>
      <td class="td leftcol"><p>No</p></td>
      <td class="td leftcol"><p>Bool</p></td>
      <td class="td leftcol"><p>true/false</p></td>
      <td class="td leftcol"><p>Caller disconnected without receiving a self-service response from IVR nor being placed in live agent queue.</p></td>
    </tr>

    <tr>
      <td class="td leftcol"><p><strong>agent\_queue\_assigned</strong></p></td>
      <td class="td leftcol"><p>No</p></td>
      <td class="td leftcol"><p>String</p></td>
      <td class="td leftcol"><p>Wireless Sales</p></td>
      <td class="td leftcol"><p>Agent group/agent skill group (aka queue name)</p></td>
    </tr>

    <tr>
      <td class="td leftcol"><p><strong>time\_in\_queue</strong></p></td>
      <td class="td leftcol"><p>No</p></td>
      <td class="td leftcol"><p>Integer</p></td>
      <td class="td leftcol"><p>600</p></td>
      <td class="td leftcol"><p>Seconds caller waits in queue to be assigned to an agent.</p></td>
    </tr>

    <tr>
      <td class="td leftcol"><p><strong>queue\_abandoned</strong></p></td>
      <td class="td leftcol"><p>No</p></td>
      <td class="td leftcol"><p>Bool</p></td>
      <td class="td leftcol"><p>true/false</p></td>
      <td class="td leftcol"><p>Caller disconnected after being assigned to a live agent queue but before being assigned to an agent.</p></td>
    </tr>

    <tr>
      <td class="td leftcol"><p><strong>call\_handle\_time</strong></p></td>
      <td class="td leftcol"><p>No</p></td>
      <td class="td leftcol"><p>Integer</p></td>
      <td class="td leftcol"><p>650</p></td>
      <td class="td leftcol"><p>Call duration in seconds from call assignment event to call disconnect event.</p></td>
    </tr>

    <tr>
      <td class="td leftcol"><p><strong>call\_wrap\_time</strong></p></td>
      <td class="td leftcol"><p>No</p></td>
      <td class="td leftcol"><p>Integer</p></td>
      <td class="td leftcol"><p>30</p></td>
      <td class="td leftcol"><p>Duration in seconds from call disconnect event to end of agent wrap event.</p></td>
    </tr>

    <tr>
      <td class="td leftcol"><p><strong>transfer</strong></p></td>
      <td class="td leftcol"><p>No</p></td>
      <td class="td leftcol"><p>String</p></td>
      <td class="td leftcol"><p>Sales Group</p></td>
      <td class="td leftcol"><p>Agent queue name if call was transferred. NA or Null value for calls not transferred.</p></td>
    </tr>

    <tr>
      <td class="td leftcol"><p><strong>disposition\_category</strong></p></td>
      <td class="td leftcol"><p>No</p></td>
      <td class="td leftcol"><p>String</p></td>
      <td class="td leftcol"><p>Change plan</p></td>
      <td class="td leftcol"><p>Categorical outcome selection from agent. Alternatively, could be category like 'Resolved', 'Unresolved', 'Transferred', 'Referred'.</p></td>
    </tr>

    <tr>
      <td class="td leftcol"><p><strong>disposition\_notes</strong></p></td>
      <td class="td leftcol"><p>No</p></td>
      <td class="td leftcol"><p>String</p></td>

      <td class="td leftcol" />

      <td class="td leftcol"><p>Notes from agent regarding the disposition of the call.</p></td>
    </tr>

    <tr>
      <td class="td leftcol"><p><strong>transaction\_completed</strong></p></td>
      <td class="td leftcol"><p>No</p></td>
      <td class="td leftcol"><p>String</p></td>
      <td class="td leftcol"><p>Upgrade Completed, Payment Processed</p></td>
      <td class="td leftcol"><p>Name of transaction type completed by call agent on behalf of customer. Could contain multiple delimited values. May not be available for all agents.</p></td>
    </tr>

    <tr>
      <td class="td leftcol"><p><strong>caller\_account\_value</strong></p></td>
      <td class="td leftcol"><p>No</p></td>
      <td class="td leftcol"><p>Decimal</p></td>
      <td class="td leftcol"><p>129.45</p></td>
      <td class="td leftcol"><p>Current account value of customer.</p></td>
    </tr>
  </tbody>
</table>

### Historical Transcript File Structure

ASAPP accepts uploads for historical conversation transcripts for both voice calls and chats.

The fields described below must be the columns in your uploaded .CSV table.

Each row in the uploaded .CSV table should correspond to one sent message.

| FIELD NAME                   | REQUIRED? | FORMAT    | EXAMPLE                          | NOTES                                             |
| :--------------------------- | :-------- | :-------- | :------------------------------- | :------------------------------------------------ |
| **conversation\_externalId** | Yes       | String    | 3245556677                       | Unique identifier for the conversation            |
| **sender\_externalId**       | Yes       | String    | 6433421                          | Unique identifier for the sender of the message   |
| **sender\_role**             | Yes       | String    | agent                            | Supported values are 'agent', 'customer' or 'bot' |
| **text**                     | Yes       | String    | Happy to help, one moment please | Message from sender                               |
| **timestamp**                | Yes       | Timestamp | 2022-03-16T18:42:24.488424Z      | ISO 8601 formatted UTC timestamp                  |

<Note>
  Proper transcript formatting and sampling ensures data is usable for model training. Please ensure transcripts conform to the following:

  **Formatting**

  * Each utterance is clearly demarcated and sent by one identified sender
  * Utterances are in chronological order and complete, from beginning to very end of the conversation
  * Where possible, transcripts include the full content of the conversation rather than an abbreviated version. For example, in a digital messaging conversation:

    <table class="informaltable frame-void rules-rows">
      <thead>
        <tr>
          <th class="th"><p>Full</p></th>
          <th class="th"><p>Abbreviated</p></th>
        </tr>
      </thead>

      <tbody>
        <tr>
          <td class="td">
            <p><strong>Agent</strong>: Choose an option from the list below</p>
            <p><strong>Agent</strong>: (A) 1-way ticket (B) 2-way ticket (C) None of the above</p>
            <p><strong>Customer</strong>: (A) 1-way ticket</p>
          </td>

          <td class="td">
            <p><strong>Agent</strong>: Choose an option from the list below</p>
            <p><strong>Customer</strong>: (A)</p>
          </td>
        </tr>
      </tbody>
    </table>

  **Sampling**

  * Transcripts are from a wide range of dates to avoid seasonality effects; random sampling over a 12-month period is recommended
  * Transcripts mimic the production conversations on which models will be used - same types of participants, same channel (voice, messaging), same business unit
  * There are no duplicate transcripts
</Note>

### Sales Methods & Attribution Data File Structure

The table below shows the required fields to be included in your uploaded sales methods and attribution data.

| FIELD NAME                        | REQUIRED? | FORMAT    | EXAMPLE                               | NOTES                                                                                                                                                                                                                    |
| :-------------------------------- | :-------- | :-------- | :------------------------------------ | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **transaction\_id**               | Yes       | String    | 1d71dce2-a50c-11ea-bb37-0242ac130002  | An identifier which is unique within the customer system to track this transaction.                                                                                                                                      |
| **transaction\_time**             | Yes       | Timestamp | 2007-04-05T14:30:05.123Z              | ISO 8601 formatted UTC timestamp. Details potential duplicates and also attribute to the right period of time                                                                                                            |
| **transaction\_value\_one\_time** | No        | Float     | 65.25                                 | Single value of initial purchase.                                                                                                                                                                                        |
| **transaction\_value\_recurring** | No        | Float     | 7.95                                  | Recurring value of subscription purchase.                                                                                                                                                                                |
| **customer\_category**            | No        | String    | US                                    | Custom category value per client.                                                                                                                                                                                        |
| **customer\_subcategory**         | No        | String    | wireless                              | Custom subcategory value per client.                                                                                                                                                                                     |
| **external\_customer\_id**        | No        | String    | 34762720001                           | External User ID. This is hashed version of the client ID. In order to attribute to ASAPP metadata, one of these will be required (Customer ID or Conversation ID)                                                       |
| **issue\_id**                     | No        | String    | 1E10412200CC60EEABBF32                | IF filled in, should map to ASAPP's system. May be empty, if the customer has not had a conversation with ASAPP. In order to attribute to ASAPP metadata, one of these will be required (Customer ID or Conversation ID) |
| **external\_session\_id**         | Yes       | String    | 1a09ff6d-3d07-45dc-8fa9-4936bfc4e3e5  | External session id so we can track a customer                                                                                                                                                                           |
| **product\_category**             | No        | String    | Wireless Internet                     | Category of product purchased.                                                                                                                                                                                           |
| **product\_subcategory**          | No        | String    | Broadband                             | Subcategory of product purchased.                                                                                                                                                                                        |
| **product\_name**                 | No        | String    | Broadband Gold Package                | The name of the product.                                                                                                                                                                                                 |
| **product\_id**                   | No        | String    | WI-BBGP                               | The identifier of the product.                                                                                                                                                                                           |
| **product\_quantity**             | Yes       | Integer   | 1                                     | A number indicating the quantity of the product purchased.                                                                                                                                                               |
| **product\_value\_one\_time**     | No        | Float     | 60.00                                 | Value of the product for one time purchase.                                                                                                                                                                              |
| **product\_value\_recurring**     | No        | Float     | 55.00                                 | Value of the product for recurring purchase.                                                                                                                                                                             |

## Generate SSH Public Key Pair and Upload Files

You can generate the key and upload files via Windows, Mac, or Linux.

### Windows Users

If you are using Windows, follow the steps below:

#### 1. Generate an SSH Key Pair

There are multiple tools that you can use to generate an SSH Key Pair. For example: by using puTTYgen (available from [PuTTY](https://www.putty.org/) ) as shown below.

Choose RSA and 4096 bits, then click **generate** and move the mouse pointer randomly.  When the key is generated, enter `sftp` followed by your company marker as the key comment.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-c78294a9-8551-783f-d909-ad56002dcc71.PNG" />
</Frame>

#### 2. Provide the Public Key to ASAPP

Save the public and private key.  Only send the public file for your key pair to ASAPP.  This is not a secret and can be emailed.

#### 3. Upload Files

Use an SFTP utility such as Cyberduck (available from [Cyberduck](https://cyberduck.io/) ) to upload files to ASAPP.  Click **Open Connection**, add sftp.us-east-1.asapp.com as the Server,  and add `sftpcompanymarker` as the Username.  Choose the private key you generated in step 2 as the SSH Private Key and click **connect**.  The following screenshots show how to do this using Cyberduck.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-46081ee0-cb13-663d-a3b2-10c7a0b76d40.PNG" />
</Frame>

A pop-up window appears. Click to allow the unknown fingerprint.  You will then see the `in` and `out` directories.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-72764c0e-5e59-0831-3148-a5b5fa016b8f.PNG" />
</Frame>

Double click the `in` directory and click **Upload** to choose files to send to ASAPP.

### Mac/Linux Users

If you are using a Mac or Linux, follow the steps below:

#### 1. Generate an SSH Key Pair

If you are using a Mac or Linux, you can generate a key pair from the terminal as follows.

If you already have an `id_rsa` file in the `.ssh` directory that you use with other applications, you should specify a different filename for the key so you do not overwrite it.  You can either do that with the `-f` option or type in a `filename` when prompted.

`ssh-keygen -t rsa -b 4096 -C sftp<companymarker>; -f filename`

For Example:

`ssh-keygen -t rsa -b 4096 -C sftptestcompany -f keyforasapp`

Where the filename will be the name of two files generated - `filename` (the private key you must keep to yourself) and `filename.pub` (the public key which ASAPP needs)

If you do not have an `id_rsa` file in the `.ssh` directory, you can go with the default filename of  `id_rsa` and do not need to use the `-f` option.

`ssh-keygen -t rsa -b 4096 -C sftp<companymarker>`

#### 2. Provide the Public Key to ASAPP

Send the `.pub` file for your key pair to ASAPP.  This is not a secret and can be emailed.

#### 3. Upload Files

You can upload files using the terminal or you can use [Cyberduck](https://cyberduck.io/). This section describes how to upload files using the terminal.

To login to the ASAPP server, type one of the following:

If you used the default id\_rsa key name:

`sftp sftp<companymarker>@sftp.us-east-1.asapp.com`

If you specified a different filename for the key:

`sftp -oIdentityFile=filename`

`sftp sftp<companymarker>@sftp.us-east-1.asapp.com`

For Example:

`sftp -oIdentityFile=keyforasapp`

`sftptestcompany@sftp.us-east-1.asapp.com`

You will see the command line prompt change to `sftp>`

If the `sftp` command fails, adding the `-v` parameter will provide logging information to help to diagnose the problem.

Use terminal commands such as `ls, cd, mkdir` on the remote server.

* `ls:` list files
* `cd:` change directory
* `mkdir`: make a new directory
  `ls` will show two directories: `in` (for sending files to ASAPP) and `out` (for receiving files from ASAPP).

To create a transcripts directory on the remote machine to send transcripts to ASAPP, type:

```json
cd in
mkdir transcripts
cd transcripts
```

To navigate on the local machine, prefix terminal commands with l

* `lcd`: change the local directory
* `lls`: list local files
* `lpwd`: to see the local working directory

Use `get` (retrieve) and `put` (upload) to transfer files.

`get` will fetch files from the remote server to the current directory on the local machine.

For example:

`get output.csv` will transfer a file named output.csv from the remote server.

`put` will transfer files to the remote server from the current directory on the local machine.

Navigate to local directory with transcripts and type:

`put transcripts.csv` will transfer a file named transcripts.csv to the remote server.

or

`put *` will transfer all files in the local directory.

or

`put -r <local directory>` works recursively and will transfer all files in the local directory, all sub directories, and all files within them to the remote machine. 

For example:

`put -r sftptest`

will transfer the sftptest directory and everything within it and below it from the local machine to the remote machine.

To end the SFTP session, type `quit` or `exit`.


# Transmitting Data to ASAPP
Source: https://docs.asapp.com/reporting/transmitting-data-to-asapp

Learn how to transmit data to ASAPP for Applications and AI Services.

Customers can securely upload data for ASAPP's consumption for Applications and AI Services using three distinct mechanisms. Read more on how to transmit data by clicking on the link that best matches your use case.

* [**Upload to S3**](/reporting/send-s3 "Transmitting Data to S3")

  S3 is the supported mechanism for ongoing data transmissions, though can also be used for one-time transfers where needed. ASAPP customers can transmit the following types of data to S3:

  * Call center data attributes
  * Conversation transcripts from messaging or voice interactions
  * Recorded call audio files
  * Sales records with attribution metadata
* **[Upload to SFTP](/reporting/send-sftp "Transmitting Data to SFTP")**

  SFTP is the supported mechanism for **one-time data transmissions**, typically used for sending training data files during the implementation phase prior to initial launch. ASAPP customers can transmit the following types of training data via SFTP:

  * Conversation transcripts from messaging or voice interactions
  * Recorded call audio files
  * Free-text agent notes associated with messaging or voice interactions

  Reach out to your ASAPP account contact to coordinate sending data via SFTP.


# Security
Source: https://docs.asapp.com/security



Security is a critical aspect of any platform, and ASAPP takes it seriously, being SOC2 and PCI compliant. We have implemented several security measures to ensure that your data is protected and secure.

## Trust portal

ASAPP's [Trust Portal](https://trust.asapp.com) provides a centralized location for accessing security documentation and compliance information. Through the Trust Portal, you can:

* Download security documentation including SOC2 reports
* Access compliance certifications
* Stay up to date with ASAPP's latest security updates

## Next steps

<CardGroup>
  <Card title="Data Redaction" href="/security/data-redaction">
    Learn how Data Redaction removes sensitive data from your conversations.
  </Card>

  <Card title="External IP Blocking" href="/security/external-ip-blocking">
    Use External IP Blocking to block IP addresses from accessing your data.
  </Card>

  <Card title="Warning about CustomerInfo and Sensitive Data" href="/security/warning-about-customerinfo-and-sensitive-data">
    Learn how to securely handle Customer Information.
  </Card>

  <Card title="Trust Portal" href="https://trust.asapp.com">
    Find the latest security updates and security documentation on ASAPP's Trust Portal.
  </Card>
</CardGroup>


# Data Redaction
Source: https://docs.asapp.com/security/data-redaction

Learn how Data Redaction removes sensitive data from your conversations.

Live conversations are completely uninhibited and as such, customers may mistakenly communicate sensitive information (e.g. credit card number, SSN, etc.) in a manner that increases risk.

In order to mitigate this risk, ASAPP performs redaction logic that can be customized for your business's needs. You also have the ability to add your own [custom redaction rules](#custom-regex-redaction-rules) using regular expressions.

Reach out to your ASAPP account team to learn more.

## Custom Regex Redaction Rules

In AI-Console, you can view existing custom, regex based redaction rules and add new ones for your organization.

Adding rules match specific patterns by using regular expressions. These new rules can be deployed to testing environments and to production.

Custom redaction rules live in the Core Resources section of AI-Console.

* Custom redaction rules are displayed as an ordered list of rules with names.
* Each individual rule will display the underlying regex.

To add a custom rule:

1. Click **Add new**
2. Create a unique Regex Name
3. Add the regex for the particular rule
4. Test your regex rule to ensure it works as expected
5. Add the regex to sandbox

Once a rule has been added to the sandbox environment, test it in your lower environment to ensure it's behaving as expected.


# External IP Blocking
Source: https://docs.asapp.com/security/external-ip-blocking

Use External IP Blocking to block IP addresses from accessing your data.

ASAPP has tools in place to monitor and automatically block activity based on malicious behavior and bad reputation sources (IPs). This blocking inhibits traffic from IPs that could damage, disable, overburden, disrupt or impair any ASAPP servers or APIs.

By default, ASAPP does not block IPs of end users who exhibit abusive behaviors towards agents. IP blocking is trivial to evade and often causes unintended collateral damage to normal users since IP address are dynamic.

It can happen that a previously blocked IP address become the IP address for a valid user, preventing the valid user from using ASAPP and your product.

While we do not recommend IP blocking, you are still able to block users by IP address to help address urgent protection needs.

## Blocking IP Addresses on AI Console

AI-Console provides the ability for administrators with the correct permissions to block external IP addresses that may present a threat to your organization.

To block an IP Address in AI Console:

1. Manually enter (or copy) an individual IP address in the Denylist
2. Click Save and Deploy to save the changes to production

You are able to access IP Addresses in Conversation Manager, giving you insight into the IP address associated with potentially malicious users.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-372e0f2b-7357-8f03-3120-540923097202.png" />
</Frame>

IP Addresses can be unblocked by clicking the trash icon on the blocked IP's row, and then saving and deploying the updated list.

<Note>
  Blocked users receive an error message and the Chat bubble will not appear at the end of their screen.

  From the API perspective,  *shouldDisplayWebChat* will return a **503 Forbidden** error
</Note>

## Additional Contextual Information

Dynamic's ISP IP rotates quite often. This means that the 1-1 relationship between a public IP and an individual/device/client is merely temporary and the assignment will continually change in the future as described below.

**ISP Assignation within the Time**

IP(1) --- UserA

IP(2) --- UserB

IP(3) --- UserC

.......................

IP(1) --- UserC

IP(2) --- UserB

IP(3) --- UserA

If ASAPP prevents UserA from reaching our platform by blocking IP(1), there is a risk that ISPs assign IP(1) to UserB or UserC at some point in the future.

There are also many scenarios where legitimate users share a single IP with abusive users, such as public WiFi networks:

* Company named networks
* College or corporate campuses that route many users from a single outbound IP
* Personal and corporate VPN devices that aggregate many uses to a single IP

Blocking those IP's will prevent many other legitimate users from access to the ASAPP platform.


# Warning about CustomerInfo and Sensitive Data
Source: https://docs.asapp.com/security/warning-about-customerinfo-and-sensitive-data

Learn how to securely handle Customer Information.

<Warning>
  Do not send sensitive data via `CustomerInfo`, `custom_params`, or `customer_params`.
</Warning>

ASAPP implements strict controls to ensure the confidentiality and security of ALL data  we handle on behalf of our customers. For **sensitive data**, ASAPP employs an even more stringent level of control. ("Sensitive data" includes such categories as Personal Health Information, Personally Identifiable Information, and financial/PCI data.)

In general, ASAPP recommends that customers ONLY send sensitive data in specified fields, and where ASAPP expects to receive such data.

ASAPP treats all customer data securely. By default, however, ASAPP may not apply the strictest levels of controls that we maintain for **sensitive data** for content submitted via `CustomerInfo`, `custom_params`, or `customer_params`.

## What is CustomerInfo?

Certain calls available via ASAPP APIs and SDKs provide a parameter that supports the inclusion of arbitrary data with the call.

We'll refer to such fields as **"CustomerInfo"** here, even though in different ASAPP interfaces they may be variously called "custom\_params", "customer\_params", and "CustomerInfo".

CustomerInfo is typically a JSON object containing a set of key:value pairs that can be used in multiple ways by ASAPP and ASAPP customers. For example, as context input for use in the ASAPP Web SDK:

```javascript
"CustomerInfo": {
    "Inflight": true,
    "TierLevel": "Gold"
}
```

## Do not send sensitive data as cleartext via CustomerInfo

ASAPP strongly recommends that our customers do NOT send sensitive data using CustomerInfo.

If customer requirements dictate that sensitive data must be sent via CustomerInfo, CUSTOMERS MUST ENCRYPT SENSITIVE DATA BEFORE SENDING. The customer should encrypt any sensitive data before sending via CustomerInfo, using a private encryption mechanism (i.e. a mechanism not known to ASAPP).

This practice will ensure that ASAPP never has access to the customer's sensitive data, so that data will remain securely protected while in transit through ASAPP systems.

Additionally, ASAPP strongly recommends that our customers use strong encryption. Specifically, we insist that customers use one of the following configurations:

* **Symmetric Encryption Model:** use AES-GCM-256 (authenticated encryption) with a random [salt](https://en.wikipedia.org/wiki/Salt_\(cryptography\)) to provide data integrity, confidentiality and enhanced security. Each combination of salt+associated data should be unique.
* **Asymmetric Encryption Model:** use a key size of 2048, and use RSA as an algorithm. ASAPP recommends setting a key expiration date of less than two years. ASAPP and the customer should both have mechanisms in place to update the key being used. Private keys which are rotated should be retained temporarily for the purposes of accessing previously encrypted data.

In extraordinary circumstances, ASAPP can make exceptions to these requirements. Please contact your ASAPP account team to discuss options if you have a compelling business need to have ASAPP implement an exception.


# Support Overview
Source: https://docs.asapp.com/support



You can reach out to [ASAPP support](https://support.asapp.com) for help with your ASAPP account and implementation.

<CardGroup>
  <Card title="Reporting Issues to ASAPP" href="/support/reporting-issues-to-asapp" />

  <Card title="Service Desk Information" href="/support/service-desk-information" />

  <Card title="Troubleshooting Guide" href="/support/troubleshooting-guide" />
</CardGroup>


# Reporting Issues to ASAPP
Source: https://docs.asapp.com/support/reporting-issues-to-asapp



## Incident Management

### Overview

The goals of incident management at ASAPP are:

* To minimize the negative impact of service incidents on our customers. 
* To restore our customers' ASAPP implementation to normal operation as quickly as possible.
* To take the necessary steps in order to prevent similar incidents in the future.
* To successfully integrate with our customers' standard incident management policies.

### Severity Level Classification

| Severity Level | Description                                                                                                                                           | Report To                                    |
| :------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------- |
| 1              | ASAPP is unusable or inoperable; a major function is unavailable with no acceptable bypass/workaround; a security or confidentiality breach occurred. | Service Desk interface via support.asapp.com |
| 2              | A major function is unavailable but an acceptable bypass/workaround is available.                                                                     | Service Desk interface via support.asapp.com |
| 3              | A minor function is disabled by a defect; a function is not working correctly; the defect is not time-critical and has minimal user impact.           | Service Desk interface via support.asapp.com |
| 4              | The issue is not critical to the day-to-day operations of any single user; and there is an acceptable alternative solution.                           | Service Desk interface via support.asapp.com |

### Standard Response and Resolution Times

This table displays ASAPP's standard response and resolution times based on issue severity as outlined in the Service Level Agreement.

| Severity Level | Initial Response Time | Issue Resolution Time |
| :------------- | :-------------------- | :-------------------- |
| 1              | 15 minutes            | 2 hours               |
| 2              | 15 minutes            | 4 hours               |
| 3              | 24 hours              | 15 business days      |
| 4              | 1 business day        | 30 business days      |

### Severity Level 1 Incidents

**Examples:**

* Customer chat is inaccessible.
* \>5% of agents are unable to access Agent Desk.
* \>5% of agents are experiencing chat latency (>5 seconds to send or receive a chat message)

**Overview:**

* Severity Level 1 Incidents can require a significant amount of ASAPP resources beyond normal operating procedures, and outside of normal operating hours.
* Escalating via Service Desk initiates an escalation policy that is more effective than reaching out directly to any individual ASAPP contact.
* You will receive an acknowledgment from ASAPP within 15 minutes.

### Severity Level 2 & 3 Incidents

**Severity Level 2 Examples:**

* Conversation list screen within the Admin dashboard is blanking out for supervisors, but Agents are still able to maintain chats.
* User Management screen within Admin is unavailable.

**Severity Level 3 Examples:**

* Historical Reporting data has not been refreshed in 90+ minutes.
* A limited number of chats appear to be routing incorrectly.
* A single agent is unable to access Agent Desk.

### Issue Ticketing and Prioritization

* ASAPP maintains all client reported issues in its own ticketing system.
* ASAPP triages and slates issues for sprints based on severity level and number of users impacted.
* ASAPP's engineering teams work in 2 week sprints, meaning that reported issues are typically resolved within 1-2 sprints.
* ASAPP will consider Severity Level 1 and 2 issues for a hotfix (i.e. breaking the ASAPP sprint and release process, and being released directly to PreProd / Prod).

### Issue Reporting Process

* **For Severity 1 Issues:**
  In the event of a Severity 1 failure of a business function in the ASAPP environment, report issues via the Service Desk interface at [support.asapp.com](http://support.asapp.com) by filling out all required fields.
  By selecting the Severity value as **Critical**, you will automatically mobilize ASAPP's on-call team, who will assess the incident and start working on a solution if applicable.
* **For Severity 2-4 Issues:**
  In the event of any non-critical issues with a business function in the ASAPP environment, report issues via the Service Desk interface at [support.asapp.com](http://support.asapp.com) by filling out all required fields.
  ASAPP will escalate the reported issue to the relevant members of the ASAPP team, and you will receive updates via the ticket comments.

The ASAPP team will follow the workflow outlined below for each Service Desk ticket. Each box corresponds to the Service Desk ticket status.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-447d93b4-feea-c550-433c-08ffad915c1f.png" />
</Frame>

### Issue Reporting Template

When you report issues to ASAPP, please provide the following information whenever possible.

* **Issue ID**: provide the Issue ID if the bug took place during a specific conversation.
* **Hashed, encrypted customer ID:** (see below)
* **Severity\*:** provide the severity level based on the 4 point severity scale.
* **Subject\*:** provide a brief, accurate summary of the observed behavior.
* **Date Observed\*:** provide the date you observed the issue. (please note: the observed date may differ from the date the issue is being reported)
* **Description\*:** provide a detailed description of the observed issue, including number of impacted users, the specific users experiencing the issue, impacted sites, and the timestamp when the issue began.
* **Steps to Reproduce\*:** provide detailed list of steps taken at the time you observed the issue.
* **ASAPP Portal\*:** indicate environment if the bug is not in production.
* **Device/Operating System\*:** provide the device / OS being utilized at the time you observed the issue.
* **Browser\*:** provide the browser being utilized at the time you observed the issue.
* **Attachments**: include any screenshots or videos that may help clearly illustrate the issue.
* **\*** Indicates a required field.

<Note>
  ASAPP deliberately does not log unencrypted customer account numbers or any kind of personally identifiable information.
</Note>

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-36ed25ac-f6d3-4d7e-2ed3-b804e202318c.png" />
</Frame>

### Locate the Issue ID

**In Desk:** During the conversation, click on the **Notes** icon at the top of the center panel.

The issue ID is next to the date. The issue ID is also in the Left Hand Panel and End Chat modal window.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-6f30e561-b27a-1df4-aeee-9c6c7af8ba1d.png" />
</Frame>

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-1fb8eecc-6c21-4dbc-3fc5-772cf4722638.png" />
</Frame>

**In Admin:** Go to Conversation Manager.

Issue IDs are in the first column for both live and ended conversations.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-a8b9107f-5752-2cb1-b0c6-673e82c7803d.png" />
</Frame>


# Service Desk Information
Source: https://docs.asapp.com/support/service-desk-information



**What is the ASAPP Service Desk?**

Service Desk is the tool ASAPP uses for the ingestion and tracking of all issues and modifications in our customers' demo and production environments. All issue reports and configuration requests between ASAPP and our customers are handled via the tool.

**How can I access the Service Desk?**

The Service Desk can be accessed at [support.asapp.com](http://support.asapp.com).

Service Desk access is provisioned by your ASAPP account team after the initial Service Desk training is completed. All subsequent access requests and/or modifications should be handled via email with your ASAPP account team.

**When do I create a ticket?**

A Service Desk ticket should be created any time an issue is identified with an ASAPP product (this includes Admin, Desk, Chat SDK, and AI Services) in either the demo or production environment. Additionally, a ticket should be created in cases where an existing configuration needs to be updated.

**How do I create a ticket?**

A Service Desk ticket can be created by navigating to support.asapp.com, logging in, clicking **Submit a Request** in the top right corner of the screen, and filling out and submitting the ticket form.

**What happens after I've created a ticket?**

Once the ticket form is submitted, ASAPP will receive an automatic notification. The ASAPP Technical Services team will acknowledge and review the ticket, triage internally, and request additional information if needed. All correspondence, including requests for additional information, explanations of existing functionality, and updates on fix timelines will take place in the ticket comments.

**Should I use Service Desk to ask questions?**

In general, reaching out to your ASAPP account contact(s) directly is the best way to answer a question or begin a discussion. Your ASAPP account contacts can help you determine whether observed behavior is expected or an unexpected issue.

If an issue is confirmed unexpected or a configuration available, create a ticket in Service Desk to begin addressing it.

**What if I have an urgent production problem?**

ASAPP calls urgent production issues **Severity 1** and defines them as follows:

<Note>
  "ASAPP is unusable or inoperable; a major function is unavailable with no acceptable bypass/workaround; a security or confidentiality breach occurred"

  An issue that meets this criteria should be reported as a ticket in Service Desk with the Priority level **Urgent**.

  See [Severity Level Classification](/support/reporting-issues-to-asapp#severity-level-classification "Severity Level Classification") for descriptions, illustrative examples and associated reporting processes.
</Note>


# Troubleshooting Guide
Source: https://docs.asapp.com/support/troubleshooting-guide



This document outlines some preliminary checks to determine the health and status of the connection between the customer or agent's browser and an ASAPP backend host prior to escalating to the ASAPP Support Team.

<Note>
  You must have access to Chrome Developer Tools in order to use this guide.
</Note>

## Troubleshooting from a Web Browser

### Using Chrome Developer Tools

Please take a moment to familiarize yourself with Chrome Developer Tools, if you are not already. ASAPP will base the troubleshooting efforts for front-end Web SDK use around the Chrome Web Browser.

[https://developers.google.com/web/tools/chrome-devtools/open](https://developers.google.com/web/tools/chrome-devtools/open)

ASAPP will also inspect network traffic as the Web SDK makes API calls to the ASAPP backend. Please also review the documentation on Chrome Developer Tools regarding networking.

[https://developers.google.com/web/tools/chrome-devtools/network](https://developers.google.com/web/tools/chrome-devtools/network)

### API Call HTTP Return Status Codes

In general, you can check connectivity and environment status by looking at the HTTP return codes from the API calls the ASAPP Web SDK makes to the ASAPP backend. You can accomplish this by limiting calls to ASAPP traffic in the Network tab. This will narrow the results to traffic that is using the string "ASAPP" somewhere in the call.

First and foremost, look for traffic that does not return successful 200 HTTP status codes. If there are 400 and 500 level errors, there may be potential network connectivity or configuration issues between the user and ASAPP backend.

Please review HTTP status codes at: [https://www.restapitutorial.com/httpstatuscodes.html](https://www.restapitutorial.com/httpstatuscodes).

To view HTTP return codes:

1. Open **Dev Tools** and navigate to the **Network** tab.
2. Reload the page or navigate to a page with ASAPP chat enabled.
3. Filter network traffic to **ASAPP**.
4. Look at the "Status" for each call. Failed calls are highlighted in red.
5. For non-200 status codes, denote what the call is by the "Request URL" and the return status. You can find other helpful information in context in the "Request Payload".

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-e6fe6329-8256-648b-95a2-1cf6f4d5d9d2.png" />
</Frame>

### Environment Targeting

To determine the ASAPP environment targeted by the front-end, you can look at the network traffic and note what hostname is referenced. For instance, ...something-demo01.test.asapp.com is the demo environment for that implementation. You will see this on every call to the ASAPP backend and it may be helpful to filter the network traffic to "ASAPP".

1. Open **Dev Tools** and navigate to the **Network** tab.
2. Reload the page or navigate to a page with ASAPP chat enabled.
3. Filter network traffic to **ASAPP**.
4. Look at the "Request URL" for the network call.
5. Parse the hostname from `https://something-demo01.test.asapp.com/api/noauth/ShouldDisplayWebChat?ASAPP-ClientType=web-sdk&amp;amp;ASAPP-ClientVersion=4.0.1-uat\`: something-demo01.test.asapp.com

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-a26e6787-2cec-3bb6-25d9-9c29e45e05ad.png" />
</Frame>

### WebSocket Status

In addition to looking at the API calls, it is important to look at the WebSocket connections in use. You should also be able to inspect the frames within the WebSocket to ensure messages are received properly.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-9e750335-dd43-9b01-7c8c-abbe0d089f5a.png" />
</Frame>

[https://developers.google.com/web/tools/chrome-devtools/network/reference#frames](https://developers.google.com/web/tools/chrome-devtools/network/reference#frames)

## Troubleshooting Customer Chat

### Should Display Web Chat

If chat does not display on the desired web page, the first place to check is ASAPP's call for `ShouldDisplayWebChat` via the **Chrome Developer Tool Network** tab. A successful API call response should contain a `DisplayCustomerSupport` field with a value of `true`. If this value is `false` for a page that should display chat, please reach out to the ASAPP Support Team. Superusers can access the Triggers section of ASAPP Admin. This will enable them to determine if the URL visited is set to display chat.

To troubleshoot:

1. Open **Dev Tools** and navigate to the **Network** tab.
2. Reload the page or navigate to a page with ASAPP chat enabled.
3. Filter network traffic to **ASAPP**.
4. Look at the "Request Payload" for `ShouldDisplayWebChat` and look for a `true` response for `DisplayCustomerSupport`.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-3be4e43e-1912-916e-fb30-22a05fd9787c.png" />
</Frame>

### Web SDK Context Input

To view the context provided to the SDK, you can look at the request payload of most SDK API calls. Context input may vary but typical items include:

* Subdivisions
* Segments
* Customer info parameters
* External session IDs

<Card title="Web SDK Context Provider" href="/messaging-platform/integrations/web-sdk/web-contextprovider"> Review the ASAPP SDK Web Context Provider page</Card>

To view the context:

1. Open **Dev Tools** and navigate to the **Network** tab.
2. Reload page or navigate to a page with ASAPP chat enabled.
3. Filter network traffic to **ASAPP**.
4. Look at the "Request Payload" for `GetOfferedMessageUnauthed` and open the tree as follows:

**Params -> Params -> Context** -> All Customer Context (including Auth Token)

**Params -> Params -> AuthenticationParams** -> Customer ID

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-7d923376-1aeb-0ef0-67e8-1dc3c9c68cf5.png" />
</Frame>

### Customer Authentication Input

For authenticated customer chat sessions, you can see the Auth key within the context parameters used throughout the API calls to ASAPP.

The values passed into the Auth context will depend on the integration.

<Card title="Web SDK Context Provider" href="/messaging-platform/integrations/web-sdk/web-contextprovider"> Review the ASAPP SDK Web Context Provider page for the complete use of this key</Card>

## Troubleshooting Agent Chat from Agent Desk

### Connection Status Banners

There are 3 connection statuses:

* Disconnected (Red)
* Reconnecting (Yellow)
* Connected (Green)

You will see a banner on the bottom of the ASAPP Agent Desk with the correlating colors: Red, Yellow, Green. The red and green banners only appear briefly while the connection state changes. However, the yellow banner will remain until a connection is reestablished. The connection state relies on 2 main inputs:

* 204 API calls
* WebSocket echo timeouts

After a timeout grace period of 5 seconds for either of these timeouts, a red or yellow banner will appear.

**Yellow Reconnecting Banner**

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-8d26b34e-5abe-0664-dc13-f116fcfaa244.png" />
</Frame>

### 204 API call

The ASAPP Agent Desk makes API calls to the backend periodically to ensure status and connectivity reporting is functional. Verify the HTTP status and response timing of these calls to look for indicators of an issue. These calls display as the number 204 in the Chrome Developer Tools Network tab.

To view these calls:

1. Open **Dev Tools** and navigate to the **Network** tab.
2. Reload page or navigate to a page with ASAPP chat enabled.
3. Filter network traffic to **ASAPP**.
4. Look at the "204" calls over time to determine good health.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-ca52a4b7-4d0c-e773-323c-195a2e9970c2.png" />
</Frame>

### WebSocket

When a customer chat loads onto the ASAPP Agent Desk, this creates a WebSocket. During the life of that conversation, ASAPP sends continual echoes (requests and responses) to determine WebSocket health and status. ASAPP sends the echoes every 16-18 seconds and has a 6 second timeout by default. If these requests and responses intermittently time out, there is likely a network issue between the Agent Desktop and the ASAPP Desk application.

You can also view messages being sent through WebSocket, as the agent to customer conversation happens:

1. Open **Dev Tools** and navigate to the **Network** tab.
2. Reload page or navigate to a page with ASAPP chat enabled.
3. Click **WS** next to the Filter text box to filter network traffic to WebSocket.
4. Look at the Messages tab in WebSocket.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-9c235a8b-d895-a7de-f904-aee054c0d4f3.png" />
</Frame>

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-d9fae80a-dfdb-5446-4bb6-140287c89601.png" />
</Frame>

If you see one of these pairs of echoes missing, it is most likely because Agent Desk did not receive the echo from the ASAPP backend due to packet loss. If the 'Attempting to reconnect..' message shows, Agent Desk attempts to reconnect with the ASAPP backend to establish a new WebSocket. The messages display in red text starting with 'request?ASAPP-ClientType' in the Network tab of Chrome Developer Tools.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-0e90bcea-cc88-8f78-fd2f-99cbcea61c19.png" />
</Frame>

If you loose network connectivity and then re-establish it, there will be multiple WebSocket entries visible when you click on **WS**.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-7840633a-5eaf-b4ce-a6b5-70f04a5ae40e.png" />
</Frame>

## Troubleshooting Agent Desk/Admin Access Issues

### Using Employee List in ASAPP Admin

If a user has issues logging in to ASAPP, you can view their details within ASAPP Admin after their first successful login. Check the Enabled status, Roles, and Groups for the user to determine if there are any user level issues. ASAPP will reject the user's login attempt if their account is disabled.

To find an employee:

1. Login to ASAPP Admin.
2. Navigate to Employee List.
3. Use the filter to find the desired account.
4. Check account attributes for: Enabled, Roles, and Groups.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/image/uuid-24a8a576-bca7-11c2-72fb-49a4a810ee58.png" />
</Frame>

### Employee Roles Mismatch

During the user's SSO login process, ASAPP receives a list of user roles via the Single-Sign-On SAML assertion.

If the user roles in the Employee List is incorrect:

1. Check with your Identity & Access Management team to verify that the user has been added to the correct set of AD Security Groups.
2. Once you have verified the user's AD Security Groups, please ask the user to log out and log back in using the IDP-initiated SSO URL.
3. If you still see a mismatch between the user's AD Security Groups and the ASAPP Employee List, then please reach out to the ASAPP Support Team.

### Errors During User Login

The SSO flow is a series of browser redirects in the following order:

1. Your SSO engine IDP-initiated URL -- typically hosted within your domain. This is the URL that users must use to login.
2. Your system's authentication system -- typically hosted within your domain. If the user is already authenticated, then it will immediately redirect the user back to your SSO engine URL. Otherwise, the user will be presented with the login page and prompted to enter their credentials.
3. ASAPP's SSO engine -- hosted on the auth-\{customerName}.asapp.com domain.
4. ASAPP's Agent/Admin app -- hosted on the \{customerName}.asapp.com domain.

There are several potential errors that may happen during login. In all of these cases, it is beneficial to find out:

1. The SSO login URL being used by the user to login.
2. The error page URL and error message displayed.

#### Incorrect SSO Login URL

Confirm the user logins to the correct SSO URL. Due to browser redirects, users may accidentally bookmark an incorrect URL (e.g., ASAPP's SSO engine URL, instead of your SSO engine IDP-initiated URL).

#### Invalid Role Values in the SSO SAML Assertion

If the user sees a "Failed to authenticate user" error message and the URL is an ASAPP URL (...asapp.com), then please confirm that correct role values are being sent in the SAML assertion. This error message typically indicates that the user role value is not recognizable within ASAPP.

#### Other Login Errors

For any other errors, please check the error page URL. If the error page URL is an ASAPP URL (ends in asapp.com), please reach out to the ASAPP Support Team for help. If the URL is your SSO URL or your system's authentication system, please contact your internal support team.


# Welcome to ASAPP
Source: https://docs.asapp.com/welcome

Revolutionizing Contact Centers with AI

Welcome to the ASAPP documentation! This is the place to find information on how to use ASAPP as a platform or as integration.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/asapp/images/welcome.png" />
</Frame>

## Getting Started

If you're new to ASAPP, start here to learn the essentials and make your first API call.

<CardGroup>
  <Card title="Set         up ASAPP" href="/getting-started/intro" class="test" icon={<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><g id="handyman"><g id="Vector"><path d="M21.6888 18.6688L16.3888 13.3688H15.3988L12.8588 15.9088V16.8988L18.1588 22.1988C18.5488 22.5888 19.1788 22.5888 19.5688 22.1988L21.6888 20.0788C22.0788 19.6988 22.0788 19.0588 21.6888 18.6688ZM18.8588 20.0888L14.6188 15.8488L15.3288 15.1388L19.5688 19.3788L18.8588 20.0888Z" fill="#8056B0"/><path d="M17.3588 10.6888L18.7688 9.27878L20.8888 11.3988C22.0588 10.2288 22.0588 8.32878 20.8888 7.15878L17.3488 3.61878L15.9388 5.02878V2.20878L15.2388 1.49878L11.6988 5.03878L12.4088 5.74878H15.2388L13.8288 7.15878L14.8888 8.21878L11.9988 11.1088L7.8688 6.97878V5.55878L4.8488 2.53878L2.0188 5.36878L5.0488 8.39878H6.4588L10.5888 12.5288L9.7388 13.3788H7.6188L2.3188 18.6788C1.9288 19.0688 1.9288 19.6988 2.3188 20.0888L4.4388 22.2088C4.8288 22.5988 5.4588 22.5988 5.8488 22.2088L11.1488 16.9088V14.7888L16.2988 9.63878L17.3588 10.6888ZM9.3788 15.8388L5.1388 20.0788L4.4288 19.3688L8.6688 15.1288L9.3788 15.8388Z" fill="#8056B0"/></g></g></svg>}>Learn more how to get started with ASAPP!</Card>
  <Card title="Developers" href="/getting-started/developers" icon={<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><g id="code"><path id="Vector" d="M9.4 16.6L4.8 12L9.4 7.4L8 6L2 12L8 18L9.4 16.6ZM14.6 16.6L19.2 12L14.6 7.4L16 6L22 12L16 18L14.6 16.6Z" fill="#8056B0"/></g></svg>}>Get started using ASAPP's APIs and building an integration!</Card>
</CardGroup>

## Explore products

<CardGroup>
  <Card title="" icon={<svg width="290" height="35" viewBox="0 0 290 35" fill="none" xmlns="http://www.w3.org/2000/svg">    <g clip-path="url(#clip0_396_950)">    <path fill-rule="evenodd" clip-rule="evenodd" d="M35 17.5C35 27.1166 27.6518 35 17.9145 35C9.43369 35 1.81656 28.9056 0.281043 20.586C0.0967682 19.6652 0 18.7117 0 17.7352L0.00037691 17.6366C0.000125807 17.6068 0 17.5769 0 17.547C0 17.5361 1.6814e-05 17.5252 5.04171e-05 17.5143L0 17.5C0 7.69595 8.1792 0 17.7303 0C27.4138 0 35 7.82797 35 17.5ZM3.13269 17.6743C3.13247 17.6572 3.13228 17.6401 3.13213 17.6229C3.13485 17.3461 3.14762 17.0717 3.17008 16.8001C3.53509 13.2801 6.45073 10.5376 9.99342 10.5376C13.7831 10.5376 16.8553 13.6759 16.8553 17.547C16.8553 21.4182 13.7831 24.5565 9.99342 24.5565C6.24534 24.5565 3.19913 21.4868 3.13269 17.6743ZM9.47632 27.7419C9.64758 27.7509 9.81999 27.7554 9.99342 27.7554C15.5126 27.7554 19.9868 23.1849 19.9868 17.547C19.9868 12.0572 15.7446 7.57956 10.4261 7.34811C11.5048 6.97595 12.6602 6.77419 13.8618 6.77419C19.788 6.77419 24.5921 11.6816 24.5921 17.7352C24.5921 23.7888 19.788 28.6962 13.8618 28.6962C12.2995 28.6962 10.8152 28.3552 9.47632 27.7419ZM17.7303 3.19892C16.5803 3.19892 15.4579 3.33253 14.3792 3.58495C21.7952 3.86289 27.7237 10.0918 27.7237 17.7352C27.7237 24.7502 22.7299 30.5737 16.1757 31.6988C16.7476 31.7663 17.3279 31.8011 17.9145 31.8011C25.8754 31.8011 31.8684 25.3983 31.8684 17.5C31.8684 9.60173 25.6912 3.19892 17.7303 3.19892Z" fill="#8056B0"/>    </g>    <path d="M52.32 24.86C50.92 24.86 49.74 24.5333 48.78 23.88C47.8333 23.2133 47.1267 22.34 46.66 21.26C46.2067 20.1667 45.98 18.96 45.98 17.64C45.98 16.1733 46.2667 14.8733 46.84 13.74C47.4133 12.6067 48.2267 11.7267 49.28 11.1C50.3333 10.4733 51.5533 10.16 52.94 10.16C54.06 10.16 55.0667 10.3667 55.96 10.78C56.8533 11.18 57.5667 11.7667 58.1 12.54C58.6333 13.3133 58.9267 14.2267 58.98 15.28H56.36C56.2933 14.4267 55.94 13.7533 55.3 13.26C54.6733 12.7667 53.86 12.52 52.86 12.52C51.5133 12.52 50.46 12.98 49.7 13.9C48.9533 14.8067 48.58 16.0333 48.58 17.58C48.58 19.06 48.92 20.2733 49.6 21.22C50.28 22.1667 51.3333 22.64 52.76 22.64C53.7867 22.64 54.64 22.3467 55.32 21.76C56 21.1733 56.3867 20.3733 56.48 19.36H52.44V17.08H58.96V24.5H56.68V22.58C56.2933 23.3133 55.7333 23.88 55 24.28C54.2667 24.6667 53.3733 24.86 52.32 24.86ZM66.4264 24.72C65.4397 24.72 64.5597 24.52 63.7864 24.12C63.0264 23.72 62.4264 23.1267 61.9864 22.34C61.5597 21.5533 61.3464 20.6 61.3464 19.48C61.3464 18.4267 61.5464 17.4867 61.9464 16.66C62.3597 15.8333 62.9531 15.1867 63.7264 14.72C64.4997 14.2533 65.4264 14.02 66.5064 14.02C67.9597 14.02 69.1131 14.4333 69.9664 15.26C70.8197 16.0733 71.2464 17.3067 71.2464 18.96V20.14H63.8064C64.0064 21.7933 64.9197 22.62 66.5464 22.62C67.7197 22.62 68.4331 22.1933 68.6864 21.34H71.1264C70.9131 22.4467 70.3731 23.2867 69.5064 23.86C68.6397 24.4333 67.6131 24.72 66.4264 24.72ZM68.8664 18.24C68.8264 16.8267 68.0464 16.12 66.5264 16.12C65.8064 16.12 65.2197 16.3067 64.7664 16.68C64.3264 17.04 64.0331 17.56 63.8864 18.24H68.8664ZM73.5113 14.2H75.9313V15.86C76.2246 15.26 76.6646 14.8067 77.2513 14.5C77.8379 14.18 78.5313 14.02 79.3313 14.02C80.4913 14.02 81.3646 14.3533 81.9513 15.02C82.5513 15.6733 82.8513 16.6 82.8513 17.8V24.5H80.3713V18.2C80.3713 17.56 80.1979 17.0733 79.8513 16.74C79.5046 16.3933 79.0379 16.22 78.4513 16.22C77.7313 16.22 77.1446 16.4667 76.6913 16.96C76.2379 17.44 76.0113 18.1067 76.0113 18.96V24.5H73.5113V14.2ZM90.0983 24.72C89.1116 24.72 88.2316 24.52 87.4583 24.12C86.6983 23.72 86.0983 23.1267 85.6583 22.34C85.2316 21.5533 85.0183 20.6 85.0183 19.48C85.0183 18.4267 85.2183 17.4867 85.6183 16.66C86.0316 15.8333 86.6249 15.1867 87.3983 14.72C88.1716 14.2533 89.0983 14.02 90.1783 14.02C91.6316 14.02 92.7849 14.4333 93.6383 15.26C94.4916 16.0733 94.9183 17.3067 94.9183 18.96V20.14H87.4783C87.6783 21.7933 88.5916 22.62 90.2183 22.62C91.3916 22.62 92.1049 22.1933 92.3583 21.34H94.7983C94.5849 22.4467 94.0449 23.2867 93.1783 23.86C92.3116 24.4333 91.2849 24.72 90.0983 24.72ZM92.5383 18.24C92.4983 16.8267 91.7183 16.12 90.1983 16.12C89.4783 16.12 88.8916 16.3067 88.4383 16.68C87.9983 17.04 87.7049 17.56 87.5583 18.24H92.5383ZM97.1831 14.2H99.6031V16.08C99.7898 15.4667 100.11 14.98 100.563 14.62C101.016 14.26 101.576 14.08 102.243 14.08H103.143V16.52H102.243C101.336 16.52 100.683 16.7733 100.283 17.28C99.8831 17.7733 99.6831 18.5133 99.6831 19.5V24.5H97.1831V14.2ZM107.658 24.72C106.632 24.72 105.805 24.4533 105.178 23.92C104.552 23.3867 104.238 22.6333 104.238 21.66C104.238 19.8867 105.365 18.8533 107.618 18.56L109.798 18.28C110.212 18.2133 110.532 18.1133 110.758 17.98C110.985 17.8333 111.098 17.5867 111.098 17.24C111.098 16.4133 110.478 16 109.238 16C107.878 16 107.092 16.4933 106.878 17.48H104.418C104.592 16.32 105.105 15.4533 105.958 14.88C106.812 14.3067 107.945 14.02 109.358 14.02C110.785 14.02 111.845 14.3067 112.538 14.88C113.232 15.4533 113.578 16.3267 113.578 17.5V24.5H111.278V22.7C110.932 23.34 110.452 23.84 109.838 24.2C109.238 24.5467 108.512 24.72 107.658 24.72ZM106.738 21.46C106.738 21.86 106.878 22.16 107.158 22.36C107.438 22.56 107.832 22.66 108.338 22.66C109.152 22.66 109.812 22.4267 110.318 21.96C110.838 21.4933 111.098 20.9067 111.098 20.2V19.7C110.792 19.82 110.298 19.9267 109.618 20.02L108.398 20.2C107.892 20.2667 107.485 20.3867 107.178 20.56C106.885 20.7333 106.738 21.0333 106.738 21.46ZM120.001 24.5C118.028 24.5 117.041 23.52 117.041 21.56V16.4H115.201V14.2H117.041V11.8L119.541 11.1V14.2H121.701V16.4H119.541V21.18C119.541 21.58 119.621 21.8733 119.781 22.06C119.954 22.2333 120.241 22.32 120.641 22.32H121.921V24.5H120.001ZM123.998 14.2H126.498V24.5H123.998V14.2ZM123.958 10.18H126.558V12.76H123.958V10.18ZM128.09 14.2H130.79L133.57 22.14L136.35 14.2H139.05L135.05 24.5H132.11L128.09 14.2ZM145.098 24.72C144.112 24.72 143.232 24.52 142.458 24.12C141.698 23.72 141.098 23.1267 140.658 22.34C140.232 21.5533 140.018 20.6 140.018 19.48C140.018 18.4267 140.218 17.4867 140.618 16.66C141.032 15.8333 141.625 15.1867 142.398 14.72C143.172 14.2533 144.098 14.02 145.178 14.02C146.632 14.02 147.785 14.4333 148.638 15.26C149.492 16.0733 149.918 17.3067 149.918 18.96V20.14H142.478C142.678 21.7933 143.592 22.62 145.218 22.62C146.392 22.62 147.105 22.1933 147.358 21.34H149.798C149.585 22.4467 149.045 23.2867 148.178 23.86C147.312 24.4333 146.285 24.72 145.098 24.72ZM147.538 18.24C147.498 16.8267 146.718 16.12 145.198 16.12C144.478 16.12 143.892 16.3067 143.438 16.68C142.998 17.04 142.705 17.56 142.558 18.24H147.538ZM157.043 10.5H158.963L164.603 24.5H162.783L161.303 20.72H154.703L153.223 24.5H151.403L157.043 10.5ZM160.683 19.14L158.003 12.28L155.323 19.14H160.683ZM170.922 28.56C169.642 28.56 168.582 28.2467 167.742 27.62C166.902 27.0067 166.429 26.1533 166.322 25.06H167.962C168.055 25.7133 168.349 26.2333 168.842 26.62C169.349 27.0067 170.049 27.2 170.942 27.2C172.982 27.2 174.002 26.2 174.002 24.2V22.18C173.695 22.8333 173.222 23.3267 172.582 23.66C171.942 23.9933 171.255 24.16 170.522 24.16C169.695 24.16 168.942 23.9733 168.262 23.6C167.582 23.2267 167.035 22.6733 166.622 21.94C166.222 21.1933 166.022 20.2933 166.022 19.24C166.022 18.1467 166.235 17.2267 166.662 16.48C167.089 15.72 167.649 15.16 168.342 14.8C169.049 14.4267 169.822 14.24 170.662 14.24C171.475 14.24 172.169 14.4133 172.742 14.76C173.315 15.0933 173.735 15.5067 174.002 16V14.44H175.602V24.04C175.602 25.5067 175.175 26.6267 174.322 27.4C173.482 28.1733 172.349 28.56 170.922 28.56ZM167.702 19.24C167.702 20.3467 167.995 21.2 168.582 21.8C169.182 22.4 169.929 22.7 170.822 22.7C171.689 22.7 172.429 22.42 173.042 21.86C173.655 21.2867 173.962 20.42 173.962 19.26C173.962 18.1133 173.669 17.24 173.082 16.64C172.495 16.0267 171.762 15.72 170.882 15.72C169.989 15.72 169.235 16.02 168.622 16.62C168.009 17.22 167.702 18.0933 167.702 19.24ZM182.927 24.72C182.02 24.72 181.214 24.5333 180.507 24.16C179.8 23.7733 179.24 23.1933 178.827 22.42C178.414 21.6467 178.207 20.6933 178.207 19.56C178.207 18.52 178.4 17.6 178.787 16.8C179.187 15.9867 179.747 15.36 180.467 14.92C181.2 14.4667 182.04 14.24 182.987 14.24C184.32 14.24 185.387 14.62 186.187 15.38C187 16.1267 187.407 17.2933 187.407 18.88V19.92H179.847C179.9 21.04 180.2 21.88 180.747 22.44C181.307 22.9867 182.054 23.26 182.987 23.26C183.64 23.26 184.194 23.12 184.647 22.84C185.1 22.56 185.427 22.1333 185.627 21.56H187.227C187 22.6133 186.487 23.4067 185.687 23.94C184.9 24.46 183.98 24.72 182.927 24.72ZM185.787 18.52C185.787 16.64 184.86 15.7 183.007 15.7C182.127 15.7 181.42 15.9533 180.887 16.46C180.367 16.9533 180.04 17.64 179.907 18.52H185.787ZM190.098 14.44H191.698V16.34C192.018 15.6867 192.478 15.1733 193.078 14.8C193.678 14.4267 194.412 14.24 195.278 14.24C196.385 14.24 197.232 14.5467 197.818 15.16C198.405 15.76 198.698 16.6067 198.698 17.7V24.5H197.058V17.96C197.058 17.2267 196.852 16.6667 196.438 16.28C196.025 15.8933 195.485 15.7 194.818 15.7C194.258 15.7 193.738 15.84 193.258 16.12C192.792 16.3867 192.418 16.78 192.138 17.3C191.872 17.82 191.738 18.4267 191.738 19.12V24.5H190.098V14.44ZM205.213 24.5C204.373 24.5 203.733 24.2867 203.293 23.86C202.853 23.42 202.633 22.78 202.633 21.94V15.88H200.693V14.44H202.633V11.68L204.273 11.22V14.44H206.613V15.88H204.273V21.72C204.273 22.1867 204.366 22.5267 204.553 22.74C204.74 22.9533 205.06 23.06 205.513 23.06H206.833V24.5H205.213Z" fill="#8056B0"/>    <defs>    <clipPath id="clip0_396_950">    <rect width="35" height="35" fill="white"/>    </clipPath>    </defs>    </svg>    } href="/generativeagent">
    Empower your contact center with AI-driven agents capable of handling complex interactions across voice and chat channels.
  </Card>

  <Card title="" icon={<svg width="290" height="35" viewBox="0 0 290 35" fill="none" xmlns="http://www.w3.org/2000/svg">    <g clip-path="url(#clip0_396_4116)">    <path fill-rule="evenodd" clip-rule="evenodd" d="M16.6622 8.90571C16.4816 13.0794 13.0776 16.4834 8.90388 16.664L0 16.6731C0.415916 7.65431 7.65249 0.41774 16.6713 0L16.6622 8.90571ZM26.08 16.6622C21.8406 16.4742 18.5097 13.1415 18.3218 8.90388L18.3126 0C27.3315 0.415916 34.568 7.65249 34.9839 16.6713L26.08 16.6622ZM26.08 18.325C21.9063 18.5055 18.5023 21.9095 18.3218 26.0832L18.3126 34.9889C27.3315 34.5731 34.568 27.3365 34.9839 18.3177L26.0782 18.3268L26.08 18.325ZM8.90388 18.3227C13.1433 18.5106 16.4742 21.8434 16.6622 26.081L16.6713 34.9849C7.65249 34.5689 0.415916 27.3324 0 18.3135L8.90388 18.3227Z" fill="#8056B0"/>    </g>    <path d="M50.94 10.5H53.88L59.34 24.5H56.58L55.36 21.2H49.46L48.24 24.5H45.48L50.94 10.5ZM54.52 18.88L52.42 13.14L50.3 18.88H54.52ZM64.3536 24.72C63.2203 24.72 62.3469 24.3867 61.7336 23.72C61.1203 23.0533 60.8136 22.1267 60.8136 20.94V14.2H63.3136V20.6C63.3136 21.24 63.4803 21.7267 63.8136 22.06C64.1603 22.3933 64.6203 22.56 65.1936 22.56C65.8736 22.56 66.4203 22.3067 66.8336 21.8C67.2603 21.2933 67.4736 20.62 67.4736 19.78V14.2H69.9536V24.5H67.6136V22.7C67.3336 23.38 66.9136 23.8867 66.3536 24.22C65.7936 24.5533 65.1269 24.72 64.3536 24.72ZM76.4658 24.5C74.4924 24.5 73.5058 23.52 73.5058 21.56V16.4H71.6658V14.2H73.5058V11.8L76.0058 11.1V14.2H78.1658V16.4H76.0058V21.18C76.0058 21.58 76.0858 21.8733 76.2458 22.06C76.4191 22.2333 76.7058 22.32 77.1058 22.32H78.3858V24.5H76.4658ZM84.9825 24.72C83.9692 24.72 83.0758 24.5067 82.3025 24.08C81.5292 23.64 80.9225 23.02 80.4825 22.22C80.0558 21.4067 79.8425 20.4533 79.8425 19.36C79.8425 18.2667 80.0558 17.32 80.4825 16.52C80.9225 15.72 81.5292 15.1067 82.3025 14.68C83.0758 14.24 83.9692 14.02 84.9825 14.02C85.9958 14.02 86.8892 14.24 87.6625 14.68C88.4492 15.1067 89.0558 15.72 89.4825 16.52C89.9225 17.32 90.1425 18.2667 90.1425 19.36C90.1425 20.4533 89.9225 21.4067 89.4825 22.22C89.0558 23.02 88.4492 23.64 87.6625 24.08C86.8892 24.5067 85.9958 24.72 84.9825 24.72ZM82.3825 19.36C82.3825 20.3467 82.6158 21.1 83.0825 21.62C83.5625 22.1267 84.1958 22.38 84.9825 22.38C85.7825 22.38 86.4158 22.1267 86.8825 21.62C87.3625 21.1 87.6025 20.3467 87.6025 19.36C87.6025 18.3867 87.3625 17.6467 86.8825 17.14C86.4158 16.62 85.7825 16.36 84.9825 16.36C84.1958 16.36 83.5625 16.62 83.0825 17.14C82.6158 17.6467 82.3825 18.3867 82.3825 19.36ZM97.578 24.86C96.538 24.86 95.598 24.66 94.758 24.26C93.9313 23.86 93.2713 23.3 92.778 22.58C92.298 21.8467 92.0446 20.9933 92.018 20.02H93.778C93.8713 21.1267 94.2713 21.9533 94.978 22.5C95.6846 23.0467 96.5713 23.32 97.638 23.32C98.598 23.32 99.3446 23.1133 99.878 22.7C100.425 22.2867 100.698 21.7067 100.698 20.96C100.698 20.28 100.485 19.76 100.058 19.4C99.6446 19.04 99.0513 18.7533 98.278 18.54L95.998 17.9C94.758 17.5533 93.8446 17.0867 93.258 16.5C92.6846 15.9 92.398 15.1067 92.398 14.12C92.398 12.8267 92.838 11.8467 93.718 11.18C94.598 10.5 95.758 10.16 97.198 10.16C98.638 10.16 99.8313 10.5 100.778 11.18C101.725 11.86 102.225 12.8667 102.278 14.2H100.518C100.451 13.32 100.105 12.6867 99.478 12.3C98.8646 11.9 98.0846 11.7 97.138 11.7C96.1913 11.7 95.458 11.8933 94.938 12.28C94.418 12.6667 94.158 13.2533 94.158 14.04C94.158 14.7333 94.3646 15.2533 94.778 15.6C95.2046 15.9333 95.8713 16.2267 96.778 16.48L98.858 17.04C100.058 17.36 100.958 17.7933 101.558 18.34C102.171 18.8733 102.478 19.6667 102.478 20.72C102.478 21.6133 102.258 22.3733 101.818 23C101.391 23.6133 100.805 24.08 100.058 24.4C99.3246 24.7067 98.498 24.86 97.578 24.86ZM108.574 24.72C107.521 24.72 106.688 24.4133 106.074 23.8C105.474 23.1867 105.174 22.34 105.174 21.26V14.44H106.814V21.04C106.814 21.7733 107.014 22.3333 107.414 22.72C107.814 23.1067 108.341 23.3 108.994 23.3C109.874 23.3 110.581 22.9667 111.114 22.3C111.661 21.62 111.934 20.7733 111.934 19.76V14.44H113.574V24.5H111.974V22.64C111.654 23.3067 111.208 23.82 110.634 24.18C110.061 24.54 109.374 24.72 108.574 24.72ZM116.973 14.44H118.573V16.1C118.827 15.5133 119.22 15.06 119.753 14.74C120.287 14.4067 120.893 14.24 121.573 14.24C122.267 14.24 122.873 14.4133 123.393 14.76C123.927 15.0933 124.28 15.5867 124.453 16.24C124.733 15.5867 125.18 15.0933 125.793 14.76C126.407 14.4133 127.08 14.24 127.813 14.24C128.747 14.24 129.52 14.5067 130.133 15.04C130.747 15.5733 131.053 16.3267 131.053 17.3V24.5H129.413V17.82C129.413 17.14 129.227 16.62 128.853 16.26C128.493 15.8867 128.02 15.7 127.433 15.7C126.98 15.7 126.553 15.8133 126.153 16.04C125.753 16.2533 125.433 16.5733 125.193 17C124.953 17.4133 124.833 17.92 124.833 18.52V24.5H123.193V17.82C123.193 17.14 123.007 16.62 122.633 16.26C122.273 15.8867 121.8 15.7 121.213 15.7C120.76 15.7 120.333 15.8133 119.933 16.04C119.533 16.2533 119.213 16.5733 118.973 17C118.733 17.4133 118.613 17.92 118.613 18.52V24.5H116.973V14.44ZM134.356 14.44H135.956V16.1C136.21 15.5133 136.603 15.06 137.136 14.74C137.67 14.4067 138.276 14.24 138.956 14.24C139.65 14.24 140.256 14.4133 140.776 14.76C141.31 15.0933 141.663 15.5867 141.836 16.24C142.116 15.5867 142.563 15.0933 143.176 14.76C143.79 14.4133 144.463 14.24 145.196 14.24C146.13 14.24 146.903 14.5067 147.516 15.04C148.13 15.5733 148.436 16.3267 148.436 17.3V24.5H146.796V17.82C146.796 17.14 146.61 16.62 146.236 16.26C145.876 15.8867 145.403 15.7 144.816 15.7C144.363 15.7 143.936 15.8133 143.536 16.04C143.136 16.2533 142.816 16.5733 142.576 17C142.336 17.4133 142.216 17.92 142.216 18.52V24.5H140.576V17.82C140.576 17.14 140.39 16.62 140.016 16.26C139.656 15.8867 139.183 15.7 138.596 15.7C138.143 15.7 137.716 15.8133 137.316 16.04C136.916 16.2533 136.596 16.5733 136.356 17C136.116 17.4133 135.996 17.92 135.996 18.52V24.5H134.356V14.44ZM154.339 24.72C153.379 24.72 152.586 24.4667 151.959 23.96C151.346 23.4533 151.039 22.7267 151.039 21.78C151.039 20.86 151.319 20.1667 151.879 19.7C152.452 19.22 153.199 18.92 154.119 18.8L156.499 18.48C156.966 18.4267 157.319 18.3133 157.559 18.14C157.812 17.9667 157.939 17.6667 157.939 17.24C157.939 16.7067 157.752 16.3 157.379 16.02C157.006 15.7267 156.446 15.58 155.699 15.58C154.886 15.58 154.246 15.7333 153.779 16.04C153.326 16.3467 153.052 16.8 152.959 17.4H151.279C151.412 16.36 151.866 15.5733 152.639 15.04C153.412 14.5067 154.439 14.24 155.719 14.24C158.292 14.24 159.579 15.32 159.579 17.48V24.5H158.019V22.58C157.686 23.2467 157.206 23.7733 156.579 24.16C155.966 24.5333 155.219 24.72 154.339 24.72ZM152.699 21.68C152.699 22.2133 152.879 22.6133 153.239 22.88C153.599 23.1467 154.072 23.28 154.659 23.28C155.246 23.28 155.786 23.1533 156.279 22.9C156.786 22.6467 157.186 22.2867 157.479 21.82C157.786 21.34 157.939 20.7867 157.939 20.16V19.32C157.526 19.52 156.952 19.6667 156.219 19.76L154.719 19.96C154.159 20.0267 153.679 20.1867 153.279 20.44C152.892 20.68 152.699 21.0933 152.699 21.68ZM162.872 14.44H164.472V16.34C164.965 14.9933 165.939 14.32 167.392 14.32H168.112V15.9H167.472C165.499 15.9 164.512 17.1133 164.512 19.54V24.5H162.872V14.44ZM170.264 26.34H171.304C171.851 26.34 172.277 26.2267 172.584 26C172.904 25.7867 173.151 25.4667 173.324 25.04L173.584 24.38L169.404 14.44H171.184L174.364 22.32L177.344 14.44H179.064L174.724 25.46C174.404 26.2733 173.984 26.86 173.464 27.22C172.944 27.5933 172.231 27.78 171.324 27.78H170.264V26.34Z" fill="#8056B0"/>    <defs>    <clipPath id="clip0_396_4116">    <rect width="35" height="35" fill="white"/>    </clipPath>    </defs>    </svg>    } href="/autosummary">
    Generate actionable insights from customer conversations.
  </Card>

  <Card title="" icon={<svg width="290" height="35" viewBox="0 0 290 35" fill="none" xmlns="http://www.w3.org/2000/svg">    <g clip-path="url(#clip0_396_829)">    <path d="M33.1082 17.1006C35.1718 14.1916 35.2874 11.2498 33.3758 8.33721C31.4679 5.43154 28.6419 4.17299 24.9746 4.61829C23.3545 1.56304 20.7923 -0.0634403 17.0976 0.00189421C13.3606 0.0672287 10.8535 1.80719 9.33415 5.01202C5.66504 4.67847 2.91229 6.06597 1.15472 9.0748C-0.601035 12.0802 -0.359116 15.0013 1.91163 17.8073C0.566408 19.6246 -0.0365572 21.5537 0.395966 23.6977C0.83032 25.8434 2.01975 27.5731 3.83048 28.9125C5.65404 30.2621 7.7965 30.532 10.0141 30.2845C11.6233 33.3862 14.2183 34.9438 17.7903 34.9043C21.5071 34.8631 24.159 33.2108 25.6307 29.9269C29.3072 30.2156 32.0599 28.8367 33.8285 25.8331C35.6154 22.7967 35.3167 19.8602 33.1082 17.1006ZM27.3535 8.19622C29.3181 8.68108 30.2987 10.029 30.7972 11.7535C31.0537 12.6407 30.8906 13.5107 30.4159 14.3187C30.3463 14.4357 30.2309 14.5268 30.1062 14.6626C29.0542 14.0196 28.0115 13.4384 27.2252 12.5324C26.4225 11.6091 26.2776 10.4554 25.9826 9.28799C25.8781 8.84784 25.9441 8.41801 26.0339 8.10165C26.4664 8.06383 26.9063 8.08618 27.3553 8.19622H27.3535ZM22.2182 9.38084C22.1779 10.3832 22.5718 11.6452 22.5718 11.6452H22.5737C23.1602 13.6912 24.4577 15.2971 26.296 16.5625C26.6992 16.841 27.1115 17.111 27.5202 17.3826C27.0401 17.5614 26.5581 17.7711 26.2905 17.9706C24.8335 18.9334 23.8951 20.2693 23.2665 21.8236C22.8175 22.936 22.7204 24.1051 22.5939 25.2709C21.9176 24.9786 21.4466 24.8445 21.4466 24.8445C21.0306 24.7053 20.6732 24.5523 20.2975 24.4628C18.2192 23.9625 16.1904 24.1326 14.2202 24.9133C13.6576 25.1368 13.1004 25.374 12.5432 25.6113C12.6275 25.2176 12.6258 24.3545 12.6258 24.3545C12.4186 22.7349 11.7406 21.356 10.7123 20.1163C9.95361 19.2034 8.97311 18.5259 7.98344 17.8485C7.89546 17.7884 7.80749 17.7281 7.71952 17.668C8.25468 17.3001 8.82466 16.8875 9.32499 16.4782C9.33415 16.4714 9.34148 16.4645 9.35064 16.4576C9.36531 16.4456 9.37997 16.4335 9.39463 16.4215C9.44228 16.382 9.4881 16.3424 9.52842 16.3011C10.0049 15.8747 10.41 15.3796 10.7655 14.8535C11.6782 13.5055 12.1803 12.0252 12.316 10.4141C12.338 10.1476 12.3582 9.88114 12.3783 9.61295C13.1261 9.92758 13.5604 10.0256 13.5604 10.0256C14.4401 10.4159 15.3161 10.6136 16.2362 10.6875C18.1843 10.844 19.9841 10.378 21.7215 9.59919C21.8865 9.52526 22.0514 9.45133 22.2164 9.3774L22.2182 9.38084ZM16.6577 3.60905C17.8398 3.53683 18.9743 3.64687 19.9823 4.3071C20.5431 4.67503 20.9719 5.14097 21.2633 5.77884C20.1656 6.33935 19.0952 6.88437 17.8728 7.06662C16.6303 7.25231 15.4683 6.88266 14.2422 6.45626C13.806 6.317 13.4467 6.08317 13.1627 5.84246C13.817 4.54609 15.098 3.70533 16.6577 3.60905ZM5.19586 9.86054C6.06091 8.92522 7.16604 8.47304 8.59006 8.49366C8.66337 10.9781 8.16671 13.1462 5.73835 14.4941C5.73835 14.4941 5.23252 14.7641 4.51592 15.0632C3.25868 13.3353 3.86714 11.2996 5.19403 9.86221L5.19586 9.86054ZM5.75851 25.7472C4.77618 24.9098 4.22452 23.8249 4.0779 22.587C3.97893 21.76 4.30333 21.0242 4.71203 20.3261C5.51843 20.5256 7.14222 21.6397 7.75618 22.3601C8.54791 23.2885 8.75317 24.4198 8.97493 25.6199C8.97493 25.6199 9.05557 26.1185 9.07023 26.7753C7.80749 26.9816 6.70786 26.5587 5.75851 25.7505V25.7472ZM14.8525 30.4874C14.4071 30.1692 14.0882 29.6947 13.6246 29.1996C14.8104 28.5445 15.8916 27.9961 17.1525 27.8551C18.3859 27.7175 19.5717 27.9376 20.7538 28.5221C21.1296 28.7336 21.4631 28.9812 21.7472 29.2202C20.3708 31.6909 16.8117 31.8817 14.8525 30.4874ZM30.964 23.0667C30.5461 24.2393 29.8808 25.2314 28.7097 25.8829C28.0243 26.2647 27.315 26.4297 26.4353 26.3059C26.3198 25.1574 26.4884 24.0485 26.8989 22.967C27.3242 21.8442 28.2331 21.0808 29.1935 20.4052C29.1935 20.4052 29.8185 20.0373 30.5185 19.9444C30.5974 20.0648 30.6725 20.1886 30.7403 20.3175C31.2021 21.2133 31.3011 22.1211 30.964 23.0667Z" fill="#8056B0"/>    </g>    <path d="M50.94 10.5H53.88L59.34 24.5H56.58L55.36 21.2H49.46L48.24 24.5H45.48L50.94 10.5ZM54.52 18.88L52.42 13.14L50.3 18.88H54.52ZM64.3536 24.72C63.2203 24.72 62.3469 24.3867 61.7336 23.72C61.1203 23.0533 60.8136 22.1267 60.8136 20.94V14.2H63.3136V20.6C63.3136 21.24 63.4803 21.7267 63.8136 22.06C64.1603 22.3933 64.6203 22.56 65.1936 22.56C65.8736 22.56 66.4203 22.3067 66.8336 21.8C67.2603 21.2933 67.4736 20.62 67.4736 19.78V14.2H69.9536V24.5H67.6136V22.7C67.3336 23.38 66.9136 23.8867 66.3536 24.22C65.7936 24.5533 65.1269 24.72 64.3536 24.72ZM76.4658 24.5C74.4924 24.5 73.5058 23.52 73.5058 21.56V16.4H71.6658V14.2H73.5058V11.8L76.0058 11.1V14.2H78.1658V16.4H76.0058V21.18C76.0058 21.58 76.0858 21.8733 76.2458 22.06C76.4191 22.2333 76.7058 22.32 77.1058 22.32H78.3858V24.5H76.4658ZM84.9825 24.72C83.9692 24.72 83.0758 24.5067 82.3025 24.08C81.5292 23.64 80.9225 23.02 80.4825 22.22C80.0558 21.4067 79.8425 20.4533 79.8425 19.36C79.8425 18.2667 80.0558 17.32 80.4825 16.52C80.9225 15.72 81.5292 15.1067 82.3025 14.68C83.0758 14.24 83.9692 14.02 84.9825 14.02C85.9958 14.02 86.8892 14.24 87.6625 14.68C88.4492 15.1067 89.0558 15.72 89.4825 16.52C89.9225 17.32 90.1425 18.2667 90.1425 19.36C90.1425 20.4533 89.9225 21.4067 89.4825 22.22C89.0558 23.02 88.4492 23.64 87.6625 24.08C86.8892 24.5067 85.9958 24.72 84.9825 24.72ZM82.3825 19.36C82.3825 20.3467 82.6158 21.1 83.0825 21.62C83.5625 22.1267 84.1958 22.38 84.9825 22.38C85.7825 22.38 86.4158 22.1267 86.8825 21.62C87.3625 21.1 87.6025 20.3467 87.6025 19.36C87.6025 18.3867 87.3625 17.6467 86.8825 17.14C86.4158 16.62 85.7825 16.36 84.9825 16.36C84.1958 16.36 83.5625 16.62 83.0825 17.14C82.6158 17.6467 82.3825 18.3867 82.3825 19.36ZM96.058 12.08H91.318V10.5H102.478V12.08H97.738V24.5H96.058V12.08ZM103.77 14.44H105.37V16.34C105.864 14.9933 106.837 14.32 108.29 14.32H109.01V15.9H108.37C106.397 15.9 105.41 17.1133 105.41 19.54V24.5H103.77V14.44ZM113.616 24.72C112.656 24.72 111.863 24.4667 111.236 23.96C110.623 23.4533 110.316 22.7267 110.316 21.78C110.316 20.86 110.596 20.1667 111.156 19.7C111.73 19.22 112.476 18.92 113.396 18.8L115.776 18.48C116.243 18.4267 116.596 18.3133 116.836 18.14C117.09 17.9667 117.216 17.6667 117.216 17.24C117.216 16.7067 117.03 16.3 116.656 16.02C116.283 15.7267 115.723 15.58 114.976 15.58C114.163 15.58 113.523 15.7333 113.056 16.04C112.603 16.3467 112.33 16.8 112.236 17.4H110.556C110.69 16.36 111.143 15.5733 111.916 15.04C112.69 14.5067 113.716 14.24 114.996 14.24C117.57 14.24 118.856 15.32 118.856 17.48V24.5H117.296V22.58C116.963 23.2467 116.483 23.7733 115.856 24.16C115.243 24.5333 114.496 24.72 113.616 24.72ZM111.976 21.68C111.976 22.2133 112.156 22.6133 112.516 22.88C112.876 23.1467 113.35 23.28 113.936 23.28C114.523 23.28 115.063 23.1533 115.556 22.9C116.063 22.6467 116.463 22.2867 116.756 21.82C117.063 21.34 117.216 20.7867 117.216 20.16V19.32C116.803 19.52 116.23 19.6667 115.496 19.76L113.996 19.96C113.436 20.0267 112.956 20.1867 112.556 20.44C112.17 20.68 111.976 21.0933 111.976 21.68ZM122.149 14.44H123.749V16.34C124.069 15.6867 124.529 15.1733 125.129 14.8C125.729 14.4267 126.463 14.24 127.329 14.24C128.436 14.24 129.283 14.5467 129.869 15.16C130.456 15.76 130.749 16.6067 130.749 17.7V24.5H129.109V17.96C129.109 17.2267 128.903 16.6667 128.489 16.28C128.076 15.8933 127.536 15.7 126.869 15.7C126.309 15.7 125.789 15.84 125.309 16.12C124.843 16.3867 124.469 16.78 124.189 17.3C123.923 17.82 123.789 18.4267 123.789 19.12V24.5H122.149V14.44ZM137.724 24.72C136.55 24.72 135.537 24.4467 134.684 23.9C133.83 23.34 133.35 22.5133 133.244 21.42H134.924C135.044 22.1 135.364 22.5933 135.884 22.9C136.417 23.1933 137.064 23.34 137.824 23.34C138.517 23.34 139.057 23.22 139.444 22.98C139.83 22.74 140.024 22.3733 140.024 21.88C140.024 21.4133 139.85 21.0733 139.504 20.86C139.157 20.6333 138.637 20.4533 137.944 20.32L136.604 20.06C135.644 19.8733 134.884 19.5733 134.324 19.16C133.764 18.7467 133.484 18.0933 133.484 17.2C133.484 16.2267 133.83 15.4933 134.524 15C135.23 14.4933 136.164 14.24 137.324 14.24C138.524 14.24 139.477 14.5067 140.184 15.04C140.904 15.56 141.31 16.3133 141.404 17.3H139.724C139.67 16.7133 139.424 16.28 138.984 16C138.544 15.72 137.964 15.58 137.244 15.58C136.55 15.58 136.017 15.7067 135.644 15.96C135.284 16.2133 135.104 16.58 135.104 17.06C135.104 17.54 135.277 17.8933 135.624 18.12C135.97 18.3467 136.477 18.5267 137.144 18.66L138.284 18.88C138.977 19.0133 139.557 19.1667 140.024 19.34C140.49 19.5133 140.877 19.7867 141.184 20.16C141.49 20.5333 141.644 21.0333 141.644 21.66C141.644 22.66 141.27 23.42 140.524 23.94C139.777 24.46 138.844 24.72 137.724 24.72ZM148.239 24.72C147.212 24.72 146.346 24.4933 145.639 24.04C144.932 23.5733 144.406 22.9533 144.059 22.18C143.712 21.3933 143.539 20.52 143.539 19.56C143.539 18.5733 143.726 17.68 144.099 16.88C144.472 16.0667 145.026 15.4267 145.759 14.96C146.506 14.48 147.399 14.24 148.439 14.24C149.652 14.24 150.639 14.56 151.399 15.2C152.159 15.8267 152.579 16.7133 152.659 17.86H150.979C150.939 17.18 150.686 16.66 150.219 16.3C149.766 15.94 149.166 15.76 148.419 15.76C147.339 15.76 146.532 16.1067 145.999 16.8C145.479 17.48 145.219 18.3733 145.219 19.48C145.219 20.5867 145.479 21.4867 145.999 22.18C146.519 22.86 147.292 23.2 148.319 23.2C149.092 23.2 149.712 23.0133 150.179 22.64C150.646 22.2533 150.912 21.6933 150.979 20.96H152.659C152.552 22.1333 152.099 23.0533 151.299 23.72C150.499 24.3867 149.479 24.72 148.239 24.72ZM155.352 14.44H156.952V16.34C157.446 14.9933 158.419 14.32 159.872 14.32H160.592V15.9H159.952C157.979 15.9 156.992 17.1133 156.992 19.54V24.5H155.352V14.44ZM162.754 14.44H164.394V24.5H162.754V14.44ZM162.654 10.38H164.494V12.4H162.654V10.38ZM172.835 24.72C171.995 24.72 171.268 24.54 170.655 24.18C170.055 23.8067 169.608 23.3267 169.315 22.74V24.5H167.755V10.28H169.395V16.32C169.688 15.72 170.128 15.2267 170.715 14.84C171.315 14.44 172.048 14.24 172.915 14.24C173.915 14.24 174.748 14.48 175.415 14.96C176.095 15.4267 176.588 16.0533 176.895 16.84C177.215 17.6133 177.375 18.46 177.375 19.38C177.375 20.3133 177.215 21.1867 176.895 22C176.575 22.8 176.075 23.4533 175.395 23.96C174.715 24.4667 173.861 24.72 172.835 24.72ZM169.395 19.58C169.395 20.62 169.655 21.4933 170.175 22.2C170.708 22.8933 171.508 23.24 172.575 23.24C173.655 23.24 174.441 22.88 174.935 22.16C175.428 21.44 175.675 20.5333 175.675 19.44C175.675 18.3733 175.435 17.5 174.955 16.82C174.488 16.1267 173.721 15.78 172.655 15.78C171.561 15.78 170.741 16.14 170.195 16.86C169.661 17.5667 169.395 18.4733 169.395 19.58ZM184.099 24.72C183.192 24.72 182.386 24.5333 181.679 24.16C180.972 23.7733 180.412 23.1933 179.999 22.42C179.586 21.6467 179.379 20.6933 179.379 19.56C179.379 18.52 179.572 17.6 179.959 16.8C180.359 15.9867 180.919 15.36 181.639 14.92C182.372 14.4667 183.212 14.24 184.159 14.24C185.492 14.24 186.559 14.62 187.359 15.38C188.172 16.1267 188.579 17.2933 188.579 18.88V19.92H181.019C181.072 21.04 181.372 21.88 181.919 22.44C182.479 22.9867 183.226 23.26 184.159 23.26C184.812 23.26 185.366 23.12 185.819 22.84C186.272 22.56 186.599 22.1333 186.799 21.56H188.399C188.172 22.6133 187.659 23.4067 186.859 23.94C186.072 24.46 185.152 24.72 184.099 24.72ZM186.959 18.52C186.959 16.64 186.032 15.7 184.179 15.7C183.299 15.7 182.592 15.9533 182.059 16.46C181.539 16.9533 181.212 17.64 181.079 18.52H186.959Z" fill="#8056B0"/>    <defs>    <clipPath id="clip0_396_829">    <rect width="35" height="35" fill="white"/>    </clipPath>    </defs>    </svg>    } href="/autotranscribe">
    Industry-leading audio transcription technology that ensures accurate, real-time conversion of speech to text.
  </Card>

  <Card title="" icon={<svg width="290" height="28" viewBox="0 0 290 28" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_596_1469)"><mask id="mask0_596_1469" maskUnits="userSpaceOnUse" x="0" y="0" width="29" height="28"><path d="M28.1908 0.0454102H0.074707V27.9305H28.1908V0.0454102Z" fill="white"/></mask><g mask="url(#mask0_596_1469)"><path d="M27.0084 8.73542C28.3256 5.5162 26.8155 1.82558 23.6355 0.492155C20.4554 -0.841271 16.8097 0.687432 15.4924 3.90661C14.1752 7.12579 15.6853 10.8164 18.8654 12.1498C22.0454 13.4833 25.6912 11.9545 27.0084 8.73542Z" fill="#8056B0"/><path d="M6.42546 14.7644C2.98136 14.7644 0.189941 17.6033 0.189941 21.1059C0.189941 24.6086 2.98136 27.4475 6.42546 27.4475C9.86956 27.4475 12.661 24.6086 12.661 21.1059C12.661 17.6033 9.86956 14.7644 6.42546 14.7644Z" fill="#8056B0"/><path d="M27.7115 20.4998C27.4349 17.6213 25.1955 15.2666 22.3733 14.8874C22.0404 14.841 21.71 14.8246 21.3878 14.8328C19.1108 14.8874 16.8983 14.0743 15.2871 12.4373L14.9702 12.1153C13.4478 10.5683 12.6207 8.47008 12.6046 6.28183C12.6046 6.04446 12.5885 5.80436 12.559 5.55879C12.2099 2.63388 9.85232 0.303778 6.96571 0.0418456C3.09098 -0.304669 -0.128562 2.96402 0.215142 6.9012C0.470235 9.8343 2.76607 12.2326 5.6446 12.5873C5.88358 12.6173 6.11987 12.631 6.35349 12.6337C8.50699 12.6501 10.5719 13.4904 12.0944 15.0375L13.0772 16.0361C14.4869 17.4685 15.2415 19.4057 15.3328 21.4303C15.3381 21.5503 15.3462 21.6704 15.3596 21.7932C15.6765 24.8954 18.2569 27.3401 21.3234 27.4438C25.0559 27.5693 28.082 24.3443 27.7115 20.5025V20.4998Z" fill="#8056B0"/></g></g><path d="M43.94 7H46.88L52.34 21H49.58L48.36 17.7H42.46L41.24 21H38.48L43.94 7ZM47.52 15.38L45.42 9.64L43.3 15.38H47.52ZM59.2136 21.36C58.1603 21.36 57.1869 21.16 56.2936 20.76C55.4136 20.36 54.7069 19.78 54.1736 19.02C53.6403 18.2467 53.3536 17.3267 53.3136 16.26H55.9336C56.1869 18.14 57.3003 19.08 59.2736 19.08C60.1003 19.08 60.7336 18.92 61.1736 18.6C61.6136 18.28 61.8336 17.8333 61.8336 17.26C61.8336 16.7533 61.6603 16.3667 61.3136 16.1C60.9669 15.82 60.4736 15.5933 59.8336 15.42L57.7936 14.92C56.3936 14.5867 55.3603 14.1067 54.6936 13.48C54.0403 12.8533 53.7136 11.9933 53.7136 10.9C53.7136 9.51333 54.1869 8.46 55.1336 7.74C56.0936 7.02 57.3336 6.66 58.8536 6.66C60.3869 6.66 61.6603 7.04 62.6736 7.8C63.6869 8.54667 64.2203 9.63333 64.2736 11.06H61.6536C61.4936 9.64667 60.5403 8.94 58.7936 8.94C57.9803 8.94 57.3603 9.09333 56.9336 9.4C56.5203 9.70667 56.3136 10.1533 56.3136 10.74C56.3136 11.3 56.5003 11.72 56.8736 12C57.2469 12.2667 57.8203 12.5 58.5936 12.7L60.5736 13.18C61.8936 13.5 62.8736 13.9467 63.5136 14.52C64.1536 15.08 64.4736 15.8933 64.4736 16.96C64.4736 17.8933 64.2336 18.6933 63.7536 19.36C63.2869 20.0133 62.6536 20.5133 61.8536 20.86C61.0669 21.1933 60.1869 21.36 59.2136 21.36ZM70.9127 7H73.8527L79.3127 21H76.5527L75.3327 17.7H69.4327L68.2127 21H65.4527L70.9127 7ZM74.4927 15.38L72.3927 9.64L70.2727 15.38H74.4927ZM81.4769 7H87.8769C88.8235 7 89.6302 7.20667 90.2969 7.62C90.9769 8.02 91.4835 8.56 91.8169 9.24C92.1635 9.90667 92.3369 10.6267 92.3369 11.4C92.3369 12.24 92.1502 13.0133 91.7769 13.72C91.4169 14.4267 90.8835 14.9933 90.1769 15.42C89.4702 15.8333 88.6169 16.04 87.6169 16.04H84.0369V21H81.4769V7ZM87.3969 13.68C88.1435 13.68 88.7169 13.48 89.1169 13.08C89.5169 12.68 89.7169 12.1467 89.7169 11.48C89.7169 10.84 89.5235 10.3333 89.1369 9.96C88.7502 9.58667 88.1902 9.4 87.4569 9.4H84.0369V13.68H87.3969ZM94.7972 7H101.197C102.144 7 102.951 7.20667 103.617 7.62C104.297 8.02 104.804 8.56 105.137 9.24C105.484 9.90667 105.657 10.6267 105.657 11.4C105.657 12.24 105.471 13.0133 105.097 13.72C104.737 14.4267 104.204 14.9933 103.497 15.42C102.791 15.8333 101.937 16.04 100.937 16.04H97.3572V21H94.7972V7ZM100.717 13.68C101.464 13.68 102.037 13.48 102.437 13.08C102.837 12.68 103.037 12.1467 103.037 11.48C103.037 10.84 102.844 10.3333 102.457 9.96C102.071 9.58667 101.511 9.4 100.777 9.4H97.3572V13.68H100.717ZM108.338 7H110.798L115.258 19.06L119.718 7H122.178V21H120.538V9.22L116.118 21H114.398L109.978 9.22V21H108.338V7ZM129.794 21.22C128.888 21.22 128.081 21.0333 127.374 20.66C126.668 20.2733 126.108 19.6933 125.694 18.92C125.281 18.1467 125.074 17.1933 125.074 16.06C125.074 15.02 125.268 14.1 125.654 13.3C126.054 12.4867 126.614 11.86 127.334 11.42C128.068 10.9667 128.908 10.74 129.854 10.74C131.188 10.74 132.254 11.12 133.054 11.88C133.868 12.6267 134.274 13.7933 134.274 15.38V16.42H126.714C126.768 17.54 127.068 18.38 127.614 18.94C128.174 19.4867 128.921 19.76 129.854 19.76C130.508 19.76 131.061 19.62 131.514 19.34C131.968 19.06 132.294 18.6333 132.494 18.06H134.094C133.868 19.1133 133.354 19.9067 132.554 20.44C131.768 20.96 130.848 21.22 129.794 21.22ZM132.654 15.02C132.654 13.14 131.728 12.2 129.874 12.2C128.994 12.2 128.288 12.4533 127.754 12.96C127.234 13.4533 126.908 14.14 126.774 15.02H132.654ZM140.646 21.22C139.472 21.22 138.459 20.9467 137.606 20.4C136.752 19.84 136.272 19.0133 136.166 17.92H137.846C137.966 18.6 138.286 19.0933 138.806 19.4C139.339 19.6933 139.986 19.84 140.746 19.84C141.439 19.84 141.979 19.72 142.366 19.48C142.752 19.24 142.946 18.8733 142.946 18.38C142.946 17.9133 142.772 17.5733 142.426 17.36C142.079 17.1333 141.559 16.9533 140.866 16.82L139.526 16.56C138.566 16.3733 137.806 16.0733 137.246 15.66C136.686 15.2467 136.406 14.5933 136.406 13.7C136.406 12.7267 136.752 11.9933 137.446 11.5C138.152 10.9933 139.086 10.74 140.246 10.74C141.446 10.74 142.399 11.0067 143.106 11.54C143.826 12.06 144.232 12.8133 144.326 13.8H142.646C142.592 13.2133 142.346 12.78 141.906 12.5C141.466 12.22 140.886 12.08 140.166 12.08C139.472 12.08 138.939 12.2067 138.566 12.46C138.206 12.7133 138.026 13.08 138.026 13.56C138.026 14.04 138.199 14.3933 138.546 14.62C138.892 14.8467 139.399 15.0267 140.066 15.16L141.206 15.38C141.899 15.5133 142.479 15.6667 142.946 15.84C143.412 16.0133 143.799 16.2867 144.106 16.66C144.412 17.0333 144.566 17.5333 144.566 18.16C144.566 19.16 144.192 19.92 143.446 20.44C142.699 20.96 141.766 21.22 140.646 21.22ZM150.841 21.22C149.668 21.22 148.654 20.9467 147.801 20.4C146.948 19.84 146.468 19.0133 146.361 17.92H148.041C148.161 18.6 148.481 19.0933 149.001 19.4C149.534 19.6933 150.181 19.84 150.941 19.84C151.634 19.84 152.174 19.72 152.561 19.48C152.948 19.24 153.141 18.8733 153.141 18.38C153.141 17.9133 152.968 17.5733 152.621 17.36C152.274 17.1333 151.754 16.9533 151.061 16.82L149.721 16.56C148.761 16.3733 148.001 16.0733 147.441 15.66C146.881 15.2467 146.601 14.5933 146.601 13.7C146.601 12.7267 146.948 11.9933 147.641 11.5C148.348 10.9933 149.281 10.74 150.441 10.74C151.641 10.74 152.594 11.0067 153.301 11.54C154.021 12.06 154.428 12.8133 154.521 13.8H152.841C152.788 13.2133 152.541 12.78 152.101 12.5C151.661 12.22 151.081 12.08 150.361 12.08C149.668 12.08 149.134 12.2067 148.761 12.46C148.401 12.7133 148.221 13.08 148.221 13.56C148.221 14.04 148.394 14.3933 148.741 14.62C149.088 14.8467 149.594 15.0267 150.261 15.16L151.401 15.38C152.094 15.5133 152.674 15.6667 153.141 15.84C153.608 16.0133 153.994 16.2867 154.301 16.66C154.608 17.0333 154.761 17.5333 154.761 18.16C154.761 19.16 154.388 19.92 153.641 20.44C152.894 20.96 151.961 21.22 150.841 21.22ZM159.956 21.22C158.996 21.22 158.203 20.9667 157.576 20.46C156.963 19.9533 156.656 19.2267 156.656 18.28C156.656 17.36 156.936 16.6667 157.496 16.2C158.07 15.72 158.816 15.42 159.736 15.3L162.116 14.98C162.583 14.9267 162.936 14.8133 163.176 14.64C163.43 14.4667 163.556 14.1667 163.556 13.74C163.556 13.2067 163.37 12.8 162.996 12.52C162.623 12.2267 162.063 12.08 161.316 12.08C160.503 12.08 159.863 12.2333 159.396 12.54C158.943 12.8467 158.67 13.3 158.576 13.9H156.896C157.03 12.86 157.483 12.0733 158.256 11.54C159.03 11.0067 160.056 10.74 161.336 10.74C163.91 10.74 165.196 11.82 165.196 13.98V21H163.636V19.08C163.303 19.7467 162.823 20.2733 162.196 20.66C161.583 21.0333 160.836 21.22 159.956 21.22ZM158.316 18.18C158.316 18.7133 158.496 19.1133 158.856 19.38C159.216 19.6467 159.69 19.78 160.276 19.78C160.863 19.78 161.403 19.6533 161.896 19.4C162.403 19.1467 162.803 18.7867 163.096 18.32C163.403 17.84 163.556 17.2867 163.556 16.66V15.82C163.143 16.02 162.57 16.1667 161.836 16.26L160.336 16.46C159.776 16.5267 159.296 16.6867 158.896 16.94C158.51 17.18 158.316 17.5933 158.316 18.18ZM172.789 25.06C171.509 25.06 170.449 24.7467 169.609 24.12C168.769 23.5067 168.296 22.6533 168.189 21.56H169.829C169.922 22.2133 170.216 22.7333 170.709 23.12C171.216 23.5067 171.916 23.7 172.809 23.7C174.849 23.7 175.869 22.7 175.869 20.7V18.68C175.562 19.3333 175.089 19.8267 174.449 20.16C173.809 20.4933 173.122 20.66 172.389 20.66C171.562 20.66 170.809 20.4733 170.129 20.1C169.449 19.7267 168.902 19.1733 168.489 18.44C168.089 17.6933 167.889 16.7933 167.889 15.74C167.889 14.6467 168.102 13.7267 168.529 12.98C168.956 12.22 169.516 11.66 170.209 11.3C170.916 10.9267 171.689 10.74 172.529 10.74C173.342 10.74 174.036 10.9133 174.609 11.26C175.182 11.5933 175.602 12.0067 175.869 12.5V10.94H177.469V20.54C177.469 22.0067 177.042 23.1267 176.189 23.9C175.349 24.6733 174.216 25.06 172.789 25.06ZM169.569 15.74C169.569 16.8467 169.862 17.7 170.449 18.3C171.049 18.9 171.796 19.2 172.689 19.2C173.556 19.2 174.296 18.92 174.909 18.36C175.522 17.7867 175.829 16.92 175.829 15.76C175.829 14.6133 175.536 13.74 174.949 13.14C174.362 12.5267 173.629 12.22 172.749 12.22C171.856 12.22 171.102 12.52 170.489 13.12C169.876 13.72 169.569 14.5933 169.569 15.74ZM180.734 10.94H182.374V21H180.734V10.94ZM180.634 6.88H182.474V8.9H180.634V6.88ZM185.735 10.94H187.335V12.84C187.655 12.1867 188.115 11.6733 188.715 11.3C189.315 10.9267 190.048 10.74 190.915 10.74C192.022 10.74 192.868 11.0467 193.455 11.66C194.042 12.26 194.335 13.1067 194.335 14.2V21H192.695V14.46C192.695 13.7267 192.488 13.1667 192.075 12.78C191.662 12.3933 191.122 12.2 190.455 12.2C189.895 12.2 189.375 12.34 188.895 12.62C188.428 12.8867 188.055 13.28 187.775 13.8C187.508 14.32 187.375 14.9267 187.375 15.62V21H185.735V10.94ZM201.93 25.06C200.65 25.06 199.59 24.7467 198.75 24.12C197.91 23.5067 197.436 22.6533 197.33 21.56H198.97C199.063 22.2133 199.356 22.7333 199.85 23.12C200.356 23.5067 201.056 23.7 201.95 23.7C203.99 23.7 205.01 22.7 205.01 20.7V18.68C204.703 19.3333 204.23 19.8267 203.59 20.16C202.95 20.4933 202.263 20.66 201.53 20.66C200.703 20.66 199.95 20.4733 199.27 20.1C198.59 19.7267 198.043 19.1733 197.63 18.44C197.23 17.6933 197.03 16.7933 197.03 15.74C197.03 14.6467 197.243 13.7267 197.67 12.98C198.096 12.22 198.656 11.66 199.35 11.3C200.056 10.9267 200.83 10.74 201.67 10.74C202.483 10.74 203.176 10.9133 203.75 11.26C204.323 11.5933 204.743 12.0067 205.01 12.5V10.94H206.61V20.54C206.61 22.0067 206.183 23.1267 205.33 23.9C204.49 24.6733 203.356 25.06 201.93 25.06ZM198.71 15.74C198.71 16.8467 199.003 17.7 199.59 18.3C200.19 18.9 200.936 19.2 201.83 19.2C202.696 19.2 203.436 18.92 204.05 18.36C204.663 17.7867 204.97 16.92 204.97 15.76C204.97 14.6133 204.676 13.74 204.09 13.14C203.503 12.5267 202.77 12.22 201.89 12.22C200.996 12.22 200.243 12.52 199.63 13.12C199.016 13.72 198.71 14.5933 198.71 15.74Z" fill="#8056B0"/><defs><clipPath id="clip0_596_1469"><rect width="28" height="28" fill="white"/></clipPath></defs></svg> } href="/messaging-platform">
    A comprehensive contact center solution that seamlessly integrates chat, and digital channels for unified customer engagement.
  </Card>

  <Card title="" href="/autocompose" icon={<svg width="290" height="35" viewBox="0 0 290 35" fill="none" xmlns="http://www.w3.org/2000/svg">    <g clip-path="url(#clip0_396_625)">    <path fill-rule="evenodd" clip-rule="evenodd" d="M4.8561 9.71219C7.53804 9.71219 9.71219 7.53804 9.71219 4.8561C9.71219 2.17415 7.53804 0 4.8561 0C2.17415 0 0 2.17415 0 4.8561C0 7.53804 2.17415 9.71219 4.8561 9.71219ZM30.032 34.8881C32.714 34.8881 34.8881 32.714 34.8881 30.032C34.8881 27.3501 32.714 25.176 30.032 25.176C27.3501 25.176 25.176 27.3501 25.176 30.032C25.176 32.714 27.3501 34.8881 30.032 34.8881ZM12.5594 5.04009C12.5079 3.68957 13.0174 2.32218 14.0879 1.31631L14.0897 1.31444C15.9339 -0.41915 18.8466 -0.432262 20.7057 1.2854C22.7427 3.16884 22.7895 6.34755 20.8471 8.28999C19.8459 9.29118 18.5169 9.76414 17.2057 9.70795C15.254 9.62553 13.3537 10.3373 11.9722 11.7188L11.7203 11.9707C10.3388 13.3521 9.6261 15.2524 9.70945 17.2043C9.7647 18.5155 9.29268 19.8444 8.29149 20.8456C6.34811 22.7881 3.1694 22.7413 1.28691 20.7042C-0.430754 18.8461 -0.417642 15.9323 1.31594 14.0882C2.32181 13.0187 3.6892 12.5092 5.03973 12.5598C6.99996 12.6329 8.91056 11.937 10.2976 10.5499L10.5496 10.298C11.9367 8.91093 12.6335 7.00033 12.5594 5.04009ZM26.6847 13.915C25.6142 14.9217 25.1056 16.2911 25.158 17.6425C25.2339 19.6037 24.5381 21.5152 23.151 22.9031L22.9056 23.1486C21.5177 24.5365 19.6061 25.2315 17.645 25.1557C16.2934 25.1032 14.9251 25.6127 13.9175 26.6822C12.1819 28.5263 12.1679 31.4409 13.8865 33.3C15.769 35.337 18.9477 35.3838 20.8902 33.4414C21.8904 32.4412 22.3633 31.1122 22.3081 29.8019C22.2257 27.8548 22.9393 25.9573 24.3171 24.5797L24.583 24.3136C25.9616 22.9351 27.8582 22.2223 29.8053 22.3047C31.1156 22.3599 32.4445 21.8879 33.4449 20.8867C35.3872 18.9443 35.3404 15.7656 33.3034 13.8831C31.4443 12.1645 28.5288 12.1786 26.6856 13.914L26.6847 13.915ZM25.1467 5.06015C25.0989 3.71244 25.6094 2.3488 26.6789 1.34479L26.676 1.34761C28.5202 -0.383173 31.4311 -0.395349 33.2882 1.32138C35.3262 3.20387 35.3731 6.38352 33.4306 8.32596C32.437 9.31965 31.1191 9.79262 29.8173 9.74485C27.8384 9.6718 25.9109 10.378 24.5108 11.7781L24.329 11.9598C22.9289 13.36 22.2228 15.2874 22.2957 17.2665C22.3435 18.5682 21.8706 19.886 20.8769 20.8797C19.8832 21.8733 18.5654 22.3463 17.2636 22.2985C15.2846 22.2256 13.3572 22.9317 11.957 24.3319L11.7753 24.5136C10.3751 25.9137 9.66897 27.8412 9.74203 29.8201C9.7898 31.122 9.31683 32.4397 8.32313 33.4334C6.38069 35.3759 3.20105 35.3281 1.31855 33.291C-0.398175 31.4339 -0.385999 28.523 1.34478 26.6789C2.34784 25.6094 3.71241 25.0989 5.06014 25.1467C7.01943 25.216 8.92628 24.5182 10.3124 23.1322L10.5559 22.8886C11.9505 21.4941 12.6576 19.5779 12.591 17.6074C12.547 16.3102 13.02 15 14.0099 14.0099C14.9999 13.02 16.3101 12.547 17.6074 12.5911C19.5779 12.6576 21.495 11.9495 22.8886 10.5559L23.1322 10.3124C24.5182 8.9263 25.216 7.01851 25.1467 5.06015Z" fill="#8056B0"/>    </g>    <path d="M50.94 10.5H53.88L59.34 24.5H56.58L55.36 21.2H49.46L48.24 24.5H45.48L50.94 10.5ZM54.52 18.88L52.42 13.14L50.3 18.88H54.52ZM64.3536 24.72C63.2203 24.72 62.3469 24.3867 61.7336 23.72C61.1203 23.0533 60.8136 22.1267 60.8136 20.94V14.2H63.3136V20.6C63.3136 21.24 63.4803 21.7267 63.8136 22.06C64.1603 22.3933 64.6203 22.56 65.1936 22.56C65.8736 22.56 66.4203 22.3067 66.8336 21.8C67.2603 21.2933 67.4736 20.62 67.4736 19.78V14.2H69.9536V24.5H67.6136V22.7C67.3336 23.38 66.9136 23.8867 66.3536 24.22C65.7936 24.5533 65.1269 24.72 64.3536 24.72ZM76.4658 24.5C74.4924 24.5 73.5058 23.52 73.5058 21.56V16.4H71.6658V14.2H73.5058V11.8L76.0058 11.1V14.2H78.1658V16.4H76.0058V21.18C76.0058 21.58 76.0858 21.8733 76.2458 22.06C76.4191 22.2333 76.7058 22.32 77.1058 22.32H78.3858V24.5H76.4658ZM84.9825 24.72C83.9692 24.72 83.0758 24.5067 82.3025 24.08C81.5292 23.64 80.9225 23.02 80.4825 22.22C80.0558 21.4067 79.8425 20.4533 79.8425 19.36C79.8425 18.2667 80.0558 17.32 80.4825 16.52C80.9225 15.72 81.5292 15.1067 82.3025 14.68C83.0758 14.24 83.9692 14.02 84.9825 14.02C85.9958 14.02 86.8892 14.24 87.6625 14.68C88.4492 15.1067 89.0558 15.72 89.4825 16.52C89.9225 17.32 90.1425 18.2667 90.1425 19.36C90.1425 20.4533 89.9225 21.4067 89.4825 22.22C89.0558 23.02 88.4492 23.64 87.6625 24.08C86.8892 24.5067 85.9958 24.72 84.9825 24.72ZM82.3825 19.36C82.3825 20.3467 82.6158 21.1 83.0825 21.62C83.5625 22.1267 84.1958 22.38 84.9825 22.38C85.7825 22.38 86.4158 22.1267 86.8825 21.62C87.3625 21.1 87.6025 20.3467 87.6025 19.36C87.6025 18.3867 87.3625 17.6467 86.8825 17.14C86.4158 16.62 85.7825 16.36 84.9825 16.36C84.1958 16.36 83.5625 16.62 83.0825 17.14C82.6158 17.6467 82.3825 18.3867 82.3825 19.36ZM98.698 24.86C97.2713 24.86 96.0646 24.5267 95.078 23.86C94.0913 23.1933 93.3513 22.3067 92.858 21.2C92.3646 20.08 92.118 18.8533 92.118 17.52C92.118 16.0133 92.4113 14.7067 92.998 13.6C93.598 12.48 94.4113 11.6267 95.438 11.04C96.4646 10.4533 97.6246 10.16 98.918 10.16C99.958 10.16 100.905 10.3533 101.758 10.74C102.611 11.1133 103.298 11.6667 103.818 12.4C104.351 13.12 104.651 13.98 104.718 14.98H102.958C102.851 13.94 102.418 13.14 101.658 12.58C100.911 12.02 99.9646 11.74 98.818 11.74C97.8713 11.74 97.018 11.96 96.258 12.4C95.5113 12.84 94.9246 13.4867 94.498 14.34C94.0713 15.1933 93.858 16.2267 93.858 17.44C93.858 18.52 94.038 19.5067 94.398 20.4C94.7713 21.28 95.3246 21.98 96.058 22.5C96.7913 23.02 97.6913 23.28 98.758 23.28C99.9313 23.28 100.911 22.9667 101.698 22.34C102.485 21.7133 102.925 20.84 103.018 19.72H104.778C104.698 20.8133 104.378 21.7467 103.818 22.52C103.271 23.2933 102.551 23.88 101.658 24.28C100.765 24.6667 99.778 24.86 98.698 24.86ZM111.739 24.72C110.766 24.72 109.912 24.5133 109.179 24.1C108.446 23.6733 107.879 23.0667 107.479 22.28C107.079 21.48 106.879 20.5467 106.879 19.48C106.879 18.4133 107.079 17.4867 107.479 16.7C107.879 15.9 108.446 15.2933 109.179 14.88C109.912 14.4533 110.766 14.24 111.739 14.24C112.712 14.24 113.566 14.4533 114.299 14.88C115.032 15.2933 115.599 15.9 115.999 16.7C116.399 17.4867 116.599 18.4133 116.599 19.48C116.599 20.5467 116.399 21.48 115.999 22.28C115.599 23.0667 115.032 23.6733 114.299 24.1C113.566 24.5133 112.712 24.72 111.739 24.72ZM108.559 19.48C108.559 20.6533 108.846 21.5667 109.419 22.22C109.992 22.8733 110.766 23.2 111.739 23.2C112.712 23.2 113.486 22.8733 114.059 22.22C114.632 21.5667 114.919 20.6533 114.919 19.48C114.919 18.3067 114.632 17.3933 114.059 16.74C113.486 16.0867 112.712 15.76 111.739 15.76C110.766 15.76 109.992 16.0867 109.419 16.74C108.846 17.3933 108.559 18.3067 108.559 19.48ZM119.298 14.44H120.898V16.1C121.151 15.5133 121.544 15.06 122.078 14.74C122.611 14.4067 123.218 14.24 123.898 14.24C124.591 14.24 125.198 14.4133 125.718 14.76C126.251 15.0933 126.604 15.5867 126.778 16.24C127.058 15.5867 127.504 15.0933 128.118 14.76C128.731 14.4133 129.404 14.24 130.138 14.24C131.071 14.24 131.844 14.5067 132.458 15.04C133.071 15.5733 133.378 16.3267 133.378 17.3V24.5H131.738V17.82C131.738 17.14 131.551 16.62 131.178 16.26C130.818 15.8867 130.344 15.7 129.758 15.7C129.304 15.7 128.878 15.8133 128.478 16.04C128.078 16.2533 127.758 16.5733 127.518 17C127.278 17.4133 127.158 17.92 127.158 18.52V24.5H125.518V17.82C125.518 17.14 125.331 16.62 124.958 16.26C124.598 15.8867 124.124 15.7 123.538 15.7C123.084 15.7 122.658 15.8133 122.258 16.04C121.858 16.2533 121.538 16.5733 121.298 17C121.058 17.4133 120.938 17.92 120.938 18.52V24.5H119.298V14.44ZM136.68 14.44H138.28V16.48C138.534 15.8133 138.967 15.2733 139.58 14.86C140.194 14.4467 140.94 14.24 141.82 14.24C142.66 14.24 143.414 14.4267 144.08 14.8C144.76 15.1733 145.294 15.7467 145.68 16.52C146.08 17.2933 146.28 18.2467 146.28 19.38C146.28 21.0733 145.854 22.3533 145 23.22C144.147 24.0733 143.047 24.5 141.7 24.5C140.14 24.5 139.014 23.9133 138.32 22.74V28.34H136.68V14.44ZM138.32 19.38C138.32 20.5933 138.614 21.5067 139.2 22.12C139.787 22.72 140.547 23.02 141.48 23.02C142.414 23.02 143.167 22.72 143.74 22.12C144.314 21.5067 144.6 20.5933 144.6 19.38C144.6 18.18 144.314 17.28 143.74 16.68C143.18 16.08 142.434 15.78 141.5 15.78C140.554 15.78 139.787 16.08 139.2 16.68C138.614 17.2667 138.32 18.1667 138.32 19.38ZM153.145 24.72C152.172 24.72 151.318 24.5133 150.585 24.1C149.852 23.6733 149.285 23.0667 148.885 22.28C148.485 21.48 148.285 20.5467 148.285 19.48C148.285 18.4133 148.485 17.4867 148.885 16.7C149.285 15.9 149.852 15.2933 150.585 14.88C151.318 14.4533 152.172 14.24 153.145 14.24C154.118 14.24 154.972 14.4533 155.705 14.88C156.438 15.2933 157.005 15.9 157.405 16.7C157.805 17.4867 158.005 18.4133 158.005 19.48C158.005 20.5467 157.805 21.48 157.405 22.28C157.005 23.0667 156.438 23.6733 155.705 24.1C154.972 24.5133 154.118 24.72 153.145 24.72ZM149.965 19.48C149.965 20.6533 150.252 21.5667 150.825 22.22C151.398 22.8733 152.172 23.2 153.145 23.2C154.118 23.2 154.892 22.8733 155.465 22.22C156.038 21.5667 156.325 20.6533 156.325 19.48C156.325 18.3067 156.038 17.3933 155.465 16.74C154.892 16.0867 154.118 15.76 153.145 15.76C152.172 15.76 151.398 16.0867 150.825 16.74C150.252 17.3933 149.965 18.3067 149.965 19.48ZM164.384 24.72C163.211 24.72 162.197 24.4467 161.344 23.9C160.491 23.34 160.011 22.5133 159.904 21.42H161.584C161.704 22.1 162.024 22.5933 162.544 22.9C163.077 23.1933 163.724 23.34 164.484 23.34C165.177 23.34 165.717 23.22 166.104 22.98C166.491 22.74 166.684 22.3733 166.684 21.88C166.684 21.4133 166.511 21.0733 166.164 20.86C165.817 20.6333 165.297 20.4533 164.604 20.32L163.264 20.06C162.304 19.8733 161.544 19.5733 160.984 19.16C160.424 18.7467 160.144 18.0933 160.144 17.2C160.144 16.2267 160.491 15.4933 161.184 15C161.891 14.4933 162.824 14.24 163.984 14.24C165.184 14.24 166.137 14.5067 166.844 15.04C167.564 15.56 167.971 16.3133 168.064 17.3H166.384C166.331 16.7133 166.084 16.28 165.644 16C165.204 15.72 164.624 15.58 163.904 15.58C163.211 15.58 162.677 15.7067 162.304 15.96C161.944 16.2133 161.764 16.58 161.764 17.06C161.764 17.54 161.937 17.8933 162.284 18.12C162.631 18.3467 163.137 18.5267 163.804 18.66L164.944 18.88C165.637 19.0133 166.217 19.1667 166.684 19.34C167.151 19.5133 167.537 19.7867 167.844 20.16C168.151 20.5333 168.304 21.0333 168.304 21.66C168.304 22.66 167.931 23.42 167.184 23.94C166.437 24.46 165.504 24.72 164.384 24.72ZM174.919 24.72C174.013 24.72 173.206 24.5333 172.499 24.16C171.793 23.7733 171.233 23.1933 170.819 22.42C170.406 21.6467 170.199 20.6933 170.199 19.56C170.199 18.52 170.393 17.6 170.779 16.8C171.179 15.9867 171.739 15.36 172.459 14.92C173.193 14.4667 174.033 14.24 174.979 14.24C176.313 14.24 177.379 14.62 178.179 15.38C178.993 16.1267 179.399 17.2933 179.399 18.88V19.92H171.839C171.893 21.04 172.193 21.88 172.739 22.44C173.299 22.9867 174.046 23.26 174.979 23.26C175.633 23.26 176.186 23.12 176.639 22.84C177.093 22.56 177.419 22.1333 177.619 21.56H179.219C178.993 22.6133 178.479 23.4067 177.679 23.94C176.893 24.46 175.973 24.72 174.919 24.72ZM177.779 18.52C177.779 16.64 176.853 15.7 174.999 15.7C174.119 15.7 173.413 15.9533 172.879 16.46C172.359 16.9533 172.033 17.64 171.899 18.52H177.779Z" fill="#8056B0"/>    <defs>    <clipPath id="clip0_396_625">    <rect width="35" height="35" fill="white"/>    </clipPath>    </defs>    </svg>    }>
    Improve agent productivity and response times through AI generated messages.
  </Card>
</CardGroup>

[Contact our sales team](https://www.asapp.com/get-started) for a personalized demo.


