Closed nayanbhagowaty closed 5 years ago
@peterswimm @benbrown .. I found the issue. The "id" field is missing in the scripts.json created in CMS. Could it be taken as bug & update in Botkit-CMS?
@nayan112 yes! the id field should definitely be included. Ddi you copy the scripts.json file directly from your CMS instance, or did you use the export tool from within the UI?
@benbrown I tried exporting & copying the output within the CMS UI. Both ways, ID is missing.
The next challenge is getting the variable filled with user input & display it for testing purpose. I don't see any documentation or sample code. could you help?
@nayan112 are you sure you are using the latest version of botkit-cms?
the id
field should definitely be present in the json file created by the CMS. It may be missing from the export.
Regarding variables, you set them in the convo.vars
property during a controller.studio.before
or other handler.
@benbrown You're right. It's missing from export only, present in script.json in .data folder.
There're few more differences from repo document related to initial run (eg. npm run build
didn't work for me). I have documented here to help
beginners like me.
I have created a chatbot with following steps, which is working fine.
npm install -g botkit
botkit new --platform web
npm install --save botkit-cms
Then, I removed the scripts in the skills folder (except _connection_events.js) & created a new script with code
also, added following code after controller initiation in bot.js
and in the root, copied
scripts.json
from cms with basic reply for 'hello' command (same as insample_scripts.json
).There's no error, but I'm not getting any response from the bot when I pass 'hello' to chatbot. What wrong I'm doing?