Skip to main content

How to Track Accounts (Orgs or Users) Entering and Exiting a Segment

A guide on how to track when a Segment is applied or removed from an Account, Organization, or User.

Laura Bedoya avatar
Written by Laura Bedoya
Updated this week

Problem Description

A Playbook is used to add an account to a Segment in Vitally, but there is no straightforward way to track when the Segment was applied or when it's removed. Spoiler alert: you'll need to do this via a playbook and two custom traits. Read this article to find out how to configure this.


Step-by-Step Solutions

1. Create a custom Datetime Trait

  • To create a custom datetime trait

    1. Navigate to your Vitally Settings page, hover over the hierarchy object you want to create the trait for, and select traits

    2. Select the blue Create custom trait button

    3. Set their data type to "Datetime" for proper tracking

    4. Give the trait a meaningful name, like "Entered Onboarding Segment"

    5. Save the trait

    6. Follow steps 1-5 to create a second one for tracking when the customer exits the segment


2. Add a Step to your Playbook to Update a Trait

  • Open the Playbook that handles the Segment activity

  • After the "Add Account to a Segment" step, add a new step:

    1. Select "Update an Account Trait" as the action (or User or Org)

    2. Select your new custom datetime trait to track entering a segment

    3. Set the Value to A relative date > 0 days after this action executes

    4. Select Nothing - maintain its current value as the undo strategy

    5. Repeat steps 1-4 to add a second action at the end of your playbook to update the datetime trait you created to track exiting the segment

    6. Update the Playbook exit strategy so that the audience completes all actions before exiting the Playbook when they no longer match the trigger rules

    7. Save the updates to your Playbook and enable it


Additional Tips

  • Use a datetime trait: Ensure the trait is a datetime and not a date trait to ensure accuracy

  • Automate Other Playbook Steps: Use similar methods to record timestamps for other account activities if needed.


FAQ

How does the “Update an Account Trait” step work?

This step allows you to update specific account traits (e.g., PoC start date) with a custom value, such as the current timestamp.

What if timestamps don’t update properly?

Ensure the Playbook step is configured to update the correct trait and that the Playbook action triggers at the appropriate time.

Can I use this method for other activities?

Absolutely. This approach can be adapted to track timestamps for any activity managed through Playbooks.

Did this answer your question?