Skip to main content

Hi,

I have recently started using Zapier to transfer new orders from my website to an obscure book-keeping software called Kashflow. It has a Zapier integration, although there are some things it does not cover.

Each customer on Kashflow requires a unique customer code. By default, Kashflow autogenerates the code from the first four letters of the first name followed by a number that autoincrements if there are existing customers with that code (e.g. "John Smith" -> "JOHN56" if there are 55 Johns already on Kashflow).

I wanted a code template that was less simple, so when manually entering customers on Kashflow I used the first four letters of the surname, the first letter of the first name, and a number (e.g. "John Smith" -> "SMITJ9"). There is a button with JScript on Kashflow that increments the number on a duplicate.

The Zapier Kashflow integration lets you set the customer code. It was easy to use Formatter to truncate the surname and first name for the code. I tried putting the number "1" at the end of the field, hoping that Kashflow would automatically increment it in the case of a duplicate code. However, Zapier would stop the process as soon as a duplicate customer code was found, and the customer was not created on Kashflow.

I found it is possible to use Paths to work around to a limited extent. I can use the Kashflow search integration to check if there is a customer with the same code before creating the customer and invoice. If there is a customer with the same code, then Storage by Zapier increments the code number by 1, and then there is another Kashflow search to see if the customer code is in use (see attachment for a simplified basic visual representation of what it looks like).

The problem with this is that without some way to conditionally loop this series of steps, I would need to duplicate all of the subsequent steps ad infinitum to make sure I prevent Zapier encountering a duplicate code. Also, if I wanted to make a single change to any of the downstream steps I would need to copy it over to all the duplicate steps.

Any suggestions on more elegant ways to address this problem would be much appreciated.

Hi @All Things Apples 

Here’s a guide about how to create a self looping Zap using Webhooks.

NOTE: This is different from the Looping by Zapier app.

 


Thanks Troy. I’ll look into this as a solution.


Hi @All Things Apples 👋

How did you get on with that guide Troy shared, did that approach work for you?

Want to double-check that things are all squared away here, so please let us know whether you’re in need of any further help at all!


Hi @SamB

 

Sorry for leaving this topic hanging, I had to change tack at work for a while. I have used Troy’s advice to split the order operation into two Zaps: one to send the WooCommerce data via webhook, and the other to receive,  loop until a vacant customer code is found, and then make the Kashflow invoice. I found that instead of Google Sheets, Storage By Zapier and Paths by Zapier were simpler to construct the conditional loop with.

 

However, I have found a problem that as soon as the WooCommerce order is sent through a POST webhook, most line item fields are stuck together and cannot be called individually. For example, I cannot call “Line Items Sku”, “Line Items Name”, or “Line Items Quantity”. I can only call “Line Items” which contains the information of all line item fields.

 

I need these to be each recognised as line item fields or the Zap will not work properly. If you have any suggestions they would be much appreciated.


I’m so sorry for the delay in my reply here @All Things Apples

However, I have found a problem that as soon as the WooCommerce order is sent through a POST webhook, most line item fields are stuck together and cannot be called individually. For example, I cannot call “Line Items Sku”, “Line Items Name”, or “Line Items Quantity”. I can only call “Line Items” which contains the information of all line item fields.

I need these to be each recognised as line item fields or the Zap will not work properly. If you have any suggestions they would be much appreciated.

Hmm, I suspect you may need a Formatter or Code action step to extract the individual line item fields but would need to see the structure of the line item data to get a better idea of what the best approach would be. Can you share a screenshot showing how these line items appear in the Zap? Make sure to blur or remove all personal information (names, emails, addresses etc.) from any screenshots before sharing here.

Looking forward to hearing from you on this! 


Reply