Signer Workflow

This guide covers how to create and update a signer workflow in your package.

The signer workflow determines the order in which multiple signers can participate in the signing ceremony.

The Code

You can get the complete example code for this guide from the Developer Community Code Share, here.

The sample code below shows you how to edit the signer block in order to set a signer workflow. In this example, there are four signers where each one is required to sign in succession. The second signer will receive a notification to sign the document only after the first signer has completed signing the document and so on and so forth.

.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))

Next, the sample code below shows how to reorders the signing order of signers after creating the package. Here, the signing order of the two signers are swapped. If you’ve already sent your package, you will need to change the status of your package to DRAFT before you can update the signer workflow.

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 need a comparison to the basic document object creation or if this is the first time creating a package with the Java SDK, see this guide.

Running Your Code

Once you’ve run your code, if you log into OneSpan Sign, you should find the appropriate signer workflow in your OneSpan Sign document package, as seen below.

signerorder

Get the Code

The signer workflow determines the order in which multiple signers can participate in the signing ceremony.

The Code

You can get the complete example code for this guide from the Developer Community Code Share, here.

The sample code below shows you how to edit the signer block in order to set a signer workflow. In this example, there are four signers where each one is required to sign in succession. The second signer will receive a notification to sign the document only after the first signer has completed signing the document and so on and so forth.

.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))

Next, the sample code below shows how to reorders the signing order of signers after creating the package. Here, the signing order of the two signers are swapped. If you’ve already sent your package, you will need to change the status of your package to DRAFT before you can update the signer workflow.

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

If you need a comparison to the basic document object creation or if this is the first time creating a package with the .NET SDK, see this guide.

Running Your Code

Once you’ve run your code, if you log into OneSpan Sign, you should find the appropriate signer workflow in your OneSpan Sign document package, as seen below.

signerorder

Get the Code

The signer workflow determines the order in which multiple signers can participate in the signing ceremony.

The Code

You can get the complete example code for this guide from the Developer Community Code Share, here.

The sample request below shows you how to edit the roles object in order to set a signer workflow. In this example, there are four signers where each one is required to sign in succession. The second signer will receive a notification to sign the document only after the first signer has completed signing the document and so on and so forth.

HTTP Request
POST /api/packages

HTTP Headers
Accept: application/json
Content-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, take a look at the JSON Properties section below.

Response Payload

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

Next, 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
}]

The sample JSON above shows how to reorders the signing order of roles after creating the package. Here, the signing order of the two roles are swapped. If you’ve already sent your package, you will need to change the status of your package to DRAFT before you can update the role workflow.

If you need a comparison to the basic document object creation or if this is the first time creating a package with the REST API, see this guide.

Running Your Code

Once you’ve run your code, if you log into eSignLive, you should find the appropriate signer workflow in your OneSpan Sign document package, as seen below.

signerorder

Get the Code
JSON Properties

Property Type Editable Required Default Sample Value(s)
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

The signer workflow determines the order in which multiple signers can participate in the signing ceremony.

The Code

You can get the complete example code for this guide from the Developer Community Code Share, here.
The sample code below shows you how to edit the signer block in order to set a signer workflow. In this example, there are four signers where each one is required to sign in succession. The second signer will receive a notification to sign the document only after the first signer has completed signing the document and so on and so forth.

//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);

Next, the sample code below shows how to reorders the signing order of signers after creating the package. Here, the signing order of the two signers are swapped. If you’ve already sent your package, you will need to change the status of your package to DRAFT before you can update the signer workflow.

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

If you need a comparison to the basic document object creation or if this is the first time creating a package with the Apex SDK, see this guide.

Running Your Code

Once you’ve run your code, if you log into OneSpan Sign, you should find the appropriate signer workflow in your OneSpan Sign document package, as seen below.

signerorder

Get the Code