Skip to main content
Blog
Home

Serving up the syntax that enables conditional content in Salesforce contracts

Summary3 min read

Did you know you can use conditional logic in Word to customise your Docusign Gen for Salesforce templates? Find out how.

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:

DocuSign GEN

When the ‘Generate Sales Order’ button is clicked, a Sales Order is generated without the SLA paragraph.

DocuSign GEN

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: 

DocuSign GEN
DocuSign GEN blog Screenshot 4

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.

Discover what's new with Docusign IAM or start with eSignature for free

Explore Docusign IAMTry eSignature for Free
Person in a chair smiling at a laptop screen