cpomeroy

options to complete a package that requires review from package owner

0 votes
Hi, We're working on a workflow that would require our users to upload attachments as part of the signing ceremony (to validate their identity when signing in-person). We can set the attachment to be required as part of the signing ceremony no problem, and this causes the package to not complete automatically as expected. I assume we also receive the TRANSACTION_READY_FOR_COMPLETION callback in this case, but I haven't verified that. I'm wondering what options are available for us to complete the package. Can the package be completed programatically through our application? Is there a link that we could open that presents a screen to the user similar to the one in your UI where to can accept/reject various attachments and complete the package? Essentially wondering what my options are. Thanks in advance, -Chris

Reply to: options to complete a package that requires review from package owner

0 votes
Hi Chris, You can programmatically complete the package:
eslClient.getPackageService().markComplete(packageId);
Regarding attachments, you can embed the package view where the sender can accept/reject the attachment.
String token = eslClient.getAuthenticationTokensService().createUserAuthenticationToken();

String target = "https://sandbox.esignlive.com/a/transaction/{packageId}";

System.out.println("https://sandbox.esignlive.com/auth?authenticationToken=" + token + "&target=" + target);
Haris Haidary OneSpan Technical Consultant

Reply to: options to complete a package that requires review from package owner

0 votes

We also have an integrated workflow that deals with required attachments where a package is put in the Ready to Review status once documents are signed.  We are using the Callbacks as our primary source of event updates from OneSpan so when the TRANSACTION_READY_FOR_COMPLETION callback is received we will facilitate the package review in our system before completing it.  In addition to utilizing the callbacks, we have also implemented a polling service that can run to pick up any package updates in the event the callbacks fail because as you know there is no recovery option for failed/missed callbacks.  The question I have is how can we tell from the package data, that it is ready to review?   From what we can see when we check the package status is still in the Sent status.  We are using the .Net SDK (not REST apis) to integrate with OneSpan.  Is there any flag or other field we can go off of in order to indicate it is ready to review or do we need to inspect the package details to infer this.  For example on Sent packages do we also need to check for an Autocomplete flag equal to false and then check to see if all Documents are signed, or if all signers have signed?  Looking for some guidance.  Thanks!

 

 


Reply to: options to complete a package that requires review from package owner

0 votes

Hi Tricia,

 

I don't think there's a direct flag indicating if a package is waiting for mark complete. And as you mentioned, you need to calculate the result based on:
(1)package is in SENT status

(2 optional)correct package sender - package listing API also returns packages that the API Key holder received as a signer

(3)package is not auto complete

(4)there's no incomplete signature left

A sample code below could give a brief idea:

 

        public readonly PackageId packageId = new PackageId("pMgYlmQTFSjIe94SkojFMxSZXrM=");
        public readonly string senderEmail = "your_sender_email";

            Boolean isSent = false;
            Boolean isOwner = false;
            Boolean autoComplete = false;
            Boolean hasIncompleteApproval = false;
            DocumentPackage pkg = eslClient.GetPackage(packageId);
            isSent = pkg.Status == DocumentPackageStatus.SENT;
            isOwner = pkg.SenderInfo.Email == senderEmail;
            autoComplete = pkg.Autocomplete;

            foreach (var document in pkg.Documents)
            {
                foreach (var signature in document.Signatures)
                {
                    if (signature.Accepted == null) {
                        hasIncompleteApproval = true;
                    }
                }
            }


            Boolean canMarkComplete = isSent && isOwner && !autoComplete && !hasIncompleteApproval;

 

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