Woocommerce, first name in invoice

Hello! I’m a newbie and I hope you can help me. I’m automating make to connect to woocommerce, take a completed order and extract the basic information so that later in the Quiou program (invoicing) a new contact is created and subsequently an invoice is created with that data. The problem arises when a product is sold in the physical store apart from online, the invoice generated in the physical store does not have a name or surname so make gives an error. I want to put functions in the Name field that if it does not obtain the name and surname from the order data it will put “Sale in Store” by default and thus a new co


ntact can be created in Quipu and the subsequent invoice. I would appreciate it if you could indicate to me with an image the functions that the field should have. Thanks

You can use the ifempty() function around the name and set the alternative text.

No, you can’t simply do that, because of the space between the variables.

You will have to check if length is greater than 1, or use the trim function before ifempty.

Hope this helps! Let me know if there are any further questions or issues.

@samliew


P.S.: Did you know, the concepts of about 70% of questions asked on this forum are already covered in the Make Academy. Investing some effort into it will save you lots of time and frustration using Make later!

1 Like

thank you very much to all for helping me. would it be possible that you write me completely the formula? i have asked Chatgpt and it puts it to me in plain text format but now i don’t know which functions correspond in make.com, if you write it to me in make.com i copy it and i avoid errors for a simple character.

if(trim(1.Billing.First Name) != “” and trim(1.Billing.Last Name) != “”;
trim(1.Billing.First Name) & " " & trim(1.Billing.Last Name);
“Cliente Tienda Física”)

Thank you very much again

Would that be OK?
Screenshot_360

ifempty(trim(1.firstname   1.lastname); default)
1 Like

Hello!

I reopen the thread because I thought it was solved but now it doesn’t work, I attach a screenshot but it still indicates that the NAME field is empty even though I have configured the IFempty function.

any ideas?

Thanks!


you added extra spaces between the variables. Delete them.

The trim function should contain both the first and last name variables at the same time. Currently you have set it up to only trim the first name.

Hope this helps! Let me know if there are any further questions or issues.

@samliew


P.S.: Did you know, the concepts of about 70% of questions asked on this forum are already covered in the Make Academy. Investing some effort into it will save you lots of time and frustration using Make later!