# Salesforce APIs

This documentation provides an overview of the Salesforce APIs supported by Valorx Fusion, detailing how these APIs enable seamless integration and enhance functionality within the platform.

### CPQ APIs

The **CPQ APIs** provide essential functionality for managing quotes, products, and related data within Salesforce CPQ. These APIs facilitate tasks like reading, validating, calculating, and saving quotes, as well as adding and retrieving products.&#x20;

{% hint style="info" %}
These CPQ APIs will be available in the workflow only if your Salesforce org has the Salesforce CPQ package installed and the Quote and Quote Line objects are included in the data model. Only then will you be able to access and use the CPQ API tasks within the workflow.
{% endhint %}

Below is a summary of the core properties and functionalities of the CPQ APIs:

#### **1. Read Quote API**

**Description:**\
Retrieves detailed information about a specific quote, including its associated Quote Lines and related data.

<figure><img src="/files/vhpSQFgGNoIr45fQvYT5" alt=""><figcaption><p>Read Quote API</p></figcaption></figure>

**Use Case:**

* Fetching the current state of a quote for review or updates.

**Inputs:**

* Quote Form Map

**Outputs:**

* Quote Model with Quote Lines

#### **2. Calculate Quote API**

**Description:**\
Performs pricing calculations for a quote, applying rules such as discounts, taxes, and promotions.

<figure><img src="/files/pHztTMvJWzY1adU1AEjU" alt=""><figcaption><p>Calculate Quote API</p></figcaption></figure>

**Use Case:**

* Ensuring accurate pricing before finalizing a quote.

**Inputs:**

* Quote Form Map
* Quote Line Grid Map

**Outputs:**

* Updated Quote Model with calculated prices

#### **3. Validate Quote API**

**Description:**\
Checks the quote for errors or discrepancies, ensuring it meets predefined business rules.

<figure><img src="/files/wleD1NWx3JykGTji0wf0" alt=""><figcaption><p>Validate Quote API</p></figcaption></figure>

**Use Case:**

* Verifying quote accuracy before submission or approval.

**Inputs:**

* Quote Model

**Outputs:**

* Validation Results (Pass/Fail)
* List of Errors (if any)

#### **4. Save Quote API**

**Description:**\
Saves changes made to the quote and updates the Quote Model in Salesforce.

<figure><img src="/files/B1qONpDiTowB9ydg7G5U" alt=""><figcaption><p>Save Quote API</p></figcaption></figure>

**Use Case:**

* Persisting updates to a quote after modifications.

**Inputs:**

* Updated Quote Model

**Outputs:**

* Confirmation of successful save

#### **5. Read Product API**

**Description:**\
Retrieves product information from the Salesforce Product Catalog.

<figure><img src="/files/TkTtUlX8yeoTjsw2iJQv" alt=""><figcaption><p>Read Quote API</p></figcaption></figure>

**Use Case:**

* Fetching product details for inclusion in a quote.

**Inputs:**

* Product ID or Filter Criteria

**Outputs:**

* Product Details

#### **6. Add Product API**

**Description:**\
Adds a product to a specific quote, updating the Quote Line Model.

<figure><img src="/files/AzakBYzH5uSQZlfJaIP8" alt=""><figcaption><p>Add Product API</p></figcaption></figure>

**Use Case:**

* Including additional products in an existing quote.

**Inputs:**

* Quote ID
* Product ID
* Quantity

**Outputs:**

* Updated Quote Model with the new product

***

#### Notes

* These APIs are designed to integrate seamlessly with Salesforce CPQ functionality.
* Proper authentication and API permissions are required for access.
* Responses are returned in standard Salesforce data formats (e.g., JSON or XML).

By leveraging these APIs, users can automate and streamline their quote and product management processes, improving efficiency and accuracy.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.valorx.com/valorx-fusion/design-studio/workflow-and-ux/salesforce-apis.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
