> ## Documentation Index
> Fetch the complete documentation index at: https://www.cashfree.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Dynamic Routing

> Use Cashfree FlowWise dynamic routing to direct each transaction to the best-performing acquirer in real time using machine learning on live success-rate data.

Dynamic Routing helps intelligently direct payments to the most efficient acquiring bank or payment gateway in real-time. Leveraging machine learning rules, we identify the best-performing gateway based on multiple live parameters to ensuring we get the highest possible success rates. This helps improve payment success rates and reduces transaction failures, and minimises costs.

Unlike traditional single-gateway reliance, you can now apply intelligent rules to distribute transactions across multiple gateways based on individual performance.

## Dynamic routing options on Flowwise

### Smart routing

With Smart Routing, Flowwise automatically directs payments to the best gateway based on success rates over recent timeframes (e.g., last 15 or 30 minutes). Simply define your selected gateways in a rule set, and Flowwise handles the rest.

<i>Example: To optimise UPI transactions between PayU and Cashfree, define Smart Routing to dynamically choose the highest-performing gateway.</i>

<img height="200" src="https://mintcdn.com/cashfreepayments-d00050e9/vGHAFJp1ZDsFJV2e/static/images/flowwise/smart-routing.png?fit=max&auto=format&n=vGHAFJp1ZDsFJV2e&q=85&s=788708ea7831b2bd295ff14f7282abdb" data-path="static/images/flowwise/smart-routing.png" />

### Smart routing with weights

This option allows you to set weighted preferences for each gateway in addition to success rates, optimising the balance of traffic based on your needs.

<i>Example: For Credit Card transactions, if you want 60% routed through Cashfree and 40% through PayU while prioritising success, select this routing option.</i>

<img height="200" src="https://mintcdn.com/cashfreepayments-d00050e9/vGHAFJp1ZDsFJV2e/static/images/flowwise/smart-routing-weights.png?fit=max&auto=format&n=vGHAFJp1ZDsFJV2e&q=85&s=0b1b6d662e3b3cecbf5240b1998bc1ae" data-path="static/images/flowwise/smart-routing-weights.png" />

### Threshold routing

Ideal for scenarios with a preferred primary gateway, this routing applies a minimum success rate threshold. If success drops below the threshold, Flowwise switches to Smart Routing for optimal fallback.

<i>Example: Example: If Cashfree is preferred with a threshold of 70%, transactions will route to PayU as backup if Cashfree’s success rate dips below this level.</i>

<img height="200" src="https://mintcdn.com/cashfreepayments-d00050e9/vGHAFJp1ZDsFJV2e/static/images/flowwise/threshold.png?fit=max&auto=format&n=vGHAFJp1ZDsFJV2e&q=85&s=bafca7554b9daf3d06a4562e59a51795" data-path="static/images/flowwise/threshold.png" />

### Volume-based routing

Distributes transaction volume across gateways in defined percentages, regardless of performance metrics. This method offers predictable, controlled traffic distribution.

<i>Example: Example: To equally distribute NetBanking transactions between Cashfree, PayU, and PayTm, set weights at 33.33% each.</i>

<img height="200" src="https://mintcdn.com/cashfreepayments-d00050e9/vGHAFJp1ZDsFJV2e/static/images/flowwise/volume-routing.png?fit=max&auto=format&n=vGHAFJp1ZDsFJV2e&q=85&s=19a2d17e346aef106178f41c6bb42061" data-path="static/images/flowwise/volume-routing.png" />
