Skip to content
Last updated

Setting Up Parent Segments for Real-Time

Using the Data Workbench, data engineers can configure events, ID stitching keys, and attributes for a parent segment to support real-time journey objects in Audience Studio. After creating these real-time enabled parent segments, marketers can use the key events and their associated filters, which are configured from the TD Console Event Configuration UI, to establish real-time journey objects within the Audience Studio Real-time Journey Editor. These objects include entry criteria, milestones, and goals. Batch attributes can also be specified in triggered activation configurations for email campaigns.

Process Overview

Here is the high-level process for creating a real-time enabled parent segment:

  1. If you do not have a parent segment that contains the data you need to support decisioning in your real-time use case, use the Data Workbench (Legacy) to create and run a parent segment.
  2. Contact technical support to enable your parent segment for real-time.
  3. After your parent segment has been enabled for real-time, use the Data Workbench to perform the real-time event configuration on the parent segment.

The real-time configuration process consists of using Data Workbench in the TD Console to specify the events and data that will be needed for your use case's decisioning.

rtConfigTabs

Requirements

  • Each parent segment that you are working with needs to be enabled for real-time. Contact Customer Support to have them enable the Real-time features for your parent segments.

Limitations

  • You can only define a maximum of 100 event tables.
  • You can only define a maximum of 100 IDs for ID Stitching.
  • There is not a numerical limit on the number of event definitions you can define. However, the aggregate length of all the filters used in these definitions cannot exceed 1000 characters.

Real-time Configuration Pages

To navigate to Real-time Configuration pages:

  1. Open TD Console.
  2. From TD Console (Legacy), select the diamond icon diamondIcon to display the TD console.
  3. From the left column, select the Data Workbench icon dataWorkbenchIcon.
  4. From the Parent Segments page, select the parent segment you want to configure for real-time.
  5. On the Real-time Configuration row select Configure settings.

If the Real-time Configuration row is not visible, or the row is visible but Real-time is not available for the Parent Segment, contact customer support to enable the Real-time features on your parent segment.

The Real-time Configuration page displays:

realtimeConfigPage

Using these pages you can perform the following tasks:

Configure Event Tables

On the Event Tables page, you specify the tables (or data sources) that are important to your real-time use case. That is, whenever streaming data is sent to the tables you have specified, that data will also be made available to the real-time system. For example, in this screenshot, the real-time configuration is specifying that only new streaming data that comes into the abandon_cart or hotel_checkin tables that are in the retail_golden database should be forwarded to the TD real-time system.

To specify event tables:

  1. From the Event Tables page, select the + Add streaming event table option.

  2. From the Database drop-down list select the database.

  3. From the Table drop-down list select the table.

  4. Repeat steps 1-3 until you have identified all your tables.

  5. Select Launch to configure the real-time parent segment events.
    You can add or delete as many tables as you need until you select the Launch. After you select Launch, you will not be able to delete any of the tables specified. You can, however, add additional tables later up to a maximum of 100.

  6. Confirm you want to continue by selecting Launch.

After selecting Launch, a banner displays saying, "Configuration is in progress." You cannot perform any action on the Real-time configuration pages until the process completes.

The TD Console displays the "Configuration launched successfully" banner.

Configure Event Definitions

After you have specified your event tables, you can specify event definitions or filter rules that will refine the real-time data you're interested in. In this screenshot, an event definition specifies that data being added to the hotel_name column of the hotel_checkin table should be forwarded if the hotel name is "Park Hotel."

To create an event definition:

  1. From the Event Definitions page, select + Create new event.
  2. Enter a name for the event definition.
  3. From the Source Table drop-down menu, select your table.
  4. (Optional) Select add filters.
    1. From the Filter rule drop-down, select your column.
    2. In the "Input a value" field, specify the value for the filter.
    3. Add as many additional filters as you need.
  • The filters you add will be evaluated with a logical AND. That is, the conditions of every filter must be met for the event to be processed.
  • There is not a numerical limit on the number of event definitions you can define. However, the aggregate length of all the filters used in these definitions cannot exceed 1000 characters.
  1. Select Create.
    After you create the event definition, you will not be able to edit it or delete it.
  2. Confirm you want to create the event definition by selecting Create.

About Comparison Operators for Event Definition Filters

Here are the comparison operators that can be used in Event Definition filters:

TD Console LabelComparisonOperatorsComments
= isequality==
≠ is notinequality!=
is nullequals NULL==null
is not nulldoes not equal NULL!=null
> greater thangreater than>Only use with numeric column types.
< less thanless than<Only use with numeric column types.
≥ at leastgreater than or equal to>=Only use with numeric column types.
≤ at mostless than or equal to<=Only use with numeric column types.
regexsatisfies the regular expressionOnly use with string column types.
not regexdoes not satisfy the regular expressionOnly use with string column types.

Configure Attributes

Some of the new streaming data that comes in Treasure Data may not contain attribute data that you may need for your real-time decisioning. For these cases, you can specify attributes that should be imported from the parent segment and be made available to the real-time system. In this screenshot, the name and email attributes have been selected.

All attributes from the tables in the Parent Segment are display in the left-hand column of the Import Attributes modal and available to be imported.

To import attributes:

  1. From the Attributes page, select + Add Attributes.

  2. From the left column select one or more attributes, and then select the > button to add it.
    As you build the list of attributes you can also select the < button to remove an attribute.

  3. Select Import.
    After you import attributes, you will not be able to delete them. You can, however, add additional attributes later.

  4. Confirm you want to import the attributes by selecting Import.

Important Limitation: Real-time List Attributes and ID Stitching Keys When configuring a Real-time Attribute(List) with the "Distinct list" option enabled, it's critical that the ID Column selected for the attribute is not an existing ID stitching key (for example, td_client_id). If an ID stitching key is used as the ID Column for a Real-time Attribute(List) with "Distinct list," the attribute will not collect all distinct values as expected. Instead, due to how ID stitching works, the attribute will only store the latest value associated with that stitched ID, effectively behaving like a "Last" aggregation.To ensure all distinct values are captured, choose an ID Column that is unique to the items you want to list (like product_id for an abandoned cart scenario) and is not configured as an ID stitching key.

Configure ID Stitching

You can define ID stitching rules by selecting the keys to be used to identify unique profiles. Generally, you want to select ID keys that are most likely to uniquely identify a profile or a customer. Keys like email, telephone number, and TD ID are often used as keys.

The process for configuring ID Stitching involves two steps:

  1. Defining ID stitching keys and launching the configuration.
  2. Selecting a Profile Key and re-launching the configuration.

You are required to Define a Profile Key to facilitate retrieval of uploaded batch attributes.

Define ID Stitching Keys

  1. From the ID Stitching page, select + Create ID Stitching key.
  2. Enter the name of the table column to be used as a stitching key.
  3. (Optional) Enter a regular expression that can test for a valid key value.

The regular expression pattern is specified between the anchors ^ and $, and it should not contain quotation marks or forward slashes. Here are some examples of valid regular expressions for this field: ^[a-zA-Z ]*$ , ^\\d+$ , ^\S+@\S+\.\S+$ , `^(?=.[a-zA-Z])(?=.[0-9])[A-Za-z0-9]+$. As the console does not validate regular expressions and cannot be edited once defined, Treasure Data recommends that you use third-party tools to verify that your regular expression matches as expected. Contact customer support if you need assistance correcting an invalid regular expression. 4. (Optional) Enter text that would constitute an invalid key value. 5. (Optional) Select the Workflow only checkbox.
Selecting this option sets an internal flag that tells the system not to look for keys in the incoming data.Use this setting in cases where ID keys are generated by batch workflows. 6. Select Launch.
After you define an ID Stitching key, you will not be able to delete it. You can, however, add additional keys later up to a maximum of 100.

  1. Confirm that you want to launch the ID Stitching configuration by selecting Launch.

After selecting Launch, a banner displays saying, "Configuration is in progress." You will not be able to perform any action on the Real-time configuration pages until the process completes.

Define a Profile Key

After you have successfully configured at least one ID Stitching key, you can then configure the Profile Key and, when data is uploaded, this will be used as a lookup key in the database. The profile key needs to be a both an ID Stitching key and be an attribute of the segment. (It cannot be a key from a behaviors column.) If an ID stitching key that meets these criteria has been created and launched, it will become available in the Table Column drop-down menu in the Profile Key section of the modal.

To create a profile key:

  1. From the ID Stitching page, select the Table column drop-down arrow in the Profile Key section.

  2. Select a Profile Key.

  3. Select Launch.

  4. Confirm that you want to launch the ID Stitching configuration by selecting Launch.

After you have selected a Profile Key, you can change it by selecting and Launching a new Profile Key.

After selecting Launch, a banner displays saying "Configuration is in progress." You will not be able to perform any action on the Real-time configuration pages until the process completes.

FAQ

Q: What types of tables can I define as Event Tables?

A: An Event Definition can use a streaming table as its data source. While you can configure any tables to be used by real-time key events, internally generated tables (e.g., cdp_audience_NNN.behavior_foo) are not available.

Q: Am I required to configure Event Definitions?

A: No.Event definitions are automatically created after you finish configuring your Event Tables. These automatically created Event Definitions are displayed in the format <database.table> and are unfiltered. You can optionally create additional event definitions by adding any filters to the configured event tables.

Q: Is there a possibility of deployment failure?

A: In rare cases deployment can fail due to invalid configuration or internal system issues. Since deletion of configurations is not permitted from the UI, contact Customer Support to resolve any deployment failure issues.

Q: Is there a recommended order in which I should define an Event Configuration?

A: Event tables need to be configured first. Event definitions, attributes, and ID Stitching can be configured in any order afterward. The preferred sequence is

  1. Event Tables
  2. Event Definitions (optional)
  3. Attributes
  4. ID Stitching keys
  5. Profile key

Q: What is the expected time for a Real-time Configuration to be launched successfully?

A: Launching an Event Configuration can vary between a few minutes and several hours. Launch time depends on the number and size of the batch attributes being uploaded to the real-time system.

Q: What are the permissions I should have in order to access the Event Configuration UI?

A: In order to edit the real-time Event Configuration, your user ID is required to have full permissions to the parent segment. If you have "view only" permissions, you can view the Event Configuration but cannot edit it.

Q: If I delete tables or columns from the parent segment configuration, what error messages will be there in RT event configuration UI?

A: There are no significant implications for deleting tables or columns from the parent segment. If the event data is continuously sent to the deleted tables or columns, the real-time system will continue to process the events.

Q: Can I delete the Real-time Event Configuration entirely and start over from scratch?

A: No. If for some reason your configuration has become invalid, contact Customer Support to determine alternative solutions.

Q: Can I Launch an Event Configuration without setting up any event tables?

A: Yes. You can launch an Event Configuration without specifying event tables, event definitions, attribute imports, or ID stitching rules. However please note following:

  • If you don't specify event tables, marketers won't be able to create real-time journeys in Audience studio.
  • If you don't specify ID-stitching keys, no customer profile data will be stored in the real time system.
  • If you specify import attributes, but do not configure a Profile Key, batch attributes will not be uploaded to the real-time system.