Smartico Help Center
Admin loginSmartico.aiTheAffiliatePlatform.com
  • Welcome
  • Products
    • 🔆CRM Automation
      • ◾Create Journey Flow
      • ◾Event Driven Journey
      • ◾Automation Rules
      • ◾Campaigns vs Automation Rules
      • ◾Segmentation
        • ▪️User State Segments
        • ▪️Behavioral Segments
        • ▪️Imported Segments
      • ◾Activities of Flows
        • ▪️Activity: Email
        • ▪️Activity: SMS, Viber and WhatsApp
        • ▪️Activity: Telegram Bot
        • ▪️Activity: Custom IM
        • ▪️Activity: WebHook
        • ▪️Activity: Limit
        • ▪️Activity: Add Points
      • ◾Communication channels
        • ▪️Email
        • ▪️Liquid Email
        • ▪️SMS, Telegram, Viber, and WhatsApp
        • ▪️Popups
        • ▪️Inbox
        • ▪️Push notifications
        • ▪️Content Variations
        • ▪️Opt-out & Communication Statuses
        • ▪️Gamification activities in the communications
      • ◾A/B Testing
    • 🎮Gamification Blocks
      • Setup steps and checklist
      • Points
      • Gems & Diamonds
      • Levels
        • Level Map
        • Levels Tips & Hints
      • Missions
        • Mission Types & Statuses
        • How to set up a Mission
      • Tournaments
        • Tournament Setup
      • Badges
      • Store
      • Example setup
      • Gamification UI skinning
      • Terms to protect
    • 🧠AI Models
      • ◾AI Enhancer
      • ◾Best Time Model
      • ◾Churn & LTV prediction
      • ◾Favorite product
      • ◾RFM Analysis
      • ◾Sport Recommendations
    • 🎲Mini Games
      • ◾Introduction to Mini Games
      • ◾Game template setup
      • ◾Custom skins for Mini-games
      • ◾Mini-games on the landing pages
      • ◾Using images instead of prize names in Spin the Wheel
      • 🏴‍☠️Treasure Hunt
      • ⚽MatchX Game
        • Creating Rounds
        • Resolution of a Round
        • Leaderboard
        • Game Statuses
        • FAQ: MatchX game
        • Loading MatchX & Quiz games on website
      • ❓Quiz Game
      • 🪂Prize Drop
    • 🗺️Lootbox 2.0
    • 🎁Missions Lootbox
    • 🏆Jackpots
    • 🎟️Raffles
    • 💡General concepts
      • ◾Bonuses
      • ◾Dynamic Rewards
      • ◾Custom Sections
      • ◾Attribution value
      • ◾Label tags
      • ◾Multi-currency usage report
      • ◾Multi-brands support
      • ◾Override translations on Label/Brand Level
      • ◾User markers (tags)
      • ◾Deep-links
      • ◾User roles in Back Office
      • ◾Email Gateways Guide
      • ◾"Client action" event
      • ◾Custom fields/attributes
    • 💻UI Widgets
    • ❔FAQs
      • FAQ: Gamification
      • FAQ: Data Studio & Reports
      • FAQ: CRM Automation
      • FAQ: Front-end integration
      • FAQ: Other topics
      • FAQ: Bonuses
  • Use cases
    • 🔆CRM Automation
      • ◾Cross-sell. Match users on different brands
      • ◾Mini-games usage in marketing campaigns
      • ◾Optimize Communication by excluding disengaged players
      • ◾Automated Sports Campaigns
  • Technical guides
    • ◾Integration process
    • ◾Front-end integration
      • ▪️Extended integration
      • ▪️Push configurations
      • ▪️Acquisition mode
    • ◾Data integration
    • ◾Bonus API integration
    • ◾Secured Messaging Gateways (Email/SMS/IM)
    • ◾Reverse integration
    • ◾Smartico Data Warеhouse
      • ◾Smartico DWH \ Affiliation views
      • ◾Smartico DWH \ CRM views
      • ◾Smartico DWH \ Gamification views
    • ◾Games catalog API
    • ◾Custom push gateways
    • Branded Links
  • More
    • 📝Release notes
      • 🌷May 2025
      • 🌷April 2025
      • 🌷March 2025
      • ❄️February 2025
      • ❄️January 2025
      • ⛄December 2024
      • 🍁November 2024
      • 🍁October 2024
      • 🍁September 2024
      • 🌞August 2024
      • 🌞July 2024
      • 🌞June 2024
      • 🌷May 2024
      • 🌷April 2024
      • 🌷March 2024
      • ❄️February 2024
      • ❄️January 2024
      • ⛄December 2023
      • 🍁November 2023
      • 🍁October 2023
      • 🍁September 2023
      • 🌞August 2023
      • 🌞July 2023
      • 🌞June 2023
      • 🌷May 2023
      • 🌷April 2023
      • 🌷March 2023
      • ❄️February 2023
      • ❄️January 2023
      • ⛄December 2022
      • 🍁November 2022
      • 🍁October 2022
      • 🍁September 2022
      • 🌞June 2022
      • ❄️January 2022
      • 🍁October 2021
      • 🌞July 2021
      • 🌷April 2021
      • ❄️February 2021
    • ⚙️Support Scope
    • 👍Request Demo
