We will be transitioning to a new and improved knowledge base in the near future. Stay tuned here for updates as we prepare for launch.

The Basics of Smart Flows

Components

Xpertdoc Smart Flows consists of five main components.

Server Component

The server component does all the heavy lifting, e.g. fetching data, generating documents, running flows, and more. Typically, you’ll need to access it only during the installation and configuration stage.

Project Console

The Project Console is where you manage your Smart Flows projects and their functionalities – connectors, languages, printers, data sets, templates, flows, assets, etc.

Template Builder

The Xpertdoc Template Builder is an add-in for Microsoft Word where you design your templates, which includes adding data mappings, conditions, loops, formatting, etc.

Flow Execution Panel

The Flow Execution Panel is where users run flows.

API

The API connection can be used by developers to program custom document generation capabilities into the software.

Note: If you are using Xpertdoc Smart Flows for Microsoft Dynamics 365/CRM, you'll also have access to the Workflow Assembly within the Microsoft environment.

The Smart Flows Process

Xpertdoc Smart Flows is based on the following process:

Connector

Set up a connector to link an external data system with your CRM platform. The introductory wizard will ask you to set up a connector.

Data Set

Create a data set. Data sets define the data that needs to be pulled from the connector, and how it is formatted.

Template

Create a template that will be linked to the data set, and design it using the Xpertdoc Template Builder. You’ll need to map the data into the template.

Flow

Build a flow through which the template will be used to generate a document. You can configure multiple steps and settings in your flow.

Document

A user runs the flow. The generated document goes through the steps you have configured until the flow has been completed.


Once the Smart Flows process – connector, data set, template, flow, and document – is properly set, users can easily and efficiently execute document generation tasks, with a single click from the CRM platform:

  • Click the “Smart Flows” button to open the Flow Execution Panel.
  • Select the flow you need to run and start it.

Sample Projects

Importing a Sample Project

Step 1

Go to Xpertdoc’s FTP site and download the sample project you want to import. To import an item, click on “Import” in the control panel.

Then, click on “Browse” and select or drag and drop your .zip file.

Select the item you want to import and click the “Next” button.

Note: If there are conflicts, e.g. you are importing a data set dependent on a connector that isn’t present in the import file or the target project, you’ll be asked to resolve them by mapping necessary components to existing ones.

This allows you to import items without having to manually adjust links between dependencies.

Data Sets

Data sets define the structure of the data available to be merged into a template.

For more information on data sets, please visit our Knowledge Base: https://kb.xpertdoc.com/display/UM/Data+sets

Creating a Data Set

Step 1

Start by defining the data you’ll need to include in your document, i.e. the sales quote template:

  • Quote
  • Quote Line
  • Product
  • Account
  • Contact
  • User

A data set can be used in multiple templates.

Step 2

From the Smart Flows Project Console, click on the “Data sets” icon to create a new data set.

Click on “+ Create.” The “Create data set” window will appear:

  • Name is the name of your data set.
  • Description provides a brief explanation of your data set (optional).
  • Type of data set:
  • Standard: CRM (Microsoft Dynamics365 or SugarCRM).
  • Custom: User input.
  • Schema:
  • Xpertdoc Smart Forms: Advanced forms from Xpertdoc Portal.
  • Primary entity determines the main entity (also called “module”, “object” or “table” in other systems), in the data set. Select “Quote.”

Step 3

Select the fields and additional entities required for this data set. From the “QUOTE” entity, choose “N:1 RELATIONS” (many to one).

Note: To add other entities to your data set, expand the list by clicking on the triangle and click to check “Owner”, “User”, “Potential Customer”, “Account”, and “Contact.”


Then under “1:N RELATIONS” (one to many), select “Quote Line (quote_details).”


From the “ACCOUNT” entity, under “N:1 RELATIONS”, select “Primary Contact” and expand to select “Contact.”


From the “QUOTE LINE” entity, under “N:1 RELATIONS”, select “Existing Product” and expand to select “Product.”


Step 4

Samples are files of content corresponding to the structure of the data set. Adding samples to a data set enables you to preview (and make changes as needed) your document during template design.

