Serving up the syntax that enables conditional content in Salesforce contracts

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:

<# <Conditional Select="count(//OpportunityLineItems[Product2.Name/text()='SLA: Silver'])" NotMatch="0"/> #>

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. 

<# <EndConditional/> #>  

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.

Published