
Creating a dashboard for call center is a great way for call center epmloyees to monitor day-to-day operations, customer buying history as well as their satisfaction based on various metrics and KPIs.

In this use case you will design a dashboard for call center personnel. It will be a reporting tool that shows call center-related analytics so you can monitor, optimize and improve contact with your customers. The goal of the visual presentation is to make analysis simpler by cutting down the time it takes to ingest information from hours to seconds.

<figure>
<img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/use-cases/all-cases/_gfx/cc-dash.png" alt="Call center dashboard"  class="full no-frame">
</figure> 

## Prerequisites 
---
- Implement a [tracking code](/developers/web/installation-and-configuration) on your website.
- Implement transaction events using [SDK](/developers/web/transactions-sdk) or [API](https://developers.synerise.com/DataManagement/DataManagement.html#operation/CreateATransaction).
- Add [custom events](https://developers.synerise.com/DataManagement/DataManagement.html#operation/CustomEvent) and their [parameters](/docs/assets/events/adding-event-parameters) to save data to customers' profiles when they perform an activity.  
        In this particular use case:
    - `product.return`,
    - `callcenter.call`.
- Implement [OG tags](/developers/web/og-tags) on your website.

## Process
---
In this use case, you will go through the following steps:
1. [Create expressions](#create-expressions) that return the date of transaction, returns and page visit.
2. [Create aggregates](#create-aggregates) for transactions, returns, visits to the website and call center history.
3. [Create metrics](#create-metrics) for bought products, returns, top visited brands, top visited products and queries.
2. [Create reports](#create-reports) for history of bought products, returns, top visited brands, top visited products and history of queries.
3. [Create trends](#create-trends) of history of calls.
4. [Create a dashboard](#create-a-dashboard) that gathers created analyses.
5. [Add the dashboard to customer profiles](#add-the-dashboard-to-customer-profiles).


   <div class="admonition admonition-note"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

   These are just examples of analytics you can use, such a dashboard can be expanded with various other analytics suitable for your business needs.

   </div></div></div>


## Create expressions
---
In this part of the process, create two expressions for the following events: `transaction.charge` and `page.visit`. They will be later used in [aggregates](#create-aggregates) to return dates of specific events.

1. Go to <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/icons/behavioral-data-hub-icon.svg" alt="Behavioral Data Hub icon" class="icon"> **Behavioral Data Hub > Expressions > New expression**.
2. Enter the name of the expression. 
3. Set the **Expression for** option to **Event**. 
4. From the **Choose event** dropdown list, select `transaction.charge` event.
5. In the **Formula definition** section, click **Select**.
6. From the list that opens, select **Function > Regexp**.
7. In the brackets, click the **Select** button and from the list, select **Event attribute**.
    1. Click the **Unnamed** node that appeared.
    9. At the bottom of the page, click **Choose parameter**.
    10. In the list of attributes, find and select **TIMESTAMP**.
8. Click the next **Select** button in the brackets and from the list, select **Constant**.
    1. Click the **0** node that appeared.
    2. At the bottom of the page, type `....-..-..` for date format.
9.  Save the expression.
10. Create a second expression and repeat all steps for `page.visit` event.

<figure>
<img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/use-cases/all-cases/_gfx/cc_transactiondate.png" alt="The view of the configuration of the expression returning transaction date"  class="large">
<figcaption>Configuration of the expression returning transaction date</figcaption>
</figure> 

## Create aggregates 
---
In this part of the process, you will create a number of aggregates on transactions, returns, page visits and call center calls, which will be used in the dashboard in the further part of the process.

### Transactions
Create aggregate that:

<details class="accordion"><summary>Returns the date of the first and last transaction made by a customer</summary><div class="accordion-content"><ol> <li>Go to <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/icons/behavioral-data-hub-icon.svg" alt="Behavioral Data Hub icon" class="icon"> <strong>Behavioral Data Hub &gt; Live Aggregates &gt; Create aggregate</strong>.</li> <li>As the aggregate type, select <strong>Profile</strong>. </li> <li>Enter a meaningful name of the aggregate.</li> <li>Switch the <strong>Show in profile card</strong> option on. </li> <li>Click <strong>Analyze profiles by</strong> and select <strong>First</strong> to return the date of first transaction. </li> <li>Click the <strong>Choose event</strong> dropdown list. </li> <li>From the dropdown list, select the <code>transaction.charge</code> event.</li> <li>Click <strong>choose parameter</strong> and search for the <a href="#create-expressions">expression created in the previous part of the process</a> regarding the chosen event.</li> <li>Using the date picker in the lower-right corner, set the time range to <strong>Lifetime</strong>. </li> <li>Click <strong>Apply</strong>.</li> <li>Save the aggregate.</li> <li>Create a second aggregate and repeat all steps for <strong>Last</strong> option, to return the date of last transaction.</li> </ol> <figure> <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/use-cases/all-cases/_gfx/cc_firsttransacton.png" alt="The view of the configuration of the aggregate returning first transaction date" class="large"> <figcaption>Configuration of the aggregate returning first transaction date</figcaption> </figure></div></details>



<details class="accordion"><summary>Returns the last product a customer bought</summary><div class="accordion-content"><ol> <li>Go to <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/icons/behavioral-data-hub-icon.svg" alt="Behavioral Data Hub icon" class="icon"> <strong>Behavioral Data Hub &gt; Live Aggregates &gt; Create aggregate</strong>.</li> <li>As the aggregate type, select <strong>Profile</strong>. </li> <li>Enter a meaningful name of the aggregate.</li> <li>Switch the <strong>Show in profile card</strong> option on. </li> <li>Click <strong>Analyze profiles by</strong> and select <strong>Last</strong> to return the name of the last bought product. </li> <li>Click the <strong>Choose event</strong> dropdown list. </li> <li>From the dropdown list, select the <code>product.buy</code> event.</li> <li>Click <strong>choose parameter</strong> and choose the <code>$name</code> parameter.</li> <li>Using the date picker in the lower-right corner, set the time range to <strong>Lifetime</strong>. </li> <li>Click <strong>Apply</strong>.</li> <li>Save the aggregate.</li> </ol> <figure> <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/use-cases/all-cases/_gfx/cc_lastbought.png" alt="The view of the configuration of the aggregate returning the name of the last bought product" class="large"> <figcaption>Configuration of the aggregate returning last brought product name</figcaption> </figure></div></details>
 


<details class="accordion"><summary>Returns last transaction value</summary><div class="accordion-content"><ol> <li>Go to <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/icons/behavioral-data-hub-icon.svg" alt="Behavioral Data Hub icon" class="icon"> <strong>Behavioral Data Hub &gt; Live Aggregates &gt; Create aggregate</strong>.</li> <li>As the aggregate type, select <strong>Profile</strong>. </li> <li>Enter a meaningful name of the aggregate.</li> <li>Switch the <strong>Show in profile card</strong> option on. </li> <li>Click <strong>Analyze profiles by</strong> and select <strong>Last</strong> to return the value of the last transaction customer made. </li> <li>Click the <strong>Choose event</strong> dropdown list. </li> <li>From the dropdown list, select the <code>transaction.charge</code> event.</li> <li>Click <strong>choose parameter</strong> and choose the <code>$totalAmount</code> parameter.</li> <li>Using the date picker in the lower-right corner, set the time range to <strong>Lifetime</strong>. </li> <li>Click <strong>Apply</strong>.</li> <li>Save the aggregate.</li> </ol> <figure> <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/use-cases/all-cases/_gfx/cc_lastvalue.png" alt="The view of the configuration of the aggregate returning the value of the last transaction made by a customer" class="large"> <figcaption>Configuration of the aggregate returning customer's last transaction's value</figcaption> </figure></div></details>



<details class="accordion"><summary>Calculates the number of transactions for a customer</summary><div class="accordion-content"><ol> <li>Go to <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/icons/behavioral-data-hub-icon.svg" alt="Behavioral Data Hub icon" class="icon"> <strong>Behavioral Data Hub &gt; Live Aggregates &gt; Create aggregate</strong>.</li> <li>As the aggregate type, select <strong>Profile</strong>. </li> <li>Enter a meaningful name of the aggregate.</li> <li>Switch the <strong>Show in profile card</strong> option on. </li> <li>Click <strong>Analyze profiles by</strong> and select <strong>Count</strong> to return the number of all the transactions customer made. </li> <li>Click the <strong>Choose event</strong> dropdown list. </li> <li>From the dropdown list, select the <code>transaction.charge</code> event.</li> <li>Using the date picker in the lower-right corner, set the time range to <strong>Lifetime</strong>. </li> <li>Click <strong>Apply</strong>.</li> <li>Save the aggregate.</li> </ol> <figure> <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/use-cases/all-cases/_gfx/cc_transactionnum.png" alt="The view of the configuration of the aggregate returning the number of transactions made by a customer" class="large"> <figcaption>Configuration of the aggregate returning the number of transactions made by a customer</figcaption> </figure></div></details>
 


<details class="accordion"><summary>Calculates the value of all transactions for a customer</summary><div class="accordion-content"><ol> <li>Go to <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/icons/behavioral-data-hub-icon.svg" alt="Behavioral Data Hub icon" class="icon"> <strong>Behavioral Data Hub &gt; Live Aggregates &gt; Create aggregate</strong>.</li> <li>As the aggregate type, select <strong>Profile</strong>. </li> <li>Enter a meaningful name of the aggregate.</li> <li>Switch the <strong>Show in profile card</strong> option on. </li> <li>Click <strong>Analyze profiles by</strong> and select <strong>Sum</strong> to return the value of all the transactions customer made. </li> <li>Click the <strong>Choose event</strong> dropdown list. </li> <li>From the dropdown list, select the <code>transaction.charge</code> event.</li> <li>Click <strong>choose parameter</strong> and choose the <code>$totalAmount</code> parameter.</li> <li>Using the date picker in the lower-right corner, set the time range to <strong>Lifetime</strong>. </li> <li>Click <strong>Apply</strong>.</li> <li>Save the aggregate.</li> </ol> <figure> <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/use-cases/all-cases/_gfx/cc_transactionsum.png" alt="The view of the configuration of the aggregate returning the value of all transactions made by a customer" class="large"> <figcaption>Configuration of the aggregate returning the value of all transactions made by a customer</figcaption> </figure></div></details>
 

### Returns
Create an aggregate that:

<details class="accordion"><summary>Which result is the name of the last returned product</summary><div class="accordion-content"><ol> <li>Go to <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/icons/behavioral-data-hub-icon.svg" alt="Behavioral Data Hub icon" class="icon"> <strong>Behavioral Data Hub &gt; Live Aggregates &gt; Create aggregate</strong>.</li> <li>As the aggregate type, select <strong>Profile</strong>. </li> <li>Enter a meaningful name of the aggregate.</li> <li>Switch the <strong>Show in profile card</strong> option on. </li> <li>Set the <strong>Analyze profiles by</strong> option to <strong>Last</strong> to display the last product a customer returned. </li> <li>Click the <strong>Choose event</strong> dropdown list. </li> <li>From the dropdown list, select the <code>product.return</code> event.</li> <li>Click <strong>choose parameter</strong> and choose the <code>name</code> parameter.</li> <li>Using the date picker in the lower-right corner, set the time range to <strong>Custom</strong> and set to <strong>90 days</strong>. </li> <li>Click <strong>Apply</strong>.</li> <li>Save the aggregate.</li> </ol> <figure> <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/use-cases/all-cases/_gfx/cc_returnname.png" alt="The view of the configuration of the aggregate returning the name of the last product customer returned" class="large"> <figcaption>Configuration of the aggregate returning the name of the last product customer returned</figcaption> </figure></div></details>
 


<details class="accordion"><summary>Which result is the price of the last returned product</summary><div class="accordion-content"><ol> <li>Go to <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/icons/behavioral-data-hub-icon.svg" alt="Behavioral Data Hub icon" class="icon"> <strong>Behavioral Data Hub &gt; Live Aggregates &gt; Create aggregate</strong>.</li> <li>As the aggregate type, select <strong>Profile</strong>. </li> <li>Enter a meaningful name of the aggregate.</li> <li>Switch the <strong>Show in profile card</strong> option on. </li> <li>Click <strong>Analyze profiles by</strong> and select <strong>Last</strong> to display the price of the last product a customer returned. </li> <li>Click the <strong>Choose event</strong> dropdown list. </li> <li>From the dropdown list, select the <code>product.return</code> event.</li> <li>Click <strong>choose parameter</strong> and choose the <code>price</code> parameter.</li> <li>Using the date picker in the lower-right corner, set the time range to <strong>Custom</strong> and set to <strong>90 days</strong> or according to your business needs. </li> <li>Click <strong>Apply</strong>.</li> <li>Save the aggregate.</li> </ol> <figure> <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/use-cases/all-cases/_gfx/cc_returnprice.png" alt="The view of the configuration of the aggregate returning the price of the last product customer returned" class="large"> <figcaption>Configuration of the aggregate returning the price of the last product customer returned</figcaption> </figure></div></details>
 

### Web activities

In this part of the process, create an aggregate that returns the date of the first or last visit to the web page.

1. Go to <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/icons/behavioral-data-hub-icon.svg" alt="Behavioral Data Hub icon" class="icon"> **Behavioral Data Hub > Live Aggregates > Create aggregate**.
2. As the aggregate type, select **Profile**.  
2. Enter a meaningful name of the aggregate.
3. Switch the **Show in profile card** option on.  
3. Click **Analyze profiles by** and select **First** or **Last** to return the date of the first or last date customer visited the web page.
4. Click the **Choose event** dropdown list.  
5. From the dropdown list, select the `page.visit` event.
6. Click **choose parameter** and search for the [expression created in the previous part of the process](#create-expressions) regarding the chosen event.
7. Using the date picker in the lower-right corner, set the time range to **Lifetime**.
8. Click **Apply**.
9. Save the aggregate.
<figure>
<img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/use-cases/all-cases/_gfx/cc_firstpv.png" alt="The view of the configuration of the aggregate returning the date of the first customer vist to the web page"  class="large">
<figcaption>Configuration of the aggregate returning the date of the first customer vist to the web page</figcaption>
</figure> 

### Contact Center
In this part of the process, create aggregate that returns the time of call center calls.

1. Go to <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/icons/behavioral-data-hub-icon.svg" alt="Behavioral Data Hub icon" class="icon"> **Behavioral Data Hub > Live Aggregates > Create aggregate**.
2. As the aggregate type, select **Profile**.  
2. Enter a meaningful name of the aggregate.
3. Switch the **Show in profile card** option on.  
3. Click **Analyze profiles by** and select **Sum** to return the time of call center calls.
4. Click the **Choose event** dropdown list.  
5. From the dropdown list, select the `callcenter.call` event.
6. Click **choose parameter** and choose the `callDuration` parameter.
7. Using the date picker in the lower-right corner, set the time range to **Custom** and set to **30 days** or according to your business needs. 
8. Click **Apply**.
9. Save the aggregate.
<figure>
<img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/use-cases/all-cases/_gfx/cc_caldur.png" alt="The view of the configuration of the aggregate returning the duration of calls with call center"  class="large">
<figcaption>Configuration of the aggregate returning duration of calls with call center</figcaption>
</figure> 

## Create metrics
---
In this part of the process, you will create five metrics for the following events: `product.buy`, `product.return`, `page.visit` and `item.search`. They will be later used in [reports](#create-reports).

### Number of bought products
This metric will return the number of all products bought by a customer.

1. Go to <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/icons/decision-hub-icon.svg" alt="Decision Hub icon" class="icon" > **Decision Hub > Metrics > New metric**.
2. Enter the name of the metric.
3. As a metric kind, select **Simple metric**.
4. As the type, set **Event**.
5. As the aggregator, set **Sum**.
4. As the occurrence type, set **All**. 
5. From the **Choose event** dropdown list, select `product.buy`.
6. Click <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/docs/analytics/_gfx/where-icon.png" alt="where icon" class="icon"> button.  
    **Result**: The **Choose parameter** button appears. 
7. From the **Choose parameter** dropdown list, choose `$quantity`.
8. To select a specific time range, click the calendar icon. In our case it will be **Lifetime**. Confirm your choice with the **Apply** button.
9. Click **Save**.

<figure>
<img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/use-cases/all-cases/_gfx/cc_prod_metric.png" alt="The view of the configuration of the metric returning the number of all bought products"  class="large">
<figcaption>Configuration of the metric returning the number of all bought products</figcaption>
</figure> 

### Number of returned products
This metric will return the number of all products returned by a customer.

1. Go to <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/icons/decision-hub-icon.svg" alt="Decision Hub icon" class="icon" > **Decision Hub > Metrics > New metric**.
2. Enter the name of the metric.
3. As a metric kind, select **Simple metric**.
4. As the type, set **Event**.
5. As the aggregator, set **Count**.
4. As the occurrence type, set **All**. 
5. From the **Choose event** dropdown list, select `product.return`.
6. To select a specific time range, click the calendar icon. In our case it will be **Lifetime**. Confirm your choice with the **Apply** button.
7. Click **Save**.

<figure>
<img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/use-cases/all-cases/_gfx/cc_productreturn_metric.png" alt="The view of the configuration of the metric returning the number of all returned products"  class="large">
<figcaption>Configuration of the metric returning the number of all returned products</figcaption>
</figure> 

### Number of page visits
This metric will return the number of all page visits made by a customer.

1. Go to <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/icons/decision-hub-icon.svg" alt="Decision Hub icon" class="icon" > **Decision Hub > Metrics > New metric**.
2. Enter the name of the metric.
3. As a metric kind, select **Simple metric**.
4. As the type, set **Event**.
5. As the aggregator, set **Count**.
4. As the occurrence type, set **All**. 
5. From the **Choose event** dropdown list, select `page.visit`.
6. To select a specific time range, click the calendar icon. In our case it will be **Lifetime**. Confirm your choice with the **Apply** button.
7. Click **Save**.

<figure>
<img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/use-cases/all-cases/_gfx/cc_pvmetric1.png" alt="The view of the configuration of the metric returning the number of all page visits"  class="large">
<figcaption>Configuration of the metric returning the number of all page visits</figcaption>
</figure> 

### Number of visited products
This metric will return the number of all products visited by a customer.

1. Go to <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/icons/decision-hub-icon.svg" alt="Decision Hub icon" class="icon" > **Decision Hub > Metrics > New metric**.
2. Enter the name of the metric.
3. As a metric kind, select **Simple metric**.
4. As the type, set **Event**.
5. As the aggregator, set **Count**.
4. As the occurrence type, set **All**. 
5. From the **Choose event** dropdown list, select `page.visit`.
6. Click <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/docs/analytics/_gfx/where-icon.png" alt="where icon" class="icon"> button.  
    **Result**: The **Choose parameter** button appears. 
7. From the **Choose parameter** dropdown list, choose `product:retailer_part_no`.
5. From the **Choose operator** dropdown list, select **String** and **Is not empty**.
6. Using the date picker in the lower-right corner, set the time range to **Lifetime**. Confirm your choice with the **Apply** button.
7. Click **Save**.

<figure>
<img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/use-cases/all-cases/_gfx/cc_productpage_metric.png" alt="The view of the configuration of the metric returning the number of all page visits"  class="large">
<figcaption>Configuration of the metric returning the number of all page visits</figcaption>
</figure> 

### Number of searched items
This metric will return the number of all products searched by a customer.

1. Go to <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/icons/decision-hub-icon.svg" alt="Decision Hub icon" class="icon" > **Decision Hub > Metrics > New metric**.
2. Enter the name of the metric.
3. As a metric kind, select **Simple metric**.
4. As the type, set **Event**.
5. As the aggregator, set **Count**.
4. As the occurrence type, set **All**. 
5. From the **Choose event** dropdown list, select `item.search`.
6. Using the date picker in the lower-right corner, set the time range to **Custom** and set to **30 days** or according to your business needs. Confirm your choice with the **Apply** button.
7. Click **Save**.

<figure>
<img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/use-cases/all-cases/_gfx/cc_itemmetric.png" alt="The view of the configuration of the metric returning the number of all item.search events"  class="large">
<figcaption>Configuration of the metric returning the number of all item.search events</figcaption>
</figure> 

## Create reports
---
In this part of the process, you will create reports on transactions, returns and web activities which will be used in the dashboard in the further part of the process.

### History of bought products
This report will return the name of all products bought by a customer and the time of their purchase.

1. Go to <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/icons/decision-hub-icon.svg" alt="Decision Hub icon" class="icon" > **Decision Hub > Reports > New report**.  
2. Enter a meaningful name of the report.
3. Click the **Choose metric** and from the dropdown list, select [a metric for number of bought products, created in the previous part of the process](#number-of-bought-products).
4. From the **Range** dropdown list, select the number of top (the most frequently bought) products to be shown in the preview of the report. In this case it will be **TOP 5** products.
5. In the **Dimension** section, from the dropdown list, select **Event > Parameters**. To be able to show products name in the report, choose `$name`.
6. Click **Add dimension**. 
    1. Click **Choose dimension** and from the dropdown list, select **Event > Specials**. To be able to show when the product wast bought, choose `TIMESTAMP`.
8. Click **Enable filter**.
    1. Click **Choose filter** and from the dropdown list, select **CLIENT_ID**.
    2. Click **Choose operator** and from the dropdown list, select **Equal (String)**.
    3. Change the type of value by clicking the icon until you get <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/icons/dynamic-key-analytics.png" alt="Dynamic key icon" class="icon" >.
    3. In the first field, write `clientId` and in the second field enter `.`
    4. Click **Apply**.

    <figure>
    <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/use-cases/all-cases/_gfx/cc_productbought_filter.png" alt="The view of the configuration of the filter in report"  class="large">
    <figcaption>Configuration of the filter in report</figcaption>
    </figure> 

8. Using the date picker in the lower-right corner, set the time range to **Custom** and set to **90 days** or according to your business needs. Confirm your choice with the **Apply** button.
9. Save the report.

<figure>
<img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/use-cases/all-cases/_gfx/cc_producbought_report.png" alt="The view of the configuration of the report returning the name and the price of top 5 products bought by a customer"  class="large">
<figcaption>Configuration of the report returning the name and the price of top 5 products bought by a customer</figcaption>
</figure> 

### History of returned products
This report will return the name of all products returned by a customer, their price and the time of return.

1. Go to <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/icons/decision-hub-icon.svg" alt="Decision Hub icon" class="icon" > **Decision Hub > Reports > New report**.  
2. Enter a meaningful name of the report.
3. Click the **Choose metric** and from the dropdown list, select [a metric for number of returned products, created in the previous part of the process](#number-of-returned-products).
4. From the **Range** dropdown list, select the number of top (the most frequently returned) products to be shown in the preview of the report. In this case, it will be **TOP 3** products.
5. In the **Dimension** section, from the dropdown list, select **Event > Parameters**. To be able to show products name in the report, choose `name`.
6. Click **Add dimension**. 
    1. Click **Choose dimension** and from the dropdown list, select **Event > Parameters**. To be able to show what the product price is, choose `price`.
6. Click **Add dimension**. 
    1. Click **Choose dimension** and from the dropdown list, select **Event > Specials**. To be able to show when the product was returned, choose `TIMESTAMP`.
8. Click **Enable filter**.
    1. Click **Choose filter** and from the dropdown list, select **CLIENT_ID**.
    2. Click **Choose operator** and from the dropdown list, select **Equal (String)**.
    3. Change the type of value by clicking the icon until you get <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/icons/dynamic-key-analytics.png" alt="Dynamic key icon" class="icon" >.
    3. In the first field, write `clientId` and in the second field enter `.`
    4. Click **Apply**.
8. Using the date picker in the lower-right corner, set the time range to **Custom** and set to **90 days** or according to your business needs. Confirm your choice with the **Apply** button.
9. Save the report.

<figure>
<img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/use-cases/all-cases/_gfx/cc_returnreport.png" alt="The view of the configuration of the report returning the name, price and time of return for top 3 products returned by a customer"  class="large">
<figcaption>Configuration of the report returning the name, price and time of return for top 3 products returned by a customer</figcaption>
</figure> 

### Top visited brands
This report will return the name of the most frequently visited brands by a customer and the number of visits.

1. Go to <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/icons/decision-hub-icon.svg" alt="Decision Hub icon" class="icon" > **Decision Hub > Reports > New report**.  
2. Enter a meaningful name of the report.
3. Click the **Choose metric** and from the dropdown list, select [a metric for number of all page visits, created in the previous step](#number-of-page-visits)
4. From the **Range** dropdown list, select the number of top (the most frequently viewed) products to be shown in the preview of the report. In this case it will be **TOP 5** products.
5. In the **Dimension** section, from the dropdown list select **Event > Parameters**. To be able to show product's brand in the report, choose `brand`.
8. Click **Enable filter**.
    1. Click **Choose filter** and from the dropdown list, select **CLIENT_ID**.
    2. Click **Choose operator** and from the dropdown list, select **Equal (String)**.
    3. Change the type of value by clicking the icon until you get <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/icons/dynamic-key-analytics.png" alt="Dynamic key icon" class="icon" >.
    3. In the first field, write `clientId` and in the second field, enter `.`
    4. Click **Apply**.
8. Using the date picker in the lower-right corner, set the time range to **Custom** and set to **30 days** or according to your business needs. Confirm your choice with the **Apply** button.
9. Save the report.

<figure>
<img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/use-cases/all-cases/_gfx/cc_topbrandsrep.png" alt="The view of the configuration of the report returning the top 5 product brands visited by a customer"  class="large">
<figcaption>Configuration of the report returning the top 5 product brands visited by a customer</figcaption>
</figure> 

### Top visited products
This report will return the name of most visited products by a customer, their price, and the number of visits.

1. Go to <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/icons/decision-hub-icon.svg" alt="Decision Hub icon" class="icon" > **Decision Hub > Reports > New report**.  
2. Enter a meaningful name of the report.
3. Click the **Choose metric** and from the dropdown list, select [a metric for number of all visited products, created in the previous step](#number-of-visited-products)
4. From the **Range** dropdown list, select the number of top (the most frequently visited) products to be shown in the preview of the report. In this case, it will be **TOP 5** products.
5. In the **Dimension** section, from the dropdown list, select **Event > Parameters**. To be able to show products name in the report, choose `title`.
6. 6. Click **Add dimension**. 
    1. Click **Choose dimension** and from the dropdown list, select **Event > Parameters**. To be able to show the product's price, choose `price`.
8. Click **Enable filter**.
    1. Click **Choose filter** and from the dropdown list, select **CLIENT_ID**.
    2. Click **Choose operator** and from the dropdown list, select **Equal (String)**.
    3. Change the type of value by clicking the icon until you get <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/icons/dynamic-key-analytics.png" alt="Dynamic key icon" class="icon" >.
    3. In the first field, write `clientId` and in the second field, enter `.`
    4. Click **Apply**.
8. Using the date picker in the lower-right corner, set the time range to **Custom** and set to **30 days** or according to your business needs. Confirm your choice with the **Apply** button.
9. Save the report.

<figure>
<img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/use-cases/all-cases/_gfx/cc_prodreport.png" alt="The view of the configuration of the report returning the top 5 products visited by a customer"  class="large">
<figcaption>Configuration of the report returning the top 5 products visited by a customer</figcaption>
</figure> 

### Searched queries
This report will return the name of the most frequently searched queries by a customer and the number of searches.

1. Go to <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/icons/decision-hub-icon.svg" alt="Decision Hub icon" class="icon" > **Decision Hub > Reports > New report**.  
2. Enter a meaningful name of the report.
3. Click the **Choose metric** and from the dropdown list, select [a metric for number of all searched items, created in the previous step](#number-of-searched-items)
4. From the **Range** dropdown list, select the number of top (the most frequently searched) phrases to be shown in the preview of the report. In this case, it will be **TOP 10**.
5. In the **Dimension** section, from the dropdown list, select **Event > Parameters**. To be able to show the searched query in the report, choose `query`.
8. Click **Enable filter**.
    1. Click **Choose filter** and from the dropdown list, select **CLIENT_ID**.
    2. Click **Choose operator** and from the dropdown list, select **Equal (String)**.
    3. Change the type of value by clicking the icon until you get <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/icons/dynamic-key-analytics.png" alt="Dynamic key icon" class="icon" >.
    3. In the first field, write `clientId` and in the second field, enter `.`
    4. Click **Apply**.
8. Using the date picker in the lower-right corner, set the time range to **Custom** and set to **30 days** or according to your business needs. Confirm your choice with the **Apply** button.
9. Save the report.

<figure>
<img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/use-cases/all-cases/_gfx/cc_queryrep.png" alt="The view of the configuration of the report returning the top 10 most searched queries"  class="large">
<figcaption>Configuration of the report returning the top 10 most searched queries</figcaption>
</figure> 

## Create trends
---
In this part of the process, you will create trends on history of page visits and call center calls.

### Visits on the website
This trend will show number of customer visits to the webiste over a specific time frame.

1. Go to <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/icons/decision-hub-icon.svg" alt="Decision Hub icon" class="icon" > **Decision Hub > Trends > New trends**.  
2. Enter a meaningful name of the trend.
3. Click the **Choose event** button and from the dropdown list, select `page.visit`.
8. Click **Enable filter**.
    1. Click **Choose filter** and from the dropdown list, select **CLIENT_ID**.
    2. Click **Choose operator** and from the dropdown list, select **Equal (String)**.
    3. Change the type of value by clicking the icon until you get <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/icons/dynamic-key-analytics.png" alt="Dynamic key icon" class="icon" >.
    3. In the first field, write `clientId` and in the second field, enter `.`
    4. Click **Apply**.
9. Set the **Interval** in the lower-right conrer to **day**.
8. Using the date picker in the lower-right corner, set the time range to **Last 7 days** or according to your business needs. Confirm your choice with the **Apply** button.
9. Save the trend.

<figure>
<img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/use-cases/all-cases/_gfx/cc_trendpv.png" alt="The view of the configuration of the trend of page visits in the last 7 days"  class="large">
<figcaption>Configuration of the trend of page visits in the last 7 days</figcaption>
</figure> 

### History of calls
This trend will show the number of customer call center calls over a specific time frame.

1. Go to <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/icons/decision-hub-icon.svg" alt="Decision Hub icon" class="icon" > **Decision Hub > Trends > New trends**.  
2. Enter a meaningful name of the trend.
3. Click the **Choose event** and from the dropdown list, select `callcenter.call`.
8. Click **Enable filter**.
    1. Click **Choose filter** and from the dropdown list, select **CLIENT_ID**.
    2. Click **Choose operator** and from the dropdown list, select **Equal (String)**.
    3. Change the type of value by clicking the icon until you get <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/icons/dynamic-key-analytics.png" alt="Dynamic key icon" class="icon" >.
    3. In the first field write `clientId` and in the second field enter `.`
    4. Click **Apply**.
9. Set the **Interval** in the lower-right conrer to **day**.
8. Using the date picker in the lower-right corner, set the time range to **Last 7 days** or according to your business needs. Confirm your choice with the **Apply** button.
9. Save the trend.

<figure>
<img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/use-cases/all-cases/_gfx/cc_cctrend.png" alt="The view of the configuration of the trend of call center calls in the last 7 days"  class="large">
<figcaption>Configuration of the trend of call center calls in the last 7 days</figcaption>
</figure> 

## Create a dashboard
---
In the final part of the process you will create a dashboard with [aggregates](#create-aggregates), [reports](#create-reports) and [trends](#create-trends) created in previous steps. 

1.  Go to <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/icons/decision-hub-icon.svg" alt="Image presents the Decision Hub icon" class="icon"> **Decision Hub > Dashboards > Add dashboard**.
2. Enter the name of the dashboard.
3. To add a widget to the dashboard, click an icon on the <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/icons/dashboard-analysis-selection.png" alt="The panel of analysis icons" class="icon"> panel. The icons are (left to right): HTML code, text field, image, [segmentation](/docs/analytics/segmentations/creating-segmentations), [trend](/docs/analytics/trends/creating-trends), [funnel](/docs/analytics/funnels/creating-funnels), [metric](/docs/analytics/metrics/creating-simple-metrics), [histogram](/docs/analytics/histograms/creating-histograms), [aggregate](/docs/analytics/aggregates/creating-aggregates), [expression](/docs/analytics/expressions), and a [report](/docs/analytics/reports/creating-reports). 

    
   <div class="admonition admonition-tip"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z" /></svg></div><div class="admonition-body"><div class="admonition-content">

   You can create the dashboard by grouping the created analytics in sections: Transactions, Returns, Web Activities, Call Center. You can create custom template according to your business needs with the help of this [article](/docs/analytics/analytics-dashboard/creating-dashboards) or follow the sample instructions below.

   </div></div></div>


4. Click the Text icon on the panel.
**Result**: A **Text widget** will appear on the blank dashboard.
2. You can edit widget contents with the editor on the right. In the **Title** field type `Transactions`, you can add a **Description** below.

    
   <div class="admonition admonition-tip"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z" /></svg></div><div class="admonition-body"><div class="admonition-content">

   You can adjust the size of widgest by dragging their lower right corner.

   </div></div></div>


    <figure>
    <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/use-cases/all-cases/_gfx/cc_dash_text.png" alt="The view of the configuration of the text widget on the dashboard"  class="large">
    <figcaption>Configuration of the text widget</figcaption>
    </figure> 

3. Add an aggregate by clicking the Aggregate icon on the panel.
4. Edit widgets contents with the editor on the right. In the **Aggregate** section choose the [aggregate that returns the date of the first transaction made by customer you have created in the previous part of the process](#transactions). You can change the title and description. Do the same for the following [aggregates created in the previous part of the process](#transactions): the date of the last transaction, last bought product, last transaction value, number of transactions, value of all transactions.
     <figure>
    <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/use-cases/all-cases/_gfx/cc_wodget.png" alt="The view of the configuration of the text aggregate on the dashboard"  class="large">
    <figcaption>Configuration of the aggregate widget</figcaption>
    </figure>
5. Add a report by clicking the Report icon on the panel.
6. Edit widgets contents with the editor on the right. In the **Report** section choose the [report on history of bought products you have created in the previous part of the process](#history-of-bought-products). You can change the title and description.
7. Click the **Style** section in the widget editor and change **Visualization type** to **Table**.
    <figure>
    <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/use-cases/all-cases/_gfx/cc_dash_rep.png" alt="The view of the configuration of the report widget on the dashboard"  class="large">
    <figcaption>Configuration of the report widget</figcaption>
    </figure>
8. Repeat steps **4 to 10** to create another sections: Returns, Web activities and Call Center.
    
   <div class="admonition admonition-note"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

   You can look up the sample dashboard created in the Demo workspace [here](https://app.synerise.com/analytics/dashboards/33651c9f-666e-4a48-aa6d-7dc1cfd0d9f8/edit?clientId=0)

   </div></div></div>

11. When you complete creating the dashboard, click **Save dashboard**.  
    
   <div class="admonition admonition-tip"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z" /></svg></div><div class="admonition-body"><div class="admonition-content">

   By default, a new dashboard is private. If you want to share it with others, check the instruction [here](/docs/analytics/analytics-dashboard/sharing-dashboards).

   </div></div></div>


## Add the dashboard to customer profiles
--- 
Optionally, you can add the dashboard to customer profiles.


<div class="admonition admonition-important"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

You can add a dashboard with dynamic data to a customer’s profile, only if at least one analysis inside the dashboard includes a dynamic key. To be able to display statistics about an individual customer, a dashboard must contain at least one analysis that uses the dynamic key - `clientId`. Aggregates and expressions don’t need `clientId` because they already contain it.

</div></div></div>


1. Go to <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/icons/behavioral-data-hub-icon.svg" alt="Behavioral Data Hub icon" class="icon"> **Profiles** and select a customer on the list. 
2. On the top of the activity list, click **Statistics**.  
**Result**: A set of statistics appears.
4. On the top of statistics, click the <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/icons/threedoticon.png" alt="Three-dot icon" class="icon"> icon.  
**Result**: A dropdown list appears.
5. Select **Manage dashboards**.  
**Result**: A pop up appears.
6. On the top of the pop-up, click **Add dashboard**.  
**Result**: A dropdown list appears.
7. From the dropdown list, select a dashboard.
8. To confirm your choice, click **Add**.  
**Result**: The dashboard appears on the bottom of the list.
9. To manage the order of the dashboards added to the customer's profile, drag and drop them in the preferred order. 
10. To save the changes, click **Apply**.

## Check the use case set up on the Synerise Demo workspace
---
You can check all configurations directly in Synerise Demo workspace:
- Expressions
    - [Transaction date](https://app.synerise.com/analytics/expressions/0d844720-6bb7-4776-a661-52cc81577b06)
    - [Page visit date](https://app.synerise.com/analytics/expressions/d31828b7-ef9c-4c7d-8316-3769eb8612c2)
- Aggregates
    - [First transaction date](https://app.synerise.com/analytics/aggregates/7380e558-3d44-30b7-ac26-b1e233e9b16e)
    - [Last transaction date](https://app.synerise.com/analytics/aggregates/d6baacd7-684e-31f6-b3c4-76376090c061)
    - [Last bought product name](https://app.synerise.com/analytics/aggregates/ccbd08cc-1cd0-3b44-bc39-eb2dcd0998e5)
    - [Last transaction value](https://app.synerise.com/analytics/aggregates/8a459dea-e2e7-3c99-8e9b-1b7e12f850e0)
    - [Number of transactions](https://app.synerise.com/analytics/aggregates/24011aa2-632d-319f-9047-8f13712105c8)
    - [Sum of all transactions](https://app.synerise.com/analytics/aggregates/55cf86a5-acd9-3540-8293-13737a495300)
    - [Last returned product name](https://app.synerise.com/analytics/aggregates/d36783fa-382d-3141-8537-9c70ff53ba97)
    - [Last returned product price](https://app.synerise.com/analytics/aggregates/2aee5c1f-2cbc-3961-9d07-cc15ef8550e1)
    - [First page visit date](https://app.synerise.com/analytics/aggregates/b75f9b8f-01b8-3733-80cf-b31a35c46da7)
    - [Last page visit date](https://app.synerise.com/analytics/aggregates/3ff1c746-488c-3f4f-b0ef-2ca09f0b593a)
    - [Call center calls duration](https://app.synerise.com/analytics/aggregates/36bf88a6-e646-36cd-957e-a87c5f32a11e)
- Metrics
    - [Bought products](https://app.synerise.com/analytics/metrics/077074e8-db7c-4e46-bd2e-24e292bee839)
    - [Returned products](https://app.synerise.com/analytics/metrics/5772cbe8-5cef-4659-b049-383747f4a355)
    - [Product page visits](https://app.synerise.com/analytics/metrics/ec561bb7-8227-4f56-9d9c-6979437fed51)
    - [Page visits](https://app.synerise.com/analytics/metrics/4afbcbc7-ab8f-4bc9-8b73-2547b2dfeee2)
    - [Number of searched items](https://app.synerise.com/analytics/metrics/e40f03f4-58d3-4156-9a41-776b3b2c2b24)
- Reports
    - [History of bought products](https://app.synerise.com/analytics/reports/08639f32-0d6c-4b4b-a78e-4eec7a8d00cb)
    - [History of returned products](https://app.synerise.com/analytics/reports/9e92b281-ef93-4cfb-9fd0-916334ef8df9)
    - [Top visited brands](https://app.synerise.com/analytics/reports/2de0ad6c-3fb4-434f-8de9-1bf6b6528504)
    - [Top searched queries](https://app.synerise.com/analytics/reports/1c09d8b2-fdfe-465a-b030-78f3593860e9)
- Trends
    - [Page visits](https://app.synerise.com/analytics/trends/1bfa16b9-9518-4c1a-af12-9c4671048800)
    - [Call center calls](https://app.synerise.com/analytics/trends/d813b0ae-aa02-4cb1-929b-de75fdbb46ac)
- [Dashboard](https://app.synerise.com/analytics/dashboards/33651c9f-666e-4a48-aa6d-7dc1cfd0d9f8?clientId=0)

If you’re our partner or client, you already have automatic access to the **Synerise Demo workspace (1590)**, where you can explore all the configured elements of this use case and copy them to your workspace.  

If you’re not a partner or client yet, we encourage you to fill out the contact [form](https://demo.synerise.com/request) to schedule a meeting with our representatives. They’ll be happy to show you how our demo works and discuss how you can apply this use case in your business. 

## Read more
---
- [Aggregates](/docs/analytics/aggregates)
- [Dashboards](/docs/analytics/analytics-dashboard)
- [Expressions](/docs/analytics/expressions)
- [Metrics](/docs/analytics/metrics)
- [Behavioral Data Hub](/docs/crm)
- [Reports](/docs/analytics/reports)
- [Trends](/docs/analytics/trends)