Note: It is not required or necessary to use samples. However, they can improve the design experience by allowing you to see your changes immediately.

For more information on samples, please visit our Knowledge Base: https://kb.xpertdoc.com/display/UM/Data+sets#Datasets-Samples


The data set is now created and ready to use in a template. Go back to the Smart Flows Project Console and click the “Templates” icon to start designing.

Templates

Templates are blueprints of your documents, typically containing static content and data mappings.

For more information on template design, please visit our Knowledge Base: https://kb.xpertdoc.com/display/UM/Templates

Creating a New Template

Step 1

From the Smart Flows Project Console, click on the “Templates” icon to create a new template. Click on “+ Create.”

In the “Create data set” window, fill in all the required fields and click the “Create” button:

  • Name is the name of your template.
  • Description provides a brief explanation of what your template is for (optional).
  • Data sets are collections of data. One or many data sets can be connected to a template.
  • Type of template:
    • Standard: One template, one document.
    • Composition: Multiple templates merged into one document.
    • Xpertdoc Template Designer: Advanced templates from Xpertdoc Portal.

Step 2

The “Basic settings” window provides an overview of the template. You can add additional data sets as needed. For our sales quote sample, we only require one data set – the Xpertdoc data set.

To switch to the “Design” mode of the quote template, click “Design” on the left-hand menu.

Step 3

In the “Design template” window, select the language variant of the template. The default language is English. Click the “Design” button.

This will trigger the download of the quote template – “Quote_Test Drive.docx.” The downloaded document will appear at the bottom of the browser. Click on it to open the template in Microsoft Word and start designing.

Note: While Word is opening “Quote_Test Drive.docx,” you might see the “PROTECTED VIEW” message. Click on the “Enable Editing” button to continue. The Xpertdoc Template Builder pane will appear at the right of the screen. If the pane does not appear, it might be because the Xpertdoc Microsoft Word add-in is not installed. Close Word and install the add-in on your computer, then try opening the template again.

Step 4

Xpertdoc Template Builder Pane

The Xpertdoc Template Builder has three tabs:

  • Data Set shows all data sets connected to the template.
  • Mapping displays all fields that are included in the template.
  • Xpertdoc Styles allow you to define styles that can be reused in multiple mappings. Using Xpertdoc styles is like using Word styles, except that Xpertdoc styles have additional options available.

Toolbar

  • Arrow inserts fields in a template.
  • Diamond adds conditions.
  • Curved arrow creates loops.
  • Group regroups items in a loop.
  • Pseudo-field (<>+) creates calculations or expression fields.
  • Resultset regroups fields that have a filter.
  • Pseudo-relation creates links between data items.

1.       Data sets and fields

2.       Field Inspector shows the data of the selected field within the data set

Click on any field in the Xpertdoc Template Builder pane. The selected field will be highlighted and the Field Inspector will show the data associated with the field.

Cover Page

Step 1

On the cover page of the sales quote template, two fields are dynamically populated:

  • [Name]: Account name
  • [Effective_Date]: Pseudo-field adds 30 days from the generation date

To insert the dynamic field “[Name]” in the data set from the Xpertdoc Template Builder pane, place the cursor in your template where you want to add the field.

Then, select the field from the “Data Set” tab. You can either double-click on the field or the arrow in the toolbar.

Step 2

The “[Effective_Date]” field defines the expiry date of the sales quote. It is a pseudo-field that adds 30 days from the generation date. Here is how to create a pseudo-field.

In the “Data Set” tab of the Xpertdoc Template Builder pane, select the parent element of the new pseud-field. The pseudo-field will become a child element.

In the “Pseudo-field” window:

  • Enter the display name.
  • Select “Text” or “Number” as the type of data.

Select “Insert function.”

To add 30 days from the generation date of the quote, choose the “addDays” function and click “OK.”

Fill in the two fields:

  • dateTime: Field that must have a pre-determined additional number of the days. The date of this field is based on the date the quote was generated. This field is in “Metadata”, “Document Generation Start.”

  • number: Value to add – in this case, 30 days.


