Snippets and Snippet Groups
Snippets and Snippet Groups hold the reusable content that allows you to manage the rich content in your documents. You can organize the Snippets into groups within your documents. Snippets are useful for taking reusable content, and using that content across multiple DocGen Packages.
For example, say you have a business contract that needs different clauses for customers in different regions, and maybe for contract values above a certain financial value. Snippets' can have conditions to support this, to make your Document Generation project flexible and powerful to your organizations needs.
There are some differences between Snippets and Snippet Groups and it is important to understand how each of these terms is defined.
-
Snippet - a reusable piece of content, can be rich text, images, etc. These can have conditions applied to them such as, "Only include if account amount > $500". These conditions can be applied using field tags.
-
Snippet Group - a reusable set of Snippets, often used for numbered or bulleted lists in legal clauses. The Snippet Group editor allows you to move these lists around, such as indenting the lists.
-
Linked Snippet Group - when designing your Document Package, you can use a Snippet Group by linking it to the package. When you link a Snippet Group, you can also add conditions to the Snippet Group using filters e.g. "Only show this snippet group if the account region is Europe".
To watch video tutorials on how to use this Nintex capability, take the CERT: Nintex Document Generation Expert - Nintex DocGen for Salesforce in Nintex University. |
Enable Snippet Tab in Lightning interface
In some instances, users may not see the Snippets tab appearing in the Lightning Designer interface. In these cases the tab needs to be added. Salesforce provides the following documentation for adding tabs to Lightning interface: Add and Customize Tabs on Lightning Pages Using the Lightning App Builder.
Create and link Snippets and Snippet Groups
Snippets can be linked to a Snippet Group which then can be linked to a DocGen Package. After a Snippet Group is linked you can then add the field tag for the Snippet Group to a template. When you generate documents, every Snippet created is added to the output, in the order you specified in the Snippet Group.
You can link multiple Snippet Groups to a single DocGen Package, and you can use the same Snippet Group on multiple DocGen Package. For example, you might have a Snippet Group for a contract and another Snippet Group for a service level agreement. You could link both Snippet Groups to a DocGen Package that generates documents for on boarding new customers. Once a Snippet Group is linked to a Document Package you will be provided with field tags associated with that Snippet Group that you an insert into a document template.
-
Click the Snippet tab.
-
Click DocGen Snippet Groups.
-
Click New.
-
Type a name in Snippet Group Name and click Save.
The Connect Existing Snippet Group page appears.
-
Click Create.
-
Open a DocGen Package.
-
From the Snippet Groups related list, click New Snippet Group.
The New Snippet Group page opens with no Snippets selected.
-
Type a name in Snippet Group Name and click Save.
The Connect Existing Snippet Group page appears.
-
Click Create.
-
Open a DocGen Package.
-
From the Snippet Groups related list, click Connect Existing Snippet Group.
-
The Connect Existing Snippet Group page opens.
-
In Snippet Group, type the name of the existing Snippet Group and then click Create.
Conditional filtering on Snippets and Snippet Groups
Setting conditional filters on Snippets and Snippet Groups enables you to tailor the documents you create for your customers based on the data in your organization. You can set these filters at the Snippet level, the Snippet Group level, or both levels.
Filtering at the Snippet Group level
Filtering at the Snippet Group level is helpful if you have multiple Snippet Groups connected to a DocGen Package and you want to dynamically add certain groups based on the record used to generate the documents.
-
Open a DocGen Package.
-
From the Snippet Groups related list, click New Snippet Group.
The New Snippet Group page opens with no Snippets selected.
-
Type a name in Snippet Group Name and click Save.
The Connect Existing Snippet Group page appears.
-
Click Create.
-
Under Filters, take any of the following actions:
-
Click Add Filter to add a filter.
-
Click the Trash icon to remove a filter.
-
Select a value in Object, Field, or Operator to edit a filter.
-
Type or paste a tag in Value to edit a filter.
-
If you have more than one filter, type conditions into Advanced Filter Conditions to refine your filters.
-
In Advanced Filter Conditions, type an operator, an open parenthesis, filter numbers separated by a comma, and a close parenthesis. For example, AND(1,2) finds records that match criteria in both values.
Available operators:Operator Definition AND Finds records that match both values. OR Finds records that match either value
-
-
Open a DocGen Package.
-
From the Snippet Groups related list, click New Snippet Group.
-
From the Snippet Groups related list, click Connect Existing Snippet Group.
-
In Snippet Group field, type the name of the existing component group and then click Create.
-
Under Filters, take any of the following actions:
-
Click Add Filter to add a filter.
-
Click the Trash icon to remove a filter.
-
Select a value in Object, Field, or Operator to edit a filter.
-
Type or paste a tag in Value to edit a filter.
-
If you have more than one filter, type conditions into Advanced Filter Conditions to refine your filters.
-
In Advanced Filter Conditions, type an operator, an open parenthesis, filter numbers separated by a comma, and a close parenthesis. For example, AND(1,2) finds records that match criteria in both values.
Available operators:Operator Definition AND Finds records that match both values. OR Finds records that match either value
-