DevBlocks Agency
DevBlocks Agency
Integrate Booking system / Payment Gateway and Accounting System with Zapier
🛠

Integrate Booking system / Payment Gateway and Accounting System with Zapier

For this project, I was required to connect Omnify with Xero to create an invoice and later payment for the same invoice.

The problem happened when we wanted to send an account code in Xero that was similar to the name of the course but not the same.

We found out a solution in Airtable that had all the courses in Omnify related to Xero codes.

Zapier Solution

Creating an Invoice→Payment Xero from a paid course

  1. We get the new booking from Omnify (already paid by Stripe)
  2. Text transformations as we needed to parse the course name to find it on airtable (solution documented below in this document)
  3. Text transformations as we needed to parse the course name to find it on airtable (solution documented below in this document)
  4. Finding or creating a contact in Xero to avoid customer duplication
  5. Finding the Course name related to a Xero Account Code in airtable.
  6. Create a Sales Invoice in Xero.
  7. Created a Payment in Xero.

image
image

Airtable Solution

So To make the Zapier automation works, we need to know, which is the Xero Account Code for each of the class.

So there is a middleware that we use to get that information.

We use two tables inside airtable one to store the account codes (Xero XX Accounts), and the other (Omnify XX Courses) to save the classes and the relation to the account code in Xero.

XX is for the country (as there were 2 countries that needed the same solution)

Omnify XX Courses

In the Omnify XX Courses table, we have the next info.

  • Name - The name of the class
  • Xero Account - The Xero account, this is a field that populates based in the Xero XX Accounts table so you can select Xero account from a list.
  • Xero Account Code - a Hidden field that has the information that needs Zapier (it´s the code as a text value)

Xero XX Accounts

In the Xero XX Accounts table, we have the next info.

  • Code - The code number for the Xero account.
  • Name - The name of the account in Xero (informative purpose only).
  • Omnify Courses - a hidden field with the relationship between this table and the Omnify XX Courses table.

There is a form for every action needed below, to make it easy for the user to add information.

Forms Links (removed for privacy)

SG

Use the next link to add a class (you need to add first the Xero code if it is a new one):

Use the next link to add a Xero code:

HK

Use the next link to add a class (you need to add first the Xero code if it is a new one)

Use the next link to add a Xero code

Updating a Course

To update a course (when a name is changing), the only thing needed is to update the airtable "Omnify XX Courses"

image

To update the code of an existing course you just change it for other existing code if it already exists, or you create one first (with the form or directly on the table) and later come here to look for it

image

Adding or Checking Multiple Courses

If you need to add multiple courses, or if you want to check if every course is already in airtable you can use the next method:

There is another table named 'Course Validation Table XX'

In this table, you can copy and paste all the existing courses in Omnify without affecting the data that is already in table 'Omnify XX Courses'.

For example, if we have the following data:

image

You can see that there is an example course that didn´t exist previously 'Test - Todelete - Friday - 3-5 yrs'.

But for some reason we don´t know it, and we only want to copy-paste all the courses and find out.

We copy all the courses, it can be a partial list or a complete course list, and we paste it in the second column of the "Course Validation Table XX" on the "Courses" column

(The first column is blank)

image

As you can see in the example. If there is a course that didn't exist in the other table, it will be created.

With this method, you don't affect the principal table, as the only data added would be the new courses.

You will then go to the table Omnify XX Courses.

image

You can use the view "No Xero Account" to discover the courses that don't have a Xero Code so that you can edit them.

image

Cleaning up

At the end or the beginning of this process, you can delete all the information from "Course Validation Table XX".

  1. selecting all rows
  2. Right click on the first column
  3. Option "Delete all records"

image

Adding multiple Xero Account Codes

Similarly, you would add in the column code for "Xero Validation Table XX" and will automatically add the missing ones. In the next example the code 453 was added to the principal table (the name needs to be added manually)

Xero Validation Table SG

image

Xero SG Accounts

image

As you can see, only the missing code was added.

Cleaning up

Similarly, at the end or at the beginning of the process, you can delete all records.

image