> ## Documentation Index
> Fetch the complete documentation index at: https://help.maestra.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Computed fields

**Computed fields** allow aggregating data about your customer and fill their profile in with additional info based on their user behavior.

For example, such fields can help you identify what products, categories, or vendors your customer buys or views most frequently.

Computed fields can be used as any other custom fields, e. g. for segmentation, campaigns, promotions, etc.

# Creating a computed field

<Note>
  You can create up to 3 fields
</Note>

1. Go to the **Settings tab** → **System settings** → **Custom fields** and click "**Create computed field**":

<img src="https://mintcdn.com/maestraio/-w5Ud9QNiG7Y4nor/images/imported/01_ComputedFields.png?fit=max&auto=format&n=-w5Ud9QNiG7Y4nor&q=85&s=d0cd0687ca0c9bfe878b85fdb45d2f3c" alt="01_ComputedFields" width="2892" height="1010" data-path="images/imported/01_ComputedFields.png" />

2. Fill in the settings:

<img src="https://mintcdn.com/maestraio/8PKiDbR3rMJsCzSE/images/imported/00_ComputedFields.png?fit=max&auto=format&n=8PKiDbR3rMJsCzSE&q=85&s=4eeb77d8ad2f5a9d12f86cf6d1ee1edf" alt="00_ComputedFields" width="2920" height="1558" data-path="images/imported/00_ComputedFields.png" />

## General settings

* Name — the same as displayed in filters or campaigns

* Brand

* System name — is used in integrations and the message template engine

## Recalculating

* Frequency is daily or just once (per all the time the field exists)

* Period is the data time frame you want to use in your report.

## Formula

1. Choose what type of events to collect data for: views or orders

<img src="https://mintcdn.com/maestraio/2_WUUqtXTQTrF_2i/images/imported/08_Computed-20fields.png?fit=max&auto=format&n=2_WUUqtXTQTrF_2i&q=85&s=23f65a8a231afe80db47f3600fcb8ec8" alt="08_Computed fields" width="1826" height="504" data-path="images/imported/08_Computed-20fields.png" />

2. Choose which entity to search in processed data — it will be filled in customer’s calculated field.

* **Product**

<img src="https://mintcdn.com/maestraio/59KyfifOW7tLz5QR/images/imported/02_ComputedFields.png?fit=max&auto=format&n=59KyfifOW7tLz5QR&q=85&s=af71bd26c9a94c8079a3019f7e7e634b" alt="" width="1828" height="442" data-path="images/imported/02_ComputedFields.png" />

<img src="https://mintcdn.com/maestraio/2_WUUqtXTQTrF_2i/images/imported/09_Computed-fields.png?fit=max&auto=format&n=2_WUUqtXTQTrF_2i&q=85&s=ce8c3e8e21ae0367b3d6a561781cfb68" alt="" width="1804" height="492" data-path="images/imported/09_Computed-fields.png" />

| Find the most frequently purchased product: ​ |
| --------------------------------------------- |
| Or the most frequently viewed product: ​      |

* **Category** — you need to select categories among which the calculation will take place

<img src="https://mintcdn.com/maestraio/59KyfifOW7tLz5QR/images/imported/03_ComputedFields.png?fit=max&auto=format&n=59KyfifOW7tLz5QR&q=85&s=4c0484d13ffa918f711091223d913a2c" alt="" width="1738" height="704" data-path="images/imported/03_ComputedFields.png" />

| Find the most frequently purchased category of the four selected: ​ |
| ------------------------------------------------------------------- |

<Warning>
  Important: You cannot select a parent and child category at the same time
  ​

  <img src="https://mintcdn.com/maestraio/hDwb_Ye73XB_-pfV/images/imported/11_Computed-20fields.png?fit=max&auto=format&n=hDwb_Ye73XB_-pfV&q=85&s=1a3b672fb9c61bd5f987c5a93a48325c" alt="11_Computed fields" width="2298" height="1060" data-path="images/imported/11_Computed-20fields.png" />
</Warning>

* **Manufacturer**

<img src="https://mintcdn.com/maestraio/EeW0Po78IZGyB5gF/images/imported/12_Computed-fields.png?fit=max&auto=format&n=EeW0Po78IZGyB5gF&q=85&s=0e038a125f0d7c7a6b5258a7379189c6" alt="" width="1796" height="488" data-path="images/imported/12_Computed-fields.png" />

| Which manufacturer's products are most frequently purchased or viewed by the customer: |
| -------------------------------------------------------------------------------------- |

* **Product’s [custom field](/api-integrations/how-to-create-a-custom-field)** - string, integer and enumerated field types are available.

<img src="https://mintcdn.com/maestraio/EeW0Po78IZGyB5gF/images/imported/13_Computed-fields.png?fit=max&auto=format&n=EeW0Po78IZGyB5gF&q=85&s=293dbee5dc36914fa65ade8491ea53f2" alt="" width="1786" height="486" data-path="images/imported/13_Computed-fields.png" />

| Product from which collection the customer purchases most often |
| --------------------------------------------------------------- |

* **Order’s [custom field](/api-integrations/how-to-create-a-custom-field)** - string, integer and enumerated field types are available.

<img src="https://mintcdn.com/maestraio/EeW0Po78IZGyB5gF/images/imported/14_Computed-fields.png?fit=max&auto=format&n=EeW0Po78IZGyB5gF&q=85&s=083928d6aa2ca4b2a1ff686f7ac40042" alt="" width="1790" height="486" data-path="images/imported/14_Computed-fields.png" />

