Skip to main content
All CollectionsAutomated Playbooks & AlertsPlaybook Common Use Cases
How to Track Accounts (Orgs or Users) Entering and Exiting a Segment.
How to Track Accounts (Orgs or Users) Entering and Exiting a Segment.

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

Laura Bedoya avatar
Written by Laura Bedoya
Updated over a month ago

Problem Description

A Playbook is used to add and remove accounts from a Segment in Vitally but no straight forward way to track when a Segment was added or removed. Spoiler alert, you'll need to do this via a playbook and a custom trait. 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 account settings

    2. Create traits if they do not already exist. Set their data type to "Datetime" for proper tracking


2. Add a Step to Update Custom Traits

  • 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.

    2. Set the datetime custom trait start date to the current timestamp

    3. Repeat the same for datetime trait end date in the corresponding step where accounts are removed from the segment (typically as the last step in the Playbook).


3. Review and Adjust

  • If the timestamps are not updating as expected:

    1. Check the playbook steps for errors in configuration.

    2. Confirm that Vitally has permission to update the traits.


Additional Tips

  • Maintain Consistent Traits: Ensure all accounts have the same trait structure for seamless updates.

  • 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 or end date) with a custom value, such as the current timestamp.

Can I track multiple timestamps for the same segment?

Yes, create separate traits for each activity (e.g., PoC Added Timestamp, PoC Removed Timestamp) if you need granular tracking.

What if timestamps don’t update properly?

Ensure the Playbook step is configured to update the correct trait and that the Playbook 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?