User Agent Enricher

Overview

This enricher persists, in the graph, multiple data sets derived from the value of a session's HTTP header user-agent parameter.

The data includes:

  • a representation of the original UserAgent string
  • the operating system (OS), both with and without version number
  • the browser, excluding patch version number, minor version and version
  • the browser type, such as email
  • the device type, represented as one of the following values:
    • COMPUTER
    • MOBILE
    • TABLET
    • GAME_CONSOLE
    • DMR
    • WEARABLE
    • UNKNOWN

Persisting the data with different levels of precision enables sessions to be matched with different levels of precision. For instance, persisting a data set that excludes the OS version number allows you to match sessions that differ only by OS version number.

This enricher runs once at the beginning of each new session.


Events

The front-end entered event, stored in the Context service, triggers the User Agent Enricher.

Triggered by SchemaPayload schemaPayload example
context/commerce/FrontendEnteredSchemaExample

The User Agent Enricher draws relationships between a Session node and various agent identifiers in the graph database, as shown. For more information, see the Secure Graph service documentation.

Node or Relationproperties
nodes/cdm/Browserid
nodes/cdm/BrowserNoMinorid
nodes/cdm/BrowserNoPatchid
nodes/cdm/BrowserNoVersionid
nodes/cdm/BrowserTypeid
nodes/cdm/DeviceTypeid
nodes/cdm/OperatingSystemid
nodes/cdm/OperatingSystemNoVersionid
nodes/cdm/UserAgentid
relations/cdm/Session/cdm/Browser/cdm/HAS
relations/cdm/Session/cdm/BrowserNoMinor/cdm/HAS
relations/cdm/Session/cdm/BrowserNoPatch/cdm/HAS
relations/cdm/Session/cdm/BrowserNoVersion/cdm/HAS
relations/cdm/Session/cdm/BrowserType/cdm/HAS
relations/cdm/Session/cdm/DeviceType/cdm/HAS
relations/cdm/Session/cdm/OperatingSystem/cdm/HAS
relations/cdm/Session/cdm/OperatingSystemNoVersion/cdm/HAS
relations/cdm/Session/cdm/UserAgent/cdm/HAS


Metamodel

Enrichers react to one or more schema events. A schema event references a context, a node, an edge, or a property; for example, a keyword search context, the creation of a new product node, the update of an edge between product and cart nodes, or the update of an edge property. In response to a triggering schema, the enricher retrieves the complete event data from the context service, enriches this data, and updates the graph accordingly. Enrichers can only affect their declared schemas in the graph.

The following interactive graphic displays the schemas that invoke this enricher and the schemas the enricher can affect in the graph.

To zoom in and out of the image, use the scroll wheel on your mouse. To pan the image, click on the background and drag.


Glossary

TermDescription
authorizationThe process of determining whether a given microservice has permission to gain consent.
consentPermission to access (read, write) specific profile data, for example, permission to read/write age estimation or physical address. Some consents can be toggled by the consumer, other consents can be toggled by the tenant.
consent classA string alias that references a set of profile data (also called "schemas") for which consent can be granted and revoked. This string is exposed to users (consumers and tenants) as a reference through which they control consent. For example, the consent class "Purchases" might reference a set of data that includes items purchased, purchase dates, and purchase prices. Toggling consent for the consent class "Purchase" would enable and disable consent for that entire set of data.
consent referenceA unique, randomized string that serves as a passcode to decrypt data associated with one or more schemas. Various service calls require a consent reference.
consumerThe end user whose actions yield profile data in the graph. A profile describes a single consumer.
contextData that affects the state of the graph. This data can be collected from consumer-triggered events or from third-party sources such as weather stations.
context repositoryA temporary cache for adapted context data, before it is further processed by enrichers and persisted in the graph.
context serviceAn internal microservice that manages the insertion of, and the retrieval of, context data in the context repository.
encryption keyA unique, randomized string used to encrypt and decrypt specific data in the graph. Each data element is encrypted with a different encryption key. Decryption, using this key, is required to access, view, and alter the data.
enricherA microservice that retrieves data from the context repository and/or graph, possibly alters or extends it, and then persists the data in the graph. An enricher can interpret data points, or sets of data points, to yield new data to persist. For example, an enricher can interpret purchasing data and contemporaneous weather station data to yield new data indicating that the consumer is a rainy-day shopper.
graphThe database that stores profile data as nodes, edges, and properties, and allows semantic queries.
packageA developer-defined bundle of microservices. A partner, team, tenant, or another package can subscribe to a particular package to access the functionality of those bundled microservices.
profileData about a single consumer, collected and derived from events that are triggered by, or are logically associated, with that consumer.
schemaA string representation of a path in the graph that represents an abstraction, rather than a concrete instance, of a particular data structure.
subscriptionA relationship between an actor (a tenant or a team) and a package, wherein the actor gains access to the functionality of that package.
tenantA registered entity with a shared commercial goal that subscribes to SAP Hybris Profile services and packages to reach that goal. A tenant can also develop and contribute enrichers and context adapters to the SAP Hybris Profile suite. Within YaaS, a tenant is a project.


  • Send feedback

    If you find any information that is unclear or incorrect, please let us know so that we can improve the Dev Portal content.

  • Get Help

    Use our private help channel. Receive updates over email and contact our specialists directly.

  • hybris Experts

    If you need more information about this topic, visit hybris Experts to post your own question and interact with our community and experts.