Standard workflows in Modern Logic return an outcome (Approve,Reject,Investigate). For many usecases, however, you might want to return additional information as part of your decision.

For our example, let's picture a fintech company that wants to offer a line of credit to its customers during onboarding. Their onboarding workflow will need to evaluate the relative riskiness of each customer, which will be stored as risk_score. The workflow will also need to return a custom variable, which we'll call dollar_limit

Let's create a new workflow, following the steps here: Creating a new Workflow

Add an **API Connector** to the Graph using the built-in dummy "Credit Bureau" datasource, and a Ruleset after the datasource called "Basic Checks". Now save your updated Graph.

<aside> ⚠️ This assumes you're on the sandbox, with the standard "dummy data" sources built in. If you're in a different environment, your datasource options may look different.

</aside>

In your "Basic Checks" Ruleset, create a new Rule and select Decision Table as the rule type. We're going to assign a new variable called risk_score for different potential values of our customer's FICO score.

Since this is a credit type workflow, we'll choose to make a higher risk score better, but you can configure custom variables however you like

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/4431b451-20b6-4740-bfba-611a03d2b413/Screen_Shot_2021-06-17_at_12.40.21_PM.png

Start typing "Credit" in the Field for this Column, and select fico_score from autocomplete. We can add new rows to the table with the (+) button. Add 4 rows, and type in 4 conditions. See the example above.

Now you can add a custom risk_score to your actions field. We can add additional rules that adjust this risk_score later on. For example, if we have a variable tracking whether our customers have linked a bank account using Plaid, then we could write a rule to increase the risk_score for these customers (remember, we chose higher=better).

Next, save and deploy your workflow: Saving and deploying Workflows


Let's run some test customers through the workflow, either using Postman to hit the API, or the Test button explained here.

We can then see the scores generated for these customers in the History tab. Pick your test customer, and look at the Results field to see the risk_score for this customer

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/b1e13661-f884-4e73-8a70-f0ea76f2345a/Screen_Shot_2021-06-17_at_12.48.37_PM.png