Twinfield accountancy integration

We are currently investigating whether to move to Breww as our brewery management package.

We use a local accounting package that Breww has no intention of integrating with right now, so we are investigating how to build our own using the API. Unfortunately, right now the API seems to be read-only.

We would like to update a few fields in orders to simplify synchronisation, such as the uploaded_to_accountancy_provider, order_status and payment_status fields.

A bonus would be if we could also show payments in Breww, e.g. be able to create payments using the API.

1 Like

Thanks for the suggestion, Kees.

We certainly could look into making these options available via the API.

  • It would be possible to allow you to set the uploaded_to_accountancy_provider field (and store an external ID too, if needed).
  • The order_status is a little more complicated, to be honest, but it would be an option (as not all orders can be updated to all statuses at all times).
  • The payment_status cannot be updated manually, but if we allowed you to add payments via the API, then this would automatically recalculate the payment status for you.

We’ve had many requests for different accounting integrations, but often, very few customers looking for the same platforms, which is likely why we’re not able to build the integration that you are looking for right now. We have been considering building a generic CSV/Excel accounting “integration” which would allow you to export transactions from Breww in a format configured by you (to match the format required by your accounting platform). It would be able to track which invoices (for example) have been exported already, so it would be easy to not pull duplicates from Breww. There would also be some import options (e.g. for payments).

We think this might be a better option for us to choose as it would help out lots of customers, as it should be able to work for the platform you use, as well as many others that we don’t yet have “full” support for. Is this something that would work for you? And would you prefer this to Breww API changes, where you have to build the integration yourself?

Hi Luke,

I totally get why you can’t work with every accountancy package, there are so many out there.

Although CSV/Excel style exports would be useful to those customers that don’t know any better, don’t underestimate how many brewers have access to (some) development skills :smile:

Our Master Brewer is an ex-developer so he hates doing manual work that can be automated. I’m a retired developer helping him out.

For us, we’d really appreciate it if Breww had a few “update/insert” APIs. The uploaded_to_accountancy_provider field update is our immediate concern, as otherwise we need to use some artificial filter method like date ranges, and we would have to reconcile invoices in the accounting package, making the code more complicated.

When you do build the CSV export, I suggest adding it to the API as well. This would allow for a simple “shell script style” download/upload, so that there is at least some automation.

PS when we do build something, we will open source it so this is useful for others as well. We will likely start with GitHub - php-twinfield/twinfield: PHP 7.3+ Library for using the Twinfield API. as a base block to talk to our accounting package.

2 Likes

Thanks Kees.

This is really useful to know and we really appreciate the idea to open source what you build :pray:

We’ll see what we can do regarding these fields in the API. Although uploaded_to_accountancy_provider is exposed as readable in the API, this was never intended to be writable by others, and works in conjuction with other fields on our side - such as the external ID and also which accounting integration made the upload (as you can enabled multiple accounting integrations at the same time in Breww) - so we’ll need to make sure that we don’t cause any problems here.

We’ve an idea for how best to go about this and so we’ll look to expose this functionality for you and will get back to you soon with an update :+1:

I’ve now finished my first take at sending Breww invoices to Twinfield using the Breww read-only API and the Twinfield API.

See GitHub - keesverruijt/breww_twinfield_php: Synchronisation of sales transactions from Breww to Twinfield

In the mean time I heard that you are now considering doing Twinfield integration, which would be great as it means we don’t have to maintain this ourselves. I hope what I wrote helps you bootstrap your own code, even if you’re not using PHP…

2 Likes

Thanks Kees, I appreciate you sending this over. It looks like you’ve already found neat solutions to some quirks, so should be really handy.

We’ll update you when we know more :+1:

Hi Kees - this is just a quick update that Twinfield is underway and progressing well! We’ll let you know once this is complete :+1:

1 Like

WoW, would be great to have it up and running on 01-01-2024.
What’s your estimate?

2 Likes

Hi Gerard - the current estimate is early January, just because of Christmas upsetting the timetable! However, you’ll be able to upload invoices created before integrating Breww and Twinfield, so if you wanted to start invoicing in Breww from 2024-01-01, you’d be able to upload any invoices created then when the integration goes live shortly afterwards :slight_smile:

2 Likes

Hi, can you elaborate on the current status?

1 Like

Hi Gerard - of course! It’s progressing well but more slowly than anticipated due to the API being so different to other accountancy APIs that we’ve integrated with in the past, and the documentation not being particularly clear. This has meant the build has required much more platform-specific work than usual.

However, despite this, we’re not far off now and I should be able to provide a more definite update by the end of the week :+1:

1 Like

Good news, Breww’s Twinfield integration is now live :tada:

It works in the same way as our other accountancy platforms, on which we have a guide here:

We hope this makes life much easier for any Twinfield users, and as always please let us know if you have any feedback!

I’m exited and trying the integration with Twinfield.
I have 3 administrations in Twinfield, how to select the brewery administration with breww.

Customers will now be synced double?
Or can I somehow prevent this to happen?

Hi Gerard - I’m glad to hear that you’re excited! Currently, the integration is set up to expect a single administration. So we’re adding the ability now to choose one if you have multiple.

However, in the meantime, if you raise a support ticket letting us know which administration to use and grant us access, we can set it up for you urgently!

Regarding customers, you can “Map” the existing customers in Twinfield to their Breww equivalent using the Customer mapping tool outlined in this section of the accountancy setup guide. This will mean that duplicates aren’t created in your Twinfield account :ok_hand:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.