Skip to content

IPromo

Introduction

An IPromo is a limited time purchasable item that can be shown to customers, similar to event sales in TPB:

storeeventsale

A promo gets activated based on its start and end date, and minimum and maximum stage. Once both of those conditions are met, a promo is ready, and starts monitoring its ITrigger . ITrigger are additional conditions that need to be satisfied before an IPromo will be displayed to the player. They have similar functionality to Milestones - triggers can be based on automating generators, completing goals, obtaining currency, etc. Once all triggers are completed, the Promo then becomes ready and is shown to the player. If a Promo has no Triggers, it is ready as soon as it is active.

promoactivationflow

After becoming ready and shown to the player, a Promo will expire in the following scenarios: * the amount of time specified in its Duration field has elapsed (even if that time extends past its endDate) * after ascending past its MaxStage * after purchase.

Relationship

Relationship Each promo consists of zero or more ITrigger , a timer, IPromoData, and IPromoSavedData .

PromoData

PromoData contains a number of fields.The PurchasedItemsDataIds contains the rewards that are paid out to the player on purchase of the promo, and the ProductSku contains the SKU for this item that is referenced in IAPCompletedStateAction. There are also optional fields available for AB testing - ABResourceKey is the key object inside the A/B testing resource, ABResourceValue is the value of the object inside this A/B testing resource that the promo expects to become active, and ABResourceUID is the ID. The value for these should be confirmed with the Game Services team so that the analytics are recorded correctly. MinStage and MaxStage are the minimum and maximum stage that the promo will activate (inclusive). StartDate and EndDate

Tip

To create an hour long promo that will be shown between december 24-26th to players once they have reached stage 6-10 and after certain upgradeable currency is available, you would create a promo with the following PromoData parameters:

variable value
startDate December24
endDate December 26
minStage 6
maxStage 10
duration 1 hour
Trigger upgradeable currency obtained

Promo Service

The IPromoService can be used to access all promos through the GetAllPromos() method, or only the ready promos through the GetReadyPromos() method.