422 Error: "Wasn't able to obtain correlation key for expression =response.body.opportunity_id"

Hi everyone,

Forgive me for my ignorance, I’m just starting with Camunda. I’m trying to execute a very simple test process that starts with a webhook, intercepts an intermediate webhook catch event, and then finishes.

I’m able to get the process started with a webhook, but am getting the following 422 error message when I send my intermediate webhook message:

Wasn't able to obtain correlation key for expression =response.body.opportunity_id

I’m sending the following payload to start the process and to trigger the intermediate webhook catch event.

{"opportunity_id": "123"}

From my understanding, this should work as I’ve mapped the “123” to the process variable “opportunity_id”, set “opportunity_id” as the correlation key, and then parse the correlation key from the payload. No idea why it’s able to parse the payload when assigning to a process variable, and cannot parse the payload when it comes to a correlation key.

Am I missing something obvious? Do I need to provide a messageId, or a correlationKey, or a process instance ID in the intermediate webhook request body?

I will attach some screenshots below.

Thanks for your help

Apologies, the second screenshot is outdated and I can’t remove it because I’m a new user. This is the webhook config for the intermediate event:

Hi, and welcome to the Camunda Forum!

Try a Payload Correlation Key of

=request.body.opportunity_id

rather than =response.body.opportunity_id, since you want to look at body of the request that is sent to the intermediate webhook, rather than the response that is coming back from a REST endpoint.

total brain fart, thanks for your help!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.