Skip to main content

Attributes

Attributes enable extending the core entities of the Talon.One data model. For example, an online fashion retailer may wish to add a Brand attribute to cart items. A hotel-booking platform might add CheckInTime and CheckOutTime attributes to orders. An ecommerce shop might want to add a Segment attribute to customer profiles.

There are 2 types 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. In addition to these built-ins, 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. You can add library attributes to your account in the Developer Settings section of the Campaign Manager.

Custom attributes#

In addition to pre-defined attributes in the Attribute Library, you may also define custom attributes. As an example, consider a SaaS service with an in-house community forum. They want to offer special promotions to active forum users, so they can define a ForumPosts attribute on customer profiles. These custom attributes can be defined in the Developer Settings section of the Campaign Manager.

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.

Sending attributes#

You include attributes in update requests for various entities.

For example, consider the ForumPosts attribute from above. To keep the count of forum posts in sync, the forum should perform an updateCustomerProfile operation every time the user makes a post.

For example, using the Ruby SDK:

talon.update_customer_profile user.id, {  "attributes" => {    "ForumPosts" => user.posts.length  }}

Or with the JavaScript SDK:

talon.updateCustomerProfile(user.id, {  attributes: {    ForumPosts: await user.postCount()  }})

The attribute value must match the attributes type, which is defined on a per-attribute basis. Currently the following 6 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.

Attribute library#

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

To open the attribute library:

  1. Click Account > Dev tools > Attributes.
  2. Click Attributes Library at the top of the screen.

Customer profile entity#

  • 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 entity#

  • IntegrationId: the identifier of the session
  • ProfileId: the identifier of the customer owning the session. It has the same value as the IntegrationId of the customer profile entity.
  • 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 entity#

  • 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