Hi everyone, here's my issue with my bot:
I'm using a webhook because i need to get some values from the parameters of the referrer URL to store them as variables and the only way to do that that i found is by using the webhook so that i can get those values by an execute code block with event.payload.query. Now the problem is that the actual bot page with the webhook URL won't even load, and if i go to the console i'm getting this error when the bot is supposed to send a message:
Error sending outgoing message {
integration: 'webhook',
messageType: 'text',
payload: '{"type":"text","text":"hello","typing":true}',
error: It [Error]: request/body must have required property 'conversationId'
at Bc (/var/task/customer_code.js:11:62529)
at Nt (/var/task/customer_code.js:11:62351)
at R (/var/task/customer_code.js:11:71961)
at /var/task/customer_code.js:11:64329
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.flushSendMessages (/var/task/customer_code.js:623:13164)
at async Object.processEvent (/var/task/customer_code.js:644:1912)
at async runDialogEngine (/var/task/customer_code.js:644:3669)
at async startEventProcessing (/var/task/customer_code.js:644:3525)
at async /var/task/customer_code.js:644:11152 {
isApiError: true,
code: 400,
description: 'The request payload is invalid.',
type: 'InvalidPayload',
error: undefined,
id: 'err_20240110100416x4C630CFF'
}
}
What am i missing here? I've also tried to force the conversatioId value by passing it manually to the webhook but that also doesn't work. Is there a proper way to set the conversation flow when it starts from the webhook as a start point?
Thanks in advance