Success Criteria in Transaction Recording Policy

You can find advanced examples of Transaction Success Criteria that you might use for your Transaction Recording Policy in this article.

Transaction Success Criteria allowed length: 100 characters.

TxProviderStatus has to be sent in quotes as string. E.G. "success" , "200", "Not Found", "0.35"

Table of advanced Success Criteria

Is Success Criteria valid Success Criteria String TxProviderStatus Value from API proxy Evaluation result
true null "200" false
false "" "200" false
false " " "200" false
false "sdfsdfsdf" "200" false
true "txProviderStatus =='100'" "200" false
true "txProviderStatus =='200'" "200" true
true "true" "200" true
true "txProviderStatus=='OK' OR txProviderStatus=='Not Found' OR txProviderStatus=='Bad Request'" "OK" true
true "txProviderStatus matches '(OK)|(Not Found)|(Bad Request)'" "OK" true
true "txProviderStatus matches '(OK)|(Not Found)|(Bad Request)'" "Not Found" true
true "txProviderStatus matches '(OK)|(Not Found)|(Bad Request)'" "Bad Request" true
true "(txProviderStatus?:'') matches '(?i)(OK)|(Not Found)|(Bad Request)'" "Bad Request" true
true "(txProviderStatus?:'') matches '(?i)(OK)|(Not Found)|(Bad Request)'" null false
true "txProviderStatus matches '(?i)(OK)|(Not Found)|(Bad Request)'" "bad request" true
true "txProviderStatus matches '(?i)(OK)|(Not Found)|(Bad Request)'" "Redirect" false
true "txProviderStatus matches '(?i)(OK)|(Not Found)|(Bad Request)'" "heeeelllooo" false
true "txProviderStatus matches '(?i)(OK)|(Not Found)|(Bad Request)'" null false
true "txProviderStatus matches '(?i)(OK)|(Not Found)|(Bad Request)'" null false
false "txProviderStatus == 100" "200" false
Comments
jonesfloyd
Staff

This is awesome, @akhimich. I've linked to this from the Transaction Recording Policy topic in the docs.

llynch
New Member

Good stuff, Alex! This content has been merged into the section, Creating a transaction recording policy, at : http://docs.apigee.com/monetization/content/create-transaction-recording-policy#success-criteria

farhanshirgill
Bronze 3
Bronze 3

@akhimich What does the last column(Evaluation result) signify? Does it value indicates whether a transaction is successful or not, i.e "true" means success and "false" means failure.

Version history
Last update:
‎08-02-2016 02:28 PM
Updated by: