Build Segments

A segment defines a specific attribute profile that can be used to initiate marketing campaigns using the list of customers that match that profile.

Use the visual editor in the Segments tab to easily build a segment from a series of drop-downs and picklists. As you build the attribute profile refresh segment insights to see how many customers match and to see how much value they bring to your business. When the segment is ready, activate it, and then use it to initiate marketing campaigns.

About the Segments page

The Segments page contains a list of active segments along with recommended segments highlighted across the top of the page.

The Segments page.

Summary page

The Summary page highlights the most important information about a segment, including:

  • How much opportunity does this segment have?

  • Which channels should I engage on?

  • What is the predicted revenue for this segment?

Use the information on the Summary page to help determine the best way to initiate a marketing campaign.

A summary page available after a segment is activated.

Each Summary page contains the following details:

  1. The number of unique customers.

  2. The number of customers who have been active within the last year.

  3. The amount of revenue generated from these customers within the last year.

  4. The number of customers who are reachable.

  5. Revenue statistics, including historical revenue and predicted revenue trends.

    Tip

    Historical revenue represents the sum of order revenue for all customers who made at least one purchase during the previous year.

  6. The channels through which this segment has customer opportunity.

  7. Segment insight charts for customer behaviors and customer attributes. These charts have a configurable date range and up to six may be selected. Click the Actions menu, and then select Customize charts to choose up to six charts for customer behaviors and for customer attributes.

  8. The list of customers who belong to this segment.

Customers page

The Customers page shows the columns and tables from which customer data for this segment is available.

How segments work

The Segment Editor is the user interface for building segments in AmpIQ. This editor uses a series of drop-downs, picklists, conditions, and values to define an attribute profile. Refresh segment insights to see how many customers match the profile, and then active it as a segment.

The Segment Editor is located within the Segments page in Amperity.

The Segment Editor is available from the Segments page. Click Create from the Segments tab to open the editor, and then start building your segment.

Follow this sequence when building a segment:

  1. Give your segment a name.

  2. Select a table that contains the attributes you want to use, and then use the drop-downs, picklists, conditions, and values to define the attribute profile.

    Note

    The Customer_360 table is the default. For many segments it’s the only table you will need.

  3. When more than one attribute is present within an attribute group use AND or OR to filter values on more than one condition.

  4. Click Add criteria to add attributes to an attribute group.

  5. Click Add section to add additional attribute groups.

    Each attribute group has the same requirement for using AND or OR to filter values. There is another AND versus OR choice that must be made in-between each each attribute group.

    Note

    When first adding a segment criteria, the filter value is defaulted to AND. To change the default AND filter value to the OR filter value, click the AND button. Click the AND or OR buttons to change the filter value.

  6. For each attribute group that is added to the segment, select the database table that contains the attributes, and then select attributes.

    Tip

    Any table that is listed in the lower right may be used to build the attribute profile. Open the Data Explorer to learn more about the individual attributes within these tables.

  7. To view updated segment insights based on the currently-defined attributes, click REFRESH. This will validate the segment, after which segment insights are updated to match the condition-value pairs associated to all of the attributes in the segment.

  8. When the segment returns the parameters that meets the goals for your campaign, click ACTIVATE.

Segment names

A good segment name is clear and concise, is not longer than necessary, uses patterns to help lists of segments stay organized, and considers how it might be represented in downstream workflows, such as lists of segments in the Campaigns page in Amperity, but also external systems such as Braze, Campaign Monitor, Facebook Ads, Google Ads, Klaviyo, HubSpot, and Mailchimp.

Attributes

You can add attributes to your segment by selecting individual attributes from tables or by selecting from a series of pre-configured transactional behavior attributes.

A segment

Transactional Behaviors

Marketers use purchase activities to gather information about how customers are (or are not) interacting with their brands and to build audiences around ideas like first orders, repeat orders, most frequently ordered, total value or orders, who has purchased and who has not purchased.

You can apply the following transactional behaviors to a segment to gather information on the specific ways customers interact with your brand.

All transactional behavior attributes have a set of common filter attributes that are available. Use these to filter by brand, channel, product catalogs, and stores.

Note

Tenants must use Amperity standard field names to access this functionality.

First order

First Order returns a list of customers who made their first order during your chosen date range. For example, return all customers whose first order was during the previous 12 months:

Customers who bought a blue shirt within the previous 12 months.

After you specify a date range you may apply filters to associate first purchases with specific products, brands, channels, and stores. For example, return all customers who purchased a blue shirt from your website.

Tip