Powered by GitBook

More

  • expo.smartico.ai
  • ice.smartico.ai
  • play.smartico.ai

@ 2025 Smartico.ai

On this page
  • Possible types of integrations
  • Events and user profile properties
  • Replica DB
  • Users view
  • Transactional views
  • REST API
  • FAQ

Was this helpful?

  1. Technical guides

Data integration

Possible types of integrations

Smartico can be integrated with your product in 3 possible ways:

  • By providing access to a replica of your DB with a set of views that will represent the need for synchronization data, The Smartico system will connect to your DB and track changes in the views.

  • By providing access to your event streaming platform, e.g. Kafka or RabbitMQ. With documentation related to the needed events and data.

  • By sending server-to-server events to Smartico REST API about end-user actions and updates in the end-user profile.

In all types of integrations, your data is encrypted during transfer, and PII-sensitive properties like email, phone numbers, etc, are encrypted and stored in the isolated DB.

Which type of integration is better?

  • Integration on replica DB is the fastest and easiest way, as it doesn't require any resources from your R&D., except defining SQL views to access data.

  • Kafka is good when it's already incorporated in your organisation.

  • REST API is good when you have resources in your R&D team and want to have full control of the data flow. Important that from our expirience its the most time consuming approach for integration, as your team will need to understand semantic of the API and how to structure data properly

Events and user profile properties

Depending on your product type, you will need different sets of events and user profile properties to be sent to the Smartico system.

Based on our experience, we have defined events and user profile properties that are most common for the business verticals like Casino, Sports, Lotter, and Trading - you will find them in the integration documents below.

The properties in the documents result from our attempt to unify all the integrations we faced so far. While they cover the majority of possible Marketing and Gamification needs, there is always a need to define custom data entities for your product. Custom events and user profile properties can be added by your request either during initial integration or later when you face new use cases.

Important

The data source should provide deduplication of the events in case of REST API/Kafka type of integration and table records in case of Replica-based integration.

This means that all "transactional" data should be represented only once and be immutable. All user profile updates should be provided only if there are changes at least in one property of the user profile.

All types of events/records should have an "update date" that represents the actual date of the business event.

Not following this approach may lead to inconsistent performance of the system and wrong execution of the campaigns, missions, tournaments, and automation rules.

Replica DB

To support SQL replica-based integration with Smartico, the integrated platform should provide a replication database with "views" listed below. Smartico will use those views to track the changes in the data and send them to the Smartico CRM system as events. There are two main types of "views" that should be provided.

Users view

Users view should list all users in the integrated product and should have indexed column dt_update The column should be updated with the current date/time in the UTC timezone whenever any of the user profile fields are changed. Smartico will query this view to get user profiles that have been updated since the last query.

Example of SQL query
SELECT * FROM user_profile WHERE dt_update > previous_query_dt_utc

Note: In most systems, the data about the user is distributed among multiple tables, where every table has its own dt_update field.

Building a view that presents the join of all such tables and has an efficient index on dt_update could be quite problematic; in such case, you can expose to us all such tables, and each table will be tracked independently.

Users view fields

The following fields are required and should be exposed from the user's view.

Column name
Data type
Description

dt_update

timestamp

Column should be updated with current date/time in UTC timezone whenever any of the user profile fields are changed. Indexed, not nullable

ext_brand_id

string or int

ID of the brand in integrated product

user_ext_id

string or int

Unique identified of the user

core_account_status

string

