Xero Find or Create contact error: "No property or field 'xxxx' exists in type 'Contact'
I’m trying to create a Zap that takes a Gravity Form (in this case a wholesale order form), and looks on Xero (my accounting software) for that contact. If it finds the contact it needs to create an invoice for the contact; if it doesn’t find the contact then it needs to create the contact and then create an invoice.
But I’m getting stuck on the Find or Create contact stage. When I test it, it says ‘No property or field 'xxxx' exists in type 'Contact' (where xxxx is the name of the contact). But I can’t work out what to do to solve this…
Can anyone help?
Page 1 / 2
OK thanks @Troy Tessalone - I’ll try that in the morning!
John
@johnmorsebrown
You’d likely have to add a custom Code step before to detect and handle any line items with a missing Qty.
A Qty of 0 would likely cause an error too.
No problem @Troy Tessalone - here they are - in numbered order.
@johnmorsebrown
We would need to see updated screenshots with the outline of your Zap steps to have proper context.
Yes - because I’ve just filled in a form where I order some of every type of stock I have in (i.e. every item has a quantity next to it), and that worked. It’s when I only order certain quantities that it doesn’t work.
So do you mean I need to add a kind of ‘if no quantity assume zero’ logic? Any pointers on how to do that?
John
@johnmorsebrown
Possible edge/corner cases need to be handled by logic in the Zap steps, so best to test different use cases.
False alarm on the form working OK… It worked fine on the order I was testing it on, and when I test each individual component of the Zap, they all work fine. But when I tried filling in the Gravity Form with a new order and seeing if that worked, it doesn’t
I get this error email message - see attachment below.
I thik it’s to do with one line item which doesn’t have a quantity. The Gravity form I’m testing it on ordered 14 of the 15 items I have in stock - so there is one item that doesn’t have a quantity (it says ‘No data’ under quantity). How do I account for this?
I have got it all working - many, many thanks to @Troy Tessalone and @ken.a !
One slight tweak I’m trying to do - is there a way to make it change the unit price and the VAT if an order comes in from the US rather than the UK? A kind of ‘if-then’ scenario?
John
Woohoo - I think that works! Thanks so much @Troy Tessalone . Still a few issues to iron out but hooefully I’ll be able to work those out myself. Thanks again!
John
@johnmorsebrown
ISSUES
All the mapped Quantities are being concatenated thus resulting in number that is too large.
The Unit Price expects a number but those values include the currency symbol.
You need to add commas to properly separate these mapped variables in the Formatter step.
Any thoughts on this @ken.a ?
And if it helps @ken.a here are the screenshots showing how I set up the Line Itemizer.
Thanks @ken.a - I’ve done that, and it seems to work. But I am still getting the error message at the end:
Failed to create a create sales invoice in Xero
Value was either too large or too small for a Decimal.
Shall I send you a screen shot of my last step - will that help? (attached below).
John
Hi @johnmorsebrown,
Since the data from Xero step is mapped from the trigger, I’d recommend adding the Line Itemizer step after the trigger step.
Hopefully, this helps!
Thanks @ken.a - do I add the Line Itemizer between steps 3 and 4?
Hi there @johnmorsebrown,
It looks like the issue here is the multiple mapped data in the “Description”, “Quantity”, and “Unit Price” fields. Those fields only accepts line items.
You might need to add a Formatter by Zapier - Line Itemizer function. You can read more about that here:
Hopefully, this helps!
@ken.a or @Troy Tessalone are you able to help me with the above question? This has got me completely stumped!
John
I have now finished the Zap, but I’m getting an error in the last step (Create sales invoice in Xero) which says:
Failed to create a create sales invoice in Xero
Value was either too large or too small for a Decimal.
I’ve attached screenshots of the step below -
Can anyone help? What have I done wrong?
Thanks @ken.a! It’s an amazing community!
That’s awesome @johnmorsebrown! Big thanks to Troy for pointing you in the right direction!
Feel free to reach out with any more questions you have. We’re always happy to help in the Community!
Thanks Troy - will carry on tomorrow. Expect more questions! Really appreciate your help!