loyalteez_calculate_reward
Calculate final reward amounts by applying role multipliers and flat bonuses, then return a breakdown of base reward, multipliers, and final total.
Instructions
Calculate final reward with role multipliers & bonuses. Returns breakdown of base reward, multipliers, and final amount.
Supports Discord role bonuses (multipliers 1.0-5.0x and flat bonuses 0-1000 LTZ). Multiple roles combine based on stacking mode (multiplicative, additive, highest_only).
See also: loyalteez://docs/shared-services/tier-service
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| roles | No | Platform role IDs (for role multipliers) | |
| brandId | No | Your brand wallet address. If not provided, uses LOYALTEEZ_BRAND_ID environment variable. | |
| platform | Yes | Platform: "discord" | "telegram" | "web" | etc. | |
| eventType | Yes | Event type for context | |
| baseReward | Yes | Base reward amount before multipliers | |
| userIdentifier | Yes | User identifier (platform_userId@loyalteez.app or email) |