---
sourceDocument: Brazil Sales Customer Relationship Management
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/order-management

 Release :

    - brazil

ft:locale :

    - en-US

ft:publication_title :

    - Brazil Sales Customer Relationship Management

ft:clusterId :

    - omgmt

bundleId :

    - omgmt

workflow :

    - Customer and Industry


---

# Matrix Loader: CSV rules upload

# Matrix Loader: CSV rules upload {#ariaid-title1}

Release version: Brazil  
Updated March 12, 2026  
![](https://www.servicenow.com/docs/portal-asset/ico-clock) 3 minutes to read
Summarize  
![AI sparkle icon](https://servicenow.com/docs/portal-asset/ai-sparkle-icon) Summarized using AI  
This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.  

## Summary of Matrix Loader: CSV rules upload

The Matrix Loader in ServiceNow CPQ enables administrators to bulk create, edit, and export configuration rules using CSV files.
This tool streamlines management by allowing rule definitions---including conditions, actions, and logic---to be prepared in a spreadsheet and uploaded directly to the ServiceNow environment.
This approach accelerates configuration setup, simplifies testing, and facilitates easy migration between sandbox and production instances, reducing manual entry and errors.
Show full answer Show less  

## CSV Rules Upload Structure

Each CSV row corresponds to a rule record with specific columns that define the rule's properties. Key columns include:

* **recordtype:** Must be "rule" to identify the upload as a rule definition.
* **rulename:** The display name of the rule (up to 255 characters).
* **rulevariablename:** A unique identifier used internally, adhering to naming conventions (letters, numbers, underscores, starting and ending with letter or number).
* **ruledescription:** Optional descriptive text for administrative reference.
* **rulestatus:** Indicates if the rule is active or inactive (inactive rules are ignored).
* **actiontype and actionsubtype:** Define the kind of action executed by the rule (e.g., visibility, message, product inclusion).
* **actionfield, actionvalue, actionproduct, actionquantity, actionmandatory:** Define the targets and parameters for actions, especially for product-related rules.
* **grouping:** Defines logical grouping of conditions (any, all, custom, always) that determines how rule conditions combine.
* **resource/operator/value:** Define the conditional expressions that control rule logic using supported operators such as equals, not equals, less than, contains, etc.

## Condition Groupings and Operators

Logical grouping options determine how multiple conditions are evaluated:

* **any:** Logical OR of all conditions.
* **all:** Logical AND of all conditions.
* **custom:** Complex expressions combining conditions (e.g., (1 OR 2) AND 3).
* **always:** Rule applies unconditionally.

Supported operators allow precise condition matching and include equals, not equals, less than, greater than, contains, and others.

## Best Practices and Guidelines

* Ensure rule variable names exactly match corresponding field references.
* Keep descriptions concise but informative to facilitate troubleshooting.
* Set rules to inactive status for testing before deploying to production.
* Carefully validate grouping logic to avoid unintended rule behavior.
* Verify product references align correctly with Salesforce Product2 IDs or External IDs.
* Use provided sample CSV files as templates to maintain correct formatting.

## Exporting Rules

Administrators can export all rule definitions as a CSV file from the ServiceNow CPQ Admin interface for review or migration purposes. The export process produces a ZIP file containing the rule definitions CSV, enabling easy backup or transfer between environments.  
Use the Matrix Loader to bulk create, edit, and export rules in ServiceNow CPQ. Define rule conditions, actions, and logic in a CSV file to streamline configuration management and automate large-scale updates.
The the Matrix Loader enables administrators to efficiently upload and manage all rule types in ServiceNow CPQ. Instead of manually creating each rule in the Admin interface, you can define them in a spreadsheet, export the sheet to CSV format, and upload it directly into the environment. This enables faster
configuration setup, easier testing, and simplified migration between sandbox and production environments.

## Rules upload structure {#matrix_loader_csv_rules_upload__section_p3g_hc1_fhc}

Each row in the CSV file represents a rule record. The following table outlines the columns and data that the Matrix Loader accepts for rule uploads.
{#matrix_loader_csv_rules_upload__table_xrz_hc1_fhc__entry__4}

| Column Name | Description | Valid Values | Notes |
|-|-|-|-|
| record_type | Identifies this as a rule upload | rule | Required |
| rule_name | Name displayed on the rule list Admin page | Valid strings can be composed of up to 255 characters, including letters, numbers, spaces, and the following special characters: ``{}[]()|\~`_^@?<=>;:/.-,+*'&%$#"!`` | Required |
| rule_variable_name | Unique string used by ServiceNow CPQ to reference the rule | Valid field variable names consist of up to 128 letters, numbers, and underscores. The first and last character must be a letter or number. | Required; must be unique |
| rule_description | Contextual description for administrator reference | Valid strings can be composed of up to 255 characters, including letters, numbers, spaces, and the following special characters: ``{}[]()|\~`_^@?<=>;:/.-,+*'&%$#"!`` | Optional |
| rule_status | Determines if the rule is active | active, inactive | Required; inactive rules are ignored by the engine |
| action_type | Defines the type of action executed when the rule runs | visibility, message, exclusion, inclusion, determination, product | Required |
| action_sub_type | Supplementary definition augmenting action_type | hide, info, warning, error, hidden, disabled, set, forceset, manufacturing, sales | Optional; depends on action_type |
| action_field | Field to which the action applies | \<field variableName\> | Required |
| action_value | Value applied to the action_field | Varies by action type | Required for message, exclusion, inclusion, or determination actions |
| action_product | Product reference for bill-of-material (BOM) actions | SFDC Product Code, Product2 ID, or External ID | Required for product actions |
| action_quantity | Quantity of the product added to the BOM | \<positive float\> or \<positive integer\> | Required for product actions |
| action_mandatory | Specifies whether a BOM product is optional or mandatory | TRUE, FALSE, \<empty\> | Optional; defaults to TRUE |
| grouping | Defines how conditions are grouped and evaluated | any, all, custom, always | Required |
| resource / operator / value | Defines condition tuples forming the rule logic | \<field variableName\>, operator, value | Resource, operator, and value together define the condition expression |
[Table 1. Accepted columns and data for rule uploads]

{#matrix_loader_csv_rules_upload__table_xrz_hc1_fhc}

## Condition groupings {#matrix_loader_csv_rules_upload__section_jpl_jc1_fhc}

Condition groupings determine how rule conditions are logically combined. Supported options include:

* any: ORs all conditions defined in the row.
* all: ANDs all conditions defined in the row.
* custom: Allows complex logic expressions, such as (1 OR 2) AND 3.
* always: Applies the rule unconditionally.
{#matrix_loader_csv_rules_upload__ul_rxg_jc1_fhc}

## Valid operators {#matrix_loader_csv_rules_upload__section_rwj_lc1_fhc}

The following operators are supported for condition evaluation:

* equals (=, ==, equals)
* not equals (!=)
* less than (\<)
* less than or equal
* greater than (\>)
* greater than or equal (\>=)
* contains / not contains
* in / not in
{#matrix_loader_csv_rules_upload__ul_vtx_lc1_fhc}

## General guidelines {#matrix_loader_csv_rules_upload__section_qmn_mc1_fhc}

* Always verify variable names match the field references exactly.
* Keep rule descriptions concise but descriptive to aid troubleshooting.
* Use inactive status for testing new rules before enabling in production.
* Validate grouping logic (any/all/custom) carefully to avoid unintended outcomes.
* Ensure product references (Product2 ID or External ID) align with your Salesforce configuration.
{#matrix_loader_csv_rules_upload__ul_wfy_mc1_fhc}

## Exporting rules to CSV {#matrix_loader_csv_rules_upload__section_b1y_nc1_fhc}

Administrators can export all rule definitions from the ServiceNow CPQ environment to CSV format for review or migration. The resulting ZIP file contains a single CSV file of all exported rule definitions.

1. In the left Admin navigation pane, click Rules.
2. Optional: enter a search string and press Enter to narrow results.
3. Click Export. A message confirming export appears at the bottom of the page.
4. Open the Notification Center (bottom left) and click the Download link.
{#matrix_loader_csv_rules_upload__ol_ogn_4c1_fhc}

## Additional information {#matrix_loader_csv_rules_upload__section_i2z_qc1_fhc}

* Valid strings may include letters, numbers, spaces, and special characters: ``{ } [ ] ( ) | \ ~ ` _ ^ @ ? < = > ; : / . - , + * ' & % $ # "``
* Rule variable names can contain up to 255 alphanumeric characters and underscores. They must begin and end with a letter or number.
* Cells with gray backgrounds in sample files denote irrelevant fields for the current context.
* Use the provided sample files (Admin → Matrix Loader → Sample Files → Rules) as a template for formatting.
{#matrix_loader_csv_rules_upload__ul_mrl_sc1_fhc}
**Related concepts**   

* [Configure the Matrix Loader](https://servicenow-prod.fluidtopics.net/kRQN5xOB8TsNqFHIgYdyig "Use the Matrix Loader to efficiently add, edit, and migrate fields, field options, rules, and layouts in ServiceNow CPQ. Upload CSV files, validate configurations, and streamline bulk updates or environment migrations with error-handling and verification support.")  
**Related reference**   

* [Matrix Loader: CSV rules upload](https://servicenow-prod.fluidtopics.net/LQtXXT~Ko5CObLEYQCoStQ "Use the Matrix Loader to bulk create, edit, and export rules in ServiceNow CPQ. Define rule conditions, actions, and logic in a CSV file to streamline configuration management and automate large-scale updates.")

