Add a new configuration
Learn how to add a new routing rule in Flowwise
Flowwise rules visually can be understood with the below diagram:
Adding a new configuration
A Configuration object reprepsents the set of routing rules that will be invoked by Cashfree for every payment. Our first step is to just create a new configuration. To get started:
- Log in to your Cashfree Dashboard, navigate to Payment Gateway, and select FlowWise.
- In the Configure screen, click Add Configuration and enter a unique Name and Description to identify the rule.
You will now land on the screen to add Rules
to this Configuration
object. A rule
objects represents a condition like:
CREDIT CARD
AND IF Bank is HDFC Bank
There are two type of rules:
- Simple Rule: This must always be set as this is the default rule for a
Configuration
object. - Advanced Rule: This is optional and should be used for advanced routing configuration.
Add a Simple rule
To configure a simple rule, just select a payment gateway from your configured gateways.
Adding an Advanced rule
Advanced rule can be used when you want to route payments based on various parameters such as payment method, bank, card networks, and more. For example: you may want to send all UPI transactions through Cashfree and PayU, and want to ensure routing such that Flowwise ensures the best gateway at any point in time.
Let’s assume we want to add create the following rule: Create a configuration which routes netbanking transactions for major banks (HDFC, ICICI, YES, SBI, AXIS, KOTAK) to PayU and Razorpay, and all other banks to PayTM. Route all other types of transactions to Cashfree (such as UPI, Cards etc)
Step 1
Select Rule 1
and set When Payment Method IS Net Banking
Add conditions to this rule
Add a conditional (AND) within Rule 1, since we need netbanking as well as bank names AND When Issuing Bank IN HDFC, ICICI, YES, SBI, AXIS, KOTAK
Add conditions to this rule
Add a conditional (AND) within Rule 1, since we need netbanking as well as bank names AND When Issuing Bank IN HDFC, ICICI, YES, SBI, AXIS, KOTAK
Decide Routing
Now, that we have a rule we need to add gateways to this rule. Since we wanted to add PayU and Razorpay to this rule, we also need to decide how should routing take place between these two gateways. Recall our dynamic routing options. Let’s assume that we decide on ‘Smart Routing’ because we want to maximize the success rate. We select ‘Smart Routing’ since we want maximum success rate.
Add gateways
From dropdown in ‘Select Gateways’, we select PayU and Razorpay. We need to ensure that both gateways are active. This completes Rule #1.
Add Rule 2
Now we are left with routing rule for other banks. As in step 2 above, we now add the following rule When Payment Method IS Net Banking AND When Issuing Bank NOT IN HDFC, ICICI, YES, SBI, AXIS, KOTAK
. Note that we are using the NOT IN
operator since we want to exclude these banks.
Add gateway for Rule 2
From dropdown in ‘Select Gateways’, we select PayTm
We now have the Advanced Logic ready to be used in Flowwise.
Was this page helpful?