{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"redocly_category":"Products","product_name":"Engage Studio","type":"markdown"},"seo":{"title":"Subscription Events Table | Engage Studio","description":"Reference for the Engage Studio subscription events table schema, including unsubscribe event tracking and td_log_* custom non-PII identifier columns.","siteUrl":"https://docs.treasuredata.com","lang":"en-US","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"subscription-events-table","__idx":0},"children":["Subscription Events Table"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["One-Click Unsubscribe automatically records all unsubscribe events in a dedicated table within your email domain's database. This table allows you to track unsubscribe activity, analyze trends, and build workflows to exclude unsubscribed users from future campaigns."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"database-and-table-location","__idx":1},"children":["Database and Table Location"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Your subscription event data is stored in your Treasure account in the following location:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Database"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["delivery_email_{your-domain}"]}," (e.g., ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["delivery_email_example_com"]},")"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Table"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["subscription_events"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["subscription_events"]}," table is automatically created in the same database as your email delivery events when you enable TD Managed Unsubscribe."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"event-schema","__idx":2},"children":["Event Schema"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["subscription_events"]}," table contains the following fields:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Field"},"children":["Field"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["profile_identifier_value"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The recipient's email address"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["profile_identifier_name"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Always \"email_address\" (for future multi-channel support)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["campaign_id"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Unique ID of the campaign"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["campaign_name"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Name of the campaign"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["group_id"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ID of the subscription group (currently always NULL for global unsubscribe)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["group_name"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Name of the subscription group (currently always \"Global\")"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["action"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Currently always \"opt-out\" (opt-in functionality will be available in a future release)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["action_source"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["How the unsubscribe was triggered: \"post\" (HTTPS) or \"mailto\" (email)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["channel"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Currently always \"email\" (SMS and push channel support will be available in future releases)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["task_id"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Unique identifier for the email sent"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["user_agent"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Browser/device information (HTTPS only)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ip_address"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["IP address of the user (HTTPS only)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sender"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Email address of the sender"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["received_time"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["timestamp"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["When TD received the unsubscribe request"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["time"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["timestamp"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Automatically added by Plazma"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"integration-with-audience-studio","__idx":3},"children":["Integration with Audience Studio"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To use unsubscribe data in your campaigns, you need to integrate it as Attribute properties in your Parent Segment:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Create a table of unsubscribed users from the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["subscription_events"]}," table"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Create an Attribute table with the opt-out flag"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Register this table as an Attribute table in your Parent Segment"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Use the Attribute in Audience Studio to filter out unsubscribed users when creating campaign audiences"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"sql","header":{"controls":{"copy":{}}},"source":"-- Create a table of unsubscribed users\nCREATE TABLE unsubscribed_users AS\nSELECT\nemail, latest_action, last_updated, cast(1 as bigint) is_opt_out\nFROM (\n  SELECT\n    profile_identifier_value AS email,\n    MAX_BY(action, received_time) AS latest_action,\n    MAX(received_time) AS last_updated\n  FROM subscription_events\n  WHERE group_name = 'Global'\n  GROUP BY profile_identifier_value\n  HAVING MAX_BY(action, received_time) = 'opt-out'\n) t1\n","lang":"sql"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"custom-non-pii-identifier-columns-with-the-td_log_-prefix","__idx":4},"children":["Custom Non-PII Identifier Columns with the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["td_log_"]}," Prefix"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For strict security environments that prohibit storing raw email addresses in unsubscribe logs, the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["subscription_events"]}," table supports custom, non-PII identifier columns via the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["td_log_"]}," prefix. When an activation defines output mappings whose destination column names start with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["td_log_"]}," (for example, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["td_log_member_id"]},"), those columns are automatically added to the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["subscription_events"]}," table and populated for each unsubscribe event generated by that activation."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This enables unsubscribe management and analysis using non-PII identifiers — such as internal member IDs, CRM IDs, or hashed identifiers — instead of (or alongside) raw email addresses. The same ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["td_log_*"]}," column values also appear in the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["events"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["error_events"]}," tables, so you can correlate unsubscribes with deliveries, bounces, and errors without joining on email addresses."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For setup instructions, limits (maximum of 5 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["td_log_*"]}," fields per activation, ASCII-only column names, 256-character column-name limit), and guidance on not mapping PII into ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["td_log_*"]}," fields, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/marketing-cloud/engage-studio/channels/email/email-delivery-events-table"},"children":["Email Delivery Events Table"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"related-documentation","__idx":5},"children":["Related Documentation"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/marketing-cloud/engage-studio/channels/email/one-click-unsubscribe"},"children":["One-Click Unsubscribe Management"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/marketing-cloud/engage-studio/channels/email/email-delivery-events-table"},"children":["Email Delivery Events Table"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/marketing-cloud/engage-studio/channels/email/email-sender-configuration"},"children":["Email Sender Configuration"]}]}]}]},"headings":[{"value":"Subscription Events Table","id":"subscription-events-table","depth":1},{"value":"Database and Table Location","id":"database-and-table-location","depth":2},{"value":"Event Schema","id":"event-schema","depth":2},{"value":"Integration with Audience Studio","id":"integration-with-audience-studio","depth":2},{"value":"Custom Non-PII Identifier Columns with the td_log_ Prefix","id":"custom-non-pii-identifier-columns-with-the-td_log_-prefix","depth":2},{"value":"Related Documentation","id":"related-documentation","depth":2}],"frontmatter":{"seo":{"title":"Subscription Events Table | Engage Studio","description":"Reference for the Engage Studio subscription events table schema, including unsubscribe event tracking and td_log_* custom non-PII identifier columns."}},"lastModified":"2026-06-01T09:09:59.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/products/marketing-cloud/engage-studio/channels/email/subscription-events-table","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}