Dynamic mapping to Xero

Hi all,
I’m having an issue dynamically mapping a field to a specific field in Xero. This Xero field has a pre-definied list of acceptable values.

If I unselect “Map” in the Xero “Create an invoice” module and select a value from the pre-defined list (eg. “Meals”) it will populate successfully in Xero.

However if, in the Xero module I select “Map” and then either type in the static value “Meals” this will not populate. Nor if I dynamically map to a variable with value “Meals” this will not work either. I have check spelling, blank spacing etc. This does not seem to be the problem.

When I run the scenario and look at the module output data package there is a Warning at the bottom which says:

"Account code ‘MEALS’ has been removed as it does not match a recognised account. "

Note: in this message “MEALS” is capitalised but in the value delivered is “Meals” as per the successfully executed “unmapped” execution.

Has anyone encountered an issue like this. My suspicion is that either the “Map” function is causing the problem, or that there is some hidden data associated with choosing/not choosing a value from a pre-defined list that I am not aware of.

Any help greatly appreciated.

P.s. The target field in Xero is an “Accounts” variable which holds GL codes and influences the tax rate. I’m not sure if this affects things.

You might have better luck using the account code or ID. Try this:

Add the module “Make an API call” for Xero, it’s usually at the bottom of the list.
Make a request to /api.xro/2.0/Accounts (I don’t have an active Xero account to check the format of the endpoint field, check against the note below the field to know what parts to include from the prefix)

Run that module by itself to get it to pull the list of accounts through the API

Now you can check for either the AccountID (might work in Manual Mapping, not sure) or the code, and try setting the other module manually to it.

If you don’t see your desired account listed, then the issue is within your Xero setup.

I did so much work on Make and Xero last year, if you need hired help I’m around. It was quite the experience!

Hi [Anonymax],

thanks so much for this response. It gave for thought and continuing the investigation through the Accounting > Chart of accounts it appeared that populating with a different value, (a numeric code instead of the descripter) was the solution. This appears to have solved the issue.

Thanks again for your help with this!

1 Like

Yep, my original edit said code instead of ID. I’ve revised it again since both are useful. Xero is very picky with things like that. Glad you got it sorted!