Trending Topics: Latest from our forums (February 2022)

Here are some of the latest popular questions that the Docusign developers community asked on Stack Overflow in the month of February 2022. You too can ask questions by using the tag docusignapi in Stack Overflow.

Thread: JSON request for envelope with single document, two signers, pre-fill fields?

https://stackoverflow.com/questions/71040167/

Summary: The developer is trying to use the pre-fill fields feature and send an envelope based on a template that includes pre-fill tabs. They are getting an error that says A Required field is incomplete. TabId: <TabIdGUID>

Answer: You can use pre-fill tabs when creating an envelope based on a template that includes such fields. However, there’s a difference in the manner in which you provide the values for these fields. With regular tabs (that are part of a specific recipient), you only need to specify the tabLabel property for each tab and the value to set the value for the tabs. With pre-fill tabs, you need to also provide the tabId, which is a unique identifier (GUID) identifying each tab in the Docusign system. The developer didn’t provide this and therefore was getting an error.

If you want to use pre-fill tabs using our eSignature SDKs, see Inbar’s blog post on this topic.

Thread: SOBO using JWT functionality

https://stackoverflow.com/questions/71194225/

Summary: This developer is attempting to implement SOBO (Send on Behalf Of) with JWT Authentication. They are not sure how to do this. They want their app to impersonate different users and send as if it was sent by that specific user.

Answer: When using JWT authentication, you provide the userId for a user in the Docusign system. The access token you get after successful authentication allows you to make API calls impersonating that user. However, the user must give consent (or it must be given by an administrator for the entire organization) before any API call can be made on their behalf for a specific application (represented by an integration key). To obtain the userId of a user, you can use the Users:list API method to look up the list of users in the given account. That API call will need to be called by an administrator in some configuration section of your application and the results stored somewhere so you can later make JWT authentication calls for all these users as needed.

Thread: Why aren't Docusign Custom Fields populating during embedded ceremony

https://stackoverflow.com/questions/70963729/

Summary: The developer is using the C# SDK to build an integration that sends envelopes based on a Docusign template. The envelopes should include text fields for the recipients that are populated by the C# code. The developer is not seeing the fields being populated. 

Answer: This is the relevant C# code that the developer was using:

var signers = new List<TemplateRole>();
foreach (var r in req.Recipients)
{
    var signer = new TemplateRole();
    if (req.CeremonyType == EMBEDDED_SIGNING)
    {
        signer.EmbeddedRecipientStartURL = $"{appSettings.EmbeddedSigningUrl}{req.CeremonyParams}";
        signer.ClientUserId = r.SSOUserId;
    }
    signer.Email = r.Email;
    signer.Name = r.Name;
    signer.RoleName = r.RoleName;
    signer.RoutingOrder = r.RoutingOrder.ToString();
    if (textTabs.Count > 0)
    {
        signer.Tabs = new Tabs
        {
            TextTabs = textTabs
        };
    }
    signers.Add(signer);
}

The issue this developer had was that the RoleName that they were providing in this code was not the same as the one that was on the envelope. It was a case-sensitivity issue. The RoleName must be identical to the one that was used in the template for the fields to be assigned correctly.

Additional resources

Inbar Gazit
Author
Inbar Gazit
Sr. Manager, Developer Content
Published