Can we show extra (custom) buttons inside the did you mean/suggestions list on app platform? Or is it possible to know when the bot is showing did you mean/suggestions so that we can show a follow-up message or prompt?
TIA!
Can we show extra (custom) buttons inside the did you mean/suggestions list on app platform? Or is it possible to know when the bot is showing did you mean/suggestions so that we can show a follow-up message or prompt?
TIA!
Hi @Shraeyas ,
Yes you can add extra options after fetching the suggestions through similaritySearch and form quick Replies in app platform.
let simresults = await app.getSimilaritySearchResults(app.data.message)
This will give you all the intents for similarity.
Form all the buttons for QuickReply + add your own extra and use
app.sendQuickReplies
for the same and resolve it.
If you want to add a follow up, the after using sendQuickReplies send another prompt and then resolve()
But make sure multiple back to back promts dont get involved since it will erase the preveous quickReply display.
Hi @Shraeyas ,
{
"results": [
{
"intent": "my-status",
"prediction": 1,
"name": "my-status"
},
{
"intent": "make-a-booking",
"prediction": 1,
"name": "make-a-booking"
}
],
"status": "success"
}
Only intent names are being returned. Text/description isnтАЩt there.
Okay.
Do one thing.
Create a function and return the button texts that you want to show as button suggestions as per language and the text having the confidence to trigger the intent and keep the key of the object as intent and do what you want to do.
let journeys = {
'request-registration': { 'en': 'Apply New Connection', 'hi': 'рдирдП рдХрдиреЗрдХреНрд╢рди рдХрд╛ рдЖрд╡реЗрджрди', 'text': 'i want to apply for new connections' },
'street-light-complaint': { 'en': 'St-light Complaint', 'hi': 'рд╕реНрдЯреНрд░реАрдЯрд▓рд╛рдЗрдЯ рд╢рд┐рдХрд╛рдпрдд', 'text': 'street light complaint' },
'meter-reading': { 'en': 'Meter Reading', 'hi': 'рдореАрдЯрд░ рд░реАрдбрд┐рдВрдЧ', 'text': 'meter reading' },
'view-bills-and-payment': { 'en': 'View Bill & Payment', 'hi': 'рдмрд┐рд▓ рдФрд░ рднреБрдЧрддрд╛рди рджреЗрдЦреЗрдВ', 'text': 'bill and payment' },
'details-updation': { 'en': 'Update Your Details', 'hi': 'рд╕рдВрдкрд░реНрдХ рд╡рд┐рд╡рд░рдг рдЕрдкрдбреЗрдЯ', 'text': 'update details' },
'customer-benefit-schemes': { 'en': 'Customer Benefit Schemes', 'hi': 'рдЧреНрд░рд╛рд╣рдХ рд▓рд╛рдн рдпреЛрдЬрдирд╛рдПрдБ', 'text': 'customer benefit schemes' },
'register-complaint': { 'en': 'Register Complaint', 'hi': 'рд╢рд┐рдХрд╛рдпрдд рджрд░реНрдЬ рдХрд░реЗрдВ', 'text': 'register complaint' },
'meter-related-issues': { 'en': 'Meter Related Req.', 'hi': 'рдореАрдЯрд░ рд╕рдВрдмрдВрдзрд┐рдд рдЕрдиреБрд░реЛрдз', 'text': 'meter related issues' },
'check-complaint-status': { 'en': `Request status`, 'hi': `рд╢рд┐рдХрд╛рдпрдд рдХреА рд╕реНрдерд┐рддрд┐`, 'text': 'complaint status' },
'change-language': { 'en': 'Change Language', 'hi': 'рднрд╛рд╖рд╛ рдмрджрд▓реЗрдВ', 'text': 'change language' },
'what-are-the-augmentation-related-timelines-for-a-new-connection': { 'en': 'Augmentation time', 'hi': 'рд╡реГрджреНрдзрд┐ рдХрд╛ рд╕рдордп', text: 'What are the augmentation related timelines for a new connection?' },
'in-case-of-request-cancellation-how-do-i-submit-the-requisite-documents': { 'en': 'Submit doc for cancel', 'hi': 'рд░рджреНрдж рдХреЗ рджрд╕реНрддрд╛рд╡реЗрдЬрд╝ рдЬрдорд╛', text: 'n case of request cancellation, how do i submit the requisite documents' },
'in-case-of-request-cancellation-how-is-customer-intimated': { 'en': `Req cancel & Update`, 'hi': 'рд░рджреНрдж рдЕрдиреБрд░реЛрдз рдФрд░ рдЧреНрд░рд╛рд╣рдХ рдЕрдкрдбреЗрдЯ', text: 'in case of request cancellation how is customer intimated' },
'what-are-the-documents-required-for-a-new-connection': { 'en': 'New Connection Documents', 'hi': 'рдирдП рдХрдиреЗрдХреНрд╢рди рдХреЗ рдЖрд╡рд╢реНрдпрдХ рджрд╕реНрддрд╛рд╡реЗрдЬ', text: 'What are the documents required for a New Connection' },
'what-are-the-charges-for-a-new-connection': { 'en': 'New Connection Charge', 'hi': 'рдирдпрд╛ рдХрдиреЗрдХреНрд╢рди рдореВрд▓реНрдп', text: 'what are the charges for a new connection' },
'in-how-many-days-a-new-connection-is-provided': { 'en': 'Days for New Connection', 'hi': 'рдирдП рдХрдиреЗрдХреНрд╢рди рдХреЗ рд▓рд┐рдП рдЖрд╡рд╢реНрдпрдХ рджрд┐рди', text: 'in how many days a new connection is provided' }
}
return resolve(journeys)