Escaping Special Characters in JSONPath for Data Actions

Hello everyone! I run a local user group and one of our members brought up an interesting issue tonight. They are building a Data Action to query a legacy CRM. The CRM returns a JSON payload where one of the keys contains a hyphen and a period (e.g., customer-id.num). When they try to use JSONPath in the translation map to extract the value, like $.customer-id.num, the translation fails because the JSONPath engine interprets the hyphen as a minus sign and the period as a child node delimiter. How do you properly “Escape” these special characters in the translation map of a Data Action?

I just ran into this last week! To escape those characters, you have to use bracket notation instead of dot notation. You wrap the offending key in single quotes inside the brackets. So instead of $.customer-id.num, your translation map should look like $['customer-id.num']. It forces the JSONPath parser to treat the whole string as a literal key name rather than operators!

I have debugged many translation maps on the Genesys GitHub. 's solution is completely correct. I would also add that if you are doing this within the Genesys Cloud Admin UI, you must be careful with the double quotes. The translation map itself is a JSON object, so your expression must be defined as a string. It should look exactly like this: "myValue": "$['customer-id.num']". If you mess up the quotes, the Data Action will fail to save entirely!