Using Workflow’s Context Data
Workflow context data provides insights into a user’s actions, preferences, behaviors, and interactions with a mobile app. It is typically used within automated workflows to customize interactions. To demonstrate the practical application of context parameters, let's examine the case of Payment Event Context in Action.
Use Case: Payment Event Сontext in Action
Overview
When Reteno receives the SubscriptionStarted
event, the system extracts key subscription details (e.g., subscription type, price, expiration date) and dynamically personalizes messages. The workflow uses a condition block to determine whether the subscription is Monthly
or Yearly
and sends the appropriate email to the subscriber.
Event Example
{
"eventTypeKey": "SubscriptionStarted",
"params": [
{
"name": "externalCustomerId",
"value": "0f8fad5b-d9cb-469f-a165-70867728950e"
},
{
"name": "subscriptionId",
"value": "321"
},
{
"name": "subscriptionName",
"value": "Monthly"
},
{
"name": "price",
"value": 9.99
},
{
"name": "currency",
"value": "USD"
},
// Currency according to ISO 4217
{
"name": "expireDate",
"value": "2024-10-22T22:33:44+03:00"
},
// Expiration time with timezone
{
"name": "hasFreeTrial",
"value": "True"
},
{
"name": "trialExpireDate",
"value": "2024-10-22T22:33:44+03:00"
},
// Optional. Only if hasFreeTrial = True
{
"name": "email",
"value": "[email protected]"
}
]
}
Crafting Messages
Payment parameters (date, price, expiration date, etc.) can be inserted into the email as dynamic variables, making each message personalized.

Prepare two emails: for monthly subscribers and for yearly subscribers.
Creating Workflow
The workflow begins when the SubscriptionStarted
event is received.
To check the subscription type, add the Condition block: Check values to the workflow.
Block parameters:
- Name:
subscriptionName
- Value:
Monthly

Branch Logic:
- Yes Branch (If Value matches Monthly):
- Send the Monthly Subscription Email.
- No Branch (If Value doesn't match Monthly):
- Send the Annual Subscription Email.
Types of Context Data
Workflow's context data is divided into five primary categories:
- Contact Fields: These are user-specific attributes stored in a database, such as demographics, preferences, or subscription status.
- Event Parameters: Detailed information about a specific event or interaction within the app, such as completing a workout, logging meals, or using a particular feature.
- Event Row Parameters: These parameters represent data within event logs, such as the details of a logged meal or a specific workout set.
- Webhook Response Parameters: These are data received through webhooks from external sources like wearables or third-party integrations.
- Order Data: This refers to transactional data, such as purchases, subscription status, or order history.
Each data type can trigger specific actions in workflows, allowing you to adapt your communication strategy in real-time based on user behavior.
Contact Fields
Contact fields store key information about the user, such as age, weight, goals, preferences, and subscription status. These fields enable you to segment your audience and tailor communications based on these attributes.
Using contact fields allows you to deliver personalized messaging and offers, catering to users' specific needs and interests. Combining multiple contact field parameters allows you to create highly granular segments and deliver content that resonates with each user.
Example
Age Group Segmentation: Combine the "Age" field, workout preferences, and Subscription Status to recommend appropriate fitness plans. For example, an active user over 40 with a preference for yoga might receive low-impact yoga routines, while a younger active user preferring strength training could be recommended high-intensity workouts. If the Subscription Status is inactive, the workflow could instead focus on reactivation campaigns, such as offering a free trial for age-appropriate fitness plans.
The creation and usage of contact fields are described in separate articles. You can refer to them using the following links:
Event Parameters
Event parameters capture details about user actions within the app, such as completing a specific activity or achieving a milestone. These events help you understand user engagement and can trigger follow-up actions based on specific behaviors.
Using event parameters, you can react to user interactions in real-time, encouraging continued engagement or rewarding users for their actions. Combining multiple event parameters allows for deeper insights into user behavior, triggering more targeted campaigns.
Example
Feature Engagement: Track the
featureUsed
parameter alongside time spent and interaction count to segment users based on their engagement with a new feature. For example:
- A user who engages with a new workout module, spends significant time on it, and shows a high interaction count might receive advanced tips or challenges tailored to their interests.
- A user with a high interaction count but low time spent might struggle with usability. To improve their experience, they could be sent a tutorial or walkthrough.
- If the interaction count and time spent are both low, the workflow could focus on re-engagement campaigns, such as highlighting the feature’s benefits or offering an incentive for trying it again.
Check out the event parameters tracking tips at this link.
Event Row Parameters
Event row parameters are used when handling multiple data points within a specific event. This is particularly useful for dealing with lists or arrays, such as multiple meals logged or several workout sets performed during a session.
{\"Breakfast\": \"Oatmeal with Banana (Calories: 250, Protein: 5g, Carbs: 45g, Fat: 3g)\", \"Lunch\": \"Grilled Chicken Salad (Calories: 400, Protein: 35g, Carbs: 20g, Fat: 10g, Tags: High Protein)\", \"Snack\": \"Apple with Peanut Butter (Calories: 200, Protein: 7g, Carbs: 25g, Fat: 8g)\"}
Event row parameters allow for deeper analysis of user data at a granular level. Marketers can personalize communication based on individual data points within a larger event, enabling more detailed follow-ups and targeted recommendations.
Example
Dietary Preferences: Track the details of each meal logged. If a user logs a meal with "High Protein", you can send personalized tips on optimizing protein intake for better fitness results.
For more information on segmentation by user events, please follow the link.
Webhook Response Parameters
Webhook response parameters are returned from external systems, such as third-party integrations with wearable devices or fitness trackers. These parameters provide valuable real-time data that can be used to trigger workflows.
This data can be used for real-time engagement, motivating users to stay on track with their fitness goals or adjust their routines based on external metrics.
Example
Heart Rate Monitoring: If the webhook response indicates a "Heart Rate" above a certain threshold (e.g., 180 BPM), the system can alert the user to slow down or adjust their workout intensity to prevent overexertion.
See details on using webhooks in workflows.
Order Data
Order data pertains to the details of back-end transactions, such as purchases, subscriptions, or in-app purchases. This data is crucial for driving upselling, cross-selling, and follow-up communications.
By analyzing order data, you can send targeted offers based on purchase history, subscription tiers, or even abandoned carts. It helps to personalize the shopping experience, driving higher conversion rates and increasing average order values.
Example
Subscription Upgrades: If a user is on a monthly plan, use the "Subscription Type" and "Order Total" parameters to send a targeted offer for an annual subscription at a discounted price, highlighting the savings over the long term.
Updated 1 day ago