Skip to main content

I am trying to add a single line item to existing Xero invoice which works fine when I don’t pass values for either of my Xero Organizations tracking categories. My two tracking categories are Seller and Program not that the specifics matter.  

What is interesting is when I am creating a new Xero invoice and I specify the text values for the tracking categories, it works fine. The invoice is created, the line item is added with the correct tracking values set.

Here is what the config looks like for adding one existing line item

 

There error I receive is:

JSON for post data was invalid,Error converting value "Calvillo" to type 'System.Nullable`1lSystem.Guid]'. Path 'LineItemst2].Trackingk0].TrackingOptionID', line 1, position 1152.

So Zapier seems to want the GUID ID of the tracking however when I pass that the line item is added but the tracking value is not set correctly. Shouldn’t it just work like the add a new invoice action where setting the tracking category values with the text representation of the value works fine.

 

 

After I posted this I was able to get it to work by passing the GUID of the specific tracking category value. Why Zapier accepts the text value when creating a new invoice but only the GUID when adding a line item to an existing invoice I have no idea.


@seancalvillo thanks so much for following up here and letting us know that passing the GUID of the tracking category value did the trick! 

To address your second question regarding why the text value is accepted when creating a new invoice but only the GUID is accepted when adding a line item to an existing invoice, “mechanisms/options” within a Zap often mirror the way the app’s API is structured. I recommend reaching out to either our support team or the Xero support team for more information on why that is and if there is any way to work around it!