Automate actions related to document generation by leveraging the power of Salesforce flows.
We are going to break this training down into 4 steps :
Prerequisites
✓ Ensure that on-click generation is working
✓ Understand the process to be implemented
Find our flow examples
Visit our example flow org for inspiration. Discover the most common use cases from our clients.
⚠️ A verification code will be required to log in. Please contact support to obtain it.
Attention
Un code de vérification vous sera demandé pour vous connecter. Veuillez contacter le support afin de l'obtenir.
Save time and eliminate repetitive actions with Salesforce flow actions.
Tip
The recordId variable is used in almost all screen flows. It is used to create the recordId field and provide the flow with the context from which we are launching the generation.
Tip
In the screen properties, rename the "Next" button in the footer configuration to improve the user experience.
To update the data entered in the previous screen, you can add an update action. It will trigger a next action.
Place the feed on your context.
Our most famous action that will allow you to generate a document automatically
Build your process at your convenience (screen, decision, success message...) and add the Gonexa action.
This flow action is similar to the Generate a Document action, the configuration is similar.
Note
Salesforce does not allow more than 50 future actions at once, so be careful with trigger flows that use this action if the trigger could be called more than 50 times simultaneously.
Whether from a list view or from a trigger, mass generate documents
Generate several documents at once from a list view.
Field: Id
Operator : in
Value : ids
To fill in the value field, create a new resource:
Note
The name is case-sensitive; you must name it exactly "ids".
Add action on the page layout of your main object.
Tip
You can find your flow URL in the flow details.
Use a flow variable as data in a document
Sometimes you need to display one or more dynamic values when generating a document.
In a Salesforce flow:
Start by creating a collection variable in your feed. This variable will store the data you want to show in your document.
Add an assignment action to assign the desired values to the collection variable. The order of the assignments will determine the order of the tags to be positioned in the document.
In the document generation action, activate the “Collection of Dynamic Values” parameter, then enter the collection variable used previously.
In your document template, position Gonexa tags to show dynamic values upon generation.
Dynamic tag
The syntax {!gnxdynamic|1} displays the Nth value of a collection variable.
Parameters:
N = index of the desired value (starts at 1)
Example
With a collection variable containing "Paris, Lyon, Marseille, Bordeaux", {!gnxdynamic|2} will display the second value in the list, which is Lyon.
Use this flow action to convert or merge documents
This flow action allows you to convert a document into a PDF, and also allows you to merge several documents into one.
In a Salesforce flow:
In case you want to merge several documents, create a collection variable to store appendices
Tip
A sample flow is available in the pre-built flow Org.
Use dynamic filters in a flow to filter data
The use of dynamic filters allows the user who generates his document to choose which filter to apply to a child object of the document model.
Generating with dynamic filters can only be done via a Salesforce flow.
In a Salesforce flow:
Create a collection variable in your feed. This variable will store the result of the dynamic filter.
Add an attribution action to assign the result of the dynamic filter to the collection variable.
To do this, you have to
In the document generation action, activate the “Collection of Dynamic Filters” parameter, then enter the collection variable used previously.
Tip
Two sample flows are available in the pre-built flow Org.
Use a flow to email a document
Sometimes you need to send an email with an attachment.
In a Salesforce flow:
Fill in the expected parameters:
You can add other parameters to the action, such as adding a copy of a recipient, adding a custom shipping address, or displaying a sender name
Tip
A sample flow is available in the pre-built flow Org.
Tag each generation to better monitor and manage post-generation actions.
You sometimes need to create automations following the generation of a document, such as sending by email or signature for example.
In a Salesforce flow, you can identify each generation and find that information in the generation log.
In a Salesforce flow:
Note
Text is limited to 255 characters.
With this information in the generation log, you can simply define the conditions for triggering your automations later.