> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getveles.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Translating SFDC Rules to Veles

> Migrate your Salesforce CPQ rules to Veles: understand how SFDC rule types map to Veles, review your existing rules, and build equivalents.

If you're migrating from Salesforce CPQ (formerly Steelbricks), your existing rule logic doesn't need to be rebuilt from scratch. Veles provides tooling to review your Salesforce CPQ rules directly in the Veles interface and a clear mapping between the two systems' rule architectures.

This guide walks through how Salesforce CPQ rule types translate to Veles rule types, how to use the CPQ Configuration view to audit your existing rules, and common patterns you'll encounter during migration.

***

## The CPQ Configuration view

When your Salesforce instance is [connected](/get-started/quickstart/connect-your-crm), Veles can read your existing Salesforce CPQ rules and display them in a **CPQ Configuration** tab. This view shows the original SFDC rule details alongside the Veles rule configuration, so you can review and translate rules without switching between systems.

For each imported rule, the CPQ Configuration tab shows:

| Field                | Description                                                |
| -------------------- | ---------------------------------------------------------- |
| **Rule Name**        | The original Salesforce CPQ rule name.                     |
| **Rule ID**          | The Salesforce record ID for reference.                    |
| **Active**           | Whether the rule is active in Salesforce.                  |
| **Conditions Met**   | The condition logic (All, Any, or Custom).                 |
| **Error Message**    | The message displayed when the rule fires.                 |
| **Evaluation Event** | When the rule evaluates (Save, Calculate, Always).         |
| **Evaluation Order** | The numeric order in which rules are processed.            |
| **Scope**            | Quote or Calculator.                                       |
| **Type**             | The SFDC rule type (Validation, Alert, Selection, Filter). |

The condition rows show the full SFDC condition structure: the tested object, tested field, operator, filter type, and filter value for each condition in the rule.

A **View in CPQ** button links back to the original rule in Salesforce for side-by-side comparison.

***

## How SFDC rule types map to Veles

Salesforce CPQ has a different rule taxonomy than Veles. Here's how the major rule types translate:

### Product Rules

Salesforce CPQ Product Rules enforce constraints on product configuration and selection. They come in several subtypes:

| SFDC Product Rule type                       | Veles equivalent                                                                                                                                        | Notes                                                                                                                                                                         |
| -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Validation** (Error/Warning on quote)      | [Quote Validation Rule](/get-started/rules-and-approval/quote-validation-rules) or [Row Validation Rule](/get-started/rules-and-approval/untitled-page) | Use Quote Validation for deal-level checks. Use Row Validation for line-item checks. Veles separates these into two kinds; SFDC combines them under Product Rules with scope. |
| **Selection** (auto-add/remove products)     | [Pricing Rule](/get-started/rules-and-approval/pricing-rules) with product logic                                                                        | Veles Pricing Rules can automate product-level adjustments. For complex auto-add logic, use [Formula Rules](/get-started/rules-and-approval/formula-rules).                   |
| **Filter** (restrict product selection)      | [Product Filters](/get-started/pricing-and-packaging/product-filters)                                                                                   | Veles handles product visibility through the filter system on the price book, not through rules.                                                                              |
| **Alert** (display message without blocking) | Quote or Row Validation with **Warn** severity                                                                                                          | In Veles, the severity level (Warn vs. Error) controls whether the rule blocks or just alerts.                                                                                |

### Price Rules

Salesforce CPQ Price Rules automatically adjust field values on quote lines based on conditions. They're the closest equivalent to Veles [Pricing Rules](/get-started/rules-and-approval/pricing-rules).

| SFDC Price Rule concept    | Veles equivalent                                                                                                                          |
| -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| Price condition (the "if") | Pricing Rule condition (scope + facts + operators)                                                                                        |
| Price action (the "then")  | Pricing Rule adjustment (percentage or fixed amount)                                                                                      |
| Lookup-based pricing       | [Data Sheet](/get-started/pricing-and-packaging/data-sheets) + VLOOKUP in a [Formula Rule](/get-started/rules-and-approval/formula-rules) |

### Approval Rules

Salesforce CPQ uses Advanced Approvals (or standard Salesforce approvals) to route deals. Veles handles this through the [Approvals](/get-started/calculator/approvals) system with tier-based routing.

