Submit a ticket

Customizing Product Mapping for Contracts

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 is the ObjectApiName and the 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:


The name of the product


The description of the product

Price 1 Base Amount


The first unit price.

Price 1 Discount Amount


The first discount amount/percentage.

Price 2 Base Amount


The second unit price.

Price 2 Discount Amount


The second discount amount/ percentage.

Quantity Amount


The amount of this product you want on the contract.

Quantity Type


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

Available options: 

  • Single Choice : single_choice
  • Multiple Choice or checkbox : multiple_choice
  • Quantity or Number : quantity

To read more about quantity type refer 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 Price1 Discount, Price2 Base Amount, and Price2 according to Salesforce data (from Opportunity_Line_Item object in the following example), you must modify the Oneflow mapping: Products flow.

To set up this mapping, you need to make changes in the Create Oneflow Product step of the loop for Opportunity Line Items. You need to map the relevant information from which Opportunity line Item attribute in Salesforce should come. 

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.