Supporting button actions bound to language
Problem
Currently, the structure of button action configuration does not support multiple languages. The action is the same for every language.
Goal
We want to support defining an action for a language which would override the default action which is the one defined in the default language.
Proposal
The button configuration with different languages support can be stored in the campaign message.${languageCode}.
{
"en": {
"html": "<!doctype html>\n<html>\n<head>\n <body> <div e-editable=\"button1\" me-close me-button-clicked=\"buttonId1707206775205\" me-trigger-app-event=\"{"type":"DeepLink","payload":{"url":"https://www.instagram.com/somethingen/"}}\">\n <span class=\"ems-inapp-button__label\">BOOK NOW</span>\n </span>\n </div>\n \n\n</body>\n</html>\n",
"content": {
"title": {
"value": "HALLO"
},
"button1": {
"attributes": {
"me-close": "",
"me-button-clicked": "buttonId1707206775205",
"me-trigger-app-event": "{\"type\":\"DeepLink\",\"payload\":{\"url\":\"https://www.instagram.com/somethingen/\"}}"
}
}
}
},
"sv": {
"html": "<!doctype html>\n<html>\n<head>\n <body> <div e-editable=\"button1\" me-close me-button-clicked=\"buttonId1707206775205\" me-trigger-app-event=\"{"type":"DeepLink","payload":{"url":"https://www.instagram.com/somethingsv/"}}\">\n <span class=\"ems-inapp-button__label\">BOOK NOW</span>\n </span>\n </div>\n \n\n</body>\n</html>\n",
"content": {
"title": {
"value": "HALLÅ"
},
"button1": {
"attributes": {
"me-close": "",
"me-button-clicked": "buttonId1707206775205",
"me-trigger-app-event": "{\"type\":\"DeepLink\",\"payload\":{\"url\":\"https://www.instagram.com/somethingsv/\"}}"
}
}
}
}
}
Questions/issues to address
Customers should be careful when changing the content blocks (having initial several buttons and then deleting them but still having the languages stored in the meta).
Even when giving too much flexibility, we could allow each language to override the full button configuration (even the type) to have each language being on its own. E.g. even changing the default (EN → DE) would still be valid.
As a next step, we should come up with an UX about the flexibility and possible dangers: - what happens if we change the default language and it should affect the other ones like should they be reset? - can the customer modify the whole button configuration per language or just the value (e.g. disable the fields)