Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

ServiceCallout FormParam on a condition

Not applicable

Is it possible to add a FormParam only when a condition is satisfied?


For e.g. if I have:

<Request clearPayload="false" variable="req" type="application/x-www-form-urlencoded">
        <Set>
            <Headers>
                <Header name="Content-Type">application/x-www-form-urlencoded</Header>
            </Headers>
            <FormParams>
                <FormParam name="abcID">{Order.UniqueTransactionID}</FormParam>
                <FormParam name="apiUsername">{TN.PA.UserName}</FormParam>  
	   </FormParams>
        </Set>
        <IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables>
 </Request>

And if want to add my abcID to the request only if the Order.UniqueTransactionID (which is set by an assignmessage policy) is not empty or null. Is it possible?

0 3 529
3 REPLIES 3
Top Solution Authors