Skip to main content
Skip table of contents

Create a Conditional Watermark

A watermark can be conditioned to appear in generated document from a checkbox in Salesforce or an option within template.

Edit CSS to enable Watermark

Go to CSS Source View in the template that you want to enable Watermark, or choose Styles in Home after open a template.

image-20240109-075849.png

 

Scroll until see @page line, add the following mark-up in the same group, after @top-right-corner {  }

CODE
@left-middle {content: dyn-function(value=waterMark);z-index: 100;font-family: sans-serif;font-size: 80pt;font-weight: normal;color: gray(0, 0.3);text-align: center;text-transform: uppercase;transform: rotate(-54.7deg);position: absolute;left: 0;top: 0;width: 100%;height: 100%;}

If the condition is from a checkbox field in Salesforce

image-20240205-122148.png

Since it is a field from Salesforce, it needs to be queried inside the template to work. Go to Home > Main Flow > Initialize > Edit Step > Find the 'record' command that query the main object. If the main object of the template is 'Opportunity' the record command would have 'Opportunity' as its 'type'

image-20240205-121020.png

 

image-20240205-121134.png

 

 Click on it. On the right panel, there is "Fields", click on the three dots next to it

image-20240205-121332.png
image-20240205-121404.png

Search and choose the field that needs to be queried inside the template. Check if it appears on the right column.  Hit OK.

image-20240205-121944.png

 In a step before the document is generated, add the following commands

image-20240205-122016.png

Here the variable 'waterMark' will have the text 'WATERMARK' as its value if the Private checkbox is ticked in Salesforce. Otherwise, the variable 'waterMark' will throw a blank value. Between the quotation marks (''), the content can be changed to display differently. For example, 'draft'.

Then Save and Test the template to enable conditional watermark.

If the condition is from an option inside template

Users can also choose multiple options for the final generated documents, for example, a draft document with watermark, or enable a specific option like to do e-signing. To give the user selection screen to choose from multiple options, a new screen (or usually called form) can be added at the beginning of the workflow. When add a screen, it will have multiple buttons for drag and drop. You can change the name and title of the form and buttons.

image-20240205-122316.png

The attributes of the checkbox:

-Name: represent the variable name that holds the value (displayWatermark)

-Value: is the value of the variable can be used later to define a condition (give it a 'true' value)

-Label: the display text in the screen input

In a step before the document is generated, add the following commands. The commands say if the variable 'displayWatermark' has 'true' as its value, the 'waterMark' will have 'WATERMARK' value. Otherwise, it would be a blank

image-20240205-123255.png

 

Go back to Main Flow and connect arrows appropriately with the steps to enable the users a selection screen to choose before generating a document.

Test to see the final result.

image-20240109-075949.png

 

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.