Creating a Signer Workflow
  • 16 Oct 2024
  • 7 Minutes to read
  • Dark
    Light
  • PDF

Creating a Signer Workflow

  • Dark
    Light
  • PDF

Article summary

Java SDK.NET SDKREST APIAPEX SDK

Java SDK

To download the full code sample see our Code Share site.

When creating a transaction, you may have multiple signers required to sign several documents.  Accordingly, you may wish to control the flow of the Signer Experience. With OneSpan Sign, you can set the order in which multiple signers participate, or the order in which multiple documents are signed by a signer. The signer workflow determines the order in which multiple signers can participate in the Signer Experience. For example, a signer with a signing order 1 means that they will sign first.

Creating a Signer Workflow

In this example, there are four signers, where each signer is required to sign in order. For example, the second signer will receive a notification to sign the document only after the first signer has completed signing. The following code will do this:

.withSigner(newSignerWithEmail("signer1@xyz.com")
    .withFirstName("FirstNameSigner1")
    .withLastName("LastNameSigner1")
    .signingOrder(1))
.withSigner(newSignerWithEmail("signer2@xyz.com")
    .withFirstName("FirstNameSigner2")
    .withLastName("LastNameSigner2")
    .signingOrder(2))
.withSigner(newSignerWithEmail("signer3@xyz.com")
    .withFirstName("FirstNameSigner3")
    .withLastName("LastNameSigner3")
    .signingOrder(3))
.withSigner(newSignerWithEmail("signer4@xyz.com")
    .withFirstName("FirstNameSigner4")
    .withLastName("LastNameSigner4")
    .signingOrder(4))

Editing your Signer Workflow

After you have created your transaction, you may wish to edit the signing order. In this example, the signing order of the first two signers are changed.

The following code will do this:

DocumentPackage afterReorder = eslClient.getPackage(packageId);
afterReorder.getSigner("John.Smith@email.com").setSigningOrder(2);
afterReorder.getSigner("Patty.Galant@email.com").setSigningOrder(1);
eslClient.getPackageService().orderSigners(afterReorder);

If you've already sent your transaction, you will need to change its status to DRAFT before you can update the signer workflow.

Results

After running your code, if you login to OneSpan Sign and navigate to your transaction, you will see your signer order.

.NET SDK

To download the full code sample see our Code Share site.  If you're unable to use FastTrack, contact our Support Team to have it enabled for your account.

When creating a transaction, you may have multiple signers required to sign several documents.  Accordingly, you may wish to control the flow of the Signer Experience. With OneSpan Sign, you can set the order in which multiple signers participate, or the order in which multiple documents are signed by a signer. The signer workflow determines the order in which multiple signers can participate in the Signer Experience. For example, a signer with a signing order 1 means that they will sign first.

In this example, there are four signers, where each signer is required to sign in order. For example, the second signer will receive a notification to sign the document only after the first signer has completed signing. The following code will do this:

Creating a Signer Workflow

In this example, there are four signers, where each signer is required to sign in order. For example, the second signer will receive a notification to sign the document only after the first signer has completed signing. The following code will do this:

.WithSigner(
    SignerBuilder.NewSignerWithEmail("signer1@xyz.com")
        .WithFirstName("FirstNameSigner1")
        .WithLastName("LastNameSigner1")
        .SigningOrder(1)
)
.WithSigner(
    SignerBuilder.NewSignerWithEmail("signer2@xyz.com")
        .WithFirstName("FirstNameSigner2")
        .WithLastName("LastNameSigner2")
        .SigningOrder(2)
)
.WithSigner(
    SignerBuilder.NewSignerWithEmail("signer3@xyz.com")
        .WithFirstName("FirstNameSigner3")
        .WithLastName("LastNameSigner3")
        .SigningOrder(3)
)
.WithSigner(
    SignerBuilder.NewSignerWithEmail("signer4@xyz.com")
        .WithFirstName("FirstNameSigner4")
        .WithLastName("LastNameSigner4")
        .SigningOrder(4)
)

Editing your Signer Workflow

After you have created your transaction, you may wish to edit the signing order. In this example, the signing order of the first two signers are changed.

afterReorder = eslClient.GetPackage(packageId);
afterReorder.GetSigner(email2).SigningOrder = 1;
afterReorder.GetSigner(email1).SigningOrder = 2;
eslClient.PackageService.OrderSigners(afterReorder);

If you've already sent your transaction, you will need to change its status to DRAFT before you can update the signer workflow.

Results

After running your code, if you login to OneSpan Sign and navigate to your transaction, you will see your signer order.

REST API

To download the full code sample see our Code Share site.

When creating a transaction, you may have multiple signers required to sign several documents.  Accordingly, you may wish to control the flow of the Signer Experience. With OneSpan Sign, you can set the order in which multiple signers participate, or the order in which multiple documents are signed by a signer. The signer workflow determines the order in which multiple signers can participate in the Signer Experience. For example, a signer with a signing order 1 means that they will sign first.

Creating a Signer Workflow

In this example, there are four signers, where each signer is required to sign in order. For example, the second signer will receive a notification to sign the document only after the first signer has completed signing. The following code will do this:

HTTP Request

 POST /api/packages 

HTTP Headers

