Articles in this section

Use the "Error automation via integrator.io APIs" template

The Error automation via integrator.io APIs template, available in the Celigo marketplace, is flexible, easy to use, and aligned with your requirements to manage errors. It has the following two flows:

  1. A flow to auto-resolve errors

  2. A flow to auto-retry errors

These sample flows use the Celigo integrator.io connection and integrator.io API endpoints to automate error management.

You can use this template to automatically resolve or retry errors that do not require any user intervention in integrator.io, that is you don't have to edit or correct any data. In such cases, you can configure the template and run the auto-retry or auto-resolve flow to automate error management of errors, let's say, based on a specific error message or error code.

The scenarios below are examples to provide an understanding. You can use Auto resolve and Auto retry template flows based on your scenarios and what work best for you.

Flows

Scenarios

Auto resolve

Consider a flow that

  • Syncs data between Workday and ADP and has errors due to a mismatch or missing custom field, for example, "Department Code." You'd like to run the auto-resolve flow because you've added a programming logic in ADP that auto-generates the missing custom field or updates the value in real-time.

  • Syncs data from NetSuite with multiple sales channels, for example, Amazon, eBay, Walmart. and errors occur when the product description and code is inconsistent. You'd like to run the auto-resolve flow because your organization is working on creating or updating a master item list in NetSuite to resolve the issue.

You can retrieve open errors using the error API and marks them as resolved based on optional filter criteria (flow id, flow step id, error message, or error code).

Auto retry

Consider a flow that

  • Syncs the refund status of Shopify to NetSuite orders which has a few errors because the “refund status” of some orders is shown as “not paid". Only 2-3 days after the refund, the status of such orders is updated on Shopify. Running the auto-retry flow in such cases helps to retry the errors and keeps the data in sync.

  • Has Salesforce “unable_to_lock_row” errors. When multiple jobs run to update the same set of records, Salesforce has a feature to ensure the same record is not being updated by more than one job at any time, and this sometimes results in errors. Running the auto-retry flow in such cases helps to resolve the errors as the conflicting jobs disappear when it is automatically retried after a while.

You can retrieve open errors using the error API and retry them based on optional filter criteria (flow id, flow step id, error message, or error code).

Installing the template

  1. In the left navigation pane, click Marketplace. And, under By type, select either All or Templates.

  2. In the Search box, type "Error automation" to find the "Error automation via integrator.io APIs" template quickly.

  3. Click Preview and review the Readme and Components.

  4. Click Install now. The installation consists of two steps.

    error-automation-template-installation.png
  5. In step 1 – Integrator IO, click Configure. In the Set up connection page that opens, you can choose either Set up new connection or Use existing connection.

    1. If you choose Set up new connection, follow the steps in Set up a connection to Celigo integrator.io.

    2. If you choose Use existing connection, select an existing connection, and click Done.

  6. In step 2 – Copy resources now from template zip, click Install.

The template is successfully installed with two flows.

error-automation-template-flows.png
  • Auto resolve – Gets the open errors and marks them resolved if they meet your criteria

  • Auto retry – Gets the open errors and retries records based on your filters

Understanding the template flows

The template includes two flows, Auto resolve and Auto retry with export, lookup, and import steps that are explained below.

Flow names

Flow steps

Step descriptions

Auto resolve

Both flows have the following steps:

  1. Export: Get flows

  2. Lookup: Get errors

  3. Import: Resolve errors

    – or –

    Import: Retry errors

  1. Export: Gets records that you specify in the Settings section. You can define multiple rules in a single export and let the logic handle routing of the error records.

  2. Lookup: Gets additional details so that you can resolve or retry the error records in the next step.

  3. Import: Posts errors in the flow step after resolving or retrying the errors.

    • For the Resolve flow, the import step calls the integraror.io /resolve API endpoint to resolve errors.

    • For the Retry flow, the import step calls the integraror.io /retry API endpoint to retry errors.

These steps enable you to automate error management for simple and complex scenarios. Configure the required steps based on your scenario.

Auto retry

A. Configure and run the Auto-resolve flow

error-automation-template-autoretry.png

Based on your scenario and requirements, configure details in the export form.

Step 1: Configure the export to get flow errors

error-automation-export.png
  1. In the Auto-resolve flow, click the export step, Get flows, to open the form and edit the settings.

  2. Under General settings, you can use the default values or configure them based on your requirements.

  3. Under Settings, replace values based on your requirements. These fields are optional, and you can configure them based on your requirements.

    Note

    Understand what configuring optional details under Settings means. If you select:

    • Only flow id provided: Errors from that flow are processed regardless of step or message.

    • Only error message provided: Errors across all flows that contain that message are processed.

    • Flow step id & error code: Only errors from that specific step that match the code are processed.

    • No filters entered: All open errors from all flows are retried or resolved.

    • All fields provided: The rule applies only when all conditions match, giving you pinpoint targeting.

    The export step is configured to handle trace keys, which uniquely identify records, enabling efficient error resolution by matching trace keys across records.

    1. in Flow id, select the flow ID from where you want to get errors and retry them. You can get the ID from the URL. For example, flow ID is the part that shown in bold below: https://integrator.io/integrations/64e3•••eca6d•••ddda7e28d/flowBuilder/64e3•••3b••e641c70d93a32

    2. In Step id, select the step ID or the flow step from where you want to get errors and automatically retry them. You can get the ID from the URL. For example, step ID is the part that is shown in bold below:https://integrator.io/integrations/64e3•••eca6d•••ddda7e28d/flowBuilder/64e3•••3b••e641c70d93a32/edit/exports/64e3•••2be8e090••••f947c

    3. In Error Message, preview the errors and select what type of errors you want to move to the next step. For example, you can match errors containing a keyword. Or, leave the field blank and enter the Error Code below only.

    4. In Error Code, preview the errors and replace the value based on what type of errors you want to move to the next step to gather more info. For example, you can match specific system error codes.

      Tip

      You can use the Error Message and Error Code settings to decide and pass select errors to the next step for more details However, if you don't provide the values here, you can use the hook script to filter the errors and automatically retry select errors.

  4. After you configure the settings, click Preview here (or in the Script hook) to view the error records. Here, you can check and decide if you would like to perform any of the following operations on the data or records before it moves to the next step.

  5. Click Save.

