Data Connectors

In addition to the data supplied in your initial call to trigger a Workflow, you can enrich your Workflow with data from internal data connectors (orange) and external data connectors (blue). All data connectors let you use your Workflows fields in queries, to pull back relevant data for each execution.

Most Data Connectors will require setting up Credentials, using the Credentials page in the Sidebar. See Adding Datasource Credentials to set up a new one

For the examples below, we're using two dummy data sources, with credentials available here for you to try out: Sample Data Sources

Internal Database

You can query your internal company databases when your Workflow runs, to pull in additional info about the customers/transactions you're decisioning. To get started, add a new Internal Database logic block to your Workflow, and select the credentials you'd like to use from the Datasource dropdown.

Once your block is set up, click into it. You can create a query with matching logic, using Handlebars syntax. Just type a {{ anywhere in your query, and you'll see the list of available fields to insert at runtime.

26322632

You can see what your query would return by editing the Test Input and clicking the blue Test button. Each column returned by your query will be transformed into a field you can use in subsequent rules.

For example:

SELECT block_date, reason FROM blocked_ips WHERE ip = {{customer.ip_address}}

This query will return two fields you can use in your rules: block_date and reason. Once you're satisfied your query is returning the data you want, just click Save.

Note: if your query returns more than one row, only the first row will be parsed for fields.

API Connector

You can hit third-party APIs like fraud/identity data vendors for additional info to use in your rules. You can also use API Connector blocks to pull in data from your own internal services (e.g. feature stores).

Similar to the Database Connector above, drag out block onto your graph, and select the credentials you'd like to use from the Datasource dropdown. Once your block is saved, open it to configure the query.

26102610

Most data sources will use POST requests, and you can insert fields into the URL or Body by typing {{ and selecting fields from the dropdown. Try a request using the Test Input on the right, and when you're satisfied, click Save.

Spreadsheet Lookup

Spreadsheet Lookup blocks don't require credentials. Simply drag a block out onto the graph and give it a name, then upload a CSV you'd like to use as a lookup table. This should have field names as columns, for example

ip

blocked

date

111.11.1111

true

1/1/2021

222.22.2222

false

1/1/2021

You'll need to choose which field from your Workflow you'd like to match against which column of the spreadsheet you've uploaded. For example, if I wanted to match against the ip field in the example above, I might try something like the example below.

26222622

Don't forget to click save once you've picked your matching fields.

Using fields from Data Connectors in Rules

Regardless of which Data Connector you're using, you can use the fields returned by these sources in all subsequent Rules in your Workflow. You'll access these fields by using the shortname for the data source.

For example, if you named the API Connector block we added above risk_score_dat then try typing that into the IF box followed by a period, to see all the fields available for writing rules.

11651165

Handling Errors and Timeouts

Inside your Workflows, on any API Connector or Database Connector block, you can see an Error Path tab. Inside this tab, you can configure what happens if your API Call or Database Query returns an error, or takes too long to respond.

12151215

Timeouts can be configured in milliseconds, seconds, or minutes. After the limit is reached, the Action cell will run (just like if an error was returned. You can put any Then and Action Cells options in that action cell, including breakout rules to other paths in your workflow


Did this page help you?