Working with Traits
Traits are attributes applied to each customer on CrowdPower.
About Traits
Traits are attributes assigned to a customer. These attributes can be anything, like the name of a plan the customer is currently on. When you create a trait for a customer, the trait is added to your project, and then added to the customer's profile.
Custom Attributes
When sending in custom information about a customer, you can pass in a set of key/value pairs called custom_attributes
. You can do this easily with the JavaScript tag or from your server with the Beacon API. When sending in data, here are some guidelines to follow:
Keys should be formatted as snake_case, but we do not require it.
Keys must be strings.
Keys are case sensitive.
Keys may not include spaces or punctuation, other than a dash or underscore.
Keys may not exceed 50 characters.
Values must be strings, booleans, or numbers.
Date values should be sent as UNIX timestamps (in seconds).
If you're sending custom attributes from a third party service, like Segment or Zapier, make sure the keys follow these guidelines or the API will return an error.
Formatting Traits
Once you send your data to CrowdPower, you may want to format how that data is displayed to you. You can do this in the Traits section. This section lists all the traits available to your project. Click on any trait to edit it. You'll see 2 options for formatting traits.
The type tells CrowdPower to treat the value as a string, number, boolean, or date.
The format tells CrowdPower to to display the type in a particular way. For example, a date may be formatted as just the date, the date and time, or a relative time.
Here are all the ways you can format traits:
Renaming Traits
Once inserted, a trait has a field that cannot be changed. That field is the key you originally provided in the API call. You can change how the field is displayed to you by editing the name. Once changed, it will update across all of your customers.
Deleting Traits
You can delete custom traits, and they'll be removed from all customer profiles. However, if the trait is sent back in again, it will reappear. You can also change the visibility of a trait, if you do not wish to see it in customer profiles, lists, or segments.
Last updated