Customize Product Mapping for Contracts (Salesforce v3.x.x)

Christoffer Utterborn
Christoffer Utterborn
  • Updated

When a Oneflow contract is created in Salesforce, it is possible to pull product-related information from any Salesforce object (including custom objects) to populate the Oneflow product table as the contract is created. This logic is defined by the Oneflow Mapping: Products flow.

You can find this flow at Setup > Flow > Oneflow Mapping: Products.

Flow input

The input to the flow consists of two text variables: ObjectApiName and RecordId of the record from which the contract will be created.

The default flow is based on the Opportunity object and queries the related Opportunity Line Items and Products. However, you may query any object/custom object. These records are converted into an OFapp__OneflowProduct datatype.

The result of the flow is a collection of OFapp__OneflowProduct items. The OFapp__OneflowProduct data type has the following attributes:

Attribute Required? Description
Name Yes The name of the product
Description No The description of the product
Price 1 Base Amount Yes The first unit price.
Price 1 Discount Amount No The first discount amount/percentage.
Price 2 Base Amount No The second unit price.
Price 2 Discount Amount No The second discount amount/percentage.
Quantity Amount Yes The amount of this product you want on the contract.
Quantity Type No

The type of quantity of this product. Defaults to Quantity.

Available options:

  • Single Choice: single_choice
  • Multiple Choice / Checkbox: multiple_choice
  • Quantity or Number: quantity

Read more about quantity type here.

Customize mapping of products

Oneflow provides the default mapping for the following Product attributes if you are creating a contract from an Opportunity:

  • Name (Product Name)
  • Description (Product Description)
  • Product Quantity
  • Price 1 Base Amount (Product Price 1)
  • Quantity Amount (Product Quantity)

However, you may want to add additional mapping for Price 1 Discount, Price 2 Base Amount, and Price 2 Discount or change the existing mapping.

To set Price 1 Discount, Price 2 Base Amount, and Price 2 Discount according to Salesforce data (from the Opportunity_Line_Item object in this example), you must modify the Oneflow Mapping: Products flow.

To set up this mapping, open the flow and locate the loop element for Opportunity Line Items. Inside the loop, find the Create Oneflow Product (Assignment) step. Here you map the relevant Salesforce attributes (from the Opportunity Line Item object) to the product attributes.

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request