Amaka: Building a bridge from DocuSign to Xero
"The well-written and digestible API documentation was invaluable in helping the development process for the DocuSign + Xero integration." - Naveed Ahmed, Chief Technology Officer, Amaka
Amaka, headquartered in Sydney, Australia, is a leading international middleware vendor in the accounting and financial services software industry. With a long track record of successful integrations that automate data connections between point-of-sale vendors and e-commerce application providers such as Amazon, Square, Shopify, and Wix, Amaka was an obvious choice for the task of integrating DocuSign functionality with Xero, a cloud-based accounting platform for small and medium businesses. Amaka’s approach to this project leveraged both DocuSign and Xero APIs to build a middleware data exchange application that automatically sends Xero accounting documents for electronic signature through DocuSign and tracks completed documents in Xero. Once the integration is configured, no further input from the user is needed: the integration continuously monitors the user’s Xero account and routes documents automatically.
Amaka: The bridge builder
The main driver for Amaka to develop an integration between Xero and DocuSign arose from a basic need: DocuSign customers who also use Xero were looking for a way to use DocuSign for their Xero documents. Acting on customers’ requests, DocuSign approached Xero about integrating DocuSign eSignature technology into their product, only to encounter a roadblock: having an existing exclusive technology arrangement with a competitive eSignature provider, Xero could not directly incorporate DocuSign into its product.
Enter Amaka. As a trusted integration partner for Xero, Amaka had already demonstrated its ability to develop middleware integrations between Xero and other technologies, such as Square, to address the needs of small and medium businesses. Gian Ottavio, Amaka’s Global Partnerships lead, says, “We’re here to save small and medium businesses large amounts of time through automation.” Xero recognized the opportunity for Amaka to build a middleware solution to connect DocuSign and Xero, and recommended Amaka to DocuSign. From this arrangement came the vision for Amaka’s integration: a scalable solution that bridges both technologies while being hosted independently by Amaka. Through this project, Amaka became a DocuSign partner as well.
Amaka’s solution: Constructing the bridge
Amaka took an incremental approach to bridging DocuSign and Xero. In consultation with DocuSign, Amaka developed a set of use cases covering the Xero transaction scenarios they wanted to support, as well as the Xero documents they wanted to automate for signature. Amaka next developed wireframes for the user interface, which they iterated on and were approved by DocuSign.
Once the UI was established, Amaka proceeded with development. The first focus of the Amaka development team (two developers, one tester, and one solutions architect, with support from PM and finance engineering) was authentication: since the integration had to authenticate with both DocuSign and Xero, the team took its time to get this step right, implementing OAuth 2.0 authentication against both platforms and testing extensively, including QA review by DocuSign and Xero, before moving on to the rest of the integration.
Amaka chose to build and host the Xero + DocuSign integration with its existing technology stack: Development in Python; in-memory storage with Redis; SQL Server for persistent database storage; and Google Cloud for a scalable platform. For development in Python, Amaka chose the DocuSign Python SDK. As Naveed Ahmed, Amaka CTO, notes, “This saved a lot of time when it came to understanding methods to connect to DocuSign and envelope management.” For developing the integration, Amaka’s team found the DocuSign Developer Center invaluable. “We referred to the Developer Center throughout the documentation and analysis process. The documentation relating to authentication and webhook configuration was particularly helpful in understanding the expected responses from various endpoints,” reports Naveed.
The key challenge for the Amaka developers was building the core communications loops that sync documents between Xero and DocuSign. This is the heart of the Amaka solution: Amaka’s code uses polling techniques to query the Xero Accounting API every 15 minutes for new documents that reach a status that is recognized as requiring a signature, calls the DocuSign eSignature REST API to create DocuSign envelopes from Xero documents, and finally uses a webhook listener to receive updates from DocuSign for the status of signatures in process. For designing their solution, the development team undertook a variety of testing procedures to determine the most appropriate way to handle the polling mechanism for Xero. For the DocuSign side of the sync process, the DocuSign Connect webhook service was an obvious choice from the outset, as the Amaka team understood that polling would have proven unsustainable for the number of connections the integration would need. With the sync mechanisms completed, the Amaka front-end team built the UI, bringing the wireframes to life and refining the UI elements to make sure users would understand how to configure the integration for their own use cases.
Throughout the development process, Amaka’s development team was aided by Mohamed Ali, Lead Solution Architect for DocuSign in the Asia Pacific region. Mohamed was able to answer the team’s questions about the details of the DocuSign eSignature REST API, DocuSign API plans and pricing, and how the various DocuSign plans support unique sets of DocuSign features to enable the Amaka team to understand how to support different use cases for the several classes of users in their integration. Mohamed also led the feasibility study that confirmed customer demand in the region, gathered and documented requirements, reviewed the architectural design and wireframes, and provided QA and acceptance testing at every phase of development.
The development team performed multiple levels of testing on the integration: functionality, usability, performance, compatibility, security, load, and regression testing. Once the integration passed review at Amaka, the development team submitted it to DocuSign for QA testing, during which the integration was tested on various use cases to ensure it was performing in accordance with DocuSign standards. Having passed DocuSign QA, the integration was approved for go-live, which is the DocuSign process for taking an integration into production status, targeted at the DocuSign production environment. For more information on taking your app to production, see Go-Live (for enterprise integrations) or Go-Live for ISVs (for Independent Software Vendors).
The process of developing the integration was compact and efficient: with seven weeks dedicated to analysis and design, the core development cycle only lasted three and a half weeks, with another two weeks for testing before the integration entered go-live review.
How it works: Connecting Xero and DocuSign
Xero customers who wish to use Amaka’s Xero + DocuSign integration get started at Amaka’s integration portal, app.amaka.io, which hosts a number of Amaka’s integrations. At the portal, users can sign in with their existing Google, Apple, or Xero accounts, or create a new account on the portal itself:
They next choose to create a new integration, selecting Xero + DocuSign from the list of integrations shown:
The integration connects to the user’s Xero and DocuSign accounts, prompting the user to log in to both and grant the integration permission via the OAuth 2.0 Authorization Code Grant workflow to access their data. This is a one-time step completed during initial setup; the integration caches the access tokens granted by Xero and DocuSign and automatically requests refresh tokens when needed to keep the user authenticated, so they have no need to re-authenticate each time they use either Xero or DocuSign.
Once users have completed logging in to their Xero and DocuSign accounts, the next step is configuration: Amaka lets users configure their integration manually for the accounting documents they wish to integrate with DocuSign, or users can book an appointment to have an Amaka consultant guide them through the process.
For each type of accounting document, such as invoices, bills, purchase orders, expense claims, and quotes, Amaka is preconfigured to recognize which Xero document statuses indicate that they’re ready for signature. It also enables users to add signers, control their signing order, choose notifications, and more. Signers can be chosen from the user’s list of Xero contacts, Xero users, DocuSign users or signing groups, or custom contacts. Once the setup process is complete for each document type, users save and activate the configuration, and the integration begins to work immediately. (For a demonstration, see the video DocuSign + Xero | Setup Guide.)
From here on, the process is seamless for Xero users. Users create accounting documents and mark their status in Xero. Amaka’s integration automatically polls Xero every 15 minutes for documents whose status indicates that they require signature; it then uses its preconfigured workflows to pass those documents to DocuSign, where they are sent for signature to the signers specified by the integration’s configuration. Amaka then pulls the signed documents from DocuSign, brings them back to Xero, updates their status, and attaches the signed version of each document along with its DocuSign certificate of completion to the corresponding Xero record. All of this happens with no action required of the user once the integration has been configured.
The Amaka integration offers users easy ways to check on the status of their documents. Not only are documents’ statuses updated in users’ Xero and DocuSign accounts, but the Amaka integration offers its own Sync History panel where users can see the results of each sync operation. This lets users see whether a given document was approved, declined, or voided, and when:
Bridged: DocuSign and Xero, brought together by Amaka
Amaka’s solution brings DocuSign and Xero together to benefit their common customers: DocuSign customers who adopt Xero for their accounting needs, and Xero customers who prefer DocuSign for electronic signatures. The DocuSign + Xero integration will have a massive impact for these users: by automating the execution process, it saves a ton of time, and at no extra cost, as these customers enjoy the integration free of charge from Amaka. Amaka also benefits, as their successful integration raises awareness for Amaka’s other automation solutions for small and medium businesses. Amaka's solutions are trusted by over 35,000 businesses and accounting professionals globally.
You can try the power of any of the DocuSign APIs by visiting the DocuSign Developer Center, creating a free developer account, and using the examples and videos DocuSign provides to guide you through developing your own custom solution. You can also run MyAPICalls, a sample app that lets you experiment with common business scenarios without writing any code and view the associated API requests and responses. Enjoy!