For more information about how First Order works, including an explanation of the SQL that runs behind the Segment Editor, review the First Order topic in the Amperity A-Z reference.

Has not purchased

Has Not Purchased returns all orders that occurred during your chosen date range, and then identifies all of your customers that did not make a purchase within that date range. For example, return all customers who have not purchased within the previous 3 months:

Find which customers have not interacted with products, channels, or brands during the specified date range.

After you specify a date range you may apply filters to focus in on specific products, brands, channels, and stores, i.e. “who hasn’t purchased a specific product by a specific brand from a specific channel or store.” For example, return a list of customers who have not purchased a wool product online during the previous 3 months.

Tip

For more information about how Has Not Purchased works, including an explanation of the SQL that runs behind the Segment Editor, review the Has Not Purchased topic in the Amperity A-Z reference.

How Has Not Purchased works

The following diagram shows how Has Not Purchased works:

Compare who purchased to who did not, return all who did not.

The numbers in this diagram represent:

  1. The Unified_Itemized_Transactions table, or the table that associates all of the items you sold with the order ID of the transaction and the customers who purchased them.

  2. The Merged_Customers table, or the table in which all of your customers are located and the foundation of your customer 360 database.

  3. A purchase channel.

  4. A product category.

  5. A product gender.

  6. All of the customers who purchased, inclusive of purchase channel (3), product category (4), and product gender (5).

  7. All of the customers who did not purchase, and also the list of customers that is returned by Has Not Purchased during the date range that you choose.

Why does my audience get larger?

As you add filters to Has Not Purchased the size of the audience that is returned from the Merged_Customers table gets larger. The best way to explain this is to use a series of diagrams.

This series of diagrams steps through and shows you why your audience gets larger as you apply more filters. On the left side is the Unified_Itemized_Transactions table and on the right side is the Merged_Customers table.

  1. The following diagram shows just one filter (the white inner circle). Let’s say that filter is purchase channel and that you chose “online”:

    One filter attribute.

    The results of Has Not Purchased will return “all of your customers who did not purchase from your website.”

  2. The following diagram shows a second filter. Let’s say this one adds product category and that you chose “shirts”:

    Two filter attributes.

    The results from the Unified_Itemized_Transactions table is smaller because only purchases that exist in both filters are returned. This means the results for Has Not Purchased will be larger, and now return “all of your customers who did not purchase a shirt from your website.”

  3. The following diagram shows a third filter. Let’s say this one adds product gender and that you chose “F”:

    Three filter attributes.

    The results from the Unified_Itemized_Transactions table is now much smaller and the results for Has Not Purchased have grown larger, and now return “all of your customers who did not purchase a women’s shirt from your website.”

Example: Who has not purchased t-shirts?

In the following example, a marketer creates a segment using Has Not Purchased that returns information about customers who have not purchased one or more men’s t-shirts over a period of time. With this information, they can build a campaign that focuses on products that customers are more likely to purchase.

Who hasn't purchased t-shirts?

Has purchased

Has Purchased returns a list of orders that meets the threshold that you define – for example, exactly 4, less than 5, more than 2, or between 2 and 10 – and occurred during your chosen date range. For example, return all customers who have purchased 3 (or more) times in the previous 2 years:

Find which customers have interacted with products, channels, or brands during the specified date range.

After you specify a value and date range you may apply filters to associate customers who have purchased with specific products, brands, channels, and stores. For example, return all customers who have purchased wool or cotton socks from your website.

Tip

For more information about how Has Purchased works, including an explanation of the SQL that runs behind the Segment Editor, review the Has Purchased topic in the Amperity A-Z reference.

Example: Who has purchased a watch?

In the following example, a marketer creates a segment using Has Purchased that returns information about customers who have purchased one or more watches over a period of time. With this information, they can build a campaign focused on customers who have an affinity for watches.

Who has purchased a watch?

Most frequent order

Most Frequent Order returns the products that each of your customers ordered most frequently during your chosen date range and at the frequency you have defined. For example, return a list of customers whose most frequent purchase within the last 30 days was tacos:

Customers who bought a lot of tacos.

Important

You must choose at least one product attribute – category, subcategory, description, or gender – and/or a store ID.

After you choose at least one product and specify a date range you may apply filters to associate your customers orders with specific products, brands, channels, and stores. For example, return a list of customers who most frequently ordered deluxe tacos in Goleta, CA.

Tip

For more information about how Most Frequent Order works, including an explanation of the SQL that runs behind the Segment Editor, review the Most Frequent Order topic in the Amperity A-Z reference.

Example: Who likes to buy shoes?

