Country calling codes
Country calling codes are telephone number prefixes that identify the country or region the number is assigned to. Medallia Conversations makes the number available as the {{consumer.calling_code}} conversation parameter when the channel provider includes the telephone number of the calling device. Knowing the country code is useful for directing respondents to a conversation or dialog that contains language and information specific to the respondent's location, such as presenting questions in the respondent's local language.
To use the country code in a conversation, include the parameter. For example, a dialog might say,
I see your phone number's country code is {{consumer.calling_code}}
To use the value for conversation navigation, first map the value into an episode field. Later you can reference the field in field lists when building a dialog's conditions.
Mapping the parameter to a episode field
Map the parameter to a field in the Conversation settings for the conversation. This saves the value to the survey record, and adds it to the list of available fields in dialogs.
Each company has its own episode fields (E-Fields). This example assumes there is an E-Field named Country (e_country).
Using the country code in a dialog condition
To use the country code in a dialog, specify the country code value in a condition rule. For example, to identify the U.S.A., say e_country = "US" in the rule. The pre-condition in this illustration skips the current dialog when the code is "US".
Calling code number versus string
The {{consumer.calling_code}} parameter contains the country calling code as a 2-character string, such as US, AT, RO, PL, or CZ. This code maps into the e_country field.
Alternatively, if you need the numeric code, such as 1, 43, 40, 48, 420, use the {{consumer.country_calling_code{}} parameter instead.
