on 07-20-2020 12:54 PM
Greeting Community,
I am want to create a list or (quick response) from the values I get from external response, so that user can choose from them. Is it possible to do that?
For Example :
Select the processor from below list:
1. AMD Ryzen 5
2. Intel i9
3. AMD Ryzen 8
...
This is the list that comes in the response from external services.
Hope I am clear on the question I have.
Thanks.
There is now a new message type called "Custom", where you can use JSON to pre-defined specify message types and include scripting and references to your API response to do what you want.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for sharing, I just saw this feature today. I found one issue when using that "Custom" type, I choose the carousel reply but its not working as it shown in the documentation or the tutorial video on this link => https://help.sap.com/viewer/a4522a393d2b4643812b7caadfe90c18/latest/en-US/ad3681adae824f8a96cbcf8b88...
When using the postback button type it does not postback the value I have saved, instead it gives me the Title in the reply, another thing i notices is that the carousel is closing(minimising) automatically.
I'm not sure if its a bug or am I doing something wrong here, sharing the screenshot for reference.
Any help would be great.
Thanks.
1) Please open a new question -- you can reference this one if that is helpful.
2) I am now following you so you send me a mail.
Looking forward to your challenge 🙂
Hi Daniel,
A question is already asked on the community under this link
https://answers.sap.com/questions/13213465/consume-and-filter-rest-api-file.html
can you text me directly so I can elaborate more about the case and share with you what i achieved so far .
Regards,
Once you get the JSON response, it goes into api_service_request, so you can set the quick reply button texts to something like this {{api_service_response.myresponse.body.text}} or whatever depending on the format of your JSON and what you set the response namespace to in the API widget.
Just remember if quick replies isn't the last message in your response to the user, the quick replies are not displayed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Daniel,
Thanks for the reply, I wanted to know how to show populate the list of data from api to quick reply, as the number of items are not fixes i can't hard code the number of quick reply or list item.
Is there a way to apply a for each loop on the api response and get the data displayed on chat bot so that user can select from given choices and I can take the action based on selection.
Ah, I see. I believe there may be a feature planned to enable this more easily. In the meantime, you would have to create a webhook, which would then iterate the list and return the quick reply. This is described here: https://developers.sap.com/tutorials/conversational-ai-webhook-api-call.html
This documentation shows how to format the response to create "rich" controls, like quick replies so you could create a quick reply for each iteration: https://help.sap.com/viewer/a4522a393d2b4643812b7caadfe90c18/latest/en-US/75174bf0017548fa86d602f227...
User | Count |
---|---|
96 | |
11 | |
11 | |
10 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.