Closed artoby closed 4 years ago
HITL is still under development. Right now we're focusing on other parts of the product but we'll definitely fix HITL at some point in the next couple months.
In the meantime we'll fix the tutorial.
@rndlaine ok, thanks!
@artoby try like below
const botId = event.botId;
const name = event.state.user.full_name;
const message = name + ' wants to talk to a human';
bp.notifications.create(botId, {
botId,
level: 'info',
message: message,
url: '/modules/hitl'
});
i tried it but it showed me
Launcher Unhandled Rejection [error, insert into "srv_notifications" ("botId", "created_on", "id", "level", "message", "module_icon", "module_id", "module_name", "redirect_url") values ($1, now(), $2, $3, $4, $5, $6, $7, $8) returning "id", "botId", "level", "message", "module_id", "module_name", "module_icon", "redirect_url", "created_on" - null value in column "id" violates not-null constraint] help me @JijeshP
Just update this and it will work fine :)
I tested it:
const message = user.first_name + ' wants to talk to a human' bp.notifications.create('flight-booking-bot', { message, level: 'info', url: '/modules/hitl' }) / Your code ends here /
Make sure these checkboxes are checked before raising an issue, thank you!
[✓] Make sure your NodeJS version is
10.11
[✓] Search the documentation
[✓] Search the help portal
I am running:
official binary
My OS is:
osx
Botpress version is:
11.6.3
Issue description
Sending of a notification to a human from the HITL module isn't working as it should according to the tutorial at https://botpress.io/docs/tutorials/#alerting-agents
There are 2 issues:
event.user.first_name
but actually it should beuser.first_name