Switching Jackpot Models
Jackpot model switching API handles the creation of new jackpot instances from a template combined with the process of transfering pot values, optins, sources, etc. from an existing one, while doing a number of validations on whether the result of the switch is appropriate.
This process requires you to have a valid Thrill-ID token which can retrieved by authenticating with Thrill-ID. For more information, see the Thrill-ID section.
Overview
- Create a new Jackpot Template
- Publish the Jackpot Template
- Switch existing jackpot to the new model
Example Data
- Operator ID:
my-operator - Brand ID:
my-brand - Existing Jackpot Instance ID:
321e9e1b-8e7f-4329-bace-b8ec20b7543a - New Jackpot Template ID:
d4b6b464-79a7-4c2e-8982-b5781fc49020
Steps
NOTE: The Operator and Brand must already exist in the system
1. Create a new Jackpot Template
NOTE: Make sure to have the initial seed values for pots you are transfering money to set to zero. If not, an error will occur when attempting to switch models
2. Publish the Jackpot Template
3. Switch existing jackpot to the new model
- Service:
ThrillPots Service - Method:
POST - Path:
/instances/switchmodel - Content-Type:
application/json - Body:
{
"source_instance_id": "321e9e1b-8e7f-4329-bace-b8ec20b7543a",
"template_id": "d4b6b464-79a7-4c2e-8982-b5781fc49020",
"template_owner_id": "my-operator:my-brand",
"target_instance_owner_id": "my-operator:my-brand",
"target_instance_name": "Example Instance 2",
"pot_rules": [{
"source_pot": "minor",
"target_pot": {
"minor": 1
}
}, {
"source_pot": "major",
"target_pot": {
"minor": 0.05
"major": 0.95
}
}, {
"source_pot": "mega",
"target_pot": {
"minor": 0.2,
"major": 0.1,
"mega": 0.7
}
}],
"transfer_optins": true,
"reason": "Redistributing pot values",
"dry_run": true
}
NOTES:
- Model switching does not support Raffle type jackpots;
- Transfer to pots with non zero initial seed is not allowed and will result in an error;
- All source pots must have a target and the whole pot amount value must be transferred;
- Transfer of opt-ins can only happen if the jackpot shape is not changed (number of pots, pot names, etc.);
- No changes will be persisted if the dry_run flag is set;