After digging further I found out what's the issue, but I don't like the solution.
The issue is indeed the option Enable beta features and APIs. This option actually enables me to use different environments for different integrations, which is great.
But the problem with enabling this option is that my current fulfillment code doesn't work.
On the other hand, if I don't enable this option, the changes I do with the bot inside the Dialogflow are visible instantly in the bot on my website. So I don't see a way to be able to have a stable version on the production, develop additional stuff in the meantime and then push the changes to the production enviroment without this option enabled.
Someone can correct me if I'm wrong, but the only soution I see is:
- to have the Enable beta features and APIs option enabled
- and to edit/rewrite my fiulfillment code.
I'd be very happy if someone can point me into right direction with the second point.
I'll just add the part of my simple code which works and triggers the followup event below:
------------------------------------------
// Dummies
function D_99_01_01(agent) {
agent.setFollowupEvent('custom_990101');
}
let intentMap = new Map();
// Dummies
intentMap.set('02.01 > some intent to trigger the event (D99.01.01)', D_99_01_01);
agent.handleRequest(intentMap);
---------------------------------------------
My question: how should this be rewritten to work with Enable beta features and APIs option enabled?