asingla

Add a signature date field

0 votes
Can you please point me or give me example of json needs to be added to add signing date in a document (Using REST API)

Reply to: Add a signature date field

2 votes
Hi asingla, I believe you must have tried the "Creating and Sending package(.Net REST way)" tutorial. So it may interest you to know that inside the Json body, the value of "approvals" attribute means the signature blocks, and this is where you may customize the signing fields. The following is the Json example I made for you, just for the approvals block:
 "approvals":[
            {
               "id":"ExampleSignatureId",
               "role":"Signer1",
               "fields":[
                  {
                     "page":0,
                     "top":100,
                     "subtype":"FULLNAME",
                     "height":50,
                     "left":100,
                     "width":200,
                     "type":"SIGNATURE",
                     "name":"ExampleSignatureId"
                  },
                  {
                     "binding":"{approval.signed}",
                     "page":0,
                     "top":300,
                     "subtype":"LABEL",
                     "height":50,
                     "left":100,
                     "width":200,
                     "id":"myLabelField1",
                     "type":"INPUT",
                     "value":"yyyy-MM-dd HH:mm:ss 'GMT'"
                  }
               ],
               "name":""
            }
         ]
As you can see, there's only two fields for this approval, one is a Signature field for signer to sign, one is the Date Label which would indicate the signing date after the document was signed. What key-values you won't miss to add in this "Signing Date" block is:
  "binding":"{approval.signed}", //this date field would only show when the approval has been signed
  "subtype":"LABEL",
  "type":"INPUT",		//type and subtype should be a match
  "value":"yyyy-MM-dd HH:mm:ss 'GMT'"	//from my test, currently doesn't support customize the format of date
If it still doesn't work, I am more than willing to create a full C# example for you. Hope you find this reply helpful!

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to: Add a signature date field

0 votes
Hi Duo, Thanks for the reply. I tried the document having only date bindings and it worked fine. Now, I have a document in which there are total 5 fields. 1 place for Rep to sign 1 date related to Rep field 2 places for Primary owner to sign 1 date related to Primary owner field But somehow document is getting confused and showing me I have two signature fields, but taking me to only one place for signature and at date field i am getting something like "Signing Field" and I am not able to complete the signing ceremony. I have attached the JSON which is getting generated and screenshot of document at eSignLive end while doing signing ceremony. Please suggest if I am missing anything

Reply to: Add a signature date field

0 votes
Hi asingla, From your Json format, I think you are probably using the "Position Extraction Feature", right? I have created a sample JSON for you, which works fine at my side. The attachment is the pdf file I used in my test. I think the problem in your JSON could be that you didn't put the "Date Field" with your last "Signature Field" in the same approval, as the trigger event is binded to the finish of this approval. Which is to say, there has to be a signature field in the approval. In my example, I put different Signature Fields into different approvals.(Putting several signatures in same approval could cause overlap) And put the Date Field with the last Signature Field. Hope you find this reply helpful!

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Attachments

Reply to: Add a signature date field

