Sweepstakes Balance Update

Event Key

ootb_sweepstakes_balance_update

This event should be sent whenever a user's balance is updated due to actions such as purchases, redemptions, bets, wins, or manual adjustments.

Event KeyEvent NameType
ootb_sweepstakes_balance_updateOOTB Sweepstakes Balance UpdateSimple event

Event Structure

The mandatory properties (tenant, timestamp, event, and customer) are required for all events and documented in detail on the Mandatory Properties page. Below is the JSON structure for the context-specific properties of the OOTB Balance Update event:

{
  "context": {
    "ootb_transaction_id": "11228836059",
    "ootb_action": "deposit",
    "ootb_sc_update_amount": 10.00,
    "ootb_sc_bonus_amount": 0.00,
    "ootb_sc_balance_before": 100.00,
    "ootb_sc_balance_after": 110.00,
    "ootb_gc_update_amount": 10.00,
    "ootb_gc_bonus_amount": 0.00,
    "ootb_gc_balance_before": 100.00,
    "ootb_gc_balance_after": 110.00,
    "ootb_sc_change_rate": 0.20,
    "ootb_gc_change_rate": 0.20
  }
}

Parameters

Parameter KeyParameter NameTypeDescriptionMandatory for Opti-X
ootb_transaction_idTransaction IDString/NumberUnique identifier for the transaction that resulted in the balance update.Yes
ootb_actionActionStringThe action that triggered the balance update (e.g., "deposit", "withdrawal", "bet", "win", "correction").Yes
ootb_sc_update_amountUpdate SC AmountNumberThe amount by which the main balance was updated (can be negative for debits or positive for credits).Yes
ootb_sc_bonus_amountBonus SC AmountNumberThe amount by which the SC bonus balance was updated (if applicable).No
ootb_sc_balance_beforeBalance SC BeforeNumberThe user's total SC balance before this specific transaction.Yes
ootb_sc_balance_afterBalance SC AfterNumberThe user's total SC balance after this transaction (should equal ootb_sc_balance_before + ootb_sc_update_amount + ootb_sc_bonus_amount).Yes
ootb_gc_update_amountUpdate GC AmountNumberThe amount by which the main GC balance was updated (can be negative for debits or positive for credits).Yes
ootb_gc_bonus_amountBonus GC AmountNumberThe amount by which the bonus GC balance was updated (if applicable).No
ootb_gc_balance_beforeBalance GC BeforeNumberThe user's total GC balance before this specific transaction.Yes
ootb_gc_balance_afterBalance GC AfterNumberThe user's total GC balance after this transaction (should equal ootb_gc_balance_before + ootb_gc_update_amount + ootb_gc_bonus_amount).Yes
ootb_sc_change_rateSC Change RateDecimalThe percentage change in SC balance (e.g., 0.2 for a 20% increase, -0.1 for a 10% decrease). Optional.No
ootb_gc_change_rateGC Change RateDecimalThe percentage change in GC balance (e.g., 0.2 for a 20% increase, -0.1 for a 10% decrease). Optional.No

Explanation

  • event: Set to ootb_sweepstakes_balance_update. This event serves as the ledger for the user's wallet.
  • context:
    • ootb_transaction_id: A unique system-generated ID for the specific financial movement, ensuring that updates are not double-counted.
    • ootb_action: Provides the "Reason Code" for the change (e.g., deposit, redemption, bet, win).
    • ootb_sc_update_amount: The net change in Sweep Coins (positive for credit, negative for debit).
    • ootb_sc_bonus_amount: Isolates the portion of the SC change that came from promotional bonus funds.
    • ootb_sc_balance_before: Snapshot of SC balance immediately prior to the event.
    • ootb_sc_balance_after: Snapshot of SC balance immediately following the event.
    • ootb_gc_update_amount: The net change in Gold Coins (positive for credit, negative for debit).
    • ootb_gc_bonus_amount: Isolates the portion of the GC change that came from promotional bonus funds.
    • ootb_gc_balance_before: Snapshot of GC balance immediately prior to the event.
    • ootb_gc_balance_after: Snapshot of GC balance immediately following the event.
    • ootb_sc_change_rate: Calculated percentage shift in SC balance, useful for analyzing the relative impact of the transaction.
    • ootb_gc_change_rate: Calculated percentage shift in GC balance, useful for analyzing the relative impact of the transaction.