(Optional) Operations you can perform on the export

You can perform the following operations on the export based on your scenario and requirements:

error-automation-export-operations.png
A. Transform and map the error records

If you'd like to transform your records and then move it to the next step, click the transformation icon (transform.svg) and configure the fields.

error-automation-transformation-1.png
B. Filter the error records

If you'd like to filter the records, click the filter icon (filterIn.svg) to apply an export (output filter) so that only select data is moved to the next step. You can edit the filter function that's available in the retryAndResolveScript.

error-automation-export-filter.png
C. Edit the preSavePage hook script to filter or modify error records

If you'd like to save the records with specific details or format it before the records move to the lookup step. Click the hook icon (hook.svg) and edit the preSavePage function in the retryAndResolveScript that's available for quick use. Click the edit icon (pencil.svg) to make any changes to the script.

error-automation-hook-script.png

Step 2: Configure the lookup to get additional data

This lookup step uses a GET request to an API endpoint that dynamically includes flow and processor IDs from the previous step to retrieve additional data. It is intended to fetch specific data for use in subsequent steps of a flow.

Check the default settings and preview the data. Then, configure any of the settings based on your requirements. The default settings are provided below.

error-automation-lookup.png
  1. In the Auto-resolve flow, click the lookup step, Get errors, to open the form and edit the settings.

  2. Under General settings, the default values are:

    1. Name is Get errors

    2. Connection is the earlier connection you'd used in the previous step

  3. Under What would you like to export?, the default values for

    1. HTTP method is GET

    2. Relative URI is /v1/flows/{{{record._flowId}}}/{{{record._processorId}}}/errors

  4. Under Configure export type, the default value is All.

  5. Under Does this API use paging?, the default value for

    1. Paging method is Next page URL

    2. Path to next page URL field in HTTP response body is nextPageURL

  6. Under Non-standard API response patterns, the default value for

    1. Path to records in HTTP response body is errors

  7. Under Advanced, the default selection is 1000.

  8. Click Preview to view the input. Edit any settings if required.

  9. Click Save.

(Optional) Operations you can perform on the lookup

You can perform the following operations on the lookup based on your scenario and requirements:

error-automation-lookup-optional-operations.png
A. Transform the error records

If you'd like to change your lookup data before it is processed by the next step in your flow, use transformation. You can simplify and modify the data so it's easier for your import to process.

error-automation-lookup-transformation.png
B. Map results into the source error records

If you'd like to merge data returned from a lookup into the source data, use results mapping. Then, you can use the results returned from a lookup in other steps later on in the flow. The field mappings you define will be added as new fields or replace existing fields if those fields already exist in the source record.

error-automation-lookup-results-mapping.png
C. Use the response map hook to filter error records

if you'd like to sort, group, or filter records returned by a lookup after results mapping, use the post response map hook.

error-automation-lookup-post-response-map.png
D. Filter the error records

If you'd like to process only error records that meet specific criteria, then you can define them in the input filter editor provided before the import.

error-automation-input-filter.png

Step 3: Configure the import to resolve flow errors

  1. Click the import step to edit the settings to auto-resolve errors or mark errors that satisfy conditions as auto-resolved. The general and import settings have default values that you can leave as is. 

  2. Under Custom settings, replace values based on your requirements.

    1. in Flow id, replace the default value with the flow ID where you want to resolve and post errors.

    2. In Step id, replace the default value with the export ID or the flow step where you want to post auto-retry and post errors. For example, https://integrator.io/integrations/64e3•••eca6d•••ddda7e28d/flowBuilder/64e3•••3b••e641c70d93a32/edit/exports/64e3•••2be8e090••••f947c.

  3. Click Save.

After configuring the steps, click the Enable button and run () the auto-resolve flow. Then, go to the specific flow steps and view the error count in Flow builder to check if the error count is less than it was earlier. Consider tweaking your configuration if required.

When the flow is run, based on the Handlebar expression in the Relative URI the errors are posted to the required flow/flows.

For example,

/v1/flows/{{{record._flowId}}}/{{{record._processorId}}}/resolve

B. Configure and run the Auto-retry flow

error-automation-template-autoretry.png

The steps to configure the auto-retry flow are the same as mentioned above in the auto-resolve flow. See the above section. In this flow, the only difference is that in the import step, the integrator.io retry API endpoint is called instead of the integrator.io resolve API endpoint. The Handlebars expression in the Relative URI setting of the import step will be, for example,

/v1/flows/{{{record._flowId}}}/{{{record._processorId}}}/retry

Configure your flows and try the Error automation via integrator.io APIs template to manage your open errors.