Accept: application/jsonContent-Type: 
application/json
Authorization: Basic api_key 

Request Payload

{
  "roles": [
    {
      "id": "role1",
      "index": 1,
      "type": "SIGNER",
      "signers": [
        {
          "email": "signer1@xyz.com",
          "firstName": "FirstNameSigner1",
          "lastName": "LastNameSigner1"
        }
      ],
      "name": "signer1"
    },
    {
      "id": "role2",
      "index": 2,
      "type": "SIGNER",
      "signers": [
        {
          "email": "signer2@xyz.com",
          "firstName": "FirstNameSigner2",
          "lastName": "LastNameSigner2"
        }
      ],
      "name": "signer2"
    },
    {
      "id": "role3",
      "index": 3,
      "type": "SIGNER",
      "signers": [
        {
          "email": "signer3@xyz.com",
          "firstName": "FirstNameSigner3",
          "lastName": "LastNameSigner3"
        }
      ],
      "name": "signer3"
    },
    {
      "id": "role4",
      "index": 4,
      "type": "SIGNER",
      "signers": [
        {
          "email": "signer4@xyz.com",
          "firstName": "FirstNameSigner4",
          "lastName": "LastNameSigner4"
        }
      ],
      "name": "signer4"
    }
  ]
}

For a complete description of each field, see the Request Payload table below.

Response Payload

{
  "id": "9sKhW-h-qS9m6Ho3zRv3n2a-rkI="
}

Editing the Role Workflow

To update the role workflow, you will need to make a PUT request to:

HTTP Request

 PUT /api/packages/{packageId}/roles 

HTTP Headers

Accept: application/json
Content-Type: application/json
Authorization: Basic api_key 

Request Payload

[
  {
    "id": "OGCBUbLGa7gR",
    "index": 0
  },
  {
    "id": "CnvwToUWLPgW",
    "index": 1
  }
] 

Editing your Signer Workflow

After you have created your transaction, you may wish to edit the signing order. In this example, the signing order of the first two signers are changed.

If you've already sent your transaction, you will need to change its status to DRAFT before you can update the signer workflow.

Results

After running your code, if you login to OneSpan Sign and navigate to your transaction, you will see your signer order.

Request Payload Table

Property

Type

Editable

Required

Default

Sample Values

roles

id

string

Yes

No

n/a

role1

index

integer

Yes

No

0

1 / 2 / 3 ...

type

string

Yes

No

SIGNER

SIGNER / SENDER

signers

name

string

Yes

No

n/a

signer1

email

string

Yes

No

n/a

signer1@xyz.com

firstName

string

Yes

No

n/a

FirstNameSigner1

lastName

string

Yes

No

n/a

LastNameSigner1

APEX SDK

To download the full code sample see our Code Share site.  

When creating a transaction, you may have multiple signers required to sign several documents.  Accordingly, you may wish to control the flow of the Signer Experience. With OneSpan Sign, you can set the order in which multiple signers participate, or the order in which multiple documents are signed by a signer. The signer workflow determines the order in which multiple signers can participate in the Signer Experience. For example, a signer with a signing order 1 means that they will sign first.

Creating a Signer Workflow

In this example, there are four signers, where each signer is required to sign in order. For example, the second signer will receive a notification to sign the document only after the first signer has completed signing. The following code will do this:

// Method1: add signing order when creating role
ESignLiveAPIObjects.Role role1 = new ESignLiveAPIObjects.Role();
role1.id = 'signer1';
role1.index = 1;
role1.signers = sdk.createRolesSigner('FirstNameSigner1', 'LastNameSigner1', 'signer1@xyz.com', 'Applicant', 'xxx Company');
sdk.helper.createRole(packageId, role1);

ESignLiveAPIObjects.Role role2 = new ESignLiveAPIObjects.Role();
role2.id = 'signer2';
role2.index = 2;
role2.signers = sdk.createRolesSigner('FirstNameSigner2', 'LastNameSigner2', 'signer2@xyz.com', 'Director', 'ABC Bank');
sdk.helper.createRole(packageId, role2);

ESignLiveAPIObjects.Role role3 = new ESignLiveAPIObjects.Role();
role3.id = 'signer3';
role3.index = 3;
role3.signers = sdk.createRolesSigner('FirstNameSigner3', 'LastNameSigner3', 'signer3@xyz.com', 'Applicant', 'xxx Company');
sdk.helper.createRole(packageId, role3);

ESignLiveAPIObjects.Role role4 = new ESignLiveAPIObjects.Role();
role4.id = 'signer4';
role4.index = 4;
role4.signers = sdk.createRolesSigner('FirstNameSigner4', 'LastNameSigner4', 'signer4@xyz.com', 'Director', 'ABC Bank');
sdk.helper.createRole(packageId, role4);

Editing your Signer Workflow

After you have created your transaction, you may wish to edit the signing order. In this example, the signing order of the first two signers are changed.

sdk.setSigningOrder('packageId', 'signer1', 2);
sdk.setSigningOrder('packageId', 'signer2', 1);

If you've already sent your transaction, you will need to change its status to DRAFT before you can update the signer workflow.

Results

After running your code, if you login to OneSpan Sign and navigate to your transaction, you will see your signer order.


Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.
ESC

Ozzy, our interactive help assistant