Changes

External Data Source Integration

383 bytes added, 1 April
Setting up a New Integration
# Go to '''Global Settings''' > '''Integrations''' tab > '''External Data Source Integration''' > Click the '''New External Data Source Integration''' button (looks like a plus sign).
# For '''Reference Name''', enter the name by which the integration will be referenced by the variable processor. For example, “chatbot”.
# For '''Data Source URL''', enter the URL of the third-party data source (API) endpoint from which we are pulling the external data.
# Under '''Method''', select the desired HTTP method for the operation.
## To retrieve data from a server, select “GET”.
# Under '''Format''', select the data format to be used in the HTTP call.
# Under '''Header''', enter the HTTP headers to be sent in the request (Example: Content-Type, Authorization, etc). Each header pair must be delimited by a line break.
# Under '''Values Template''', set up the instructions to the data source parameters or request body in either JSON or parameter value pair format.
# For '''Cache for''', enter how many hours the data should be cached for before pulling from the data source again. Set '''Cache for''' to “0” if you don’t want to use cached data.
* When a numeric values is required as the data value inside the JSON, wrap the variable name with the number symbol ( # ). For example, enter <code>"temperature":#temperature#</code> to resolve the variable name <code>"temperature"</code> as a numeric value. 
* If the variable is a string type, the system will put double quotation marks ( " " ) around the value and escape special characters
* The example provided above is based on OpenAI's Chat Completions API endpoint available at: https://platform.openai.com/docs/api-reference/chat
* The accepted JSON Format varies depending on the API's requirements, defined by the Data Source URL field. Please consult the configured API's own documentation when structuring the JSON Object within the Values Template field.
==Values Template Example: Name Pairs==
Smartstaff, administrator
3,320
edits