Fetching transactionId in Scripted Decision Node

Hi,

I am working on a use case where I need to make a call to a third-party API as part of a scripted decision node of a ForgeRock IDC journey. As part of this request, I intend to send ForgeRock’s transactionId, as this would be helpful for auditing purposes. However, I couldn’t find a way to fetch the transactionId in the scripted decision node. How can I fetch it?

Hi @anishetty,

You can get it from the request headers:

var transactionId = requestHeaders.get("x-forgerock-transactionid");

https://backstage.forgerock.com/docs/idcloud/latest/am-authentication/scripting-api-node.html#scripting-api-node-requestHeaders

Regards
Patrick

1 Like