The Peliqan low-code Python environment provides single line functions to interact with APIs from connected SaaS applications. These functions abstract away the complexities of working with a specific API (authentication, error handling etc).
These writeback functions (for example “CRM Update contact” or “Accounting Create Invoice”) are the fundamentals for data syncs and Reverse ETL.
Here’s an example to write a contact to Hubspot (CRM):
hubspot_api.add('contact', {"email": "[email protected]", "name": "John Doe"})
And here’s an example to send a message to Slack:
slack_api.add('message', channel = 'QA', text = 'Data quality alert')
Every writeback function will automatically do retries, e.g. when the API responds with a 429 Rate Limit response code. Retries will be executed with a pause in between. This means that one insert or update could take multiple minutes to complete if rate limiting occurs.
Peliqan will wait for a maximum of 120 seconds for one individual API call to complete. If an API does not respond within 120 seconds, Peliqan will retry (if timeout=False) or throw a Timeout error (if timeout=True).
Add the optional parameter timeout=True to lower the amount of retries, which will reduce the maximum execution time of one writeback function to complete.
timeout=False:
timeout=True:
The Peliqan SaaS API wrapper functions can be used for various use cases. We refer to these use cases as “Data Activation”. Here are a few examples: