Create Business Object
Before creating decisions and visualizations, you must define and activate a Business ObjectBusiness Object
A container for data fields and metrics that defines aggregations and data sources.
Use case
For our use case, we’ll create a Business Object that captures data such as the guild name, message sent, purchase item, and purchase item value.
We’ll capture that data as data fields — either a numeric measure (message sent and purchase item value) or a qualitative dimension (guild name and purchase item).
This is a sample of the JSON structure we’ll use to mapMapped/Unmapped
Whether the data source for a data field has been defined or the action has been configured.Data fields
Data you want Illuminate to track. These can be quantitative (measures), like "Number" or "Timestamp" or qualitative (dimensions) values, like "String" that can be used to categorize and segment data. Data fields can be aggregated and calculated.
[
{
"chatMessage": 1,
"guildName": "Rockin Guild",
"purchasedItem": "Wood Fort",
"purchaseValue": "5",
"discountCode": "FORTFREE"
},
{
"chatMessage": 1,
"guildName": "Hurrah",
"purchasedItem": "Metal Fort",
"purchaseValue": "8",
"discountCode": "FORTX"
},
show all 17 linesWe’ll later create metricsMetric
What exactly is evaluated using measures and dimensions (collectively called data fields), as well as aggregation functions.
Steps
Follow the sections to prepare a Business Object — create and map data fields, add metrics, and activate it.
Create and map data fields
Start by defining what data you want to track and how.
- Watch video
- Step-by-step guide
-
On the Business Objects home page, click the Create Business Object button. The Create new Business Object modal is displayed.
-
Provide the name (
Game engagement experiment
) and optional description, and assign at least one PubNub app and keyset to the Business Object by clicking the Choose Apps & Keysets button. -
Add four separate data fields by clicking the + Add field button.
a. Enter a field name (
Messages
,Purchase Value
,Guild Name
orPurchase Item
) and choose its type (Number
forMessages
andPurchase Value
, andString
forGuild Name
andPurchase Item
).b. Map the measures to a data source by clicking the Map button:
Select
message
from Category,body
from Subcategory, and enterchatMessage
(forMessages
),purchaseValue
(forPurchase Value
),guildName
(forGuild Name
) andpurchasedItem
(forPurchase Item
) in the JSON path text box.c. Save the changes by clicking the Map button.
-
When you’re done, click Save to create the Business Object.
Now that you have your Business Object created, you can either activate it or add metrics to it — the order doesn’t matter, but both steps are required. Once the Business Object is activated and at least one metric has been created, you can either create a Decision or a Dashboard.
Order of steps
You can add metrics even before data fields are mapped.
Create metrics
Add calculations to your data fields.
Order of steps
You can add metrics before data fields are mapped.
- Watch video
- Step-by-step guide
-
On the Business Objects home page, click the row with the Business Object to which you want to add the metric. The Business Object details view opens.
-
In the Metrics section, click the + Create metric button and the Create metric modal opens.
-
Provide the following details for the
Message sum
metric:a. Type in the metric name (
Message sum
).b. Select the aggregation Function to use for the metric (
Sum
).c. Choose
Messages
as a Measure.d. Set the Period to
30 minutes
.e. Select the
Guild Name
Dimension you previously added to the Business Object as a data field.Dimension selection
If you don’t select a dimension for your Metric, you won’t be able to use it as a criterion in decisions and dashboards in further steps.
f. Don’t set any Filters for our use case.
-
When you’re done, click Create.
-
Repeat steps 2-4 to create the
Total purchased value
metric:a. Type in the metric name (
Total purchased value
).b. Select the aggregation Function to use for the metric (SUM).
c. Choose
Purchase Value
as a Measure.d. Set the Period to 30 minutes.
e. Select the
Purchase Item
Dimension you previously added to the Business Object as a data field.f. Don’t set any Filters.
A ready and activated Business Object with metrics looks as follows.
Activate Business Object
To start capturing and storing the data, you must activate the Business Object.
Conditions for activating a Business Object
Head to the Additional details section for details on conditions that must be met to activate a Business Object.
- Watch video
- Step-by-step guide
To activate a Business Object, open this Business Object and click the Activate button.
From now on, Illuminate will start capturing the requested data until you deactivate or delete the Business Object. You can't add or remove data fields once you've activated a Business Object, but you can add a metric to it.
Data you defined in Business Objects and subsequently captured are housed in a single database for 90 days.
With the Business Object that is configured and active, you can create a Decision or a Dashboard.