Is there a way to show list of items and allow multiple selection from the list?


(Tamira Carey) #21

Hi @yogaramya.mendu,

I am unable to view the chat window in the web browser in localhost:3000/UI. I am getting to following errors:

image

Thank you for your thoughts.


(Yoga Ramya Mendu) #22

Hi @tacarey,

Please refer the following post and integrate the WebSDK as per steps mentioned. Try to download a fresh copy of websdk in case something got messed up in your existing setup.

Regards,
Yoga Ramya.


(Yalavarti Hareen Tej) #23

Hey,

I was trying for the same, but looks the code in the customtemplate.js which is present in github now is different from the one that is in the screenshots that are presented here. More over in the node when i select the web/mobile app channel, the template dropdown menu shows around 6-8 templates to choose from. but the code that is available have only three.


(Thomas Volker) #24

Is there an updated Kore.ai solution for multiple button selection yet, without using an external source like hosting your own SDK etc.? Ay kore.ai built in features??


(Swagat) #25

Thomas, as of now there is no off the shelf multiple button selection available yet. It needs customization. You may use a widget (external configuration) and pass on the selected values as comma separated values for a list of value.


(Subrahmanyam Donepudi) #26

@tvolker Please refer to the custom template - “Multi-Select” provided at https://github.com/Koredotcom/web-kore-sdk/blob/master/UI/custom/customTemplate.js The CSS support for this template is added here: https://github.com/Koredotcom/web-kore-sdk/blob/master/UI/custom/customTemplate.css

Sample Code Snippet:

var message = {
		"type": "template",
		"payload": {
		"template_type": "multi_select",
		"elements": [
		{
		"title": "Classic T-Shirt Collection",
		"value":"tShirt"
		},{
		"title": "Classic Shirt Collection",
		"value":"shirts"
		},
		{
		"title": "Classic shorts Collection",
		"value":"shorts"
		}
		],
		"buttons": [
		{
		"title": "Done",
		"type": "postback",
		"payload": "payload" 
		}
		] 
		}
		};
		print(JSON.stringify(message)); 

Output when rendered on webSDK:
image

Please note that the custom templates are provided for you at webSDK to refer and build your own templates.

Refer to below topic on developer docs for more details:
https://developer.kore.ai/docs/bots/sdks/message-templates/#Custom_Templates