POST
/
autocompose
/
v1
/
analytics
/
message-sent

Authorizations

asapp-api-id
string
headerrequired
asapp-api-secret
string
headerrequired

Body

application/json

Analytics event describing the agent's usage of AutoCompose features while composing a message (we sometimes refer to these as augmentation features, because they augment the agent's work). Note that many of the fields are not technically required according to this spec. This does not mean that they can omitted arbitrarily. They should all be set, when they relevant for AutoCompose features a particular ASAPP customer is using and the data is available. For some use cases, some fields are not relevant (for example, phraseAutocompletePresentedCt is only relevant if phrase completions are being used). In other cases, the field may relevant but the data might not be avaialble (for example, if the request for suggestions returns too late, it might not be possible set initialSuggestionsId). The customer should try to fill in all relevant fields when they can; this information enables ASAPP to report on the performance of our features and to improve their perforamnce over time. When a field is omitted, it will take on a default value in the event data. String fields default to empty string and numeric fields default to 0.

conversationId
string
required

The ASAPP conversation id for the conversation.

messageId
string
required

The ASAPP ID of the message that was sent. This is required for every event, to enable correlating the analytics event with the message that was sent.

augmentationType
enum<string>[]
required

Types of AutoCompose augmentation features used for composing the message. Ordering of augmentations and repeated uses of an augmentation type are preserved. This is required, so that the usage of AutoCompose features can be measured.

Available options:
FREEHAND,
AUTOSUGGEST,
AUTOCOMPLETE,
PHRASE_AUTOCOMPLETE,
CUSTOM_DRAWER,
CUSTOM_INSERT,
GLOBAL_INSERT,
FLUENCY_APPLY,
FLUENCY_UNDO
numEdits
integer

Number of keystrokes of editing the agent did after selecting a full-message suggestions (one of the suggestions in the suggestions array, not phraseCompletion). Selecting a full-message suggestion resets the counter. Accepting a phrase completion by hitting tab or right arrow increments the counter just like other keystrokes. The idea is to have a rough idea of how much editing the agent had to do after selecting a full-message suggestion (in the ideal case, the message was satisfactory to send as-is and numEdits equals 0).

selectedSuggestionText
string

If the agent used a full-message suggestion to compose this message, this is the text of the suggestion

selectedSuggestionsId
string

If the agent used a full-message suggestion to compose this message, this is the ID of the set of suggestions that the suggestion came from. This helps ASAPP assoicate the MessageSent event with events emitted by AutoCompose internally. If the agent did not use a full-message suggestion, this field can left blank.

selectedSuggestionIndex
integer

If the agent used a full-message suggestion to compose this message, this is the index of the selected suggestion in the set of suggestions that the agent used, starting from 1 for the top suggestion, 2 for the second from the top, and so on. This should be omitted if no suggestion was selected, but it is required if the agent selected a suggestion, to enable identifying which of the suggestions was used.

initialSuggestionsId
string

The ID for the first set of suggestions the agent saw while composing this message. This is required for every event, if suggestions were shown to the agent. If for some reason suggestions were not available, it can be omitted.

timeToAction
number

Number of seconds between the agent sending their previous message and their first action for composing this message. An agent action is when one of the following occur:

  • Typing in the composer
  • Selecting a suggestion
  • Using a phrase completion
  • Inserting a custom or global response from the library
  • Pasting a text into the composer
craftingTime
number

Number of seconds between the agent's first action and last action for composing this message.

dwellTime
number

Number of seconds between the agent's last action for composing this message and the message being sent.

phraseAutocompletePresentedCt
integer

Number of phrase autocomplete suggestions presented to the agent.

phraseAutocompleteSelectedCt
integer

Number of phrase autocomplete suggestions selected by the agent.