SrinivasanKK

Signers from Retrieving List of Transactions - Not excluding account sender

0 votes

Hi Team,

I am trying to create a transaction. I am the account owner. I am adding 'X as a signer, but when I retrieve the transactions, I am also added as one of the signers in it.

Is there any way to exclude "account owner" from the signers' list?

 

FYR: packages response is added.

Srinivasan K K


Reply to: Signers from Retrieving List of Transactions - Not excluding account sender

0 votes

Hi Srinivasan K K,

 

This is an expected behavior that the package owner/sender will always appears in the signer list. If you want to identify which email is the sender:
-package owner/sender will always have a type of "SENDER"

-without overriding the role name, the package owner/sender will have a role name of "Owner"

 

Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to: Signers from Retrieving List of Transactions - Not excluding account sender

0 votes

Hi Srinivasan K K,

 

In that case, use code around below lines: 

          OssClient ossClient = new OssClient("your_api_key", "https://sandbox.esignlive.com/api");
            DocumentPackage pkg = ossClient.GetPackage(new PackageId("your_package_id"));
            foreach (var Signer in pkg.Signers) {
                Debug.WriteLine($"Signer Name: {Signer.FirstName + " "  +Signer.LastName}");
                Debug.WriteLine($"Signer Email: {Signer.Email}");
                Debug.WriteLine($"Is Signer the Sender: {Signer.SignerType == "ACCOUNT_SENDER"}");
            }

 

Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to: Signers from Retrieving List of Transactions - Not excluding account sender

0 votes

Hi Duo_Liang,

Thanks for the code snippet, I got into 3 different use cases while exploring this issue.

I use .NET SDK,

 

case 1: I am the sender/owner of the document and assigning different user as a signer

Problem: Using SignerType == "ACCOUNT_SENDER" will fetch the required signer

 

case 2: I am the sender/owner of the transaction and assigning 2 signers including the owner also as a signer

Problem: Using SignerType == "ACCOUNT_SENDER" will not be sufficient since the owner also acting as a signer in this case.

 

case 3: I am the sender/owner of the transaction and assigning the owner as a signer

Problem: Here I can simply return the signers list when its count is 1.

 

Can you please show or suggest to me a solution for the above use cases, especially on case 2.

 

Thanks,

Srinivasan K K


Reply to:

0 votes

Hi Srinivasan K K,

 

You can use code around below logic to unify these three scenarios:
 

            OssClient ossClient = new OssClient("your_api_key", "https://sandbox.esignlive.com/api");
            DocumentPackage pkg = ossClient.GetPackage(new PackageId("your_pkg_id"));
            foreach (var signer in pkg.Signers) {
                if (signer.SignerType == "ACCOUNT_SENDER") {
                    Boolean hasSignature = false;
                    foreach (var document in pkg.Documents) {
                        foreach (var signature in document.Signatures) {
                            hasSignature |= (signature.SignerEmail == signer.Email);
                        }
                    }

                    Debug.WriteLine($"Owner Name: {signer.FirstName + " " + signer.LastName}");
                    Debug.WriteLine($"Owner Email: {signer.Email}");
                    Debug.WriteLine($"Owner has signature: {hasSignature}");
                }
            }

 

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