if
Last updated
Last updated
if() function is the Standard function available in 200OK.
Description : The if function evaluates a logical test and returns one value if the test is true, and another if it is false.
Syntax : fx_if(logical_test, value_if_true, value_if_false)
Example : fx_if(2, 3, <) returns 2 as the response, and fx_if(2, 3, >) returns 3 as the response.
Here we go with simple scenario using the above function.
Scenario : In a pricing strategy application, a retailer adjusts product prices based on competitor prices. They utilize a function to determine the final price for each product based on competitor pricing. If the competitor price is lower, the retailer matches it; otherwise, they set their own price.
Request Side :
Response Side :