| SFDC Approval concept    | Veles equivalent                                                                                      |
| ------------------------ | ----------------------------------------------------------------------------------------------------- |
| Approval rule conditions | Any rule kind with **Requires Approver** toggled on                                                   |
| Approval chain / steps   | [Approval Tiers](/get-started/calculator/approvals) (Tier 1 → Tier 2 → Tier 3)                        |
| Approver assignment      | Org hierarchy-based routing via [manager relationships](/get-started/quickstart/adding-users#manager) |

***

## Key structural differences

Understanding these differences will help you translate rules more effectively:

### Scope is separated, not embedded

In Salesforce CPQ, a single Product Rule can have conditions that evaluate at the quote level or the line level, determined by the Tested Object and scope fields. In Veles, this is split into distinct rule kinds: [Quote Validation](/get-started/rules-and-approval/quote-validation-rules) for deal-level and [Row Validation](/get-started/rules-and-approval/untitled-page) for line-level. You may need to split one SFDC rule into two Veles rules.

### Condition logic is explicit

SFDC CPQ uses "Conditions Met" (All, Any, Custom) to control how multiple conditions are combined. In Veles, conditions within a single Rule Set are always AND-ed (all must be true). For OR logic, create multiple Rule Sets on the same rule -- each Rule Set is evaluated independently.

### Evaluation order is simplified

SFDC CPQ uses explicit Evaluation Order numbers (100, 200, 800, etc.) to control which rules run first. Veles evaluates all active rules simultaneously against the current quote state. If you have rules with order-dependent logic in SFDC (where Rule A's output affects Rule B's input), you may need to restructure them as a single [Formula Rule](/get-started/rules-and-approval/formula-rules) in Veles.

### Error messages are per-rule, not per-condition

In SFDC CPQ, the error message is set at the Product Rule level and fires when the condition set is met. Veles works the same way -- the message is set on the Rule Set action and displays when conditions are met. This maps directly.

### Lookup-based rules use Data Sheets

SFDC CPQ Price Rules can look up values from custom objects or related records. In Veles, this is handled through [Data Sheets](/get-started/pricing-and-packaging/data-sheets) -- reference tables that rules and formulas can query via VLOOKUP. If your SFDC rules reference custom objects for pricing logic, migrate that data into Data Sheets.

***

## The translation process

<Steps>
  <Step title="Audit your SFDC rules">
    Review all active Product Rules, Price Rules, and Approval Rules in your Salesforce CPQ instance. Use the CPQ Configuration tab in Veles to see them in one place. For each rule, note the type, conditions, actions, and business purpose.
  </Step>

  <Step title="Categorize by Veles rule kind">
    Map each SFDC rule to its Veles equivalent using the tables above. Flag any rules that need to be split (one SFDC rule → two Veles rules) or restructured (order-dependent logic → single Formula Rule).
  </Step>

  <Step title="Migrate supporting data">
    If your SFDC rules reference custom objects, picklist values, or related records for pricing logic, migrate that data into [Data Sheets](/get-started/pricing-and-packaging/data-sheets). Set up [Product Categories](/get-started/pricing-and-packaging/product-categories) and [Custom Fields](/get-started/pricing-and-packaging/product) in Veles to match the dimensions your SFDC rules evaluate against.
  </Step>

  <Step title="Build the Veles rules">
    Create each rule in Veles using the appropriate kind. Configure the scope, conditions, actions, severity, and approval routing. Reference Data Sheets where SFDC rules used lookups.
  </Step>

  <Step title="Test side by side">
    Build test quotes that trigger each rule. Compare the behavior against the same scenario in your SFDC CPQ environment. Verify that the alert messages, blocking behavior, and approval routing match your expectations.
  </Step>

  <Step title="Activate and decommission">
    Once validated, activate the Veles rules and deactivate the corresponding SFDC CPQ rules. Keep the SFDC rules in an inactive state initially (rather than deleting) so you can reference them if issues arise.
  </Step>
</Steps>

***

## Common translation patterns

### SFDC Validation → Veles Quote Validation

An SFDC Product Rule of type Validation with scope Quote that checks whether the total discount exceeds a threshold.

**In Salesforce CPQ:**

* Type: Validation
* Scope: Quote
* Condition: `SBQQ__NetPrice__c` related, discount threshold
* Error Message: "Discount exceeds maximum."

**In Veles:**

* Kind: [Quote Validation](/get-started/rules-and-approval/quote-validation-rules)
* Scope: Option
* Fact: Discount %
* Operator: Is Greater Than or Equal To
* Severity: Warn
* Message: "Discount exceeds maximum. Requires approval."
* Approval: Tier configured

### SFDC Line-level Validation → Veles Row Validation

An SFDC Product Rule that validates a condition on specific quote lines (e.g., minimum quantity for a SKU).

**In Salesforce CPQ:**

* Type: Validation
* Scope: Quote (but condition tests `SBQQ__QuoteLine__c` fields)
* Condition: Product-specific, quantity threshold

**In Veles:**

* Kind: [Row Validation](/get-started/rules-and-approval/untitled-page)
* Scope: Row
* Conditions: Product SKU equals target **AND** quantity threshold
* Severity: Error

Note the scope difference: SFDC may use Quote scope with line-level tested fields. Veles separates this cleanly into Row Validation.

### SFDC Price Rule → Veles Pricing Rule

An SFDC Price Rule that adjusts the net price based on a condition (e.g., bundle discount when multiple products are present).

**In Salesforce CPQ:**

* Price Condition: Product count or specific SKU presence
* Price Action: Set discount or adjust target field

**In Veles:**

* Kind: [Pricing Rule](/get-started/rules-and-approval/pricing-rules)
* Scope: Option
* Condition: Product Count ≥ threshold
* Action: Percentage discount on matching lines

### SFDC Lookup Price Rule → Veles Formula Rule + Data Sheet

An SFDC Price Rule that uses a Summary Variable or custom object lookup to determine the adjustment.

**In Salesforce CPQ:**

* Summary Variable calculates aggregate value
* Price Action references the summary

**In Veles:**

* Migrate the lookup data into a [Data Sheet](/get-started/pricing-and-packaging/data-sheets)
* Build a [Formula Rule](/get-started/rules-and-approval/formula-rules) that uses VLOOKUP to query the Data Sheet
* Apply the looked-up value as the condition threshold or adjustment amount

***

## What doesn't translate directly

Some Salesforce CPQ features don't have a 1:1 equivalent in Veles and require a different approach:

**Twin Fields.** SFDC CPQ uses twin fields (`SBQQ__` custom fields) on quote and quote line objects. Veles uses its own field model. Map SFDC twin fields to the appropriate Veles [facts](/get-started/rules-and-approval/learn-the-basics#available-facts) (for rules) or [custom fields](/get-started/pricing-and-packaging/product) (for data).

**Summary Variables.** SFDC CPQ Summary Variables aggregate values across quote lines. In Veles, use the list processing functions (FILTER, MAP, SUM) in [Formula Rules](/get-started/rules-and-approval/formula-rules) to replicate this behavior.

**Product Selection rules (auto-add).** SFDC CPQ can automatically add or remove products from a quote. Veles doesn't auto-add products via rules. Required product bundling is handled through validation rules that warn or block when a required product is missing, prompting the rep to add it manually.

**Configuration Attributes.** SFDC CPQ Configuration Attributes (for guided selling) don't have a direct equivalent. In Veles, product configuration is handled through the pricing plan, [custom fields](/get-started/pricing-and-packaging/product), and the [Calculator](/get-started/calculator/options) interface.

***

## Tips for migration

**Don't translate 1:1 blindly.** SFDC CPQ rules often accumulate over years and include workarounds for platform limitations. Use the migration as an opportunity to simplify. Ask "what business outcome does this rule enforce?" and build the simplest Veles rule that achieves it.

**Consolidate where possible.** Multiple SFDC rules that enforce related logic (e.g., three rules for different discount thresholds) might map to a single Veles rule with tiered approvals, or a single Formula Rule with CASE logic.

**Prioritize by impact.** Start with the rules that affect the most quotes: discount limits, required products, billing restrictions. Translate edge-case rules last.

**Keep SFDC rules inactive, not deleted.** During the transition period, deactivate SFDC rules rather than deleting them. If a Veles rule doesn't behave as expected, you can reactivate the SFDC rule while you debug.

***

## What's next

<CardGroup cols={2}>
  <Card title="Getting Started with Rules" icon="shield-check" href="/get-started/rules-and-approval/learn-the-basics">
    Overview of the Veles rules engine.
  </Card>

  <Card title="Formula Rules" icon="function" href="/get-started/rules-and-approval/formula-rules">
    Build complex logic for rules that don't map to simple kinds.
  </Card>

  <Card title="Data Sheets" icon="table" href="/get-started/pricing-and-packaging/data-sheets">
    Migrate SFDC lookup data into Veles reference tables.
  </Card>

  <Card title="Connect your CRM" icon="plug" href="/get-started/quickstart/connect-your-crm">
    Set up the Salesforce connection to access the CPQ Configuration view.
  </Card>
</CardGroup>
