Prerequisites
BEFORE STARTING
đź’ˇ Find all our feeds in our Flow Org
Initializing the flow
STEP #1
In the configuration, create a Screen Flow
Name it properly according to your company's naming rules
Create a “recordID” variable available at the input if you want to do a screen flow
đź’ˇ You can make a flow that generates and sends for signature or simply that sends for signature depending on what you want to do. Here, we are going to explain a complete generation and sending flow
Generating the document
STEP #2
Add an item to your Apex Action flow
Select the “Generate a Document” action: apex-gnc__DocumentGenerationInvocable
Name it “GenerateDocument”
Fill in the following 3 items:
Output format : “pdf”, “xlsx”, “pptx” or “docx” (to be hardcoded or dynamically according to your choice)
Record Id : retrieve the Salesforce ID of the departure record here. For example, use the “recordID” variable created at the start.
Template Id : get the Salesforce ID for the document template of your choice here. For example, you can display a selection list on the first screen and use here the Id of the template chosen by the user.
Get the generated document
STEP #3
Add a Get Record item to your feed.
Enter a label and an API name.
Choose the “Document template log” object
Filter records using the following criteria:
Creation of the recipient
STEP #4
Add an item to your Action flow.
Select the “Create a certified recipient” action: APEX-GNX__certifiedRecipientInvocable.
Enter a label and an API name: for example “createRecipient”.
Fill in the following 2 elements:
Contact Id : you must indicate the Salesforce ID of the Contact who will receive a signature. For example, you can put a search field in the start screen or search dynamically for the right contact.
Recipient Order : fill in the order of the signatory, for example “1"
New transaction : In the drop-down menu at the bottom “Show advanced option”, check the box “Always start a new transaction”
Creation of collection variables (Contact + Recipient)
STEP #5
Create a new resource
Create a new resource
Assign values to the variables created
STEP #6
Add an “Attribution” element
In the first line of attribution
Add a second line in the attribution with:
Create the delivery
STEP #7
Add an item to your Apex Action flow
Select the “Create a certified delivery” action: APEX-GNX__certifiedDeliveryInvocable.
Name it “CreateDelivery”
Add an “Action” element:
Collection of Contacts Ids : the collection variable “ContactCollection”
Collection of Recipients : the “RecipientCollection” collection variable
Content Document Id : The id of your document via “Get Generated Document”
Name : enter a name, for example “Signature procedure”
New transaction : In the drop-down menu at the bottom “Show advanced option”, check the box “Always start a new transaction”
Save, debug, and activate your flow.
Don't forget to add a flow component to the lightning page of your choice.