---
title: Managed Impressions
slug: engine-api/managed-impressions
description: How the Monetate Engine API records impressions when it returns actions
image:  https://archbee-image-uploads.s3.amazonaws.com/ceIfEvQHzQk1IVxoRWUh7/K9eTL4jKm7UQINb6zNziJ-20250912-181225.png
docTags: 
createdAt: 2024-05-09T18:03:15.351Z
---

By default, when a request with [monetate\:decision\:DecisionRequest](docId\:DspILr3g1cifaeEYlsqsB) is made and an action is returned as part of the Engine API response, an impression is recorded for that action at decision time.

In some situations additional front-end logic must be applied for a customer to qualify for a particular action, such as expanding a navigation bar to see additional options. In cases such as this one, you can use a `managed_impressions` action.

:::hint{type="info"}
Action templates with `managed_impressions` must be added to individual accounts. Contact your dedicated Customer Success Manager (CSM) for assistance.
:::

Action templates support a `managed_impressions` flag. When this flag is set to `true`, the action isn't recorded at decision time.

This flag allows you to set additional action conditions beyond those Monetate is able to evaluate. Even without action conditions, it allows the caller to detect the actual visibility of the action and record its impression accordingly.

For example, an action may adjust the display of options in a drop-down menu, but the customer must first click the menu to become eligible to see the action. This screenshot shows the Omni JSON Managed Impression action template configured for this scenario.

![The Omni JSON Managed Impression action template configured for an action that requires a customer to click a menu](https://dyzz9obi78pm5.cloudfront.net/app/image/id/6453fd87dabeb83466542b7e/n/experiences-omni-what-omni-json-managed-impressions.png)

When you make a request to the Engine API, the initial response contains the experience with managed impression action and a unique `impressionId` for the visitor in the session.

:::CodeblockTabs
Initial monetate\:decision\:DecisionRequest Response

```json
{
  "meta": 
  {
    "code": 200,
    "monetateId": "5.977810341.1521134874631"
  },
  "data": 
  {
    "responses": 
    [      
      {
        "requestId": "11111",
        "actions": 
        [          
          {
            "impressionId": "2.MTY3MTE3Ni4xLjE2MjE0MjcyODE",
            "json": 
            {
              "ClickedElement": "true"
            },
            "actionType": "monetate:action:OmnichannelJson",
            "actionId": 3813493,
            "isControl": true
          }
        ]
      }
    ]
  }
}
```
:::

Each action returned in the response includes two additional fields:

- The `impressionId` field contains an encoded string that must be passed back to Monetate when the customer qualifies for all front-end conditions associated with the action (for example, the customer has clicked a drop-down menu and is now eligible to see an action that modifies options within the menu).
- The `isControl` field contains a Boolean value that indicates whether the customer has been assigned to the control group for the action. Regardless of whether `isControl=true`, the `impressionId` value should be reported back to Monetate once the customer meets all eligibility criteria. However, if `isControl=true` then the action doesn't display for the visitor.

Once a customer meets all eligibility criteria, the `impressionId` value must be reported back to Monetate so that it can record the impression. The same `monetateId` or `deviceId` used in the initial request must be passed when recording impressions so that they can be associated with the customer's session. Multiple `impressionId` strings can be reported in the same Engine API call so long as they're associated with the same visitor.

:::CodeblockTabs
Example Follow-Up monetate\:record\:Impressions Request

```json
{
  "monetateId": "5.977810341.1521134874631",
  "channel": "a-12345678/d/example.test",
  "events": 
  [    
    {
      "eventType": "monetate:record:Impressions",
      "impressionIds": 
      [
        "2.MTY3MTE3Ni4xLjE2MjE0MjcyODE",
        "2.MbV8QjE1MTQ4MDg5MDA"
      ]
    }
  ]
}
```

Response

```json
{
  "meta": 
  {
    "code": 200,
    "errors": []
  },
  "data": 
  {
    "responses": []
  }
}
```
:::

