Service Development
Developing Custom Services for Integration with Parloa
Interface Requirements
For seamless integration, Parloa mandates adherence to a specific request-response format within the dialog graph.
HTTP Request
Parloa issues an HTTP POST
request to the service URL defined within your configuration, carrying a JSON payload that includes additional headers as outlined in the technical settings. The request body, structured as shown below, contains dialog-generated variables and meta information about the interaction:
The variables generated during the graph execution are provided in the input
property as string values. Further meta information about the dialog and the interaction is provided in the context
field.
Expected Response
A response with an HTTP status code of 200
is mandatory, with any other codes signaling a fault that redirects to the error
branch. For predictable errors, like invalid inputs, send a status code of 200
with an error message in the body. The expected response JSON format is:
Important Considerations
Avoid Downtimes â For instance, during deployment. Invest in a zero-downtime deployment process, or use another approach to ensure that the API endpoints are always available. Otherwise, ongoing bot dialogs may fail.
Input Strings Only â Only string values can be sent out of Parloa. You can, however, JSON-stringify objects or arrays if needed, and process them accordingly in your service.
No Global State â Parloa cannot store information from the service requests beyond the current dialog execution.
Parloa's Services
Sample Code
Last updated
Was this helpful?