Question

Creating an order with Line Items in WooCommerce - from Checkfront

  • 14 January 2023
  • 4 replies
  • 152 views

Hi,

I have read about 15 different posts and the documentation on WooCommerce but I feel like I am missing a crucial step or I don’t understand how to loop or something.

I am trying to add an order to my WooCommerce backend from Checkfront (an online booking solution). 

Checkfront gives the data in a line item format, it just does not include the SKU - I have created a lookup table to lookup the sku values but I can only figure out how to look up one.

Source data from Checkfront:

I transformed the items field into individual fields (however I am not convinced this is correct) - since the source data is in a proper array I think I should be able to loop through it somehow...

Here is the lookup table:

What I need to do is get each of the line items above into the wooCommerce action with the SKU matched from the table above…

 


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

4 replies

Userlevel 7
Badge +14

Hi @debnajm 

Good question.

A more advanced and efficient approach would be to use a Code step to function as the Lookup Table since the code could be configured to loop thru each of the line items to find the SKU and create an array of SKUs, thus preparing the data before sending to WooCommerce.

Hi @debnajm 

Good question.

A more advanced and efficient approach would be to use a Code step to function as the Lookup Table since the code could be configured to loop thru each of the line items to find the SKU and create an array of SKUs, thus preparing the data before sending to WooCommerce.

Do you want a gig? I give up

Userlevel 7
Badge +14

@debnajm 

I’ve sent you a DM.

Userlevel 7
Badge +11

Hey@debnajm!

You may have solved this already, but I just wanted to chime in to let you know that a Lookup Table can actually work with line items.

Check it out:

72ecc7cd8f460f001b59cef4a4312d33.gif

 

Then in your WooCommerce step you end up with something like this:

 

I haven’t tested this all the way through but it seems like it should work :)