Once the “dateTime” and “number” fields are completed, Xpertdoc Smart Flows will automatically add the formula in the box under “Insert function.”

Note: Advanced users can enter the function directly, as shown below.

In the “Data Set” tab under the parent-element “Quote”, a new “[Effective_Date]” field is displayed in blue (meaning it’s a pseudo-field).

To apply a specific format to the “[Effective_Date]” field, select the field, then select the “Mapping” tab and click on the “Setting” icon.

In the “Formatting” window:

  • Select “Date” as the format type.
  • Select “English” as the locale.
  • Select how the date elements should be displayed as the type.

Once a format has been applied, the “[Effective_Date]” field can be added anywhere in the template.

For more information on pseudo-fields, please visit our Knowledge Base: https://kb.xpertdoc.com/display/UM/Pseudo-fields

Page 2 – “Thank You”

Step 1

Here are the dynamic fields on page 2 of the sales quote template:

  • [Name]
  • [Address1_Line1]
  • [Address1_Line2]
  • [Address1_Line3]
  • [Address1_City]
  • [Address1_StateOrProvince]
  • [Address1_PostalCode]
  • [QUOTENUMBER]
  • [AccountNumber]
  • [RequestStart]: Field from “Metadata”, “Document Generation Start”
  • [FullName]: Full name of the primary contact
  • [Effective_Date]: Pseudo-field previously created for the cover page
  • [Creator]: Field from “Metadata”, “Active User” (user who launched the Smart Flow)

The “[Address_Line2]” and “[Address_Line3]” fields will be formatted as if they do not include any data. To remove these fields from the final document, and therefore remove unwanted blank lines:

  • Select “[Address_Line2].”
  • Go to the “Mapping” tab.
  • Click on the “Setting” icon.
  • Go to the “Formatting” window.
  • Select the “Other” option in the left-hand menu.
  • Check “Remove the paragraph.”
  • Repeat the steps for “[Address_Line3].”

Page 3 – “Price Quotation Summary”

Step 1

Here are the dynamic fields on page 2 of the sales quote template:

  • [Name]
  • [Address1_Line1]
  • [Address1_Line2]: Removed if blank (same as page 2)
  • [Address1_Line3]: Removed if blank (same as page 2)
  • [Address1_City]
  • [Address1_StateOrProvince]
  • [Address1_PostalCode]
  • [AccountNumber]
  • [QUOTENUMBER]
  • [RequestStart]
  • [Effective_Date]: Pseudo-field previously created for the cover page
  • [Name_Full_Product]: Pseudo-field with “Concat” function to merge the “QuoteDetailName” and “Write-in Product” fields
  • [ProductNumber]
  • [Quantity]
  • [PricePerUnit]
  • [ExtendedAmount]
  • [DiscountPercentage]
  • [DiscountAmount]

To create the “[Name_Full_Product]” pseudo-field, use the procedure previously described to create the “[Effective_Date]” pseudo-field. In this case, the parent-element is “Quote_details” and the function is “Concat,” which will merge the “QuoteDetailName” and “Write-in Product” fields.

Step 2

To build a table with a loop:

  • Insert a Microsoft Word table with 4 columns and 2 rows.
  • Type the following titles in the first row: “DESCRIPTION”, “QUANTITY”, “PRICE PER UNIT”, and “AMOUNT.”
  • Insert the following fields from the parent-element “Quotedetail” in the second row: “[Name_Full_Product]” (pseudo-field), “[ProductNumber]” (product ID), “[Quantity]”, “[PricePerUnit]”, “[ExtendedAmount].”
  • Select the second row and click on the curved arrow in the toolbar of the Xpertdoc Template Builder pane. This will automatically create a loop of the items on the second row.

For more information on loops, please visit our Knowledge Base: https://kb.xpertdoc.com/display/UM/Loops

Publishing a Template

Step 1

Once the sales quote template is completed, it must be uploaded to the Smart Flows Content Manager. Click on the “Publish” icon.

A “Publish” window will open. Under “Comment,” you can add comments on this template version. Click “OK.”

