Skip to main content

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?

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.


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.


@johnmorsebrown 

The Search By field is a dropdown with standardized options.

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

 


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


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

 


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!


@johnmorsebrown 

Yep.

When in doubt, test it out.


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


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 @ken.a! It’s an amazing community!


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?

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

John


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


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


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

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


Any thoughts on this @ken.a ?


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

 


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


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


@johnmorsebrown 

You can use Paths or a Lookup Table or Code.


Thanks @Troy Tessalone 


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?


@johnmorsebrown 

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