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 in Setup > Process Automation > Flows > Oneflow Mapping: Products.
Why Modify the Default Flow?
Modifying the default configuration of the Oneflow Mapping: Products flow allows you to transfer products to different product groups in the Oneflow contract, without being limited to the default product group configuration we provide. This customization also lets you map various product fields to the Oneflow contract product fields based on your business requirements.
For example, in the default flow configuration, the Opportunity line item sales price is mapped as the Oneflow Product Price 1. However, if you want to map a different product field as Price 1, this can be achieved through flow customization.
Flow inputs
The input to the flow is the ObjectApiName and the RecordId of the record from which the contract will be created.
The default Oneflow Mapping: Products flow is based on opportunity line items and queries for 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. With the new Oneflow package update (version 4.xx), this flow now supports setting multiple product groups and synchronizing product updates from Salesforce to Oneflow (including product create and delete) after you create the contract.
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. |
| Price 1 Discount Percent | No | The first discount percentage. |
| Price 2 Base Amount | No | The second unit price. |
| Price 2 Discount Amount | No | The second discount amount. |
| Price 2 Discount Percent | No | The second discount percentage. |
| Quantity Amount | Yes | The quantity of this product you want on the contract. |
| Quantity Type | No |
The type of quantity of this product. Defaults to Quantity.
To read more about quantity type, refer here. |
Customize mapping of product fields
Oneflow provides the default mapping for the following Product attributes if you are creating a contract from an Opportunity:
| Oneflow Product Field | Opportunity Line Item Field |
|---|---|
| Name (Product Name) | Opportunity Line Item Name |
| Description (Product Description) | Opportunity Line Item Description |
| Quantity Type | Opportunity Line Item Quantity Type |
| Price 1 Base Amount | Opportunity Line Item Sales Price |
| Price 1 Discount Percent | Opportunity Line Item Discount Percent |
| Product Group Name | Opportunity Line Item Product Family |
| Quantity Amount | Opportunity Line Item Quantity |
However, you can add additional mappings for Price 1 Discount Amount, Price 2 Base Amount, or Price 2 Discount (Amount or Percent) or change the existing mapping.
- Modify the Oneflow Mapping: Products flow and add assignments to the Create Oneflow Product Line Item variable.
- You can also change the existing mappings to map other Salesforce fields to existing Oneflow fields such as Price_1.
For example, here the Opportunity line item list price is mapped as a Oneflow Product price_2 base amount.
Customize product groups
You can customize product mapping flow to transfer Opportunity line items to different product groups in the Oneflow contract.
-
Change the values of outcomes in the Check product group decision variable according to your product family picklist values.
-
Configure the Value field of the Assignment variable (Set product group order to x) in each outcome path. This field represents a product group number in the Oneflow template.
This process checks the Opportunity line item product family and assigns the correct Oneflow product group order.
|
NOTE Products without a product family or with an invalid family will be transferred to the product group defined on the Default Outcome in the flow. If the product group number exceeds the number of product groups in the template, these products will go to the last group in the contract. |
|
NOTE If you haven’t set up a Salesforce product family field, go to Setup > Object Manager > Product > Product Family and create new picklist values (e.g. Type 1, Type 2). |
Setup the product attributes you want to transfer to Oneflow
With Oneflow settings, you can disable or enable synchronization of product attributes. For example, you can prevent product price from being sent to Oneflow.
- Go to the Oneflow Configuration page.
- Go to the Product Attributes tab.
- You will see all Oneflow product attributes with checkboxes. Uncheck the fields you don’t want to sync.
- Salesforce >> Oneflow: Activating this will start syncing product updates from Salesforce to Oneflow contracts.
|
NOTE Product name is a required attribute, so don’t uncheck it. |
- Oneflow >> Salesforce: Activating this will sync product updates from Oneflow to Salesforce.
|
NOTE By default, only Salesforce → Oneflow sync is enabled for all product attributes. |
How to send product information from Salesforce to Oneflow
- During contract creation: When you create the contract, the Opportunity product information is automatically sent to Oneflow based on the mapping configuration.
-
After creating the contract: Click the Update button on the contract card to send product updates after contract creation.
After that, a confirmation window will appear. Click Update to confirm.