Managing attributes
Attributes are the key to customizing your rules as much as you want. Use attributes to represent any information about the following entities:
- Application
- Campaign
- Cart Item
- Coupon
- Customer profile
- Customer session
- Event
- Giveaway
- Referral
- Store
Only admins and Application admins have access to this feature.
Attributes are Application-specific, used inside rules (usually inside conditions) in the Rule Builder, and described by:
- Their type (
number
,string
,list
, etc.) - Their definition (Built-in or Custom attribute)
- Their name
- The entity they belong to in the above list
Learn more about attributes in our Developer docs.
Built-in and custom attributes
The attribute definition describes the nature of an attribute. Talon.One supports built-in and custom attributes.
Attribute definition | Description |
---|---|
Built-in attribute | Provided by default, such as the name of a customer or the value of a coupon. See Displaying attributes. |
Custom attribute | When the built-in attributes do not represent the data of your business activity, you can create your own attributes, called custom attributes. |
Example
Let's imagine you own a bike-rental business. Users can get free minutes if they return their rental bikes to certain locations.
An obvious rule for this would be:
- Condition: if the bike location at the end of the rental is one of the special locations then...
- Effect: Award
x
minutes to the customer profile.
Talon.One does not provide a minutes attribute for customer profiles, so we can create a custom attribute to represent this data. We can call it minutes, it is a number, and it is associated with the customer profile entity.
Creating a custom attribute
To send specific data to Talon.One, create custom attributes, set a value for them via the Integration API or via the Campaign Manager and use them in your Rules.
To create a custom attribute:
-
On the leftmost menu, click Account, then click Tools > Attributes.
-
In the top-right corner of the page, click Create Attribute.
-
In Entity, choose the entity that owns the attribute.
-
In Type, choose the type of value assigned to the attribute.
-
In API name, type an identifier for the custom attribute. This is used for integration purposes.
-
In Name, type the name of the attribute. This is the name that you see in the Rule Builder.
-
In Description, type a description of what the attribute represents.
-
(Optional) In Picklist values:
- In Enter picklist values, enter a list of values for the attribute.
- If you have to enter more than 50 values, in Import picklist values, upload a CSV file with up to 500,000 values. Imports overwrite previous and any manually entered values.
- (Optional) To allow users to enter their own values when using the attribute in the Rule Builder, select Allow users to enter custom values in the Rule Builder. By default, users are able to use picklist values only after you import or manually enter some.
notePicklist values are not available for attributes with type boolean and location. See Picklist values.
-
In Connected Applications, select which Applications the attribute is available in.
noteCustom attributes with associated entity cart item can also be connected to cart item catalogs.
-
Click Create Attribute.
This attribute is ready to be used but has no value yet. See Setting the value of an attribute.
- Custom attributes with associated entity store are connected to all the stores in an Application.
- You can reuse the Name and API name values of a custom attribute you deleted after a few minutes of waiting.
Picklist values
Use this feature to select predefined values from a drop-down menu when using attributes in the Rule Builder. Picklist values are available in conditions and cart item filters. They are useful to prevent mistakes when setting up campaigns involving many items.
For example, if your business is a supermarket and you want to create campaigns based on items
in the cart, you can create a cart item custom attribute
called pizza
and add values such as pizza carbonara
, pizza salami
and pizza veggie
,
or a list of SKUs.
When creating custom attributes, you can decide whether users creating rules can add their own values or just pick predefined values from a list.
Picklist values are not available for boolean and location attributes.
Catalog-based picklist values
The SKUs of the items and the products in a catalog are available as picklist values in the cart item filters of all Applications connected to the catalog.
The values of the catalog's custom cart item attributes with the type string and list of strings are also available as picklist values in all the Applications connected to the catalog.
Setting the value of an attribute
After you create an attribute, you can set its value. The way you can set its value depends on the associated entity.
Entity | How to set the attribute values |
---|---|
Application | In the Application settings. |
Campaign | In the settings of the campaign. |
Cart item | Programmatically, using the Update customer session endpoint. See an example in the Developer docs. note Any attributes that you do not include in the list will be removed. |
Coupon | When you create a coupon via the Campaign Manager. Programmatically during import or using the Update customer session endpoint. |
Customer profile | Programmatically, using the Update customer profile endpoint. |
Customer session | Programmatically, using the Update customer session endpoint. |
Event | Programmatically, using the Track event endpoint. |
Giveaway | When you import a giveaway. Programmatically, during import or using the Update customer session endpoint. |
Referral | When you generate a referral as an effect. Programmatically, during creation or using the Update customer session endpoint. |
Store | Programmatically, using the Create store endpoint for a new store and the Update store endpoint for an existing store. |
Also see an example in the Developer docs.
Displaying attributes
On the leftmost menu, click Account > Tools > Attributes.
This page displays the available attributes. It contains the following information for each of them:
Column | Description | |
---|---|---|
Attribute | Name of the attribute displayed in the Rule Builder. | |
API name | Name of the attribute used in the integration layer. | |
Entity | Entity associated with the attribute. | |
Type | Value type of the attribute, for instance, string or number . | |
Campaigns | Number of active campaigns in which the attribute is used. | |
Visibility | Toggle button that allows you to control the visibility of attributes in the Attribute Selector. |
Managing attribute visibility
Depending on your attribute usage, you can control the visibility of attributes in the Attribute Selector. For example, you can hide outdated or irrelevant attributes to make finding attributes easier.
To manage attribute visibility:
-
On the leftmost menu, click Account.
-
Click Tools > Attributes.
-
In the Visibility column, click to toggle the status for the required attribute:
- Enabled: The attribute is visible, and you can select it in the Attribute Selector.
- Disabled: The attribute is hidden. It appears in the search results of the Attribute Selector, but you cannot select it.
noteHidden attributes still appear in the rules in which they are used.
Editing a custom attribute
You can modify some characteristics of an attribute after it has been created. For example, you can modify the description or edit picklist values.
Application admins can edit custom attributes that are available only in Applications of which they are an admin.
To edit a custom attribute:
-
On the leftmost menu, click Account.
-
Click Tools > Attributes.
-
Use the search bar and the filters at the top to search for the required attribute.
-
Click the title of the attribute you want to edit.
-
Edit the required information (Rule Builder name and description, picklist values, and connected Applications).
noteIf you imported a CSV file with picklist values, you can download it to check the values it contains. If you import a new CSV file, it overrides any manually entered values and previous imports.
-
Click Update attribute.
Deleting a custom attribute
You can delete your custom attributes but not the built-in ones.
- Deleting a custom attribute can break your integration with Talon.One. Before deleting an attribute, ensure it is not being used in your API requests. If you are not sure, contact your development team for details or consider hiding the attribute instead.
- You cannot delete a custom attribute if you are using it.
- Application admins can delete custom attributes that are available only in Applications of which they are an admin.
To delete a custom attribute:
- On the leftmost menu, click Account.
- Click Tools > Attributes.
- Use the search bar and the filters at the top to search for the required attribute.
- Click the title of the attribute you want to delete.
- At the bottom of the page, click Delete Attribute.
- On the confirmation window that appears, enter the API name of the attribute and click Delete Attribute.