> ## Documentation Index
> Fetch the complete documentation index at: https://razorpay-881012b3.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Manage Rules on Optimizer

> Know how to edit and manage custom rules on Optimizer.

<div style={{display:"flex",flexWrap:"wrap",alignItems:"center",gap:"0.35rem 0.9rem",border:"1px solid rgba(128,128,128,0.28)",borderRadius:"0.5rem",padding:"0.45rem 0.75rem",margin:"0 0 1.25rem",fontSize:"0.875rem"}}>
  <span style={{fontWeight:600}}>Available in</span>
  <span>🇮🇳 India</span>
</div>

You can edit a custom rule and change:

* [Rule details, conditions and target payment provider](#edit-rule-details-conditions-and-target-payment-provider).
* [Rule priority](#edit-rule-priority).
* [Rule status](#edit-rule-status).

## Edit Rule Details, Conditions and Target Payment Provider

To modify the rule details, conditions and target payment providers:

1. In the list of Custom Rules, click on the required rule name.
2. In the side panel, click **Edit Rule**.
   <img class="click-zoom" src="https://razorpay.com/docs/build/browser/assets/images/optimizer-publish-rule-list.jpg" width="800" alt="Publish Rule List" />
3. The Edit Rule screen is displayed. You can edit the rule details, conditions and target payment providers.
4. Click **Publish Edits** to update the rule.

## Edit Rule Priority

To modify the rule priority order using the drag-and-drop:

1. In the list of Custom Rules, click on the required rule name.
2. In the side panel, click **Change Priority**.
   <img class="click-zoom" src="https://razorpay.com/docs/build/browser/assets/images/optimizer-publish-rule-list.jpg" width="800" alt="Publish Rule List" />
3. Drag and drop the custom rule as per your business need.

<img class="click-zoom" src="https://razorpay.com/docs/build/browser/assets/images/optimizer-reorder-rule-priority.gif" width="800" alt="Reorder Rule Priority" />

## Edit Rule Status

You can deactivate or publish a rule.

### Deactivate Rule

To deactivate a rule:

1. In the list of Custom Rules, click on the required rule name.
2. In the side panel, click **Deactivate Rule**.
3. Confirm the change by clicking **Yes, Deactivate**.
4. Once the rule is deactivated, its status changes to `Draft`.

<img class="click-zoom" src="https://razorpay.com/docs/build/browser/assets/images/optimizer-deactivate-rule.jpg" width="800" alt="Deactivate Rule" />

### Publish Rule

To publish a rule:

1. In the list of Custom Rules, click on the required rule name.
2. In the side panel, click **Publish Rule**.
3. Confirm the change by clicking **Yes, Publish**.
4. Once the rule is published, its status changes to `Live`. You can then drag-and-drop the rule to change its priority level as needed.

<img class="click-zoom" src="https://razorpay.com/docs/build/browser/assets/images/optimizer-publish-rule-list.jpg" width="800" alt="Publish Rule" />

### Related Information

* [Add Payment Providers](/docs/payments/optimizer/add-payment-providers)
* [Create Custom Rule](/docs/payments/optimizer/create-custom-rule)
* [Set Rule Priority](/docs/payments/optimizer/set-rule-priority)
* [Update Default Rule](/docs/payments/optimizer/update-default-rule)
* [SR Analytics Dashboard](/docs/payments/optimizer/success-rate)
* [Single Reconciliation View](/docs/payments/optimizer/reconciliation)
* [Roles and Permissions](/docs/payments/optimizer/roles-and-permissions)
* [Tokenisation for Optimizer](/docs/payments/optimizer/tokenisation)
