Skip to main content
Skip table of contents

Different Flow types (Legacy)

A Dynamo template may contain more than just one Flow. Every has has the Main Flow that is generally tasked with producing a document, but Office templates typically have another Flow as well, tasked with customizing functionality into Action Buttons associated with the produced document. The typical traits of these two types of Flows in Office templates are :

  • The Compose Flow: also called as the Main Flow, decides how the Dynamo process would be in Salesforce, starting with gathering data for the templates, then processing the data, creating the document by filling data into the template and  finally providing different options to handle the outcome document if needed.

  • The Custom Button Flow: only available in Office templates, provide the functionality for the Action Buttons on Dynamo tab when previewing the document created by Dynamo in Office applications. When end-users download the created document and opened it with Office application, they have finished the Compose Flow and left Salesforce, meaning the Dynamo process has ended. In order for end-users to continue their document-driven process and still benefit from Dynamo, we need to create a separated Flow with added functionality into the Dynamo add-in. The extra functionality is presented as buttons in the Dynamo add-in, under the "Actions" group, so called Action Buttons. The functionality of Action Buttons can be customized in different templates. Thus, Action Buttons work only for those documents have been created by a specific Dynamo template.

The Compose Flow

Every Dynamo template includes a Compose Flow (or Main Flow), this Flow tasked with "composing" the result document filled with dynamic content. A Flow doesn't produce anything without being ordered to do so, though. The Flow-specific tag related to this is composeContent, which takes a document template with tags and dynamic parts, and composes a result document out of it. Naturally, this tag needs to be somewhere within the Compose Flow.

The basic structure of a Compose Flow is as follows:

  1. Gathering and processing data: The Flow starts with Steps and/or Forms that gather data for the template through querying and taking user input. Sometimes the data received through queries might not be in a form suited to what the template needs and therefore may need to be refined into a different kind of data structure.

  2. Creating the document: When the required data has been acquired, a Step with composeContent is evaluated. The tag produces the resulting document from a template resource. This template resource is often a resource within the Document application archive, or in case of Office templates, the document itself can serve as the template resource. However, the template to be composed can be any document found in the variable context, so it could, for example, be a document downloaded from Salesforce.

  3. Following actions: After a composed document has been produced, something should be done with it or it will disappear along with the Flow's conclusion. The following actions can be different in each template, depending on the document-driven process.

1. Gathering and processing data

Example in the picture, a Compose Flow starts with "Start" Step, following by an "Options" Form.

image-20240109-102649.png

When clicking to Edit Step in the "Start", you will find all the logics used to gather correct data, such as getting all the necessary Salesforce fields in the Main Object, User object and Related Line Item, or giving a dynamic name for the outcome document.

image-20240109-102657.png

The "Options" Form is to give end-users different choices on how they want the out come document to be.

image-20240109-102707.png

End-user selection will be collected and used to process data in later steps. You can have many Steps and Forms to gather and process data when preparing for the creation phase.

image-20240109-102712.png

2. Creating the document:

The real document creation process usually happens in one "Compose" step.

image-20240109-102717.png

The "Compose" step includes the logic to select the right template parts and merge the appropriate data into those parts. In some complex cases, there might be multiple steps in the creation phase, for example Dynamo will select the document's language, merge data from the coresident language into multiple template parts, and arrange their orders.

After the "Compose" steps, the Flow can continue with the Following Actions such as exporting PDF version for download or allowing customization, etc.

Note:

In some cases one might make use of the fact that a Flow can contain multiple composeContent tags. Since the chosen template resource is composed with the variables currently in the variable context, composing the same template twice but changing variables between the tags results in a different product. Similarly, one can use several template resources to produce different documents in one run of a Flow (example in the picture). However, please note that this option is only for Online Templates and DOES NOT work if the Flow is in an Office Template where the composeContent is composing that template itself.

image-20240109-102725.png

3. Following Actions

Since Dynamo offer the flexibility to create Steps and Forms, there is no fixed action what going to happen after the "Compose" step, neither how end-users will interact with it. A few common Follow-up options to have are:

  • "Download": Have a Form with a link allowing the user to download the document. The document can also be stored into Salesforce. This option is often used in Office Templates, as end-users need to download the created documents in their original format (docx, pptx, xlsx) to open and edit them in Office application.

image-20240109-102807.png

  • "Preview": This is a variant of the "Download" form, in which  instead of having a download link, end-users can select the button "Edit before saving", which will trigger either download the documents (if using Office Template), or open the document to edit in browser (for Online Template). The "Save PDF" button can open the PDF version of the outcome document for previewing and save it straight to Salesforce.

image-20240109-102815.png

  • "Save and Send": The outcome document can be emailed to customers. Saving the document in Salesforce or updating the new version of the document also happen here.

  • "Internal approval": After creating the document, Dynamo can trigger an approval process in which outcome document can be sent for internal collaboration and approval. Extra communication with Salesforce to update the record data is sometimes required.

The Custom Button Flow

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.