Secure your business from login to chargeback
Stop fraud, break down data silos, and lower friction with Sift.
- Achieve up to 285% ROI
- Increase user acceptance rates up to 99%
- Drop time spent on manual review up to 80%
As of July, 2016 Formulas and Actions are a legacy option for automating fraud decisions with Sift. If you are a Sift customer that is already using Formulas, they will continue working as expected, but we encourage you to check out our new suite of automation tools - Workflows!
Formulas make it easy to code logic like this into your application:
This guide will help you use Formulas to automate fraud decision making. While this guide is written for e-commerce businesses fighting chargebacks, you can use the underlying principles of these instructions to stop other kinds of fraud.
Please review the Chargebacks Integration Guide. Prior to using Formulas, you’ll need to follow the first two sections of the guide, which outline how to install our JavaScript snippet and send event data to us.
There are four sections in this document:
There are typically five steps in a checkout flow:
To prevent chargebacks, most merchants need to decide whether to fulfill an order after an order has been accepted and paid for. There are three typical actions a merchant can take at this decision point: fulfill an order, hold an order for further review or automatically reject an order.
With Formulas, you can set up criteria that specifies when to accept, review or reject orders. Then, using Actions, you can ask Sift during a checkout flow which decision to take.
Setup Actions named Hold and Fulfill in the Sift Console
Now we know we want to either hold an order for review or fulfill an order following processing payment, let’s register these Actions with Sift.
Now, create an Action named Fulfill the same way.
In the Sift console, create Formulas that identify Suspicious and Legitimate users, then attach the Hold and Fulfill Actions to those Formulas, respectively.
Now we’ve defined two Actions named Hold and Fulfill, let’s specify when those Actions are applied. Let’s say your fraud team has decided that you want to Hold orders when:
Let’s create a Formula to identify users we find suspicious, then specify that we want to apply the Hold Action for those users.
Repeat the same steps to create a Formula that identifies Legitimate Users, and attach the Fulfill action to that Formula.
Implement code that will call the Actions API.
Let’s assume we want to determine whether to fulfill an order following payment processing. You would do the following to accomplish this:
$transaction
event to SiftPOST
-ing the $transaction
event, append the
parameter return_action=true
to the URL. If you’re using a client
library, set the return_action
parameter to true
in
the track
methodThis pseudo-code outlines this process:
# Action IDs are available in the Sift Console HOLD_ACTION = "557105732e1d36caeaa8d74e" FULFILL_ACTION = "557105ee2e1d36caeaa8d74f" def handle_checkout(order): # Send Sift data related to this order sift_client.track(“$create_order”, order, return_action=True) transaction = process_payment() # Send Sift data related to the transaction # and ask for what Actions to take response = sift_client.track("$transaction", transaction, return_action=True) # Parse the response body and determine # whether the HOLD_ACTION was returned - # if so, hold the order action_ids = [action["id"] for action in response["actions"]] if HOLD_ORDER in action_ids: hold_order() # Else, fulfill the order fulfill_order()
The response you should expect back looks like this:
{ "user_id": "a_user_id", "score": 0.93, "actions": [ // Array of Actions that currently apply to this User { "id": "557105732e1d36caeaa8d74e", "ref": "https://api3.siftscience.com/v3/accounts/<account_id>/actions/557105732e1d36caeaa8d74e" } ] }
If you’re using Formulas to manage a whitelist in which you fulfill orders from certain users regardless of how suspicious they behave, you might want to adjust the process above to check for the Fulfill Action prior to checking for the Hold Action. For example:
action_ids = [action["id"] for action in response["actions"]] if FULFILL_ORDER in action_ids: fulfill_order() elif HOLD_ORDER in action_ids: hold_order()
Congratulations! Now you know how to use Actions to automate fraud decision making. To summarize, the process to integrate Actions is:
Stop fraud, break down data silos, and lower friction with Sift.