{"section":"tutorials","requestedLocale":"en","requestedSlug":"accounting-fields","locale":"en","slug":"accounting-fields","path":"docs/en/tutorials/b2b/b2b-buyer-portal/accounting-fields.md","branch":"main","content":"**Accounting fields** allow you to collect additional purchase information in [B2B Buyer Portal](https://help.vtex.com/en/docs/tutorials/b2b-buyer-portal), such as cost center, internal purchase order (PO) number, and other control information. The platform associates this information with the order, helping the company standardize data, apply internal rules, and facilitate audits.\n\n> ⚠️ 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## Accounting field uses\n\nAccounting fields allow your company to:\n\n- Standardize purchase information between [organizational units](https://help.vtex.com/en/docs/tutorials/organizational-units) and buyers.\n- Require mandatory information before completing an order.\n- Reduce input errors during checkout.\n- Improve traceability, auditing, and compliance.\n\n## Roles\n\nAccounting fields work with two roles:\n\n- **Admin**: Creates the required fields for the company and defines where each field displays on the checkout page.\n- **Buyer**: Completes the fields during purchase.\n\n## Applying accounting fields\n\nThe admin can configure each field to be applied at one of the following levels:\n\n- **Order**: Applies to the entire purchase.\n- **Item**: Applies to each product in the cart.\n- **Address**: Applies to delivery or billing information.\n\n## Accounting field types\n\nThe input requirement for an accounting field depends on how the admin creates the field: through the organization account or through the [Custom Fields API](https://developers.vtex.com/docs/api-reference/custom-fields-api).\n\n### Fields created in the organization account\n\nFields created in the organization account interface are list fields by default. At checkout, the buyer selects one of the predefined values, managed by the admin on the field details page.\n\nWhen creating the field, the admin can also check the **Enable open text input field** option to allow buyers to enter a value manually at checkout, in addition to selecting a value from the list.\n\n### Fields created via API\n\nWhen creating an accounting field, the admin must choose one of the following types:\n\n- **Text (`text`):** Accepts any character string, with no format validation. If the field is set as required, the platform only checks whether the buyer entered a value.\n- **Number (`number`):** Only accepts numbers. Use this type when the value must follow a strictly numeric format.\n- **Option (`option`):** Displays a list of predefined values for selection, allowing data standardization. It's the only type created via API that can have a default value per organizational unit.\n\n## Configuring fields\n\nWhen creating a field, the admin defines the following:\n\n- Field label.\n- Level (order or item).\n- Required setting (required or optional).\n- Open text at checkout (only fields created in the organization account).\n- Type (`text`, `number`, or `option`).\n- Enabled or disabled status (only fields created via API).\n\nThe admin can create and permanently delete accounting fields directly in the organization account, under **Contracts > [contract] > Accounting fields**, in addition to managing the settings and values of each field. For instructions, go to [Add or edit accounting fields](https://help.vtex.com/en/docs/tutorials/adding-or-editing-accounting-fields).\n\n## Default values at checkout\n\nTo reduce manual input and avoid inconsistencies, you can configure default values per organizational unit.\n\nYou can set the following as defaults:\n\n- Address.\n- Card.\n- Accounting fields with predefined values: list fields created in the Organization Account and fields of type `option` created via API.\n\nFor fields created in the Organization Account, you define the default value on the field details page, using the **Set as default** option in the value's options menu.\n\n> ℹ️ For more information on how to add or configure accounting fields, see [Add or edit accounting fields](https://help.vtex.com/en/docs/tutorials/adding-or-editing-accounting-fields).\n\n## Budget allocations to accounting fields\n\nYou can use accounting fields as linked entities in budget allocations, distributing a budget among the values of a field. For example, you can assign a spending threshold to each cost center. This allows the organization to control spending based on accounting information collected at checkout. For more information, go to [Budgets overview](https://help.vtex.com/en/docs/tutorials/budgets-overview).\n\n## Results for admins\n\n- Consistent information across organizational units.\n- Better application of internal purchase rules.\n- Increased security for reports and audits.\n\n## Results for buyers\n\n- Fields display at checkout with clear instructions.\n- Checkout automatically fills in the default values configured for the organizational unit.\n- Orders are completed with less rework and lower risk of error.\n\n## Usage examples\n\n### Requiring mandatory information on all orders\n\n- **Scenario:** The company needs to record the **cost center** and **PO number** on all orders.\n- **Configuration:** Create required fields at the `order` level (`option` for cost center and `text` or `number` for PO number).\n- **Result:** The order can only be completed once all information is provided, ensuring compliance.\n\n### Autocompleting checkout fields by organizational unit\n\n- **Scenario:** The company wants to reduce errors and purchase time across multiple units.\n- **Configuration:** Set default values by organizational unit for address, card, and accounting fields with predefined values.\n- **Result:** The checkout is autofilled after login, reducing effort.\n\n### Classifying projects or activities\n\n- **Scenario:** The company needs to link each purchased item to a project or activity.\n- **Configuration:** Create an `option` field at the `item` level with a list of active projects or activities.\n- **Result:** Each item is linked to a project, facilitating allocation and cost control.\n\n### Differentiating purchases for resale and internal consumption\n\n- **Scenario:** The company needs to identify the purchase type on the order.\n- **Configuration:** Create an `option` field at the `order` level with predefined values (resale/internal consumption).\n- **Result:** Allows the company to segment orders and apply fiscal or business rules.\n\n### Segmenting for management reports\n\n- **Scenario:** The finance team needs to classify orders by expense type.\n- **Configuration:** Create standardized `option` fields at the order level (example: CAPEX, OPEX).\n- **Result:** The finance team can filter reports without manual post-processing.\n\n### Requiring explanation for specific purchases\n\n- **Scenario:** The company requires explanation for sensitive purchases or purchases above a certain amount.\n- **Configuration:** Create a required `text` field at the order level.\n- **Result:** The platform records the explanation on the order for review or auditing.\n\n### Standardizing and centralizing governance\n\n- **Scenario:** The company needs to avoid input variations.\n- **Configuration:** Use `option` fields instead of open text and set default values per organizational unit.\n- **Result:** More consistent and auditable information across the entire operation.\n\n### Controlling compliance in regulated companies\n\n- **Scenario:** The company needs to record regulatory codes per item.\n- **Configuration:** Create a required field at the item level (for example, of type `text` or `option`).\n- **Result:** Each purchased item includes the information required for regulatory audits."}