Customizing choices list for "Did you mean?"

When platform suggests list of choices out of available tasks, we can now customize standard response by applying following code.

Go to NLP > Standard Responses > Search for “Did you mean” go to choices. Apply below template for Web / Mobile Client.

I used button template for eg. you can use any available templates or custom template.

var info =getChoices() ;
var message = {
“type”: “template”,
“payload”: {
“template_type”: “button”,
“text”: “Did you mean”,
“subText”: “You can now customize response for did you mean”,
“buttons”: []
}
};
for (i = 0; i < info.length; i++) {
var button = {
“type”: “postback”,
“title”: info[i],
“payload”: “payload1”
};

message.payload.buttons.push(button);
}
print(JSON.stringify(message));

2 Likes

Thanks @deepanshu.jain. Adding more, the developer could fetch the ambiguous list using the function getChoices(), meaning, developer will need to use the javascript editor over the standard editor at the channel specific override.

If the standard responses at ambiguous list are updated by developers at the standard editor, the ambiguous list will not be presented to the user.

@swathi.vadlamani Fyi

Thanks for posting this @deepanshu.jain

Can someone please tell me where I can find detailed information like getChoices() and related documentation?

Thank you,

Erges

What exactly, you’re looking for @erges.kokoshi

For example in the documentation there is no place you can find that “updating” a default response will make the bot stop working. If it wasn’t posted here I will have never figured out how to make it work again.

What I am asking if there is any in depth documentation where we can find out how to overcome issues.

Thank you,

Erges

Hi @erges.kokoshi,

We will communicate this to the documentation team.

As of now, there is no document related to the functions getChoices() etc.
We will check and get the relevant use-cases updated in the documentation for further reference.

Regards,
Yoga Ramya.

What is your suggestion of a more technical understanding of the platform and some control over it?

Thank you.

Hi @erges.kokoshi,

The official product documentation covers most of the functionalities in the platform.

For any help on a specific usecase/functionality, you can contact your account manager(if any)
You can also drop an email to us through our support portal.

We understand your concerns on the in-depth functionalities. As mentioned, we have communicated this to our documentation team and would be updated as per the feasibility.

Regards,
Yoga Ramya.