Here is your error: error: Ct [Error]: request/bod...
# 💻developers
n
Here is your error: error: Ct [Error]: request/body must have required property 'conversationId'
s
Unfortunately, this message is triggered by botpress when my custom integration send the start event. So I don't have any power on change that 😦
n
I tell you, I am not an expert, but together we can find a possible solution.
To resolve this error, you will need to ensure that the request payload includes the required 'conversationId' property. Without seeing the specific code that is causing this error, it is difficult to provide a precise solution. However, you can check the code where this payload is being constructed and make sure that the 'conversationId' property is included. If you can provide more details or share the relevant code snippet, I would be happy to assist you further in troubleshooting and resolving this error.
@sparse-kangaroo-27308
The Payload Code... Is that an Execute Code Card ?
If you can provide that, then we could see better.
your payload should look like this : { "type": "text", "content": { "text": "Quando vorresti l'appuntamento?" }, "conversationId": "" }
to retrieve the conversationId you set up a execute code card in the beginnning
Here a code snippet for that: // Retrieve the conversationId from the conversation object const conversationId = event.thread_id; // Replace
event.thread_id
with the appropriate property that holds the conversationId in your Botpress setup // Store the conversationId in workflow.conversationId workflow.conversationId = conversationId;
s
Hi! Sorry for late reply! Found the issue checking the code here: https://github.com/botpress/botpress/blob/7e9253fdc1680165226fe6d9f91b40a4772c6762/integrations/webchat/src/definitions/events.ts#L6-L9 In the payload of the triggered event, I was missing the
convesationId
and the
userId
fields. After adding these two pieces of information to the payload of the event, the further messages were processed correctly on my integration. Thanks again for your help!
n
Am happy that you have found the solution the your problem.
2 Views