How to reinterpret currency names


(Enrique Schaub) #1

How can I teach my chatbot that, in my country, $ is not equal to US dollars and that “pesos” ar not necessarily mexican pesos (there are pesos argentinos, pesos colombianos, pesos chilenos)?

(Andy Heydon) #2

If a user’s location is shared with the platform then that information is used to interpret the input.

So for example if the platform knows that the user is in Argentina then $ and peso will be handled as ARS - Argentinian Pesos.

(Enrique Schaub) #3

Thanks for your advice. My laptop settings are in place, the platform still interprets “pesos” as the mexican currency, and “$” as dollars.

Is there any explicit way to share user location with the platform?
Neither context.session.UserContext nor context.session.BotUserSession seem to contain any reference to user location.
I have also found context.session.BotUserSession.lastMessage.messagePayload.meta.locale , which actually is equal to “es-419” (caribbean, consistent with interpreting “pesos” as mexican currency). I have tried to set it to “es-cl”, but it seems to be read-only.

Any suggestion on how to formally declare user location to the bot?