0 votes
And this is the JSON:
{  
   "documents":[  
      {  
         "approvals":[
            {
               "id":"ExampleSignatureId",
               "role":"Representation",
               "fields":[
                  {
                       "type": "SIGNATURE",
                       "extract": true,
                       "subtype": "FULLNAME",
                       "name": "_signature_representation"
                   },
                  {
                     "binding":"{approval.signed}",               
                     "subtype":"LABEL",
                     "id":"_date_representation",
                     "type":"INPUT",
                     "extract": true,
                     "value":"yyyy-MM-dd HH:mm:ss 'GMT'",
                     "name":"_date_representation"
                  }
               ],
               "name":""
            },
             {
               "id":"ExampleSignatureId2",
               "role":"Primary_Owner",
               "fields":[
                  {
                       "type": "SIGNATURE",
                       "extract": true,
                       "subtype": "FULLNAME",
                        "name": "_signature1_primary_owner"
                   }
               ],
               "name":""
            },
             {
               "id":"ExampleSignatureId3",
               "role":"Primary_Owner",
               "fields":[
                  {
                       "type": "SIGNATURE",
                       "extract": true,
                       "subtype": "FULLNAME",
                        "name": "_signature2_primary_owner"
                   },
                  {
                     "binding":"{approval.signed}",             
                     "subtype":"LABEL",     
                     "extract": true,            
                     "id":"_date_primary_owner",
                     "type":"INPUT",
                     "value":"yyyy-MM-dd HH:mm:ss 'GMT'",
                      "name":"_date_primary_owner"
                  }
               ],
               "name":""
            }
         ]

         ,
         "extract": true,
         "id":"sample-contract",
         "name":"Test Document"
      }
   ],
   "status":"SENT",
   "type":"PACKAGE",
   "roles":[  
      {  
         "id":"Primary_Owner",
         "type":"SIGNER",
         "signers":[  
          
            {  
               "email":"[email protected]",
               "firstName":"po_firstname",
               "lastName":"po_lastname",
               "id":"Primary_Owner"
            }
         ],
         "name":"Signer1"
      },
       {  
         "id":"Representation",
         "type":"SIGNER",
         "signers":[  
          
            {  
               "email":"[email protected]",
               "firstName":"re_firstname",
               "lastName":"re_lastname",
               "id":"Representation"
            }
         ],
         "name":"Signer1"
      }
   ],
   "name":"Example Package"
}

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to: Add a signature date field

0 votes
Thanks I spotted that too. :)

Reply to: Add a signature date field

0 votes
Do you have a .NET example for me? Thanks in advance!

Reply to: Add a signature date field

3 votes
Hi myipp, If you are using .NET SDK, the following code would give you an idea of how to create a package with a date bound to an approval:
DocumentPackage package = PackageBuilder
              .NewPackageNamed("Test Package .NET")
                    .WithSigner(SignerBuilder
                         .NewSignerWithEmail("signer's email")
                                .WithFirstName("Signer First Name")
                                .WithLastName("Signer Last Name")
                                .WithCustomId("Signer"))
                    .WithDocument(DocumentBuilder.NewDocumentNamed("sampleAgreement")
                                  .FromFile("your file path")
                                  .WithSignature(SignatureBuilder
                                       .SignatureFor("signer's email")
                                         .OnPage(0)
                                         .AtPosition(200, 300)
                                         .WithField(FieldBuilder.SignatureDate().OnPage(0).AtPosition(200, 400))
                                         )
                    )
                    .Build();
As you noticed, the Field object should be added inside .WithSignature()function, that's the same idea that you should put fields block in an approval block in request JSON payload. If you are using a REST way, you can use the attachment, replace the jsonString with the json payload above this thread and replace the placeholders with your own information. Hope this could help you!

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to: Add a signature date field

0 votes
Duo, Thanks for your prompt response. That was exactly what I needed! Mike

Reply to: Add a signature date field

0 votes
Duo_Liang -- Are we able to format the value of the date? "value":"yyyy-MM-dd HH:mm:ss 'GMT'",
              {
                     "binding":"{approval.signed}",             
                     "subtype":"LABEL",     
                     "extract": true,            
                     "id":"_date_primary_owner",
                     "type":"INPUT",
                     "value":"yyyy-MM-dd HH:mm:ss 'GMT'",
                      "name":"_date_primary_owner"
                  }
Thank you, Rich

Reply to: Add a signature date field

4 votes
Hi Rich, I'm afraid you can't set your date field format at the package level. But you have the capability to set this at your account level by contacting our support at [email protected], with the request and the format you want. Hope this could help you! Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to: Add a signature date field

0 votes

Hello,

Are we still restricted with regards to date formats?  We would need to use different date formats depending on the language of the document.

Thanks,

Patrick B.


Reply to:

0 votes

Hi Patrick,

 

Yes, unfortunately it's still NOT supported to specify the date format at field level or per language. I've found similar Enhancement Requests in the system and this new feature hasn't been on the roadmap yet.

 

Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off