NAV SEAL brings DocuSign eSignatures to Microsoft Dynamics SMB customers

NAV SEAL logo

“Probably the best API documentation I have worked with. It allowed us to fully focus on the development of our integration.” — Alessandro Menegatti, Developer

NAV SEAL creates innovative solutions for its clients exclusively on Microsoft Dynamics 365 Business Central (formerly known as Navision or Microsoft Dynamics NAV), Microsoft’s popular Enterprise Resource Planning (ERP) platform for small and medium-sized businesses. NAV SEAL often works as a subcontractor for larger companies that don’t necessarily have the expertise or resources to build solutions for Microsoft Business Central. One of those companies was looking for help integrating DocuSign, which began NAV SEAL’s journey to create a flexible solution that would help a much larger audience: all Business Central customers. In fact, Microsoft noted in an April 2018 blog post that they had more than 160,000 Business Central customers, so NAV SEAL understood the market they were seeking.

With a small team of only two developers, NAV SEAL wasted no time diving into the bits and bytes of learning how to code their Business Central integration with the DocuSign eSignature REST API. Their design goal for their Business Central solution was simple: No complicated setup or process, and usage should be as simple as the click of a button. They also wanted to make sure that the integration was completely within the Business Central environment, without the need for external flows or automations that can add additional complexity and training for NAV SEAL clients. This includes not leaving the Business Central environment, even to view a signed DocuSign document. Their initial version included DocuSign integration for two common Business Central tasks: creating sales quotes and sales orders.

Early testing

Before integrating into Business Central, NAV SEAL wanted simply to understand the mechanism of connecting to DocuSign using OAuth and making some simple API calls to create signature requests. They turned to the DocuSign Developer Center, which provided the necessary OAuth conceptual content and code examples to get them started. NAV SEAL selected JSON Web Token Grant (JWT) as their OAuth mechanism to enable authentication with a system account, rather than using Authorization Code Grant, which would require each individual Business Central user to sign into a DocuSign account.

They found the DocuSign API Explorer was helpful for testing API calls, along with using a downloadable and runnable personalized PowerShell project, called a Quickstart.

A few technical challenges

The Developer Content team at DocuSign spends much time and energy in providing flexibility for developers in terms of Software Development Kits (SDKs) in six programming languages (C#, Java, Node.js, PHP, Python, and Ruby), and code examples in eight (the same six SDK languages, plus Bash and PowerShell). Despite this flexibility, NAV SEAL faced a challenge in that Business Central development is done in the AL programming language, which isn’t one of them. NAV SEAL found that the PowerShell code examples were close enough to provide assistance.

Another technical challenge that had to be solved by NAV SEAL was that, using the JWT library within AL, it was difficult to manage the encryption of the private key as required by the JWT specification.

The final technical challenge concerned the nature of the Business Central environment itself, due its multitenant architecture. To use DocuSign Connect (our webhook technology for event notification), a developer specifies a callback URL where event status change notification messages will be sent. However, in a multitenant architecture, the callback URL varies per tenant, which complicates app development. NAV SEAL decided to periodically poll for envelope status changes using the DocuSign listStatusChanges API endpoint while working on a solution with DocuSign.

The result

After careful design, addressing challenges, and a successful pilot program, NAV SEAL was ready to roll out their solution for Business Central customers in just three months. The integration was designed so well that it hides complexity for the user. It begins as a simple extension to add a new DocuSign navigation menu to the standard quote and sales order screens, as shown in Figure 1.

DocuSign menu navigation to start the signing process

Figure 1: DocuSign menu navigation to start the signing process.

Upon selecting Send Quote with DocuSign, as shown in Figure 2, the user is prompted to specify basic parameters for the signer, such as Name, Email Address, and Email Subject, which are prefilled with known data from the quote (or sales order).

Dialog presented to the user for specifying DocuSign envelope data

Figure 2: Dialog presented to the user for specifying DocuSign envelope data.

The envelope dialog contains an additional Auto Send option, which is active by default; but when it is turned off, the integration enables users to further customize the DocuSign envelope before it is sent. For example, a user can attach additional documents outside the quote process. Clicking OK is where the magic happens, as outlined here:

  • A standard Business Central quote document is created.
  • The custom Business Central AL code calls the DocuSign createEnvelope endpoint, using the quote document (Base64-encoded) as part of the envelope definition that is sent to the recipient (signer) that was specified in Figure 2.
  • The DocuSign envelope is sent to the specified recipient and NAV SEAL logs the event.
  • NAV SEAL periodically polls to check the status of the DocuSign envelope, including when the recipient signs the quote (completed), refuses to sign (declined), or any other event reported by DocuSign.
  • When the DocuSign envelope is complete, a signed copy of the document contained in the envelope is available for download from within Business Central, as shown in Figure 3.
Business Central quote showing a completed (signed) DocuSign envelope

Figure 3: Business Central quote showing a completed (signed) DocuSign envelope.

Expanding their solution

NAV SEAL was careful to plan for future expansion of new features. For example, they plan to add support for multiple anchor tabs, multiple documents in a DocuSign envelope, and perhaps even multiple recipients (signers). They are also looking at implementing new DocuSign features as they become available.

An additional upgrade in the future is planned to implement DocuSign Connect webhooks, which will enable more real-time status updates over periodic polling.

Ready to get started with NAV SEAL?

NAV SEAL is currently working with Microsoft on certification for the app to be placed in Microsoft AppSource. If you’d like to get started immediately, contact NAV SEAL, who can help you.

Interested to see what integrating with DocuSign can do for your organization? Start with a free developer account and the DocuSign Developer Center, which gives you all the information and tools you need to build your own DocuSign integration: 

  • Discover the DocuSign platform and learn how it works. 
  • Learn about authentication and choose how your integration will authenticate its API calls with DocuSign.
  • Download our preconfigured, runnable Quickstart in your chosen programming language and use it to kickstart your own integration development.

Partner with us! See how to build DocuSign integrations that align with your business model.

 

Tony Mann
Author
Tony Mann
Director of Developer Content
Published