I have emailed support but have received answers I do not understand on make,
I thought to just try my luck here.
My Aim is as follows…
I have woocommerce installed, I have Invoice Ninja v5 Hosted.
I want for every time that a client is created on Woocommerce for that client to be written to invoice ninja.
I got that done by creating a Woo Watch Clients to a Invoice Ninja Create Client hook.
Now my Second scenario error pertains to invoice ninja side.
I have Woo Create Orders and then to Invoice Ninja Create Quote soooo everytime a new order is created on Woocommerce a Quote will be written to invoice Ninja.
The only field in invoice ninja that is giving an error is Client ID.
My error is as follows…
RuntimeError 422 The given data was invalid.
“client_id”: The selected client id is invalid
In the above error I used billing email (Woocommerce) as CLientID.
In the below error I have used CustomerID (Woocommerce)
RuntimeError
[422] The given data was invalid. “client_id”: The selected client id is invalid.
Basically what I need to do is when a quote is created on Woocommerce I want it to write that quote to the client who created it on Invoice Ninja.
So what do I input in the client ID field to accomplish the above.
I can see I can pick a client but that doesnt help as any and all Woocommerce customers quotes will be written to one client on Woocommerce.
We have just paid for a annual subscription to Invoice Ninja. And we have a annual subscription to make.com so there is no turning back now.
If it isn’t possible to find the client in Make using their email address one option may be to store the Invoice Ninja client id in WooCommerce after the client is created.
here is an older post from me that explains how you can use the “Make an API Call” Modules in Make to be able to search for specific entries. In that case, it was an invoice but the same can be done for clients.
GET /api/v1/clients?page=1&per_page=50&name=Test will search for all clients that have “Test” in their name. I guess you can also search for an email address. Although email addresses belong to contacts and not clients. I haven’t tried this but maybe @hillel can point you in the rigth direction. Something like &contacts.email=xxxxxxxxx ?
Another option could be to created a data store in Make that has the client id from Invoice Ninja and the emailadress from Woo Commerce. So it creates a matching table.