# Creating events and properties

This document is about the creation and linking of event and attribute data that are absolutely necessary for using the DFINERY service.

## **What is data linking?**

Data linking refers to the process of connecting the source (app, web, API) that retrieves data to be used for analysis or campaigns in DFINERY with DFINERY. Depending on your needs, you can link in more than two ways, and you can link event and attribute data to use them for various campaigns.

{% hint style="warning" %}
If you do not register for an event, actual use of the service will be greatly limited.
{% endhint %}

* <mark style="background-color:yellow;">**When app (Android, iOS) integration is required**</mark>\
  : When collecting, analyzing, and utilizing app service data to run a campaign
* <mark style="background-color:yellow;">**When web integration is required**</mark>\
  : When collecting, analyzing, and utilizing data from web services to run a campaign
* <mark style="background-color:yellow;">**When API linkage is required**</mark>\
  : **When data from areas other than clients (App & Web)** that are difficult to collect and analyze through SDK linkagemust be linked (POS data, external customer center data, offline data, etc.)

## **(Recommended) Data Linking Priority**

1. Leverage SDK to integrate events that occur on the client
2. Leverage APIs to integrate system-generated events (other than those generated by clients)

{% hint style="success" %}
**Purpose of using S2S(Server to Server) API**

Allows additional integration of events that cannot be tracked on the client.

However, information that can be obtained from the client cannot be obtained, and events collected through the S2S API **cannot be set or utilized as triggers for onsite campaigns.**

<mark style="color:purple;">\*Onsite campaigns (in-app messages) are exposed through SDK.</mark>&#x20;

<mark style="color:purple;">\*Offsite campaigns can be sent from the DFN server.</mark>

{% endhint %}

## **Basic order of event creation and linking**

<figure><img src="https://content.gitbook.com/content/KGOeGww72vu5In7SeJ8c/blobs/teeRgTVgUUqUyGK88J1r/6.%20%E1%84%8B%E1%85%B5%E1%84%87%E1%85%A6%E1%86%AB%E1%84%90%E1%85%B3%20%E1%84%89%E1%85%A2%E1%86%BC%E1%84%89%E1%85%A5%E1%86%BC%20%E1%84%86%E1%85%B5%E1%86%BE%20%E1%84%8B%E1%85%A7%E1%86%AB%E1%84%83%E1%85%A9%E1%86%BC%E1%84%8B%E1%85%B4%20%E1%84%80%E1%85%B5%E1%84%87%E1%85%A9%E1%86%AB%20%E1%84%89%E1%85%AE%E1%86%AB%E1%84%89%E1%85%A5.png" alt=""><figcaption></figcaption></figure>

1. Create an event directly from the Event Management page in the console
2. SDK or API integration ([Go to developer guide](https://docs.dfinery.ai/developer-guide/))

***

## DFINERY **Data Basic Concepts**

#### &#x20; <a href="#undefined-4" id="undefined-4"></a>

### **Type of data**<br>

<table data-header-hidden><thead><tr><th width="195"></th><th></th></tr></thead><tbody><tr><td><strong>Event</strong></td><td>End user behavior data such as membership registration, adding to cart, and purchases.</td></tr><tr><td><strong>Event properties</strong></td><td>Detailed data belonging to individual behavior data such as membership registration channel, type of product in shopping cart, brand name of product purchased, etc.</td></tr><tr><td><strong>User profile properties</strong></td><td>Unique data provided to each end user, such as the end user's nickname, gender, age group, membership level, etc., and is the latest data that is not affected by the query period or time.</td></tr></tbody></table>

{% hint style="info" %}
We recommend a clear and systematic taxonomy design before data linkage. If you need assistance with taxonomy design, please use the professional consulting service of the DFINERY team.&#x20;

For more information, please contact <dfn@igaworks.com>.
{% endhint %}

<div align="left"><figure><img src="https://content.gitbook.com/content/KGOeGww72vu5In7SeJ8c/blobs/5avTSAfRozNovCmRI92K/7.%20%E1%84%8F%E1%85%A5%E1%86%AB%E1%84%89%E1%85%A5%E1%86%AF%E1%84%90%E1%85%B5%E1%86%BC%20%E1%84%80%E1%85%AF%E1%86%AB%E1%84%8B%E1%85%B2%20%E1%84%91%E1%85%A1%E1%84%90%E1%85%B3%20%E1%84%8B%E1%85%B5%E1%86%AF%E1%84%85%E1%85%A5%E1%84%89%E1%85%B3%E1%84%90%E1%85%B3.png" alt=""><figcaption></figcaption></figure></div>

### **Event** : A customer action within an app or web.

<table><thead><tr><th width="178">Division</th><th width="400">Explanation</th><th>Example</th></tr></thead><tbody><tr><td><strong>Standard event</strong></td><td>Provides 15 key customer behavior data defined by DFINERY as standard events</td><td>Log in, sign up, purchase, etc.</td></tr><tr><td><strong>Custom event</strong></td><td>Ability to define and create new customer behavior data outside of standard events</td><td>Non-member purchase method, point payment, etc.</td></tr></tbody></table>

### **List of standard events**

This is a list of standard events provided by DFINERY.

| **Category** | **Event name**             | **Notation name**          |
| ------------ | -------------------------- | -------------------------- |
| User         | df\_login                  | Log in                     |
| User         | df\_logout                 | Log out                    |
| Common       | df\_sign\_up               | Join the membership        |
| Common       | df\_purchase               | Purchase                   |
| ECommerce    | df\_view\_home             | View Home Screen           |
| ECommerce    | df\_view\_product\_details | View product details       |
| ECommerce    | df\_add\_to\_cart          | Put in a shopping cart     |
| ECommerce    | df\_add\_to\_wishlist      | Add to Wishlist            |
| ECommerce    | df\_refund                 | Cancel Order               |
| ECommerce    | df\_view\_search \_result  | Search for products        |
| ECommerce    | df\_share\_product         | Share this product         |
| ECommerce    | df\_view\_list             | View product list          |
| ECommerce    | df\_view\_cart             | View Cart                  |
| ECommerce    | df\_add\_payment\_info     | Enter purchase information |
| ECommerce    | df\_remove\_cart           | Delete Cart                |

### **List of system events**

This is a list of system events that are automatically registered when collecting SDKs in DFINERY. They are automatically registered when a service is created, and the collection status is always active.

<table data-header-hidden><thead><tr><th></th><th width="40"></th><th></th></tr></thead><tbody><tr><td><strong>Category</strong></td><td><strong>Event name</strong><br></td><td><strong>No tation name</strong></td></tr><tr><td>System</td><td>df_start_session</td><td>Running a session</td></tr><tr><td>System</td><td>df_end_session</td><td>Session End</td></tr></tbody></table>

### **Property**: User and event details

<br>

<table><thead><tr><th width="154">Division</th><th width="194">Classification details</th><th width="245">Explanation</th><th>Example</th></tr></thead><tbody><tr><td><strong>Event</strong></td><td><strong>Standard event properties</strong></td><td>Properties that make up the event data provided by the definer</td><td>Purchase amount, shipping fee, product name, etc</td></tr><tr><td></td><td><strong>Custom event properties</strong></td><td>Attributes that configure event data added directly by the customer</td><td>Point payment amount, internal order code, etc.</td></tr><tr><td><strong>User Profile</strong></td><td><strong>Standard User Profile Properties</strong></td><td>Provides six key customer attribute data defined in DFINERY as standard user profile attributes</td><td>Name, gender, membership level, etc.</td></tr><tr><td></td><td><strong>Custom User Profile Properties</strong></td><td>Customer attributes added directly by customers</td><td>Subscription channels, referrer information, etc.</td></tr></tbody></table>

### **List of standard event properties**

A list of standard event properties provided by DFINERY.

<br>

<table><thead><tr><th width="345">Event/Property Name</th><th width="143">Data Type</th><th width="256">Notation name</th></tr></thead><tbody><tr><td>df_delivery_charge </td><td>Double</td><td>Shipping Fee</td></tr><tr><td>df_payment_method</td><td>String</td><td>Payment Method</td></tr><tr><td>df_order_id </td><td>String</td><td>Order Number (ID)</td></tr><tr><td>df_sign_channel</td><td>String</td><td>Membership Channel</td></tr><tr><td>df_total_purchase_amount</td><td>Double</td><td>Order Total</td></tr><tr><td>df_total_refund_amount</td><td>Double</td><td>Total refund (cancellation) amount</td></tr><tr><td>df_discount</td><td>Double</td><td>Product Discount Price</td></tr><tr><td>df_sharing_channel</td><td>String</td><td>Product sharing channel</td></tr><tr><td>df_keyword </td><td>String</td><td>Search Keywords</td></tr><tr><td><em><mark style="color:green;"><strong>df_items*</strong></mark></em><br><em>Please see the next paragraph for details.</em></td><td>List of Object</td><td>Goods</td></tr><tr><td>df_items.[n].df_item_id</td><td>String</td><td><p>Product Number (ID) </p><p><em><mark style="color:green;">Sub-attribute of df_items</mark></em></p></td></tr><tr><td>df_items.[n].df_item_name</td><td>String</td><td>Product name<br><em><mark style="color:green;">Sub-attribute of df_items</mark></em></td></tr><tr><td>df_items.[n].df_quantity</td><td>Long</td><td><p>Product quantity </p><p><mark style="color:green;">S</mark><em><mark style="color:green;">ub-attribute of df_items</mark></em></p></td></tr><tr><td>df_items.[n].df_price</td><td>Double</td><td><p>Product unit price </p><p><em><mark style="color:green;">df_items sub-attribute</mark></em></p></td></tr><tr><td>df_items.[n].df_discount</td><td>Double</td><td><p>Product Discount Price </p><p><em><mark style="color:green;">Sub-attribute of df_items</mark></em></p></td></tr><tr><td>df_items.[n].df_category1</td><td>String</td><td><p>Product Category 1 </p><p><em><mark style="color:green;">Sub-attribute of df_items</mark></em></p></td></tr><tr><td>df_items.[n].df_category2</td><td>String</td><td><p>Product Category 2 </p><p><em><mark style="color:green;">Sub-attribute of df_items</mark></em></p></td></tr><tr><td>df_items.[n].df_category3</td><td>String</td><td><p>Product Category 3 </p><p><em><mark style="color:green;">Sub-attribute of df_items</mark></em></p></td></tr><tr><td>df_items.[n].df_category4</td><td>String</td><td><p>Product Category 4 </p><p><em><mark style="color:green;">Sub-attribute of df_items</mark></em></p></td></tr><tr><td>df_items.[n].df_category5</td><td>String</td><td><p>Product Category 5 </p><p><em><mark style="color:green;">df_items sub-attribute</mark></em></p></td></tr></tbody></table>

### **df\_items** attribute

{% hint style="info" %}
**Understanding the custom event attribute 'df\_items' property**

df\_items is a standard event attribute that is automatically generated when registering a standard event related to ECommerce. Unlike other attributes, df\_items has a 2-depth structure.&#x20;

Under the df\_items(product) attribute, there is attribute information related to the product, such as the product number and unit price. Custom attributes can also be added under the df\_items(product) attribute.

*ex) T-shirt > T-shirt color, T-shirt brand, etc.*

[There are df\_items sub-attributes provided by default in DFINERY](https://docs.dfinery.ai/user-guide/begin-to-use-dfinery/event-and-property#df_items-2), so if you need any product-related attributes separately, please create them and use them.
{% endhint %}

### **List of standard user profile properties**

Here is a list of standard user profile properties provided by DFINERY.

| User profile attribute name | Data Type  | Notation name    |
| --------------------------- | ---------- | ---------------- |
| df\_name                    | `String`   | Name             |
| df\_gender                  | `String`   | Gender           |
| df\_membership              | `String`   | Membership Level |
| df\_birth                   | `Datetime` | Birth date       |
| df\_age\_group              | `String`   | Age group        |
| df\_age                     | `Long`     | Age              |

***

### **How to create an event** <a href="#undefined-9" id="undefined-9"></a>

#### **Channel**

Additional Settings > Data Linking > Event Management > Event List > Create Event

### **Create an event**

1. event/custom select the event type (standard event/custom event)
2. When selecting a standard event, check the list of events predefined in the definer and select the desired event to create it. (However, once an event is created, it cannot be deleted.)
3. When selecting a custom event, you can create it by directly specifying the event name.

<figure><img src="https://content.gitbook.com/content/KGOeGww72vu5In7SeJ8c/blobs/GpP55xWk95e3Qq6FpKN0/image.png" alt="" width="563"><figcaption></figcaption></figure>

{% hint style="warning" %}
**Event name input condition**

* Only lowercase letters, numbers, -, \_ can be entered
* DFN-only prefix df\_ input restriction
* No duplicate entries
* You can enter at least 2 characters and up to 32 characters.
  {% endhint %}

**When setting the notation**\
Name, the event data area used in the console is displayed as replaced with the notation name.

{% hint style="info" %}
**Event name and display name examples**\
open\_a\_bank\_account (event name): Open an account (display name)
{% endhint %}

## **How to create an event property**

#### **Channel**

Additional Settings > Data Linking > Property Management > Event Property List

#### **Creating custom event properties** <a href="#undefined-14" id="undefined-14"></a>

1. Specifies the event attribute name and attribute data type.
2. The maximum number of List property types that can be created is 20, and the maximum number of items that can be activated in batches is 10.

<table><thead><tr><th width="137">Division</th><th width="143">Data Type</th><th width="301">Example situation</th><th>Data example</th></tr></thead><tbody><tr><td>Message</td><td>String</td><td>-</td><td>-</td></tr><tr><td>Integer</td><td>Long</td><td>-</td><td>-</td></tr><tr><td>Mistake</td><td>Double</td><td>-</td><td>-</td></tr><tr><td>Date and time</td><td>Datetime</td><td>-</td><td>-</td></tr><tr><td>True/False</td><td>Boolean</td><td>-</td><td>-</td></tr><tr><td>Character list</td><td>List of String</td><td>-</td><td>-</td></tr><tr><td>List of integers</td><td>List of Long</td><td>-</td><td>-</td></tr><tr><td>List of mistakes</td><td>List of Double</td><td>-</td><td>-</td></tr></tbody></table>

{% hint style="info" %}
**Notification**

* When a standard event is created, sub-standard event properties are automatically created, and the sub-standard event properties differ depending on the standard event.
* In addition to the standard event properties, additional required property data can be created directly as custom properties.
* The generated custom event properties can be added to any event (standard/custom) sub-properties.
  {% endhint %}

#### **Create df\_items attribute** <a href="#df_items-1" id="df_items-1"></a>

{% hint style="info" %}
**Understanding the custom event attribute 'df\_items' property**

df\_items is a standard event attribute that is automatically generated when registering a standard event related to ECommerce. Unlike other attributes, df\_items has a 2-depth structure.\
Under the df\_items(product) attribute, there is attribute information related to the product, such as the product number and unit price. Custom attributes can also be added under the df\_items(product) attribute.

*ex) T-shirt > T-shirt color, T-shirt brand, etc.*

[There are df\_items sub-attributes provided by default in DFINERY, ](https://docs.dfinery.ai/user-guide/begin-to-use-dfinery/event-and-property#df_items-2)so if you need any product-related attributes separately, please create them and use them.
{% endhint %}

**Channel**

Additional Settings > Data Linking > Attribute Management > Create df\_items sub-attribute

1. Specifies the event attribute name and attribute data type.
2. The maximum number of List property types that can be created is 20, and the maximum number of items that can be activated in batches is 10.

   #### &#x20;<a href="#df_items-2" id="df_items-2"></a>

#### **List of df\_items sub-standard attributes (reference)** <a href="#df_items-2" id="df_items-2"></a>

<table><thead><tr><th width="302">df_items Attribute name</th><th>Data Type</th><th>Notation name</th></tr></thead><tbody><tr><td>df_items.[n].df_item_id</td><td><code>String</code></td><td>Product Number (ID)</td></tr><tr><td>df_items.[n].df_item_name</td><td><code>String</code></td><td>Product name</td></tr><tr><td>df_items.[n].df_price</td><td><code>Double</code></td><td>Product unit price</td></tr><tr><td>df_items.[n].df_quantity</td><td><code>Long</code></td><td>Product Quantity</td></tr><tr><td>df_items.[n].df_discount</td><td><code>Double</code></td><td>Product Discount Price</td></tr><tr><td>df_items.[n].df_category1</td><td><code>String</code></td><td>Product Category 1</td></tr><tr><td>df_items.[n].df_category2</td><td><code>String</code></td><td>Product Category 2</td></tr><tr><td>df_items.[n].df_category3</td><td><code>String</code></td><td>Product Category 3</td></tr><tr><td>df_items.[n].df_category4</td><td><code>String</code></td><td>Product Category 4</td></tr><tr><td>df_items.[n].df_category5</td><td><code>String</code></td><td>Product Category 5</td></tr></tbody></table>

## **How to create user profile properties**

#### **Channel**

Additional settings > Data linking > Attribute management > User profile attribute list > Create user profile attribute

#### **Create user profile properties** <a href="#undefined-18" id="undefined-18"></a>

1. Create a standard user profile by selecting the required properties from the standard user profile properties provided by default by Definer.
2. In the Custom User (Profile) Attributes, specify the user profile attribute name and attribute data type.
3. The maximum number of List property types that can be created is 20, and the maximum number of items that can be activated in batches is 10.

{% hint style="info" %}
**Reference**

![](https://content.gitbook.com/content/KGOeGww72vu5In7SeJ8c/blobs/yrUYZ71km4zazToSLWFL/image.png)\\

**df\_age\_group(age group)** and **df\_age(full age)** are <mark style="background-color:orange;">**sub-attributes**</mark> <mark style="background-color:orange;"></mark><mark style="background-color:orange;">of</mark> <mark style="background-color:orange;"></mark><mark style="background-color:orange;">**the df\_birth(date of birth) attribute**</mark> . Based on the collected df\_birth(date of birth) data, the definer **automatically calculates** and provides the df\_age\_group(age group) and df\_age(full age) values.
{% endhint %}

## **Attribute limit rule**

* The maximum number of custom event properties that can be created is **1000**, and up to **500** can be active at the same time.
* **There are 200** user profile properties that can be created, and up to **100** can be activated.
* The maximum number of List property types that can be created is **20**, and the number that can be activated in batches is **10**.

## **Restrict creation of 'reserved word' property**

When creating attribute names, you cannot use words reserved for specific purposes in SQL statements ( [**AWS Redshift reserved words ).**](https://docs.aws.amazon.com/ko_kr/redshift/latest/dg/r_pg_keywords.html)

***

## **Data collection status**

### **event**

{% hint style="warning" %}
**(Re)Activation**&#x20;

When first created, the default collection status is 'Active'. Data collection for the event is possible in the Active status.

**Inactive**&#x20;

Users can change the collection status of their data to 'inactive' (except for system events). When inactive, data for the event and its sub-attributes will no longer be collected, and updates will stop in the event usage area.

\
**When the status changes, it takes**&#x20;

At least 5 minutes and up to 1 hour to reflect.
{% endhint %}

### **How to change event collection status**

Additional Settings > Data Linking > Event Management > Event List > Event Details > Click the ⋮ (Settings) button on the top right > Click the Activate / Deactivate button

Depending on the event collection status, a changeable status button is exposed.

<figure><img src="https://content.gitbook.com/content/KGOeGww72vu5In7SeJ8c/blobs/cIX8LzN7iGpogiQykjxM/image.png" alt=""><figcaption></figcaption></figure>

### **Event properties**

{% hint style="warning" %}
**(Re)Active**&#x20;

Data collection will resume.

**Inactive**&#x20;

No more data will be collected and any uses (campaigns and audiences) where that event attribute was used will stop receiving updates.

\
**When the status changes, it takes**&#x20;

At least 5 minutes and up to 1 hour to reflect.
{% endhint %}

### **How to change the event property collection status**

Additional Settings > Data Linking > Attribute Management > Event Attribute List > ⋮ (Settings) button on the right side of each user profile attribute list

<figure><img src="https://content.gitbook.com/content/KGOeGww72vu5In7SeJ8c/blobs/ZsLlrvdKmguuE8BRVdUE/image.png" alt=""><figcaption></figcaption></figure>

### **User profile properties**

{% hint style="warning" %}
**When (re)activated**

Data collection will resume.

**When you deactivate**&#x20;

No more data will be collected and any uses (campaigns and audiences) where that user profile attribute was used will stop receiving updates.

**When the status changes, it takes**&#x20;

At least 5 minutes and up to 1 hour to reflect.
{% endhint %}

### **How to change the user profile attribute collection status**

Home > Additional Settings > Data Linking > Attribute Management > User Profile Attribute List > ⋮ (Settings) button on the right side of each event attribute list

<figure><img src="https://content.gitbook.com/content/KGOeGww72vu5In7SeJ8c/blobs/FjCyH33xqIfypq3CSi9r/image.png" alt=""><figcaption></figcaption></figure>
