Select Page

Automated WC Subscriptions based Invoicing for Marketing Agency using Xero API

Challenge

Our client wanted an Automated Invoice System for their WooCommerce Subscriptions based website with the help of the Xero API. They already had a system with Xero, but it was nearly manual and client had to change things for every invoice manually. They wanted everything to be handled more automatically. We love API integrations, so we couldn’t wait to get our hands into the project.

Our task mainly was to:

  • Bring in the Chart of Accounts for all products from Xero
  • Bring Tracking items from Xero
  • Prepare settings for Chart of Accounts to be linked with WC Subscription product
  • Add settings for line items on orders to apply Tracking Items to each one
  • Utilize WC Xero Integration plugin to push extra data to Xero
  • Make sure the whole integration works together to deliver an automated invoice system

Our Solution

There were both simple and complex elements to the project.

Here’s how we solved the problem:

WC Subscriptions Xero Integration

To integrate Xero automation with the existing WC Subscription products, we had to link the products with appropriate Accounts and Tracking items on Xero. Client had Accounts for each of their products on Xero and Project Managers were saved as Tracking Items. So we had to work with both of them to achieve a total automation.

Chart of Accounts Integration

To link the subscriptions with Accounts on Xero, we implemented a settings field that bring in all the Accounts from Xero. Appropriate Account can be set on the subscription edit page to be saved with the product. So we were able to assign the appropriate account on Xero whenever someone purchases the subscription, without having to set it from Xero like before.

Tracking Items Integration

Line items needed to be assigned to a Project Manager which needed to be based on Tracking Items. Tracking items in Xero are similar to having Custom Fields with other APIs. So we fetched the previous values for the Tracking items into the line item settings and set the selection as a line item meta when order is saved.

Settings on Appropriate Places

We added settings for Accounts on Subscription Edit page and Tracking Items on Order Edit page under the respective line items. The settings are contexually placed so that they are easy to understand and site administrators can easily maintain the system.

Integration with Existing Plugin

Client was already using a WooCommerce Xero Integration plugin. While that eased our work a bit, we had to play along with the plugin to submit our custom contexual settings data into Xero. So we had to work on top of it to apply our customizations.

Putting it all together

At the end, the automation was successful. Now our client has a worry-free system working automatically without ever needing to login to Xero for basic settings. We implemented an automation that will hopefully save time and effort for our client.

Are You Interested?

We can get you hooked to a similar project!

Get an estimate
×

 

Hello!

Click one of our contacts below to chat on WhatsApp

× How can I help you?