Session attributes
Contents
Feature coming soon!Learn about the building blocks for designing the session cards that agents see.
Prerequisites
- Configure the following permissions in Genesys Cloud CX:
- Journey > Session Type > View
- Journey > Session Type > Add
- Journey > Session Type > Edit
- Journey > Session Type > Delete
- Journey > Event Type > View
- Journey > Event Type > Add
- Journey > Event Type > Edit
- Journey > Event Type > Delete
Overview
A session attribute is a piece of summary data about a web session or custom session. For example, the total number of items in a shopping cart. Agents see session attributes across the top of a session card.
In the Session Library, create each session attribute that you want to appear on the session card that agents see. Later, when you design the session card, you configure which session attributes appear on the session card, and in what order.
For example, the following table lists the session attributes and corresponding values for the Bike delivery scenario. In our case, we always want to show the order ID of each session on the session card that agents see.
Session attribute | Value |
---|---|
Order Id | WMBK06201234 |
Customer name | Gwen Brown |
Order date | 06062020 |
Item number (SKU) | 1234567891011 |
Item description | Women's bike |
Item model | SZRBY1911 |
Cart items | [helmet, bike, gloves] |
How session types relate to session attributes
When you send a custom event to Genesys Predictive Engagement through the Custom events API, the custom event specifies the session type. When we receive a custom event request that includes a new session type, we create the session type automatically. You can also use the Session types API to proactively define session types. For more information, see Session types API in the Developer Center.
Present a consolidated view of multiple data points
Because custom events are specific to each organization, they can provide a wide variety of data to Genesys Predictive Engagement. This data comes as event-specific attributes. Sometimes, agents and customers need to see a different level of detail. Genesys Predictive Engagement allows you to present session data in a way that is meaningful to agents.
For example, if a customer buys a bike, helmet, and gloves, there are multiple order_placed customer events (one custom event per item ordered). If the customer calls the Help Desk, an agent can review the session card and tell the customer when the items will be delivered.
To accomplish it, configure a projection that renders all the order_placed attribute values as a single list.Process overview
- Developer: To send custom events with event attribute values from an external system, use the Custom events API. To define the projections to transform event attributes, use the Session types API.
- Admin: To create a session attribute that renders the event attributes in a meaningful way, use the Session Library.
- Admin: To display the session attributes to agents, configure the session cards.
Required information
To create a projection, the custom event must provide the following data:
- Session attribute name
- Session attribute data type: String, Number, or Boolean
- Operator to perform the projection. For a list of operators, see Operators for session attributes.
- Name of the event that triggers the projection
- Event attribute for the projection
Example
Create a session attribute
You create session attributes in the Session Library. Click a session name and then, on the Session attributes tab, click Create session attribute.
- Display name: Meaningful name for the attribute. This name displays to agents.
- Name: By default, the Name field matches the Display name field, but with no spaces or special characters. This second name acts as identifier in the API and when configuring integrations. To change this name, use a unique alphanumeric string with underscores (no spaces). After you save the session attribute, you can change the display name, but you cannot change this identifying name.
- Render as: Display format for the attribute (for example, text, number, or clickable link).
- Value: Custom event that applies and the event attributes for this custom event.
- Operator: Operator that determines how to handle session attribute values in the context of the overall session. For example, if you are updating your shopping cart with a session attribute value, use the Add to set operator. The Add operator overwrites the items that are in the cart already.
- Add more: Allows you to add another value and operator.
Operators for session attributes
Operator | Data type | Use the value of the current session attribute to... | Example |
---|---|---|---|
Add | Numeric | Add to the stored value the amount of the current session attribute. | Recalculate the shopping cart total by adding the value of the new item. |
Add to list | Alphanumeric | Add the current session attribute to the existing list of attribute values. | Display a current list of shopping cart items that include all items added previously and the new item. |
Add to set | Alphanumeric | Add the current session attribute to the existing set of attribute values. The values in this set are unique. If a session attribute value updates multiple times with the same value, the value appears in this list only once. | Display the approvers of the mortgage. |
Decrement | Numeric | Decrease the stored value by 1. | Display the number of deliveries completed. |
Increment | Numeric | Increase the stored value by 1. | Display the number of deliveries outstanding. |
Set | Alphanumeric | Change the stored value to the current value. | Display the current status of a mortgage application as it moves through the approval process (Submitted, Pending review, In review, Accepted). |
Subtract | Numeric | Subtract from the stored value the amount of the current session attribute. | Recalculate the shopping cart total by subtracting the value of the new item. |
Projection example: Multiple custom events and projections for one session
The following example illustrates how projections are used with a custom session that has multiple custom events.
Suppose agents want to see the current status of an item's delivery, along with a list of all the products a customer purchased during a given session. If the custom events provide the necessary data, the data updates dynamically as custom events for a Delivery of an order session arrive.
Required information for the List of all products purchased session attribute | Value |
---|---|
Session attribute name | item ref numbers |
Session attribute data type | String |
Operator | ADD_TO_LIST |
Name of the event that triggers the projection | order_placed |
Event attribute for the projection | item ref numbers |
Required information for the status session attribute | Value |
---|---|
Session attribute name | status |
Session attribute data type | String |
Operator | SET |
Name of the event that triggers the projection | all custom events |
Event attribute for the projection | status |