Signers from Retrieving List of Transactions - Not excluding account sender
Wednesday, October 6, 2021 at 04:35amHi 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.
Reply to: Signers from Retrieving List of Transactions - Not excluding account sender
Wednesday, October 6, 2021 at 08:30amHi 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
Reply to: Hi Srinivasan K K, This…
Thursday, October 7, 2021 at 12:36amUnfortunately, I don't get the roles object within the transaction list. FYI, I use .NET SDK.
Reply to: Signers from Retrieving List of Transactions - Not excluding account sender
Thursday, October 7, 2021 at 08:34amHi 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
Reply to: Signers from Retrieving List of Transactions - Not excluding account sender
Tuesday, October 12, 2021 at 01:54amHi 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,
Reply to: Hi Duo_Liang, Thanks for…
Tuesday, October 12, 2021 at 08:32amHi 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