| Which delivery type the customer uses most often: |
| ------------------------------------------------- |

* **Order’s touchpoint**

<img src="https://mintcdn.com/maestraio/EeW0Po78IZGyB5gF/images/imported/15_Computed-fields.png?fit=max&auto=format&n=EeW0Po78IZGyB5gF&q=85&s=62fac72c2d58c8f90ee741da60707034" alt="" width="1778" height="460" data-path="images/imported/15_Computed-fields.png" />

| Where the customer makes purchases most often: |
| ---------------------------------------------- |

**Additional conditions** - allow you to narrow the selection of data among which the calculation will take place.

<img src="https://mintcdn.com/maestraio/wm8oEjg6bFaQwCHC/images/imported/NEW_08_ComputedField.png?fit=max&auto=format&n=wm8oEjg6bFaQwCHC&q=85&s=b2749e8cfbd3fe84b40881b3eb8b9c68" alt="NEW_08_ComputedField" width="1804" height="1144" data-path="images/imported/NEW_08_ComputedField.png" />

<img src="https://mintcdn.com/maestraio/wm8oEjg6bFaQwCHC/images/imported/NEW_09_ComputedField.png?fit=max&auto=format&n=wm8oEjg6bFaQwCHC&q=85&s=d6a02194eb8a4e6fb7e0ed46c1b84db7" alt="NEW_09_ComputedField" width="1776" height="1138" data-path="images/imported/NEW_09_ComputedField.png" />

| Find the client's brand of interest in the eyewear category: ​                                      |
| --------------------------------------------------------------------------------------------------- |
| Find the most frequently purchased product in the women's category and only from delivered items: ​ |

Minimum views/orders for this product is the action number threshold for the value to be filled in the field.

You can also set the Calculation priority:

* Most recent

* Most expensive

3. Click "Save"

Done:

<img src="https://mintcdn.com/maestraio/nXS6QsINTx63g9ke/images/imported/04_ComputedFields.png?fit=max&auto=format&n=nXS6QsINTx63g9ke&q=85&s=83c691fc7bbcc8451392bf5ba93aa26a" alt="04_ComputedFields" width="2924" height="762" data-path="images/imported/04_ComputedFields.png" />

<Note>
  Filed computing is launched at night.
</Note>

# Customer search

Custom and computed fields are located in the same tab in your customer card:

<img src="https://mintcdn.com/maestraio/nXS6QsINTx63g9ke/images/imported/05_ComputedFields.png?fit=max&auto=format&n=nXS6QsINTx63g9ke&q=85&s=8b72a3bdf14d99d72bec97f6b6d39ff2" alt="05_ComputedFields" width="2790" height="422" data-path="images/imported/05_ComputedFields.png" />

You can use filters to filter out the customers with the filed value needed:

<img src="https://mintcdn.com/maestraio/5322-upQA3cGdluA/images/imported/06_ComputedFields.png?fit=max&auto=format&n=5322-upQA3cGdluA&q=85&s=78c9ab0902a2ba5d812539013a3e2ee4" alt="06_ComputedFields" width="2898" height="508" data-path="images/imported/06_ComputedFields.png" />

# Display in the campaign

Computed field parameters are listed in **Recipient.CustomField**

To display products for a customer, use a parameter of this type: **Recipient.CustomField.\{Filed system name}**.

The available parameters depend on the type of calculated field.

* If you defined the product - all parameters for the product are available:

<img src="https://mintcdn.com/maestraio/2_WUUqtXTQTrF_2i/images/imported/07_ComputedField.png?fit=max&auto=format&n=2_WUUqtXTQTrF_2i&q=85&s=13135ee0f9e1d13899305a23e2805335" alt="" width="2908" height="1024" data-path="images/imported/07_ComputedField.png" />

* If you were looking for the most common value of the custom field - parameters for displaying this field are available:

<img src="https://mintcdn.com/maestraio/wm8oEjg6bFaQwCHC/images/imported/NEW_10_ComputredField.png?fit=max&auto=format&n=wm8oEjg6bFaQwCHC&q=85&s=e005d245c33b49f6f9e4ac277e279531" alt="" width="2914" height="704" data-path="images/imported/NEW_10_ComputredField.png" />

It is also possible to display recommendations for computed products and categories.

<img src="https://mintcdn.com/maestraio/wm8oEjg6bFaQwCHC/images/imported/NEW_11_ComputedFields.png?fit=max&auto=format&n=wm8oEjg6bFaQwCHC&q=85&s=3ff13c07afe888c7b8da570dde3b57d2" alt="NEW_11_ComputedFields" width="1686" height="804" data-path="images/imported/NEW_11_ComputedFields.png" />

# Use in the flow

In the flow you can use “Preferred product changed” event, which allows you to react to a decrease in the cost of a product from a calculated field:

<img src="https://mintcdn.com/maestraio/wm8oEjg6bFaQwCHC/images/imported/NEW_12_ComputedFields.png?fit=max&auto=format&n=wm8oEjg6bFaQwCHC&q=85&s=04d0af504daf58655d4d60f5d67c45c9" alt="NEW_12_ComputedFields" width="2938" height="1114" data-path="images/imported/NEW_12_ComputedFields.png" />

Example:

["The price of the most viewed or purchased product has dropped" flow](https://intercom.help/maestraio/v1/docs/the-price-of-the-most-viewed-or-purchased-product-has-dropped-flow)
