Articles on: App Integrator

API model

The API trigger makes requests to the app every five minutes. The main scenario is an entity list request, specifying dates (date of changing/creating from and to).

Create Requests widget for triggers, set up URL to send the request, add Authorization parameters, also set up the request body, response parser and error handling.

Dates in HTTP requests



The widget for the API trigger has two additional parameters in the “**System parameters**” tab: Request time (from) and Request time (to)_:_

The first parameter Request time (from) transfer - 1 hour from the date and time of the bundle start. The second parameter Request time (to) transfer the date and time of the start. These parameters are dynamic and change automatically every five minutes. Specify these parameters correctly to Albato create and transfer it to the app when the bundle’s trigger starts.

As a result, the trigger gets a list of created/changed entities for the last hour every five minutes.

Get data array



Since the API trigger model requests lists of entities, an array of objects will be in response (an unlimited number of entities). The bundle’s trigger will start as many times as many entities are in the response. For example, if five deals are changed, the trigger will receive a list of changed deals. Changes will be transferred to the bundle; the bundle will start five times and all further steps will run five times.

Set up the “path to data array” field in the Response tab to make it work. Check Requests widget for the instructions. Use the checkboxes next to the “Located in an array” fields.

Filtering data



As the trigger sends a request to the app every five minutes, it is possible to receive duplicates (previously received data need not to be transferred to the bundle again).

The trigger has a separate tab data_Filtering to avoid duplicates. Setting up this tab, the trigger will receive only new/changed entities.

Updated on: 07/12/2022

Was this article helpful?

Share your feedback

Cancel

Thank you!