The mysterious override field, and how you can force transaction decisions.
Up until this point, we've been alluding to this capability, but now that you're a spend rule wizard, we think you're ready for the last piece of the puzzle.
Sometimes, you just need exceptions, and the 'override' field on the SpendRule.Restrictions is built for exactly that.
Greenlighting and Redlighting is only for merchant_ type rules, velocity rules cannot have overrides.
General Principles
Override Types
There are two types of overrides:
- greenlight: this makes sure that a transaction is always approved (unless a higher priority rule conflicts)
- redlight: this makes sure that a transaction is always declined (unless a higher priority rule conflicts)
The point of an override is to make an exception within a spend rule's logic. The examples below can help illustrate this.
Examples
Example 1: let's say you have a rule where you want to only allow transactions at car washes and gas stations: we've shown how thats pretty easy with our other rules. But now lets say you have an issue, there's a specific car wash you want to block because they've been overcharging your drivers. Without overriding, this wouldn't be possible, but luckily you live in Givetopia, so we're good here.
{
"name": "Only Allow Car Washes",
"description": "This rule only allows car washes, and handles missed exceptions",
"type": "merchant_allow",
"applyTo": "business",
"restrictions": [
{
"type": "merchant_category",
"value": "CAR_WASHES"
},
{
"type": "merchant_category",
"value": "AUTOMATED_FUEL_DISPENSE"
},
{
"type": "merchant_id",
"value": "11092849551234",
"override":"redlight"
},
]
}
In this example here, the car wash with MID 11092849551234 typically would have been approved by this rule, but we added an override against its merchant.id and redlighted it, so now that specific car wash is blocked even though all other ones would work!
Example 2: lets say you have some merchant rules setup to prevent the purchase of firearms. A common way of doing this is to block the Sporting Goods merchant category, as well as merchants with the world 'gun' in its name. But your local Sports and Dive shop in Laguna Beach would check of both criteria here and so would also be blocked - we can use greenlighting to force an approval.
{
"name": "No Firearms",
"description": "This rule prevents the purchase of firearms",
"type": "merchant_block",
"applyTo": "business",
"restrictions": [
{
"type": "merchant_category",
"value": "SPORTING_GOODS"
},
{
"type": "merchant_name",
"value": "gun"
},
{
"type": "merchant_name",
"value": "Laguna Sports and Dive Shop",
"override":"greenlight"
},
]
}
With the above rule, even though Laguna Sports and Dive Shop is a sporting goods store with gun in its name, the transactions will be approved due to the override.