OneSpan Sign Developers: Email Templates – Part 1

Duo Liang, December 16, 2020
OneSpan-BlogImage-Email-Template-Part1

With the powerful branding and white-labelling capabilities offered by OneSpan Sign, you can completely white-label every aspect of the e-signature process, including customizing the content and look-and-feel of your email notifications. By customizing the subject, the logo, and the visibility of elements in the body, each of these email templates can be customized for each language supported by OneSpan Sign. 

In this blog, we will walk through a normal workflow to tailor the email templates to your brand. Without further delay, let’s get started!

12-16-1

STEP 1: List of Email Templates

OneSpan Sign provides a wide range of email templates to notify recipients or senders in different scenarios. Our first step is to get a complete list of available email templates and to read the respective description of each email template. This helps you understand the use case for each template and choose the ones best suited to your needs. Below are some of the most frequently used email templates:

  • “email.activate”: The automatic email sent to all signers in a package after it has been sent for signing. If a package is configured with a signing order, signers will receive an invitation email when the previous signer has completed signing.
  • “email.notify”: Re-sends an email invitation to review or sign a package after the initial invitation bounced.
  • “email.complete”: Sends an email to all signers once all signers have completed the signing process.
  • “email.transaction.complete”: This template sends an email to a transaction's owner to notify them that all signers have completed the signing process.

STEP 2: Customize the Email

Once you’ve decided which email template to customize, the documentation also lists the default email subject and body along with a number of placeholder variables such as “$RECIPIENT_NAME;”, “$RECIPIENT_ROLE;”, “$PACKAGE_NAME;”, “$LINK_URL;”, “$PACKAGE_MESSAGE;”, etc. The values of these placeholders are dynamically determined during the runtime. By placing these placeholders in the subject or email body, it provides you extra flexibilities when building the content. 

In this section, I will walk through how to add additional email messages in package creation with both SDK and REST API. This value will later be passed to the “$PACKAGE_MESSAGE;” placeholder in your “email.activate” template. 

12-16-2

You can either specify the email message at package level, which defaults to all signers, or override it at signer level and provide different values to the recipients. 

SDK

DocumentPackage pkg = PackageBuilder.newPackageNamed("Example Package " + System.currentTimeMillis())
        .withEmailMessage("This is a package level email message.")
        .withSignerBuilder(SignerBuilder.newSignerWithEmail("[email protected]")
            .withEmailMessage("This is a signer level email message for signer2.")
            ......
            )
        ......
        .build();

REST API

{
  "roles": [
    {
      "emailMessage": {
        "content": "This is a signer level email message for signer1."
      },
      "id": "Role1",
      "signers": [
        {
          "email": "[email protected]",
          "firstName": "1.firstname",
          "lastName": "1.lastname",
          "company": "OneSpan Sign"
        }
      ]
    }
  ],
  "name": "Example Package",
  "type": "PACKAGE",
  "language": "en",
  "emailMessage": "This is a package level email message.",
  "description": "New Package",
  "autocomplete": true,
  "status": "DRAFT"
}

After you sent out the transaction, this is what your signer can expect in the email notification they received.

12-16-3

Note:

It’s important to be aware that each template supports different variables. For example, (1) not all email templates contain the “$LINK_URL;”, (2) the “$RECIPIENT_NAME;” placeholder could refer to a recipient or the sender depending on the actual context, etc. 

STEP 3: Submit a Support Ticket

For the time being, email customization cannot be achieved through the API/SDKs. Hence you will have to send our support team a request for this. 

Note:

  • OneSpan Sign supports plain text emails and HTML emails, however to design, develop, and fully test the HTML Email and make sure it’s compatible across clients is outside the scope of the support.
  • Email templates are on an account level and not on a package level. In other words, any customization will affect all future created packages. 

Through today’s blog, you should know where to find the documentation regarding to email customization, how to place placeholders in your template, and pass values in package creation.

If you have any questions regarding this blog or anything else concerning the integration of OneSpan Sign into your application, visit the Developer Community Forums. Your feedback matters to us!

OneSpan Developer Community

OneSpan Developer Community

Join the OneSpan Developer Community! Forums, blogs, documentation, SDK downloads, and more.

Join Today