In the following example, a marketer creates a segment using Most Frequent Order that returns information about customers who most frequently purchase women’s shoes in a store. With this information, they can build a campaign focused on women’s shoes ordered in stores.

Who likes to buy shoes?

Repeat order

Repeat Order returns a list of customers who have made a repeat purchase during the chosen date range. For example, return all customers who made a repeat purchase within the previous 6 months:

Customers who own the base game and need to buy an expansion pack.

Important

Repeat Order identifies a repeat purchase by comparing purchases within the chosen date range to all purchases. For example, a customer who first purchased 2 years ago, and then purchased again last month would be returned by a relative date range “today - 1 month”. A customer who first purchased 10 years ago, and then purchased again last month would also be returned. As well as a customer who first purchased 2 months ago, and then purchased again last month.

After you specify a date range you may apply filters to associate repeat orders to specific products, brands, channels, and stores. For example, return all customers who made a repeat purchase of shoes from your ACME Footwear brand.

Tip

For more information about how Repeat Order works, including an explanation of the SQL that runs behind the Segment Editor, review the Repeat Order topic in the Amperity A-Z reference.

Total value of orders

Total Value of Orders adds together all of the revenue for all of the items that customers purchased across all orders that match the value and occurred during your chosen date range. For example, return all customers who spent more than $100 during the previous six months:

Customers who buy a lot of chewing gum every six months.

After you specify a value and date range you may apply filters to associate these customers to specific products, brands, channels, and stores. For example, return all customers who spent at least 100 dollars within the previous six months on chewing gum and purchased from your website.

Tip

For more information about how Total Value of Orders works, including an explanation of the SQL that runs behind the Segment Editor, review the Total Value of Orders topic in the Amperity A-Z reference.

Example: All orders with shoes

In the following example, a marketer creates a segment using Total Value of Orders that returns revenue information from all customer orders which include shoes between the present and a year. With this information, they can build a campaign focused on customer’s who purchased shoes.

All orders with shoes

Common filter attributes

Use the following filters–with a condition and a value or values–to return more refined data on your customer’s transactional behavior.

Attribute Name

Definition

Purchase brand

Use this attribute to filter by purchase brand.

Purchase channel

Use this attribute to filter by purchase channel.

Product category

Use this attribute to filter by product category.

Product subcategory

Use this attribute to filter by product subcategory.

Product description

Use this attribute to filter by product description.

Product gender

Use this attribute to filter by gender.

Store ID

Use this attribute to filter by store ID.

Databases and tables

You can use any database table that is available to the Segments tab to build attribute groups. All of the tables in the currently-selected database are available from the drop-down menu in each attribute group and are shown in the bottom right corner of the Segment Editor.

Important

Tables must be configured to be available to the Segments tab. This must be done by a member of your team who manages databases and tables from the Customer 360 tab.

Select a database to use tables in that database to build an attribute profile.
  1. You may change the selected database by choosing another one from the drop-down menu.

  2. The list of tables is refreshed to show the tables in that database.

AND vs. OR (between attribute groups)

The Segment Editor builds segments using a series of WHERE clauses. Each WHERE clause defines a single attribute group. There are two locations in the Segment Editor where you must specify the use of AND and/or OR operators within a WHERE statement.

Important

All conditions within an attribute group must use the same operator. In addition, the same operator must be used between all attribute groups. In both situations you have a single choice: AND or OR.

AND and/or OR operations may appear:

  1. Across all attribute groups

  2. Within individual attribute groups

Use AND to set multiple conditions, where each condition is evaluated separately and only records that satisfy all conditions can be included in the results. For example, an attribute group that uses AND returns customers who are in the Gold loyalty tier and who have made at least one purchase for the ACME brand.

Tip

Attribute groups that use the AND operator will typically become smaller as more attributes are added to the attribute group.

Use OR to combine conditions, where at least one of the conditions must be satisfied to be included in the results. For example, an attribute group that uses OR returns customers who are in the Gold loyalty tier or who have made at least one purchase for the ACME brand.

Tip

Attribute groups that use the OR operator will typically become larger (or at least stay the same) as more attributes are added to the attribute group.

SQL editor

The SQL Segment Editor is an optional interface that allows you to build an attribute profile with SQL. Start with a SELECT statement that returns the Amperity ID, and then apply a series of WHERE statements to define one (or more) attribute groups that match specific conditions and values.

There SQL Segment Editor has the following requirements:

  1. The only field that can be returned by the SELECT statement is amperity_id.

  2. All conditions and values must be contained within a WHERE clause.

  3. A WHERE clause must use one of the following operators: AND or OR.

