Data Views

Marketing Cloud Engagement's system data views: what each one holds, how far back it goes and which column joins one view to another.

An email send went out months ago and nobody knows what happened to it: who received it, who opened it, who it bounced on. Where does Marketing Cloud Engagement keep that history, and how far back can you still ask?

What a data view is

The answer is the data views: tables the system provides. Help introduces them like this: they are queried from Automation Studio “for up to six months of Marketing Cloud Engagement subscriber and journey information”, and an SQL (structured query language) statement can be written “against a data extension or the data views provided in the system”. A subscriber is the person who has opted to receive communications from the organization on a specific channel; the full definition belongs to the Contact Builder page.

Two marks separate it from a data extension. A data extension is, in Help’s words, “a table that contains data that you provide”, and the Data Extensions page covers it: the table is created by whoever will use it, with the fields they choose. A data view, by contrast, is provided by the system, and its article publishes its columns one by one, with their data type.

The only column change the articles cited here document is made by the system itself: in Enterprise 2.0 accounts, which this node’s page on business units defines, creating profile attributes adds columns to the _EnterpriseAttribute table.

How a view is reached

Twelve of the thirteen view articles this page cites repeat the same formula, “query the _X data view in Automation Studio”, and the thirteenth, the one for _Sent, says “by querying the _Sent data view”. The SQL Query activity dialog, by contrast, documents only browsing the account’s tables by folder. This page declares it as its own reading: a data view is reached by writing its name into a query. Its sources document no other route, nor do they say that Contact Builder does not show them, which this page does not claim either.

Writing, scheduling and debugging that query belongs to this node’s page on SQL queries, which also keeps the target-table rule. A trace of that is left in the view: every column publishes, beside its data type, a “Data Extension Data Type”, the type of the field that receives the result.

The Enterprise 2.0 business unit is a case apart. Eleven of the thirteen views name it in the same note and three of them are confined to its parent account; what it is, and the vocabulary of the hierarchy — Enterprise level, enterprise account, parent account — are set by this node’s page on business units. The net position of two articles: the “SQL Reference” publishes, among its known issues, that “only data extensions are accessible for queries written at the Enterprise 2.0 business unit”, and the Data Views article says that enterprise-level event data is found by querying the views in the sending account.

The views Help documents

The index lists twenty-four data views. This page develops the thirteen that have an article of their own among its sources.

View What it holds, according to its article
_Job The email send job data. It returns every job in the current business unit and does not categorise the results by send method
_Sent The subscribers the email was sent to
_Open The account’s email opens
_Click The clicks, with the link’s URL, its name and whether the event is unique or repeated
_Bounce The bounces, with category, type, code and the reason relayed by the mail system
_Complaint The complaints about emails sent from the account
_Unsubscribe The unsubscribes related to the email sends
_FTAF The messages forwarded to a friend (Forward To A Friend, FTAF)
_Subscribers The email subscribers and their statuses. Subscriber attributes are not available, and it returns results at the Enterprise level only
_ListSubscribers The subscribers on the account’s lists, with the method they were added by and the date
_BusinessUnitUnsubscribes The unsubscribes at the enterprise level. It runs on the parent account only
_ReconcilableDispositionView The reconciliation data of the sends: its article does not define what a “reconciliation disposition” is
_EnterpriseAttribute The subscribers and their profile attributes. Enterprise 2.0 accounts only, and the parent account only

The remaining eleven are out of scope: automation health, journeys, MobileConnect SMS (short message service) sends, content shared with Social Forward and GroupConnect contacts.

How far back each one goes

This is what decides whether an audit arrives in time, and Help does not answer the same way for all of them.

View What its article publishes
_Sent “You can query only records from the last six months”
_Open, _Click, _Bounce, _Complaint “… data is retained for six months”, one sentence per view
_FTAF “Forward data is retained for six months”
_ReconcilableDispositionView “Data is retained for seven days”
_Unsubscribe Its article publishes no period for the view. What gives six months is the StatusChanges extract, which is not a view but an extract file: “The StatusChanges file shows instances of change in a subscriber’s status”, and its own article says “Only data from the most recent six months is available”
_Job, _Subscribers, _ListSubscribers, _BusinessUnitUnsubscribes, _EnterpriseAttribute Their article publishes no period, and this page gives them none

The index sets the general frame, “up to six months”, adds that some allow more to be retrieved, without saying which, and warns that large queries take longer and can affect performance.

Two precisions about reading the data. Eleven of the thirteen views publish the same sentence — dates and times are stored in Central Standard Time, with no daylight saving, and to see them in your own zone you set the user preference —; _ReconcilableDispositionView and _EnterpriseAttribute do not publish it. And click and open tracking data, says the index, is rounded to the nearest second; of the others it says nothing, and this page does not extend it.

And a third, of _Sent and of no other: it does not update in real time, and its article warns that several minutes or several sends can pass before a new message is available.

Which column joins one view to another

Seven of the thirteen views — _Sent, _Open, _Click, _Bounce, _Complaint, _Unsubscribe and _FTAF, which this page calls event views with a phrase of its own — carry the same four send-context columns: JobID, the number of the send job; ListID, that of the list used; BatchID, that of the batch; and SubscriberKey, the key of the affected subscriber.

Of those four, two pull in different directions. JobID points towards the send, which is what _Job describes, where Help marks that field as indexed. SubscriberKey points towards the person: it is the column with which _Subscribers identifies the subscriber and publishes its Status, “active, held, unsubscribed, or bounced”. That the two columns of the same name hold the same value is a reading of this page.

The two columns an audit of one send needsA data view is a table provided by the Marketing Cloud Engagement system itself and queried from Automation Studio. Auditing one send runs through three stages and needs two different columns. The first stage is the _Job view, which according to Salesforce Help holds the email send job data and marks the JobID column as an indexed field. The second is the seven event views, _Sent, _Open, _Click, _Bounce, _Complaint, _Unsubscribe and _FTAF, which this page groups that way because they all carry the same four send-context columns. Two of them pull in different directions: JobID identifies the send job and so locates the specific send, while the subscriber key, SubscriberKey, identifies the affected person. The third stage is the _Subscribers view, which this page joins on that key, a reading of its own because Help describes that column in two different ways, and which publishes the subscriber's status: according to Help, active, held, unsubscribed or bounced._Job: the send,with JobID indexedSeven event views,with the send's JobIDEvery row alsocarries SubscriberKey_Subscribers: thesubscriber's status

Two warnings before using those columns. First, the date of the event is not named the same way in all of them: it is EventDate in the first six event views and TransactionTime in _FTAF, which affects any filter on dates. Second, a discrepancy this page records without resolving, because neither article carries a publication date nor is more specific than the other: the event articles describe SubscriberKey as “the subscriber key for the affected subscriber”, and those of _Subscribers and _BusinessUnitUnsubscribes describe the same column as “a potential alternate identifier for subscribers” that “defaults to the value of Email Address”. The Contact Builder page establishes that contact key and subscriber key are the same value and that the key should not be an email address. Check it in the account.

Of deletion, these sources document a single effect, of _Sent: “you can’t view data for a deleted subscriber”. The rest is covered by this node’s page on contact deletion.

When a view answers, and when it does not

The row split is this page’s own reasoning: none of its sources publishes a decision table.

Question What this page’s sources say
Who was this email sent to, and who opened it or clicked? _Sent, _Open and _Click, within the six months of each
Why did it not reach this address? _Bounce, with its category, type, code and the mail system’s reason
Why did this subscriber stop receiving? _Unsubscribe. Its article adds that marking the email as spam or filing a complaint has the system process the response and mark the subscriber as unsubscribed, and that this is reflected in the view
What was the send called and when was it scheduled? _Job, which does not categorise the results by send method
What happened fourteen months ago? The views that publish a period give six months, and the index only says that some allow more, without saying which; of those that publish no period, these sources say nothing
What happened to an already deleted subscriber? _Sent says its data cannot be viewed; the rest belongs to this node’s page on contact deletion
And in an enterprise account? With care: if “Add subscribers to this list” is not selected for a triggered send — the one that sends a message to an individual subscriber in response to an action of theirs — enterprise-level views do not include sends, opens, clicks, unsubscribes, Forward To A Friend data or bounces, and they have to be queried in the sending account. The split between accounts, and the names of the hierarchy, are covered by this node’s page on business units
Can the result be stored inside the view itself? That is not what Help documents: the target of a query is a data extension

Example: auditing a private bank’s quarterly report

A private bank sends a quarterly portfolio report by email. The client identifier, a Text field, is its contact key, and contact key and subscriber key are the same value, as the Contact Builder page establishes. Two months later, compliance asks what happened to last quarter’s send. The case is invented, and the order of the steps is this page’s proposal, not a sequence Help recommends.

  1. Locate the send in _Job. It gives its name, its subject and its scheduled and delivery times — the latter shows as NULL for any triggered send — and the JobID, which Help marks as an indexed field.
  2. See who it was sent to and who it bounced on. With that JobID, _Sent gives the subscribers the email was sent to — sent is not delivered: the delivery time comes from _Job — and _Bounce the bounces, with their category, type, code and reason.
  3. Measure the reading. _Open and _Click carry the same JobID; _Click adds the URL and the link’s name, and marks whether the event is unique or repeated.
  4. Explain the unsubscribes. _Unsubscribe collects the ones from the send. Worth remembering that a complaint or a spam mark ends, according to Help, in an unsubscribe reflected in the view.
  5. Check the state each person ended in. With SubscriberKey, _Subscribers gives the Status: active, held, unsubscribed or bounced. Mind this: it returns results at the Enterprise level only and not for child units, so in a bank with several it does not work as it stands.

One limit of the example itself: the period rules. At six months the views that publish a period no longer return those rows, so the report has to have been stored in a table of your own before then.

Before production

  1. Confirmed which views the audit needs, and that the query names them with their leading underscore (see “How a view is reached” and this node’s page on SQL queries).
  2. Checked the period of every view used, and planned a dump of your own for whatever has to last longer (see “How far back each one goes”).
  3. Time zone settled: the eleven views that publish it give Central Standard Time with no daylight saving, and the report is read in another (see “How far back each one goes”).
  4. Checked in the account what SubscriberKey holds before joining views on that column (see “Which column joins one view to another”).
  5. Used TransactionTime and not EventDate when filtering dates in _FTAF (see “Which column joins one view to another”).
  6. Verified, in an enterprise account, whether “Add subscribers to this list” was selected on the triggered sends before treating an enterprise-level query as complete, and read this node’s page on business units about Enterprise 2.0 (see “When a view answers, and when it does not”).
  7. Accepted that _Sent does not update in real time when auditing a send that has just gone out (see “How far back each one goes”).

Official sources

Back to the knowledge base