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!