Skip to contentAirbridgeCUEDocs

Using Context

Explore examples of using predictions and installation attribution to personalize screens and messages.

Purchase and churn predictions and installation attribution from Airbridge CUE help you tailor the products users see in your app and the messages they receive.

Consider a shopping app that sells clothing and household goods. Users browse popular products and promotions on the home screen, add products to their cart, and place orders. The app features products on its home screen and sends push messages about promotions and new arrivals through a CRM.

This guide shows how to use CUE to change the product displays and messages in this shopping app.

Choose information and actions

The information you use depends on where you want to personalize the shopping experience and what you want to achieve.

InformationAudienceExample action
Purchase predictionsUsers with a purchase tier of highFeature products from a current promotion at the top of the home screen.
Churn predictionsEligible push recipients with a churn tier of highSend a message about new arrivals to encourage users to return.
Installation attributionUsers whose installation was attributed to a household goods promotionShow the promotion banner from the ad on the home screen.
Installation attribution and predictionsUsers whose installation was attributed to the household goods promotion and whose purchase tier is highShow the promotion banner and its featured products together at the top of the home screen.

Purchase predictions help you choose who sees a product display, while churn predictions help you choose who receives a re-engagement message. Installation attribution helps you connect the product category or promotion shown in an ad to the experience inside the app.

From CUE information to shopping experiences
Household goods campaign + high purchase tierFrom promotion to home screen

The home screen shows the household goods promotion and its featured products.

High churn tierNew arrivals to bring shoppers back

Eligible push recipients receive a message introducing new arrivals.

The products and message content for each condition need to fit your service. For example, you can highlight promotional products on the home screen or send news of a sale instead of new arrivals.

Using Predictions explains the predicted events and time windows. Using Installation Attribution explains the advertising information.

Define personalization rules

Personalization requires specific conditions and actions based on the information you choose. You define the audience conditions, product displays, and message content, then implement the rules in your app or CRM. Sending messages through a CRM also requires audience conditions and sending settings.

Each rule must include the information to use, the action when conditions are met, and the default behavior.

Read the fields you will use

The response fields below are used in the personalization rules. context.lastTouchpoint contains ad attribution, and predictions contains purchase and churn predictions.

{
  "context": {
    "lastTouchpoint": {
      "channel": "media_A",
      "campaign": "living_sale",
      "adGroup": "kitchen_storage",
      "adCreative": "storage_video",
      "term": null
    }
  },
  "predictions": {
    "d3_purchase": {
      "probability": 0.723,
      "tier": "high"
    },
    "d3_churn": {
      "probability": 0.812,
      "tier": "high"
    }
  }
}

The response above is for a user whose app installation is attributed to the household goods promotion campaign, living_sale. Both the purchase tier and the churn tier are high.

The two examples below use the churn tier to choose message recipients and combine the campaign and purchase tier to choose the home screen. Context API provides the full response specification.

Example 1: Choose re-engagement message recipients by churn tier

The shopping app already sends push messages about new arrivals. Churn tiers help you choose recipients for a separate re-engagement message from the existing eligible audience.

  • Information to use: Read the churn tier from predictions.d3_churn.tier.
  • When conditions are met: Send a new-arrivals message to eligible push recipients whose churn tier is high.
  • Default behavior: Keep the existing messaging setup when the tier does not meet the condition or a prediction is unavailable.

For example, you can use the message “Explore this week's new arrivals” with a link to the new-arrivals page. Messages must follow your existing sending policies, including consent and frequency limits.

Example 2: Combine installation attribution and purchase tier on the home screen

The shopping app also runs ads for a household goods promotion. You can arrange the home screen so users who install through those ads can find the promotion when they open the app.

The campaign can determine which promotion to show, while the purchase tier can determine whether to feature products first. Applying the conditions separately lets you personalize the home screen even when only one condition is met.

  • Information to use: Read the campaign from context.lastTouchpoint.campaign and the purchase tier from predictions.d3_purchase.tier.
  • Campaign condition: If the campaign is living_sale, show the household goods promotion banner.
  • Purchase tier condition: If the purchase tier is high, feature products at the top of the home screen. Show products from the promotion if the campaign also matches, or popular products from across the app otherwise.
  • Default behavior: Keep the existing home screen when neither condition is met.

You choose the promotion's featured products and the app's popular products in advance. The example below uses brand_campaign as a campaign value that differs from living_sale.

Campaign conditions require values in both lastTouchpoint and its campaign field. Rules based on prediction tiers use the returned tier as is.

A home screen based on campaign and purchase tier

Select a combination of conditions to see how the banner and product display change.

Both conditions met

  1. CUE response The campaign is living_sale, and the purchase tier is high.
  2. Rule check Both conditions for the household goods promotion are met.
  3. Home screen The app shows the promotion banner and its featured products at the top of the home screen.

Campaign only

  1. CUE response The campaign is living_sale, and the purchase tier is medium.
  2. Rule check The campaign matches, but the purchase tier does not meet the high condition.
  3. Home screen The app shows the promotion banner and keeps the existing product list.

Purchase tier only

  1. CUE response The campaign is brand_campaign, and the purchase tier is high.
  2. Rule check The campaign does not match, but the purchase tier meets the high condition.
  3. Home screen The app keeps its existing banner and features popular products from across the app at the top of the home screen.

Neither condition met

  1. CUE response The campaign is brand_campaign, and the purchase tier is medium.
  2. Rule check Neither the campaign nor the purchase tier meets the conditions.
  3. Home screen The app keeps the existing home screen.

Prepare default behavior and error handling

Personalization rules also need a default screen or message for unmet conditions or unavailable information. The shopping app can use the following defaults.

SituationDefault behavior
No personalization rule appliesKeep the existing home screen and messaging setup.
Required installation attribution is unavailableKeep the existing banner. If the purchase tier is available, its rule can still apply.
An API error or timeout occursShow the default screen and keep the existing messaging setup. Record the cause and check whether to retry.

Error Handling explains error-specific actions and retry conditions.