> ## 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.

# Salesforce

> Connect Veles to Salesforce: authentication, environment configuration, field mapping across proposals, products, companies, and users.

Veles integrates with Salesforce via API, providing bi-directional sync between your CRM data and the quoting engine. The integration is managed from **Admin Console > Integrations > Salesforce**, which contains eight configuration tabs covering every aspect of the connection.

This page covers the full Salesforce setup. For a quick overview of CRM connection, see [Connect your CRM](/get-started/quickstart/connect-your-crm).

***

## General

The General tab manages the core connection between Veles and your Salesforce instance.

### Authentication

Click **Connect to Salesforce** and log in with your Salesforce admin credentials to authorize the connection. Once authenticated, the General tab displays:

* **Authenticated as** -- the Salesforce user who authorized the connection (name and email).
* **SFDC Connected** status badge -- confirms the connection is live.
* **Primary CRM** badge -- indicates Salesforce is set as your primary CRM in Veles.

<Warning>
  If the authenticated user's Salesforce credentials are revoked or their account is deactivated, the connection will break. Use a dedicated integration user or service account rather than a personal login when possible. See [Integration User](#integration-user).
</Warning>

### Connection information

| Field            | Description                                                                                                                                                |
| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Environment**  | Choose whether Veles connects to your Salesforce **Production** or **Sandbox** instance. Use Sandbox for testing your integration setup before going live. |
| **Instance URL** | The URL of your Salesforce instance (e.g., `https://yourcompany.my.salesforce.com`). Veles uses this to route API calls to the correct org.                |

Click **Update Connection Information** to save changes to the environment or instance URL.

<Tip>
  When first setting up the integration, start with a **Sandbox** environment to test field mappings and sync behavior without affecting production data. Switch to Production once you've validated the configuration.
</Tip>

### Pricebook information

| Field                    | Description                                                                                                                                     |
| ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| **Pricebook** (optional) | Specify which Salesforce Pricebook to use when linking products between the two systems. If not provided, Veles assumes the standard pricebook. |

This setting matters if your Salesforce org uses multiple pricebooks (e.g., separate books for different regions or customer tiers). Set it to the pricebook that matches the products you've configured in Veles.

Click **Update Pricebook** to save.

***

## CPQ

The CPQ tab provides access to your Salesforce CPQ rule configuration. If you're migrating from Salesforce CPQ, this tab lets you view your existing SFDC CPQ rules directly in Veles without switching between systems.

For each imported rule, the CPQ Configuration view shows the original SFDC rule details: rule name, rule ID, active status, conditions, scope, type, evaluation event, and evaluation order. A **View in CPQ** button links back to the original rule in Salesforce.

See [Translating SFDC Rules to Veles](/get-started/rules-and-approval/translating-sfdc-rules-to-veles) for the full migration guide.

***

## Integration User

The Integration User tab configures which Salesforce user Veles uses for API operations. This determines the permissions and visibility available to the integration.

<Info>
  Best practice is to use a dedicated Salesforce integration user rather than a personal admin account. This ensures the connection isn't disrupted when individual users change roles, leave the organization, or update their passwords.
</Info>

The integration user needs sufficient Salesforce permissions to read and write the objects that Veles syncs with: Accounts, Contacts, Opportunities, and any custom objects used in your field mappings.

***

## Field Mapping

Veles provides four separate field mapping tabs, each handling a different object type. Field mapping defines how data flows between Salesforce fields and Veles fields -- which fields correspond to each other, and how values are transformed during sync.

All four mapping tabs follow the same pattern: you define source fields (in one system), target fields (in the other), and optionally set transformation rules.

### Proposal Field Mapping

Maps fields between Salesforce Opportunity fields and Veles Quote/Proposal fields.

**What syncs:**

| Direction              | What flows                                                                                                               |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| **Salesforce → Veles** | Opportunity data populates the quote Context Block: deal name, amount, stage, close date, and custom opportunity fields. |
| **Veles → Salesforce** | Quote status, totals (TCV, ARR), and key metrics write back to custom fields on the Opportunity.                         |

**Common mappings:**

| Salesforce field | Veles field            | Direction      |
| ---------------- | ---------------------- | -------------- |
| Opportunity Name | Quote title            | SF → Veles     |
| Account Name     | Customer name          | SF → Veles     |
| Amount           | Total Contract Value   | Veles → SF     |
| Stage            | Quote status           | Veles → SF     |
| Custom fields    | Custom proposal fields | Bi-directional |

Configure your mappings in the **Proposal Field Mapping** tab. Veles ships with sensible defaults for standard Opportunity fields. Add custom mappings for any org-specific fields you want to sync.

### Product Field Mapping

Maps fields between Salesforce Product/Pricebook Entry fields and Veles Product fields.

**What syncs:**

| Direction              | What flows                                                                            |
| ---------------------- | ------------------------------------------------------------------------------------- |
| **Salesforce → Veles** | Product name, SKU, description, and custom product fields populate the Veles catalog. |
| **Veles → Salesforce** | Product-level data from Veles can write back to Salesforce product records.           |

This mapping is especially important if you maintain your product catalog in Salesforce and want to keep it in sync with Veles. The [External ID](/get-started/pricing-and-packaging/product) field on Veles products stores the Salesforce Product ID to maintain the link between records.

