A Test
A Test

Reputation: 31

How to send document to client's more than one personal email ids to sign it using DocuSignAPI .NET Client?

I've setup a developer sandbox environment of DocuSign. Using its C#.NET API Client, I want to send a document for signing to client's more than one personal email ids. Once the client opens any email to see and sign it, the corresponding DocuSign envelope state should get updated to Completed.

Also, I tried to achieve the above behavior through multiple signer recipients, but the envelope state gets marked completed, when all the signer recipients sign the document. Here I want any signer recipient sign should be enough to complete the document signing workflow.

Please suggest how to get it done

Regards,

A

Upvotes: 3

Views: 133

Answers (1)

Drew
Drew

Reputation: 5029

In order to deliver an envelope to several emails in a single role, you'll need to create a Signing Group. Signing Groups can be created and managed through the API, so you'll be able to do that programatically.

While you'll need to implement your own business logic and error checking, a sample of creating a Signing Group in c# looks like:

        SigningGroup signingGroup = new SigningGroup();
        signingGroup.GroupName = "SigningGroup_" + DateTime.UtcNow.Ticks.ToString(); 
        signingGroup.GroupType = "sharedSigningGroup";
        signingGroup.Users = new List<SigningGroupUser>();

        SigningGroupUser signingGroupUser1 = new SigningGroupUser();
        signingGroupUser1.UserName = "Example Signer";
        signingGroupUser1.Email = "[email protected]";
        signingGroup.Users.Add(signingGroupUser1);

        SigningGroupUser signingGroupUser2 = new SigningGroupUser();
        signingGroupUser2.UserName = "Example Signer";
        signingGroupUser2.Email = "[email protected]";
        signingGroup.Users.Add(signingGroupUser2);

        SigningGroupInformation signingGroupInformation = new SigningGroupInformation();
        signingGroupInformation.Groups = new List<SigningGroup> { signingGroup };

        SigningGroupsApi signingGroupsApi = new SigningGroupsApi(apiClient.Configuration);
        SigningGroupInformation newGroupInfo = signingGroupsApi.CreateList(accountId, signingGroupInformation);

        string newGroupId = newGroupInfo.Groups[0].SigningGroupId;

To use the Signing Group in an envelope, define a signer with that group ID:

        Signer signer = new Signer
        {
            SigningGroupId = newGroupId,
            RecipientId = "1",
            RoutingOrder = "1"
        };

Once the envelope is created as a draft, you can then clean up the signing group:

signingGroupsApi.DeleteList(accountId, newGroupInfo);

Upvotes: 3

Related Questions