Status of account in the external system. If the account is not ACTIVE, Smartico system will not execute any marketing activities for such an account. The default value for a newly created account is Active.Possible values: ACTIVE, BLOCKED, SUSPENDED, BANNED, SELF_EXCLUDED, DEACTIVATED, PENDING, LOCKED, APPROVED Use the condition inside of the segment used in marketing campaigns to directly exclude accounts that are not active in order to not target them

core_registration_date

timestamp

The date/time when user is registeredThe passed value should be a timestamp in UTC with milliseconds precision. The date value should be in the past. One of the most important properties, not only you can segment based on the registration date, for example if you want to run a campaign only for ''veteran'' players who registered more than 2 years ago, but we also use the registration date as the condition to trigger to the ''profile ready''

core_user_language

string

Language of the user in ISO 639-1 format (EN,BG,IT)Possible values: EN, SV, DE, FR, FI, NB, IT, ES, BG, KO... Can be used in content variations for communications, based on the language of the player you'll be able to send different communication assets

core_wallet_currency

string

Currency of the user wallet. Note that once set this value cannot be changed for user. Has multiple uses, can be used in tag to replace the value {{state.core_wallet_currency}} when sending communications about deposit and withdrawals as well as bonus prizes in mini-games for example

The following columns are optional, but we found them useful for marketing purposes in most of the integrated systems.

Column name
Data type
Description
Use case

core_username

string

Username or nickname

Can be used in the greetings as tag like "Hello {{state.core_username}}" Also used in the leaderboards in the gamification

user_birthdate

timestamp

Birth date of userThe passed value should be a timestamp in UTC with milliseconds precision. The date value should be in the past.

Can be used to build birthday campaign for example: If birth date is 'less or equal than 2 days' > send a reminder email saying that if they log in on their birthday they will receive a bonus if birth date is 'today' > trigger a campaign on the log in to give a birthday bonus to the player with a personalized popup

user_country

string

2 symbols, user registration country, e.g. UA

If the operator is targeting multiple countries it can be used to segment players based on their countries and build country specific campaigns

user_email

string

In case Smartico Data Guard is setup, the mail is encrypted and cannot be accessed from Smartico CRM. In case mail is submitted via API, it should be encrypted on Integrated system

Used in communication over Email

user_first_name

string

free text

Can be used as a dynamic tag in communications in order to refer to the user with their first name {{state.user_first_name}}

user_last_name

string

free text

can be used as a dynamic tag in communications in order to refer to the user with their first name {{state.user_first_name}}

user_phone

string

In case phone is submitted via API, it should be encrypted on Integrated system

Used in communication over SMS

core_affiliate_id

numeric

