Templates

Introduction

Templates are a powerful tool that enable senders to quickly create a new transaction by using a previous one as a blueprint. When a transaction has been saved as a template, it can be used as an archetype for any subsequently created transaction.

This section discusses the following topics related to templates:

Creating Signature Placeholders

A signature placeholder is useful if the identity of a signer will be determined at a later time. This is often true when a template is created. A placeholder can be assigned to a signature field just as if one were assigning a regular signer. However, all placeholders must be replaced by real signers before a transaction is distributed for signing. Because a signature placeholder has no email address, they are identified by an ID.

The following code snippets illustrate how to create a signature placeholder.

Creating Templates

Templates can be created in the following ways:

Template names should not include white spaces.

You can create a transaction from a template without specifying a transaction name. The new transaction will automatically create its own name.

Creating a Template from Scratch

Creating a template" from scratch" requires building the entire transaction object, and submitting it in a request.

The following code samples illustrate how to create a template from scratch.

Creating a Template from an Existing Transaction

It is often easier to use an existing transaction as the blueprint for a new template than to create a template from scratch.

In this case, the new template assumes the values and settings of the existing transaction, unless you provide overriding values in the invocation.

The following code samples illustrate how to create a template from an existing transaction.

Creating a Template On Behalf of Another User

A manager of an account can create a template on behalf of another user in that account.

If you do this, you should specify that user manually. This will prevent the creator of the template from being added to the template as a signer.

Once the template is created, the creator sends the relevant user to the Designer View so that user can edit the template.

The following code samples illustrate how to create a template on behalf of another user.

Configuring Template Visibility

A template can be shared with all senders in an account. Indeed, this is the default visibility for account templates (Visibility.ACCOUNT).

The following code samples illustrate how to make a template visible only to the template owner (Visibility.SENDER).

Creating a Transaction from a Template

It's easy to create a transaction from an existing template.

You take the template as a starting point, and can then override whichever of its settings you want. You can create an independent transaction object, populate it with your overriding settings, and pass this in your call to instantiate the template.

The following code samples illustrate how to create a transaction from a template while specifying values for placeholders.