This is my JSON payload
{
"correlationId": "ID:PRE002-EPIC-EMS-SERVER-1.60656218C00C1:2D862D279",
"time": "2022-03-14T07:32:24.816Z",
"eventType": "Activation",
"serviceId": "test102@test.com"
}
Event type can be Activation or Deactivation
This is my Extract Variable Policy
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ExtractVariables async="false" continueOnError="false" enabled="true" name="TBP-Notification">
<DisplayName>TBP Notification</DisplayName>
<IgnoreUnresolvedVariables>true</IgnoreUnresolvedVariables>
<JSONPayload>
<Variable name="eventType">
<JSONPath>$.eventType</JSONPath>
</Variable>
<Variable name="serviceId">
<JSONPath>$.serviceId</JSONPath>
</Variable>
</JSONPayload>
<Source clearPayload="false">request</Source>
</ExtractVariables>
I want to return a response like this using Assign Message policy and message should be based from the extract variables depending on the payload if activation/deactivation
{
"code": "*****",
"method": "POST",
"data": {
"message": "test102@test.com has been set for activation"
},
"correlationId": "ID:PRE002-EPIC-EMS-SERVER-1.60656218C00C1:2D862D279",
"time": "2022-03-14T18:32:19",
"status": "200"
}
Anyone who can help me please, Thank you