Session Data Enricher

Overview

When the customer enters the storefront and stays there inactive for a configurable amount of time, the system sends events to which the Session Data enricher listens. As a result, the enricher adds session data to a section related to the session in the profile document.

If a session-started event contains a strongId in its payload, the enricher extracts the strongId and links it with the user's profile in the Identity service.

The Session Data enricher also removes idle sessions. If no new events appear after the last session-timed-out event, and the previously configured amount of time lapses, the enricher removes this timed-out session from the profile document. You can set up the duration of this period in the Configuration Explorer. To do so, create a variable with the name sessionExpirationDuration and set its value in the ISO 8601 format. For example, to remove all sessions that are idle for more than 20 days, set the sessionExpirationDuration property to P20DT0H0M0S.

It takes approximately ten minutes for the Session Data enricher to notice the changes introduced to the Configuration Explorer.

The Session Data enricher reacts to the following events:

  • session-started
  • session-timed-out


Events

The following events in the Context service trigger the Session Data enricher:

EventTriggered by SchemaPayload example
session-startedcontext/commerce/SessionStartedExample
session-timed-outcontext/commerce/SessionTimedOutExample



AttributesProperties
profiles/observations/web


Metamodel

The following interactive graphic displays the schemas that invoke this enricher.


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 or write an age estimation or physical address. A consumer and a tenant can grant and revoke consent for subsets of their respective data.
consent classA developer-defined string alias that references a set of profile data, or "schemas", for which to grant and revoke consent.
consent referenceA unique, randomized string that serves as a passcode to decrypt data associated with one or more schemas.
consumerThe end user whose actions yield profile data in the profile document. A profile describes a single consumer.
contextData that affects the state of the profile document. You can collect this data from consumer-triggered events or from third-party sources such as weather stations.
context serviceAn internal microservice that manages the insertion of, and the retrieval of, context data in the Context Repository.
enricherA microservice that retrieves data from the Context repository and the profile document, possibly alters or extends it, and then persists data in the profile document. 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.
identityOne of many independent units of data used to identify a unique profile, such as an email address, browser type, or version.
profileTechnical definition: Data in the profile document that is interdependent and associated with a single consumer.
Business definition: Data about a single consumer, collected and derived from events that the consumer triggers, or events that are logically associated with that consumer.
schemaA string representation of a path in the profile document, which represents an abstraction of a particular data structure, and used to define read and write permissions for SAP Hybris Profile microservices.
tenantA tenant is a group of users on a project sharing common access, with specific privileges to a service.


  • 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.