Configuring technical aspects for optimal analytics gathering
URL Configuration
To process requests sent by Parloa, you'll need to define an HTTPS endpoint.
Authentication
Protect your endpoint against unauthorized access by choosing between HTTP Basic Auth and Bearer token authentication. Configure these in the Configuration tab.
Optionally, employ a custom header, such as x-api-key, for an additional layer of security.
Authentication Methods
Required Input
Authorization token
Token
Basic authorization
Username, password
Headers
Custom headers that will accompany your request can be specified as needed.
Cache Service Response
By enabling the cache for a particular service, you cache responses for the current version. The cache is keyed based on the release, input parameters, and the service URL.
Retry Mechanism
Parloa will attempt a retry if:
A timeout occurs.
The status code is within the range of 502 to 504 or equals 429.
The error code is deemed retryable according to is-retry-allowed.
Retries will persist until they are exhausted, after which standard error procedures take over.
Service Timeout
Customize Parloa's timeout settings between 0ms to 20,000ms by toggling the Override Service Timeout switch on the Service screen.
The default timeout is 4000ms if none is specified.
A specified timeout will take precedence and replace the default setting.
In a timeout scenario, calculate the duration using the formula: service timeout + retries * (service timeout + 50ms), where 50ms accounts for the retry delay.
Service Request
Parloa sends requests in JSON format via HTTP POST, which includes context and input data tailored to the platform.
You are not obliged to process all provided information.
Request Body
The request body sent to your endpoint contains a predefined set of properties, as illustrated below:
Key
Type
Description
context
object
Contains an object with context information.
context.releaseId
string
The Parloa ID of the release which initiated the request.
context.userContextId
string
An internal Parloa ID representing a conversation by mapping the user ID with the release ID.
context.platform
string
The platform interacting with the release. Possible values: -phoneV1- phoneV2 - alexa- dialogflow
context.request
object
The raw request received by Parloa from the platform.
context.conversationId
string
The unique conversation identifier of the current conversation between the user and your bot. You can use it to retrieve the corresponding conversation history.
input
object
Contains the key-value pairs representing the input parameters defined in the correspondingService block.
Be aware that these properties are exclusive to a service call and should not be mistaken for context variables.
Example Request Bodies
The structure of the request body differs based on the platform. Here are examples for phoneV2 and Alexa:
Parloa anticipates a 200 HTTP status response in JSON format.
Response Body
Parloa expects to receive a response body structured as follows:
Key
Required
Type
Description
choice
Yes
string
The name of the branch that should be followed after the Service block.
output
Yes
object
An object containing key-value pairs that match the output defined in the code output configuration.
responseOverwrites
No
object
An object which can contain key-value pairs where the key is the platform name and the value is an object representing a partial response for the platform which will be merged with the response generated by Parloa. Please take into account that no deep-merging will be performed and high-level keys defined in the response will overwrite those set by Parloa. Possible platform keys:
- alexa
- phoneV1
- dialogflow.
dynamicEntityOverwrites.alexa
No
UpdateDynamicEntities[]
A list of UpdateDynamicEntities directives. They are expected in the Alexa specific format. If provided they will be written into the Parloa generated Alexa response.
dynamicEntityOverwrites.<dialogflowPlatform>
No
SessionEntityType[]
A list of SessionEntityType. They are expected in the Dialogflow specific format. If provided they will be written into the Parloa generated Dialogflow response.
Possible Dialogflow platform keys:
- dialogflow
- phoneV1
- whatsapp
speechToTextHints
No
string[]
An array of words of phrases to be used as hints during speech recognition of phoneV2 releases.
Response Timeout
An external service must respond within a given timeout with a successful status code, otherwise, Parloa will delegate the control to the error branch. For more information, please refer to Parloa Errors.
Release Types
Response Timeout
Dialogflow
4 Seconds
Whatsapp
4 Seconds
PhoneV1
4 Seconds
PhoneV2
9.5 Seconds
Example Responses
Here you can find a sample response for the basic return of data, responseOverwrites and for dynamicEntityOverwrites: