# Tealium

> Send events, look up visitor profiles, manage hosted data layers and track file imports and iQ publishes in Tealium.

App · 17 actions. Web page: https://docs.lodol.com/docs/integrations/tealium

## Actions

### Count omnichannel files

Count the omnichannel files with a prefix that were uploaded in a time range.

**Inputs**

- File prefix (`file_prefix`, text, required): The file prefix of the omnichannel file definition, such as sales_transactions.
- Start (`start`, date and time, required): Start of the time range.
- End (`end`, date and time, required): End of the time range.

**Outputs**

- `data` (object): The response from Tealium.

**Example output**

```json
{
  "data": {
    "count": 1
  }
}
```

### Delete a hosted data layer

Delete a hosted data layer object or JSON file.

**Inputs**

- Data layer (`datalayer_id`, text, required): The hosted data layer's name, such as product_catalog. Letters, numbers, dashes and underscores.
- File type (`file_type`, text): Store it as a JSON file instead of a data layer object. One of: `json`.

**Outputs**

- `data` (object): The response from Tealium.

**Example output**

```json
{
  "data": {
    "datalayer_id": "example",
    "deleted": true
  }
}
```

### Delete a visitor

Queue a visitor's profile for deletion, for a privacy request. Check the request with Get deletion status.

**Inputs**

- Visitor ID attribute (`attribute_id`, text, required): The visitor ID attribute to look the visitor up by, such as Email Address.
- Value (`attribute_value`, text, required): The visitor's value for that attribute, such as their email address.

**Outputs**

- `data` (object): The response from Tealium.

**Example output**

```json
{
  "data": {
    "transactionId": "example"
  }
}
```

### Find omnichannel files

List the status of each omnichannel file with a prefix uploaded in a time range.

**Inputs**

- File prefix (`file_prefix`, text, required): The file prefix of the omnichannel file definition, such as sales_transactions.
- Start (`start`, date and time, required): Start of the time range.
- End (`end`, date and time, required): End of the time range.

**Outputs**

- `data` (list): The response from Tealium.

**Example output**

```json
{
  "data": [
    {
      "_id": {
        "$oid": "example"
      },
      "account": "example",
      "created_at": {
        "$date": "example"
      },
      "file": {
        "line_count": 1,
        "name": "example",
        "size": 1,
        "source": {
          "type": "example"
        }
      },
      "profile": "example",
      "status": [
        {
          "lines_skipped": 1,
          "state": "example",
          "timestamp": {
            "$date": "example"
          }
        }
      ]
    }
  ]
}
```

### Get a hosted data layer

Get a hosted data layer's file name, size and when it last changed.

**Inputs**

- Data layer (`datalayer_id`, text, required): The hosted data layer's name, such as product_catalog. Letters, numbers, dashes and underscores.
- File type (`file_type`, text): Store it as a JSON file instead of a data layer object. One of: `json`.

**Outputs**

- `data` (object): The response from Tealium.

**Example output**

```json
{
  "data": {
    "file": "example",
    "lastModified": "example",
    "size": 1
  }
}
```

### Get a visitor

Look up a visitor's Customer Data Hub profile: their attributes, audiences and badges.

**Inputs**

- Visitor ID attribute (`attribute_id`, text, required): The visitor ID attribute to look the visitor up by, such as Email Address.
- Value (`attribute_value`, text, required): The visitor's value for that attribute, such as their email address.
- Use attribute names (`pretty_name`, true/false): Show attributes by their names rather than their numbers.
- Search (`search_priority`, text): Where to look: live data first, historical first, or only one. One of: `live_first` (Live first), `historical_first` (Historical first), `live`, `historical`.
- Only these attributes (`response_filters`, list): Only return these attribute IDs, up to 150.

**Outputs**

- `data` (object): The response from Tealium.

**Example output**

```json
{
  "data": {
    "audiences": [
      "example"
    ],
    "badges": [
      "example"
    ],
    "current_visit": {},
    "dates": {},
    "flags": {},
    "metrics": {},
    "properties": {},
    "visitor_id": "example"
  }
}
```

### Get an iQ profile

Get the iQ Tag Management profile's latest saved version, or another, with the parts chosen: tags, load rules, variables and more.

**Inputs**

- Include (`includes`, list): The parts of the profile to include. One or more of: `tags`, `loadRules`, `variables`, `extensions`, `events`, `versionIds`, `tags.templateList`, `tags.template`.
- Version (`publish_version`, text): The version to get (YYYYMMDDHHMM). Leave empty for the latest.

**Outputs**

- `data` (object): The response from Tealium.

**Example output**

```json
{
  "data": {
    "account": "example",
    "creation": "example",
    "environmentVersions": {},
    "events": [
      {}
    ],
    "extensions": [
      {}
    ],
    "libraryType": "example",
    "loadRules": [
      {}
    ],
    "minorVersion": "example",
    "parentVersion": "example",
    "profile": "example",
    "tags": [
      {}
    ],
    "variables": [
      {}
    ],
    "version": "example",
    "versionDetails": {
      "environmentVersions": {},
      "notes": "example",
      "user": "example"
    },
    "versionIds": [
      "example"
    ],
    "versionTitle": "example"
  }
}
```

### Get an iQ publish

