How to customize Participants Information shown when creating contract?
Modified on: Tue, 8 Jun, 2021 at 1:41 PM
Please note collections are now called workspaces.
Choose what information should be shown for participants when picking participants to be added to the contract.Our application uses Salesforce Flows for better flexibility and to support for more use cases, when you installed the package our Managed Flow called OneflowParticipantsLogic is also installed and listed at Setup > Flows. Think of this feature as declarative mapping, meaning Salesforce Admins can change to whatever best fits their business workflows by mapping fields from your objects to Participants UI to be transferred to Oneflow. By using flows it's also possible to specify participants order, add participants as pre-default, add pre-defined participants which might not even be related to the object in the first place, the possibilities are endless!
The following video will guide on how to configure this feature:
OneflowParticipantsLogic Flow Overview
First let's have an overview of the flow and the different paths it takes depending on the object which contract are being created from.
To start the flow takes 2 inputs has arguments ObjectId and ObjectName.
It's based on this ObjectName that element flow Decision (Check Base Object) chooses which path to take.
Check the following example for when ObjectName equals Account ( this path is only taken if contracts are being created from an Account Record on Salesforce)
Out-of-the-box OneflowParticipantsLogic flow splits into 4 different paths:
Account (when ObjectName equals Account, path chosen is Creating Contract from Account)
Contact (when ObjectName equals Contact, path chosen is Creating Contract from Contact)
Lead (when ObjectName equals Lead, path chosen is Creating Contract from Lead)
Opportunity (when ObjectName equals Opportunity, path chosen is Creating Contract from Opportunity)
This is why there are 4 paths coming out the Decision Element, one path per each Object.
After taking on then path, flow will make use of other argument ObjectId to query the necessary fields used by the other flow elements.
For each Record returned by the "Get Records" Element you have to:
Assigned to ParticipantFlow the values from the loop Record. The Assignment Element "Add Contact Info to Participants" on OneflowParticipantsLogic flow defines the mapping from Salesforce fields to Participants' UI.
Add the newly created Participant Flow to the Participants List (ParticipantsCollectionSObject) After that add don't forget to add the new Participant Flow to the list of Participants Flows (ParticipantsCollectionSObject - collection variable)which will be returned to the UI.
After adding all participants to the collection variableParticipantsCollectionSObject, flow returns this list to the UI and flow execution finishes.
Please keep in mind that Participants UI is expecting ParticipantsCollectionSObject so make sure you're adding the participants to this variable and not to others.
Last but not least, don't forget to activate the flow and configure which flow should be used depending on the object by going Setup > Custom Settings > Oneflow Relate to>Flow Participant and changing it.
OFapp__contactId__c - Record's Id, on Participants' UI when clicked opens the record.
OFapp__contactName__c - Participant's Name shown on Participants' UI.
OFapp__contactEmail__c - Participant's Email shown on Participants' UI.
OFapp__accountName__c - Participant's Account Name shown on Participants' UI.
OFapp__Is_Participant_Selected__c - Participant's selection checkbox shown on Participants' UI.
OFapp__Oneflow_Role__c - Participant's Oneflow Role (Signatory, Influencer, Viewer) checkbox shown on Participants' UI.
OFapp__Org_Number__c - Participant's Org Number, not shown on UI but transfered to Oneflow.
OFapp__Participant_Description__c - Participant's Description shown on Participants' UI.
OFapp__Participant_Phone_Number__c - Participant's Phone Number shown on Participants' UI.
Default Configuration Check the following Out-of-the box default configuration to know from which fields for the listed objects the information is being shown:
Account When creating contracts from Account
OFapp__contactId__c <- Contact's ID (Id) related to the Account
OFapp__contactName__c <- Contact's Name (Name) related to the Account
OFapp__contactEmail__c <- Contact's Email (Email)related to the Account