Example segments

For example, a segment that uses the OR operator to return customers whose first name begins with “Mi”, last name begins with “Smi”, and who reside in California:

SELECT
  "amperity_id"
FROM
   "Customer_360"
WHERE
  (
    (LOWER("given_name") like '%mi%')
     OR LOWER("state") = 'ca'
     OR (LOWER("surname") like '%smi%')
  )

The following example is identical to the previous example, but shows each condition in its own WHERE clause, using UNION ALL between each clause to group the results together:

SELECT
  "amperity_id"
FROM
   "Customer_360"
WHERE
  (
    (
      "amperity_id" IN (
        SELECT
          "t0"."amperity_id"
        FROM
          "Customer_360" "t0"
        WHERE
          ((LOWER("t0"."given_name") like '%mi%'))
        UNION ALL
        SELECT
          "t1"."amperity_id"
        FROM
          "Customer_360" "t1"
        WHERE
          (LOWER("t1"."state") = 'ca')
        UNION ALL
        SELECT
          "t2"."amperity_id"
        FROM
          "Customer_360" "t2"
        WHERE
          ((LOWER("t2"."surname") like '%smi%'))
      )
    )
  )

Segment insights

Note

Segment insights are available when the customer 360 database contains the Unified_Transactions, Transaction_Attributes, and Transaction_Attributes_Extended tables.

Segment insights within the Segment Editor include the following categories:

  1. The number of unique customers in this segment.

    Note

    In order display unique customers in this segment, the Unique Customers insights card queries Amperity IDs to match them up with each unique customers.

  2. The sum of order revenue in this segment over the previous 12 months.

    Note

    In order to display the total revenue for this segment over the past 12 months, the 1-Year Active Customers insights card queries data from transaction attributes, total revenue, and Amperity IDs.

  3. The total order revenue for all unique customers in this segment who have ordered in the previous 12 months.

    Note

    In order to display the total revenue for this segment over the past 12 months, the 1-Year Segment Revenue insights card queries data about transaction attributes and total revenue.

  4. The number of reachable customers in this segment.

    Note

    In order to display reachable customers in this segment, the Reachable Customers insights card customer queries customer contact information, including at least one phone number, email address, and/or physical mailing address.

When you start building a segment, the values for segment insights represent 100% of your customers and revenue across all categories. As you apply attributes to your segment refresh segment insights and review the the updated values.

Segment insights are available when using the Segment Editor.
  1. Segment insights are shown when you start using the Segment Editor.

  2. As you apply attributes segment insights are reset. Click the Refresh button to update segment insights based on the attributes you have selected. The values for each category are updated.

Segment overview

A segment overview highlights the most important information about a segment, including:

  • How much opportunity does this segment have?

  • Which channels should I engage on?

  • What is the predicted revenue for this segment?

Use the information on the segment overview to help determine the best way to initiate a marketing campaign.

A segment overview available after a segment is activated.

Each segment overview contains the following details:

  1. The number of unique customers in this segment.

    Note

    In order display unique customers in this segment, the Unique Customers insights card queries Amperity IDs to match them up with each unique customers.

  2. The sum of order revenue in this segment over the previous 12 months.

    Note

    In order to display the total revenue for this segment over the past 12 months, the 1-Year Active Customers insights card queries data from transaction attributes, total revenue, and Amperity IDs.

  3. The total order revenue for all unique customers in this segment who have ordered in the previous 12 months.

    Note

    In order to display the total revenue for this segment over the past 12 months, the 1-Year Segment Revenue insights card queries data about transaction attributes and total revenue.

  4. The number of reachable customers in this segment.

    Note

    In order to display reachable customers in this segment, the Reachable Customers insights card customer queries customer contact information, including at least one phone number, email address, and/or physical mailing address.

  5. Revenue statistics, including historical revenue and predicted revenue trends.

  6. The channels through which this segment has customer opportunity.

  7. Segment insight charts for customer behaviors and customer attributes. These charts have a configurable date range and up to six may be selected. Click the Actions menu, and then select Customize charts to choose up to six charts for customer behaviors and for customer attributes.

  8. The list of customers who belong to this segment.

How-tos

This section describes tasks related to building segments in Amperity:

Add transactional behaviors

You can add transaction behaviors from the Segment Editor.