The quote template is now published and ready to use in a Smart Flow. Go back to the Smart Flows Project Console and click the “Flows” icon.

Flows

Flows are pre-configured document generation and output management processes.

For more information on flows, please visit our Knowledge Base: https://kb.xpertdoc.com/display/UM/Building+and+managing+flows

Building a Flow

Step 1

From the Smart Flows Project Console, click on the “Flows” icon to create a new flow. Click on “+ Create.”

In the “Create flow” window, fill in all the required fields and click the “Create” button:

  • Name is the name of your flow.
  • Description provides a brief explanation of what the flow does (optional).
  • Template is the template based on which documents will be generated through the flow.
  • Primary entity determines the main entity (also called “module”, “object” or “table” in other systems) of the template. Select “quote.”
  • Relevant output and delivery blocks adds pre-set blocks to the flow. This can be done later.
  • Type of flow:
    • Simple: Pre-set blocks.
    • Advanced: Advanced flow building functionalities.

Step 2

Go back to the Smart Flows Project Console and click on the “Flows” icon.

You’ll see that the standard flow “Quote Test Drive” is composed of five steps – “Start flow”, “Collect data”, Generate documents”, “Store & deliver”, and “Flow output.” You can add as many blocks as needed in each step; when the flow starts, it will execute all the actions configured in the steps.

A block defines a specific action that must be done in the flow steps. For more information on blocks, please visit our Knowledge Base: https://kb.xpertdoc.com/display/UM/Flow+blocks+in+depth

  • Start flow starts the flow from the CRM environment (by default).
  • Collect data retrieves data from the data set of the associated template.
  • Generate documents executes document generation actions.
  • Store & deliver executes storage and delivery actions on the generated documents.
  • Flow output is the feedback presented to the user after the flow run.

Configuring “Generate documents” Step

Step 1

To start configuring your flow, click on “Generate documents.”

The “Generate documents” options will appear in the right-hand menu. Complete the three sections:

  • Flow output lists the items that will be showed to the user after the flow run.
  • Basic settings shows the selected template, data and default language.
  • Name & format settings displays the name and format that will be used to save the documents.

Configuring “Store & Deliver” Step

Step 1

Click on “Store & deliver.” To add a block to this step, click on “+ Add block.”

For this example, you’ll add a block that will create a note in your CRM system. In the “Add flow block” window, select “Create note” and click on the “Add” button.

The “Create note” options will appear in the right-hand menu. They are divided in two sections:

  • Flow output lists the items that will be showed to the user after the flow run.
  • Basic settings describes the actions that will be executed when creating and storing the note:
    • Note attachment: Attaches the generated document to the note.
    • Connector determines the default connector (your CRM system).
    • Regarding is the record to which the note will be attached. By default, it is the selected record; it can also be a related record.
    • Title is the title of the note.
    • Description provides a brief explanation of the note’s object; it can also be provided dynamically, from a CRM field.

To store the generated document as an attachment, click on the “+” sign under the “Note attachment” field.

In the “Connect blocks” window:

  • Select “Generated document” under “Flows blocks.”
  • Choose “Generated document” under “Select block output.”
  • Save

Step 2

For this example, you’ll also need to attach the note to the “Account” record in your CRM platform. In the “Regarding” field, choose “Link to account.”

Note: If you don’t do this step, the note will only be attached to the “Quote” record.

 

Click on the “Linked field” icon, then the “+” sign.

In the “Connect blocks” window:

  • Select “Retrieve Xpertdoc Trial” under “Flows blocks.”
  • Choose “Data” under “Select block output.”
  • Select the “Account” field under “Select field.”
  • Save


The “Account” label (in yellow) appears in the “Regarding” field.

Step 3

To add the quote number in the title of the note, go to the “Title” field and type the title of the quote.

In the “Connect blocks” window, add the field “Quote ID” under “Select field.”

Step 4

In the “Description” field, provide a brief explanation of the object of the note.

The flow is now completed and ready to use in your CRM environment.

  • No labels
We will be transitioning to a new and improved knowledge base in the near future. Stay tuned here for updates as we prepare for launch.