{"section":"tutorials","requestedLocale":"en","requestedSlug":"adding-or-editing-buying-policies","locale":"en","slug":"adding-or-editing-buying-policies","path":"docs/en/tutorials/b2b/organization-account/adding-or-editing-buying-policies.md","branch":"main","content":"> ⚠️ This feature is only available for stores using [B2B Buyer Portal](https://help.vtex.com/en/docs/tutorials/b2b-buyer-portal), which is currently available to selected accounts.\n\n[Buying policies](https://help.vtex.com/en/docs/tutorials/buying-policies-overview) is a feature that allows users from a buyer organization to configure rules to automatically authorize or deny orders. The dynamic mechanisms of this solution help increase the organization's governance and promote compliance with current buying policies.\n\nIn this guide, you'll learn how to manage buying policies through the following sections:\n\n- Adding a buying policy\n- Viewing policy details\n- Editing a buying policy\n- Deleting a buying policy\n\n> ⚠️ To configure buying policies, the user's [Storefront Roles](https://developers.vtex.com/docs/guides/storefront-roles) role must have the `ManageBuyingPolicies` resource. To authorize orders, the `ApproveOrders` resource is required.\n\n## Adding a buying policy\n\n1. In the [Organization Account home screen](https://help.vtex.com/en/docs/tutorials/organization-account#accessing-the-organization-account), in the **Finance and compliance** section, click `Buying policies`.\n\n    ![buying_policies_image_initial_org_account_page_EN](https://raw.githubusercontent.com/vtexdocs/help-center-content/refs/heads/main/docs/en/tutorials/b2b/organization-account/buying_policies_image_initial_org_account_page_EN.png)\n\n2. On the **Buying policies** page, click the `+` icon at the top of the screen to add a new buying policy.\n3. In the **Add new buying policy** modal, complete the following required fields:\n    - In **Basic information**, set the name and description for the buying policy that will appear at checkout for buyers:\n        - **Name:** Enter the name of the buying policy.\n        - **Description:** Enter a brief explanation of how the policy works. A clear description helps users understand why an order was denied or requires manual approval.\n    - In **Criteria**, set the criteria that will trigger the buying policy. To do this, complete the field with an expression in [JSONata](https://jsonata.org/) format, such as `value > 10000` (orders above USD 100.00). You can select a criterion and only edit the desired values (highlighted in purple):\n        - **Set spending limit criteria:** Options to approve or deny orders based on the order amount. For example, if the order is greater than, less than, or equal to a certain amount.\n        - **Set order field criteria:** Options to approve or deny orders based on order conditions. For example, if it has restricted items or a specific cost center.\n\n    > ℹ️ The values used in the order approval criteria are centesimal, and the currency matches the one used in the order cart.\n\n    - In **Action**, select which action will apply to orders that meet the criteria:\n        - **Deny order:** The order will be denied.\n        - **Bypass all buying policies:** The order will be automatically approved, regardless of the defined criteria.\n        - **Sequential workflow:** The order must be manually approved or denied by an authorized user. For this option, you must enter the name of an organizational unit so that its users can review the order.\n\n        > ⚠️ You can set a hierarchy of up to five organizational units, with the fifth level being the last to review the order. Any level can deny the order, but final approval requires authorization from all levels.\n\n4. To save the settings, click `Add`.\n\nOnce finished, you'll see the confirmation message _\"Buying policy created successfully\"_.\n\n## Viewing policy details\n\nTo view the details of a policy, on the **Buying policies** page, click the buying policy name. Alternatively, in the corresponding row, click the menu icon > `Open`. You'll see an image like the following:\n\n![buying_policies_image_1_EN](https://raw.githubusercontent.com/vtexdocs/help-center-content/refs/heads/main/docs/en/tutorials/b2b/organization-account/buying_policies_image_1_EN.png)\n\n## Editing a buying policy\n\n1. In the [Organization Account home screen](https://help.vtex.com/en/docs/tutorials/organization-account#accessing-the-organization-account), in the **Finance and compliance** section, click `Buying policies`.\n2. On the **Buying policies** screen, in the corresponding row, click the menu icon > `Edit`. Alternatively, on the buying policy [details page](#viewing-policy-details), click `Edit`.\n3. Make the desired changes.\n4. Click `Save`.\n\n## Removing a buying policy\n\n> ❗ Removing a buying policy is permanent and can't be undone. Settings are deleted, but the buying policy use history remains stored for reference.\n\n1. In the [Organization Account home screen](https://help.vtex.com/en/docs/tutorials/organization-account#accessing-the-organization-account), in the **Finance and compliance** section, click `Buying policies`.\n2. On the **Buying policies** page, in the corresponding row, click the menu icon > `Delete`. Alternatively, on the buying policy [details page](#viewing-policy-details), click menu > `Delete`.\n3. In the modal, enter the name of the buying policy you want to delete.\n4. Click `Delete`.\n\nOnce finished, you'll see the confirmation message _\"Buying policy deleted successfully\"_. The policy will no longer be listed when you return to the main page.\n\n> ℹ️ To manage order approval rules via API, see the [Buying Policies API](https://developers.vtex.com/docs/api-reference/buying-policies-api) and the developer guide [Buying Policies](https://developers.vtex.com/docs/guides/buying-policies)."}