I need to change the standard response . For example when i type help. It lists me all the tasks which it can perform for me …
Like : Here are the tasks i can perform for you.
a. Create incident
b. Status of your incident
My output should be :
1. Create Incident
2. Status of your incident
I want to replace the tasks with number counting rather alphabetical couting. However
When i checked the standard response page. for the help options. It is shown as
The standard response “Listing all tasks” is triggered for the utterance “help” from the user.
The key mentioned in the above response communicates with the internal logic and provides the list of tasks available in the bot.
When the user chooses an option(i.e., alphabet as per indexing), the NLP engine matches the option with the task name and executes the task.
Here, we do not have a provision to change the indexing provided by the key.
Hence, we will not be able to change the indexing to a number and even if that is achieved, as per the internal platform code, the NLP engine will not be able to identify and match the index number to the task name.
As of now, to achieve the requirement, we request you to add a new response to the “Listing all tasks” standard response.
Select web/mobile client channel.
Task Any task
Switch to advanced mode, select a button template so that you can send the payload back to the platform.
You will need to add the Task names manually as we do not have a pre-defined method to get all the tasks.
Exposing a pre-defined method for retrieving all the tasks is on our road map.
For now, you will need to update the task names manually in the button template.
Let us know if you need any further clarification on the above.
Below is message formatting example payload at web/mobile client channel for conditions of standard responses which are of message type “Choice” :
var message = {};
{
var indexArray = ['1', '2', '3', '4', '5'];
var text = response.message ;
for (var i = 0; i < response.choices.length; i++) {
text = text.concat(indexArray[i] + ') ' + response.choices[i] );
}
var payload = {
text : text
};
message.payload = payload;
}
print(JSON.stringify(message));
For demonstrating the message formatting, I have used the above code snippet at web/mobile channel override for the condition “Tell me the alphabet or a unique word for action you want” at standard responses. Below is the output.
Thanks for the input. I have use the code snippet which u gave and provided my tasks in response.choice [] . As of now i am getting the task appended with numeric value. But if click number 1. it is unable to recognize the task. Please suggest if i need to pass the data in payload.
Screenshots:
In this case if i type 1. Then create web access task needs to be intiated. Please let me know if this can be done.