To add transaction behaviors to a segment

  1. From the Segment Editor window, click Add criteria.

  2. Select an attributes, from the Transactional Activity menu.

  3. Select a source from the Sources menu.

    Tip

    You can also use the Search field to find a source.

  4. In the next menu, select a segment attribute.

  5. In the Operators menu, select an operator.

    Note

    You can delete an attribute by clicking on the ‘x’ to the right of the criteria.

  6. Enter information into the required fields.

  7. Click Add filter.

  8. From the Filters window, select the appropriate conditions and values.

  9. Click Save. The filters appear on the Segment Editor window beneath the associated attributes.

  10. When done adding the a criteria and sections, click Save to create/edit the segment.

Browse tables and columns

The Segment Editor provides access to all tables in all databases that have been made available for use with segments. These are available from a list in the segment editor, sorted by table, and then within each table sorted by field. Use this list as a quick reference for tables, columns, and data types as you are building segments.

To browse tables and columns

  1. From the Segments tab, open a segment. This opens the Segment Editor.

  2. Under Database, select a database from the drop-down menu. The list of tables is updated to show the tables in that database.

  3. Under Table, expand the name of a table. Details include the number of records in the table, a list of columns, and for each column its data type.

Discard segment

Use the Discard option to remove a segment from Amperity. This should be done carefully. Verify that both upstream and downstream processes no longer depend on this segment prior to discarding it.

To discard a segment

  1. From the Segments tab, open the menu for a segment, and then select Discard. The Discard Segment dialog box opens.

  2. Click Confirm.

Download segment

You can download segment results as a CSV file. The CSV format is supported by many applications, which makes the format a great way to test the potential of orchestrating segments for downstream applications and workflows.

Note

You cannot download the results of any segment that returns an error.

To download a segment as a CSV file

  1. From the Segments tab, open the menu for a segment, and then select View. This opens a segment editor.

  2. Click the Customers tab.

  3. Click Download.

  4. A CSV file with a filename that is identical to the segment name is downloaded to your local machine.

Organize segments

A folder helps you organize the list of segments in the Segments tab. Up to three levels may be added.

You can organize the segments shown in the Segments tab:

Add folder

Folders may be expanded (or collapsed) to view (and hide) the list of segments and subfolders contained within.

To add a folder

  1. From the Segments tab click Create, and then select Add Folder. This opens the Create Folder dialog box.

  2. Enter the name for the folder.

  3. Click Save.

Add subfolder

Use the Create folder option in the menu to add up to three levels of subfolders. All folder names must be unique.

To add a subfolder

  1. From the Segments tab, open the menu for a folder, and then select Create folder. This opens the Create Folder dialog box.

  2. Enter the name for the folder.

  3. Click Save.

Move segment

Use the Move option to move around and organize the list of folders and segments. Folders may be expanded (or collapsed) to view (and hide) the list of segments and subfolders contained within.

To move a segment

  1. From the Segments tab, open the menu for a segment, and then select Move. This opens the Move Segment dialog box.

  2. Select the name of an existing folder to which a segment will be moved, and then click Move.

Hint

If the folder to which a segment will be moved is not present in the list of folders, you can add it directly from the Move Segment dialog box. Click the + New folder link, type a name for the folder, and then select it.

Select database

You can build a segment against any database that is visible from the Customer 360 tab.

To select a database

  1. From the Segments tab click Create, and then select Visual Segment. This opens the Segment Editor.

  2. Under Database, select a database. The Customer 360 database is selected by default.

  3. Build your segment against the list of tables that are available in that database.

Select multiple values

You can select multiple values from the Segment Editor.

To add multiple values to a segment

  1. From the Segment Editor window, click Add criteria.

  2. Select a table or search for an attribute in the search field.

  3. Select a condition.

  4. In the field, search for or select a value.

    Tip

    You can search for a value and then easily select all options in the list of values that appears by selecting the Select all checkbox.

  5. Click Save.

  6. When done adding a criteria and sections, click Save to create/edit the segment.

A segment with attributes, sources, and multiple selected values.

Show columns

You can view columns that are in the segment results from the Customers page in the segment viewer. This can be configured to show all columns from all tables or only columns from a specific table.

To show columns

  1. From the Segments page, open the menu for a segment, and then select View. This opens a segment editor.

  2. Click the Customers page.

  3. Expand the Show [x] columns from [table] link.

  4. Use the Show all columns and Show only the columns I choose options to configure which columns are shown.

  5. Click Refresh to update the segment results to show the configured set of columns.

Switch to SQL segment

You can switch a visual segment to a SQL segment.

To switch to a SQL segment

  1. From the Segment Editor, open a segment.

  2. In the Segment Editor, in the top right, click View SQL.

  3. Click Convert to SQL Segment.