In addition to the data supplied in your initial call to trigger a workflow, there are two other ways you can bring data into your workflow executions. You'll see Logic Blocks for both of these when you're editing a workflow.

Screen Shot 2021-10-04 at 10.06.04 AM.png

  1. Internal Database Connectors - let you connect to your internal company databases at runtime, to pull in additional info about the customers/transactions you're decisioning
  2. API Connectors - let you hit third-party APIs like fraud/identity data vendors for additional info about customers and transactions, to use in your rules
  3. (New) gRPC Connectors - in beta, learn more here Using gRPC with Modern Logic

Before you can add a Logic Block for a datasource, you'll need to set up a new set of Credentials in the Credentials page.

Adding new Database Credentials

Let's point our database connector at a very simple table in Postgres, containing a short list of IP addresses we might have fraud concerns about. Note this is purely dummy data, and shouldn't be used in a real production workflow.

Navigate to the Credentials page in the sidebar, and select Add New Credential from the top right.

Screen Shot 2021-10-04 at 10.08.27 AM.png

Select Database as type, and click next. Now let's add a name for this new Credential, as well as the login info for a demo postgres database, hosted at ElephantSQL.

Database Name: jpzqzlow

Host: chunee.db.elephantsql.com

Port: 5432

Username: jpzqzlow

Password: gd4jLNLCgqa8MjG30C7oJgXFD4jR2icq

Click Next. If you see any error message, make sure you copied into the right fields on the form, otherwise you should see a screen with a test query. This demo database has a single table called devices. We'll try a test query to make sure we can pull from it.

Screen Shot 2021-10-04 at 10.10.57 AM.png

Click test and verify you see the expected response. Once you're happy, you can click Save. The new Credential you've just created should now be accessible from your workflows.

Using new Database Credentials in a Workflow

Return to an existing workflow (or create a new one) and click Edit on the top right. Drag out an Internal Database logic block onto the graph.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/2a05249b-b45f-4c7c-9c28-e7695d670c94/Screen_Shot_2021-08-03_at_12.14.50_PM_(2).png