I am sending a custom welcome event called "demo-welcome" via v2 with version 0.8.2
{
"session":"projects/XXXXXXXXXXXX/agent/sessions/20055814231515",
"queryInput": {
"event": {
"name":"demo-welcome",
"parameters": {
"party":"123456"
},
"languageCode":"de"
}
}
}
The event fires correctly but unfortunately parameter party cannot be accessed: #demo-welcome.party does not exist.
Any help is appreciated.
Mark.
Hi @mwoop the issue is that parameters needs to be formatted as protobuf Struct. I actually put together a little utility module to help with conversions if you're interested
const {struct} = require('pb-util');
const parameters = struct.encode({party: '123456'});
Hi @callmehiphop - that solved my issue. Thanks a lot.
@mwoop awesome, glad to hear it!