### Company Field Mapping

Maps fields between Salesforce Account fields and Veles Customer (Company) fields.

**What syncs:**

| Direction              | What flows                                                                                            |
| ---------------------- | ----------------------------------------------------------------------------------------------------- |
| **Salesforce → Veles** | Account name, billing address, shipping address, industry, phone, website, and custom account fields. |
| **Veles → Salesforce** | Customer-level data from Veles can write back to the Account.                                         |

Company field mapping ensures that when a rep creates a quote for a customer, the account data from Salesforce is available in Veles without re-entry.

### User Field Mapping

Maps fields between Salesforce User fields and Veles User fields.

**What syncs:**

| Direction              | What flows                                                    |
| ---------------------- | ------------------------------------------------------------- |
| **Salesforce → Veles** | User name, email, title, region, and custom user fields.      |
| **Veles → Salesforce** | User-level data from Veles can write back to the User record. |

User field mapping is particularly useful for [Product Filters](/get-started/pricing-and-packaging/product-filters). If your Salesforce users have region or vertical assignments, mapping those fields to Veles means you can use them as [CRM-sourced filter values](/get-started/pricing-and-packaging/product-filters#crm-fields) without duplicating the data.

***

## Working with field mappings

All four mapping tabs share the same configuration interface. For each mapping:

1. Select the **source field** (the field you're mapping from).
2. Select the **target field** (the field you're mapping to).
3. Optionally set a **transformation** if the value needs to be modified during sync:
   * **Direct** -- value copies as-is.
   * **Formula** -- a formula transforms the value (e.g., concatenating fields, calculating a derived value).
   * **Static** -- a fixed value is applied regardless of the source.

<Tip>
  Review the default mappings before adding custom ones. Veles pre-configures mappings for standard Salesforce fields (Opportunity Name, Account Name, Amount, etc.). You typically only need to add mappings for custom fields specific to your org.
</Tip>

***

## Actions

The Actions tab provides manual operations for the Salesforce integration:

* **Sync now** -- trigger an immediate sync rather than waiting for the next automatic cycle.
* **Reset connection** -- disconnect and reconnect the Salesforce integration (useful for troubleshooting).
* **View sync log** -- review recent sync operations, errors, and field-level issues.

Use the sync log to diagnose integration problems. Each log entry shows the objects synced, the fields updated, and any errors encountered (e.g., field type mismatches, permission failures, or missing required fields).

***

## Salesforce data in Veles

Once connected and mapped, Salesforce data flows into Veles across several areas:

**Quotes.** The [Context Block](/get-started/calculator/quote-options#context-block) can auto-populate from the linked Opportunity: deal name, customer info, rep details, and any mapped custom fields.

**Product Filters.** CRM-sourced fields from the User mapping can drive [Product Filters](/get-started/pricing-and-packaging/product-filters#crm-fields), controlling which products each rep sees during quoting.

**Document Generation.** The full Salesforce data object (account, addresses, stage, custom fields) is available in [document templates](/get-started/document-generation#salesforce-data) via the `salesforce.*` variables.

**Contract Management.** When a quote is [promoted](/get-started/calculator/quote-options#from-quote-to-order-promotion) to an Order, the committed deal data syncs back to Salesforce, keeping the CRM current as deals progress through the lifecycle.

***

## Troubleshooting

### Connection shows disconnected

1. Verify the authenticated user still has active Salesforce credentials.
2. Check that the Instance URL is correct and matches your current Salesforce org.
3. If you recently switched between Sandbox and Production, re-authenticate.
4. Try resetting the connection from the **Actions** tab.

### Fields not syncing

1. Confirm the field mapping exists in the appropriate mapping tab.
2. Check that the field types are compatible (e.g., a Salesforce picklist mapping to a Veles text field may not behave as expected).
3. Verify the integration user has read/write access to the fields in question.
4. Check the sync log in the **Actions** tab for specific error messages.

### Products not linking

1. Confirm the **Pricebook** setting on the General tab matches the pricebook containing your products.
2. Check that the product's External ID in Veles matches the Salesforce Product ID.
3. Verify Product Field Mapping is configured correctly.

<Info>
  For persistent issues, reach out to the Veles team at [**hi@getveles.com**](mailto:hi@getveles.com) with the error details from the sync log.
</Info>

***

## What's next

<CardGroup cols={2}>
  <Card title="Connect your CRM" icon="plug" href="/get-started/quickstart/connect-your-crm">
    Overview of CRM connection for both Salesforce and HubSpot.
  </Card>

  <Card title="Translating SFDC Rules" icon="arrow-right-arrow-left" href="/get-started/rules-and-approval/translating-sfdc-rules-to-veles">
    Migrate your Salesforce CPQ rules to Veles.
  </Card>

  <Card title="Product Filters" icon="filter" href="/get-started/pricing-and-packaging/product-filters">
    Use Salesforce user fields as CRM-sourced filter values.
  </Card>

  <Card title="Document Generation" icon="file-pdf" href="/get-started/document-generation">
    Use Salesforce data in document templates.
  </Card>
</CardGroup>
