| Sales Taxes There are four types : SalesTax, SalesTax_Avalara, SalesTax_AvaBrazil, SalesTax_Vertex | Used when sending data to the tax interface. For more details see section below | Subscribe | IF _.caller = ‘calculate_tax’ AND _.addr.country = ‘BR’ THEN rule = {“header.entity.federalTaxId” => ‘12345678987654321’,“lines.#.itemCode” => ‘D100’} STOP | ”@” uses any taxable class”_” data is tax vendor dataReturns rule = tax vendor hashref | | |
| InvoiceLifeCycle | Used for MAP Subscriptions, to set the invoice lifecycle differently based on different parameters of the subscription | Subscribe | IF (_.error_count > 0) and (_.days_till_due < 1) THEN ans = “SetDelinquent”, ans = “CancelAutoBill”, ans =“Disentitle”, ans = “SendCancellation” STOP | ”@” uses TransactionBilling”_” data:error_count is set from TransactionBilling.dunning_index days_till_due is the days till the invoice is due template_exists whether the current statement template exists next_template_exists whether the next statement template exists terms something to do with AutoBill.invoice_terms Returns ans = anything- ISee TramsactionBilling::process_statement() for details. | | |
| RetryInterval | Defines rules for retry in case of a soft failure. There are diferent nuances between Subscribe & Retain, that are described in the relevant chapter | & & Retain | IF _.transaction_index =2 THEN ‘ans’ =‘3 days’ STOP | - ”@” uses Transaction - ”_” data: - transaction_index is the TransactionBilling.soft_error_count. - billing_day is the day of the week (Sun, Mon, etc) for either the TransactionBilling.original_activity, or the current time. - Returns ans = an interval (1 day, 3 weeks) | | |
| RetryNewProcessor | Defines rules for routing retry attempts to specific payment providers . Note: The payment providers that can be defined, must also be defined in the merchant’s Routing Rules using the name_value_processor (22) method | Retain & Subscribe | IF _.prior_routing = ‘CyberSource’ THEN pp = ({‘value’ => ‘CyberSource’}) STOP THEN pp = ({‘1’ => {‘value’ => ‘Compass’}, ‘2’ => {‘value’ => ‘CyberSource’}}{_.soft_error_count} \ | \ | null) STOP THEN pp = null STOP | - **”@“**uses Transaction - ”_” data: - transaction_index is the TransactionBilling.soft_error_count the soft error count is used for the Transaction - this serves as a counter for retry attempts. You can define which attempt to route to a specific provider using this index - prior_routing is the original payment provider name to which the Transaction was routed prior to the NVPs added by the decision rule. - Note: TransactionBilling::generate_transaction sets a NVP for the selected payment_provider on the Tx which is then used by the name_value_processor method routing rules to redirect the transaction retry. |
| RetryOverride | Defines when to “flip” the recurring flag for a transaction | Retain | THEN override = ({‘2’ => {‘recurring’ => 0},‘3’ => {‘recurring’ => 0}}{_.transaction_index} \ | \ | null) STOP | ”@” uses Transaction- ”_” data: - billing_attempt is TransactionBilling.autobill_sequence - transaction_index depends on where it is called from: - CashBox_Utils::deposit_failed_authorization() sets it to TransactionBilling.soft_error_count + 1. - TransactionBilling::set_retry_overrides() sets it to TransactionBilling.soft_error_count, or 0 if not defined. - year_month is the current year and month, as YYYYMM - returns override = specially formatted string - CashBox_Utils::deposit_failed_authorization() only cares if it got back any answer, not what the answer is. - TransactionBilling::set_retry_overrides() evals some answers, ignores others (see the code for details). |
| ExpiryOverride | In case of expired cards, the system tries to guess possible exoiration dates. Every retry (as setin the rule) will attempt to add a number of years either to today date ot to the card expiration date. The rule is evaluated when a transaction is created. | Subscribe & Retain | THEN ans = ({‘0’ => ‘BLANK’, ‘1’ => ‘EXP 1 year’,‘2’ => ‘EXP 4 year’, ‘3’ => ‘EXP 3 year’, ‘4’ => ‘EXP 2 year’}{_.transaction_index} \ | \ | null) STOP | - ”@” uses Transaction - ”_” data: - transaction_index is the TransactionBilling.soft_error_count. Returns ans = anything |
| ForcedDeposit | Rule that set the conditions if to force deposit a transaction. The rule is evaluated during post_processing of a transaction, looks at the auth code response that was received from the payment processor and based on that, flag that the next transaction should be forced. | Subscribe merchants that have ART mode turned on and Retain Merchants | IF @.auth_response_code IN (‘100’,‘302’, ‘530’, ‘303’) THEN ans = 1 | - ”@” uses Transaction - ”_” data: - billing_attempt is the TransactionBilling.autobill_sequence - transaction_index is the TransactionBilling.soft_error_count Returns ans = anything- Only cares that there is a non-false answer | | |
| WhiteList | Rule that is relevant only if a Forced Deposit. was enabled. Allows to force only on a pre-defined list of BINS | Subscribe merchants that have ART mode turned on and Retain Merchants | IF (@.auth_response_code IN (‘100’,‘530’,‘302’,‘303’)) THEN ans = 1 STOP | - ”@” uses Transaction - ”_” data: - billing_attempt is the TransactionBilling.autobill_sequence - transaction_index is the TransactionBilling.soft_error_count | | |
| For more information on how to add decisions rules, see the Adding Decision rule Vindicia wiki page. | | | | | | |