Affiliate ID from affiliate system (in case it's numeric value)

Users register using a specific Affiliate ID/link containing ID and this ID is used to separate players from affiliation and organic registration, example value 4322

core_affiliate_str

string

Affiliate ID from affiliate system

Similar to the "ID" value, but in case your affiliate identified is not numeric, but string, like "john24"

core_is_email_disabled_by_platform

boolean

User is opted out from mail communication on the Product side

If you have communication preferences on the website where the player can unsubscribe to marketing communications, you can automatically exclude from marketing campaign all players who opted out in order to not even attempt sending a communication

core_is_sms_disabled_by_platform

boolean

User is opted out from sms communication on the Product side

If you have communication preferences on the website where the player can unsubscribe to marketing communications, you can automatically exclude from marketing campaign all players who opted out in order to not even attempt sending a communication

core_user_gender

string

Possible values: MALE, FEMALE, F, M, UNKNOWN

Segment based on the gender or can be added in content variation setting to personalize pronouns in communication assets based on the player's gender

core_kyc_status

string

Status of the user in KYC process

Run a campaign on players who didn't complete their KYC process giving them a bonus when they verify their documents

Transactional views

Transactional views that represent deposits, casino/sports bets, etc., are "transactional", which means that every record in the view should be immutable and should have an indexed "dt_finalized" column.

Smartico will use this "dt_finalized" column to find new records and send them to the Smartico CRM system.

SELECT * FROM deposits WHERE dt_finalized > previous_max_dt_finalized

Please note that every transaction should be and don't change once the transaction is made visible in the view. If this is not preserved same transaction will be reported multiple times to the Smartico CRM system.

In a lot of the systems transaction tables also have always incrementing unique IDs, if it is such, it can be also used by integration instead of the dt_finalized field.

Example of SQL query
SELECT * FROM deposits WHERE id > previous_max_deposit_id

All views (users and transactional) should also have two columns that uniquely identify users in the system - ext_brand_id and user_ext_id. Both columns could be the type of string or integer. Example of user identification: ext_brand_id = "SuperCasino", user_ext_id = "john77" or ext_brand_id = 5 and user_ext_id = 123

Deposits view

The view should represent final deposits, there shouldn't be attempts, failed, or canceled deposits.

Rows in the view should be immutable

Required fields

Column name
Data type
Description

dt_finalized

timestamp

Column should be updated with current date/time in UTC timezone whenever the transaction is finilized (not goin to change in future). Once transaction is visible in the view it should not be changed(!).

ext_brand_id

string or int

ID of the brand in integrated product

user_ext_id

string or int

Unique identified of the user

transaction_id

string

Transaction ID - unique transaction ID of the operation. Can be skipped, If the table has unique ID as listed above

transaction_date

timestamp

The date of deposit. The passed value should be a timestamp in UTC with milliseconds precision.

deposit_amount

numeric

Deposit amount in the player currency

Optional fields

Column name
Data type
Description

bonus_balance

numeric

Bonus money balance in the user currency right after deposit was done

real_balance

numeric

Real money balance in the user currency right after deposit was done

total_balance

numeric

Total money balance in the user currency right after deposit was done (real + bonus)

deposit_code

string

If user used some deposit or vaucher code for the bonus

deposit_method

string

Name of used deposit method, e.g. PaySafe

Casino Bets & wins

Casino bets & wins can be presented in one table with a column indicating if the transaction of type bet or of type win. Or these transactions can be presented in separate tables.

Fields with "*" are needed only for "win" transactions

Required fields

Column name
Data type
Description

dt (or id)

timestamp or int

Column should be updated with current date/time in UTC timezone whenever the transaction became visible through the view. Once transaction is visible in the view it should not be changed(!). Or instead of date, there should be incremental ID

ext_brand_id

string or int

ID of the brand in integrated product

user_ext_id

string or int

Unique identified of the user

bet_id

string

Unique transaction ID of the operation. Can be skipped, If the table has unique ID as listed above

bet_date

timestamp

The date of bet. The passed value should be a timestamp in UTC with milliseconds precision.

bet_amount

numeric

Total bet amount (real + bonus). In the user currency

win_amount*

numeric

Total win amount (real + bonus). In the user currency

game_name

string

Name of the game. E.g. "Golden Slot 2"

game_id

string

The unique ID of the game

Optional fields

Column name
Data type
Description

bet_amount_real

numeric

Real money part of bet. In user currency

bet_amount_bonus

numeric

Bonus money part of bet. In user currency

win_amount_real*

numeric

Real money part of win. In user currency

win_amount_bonus*

numeric

Bonus money part of win. In user currency

game_category

string

E.g. "Slots"

game_category_id

string

The unique ID of the game's category

game_provider

string

E.g. "Pragmatic"

game_provider_id

string

The unique ID of the game's provider

Sport bets, selections and settlements

Smartico has built-in support for other types of transactions, such as failed bets, issued bonuses, requested withdrawals, etc, as well as for other verticals like Sports betting, FinTech, Retail, etc.

For example, for the "Sport" domain we are indicating 4 types of transactions:

  • Sport bet placement (bet open)

  • Sport selections placement

  • Sport bet settlement

  • Sport selections settlement

The DB structure that represents these types of transactions may vary on different providers. What we have found as the most common concept is presented in the diagrams below

REST API

You can find attached a document giving a general idea of API-based integration.

Note: this document is only given as an example and shouldn't be used as a final guide for integration; please contact your Success Manager for the exact document listing all events and properties specific to your product.

FAQ

What databases are supported for the data integration

We support MySql, PostgreSQL, MSSQL, Oracle, Clickhouse, Snowflake, BigQuery, MongoDB, Redshift, MariaDB.

What security measures are applied on the connectivity level between Smartico and the Operator data source

We support secured and non-secured connections and all existing mechanics of authorizations with RDMS or streaming solutions. We also provide fixed IPs that should be whitelisted to access your data sources. It is important to note that we are not supporting integrations via VPNs.

Last updated 2 hours ago

Was this helpful?

◾
26MB
smartico.ai - REST API.pdf
pdf