Analytics Transactions: JSON Structure

Every interaction between a user and your project is recorded in a transaction

Overview

The following describes the JSON structure used by Parloa to send transaction data to the analytics hook after a release.

Transactions Data Format

Below is the detailed structure of a transaction JSON object sent to the analytics hook, including processed user interactions:

KeyTypeDescription

transactionId

string

Globally unique identifier for the transaction.

requestTimestamp

string

GMT timestamp when the request was made to Parloa.

responseTime

number

Processing time in milliseconds for the transaction.

userContextId

string

Internal Parloa ID mapping the requester to the release.

releaseId

string

Parloa ID of the release initiating the request.

requesterId

string

Platform-specific requester ID, at times equivalent to a user ID.

intent

object

Details of the incoming intent, processing state, and transitions.

intent.name

string

The name of the incoming intent

intent.handledByState

object

intent.handledByState.id

string

The ID of the state that handled the request

intent.handledByState.name

string

The name of the state that handled the request

intent.handled

string

Either the intent was handled locally or globally

intent.explicitlyHandled

boolean

True when the intent was not handled by an else branch

intent.initialState

object

intent.initialState.id

string

The ID of the state at the start of the transaction

intent.initialState.name

string

The name of the state at the start of the transaction

intent.nextState

object

intent.nextState.id

string

The ID of the state from which the next transaction will start

intent.nextState.name

string

The name of the state from which the next transaction will start

language

string

Language code of the release, in BCP 47 format.

meta

object

Meta-information containing occurrences of errors and warnings.

meta.errors.occurences

number

The number of errors occurred during the transaction

meta.warnings.occurences

number

The number of warnings occurred during the transaction

variables

array

Collection of stored variables and their values.

variables.0.id

string

The immutable identifier of this variable

variables.0.name

string

A name that can be changed by the VUI designer inside Parloa

variables.0.value

any

The current value of the variable at the end of the transaction

platform

string

The platform from which the request originated.

request

object

Raw request received by Parloa.

response

object

Raw response sent to the requesting platform.

Example Transactions

Below are example JSON arrays of transactions made by a release for the Phone platform, illustrating the data structure in action:

[
    {
        "meta": {
            "warnings": {
                "occurrences": 0,
                "affectedSteps": []
            },
            "errors": {
                "occurrences": 0,
                "affectedSteps": []
            }
        },
        "responseTime": 23,
        "platform": "phoneV2",
        "intent": {
            "initialState": {
                "id": "a25aa2af-7b9c-4c48-a5b1-326795aca923",
                "dialogName": "main",
                "name": "Nachfrage weiteres Anliegen"
            },
            "explicitlyHandled": true,
            "name": "Nein",
            "nextState": {
                "id": "STATE.base",
                "dialogName": "main",
                "name": "Routing"
            },
            "handled": "locally",
            "handledByState": {
                "id": "a25aa2af-7b9c-4c48-a5b1-326795aca923",
                "dialogName": "main",
                "name": "Nachfrage weiteres Anliegen"
            }
        },
        "transactionId": "60ba45ba981733dfa6613bf8",
        "variables": [
            {
                "id": "lastSentiment",
                "name": "lastSentiment",
                "value": ""
            },
            {
                "id": "sentimentCounter",
                "name": "sentimentCounter",
                "value": ""
            }
        ],
        "response": {
            "continueListening": false,
            "prompt": "<speak version=\"1.0\" xmlns:mstts=\"https://www.w3.org/2001/mstts\" xml:lang=\"de-DE\"><voice name=\"de-DE-KatjaNeural\">Alles klar, dann danke ich f\u00fcr das nette Gespr\u00e4ch und sage Tsch\u00fc\u00df, bis zum n\u00e4chsten Mal! <break strength=\"medium\" time=\"2012ms\" /></voice></speak>",
            "callMeta": {
                "callerId": "+491777777777",
                "callId": "a8f35368-3feb-123a-618c-d094667acbd8",
                "instanceId": "60a68b0cb4678b14c6d1c67c"
            },
            "callControlMessages": [],
            "endTalk": true,
            "reprompt": ""
        },
        "requesterId": "+491777777777",
        "request": {
            "callMeta": {
                "callerId": "+491777777777",
                "callId": "a8f35368-3feb-123a-618c-d094667acbd8",
                "instanceId": "60a68b0cb4678b14c6d1c67c"
            },
            "intentRanking": [
                {
                    "id": -4300620255518597600,
                    "confidence": 0.999983549118042,
                    "name": "Nein"
                },
                {
                    "id": -997796091434561900,
                    "confidence": 7.319988071685657e-06,
                    "name": "HelpIntent"
                },
                {
                    "id": 4869120587039172000,
                    "confidence": 1.3637103668528994e-09,
                    "name": "askForAgent"
                }
            ],
            "text": "Nein danke",
            "slots": [],
            "intent": {
                "id": -4300620255518597600,
                "confidence": 0.999983549118042,
                "name": "Nein"
            }
        },
        "releaseId": "60a68b0cb4678b14c6d1c67c",
        "userContextId": "60a6cda164ea2442f87f0848",
        "requestTimestamp": "2021-06-04T15:24:42.882Z",
        "language":"de-DE"
    }
]

Last updated