Get who published an iQ revision, when, with what comment and to which environments.

**Inputs**

- Revision (`revision_id`, text, required): The revision, named by when it was published (YYYYMMDDHHMM).

**Outputs**

- `data` (object): The response from Tealium.

**Example output**

```json
{
  "data": {
    "account": "example",
    "comment": "example",
    "created_by": "example",
    "name": "example",
    "profile": "example",
    "revision_id": "example",
    "targets_published": [
      "example"
    ],
    "time_created": "example"
  }
}
```

### Get an omnichannel file's status

Get how far an imported omnichannel file has got: downloaded, processed, and lines skipped.

**Inputs**

- File name (`filename`, text, required): The file's full name, such as sales-transaction_2024feb4.csv.

**Outputs**

- `data` (object): The response from Tealium.

**Example output**

```json
{
  "data": {
    "_id": {
      "$oid": "example"
    },
    "account": "example",
    "created_at": {
      "$date": "example"
    },
    "file": {
      "line_count": 1,
      "name": "example",
      "size": 1,
      "source": {
        "type": "example"
      }
    },
    "profile": "example",
    "status": [
      {
        "lines_skipped": 1,
        "state": "example",
        "timestamp": {
          "$date": "example"
        }
      }
    ]
  }
}
```

### Get deletion status

Check whether a visitor deletion is pending, done or failed.

**Inputs**

- Transaction ID (`transaction_id`, text, required): The transaction ID Delete a visitor answered with.

**Outputs**

- `data` (object): The response from Tealium.

**Example output**

```json
{
  "data": {
    "status": "example",
    "transaction_id": "example"
  }
}
```

### List failed data layer uploads

List hosted data layer uploads that failed, up to 5,000, so they can be sent again.

**Inputs**

- Start (`start`, date and time): Start of the time range.
- End (`end`, date and time): End of the time range.

**Outputs**

- `data` (object): The response from Tealium.

**Example output**

```json
{
  "data": {
    "account": "example",
    "count": 1,
    "failedUploads": [
      {
        "date": "example",
        "file": "example"
      }
    ],
    "profile": "example"
  }
}
```

### List hosted data layers

List the hosted data layer objects and JSON files of the profile, up to 1,000 at a time.

**Inputs**

- Continuation token (`continuation_token`, text): The continuation token from the last page, for the next 1,000.

**Outputs**

- `data` (object): The response from Tealium.

**Example output**

```json
{
  "data": {
    "continuationToken": "example",
    "fileStatuses": [
      {
        "file": "example",
        "lastModified": "example",
        "size": 1
      }
    ],
    "isTruncated": true
  }
}
```

### List iQ publishes

List the profile's published iQ Tag Management revisions, newest first.

**Inputs**: None.

**Outputs**

- `data` (object): The response from Tealium.

**Example output**

```json
{
  "data": {
    "revision_ids": [
      "example"
    ]
  }
}
```

### List visitor ID attributes

List the visitor ID attributes (such as Email Address) visitors can be looked up by.

**Inputs**: None.

**Outputs**

- `data` (object): The response from Tealium.

**Example output**

```json
{
  "data": {
    "attributes": [
      {
        "id": "example",
        "name": "example"
      }
    ]
  }
}
```

### Send an event

Send an event to Tealium's Customer Data Hub, such as a purchase or a sign-in.

**Inputs**

- Event name (`tealium_event`, text, required): The event's name, such as user_login or purchase.
- Visitor ID (`tealium_visitor_id`, text): The visitor's anonymous ID. For a known visitor, Tealium expects `__account_profile__attributeid_value__`.
- Data source key (`tealium_datasource`, text): The data source key the event belongs to.
- Environment (`tealium_environment`, text): The environment the event is for. One of: `prod`, `qa`, `dev`.
- Event data (`attributes`, object): The event's data, by name, such as email_address or order_total.

**Outputs**

- `data` (object): The response from Tealium.

**Example output**

```json
{
  "data": {
    "sent": true
  }
}
```

### Update a hosted data layer

Replace a hosted data layer's values. Changes can take up to an hour to reach Tealium's servers.

**Inputs**

- Data layer (`datalayer_id`, text, required): The hosted data layer's name, such as product_catalog. Letters, numbers, dashes and underscores.
- File type (`file_type`, text): Store it as a JSON file instead of a data layer object. One of: `json`.
- Data (`data`, object, required): The data layer's values, by name, such as sku and price. Names can't hold a period.

**Outputs**

- `data` (object): The response from Tealium.

**Example output**

```json
{
  "data": {
    "datalayer_id": "example",
    "saved": true
  }
}
```

### Upload a hosted data layer

Upload a hosted data layer object (or JSON file) of values. Changes can take up to an hour to reach Tealium's servers.

**Inputs**

- Data layer ID (`datalayer_id`, text, required): The hosted data layer's name, such as product_catalog. Letters, numbers, dashes and underscores.
- File type (`file_type`, text): Store it as a JSON file instead of a data layer object. One of: `json`.
- Data (`data`, object, required): The data layer's values, by name, such as sku and price. Names can't hold a period.

**Outputs**

- `data` (object): The response from Tealium.

**Example output**

```json
{
  "data": {
    "datalayer_id": "example",
    "saved": true
  }
}
```
