Skip to main content

Attributes

An attribute represents a characteristic of a given entity.

Examples:

  • An online fashion retailer might add a Brand attribute belonging to cart items.
  • A hotel-booking platform might add the CheckInTime and CheckOutTime attributes to customer sessions.
  • An ecommerce shop might add a Segment attribute to customer profiles.

There are 2 categories of attributes:

  • Built-in attributes: They are provided by Talon.One.
  • Custom attributes: They are created by you. For more information on attribute creation, see the end user documentation.

Built-in attributes#

The core data model defines a small set of common attributes for various entities, such as names for customer profiles and prices for cart items.

The Attribute Library contains a number of pre-defined attributes organized into presets. For example, the Travel preset contains attributes such as FrequentFlyerId and DepartureCountry.

important

You do not have to use the built-in attributes. You can define your own if you prefer.

Enabling a built-in attribute#

Some built-in attributes are not enabled by default. To view them and enable them:

  1. Open the Attribute library: in the bottom-left of the Campaign Manager, click Account > Dev tools > Attributes and Attribute library in the top-right corner.
  2. In the predefined Attributes panel, click the Filter by industry dropdown and select an industry.
  3. In the list of attributes, click the + to add a built-in attribute.

Custom attributes#

You can define your own attributes as you see fit.

Example

Let's imagine a SaaS service with an in-house community forum. We want to offer special promotions to active forum users, so we define a ForumPosts attribute on the customer profile entity.

Creating custom attributes#

  1. In the bottom left of the Campaign Manager, click Account. Dev tools > Attributes and click Create attribute in the top-right corner.
  2. Fill in the fields as needed and click Create attribute.

Setting attributes#

Once you have created attributes, or once you know which built-in ones to use, you can assign values to them programatically and use them in your rules.

For example, consider the ForumPosts attribute from above. To keep the count of forum posts synced between Talon.One and the forum, the integration layer uses the updateCustomerProfile endpoint every time the user makes a post using the attributes property.

Using the updateCustomerProfile endpoint:

CURL -X PUT https://mycompany.talon.one/v2/customer_sessions/{sessionId} -d'{  "customerSession": {    "attributes": {        "ForumPosts": <someValue>    }  }}'

The attribute value must match the attributes type. The following types are supported:

  • string - Any valid JSON string.
  • number - Any valid JSON number, internally these are treated as big decimal numbers.
  • boolean - Either true or false.
  • time - An RFC3999 timestamp.
  • list of strings - Comma separated list of strings.
  • list of numbers - Comma separated list of numbers.

You can also remove any attribute value by setting it to null.

important

Talon.One will return a 400 error whenever an unknown attribute is transferred in a session. An unknown attribute doesn't appear in the Attribute Library.

Attribute library#

The attribute library lists all the attributes available in Talon.One, built-in and custom.

To open the attribute library:

  1. In the bottom-left corner, click Account > Dev tools > Attributes.
  2. Click Attributes Library at the top of the screen.

Customer profile built-in attributes#

  • IntegrationId: the identifier of the entity. It has the same value as the profileId of the customer session entity.
  • Name
  • Gender
  • BirthDate
  • Email
  • AdditionalEmails
  • Phone
  • Fax
  • URL
  • Language
  • Locale
  • SignupDate
  • BillingSalutation
  • BillingName
  • BillingAddress1
  • BillingAddress2
  • BillingAddress3
  • BillingAddress4
  • BillingCity
  • BillingPostalCode
  • Billing
  • ShippingSalutation
  • ShippingName
  • ShippingAddress1
  • ShippingAddress2
  • ShippingAddress3
  • ShippingAddress4
  • ShippingCity
  • ShippingPostalCode
  • ShippingCountry
  • PaymentMethod
  • PaymentIdHash
  • LastOrderDate
  • FirstOrderDate
  • TotalOrders
  • PageVisitedProfile
  • LandingPage
  • SessionCount
  • Languagename
  • FlashVersion
  • DeviceCategory
  • OperatingSystem
  • AccountState
  • ReviewsWords
  • ReviewCount
  • OrderCount
  • MembershipDuration
  • Source
  • Medium
  • Keyword
  • ReferralPath
  • AdGroup
  • Browsername
  • FrequentFlyerId
  • FrequentFlyerProgram
  • FrequentFlyerStatus
  • FrequentFlyerPoints
  • FrequentFlyerStatusPoints

Customer session built-in attributes#

  • IntegrationId: the identifier of the session. It cannot be set via the attributes property of the Update customer session endpoint. It is set automatically via the endpoint's URI parameter.
  • ProfileId: the identifier of the customer owning the session. It has the same value as the IntegrationId of the customer profile entity. It is set via the profileId property of the Update customer session endpoint.

The following attributes are set using the attributes property of the Update customer session endpoint:

  • BillingSalutation
  • BillingName
  • BillingAddress1
  • BillingAddress2
  • BillingAddress3
  • BillingAddress4
  • BillingCity
  • BillingPostalCode
  • BillingCountry
  • ShippingCost
  • ShippingMethod
  • ShippingSalutation
  • ShippingName
  • ShippingAddress1
  • ShippingAddress2
  • ShippingAddress3
  • ShippingAddress4
  • ShippingCity
  • ShippingPostalCode
  • ShippingCountry
  • PaymentMethod
  • PaymentIdHash
  • CurrentLocation
  • Browser
  • OS
  • Device
  • Platform
  • IPAddress
  • Language
  • ScreenResolution
  • TimeOnPage
  • LandingPage
  • SessionDuration
  • ClickedOn
  • Pagetitle
  • PageVisited
  • BrowserVersion

Cart item built-in attributes#

  • DepartureDate
  • ArrivalDate
  • Duration
  • DestinationCountry
  • DestinationCity
  • DestinationAirport
  • DepartureCountry
  • DepartureCity
  • DepartureAirport
  • NumberOfSegments
  • CountryPair
  • DestinationStation
  • DepartureStation
  • BookingClass
  • Pax
  • FlightNumber
  • FlightNumberReturn
  • Tax
  • PassengerSegment
  • BaggageAllowance
  • BaggagePieces
  • BookingExtras
  • Pickup
  • Dropoff
  • Rating
  • TicketType
  • VenueName
  • VenueType
  • VenueCity
  • VenuePostcode
  • VenueCountry
  • VenueDistrict
  • VenueStatus
  • VenueOpeningHours
  • VenueKitchenType
  • VenueDistance
  • VenueMealCount
  • VenueDeliveryTime
  • VenueBudgetCategory
  • VenueRating
  • VenueId
  • VenueMealType
  • VenueDescription
  • VenuePhone

Related links#