Alp Water code,Uncategorized welcome_bonus.yaml

welcome_bonus.yaml

– id: banking_spend_transaction_threshold
description: Post Qualification rule for Banking Spend Transaction Threshold feature
defaults:
or:
short_circuit: true
rule:
when:
pattern: &banking-spend-when-pattern
type: r42.v2.spend.banking-transaction
data:
posted_timestamp: ?effective_timestamp
eligibility_enrichment:
– benefit_type: WELCOME_BONUS
feature_id: ?feature_id
product_id: ?product_id
qualified_transaction_bucket_id: ?bucket_id
profile_id: ?profile_id
ledger_request:
– outcome: ?lr_outcome
request:
feature_id: ?feature_id
product_id: ?product_id
book_type: accrual
product_details: ?product_details
condition:
and:
– description: Finding out the type of the feature
match: ?product_details
pattern:
– id: ?product_id
features:
– type: transaction_threshold
id: ?feature_id
data:
threshold: ?threshold
threshold_currency: ?currency
– &accrual_book_lookup
description: Looking up the accrual book value in keeper
location: ledger_book
pattern:
book_type: accrual
product_id: ?product_id
feature_id: ?feature_id
profile_id: ?profile_id
bucket_id: ?bucket_id
unit_of_value: ?currency
state:
status: ?book_status
balance: ?current_balance
– &empty_book_status_check
code: return (book_status == “”) || (book_status == null)
– &check_if_current_balance_reached_threshold
description: Checking if the current_balance is greater than or equal to the threshold
code: Nums.eval(current_balance, “>=”, threshold)
– &qualified_entry_id_binding
description: Binding the qualified entry id
match: ?lr_outcome
pattern:
entry_id: ?qualified_entry_id
action: &banking-spend-post-qual-action
ledger_request:
legacy_owner_keys: true #TODO: Remove this once downstreams support v2 ledger request schema
book_type: accrual
product_id: ?product_id
feature_id: ?feature_id
bucket_id: ?bucket_id
unit_of_value: ?currency
set_status: “QUALIFIED”
add_entry:
amount: 0
metadata:
effective_timestamp: ?effective_timestamp
goal_met: true
qualified_entry_id: ?qualified_entry_id

– id: banking_spend_deposit_threshold
description: Post Qualification rule for Banking Spend Deposit Threshold feature
rule:
when:
pattern:
<<: *banking-spend-when-pattern condition: and: - description: Finding out the type of the feature match: ?product_details pattern: - id: ?product_id features: - type: deposit_threshold id: ?feature_id data: threshold: ?threshold threshold_currency: ?currency - <<: *accrual_book_lookup - <<: *empty_book_status_check - <<: *check_if_current_balance_reached_threshold - <<: *qualified_entry_id_binding action: <<: *banking-spend-post-qual-action

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

banking-spend_welcome_bonus.jsonbanking-spend_welcome_bonus.json

{ “data”: { “alias_instrument_id”: “profile-2”, “alias_instrument_type”: “alias_instrument_type”, “amount”: “60.00”, “charge_type”: “DEBIT”, “currency”: “USD”, “customer_profile”: { “active_on_posted_timestamp_products”: [ { “action_code”: “ADD”, “effective_date”: “2024-01-01T00:00:00Z”, “id”: “welcome_bonus_product_id”, “metadata”: { “name”: “name”, “product_ledger”: “product_ledger”,

threshold_first_met.yamlthreshold_first_met.yaml

– id: threshold_first_met defaults: or: short_circuit: true rule: when: pattern: &post-qual-banking-balance-when-pattern type: r42.v1.banking.balance data: effective_timestamp: ?effective_timestamp eligibility_enrichment: – benefit_type: WELCOME_BONUS feature_id: ?feature_id product_id: ?product_id qualified_transaction_bucket_id: ?bucket_id disqualified: ?disqualified tag_id: ?eligibility_tag_id