• Instructions to Ask a Question

    Click on the "Ask a Question" button and select the application for which you would like to ask questions.

    We have 5 different products namely - Pabbly Connect, Pabbly Subscription Billing, Pabbly Email Marketing, Pabbly Form Builder, Pabbly Email Verification.

    The turnaround time is 24 hrs (Business Hours - 10.00 AM to 6.00 PM IST, Except Saturday and Sunday). So your kind patience will be highly appreciated!

    🚀🚀Exclusive Discount Offer

    Just in case you're looking for any ongoing offers on Pabbly, you can check the one-time offers listed below. You just need to pay once and use the application forever -

    🔥 Pabbly Connect One Time Plan for $249 (🏆Lifetime Access) -  View offer 

    🔥 Pabbly Subscription Billing One Time Plan for $249 (🏆Lifetime Access) - View offer

  • Please note that the team will not be available on 17th June 2024, due to a public holiday.

    During this period, support assistance may experience some delays.

Xero - Mapping Multiple Tracking Codes for Multi-Line Item Invoices


Hi Guys,
Can't figure out how to make this work.


TEST - [RSH - FP_INVOICE - Collect - Airbnb]

I am using Xero with 3x line items and I have 2x tracking codes for each line item.

Result required:
A single Xero invoice is created, with 3x line items and 2x tracking codes for each line item

The 2 actions for this are:

(1) In Step 6 (Set Line Items for Tracking Codes), I create the line items for the tracking codes.

(2) In Step 9 (Xero : Create an Invoice), I then use the line items with the 2 tracking fields for each line item in the invoice for the tracking field category which is mapped to the 2 line items.

However, I can't get the mapping to work in the Xero action due to the comma separation of the tracking code field line items.

So the output into the Xero invoice does not have a value for the 2x tracking codes for the 3x line items and comes out wrong.

See the tracking codes being set and the line items for the 2 tracking codes being mapped for the tracking fields in the Step 9 action:
Pabbly Connect 2023-06-22 at 2.39.26 pm.jpg

See here the output from the PC action being run:

Pabbly Connect 2023-06-22 at 2.41.26 pm.jpg

See here the Xero invoice created. It's added a single property tracking code to 1 line item, and a single source tracking code to 1 line item and the third is blank:

Invoice Xero 2023-06-22 at 2.43.21 pm.jpg

What do I need to do to get the mapping to work for having 2 tracking codes. This workflow works fine with a single tracking code here:

RSH - FP_INVOICE - Collect - Airbnb

Appreciate any advice on getting this working!!


Well-known member
Staff member
Hey @mike

In relation to your specific use case, we advise engaging the services of an automation specialist who can create a customized automation solution for your workflow and handle all the necessary management tasks on your behalf. You can find such experts and consultants on our Pabbly Connect forum at this link: https://forum.pabbly.com/threads/pabbly-connect-experts-and-consultants.22/

Additionally, you can also explore our Facebook group where you can connect with automation experts: https://www.facebook.com/groups/formget.deals/


Hi There,

I understand the platform well. I don't need a developer, I believe this is a bug with how the Line Item Tracking Category Option has been designed for the Xero action. Perhaps I am the first person to try and use this.

See below example of a single Xero PC Action using an array with 3 values to create the Xero Invoice line item. This works for the Invoice line items as it's a string with a comma delimeter being sent in the POST request to Xero. So It basically iterarates the Line Items 3 times to produce 3 Invoice line items in Xero.

Pabbly Connect 2023-06-22 at 11.57.31 pm.jpg

However, the Line Item Tracking Category Option is not a single field, it is an array of values to have line items for the Line Item Tracking Category.
Pabbly Connect 2023-06-23 at 12.02.36 am.jpg

So essentially it's an array within an array. Such as this:

Xero Invoice Line Item [0] { Account Code = 810, Tracking Category Option = Array[Property,Source] }
- So for a single Xero Invoice Line Item being created, Account Code is a String, and Tracking Category Option is an array with 2 strings.

Now the issue here is that the Tracking Category Option values when being taken by Xero can not differentiate the comma's being used.

So for example, I want and can add to the Tracking Category Option as an array the following:
Tracking Category Option:
Array[0] = RSH000008,Airbnb
Array[1] = RSH000008,Airbnb
Array[2] = RSH000008,Airbnb

You can see that being added correctly here:

Pabbly Connect 2023-06-23 at 12.15.23 am.jpg

I then use this line item array with 3 arrays of the "property,source" fields as set in the Tracking Category field.

See here:
Pabbly Connect 2023-06-23 at 12.19.04 am.jpg

Here is where the issue occurs. The String being saved into the Line Item Tracking Category Option is using the comma as a delimeter for all the array values.
So I have here:
As you can see, Pabbly has 6 comma's here.

So Pabbly can not map correctly the strings to match the Line Item Tracking Category of "Property,Source".

As you can see from the above. This looks to be a bug. Or what format am I meant to have for the Line Item Tracking Category Option so it can map the strings to the Line Item Tracking Category?


Well-known member
Staff member
In regards to your concern, we regret to inform you that at present, we do not support nested line items, and it does not appear to be feasible to add them in the integration with Xero or any other application.


Xero only supports 2 tracking code categories for invoices. Are you able to update the line item tracking category so it has, tracking category option 1, tracking category option 2. This would then result in getting this to work without the need for line items to iterate through.

It currently only send a single tracking category option item.

Category Option 1 Name = "Property"
Category Option 1 Data = "RSH8"
Category Option 2 Name = "Source"
Category Option 2 Data = "Airbnb"

This should be feasible as it does not require a line item or array loop by PC, it simply uses the above and PC can add it as an array to Xero.


Well-known member
Staff member
Hey @mike

We checked the possibility of the same and currently, it is not possible to add the data in nested line item format.


I need to be able to have 2 tracking codes as we are having legal reporting changes coming into effect 1 July 2023 and I have to be able to add via PC the tracking codes for each line item.

It's already been created by PC with the 2 tracking codes able to be set. Is this possible to be added to development for it to get this working?



Staff member
Hey @mike,

We have introduced a new action step called "Create an Invoice." To ensure the resolution of your issue, we kindly request you update the connection and reconnect to this recently added action step. If you encounter any further difficulties, please don't hesitate to inform us, and we will be more than happy to assist you.

Best Regards,