> ## Documentation Index
> Fetch the complete documentation index at: https://razorpay-60c89f9a-mintlify-audit-missing-sections-1778528421.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Manage Rules on Optimizer

> 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:

<Steps>
  <Step title="Step 1">
    In the list of Custom Rules, click on the required rule name.
  </Step>

  <Step title="Step 2">
    In the side panel, click **Edit Rule**.
  </Step>

  <Step title="Step 3">
    The Edit Rule screen is displayed. You can edit the rule details, conditions and target payment providers.
  </Step>

  <Step title="Step 4">
    Click **Publish Edits** to update the rule.
  </Step>
</Steps>

## Edit Rule Priority

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

<Steps>
  <Step title="Step 1">
    In the list of Custom Rules, click on the required rule name.
  </Step>

  <Step title="Step 2">
    In the side panel, click **Change Priority**.
  </Step>

  <Step title="Step 3">
    Drag and drop the custom rule as per your business need.
  </Step>
</Steps>

## Edit Rule Status

You can deactivate or publish a rule.

### Deactivate Rule

To deactivate a rule:

<Steps>
  <Step title="Step 1">
    In the list of Custom Rules, click on the required rule name.
  </Step>

  <Step title="Step 2">
    In the side panel, click **Deactivate Rule**.
  </Step>

  <Step title="Step 3">
    Confirm the change by clicking **Yes, Deactivate**.
  </Step>

  <Step title="Step 4">
    Once the rule is deactivated, its status changes to `Draft`.
  </Step>
</Steps>

### Publish Rule

To publish a rule:

<Steps>
  <Step title="Step 1">
    In the list of Custom Rules, click on the required rule name.
  </Step>

  <Step title="Step 2">
    In the side panel, click **Publish Rule**.
  </Step>

  <Step title="Step 3">
    Confirm the change by clicking **Yes, Publish**.
  </Step>

  <Step title="Step 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.
  </Step>
</Steps>

### Related Information

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