
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, User or Lead Id : you must indicate the Salesforce ID of the Contact, User or Lead who will receive the document as a signature. For example, you can put a search field in the start screen or search dynamically for the right record.
Recipient Order : fill in the order of the signatory, for example “1"
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 “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”
Collection of Content Version Ids : you can activate this setting if you want to send multiple documents in the same procedure. Then fill in the collection variable where you will have previously stored the IDs of the versions of content to be signed.
Save, debug, and activate your flow.
Don't forget to add a flow component to the lightning page of your choice.
💡 For more examples, check out our Flow Org