Generic Integrations
The generic intergrations is a quick, easy way to connect to 3rd party systems within your Logic+ flow. This panel executes a defined request to a configured generic integration (Admin > Configuration > Integrations) and is useful to push or pull data between Sharpen and an available RESTful API.
Caution: Be mindful of integrating with too many 3rd party services, as delays in the 3rd party API response will pause the Logic flow for the duration of the API call.
Customers will experience the API call delay when navigating the Logic flow.
If you don’t already have an integration setup, navigate to Admin > Configuration > Integrations. Then, click “Add Integration” in the upper right to give your integration a name, input the base URL and protocol.
If you will always authorize the integration the same way, choose the appropriate authorization type from the dropdown.
If you will authorize via your API call in Logic+, choose “None” for the Authorization Type so that you can specify your auth within the Generic Integration body itself.
Panel Configuration
Configure the generic integration panel like most other panels in Logic+ with one, notable (and great) addition – the API preview directly underneath the Panel Name. This won’t do much until you’ve filled out the panel, so we are going to come back to that after looking at the specific fields.
Fields
Integration ID: Universally unique identifier representing a RESTful generic integration configured within Admin > Configuration > Integrations. Click the integration to copy the integrationID to clipboard
Path: Path of the API route to deliver the request. This string will be added to the base URL configured for the integrationID
Method: Specify one of the following HTTP methods to be used
GET
POST
PUT
DELETE
PATCH
Data: JSON stringified request body
Headers: JSON stringified request headers
Timeout: - Number of seconds to wait for a response from the integration endpoint.
Valid timeout ranges from 0 to 60 inclusive
Only applicable if ‘Fire and Forget’ is off, meaning Logic panel will pause and wait for a response
If not is set, the default timeout is 1 second
Variables: Use to store the response data from the API request
Name: Name of the interaction variable to store response data
Jsonpath: For the response object, define the JSON path to the desired data
Leave blank to store the entire response object
Or use JSON pathing such as $.results[0].firstName
Fire And Forget (Toggle)
Off: Panel will wait, up to the specified timeout, for a response from the integration endpoint before proceeding through an output path
On: Panel immediately executes an output path, ignoring any integration endpoint response
Use Variable
Specify the interaction variable for boolean evaluation. Panel execution will evaluate to TRUE (fire and forget) only for values of “1” or “true”. In all other cases, the evaluation will return FALSE causing the panel execution to wait for the integration endpoint to respond or timeout.
Exit Paths
Default: Generic Integration request received a valid response
Invalid Input: One or more of the configuration inputs was invalid
Timeout: Timeout duration was met
Note: The default timeout for this panel, if none is set, is 1 second
Previewing Your API integration
Once filled out, you can test your integration panel by utilizing the preview at the top of the panel, directly underneath the panel name.
Click the “Test” button to run your API call.
After running, you’ll see the API status code and the entire JSON response. Click on an element within the response (e.g. “90” in the screenshot below) and that element will automatically be set as a variable with the JSON response. This makes setting variables significantly easier if you have complex JSON responses or arrays.
If the value itself is important, clicking the clipboard icon will copy the specific value. (e.g. you’ll get the value “90” copied to your clipboard.)