Announcements
This site is in read only until July 22 as we migrate to a new platform; refer to this community post for more details.
Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

In Route rule, How to condition based on the request payload/data ?,In Route Rule, how to condition a JSON request data which is present inside the array?

Hi All,

I want to route the request to different target environment based on the data in the JSON request

from the data UserRequest-->CustomerDetails-->Address (array) -->AddressType

Could any one tell me how to condition on the request payload?

Thanks,

Murugan

Solved Solved
0 2 1,898
1 ACCEPTED SOLUTION

Hi @poomuruganpoopandian,

To accomplish this task, use an extract variable policy and set a variable with the JSONPayload tag. From there you can create a route rule with a condition comparing the extracted variable like this:

<RouteRule name="MyRoute">
	<Condition>myExtractedVariable equals "value I'm looking for"
	</Condition>
	<TargetEndpoint>TargetEndpoint1</TargetEndpoint>
</RouteRule>

If I answered your question, please click accept.

View solution in original post

2 REPLIES 2