Serving up the syntax that enables conditional content in Salesforce contracts
Did you know you can use conditional logic in Word to customise your Docusign Gen for Salesforce templates? Find out how.
![](https://images.ctfassets.net/9pvazpst9iwl/7lmPQflkl693rYwzm5Zl0i/12b013d94695eec1d08f670af29ee995/portrait-of-smiling-woman-in-striped-shirt_.jpg)
By Alex Garrett, Senior Solution Consultant and Steven Cooke, Lead Solution Architect
It’s common practice in the contracting world to customise individual agreements. One sale may call for a certain condition to be excluded, while another might require the inclusion of a certain clause. Yet these customisations can take time and effort.
Take a typical order for managed services, for example. These will often come with a Service Level Agreement (SLAs), yet the type of SLA the customer opts for can vary. In the olden days of manually preparing individual contracts, the sales lead would need to find the clause that maps to the SLA level the customer chooses, and copy and paste it into the sales agreement.
Nowadays, it can all be done automatically. The ability to dynamically include or exclude data, depending on certain conditions, is one of the key features of Docusign Gen for Salesforce — helping you save time and eliminate errors. You can set up rules — using simple syntax — that will automatically add new content to the quote or contract depending on what’s agreed upon with the customer.
Using the SLA example above, let’s say a customer wants to add your Silver SLA option to their contract. As part of your due diligence, you need to add a paragraph describing this option to the quote. With Docusign Gen for Salesforce, this paragraph can be added automatically. Let’s take a look at how easy it is.
Here’s a current Opportunity. It includes two line items, neither of which is the Silver SLA:
When the ‘Generate Sales Order’ button is clicked, a Sales Order is generated without the SLA paragraph.
However, if you added a ‘Silver: SLA’ line item within the Salesforce opportunity, the resulting Sales Order automatically includes a paragraph describing the Silver SLA:
The syntax used to evaluate whether the line item was present in the opportunity line items is:
<# #>
SLA: Silver
This Silver Service Attachment of Tally Service Level Agreement for Tally Protect & Sign Service (“SLA”) is made part of the Agreement between Tally and Customer for the use of the Tally Protect & Sign Service to which Customer has subscribed in an Order Form with Docusign. This SLA applies separately to each Tally Signature Account. Any term not otherwise defined herein shall have the meaning specified in the Agreement.
<# #>
The bolded text is the syntax. The SLA paragraph, which is nested in-between, is the data that will appear in the agreement if the line item ‘SLA: Silver’ is present within the opportunity line items.
There are many other conditions you can control for in your contracts, including:
Only displaying content if a checkbox field is selected
Only displaying content if a multi-picklist contains or equals certain values
Only displaying content if one or more fields match certain values
All the XML code for these rules can be found in this support article. Just remember, you’ll need to set your agreements up as Word documents — for help in setting up your Word-based contracts, check out this support article.
Alex Garrett
Senior Solution Consultant
Discover what's new with Docusign IAM or start with eSignature for free
![Aboriginal Australian man at meeting with Indigenous colleagues in creative modern workspace.](https://images.ctfassets.net/9pvazpst9iwl/1gOiICnusnBqWxB11vmsFs/b2cd3ccf20e4ac7b9f53314ba44afca2/aboriginal-australian-man-smiles-in-modern-workspace.png)