API Integration Best Practices

Integrating the Bettor Sense API effectively is crucial for maintaining a robust and responsive platform. This guide outlines best practices that will help you achieve an optimal performance.

Implementing a circuit breaker

A circuit breaker pattern should be implemented to handle potential API disruptions. This ensures your system continues to function even if there are temporary issues with the Bettor Sense API. The circuit breaker can default to a predefined behavior when the API is unavailable.

Risk check at player login

When a player logs in to your platform, you can perform a risk score check by calling the Bettor Sense API. This allows you to immediately identify high-risk players and implement appropriate interventions at the beginning of their session.

Since Bettor Sense risk scores are only updated once daily (typically by 4 AM UTC), multiple risk checks for the same player on the same day will always return identical results so it is suggested to only perform a risk check after first login.

This reduces unnecessary API calls while still ensuring you're using the most current risk assessment for each player. You could schedule a daily batch process to retrieve updated scores for all active players, or fetch a player's daily score on their first login of the day and cache it for subsequent logins.

Daily batch update with latest risk scores

Since risk scores are updated daily by 4 AM UTC, it's recommended to retrieve the latest risk scores for your active players once per day. This ensures you're working with the most current risk assessment data. Remember that risk scores are only updated for players who had betting activity the previous day.

Bettor Sense API's batch endpoint does include functionality to retrieve only risk scores that have changed since a specific date using the "latest updated date" parameter.

Custom interventions

Custom interventions based on risk scores allow you to create targeted, personalized responsible gaming measures that correspond to the severity and specific nature of a player's gambling behavior.

We recommend creating a basic set-up, starting with a simple intervention logic and gradually develop it over time with additional intervention methods and more advanced rules.

Bettor Sense analyzes and monitors player behavior and risk, providing risk scores for each analyzed player with most contributing factors leading to the assessed risk. Bettor Sense identifies players who may need intervention and explains the reasons. However, the operator is responsible for deciding and carrying out the appropriate actions.

Risk-based intervention framework example

Develop a tiered intervention framework that escalates based on risk categories. Here are some possible escalation examples:

  • No risk (< 50): Minimal or no interventions needed; standard responsible gaming information available.

  • Low risk (50-68): Gentle awareness messaging about responsible gaming tools.

  • Medium risk (68-95): More direct communications and suggested voluntary limits.

  • High risk (95-99): Proactive interventions such as cooling-off periods or stake limits.

  • Very high risk (99-100): Strongest interventions including account reviews or other available methods.

Personalized messaging

You can use the risk score explanation data to tailor intervention messages to the specific contributing factors. Here are some examples:

  • For players with high "Speed of play" contributions, focus messages on taking breaks.

  • For those with high "Betting behavior" contributions, address stake sizes and betting patterns.

  • When "Losses" is a major factor, provide messages about chasing losses and setting loss limits.

Setting intervention rules

Limiting messages

To prevent message fatigue, implement rules that limit how frequently a player receives intervention messages. For example, you might set minimum intervals between messages or prioritize interventions based on risk score increases rather than sending messages for every minor change.

Timing

Time interventions strategically based on player behavior:

  • At session start for high-risk players

  • After extended play sessions

  • Following significant losses

  • When risk scores show notable increases

Escalation workflow

Develop a workflow for when and how to escalate interventions if initial approaches don't result in behavior changes. You could include defined thresholds for when human review becomes necessary.

Error handling and retry logic

Implement robust error handling with retry mechanisms for temporary failures. Use exponential backoff for retries to avoid overwhelming the API during recovery periods.

Version management

Be mindful about API version updates and deprecation schedules. Plan migrations to newer versions in advance of deprecation dates.

Last updated

Was this helpful?