Question

Xero Find or Create contact error: "No property or field 'xxxx' exists in type 'Contact'

  • 19 October 2023
  • 31 replies
  • 55185 views

Userlevel 1
Badge

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?


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

31 replies

Userlevel 7
Badge +14

Hi @johnmorsebrown 

Good question.

To help us have true context, please post screenshots with how your Zap steps are configured along with the encountered error.

Userlevel 1
Badge

No problem - thanks for looking into it for me Troy - hugely appreciated! I’ll add the screenshots below. The first 3 are just different parts of the same page as I scroll down the form, and then the 4th is the result of the test.

Let me know what you think.

Userlevel 7
Badge +14

@johnmorsebrown 

The Search By field is a dropdown with standardized options.

You’ll want to select an option from the dropdown list.

 

Userlevel 1
Badge

I don’t quite understand - do you mean change it to something like this? (See attached)

Userlevel 7
Badge +14

@johnmorsebrown 

Remove the mapped dynamic pill variable.

Instead select an option from the dropdown list. (e.g. Search By = Email)

The in the field below add the dynamic pill variable for the value to search by in that field.

 

Userlevel 1
Badge

Ah-ha! I get it. So I put this in (see screenshot), and as Mostly Books already is in my Xero contacts, I wouldn’t expect it to create it again, and it didn’t. So I presume that works!

Userlevel 7
Badge +14

@johnmorsebrown 

Yep.

When in doubt, test it out.

Userlevel 1
Badge

Thanks Troy - will carry on tomorrow. Expect more questions! :-) Really appreciate your help!

Userlevel 7
Badge +6

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! 🤗

Userlevel 1
Badge

Thanks @ken.a! It’s an amazing community!

Userlevel 1
Badge

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?
Userlevel 1
Badge

@ken.a or @Troy Tessalone are you able to help me with the above question? This has got me completely stumped!

John

Userlevel 7
Badge +6

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! 😊

Userlevel 1
Badge

Thanks @ken.a - do I add the Line Itemizer between steps 3 and 4?

Userlevel 7
Badge +6

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! 

Userlevel 1
Badge

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
Userlevel 1
Badge

And if it helps @ken.a here are the screenshots showing how I set up the Line Itemizer.

Userlevel 1
Badge

Any thoughts on this @ken.a ?

Userlevel 7
Badge +14

@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.

 

Userlevel 1
Badge

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

Userlevel 1
Badge

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

Userlevel 7
Badge +14

@johnmorsebrown 

You can use Paths or a Lookup Table or Code.

Userlevel 1
Badge

Thanks @Troy Tessalone 

Userlevel 1
Badge

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?

Userlevel 7
Badge +14

@johnmorsebrown 

Possible edge/corner cases need to be handled by logic in the Zap steps, so best to test different use cases.