AV | Posts: 36

Signature Dates from completed package

0 votes

Hi,

Is it possible to retrieve Signature Dates for all signers in a completed package?

 

Thank You.


Duo_Liang | Posts: 3776

Reply to: Signature Dates from completed package

0 votes

Hi Anu,

 

If you want to retrieve the signature date on each signature, it's better to get the package JSON, loop through each "documents" > "approvals" > and locate the "role" and "signed" attributes.

If you simply want to know the last completion date of each signer, there are few other options:
- Turn on the "In-app Reporting" feature which has been introduced recently, download the Transaction Reports and look up for the "signer completed date" column. (Note, Reports will record only activities that occur after In-App Reporting is enabled)

- Set up a Callback Listener and monitor the "SIGNER_COMPLETE" event - this required extra development at your end and also only records activities afterwards

 

Duo

 


AV | Posts: 36

Reply to: Signature Dates from completed package

0 votes

Hi Duo,

I do not need to read the signature date on each signature field but need to know the last completion date of each signer at the package level or say, for a document in the package. Is there an SDK method to get this info.

As the application we have is not web based, I cannot set up Callback listeners.


Duo_Liang | Posts: 3776

Reply to: Signature Dates from completed package

0 votes

Hi Anu,

 

Use logic similar to below code snippet should work:

        EslClient client = new EslClient(API_KEY, API_URL);

        Map<String, Date> completionMap = new HashMap<String, Date>();

        DocumentPackage package1 = client.getPackage(new PackageId("_--E04moWetkc6PS6eTf69tV3UE="));
        for (Document document : package1.getDocuments()) {
            for (Signature signature : document.getSignatures()) {
                String signerEmail = signature.getSignerEmail();
                Date accepted = signature.getAccepted();
                if(signerEmail != null && accepted != null) {
                    if(!completionMap.containsKey(signerEmail) || completionMap.get(signerEmail).before(accepted)) {
                        completionMap.put(signerEmail, accepted);
                    }
                }
            }
        }

        System.out.println(completionMap);

 

Duo


AV | Posts: 36

Reply to: Signature Dates from completed package

0 votes

Thanks Duo. I can give this a try.


AV | Posts: 36

Reply to:

0 votes

Hi Duo,

 

I have a question on the signature date retrieval.

I noticed that the Signature object does not have a link to the corresponding Signer object who signed the signature field. In my case, the Signers in the document uploaded to OneSpan all have a unique "Id", Email Address may be shared between signers but Id will be unique for each signer.

So I was hoping I could see this Signer Id linked to a Signature object that is retrieved from the signed document. In the scenario where the email id is shared between Signers, I am currently unable to map which Signature belongs to which Signer (Id). I need to know for my application, Signature date per Signer.

The e-Signature I see on the signed document visually has the name of the signer, so OneSpan seems to be having the Signer information linked to a Signature behind the scenes. How can I access that in the SDK when retrieving the Signatures?

 

Thanks


Attachments
Duo_Liang | Posts: 3776

Reply to:

0 votes

Hi Anu,

 

Yes, recently I also realized this issue and has reported to the R&D team. As a workaround, you can loop through API modelling (com.silanis.esl.api.model.*) via Java SDK:

    public void execute() {

        EslClient eslClient = new EslClient(API_KEY, API_URL);
        String packageId = "RTqmolHONm43tcpYUqJWe917EXE=";

        com.silanis.esl.api.model.Package apiPackage = eslClient.getPackageService().getApiPackage(packageId);
        for (com.silanis.esl.api.model.Document document : apiPackage.getDocuments()) {
            for (com.silanis.esl.api.model.Approval approval : document.getApprovals()) {
                // signed date and accepted date, as we discussed before
                Date signed = approval.getSigned();
                Date accepted = approval.getAccepted();

                // get role ID
                String roleId = approval.getRole();
                System.out.println("Role " + roleId + " has signed at " + signed);
            }
        }

    }

On top of the "accepted" date we discussed above, there are actually two dates for each signature:

-“accepted” means the timestamp when the signer signed this particular signature

-“signed” refers to the time when signer confirmed all signatures on this document

The SDK modelling (com.silanis.esl.sdk.*) only exposes accepted date, but API modelling has them both.

 

Duo


Duo_Liang | Posts: 3776

Reply to:

0 votes

Unfortunately it doesn't - even though the function was there, but both the model class "Silanis.ESL.API.Package" and the function "class PackageService > internal OneSpanSign.API.Package GetPackage(PackageId packageId)" are protected. We may have to rely on the R&D response to the ticket I raised few weeks ago to have this issue fixed.

 

Duo


AV | Posts: 36

Reply to: Signature Dates from completed package

0 votes

Ok. Do you have an ETA from the R&D team on this issue resolution ? We are currently developing this code on the OneSpan 11.43 version (NuGet package). As a workaround until the issue is resolved, do you have any suggestions to achieve the link between Signer and Signature using this version? Any way we can get the "Name" of the signer from the Signature object ? currently this field is also empty. 

Thanks!


AV | Posts: 36

Reply to: Signature Dates from completed package

0 votes

Are you referring to setting the Signer with a Role or Adding the Role to the Signature field ? We use Text Tags to set the Signature field in the document which includes the Signer Id

 esl:Signer1:signature:size(200,50)


AV | Posts: 36

Reply to: Signature Dates from completed package

0 votes

As per the below from OneSpan documentation, I am already setting the Role by adding the Custom ID (of the Signer) to the Signature field

"If you create a signer using the SDK, and assign a Custom ID to that signer, that ID will be the signer's role name."

 esl:Signer1:signature:size(200,50) , The issue is that in the Signature object, the value for RoleId is null - shouldn't the Custom Id set in the text tag be seen on the signature object ?


Duo_Liang | Posts: 3776

Reply to:

0 votes

Signature.RoleId is null, this is because in SDK design, the RoleId field will only be set if the signer is a placeholder signer. In other cases, the SDK will first do an internal lookup then bind the signers to their emails. However, this is no longer desired when multiple signers can now share the same email, which is exactly what I have reported.

 

Duo


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