Offers definition table
Last updated
Last updated
For each IAP Recommendation integration, Assetario requires an Offer definition table that will be used to choose the best possible offers for customers, and a Prediction type definition table that is used to match the prediction type requested through the API (a customer can have multiple personalized and defined offer types, such as pop-up, banner, and store offers).
Assetario can also return a variable number of offers - for example, we can only return one pop-up per user from a selection of four available, but six out of 24 available coin shop offers.
Offer definition table (details about the offers):
offer_id [String]
prediction_type [String]
price [Float]
content [String]
available_for_prediction [Bool]
start_time (UTC +0) [Datetime]
end_time (UTC +0) [Datetime]
conditions [String]
extra__discount [Int]
10001
starter_pack
1.99
“diamonds*20; coins*15”
True
2021-01-03T10:00:00+0:00
2025-01-05T12:00:00+0:00
“min_lvl > 10 AND coins < 5”
50
10002
starter_pack
3.99
“diamonds*40; coins*30”
False
2021-01-03T10:00:00+0:00
2025-01-05T12:00:00+0:00
“spend > 0”
10
10003
starter_pack
3.99
"skin_3"
False
2021-01-03T10:00:00+0:00
2025-01-05T12:00:00+0:00
“first_time_user OR lvl < 10”
20
10004
starter_pack
99.99
“diamonds*800; coins*500”
False
2021-01-03T10:00:00+0:00
2025-01-05T12:00:00+0:00
0
10010
banner
1.99
"skin_4"
True
2021-01-04T10:00:00+0:00
2025-01-05T12:00:00+0:00
10011
banner
3.99
"skin_5"
True
2021-01-04T10:00:00+0:00
2025-01-05T12:00:00+0:00
10012
banner
3.99
"skin_6"
True
2021-01-04T10:00:00+0:00
2025-01-05T12:00:00+0:00
10013
banner
19.99
"skin_5;diamonds*40; coins*30"
True
2021-01-04T10:00:00+0:00
2025-01-05T12:00:00+0:00
Field description:
offer_id [String]: Unique offer identifier.
Does not repeat in the shared offer table.
Has to match to offer id observed in payments and offer views.
This can either be a random string or a string in a format similar to:1com.gm11.game_xxx.coin3
prediction_type [String]: A group identifier.
Multiple offers can have one prediction_type.
Should match to prediciton_type defined in the prediction service and in the Secondary table below.
price [Float]: the price of the offer
Should be in USD.
content [String]: content the player receives after purchasing the offer
The format of this field is a String with special encoding, which consists of a series of semi-colon-separated pairs of content and amount. Example “content1*value1; content2*value2”
available_for_prediction [Bool]: Whether this offer can be predicted
If set to True, Assetario may return this offer when personalizing. Otherwise, the offer is only used in analytics and reporting but will not be used for personalization.
start_time (UTC +0) [Datetime]: first time when Assetario can show the offer to players
If the offer is always available, leave this field empty
end_time (UTC +0) [Datetime]: last time when Assetario can show offers to players
If the offer is always available, leave this field empty
conditions [String]: An SQL WHERE clause-like statement is used to select the offers that Assetario will predict. This statement specifies the conditions for selection. The following is an example of a conditions string:
"(level > 10 AND past_seven_day_spend > 100) OR (past_thirty_day_spend > 1000)"
This string uses three different variables
level
past_seven_day_spend
past_thirty_day_spend
extra: The client may provide additional information consisting of multiple fields. Each field must have its column in the offer table and be named "extra__{extra_column_name}". The column names and types can vary as long as they are consistent within each column. The should contain a field for each condition used.
discount [Int in [0-100] range ]
discount applied to the offer
multiplier [Int]
value multiplier on the offer
creative_id [String]
what is the visual used when displaying the offer to the user
is_holiday_offer [Bool]
flag to designate this offer as a special offer. For example, St. Patric's day offer, etc.
Prediction type definition table (details about prediction types)
prediction_type [String]
availible_for_prediction[Bool]
returned_offers [Int]
is_ordered [Bool]
is_nullable [Bool]
starter_pack
True
3
True
False
banner
False
1
False
True
Field description:
prediction_type [String]: field used to match with the offer table
availabe_for_prediction [Bool]: whether Assetario may personalize this prediction_type or not
returned_offers [Int]: how many offers to return
In some situations, for example, when choosing the three daily offers for a particular day, the client may want multiple offers to be returned for each call to the API.
is_ordered [Bool]: Assetario will also provide ordered recommended offers.
is_nullable [Bool]: Assetario can return nothing so the user is receiving no offer.
We ask you to share the offers' definition table and keep it updated. You can store it on your database and share it with Assetario through regular DB dumps or by sending a CSV file.
The customer also needs to provide a description of how they are currently deciding which IAPs are seen and available to specific users. It might help to increase the performance.