Customer sessions contain customer activity within a given Application. For example, a customer session can represent a shopping cart or a completed order for a given customer.
The state of a session can be one of the following:
- Open: The session can be modified as many times as needed, depending on your business needs. For example, the session may remain open while the customer adds new items to the cart.
- Closed: The session cannot be modified anymore. For example, if the customer has completed the payment step of the order workflow.
- Cancelled: The session had an issue or the closed or partially returned states are not valid anymore. For example, if the customer requested a full refund or the payment failed at checkout.
- Partially returned: The closed state is not valid anymore but the session is not cancelled. For example, if the customer requested a refund for some of the items they purchased in the same session.
Each action of the customer in the session is represented by an event. Every session contains at least one event.
You can learn more about customer sessions in our Developer Docs.
Listing customer sessions
The Sessions page in the left-side menu of the Application displays all the customer sessions of this Application and allows you to return individual cart items. It contains the following information:
|Session ID||Identifier of the customer session. It can be used for integration purposes. It is unique for each Application.|
|Customer ID||Identifier of the customer profile. It can be used for integration purposes. It is the same across all Applications.|
Indicates whether the session is open, closed, partially returned or cancelled.
Learn more about customer sessions in the Developer docs.
|Return items||Allows you to return one or more cart items purchased by the customer in the session.|
|Returned items||Number of returned items.|
|Items in session||Number of items currently in the customer session.|
|Coupon||Any coupons redeemed by the customer in the session.|
|Referral code||Any referral codes used by the customer in the session.|
|Created||Date and time when the session was created in the time zone of the Application.|
Customer session overview
Click the Session ID to access all the information for a customer session.
The session page displays the following information:
- Session status: Session state.
- Session Integration ID: Customer session ID.
- Customer: Customer ID. You can access the customer profile by clicking the ID.
- Created: Date and time when the session was created.
- Last activity: Date and time when the session was last updated.
- Total discounts: Total discounted amount for the session.
- Net total: Revenue produced by the customer in the session after deducting all discounts.
- Tabs with additional information related to the customer session:
This tab displays all the events of the session:
|Time||Date and time when the event happened.|
|Effects||Number of effects triggered for the event.|
Click the checkbox to the left of each row to see the event overview.
This tab displays any customer session attributes set in the Application.
For example, attributes may refer to the shipping city, the operating system of the customer's device, or the payment method.
The tab only appears if you set customer session attributes for the Application.
This tab displays the cart items as JSON.
The tab only appears if there are any events involving cart items in the session.
Returning individual cart items
You can manually return one or more cart items from a closed or partially returned session.
This is useful, for example, to allow your customer support agents to return specific items when a customer requests a refund for part of their purchase.
If you return one of more cart items using this feature, the session state changes to partially returned if the original state was closed.
Updating the session state can cause rollback effects to undo potential previous effects triggered when you closed or opened the session. Learn more in our Developer docs.
- Click the button in the Return items column of the session where you want to return one or more items.
- In the pop-up that appears, select the items you want to return. For each item, you can see in the Returned quantity column how many units have already been returned.
- (Optional) If flattened cart items is enabled, use the Quantity dropdown to select the number of units you want to return for each item.
- Click Return Selected Items.
A notification pops up, indicating that the cart items have been successfully returned.
The number of returned items automatically appears in the Returned items column of the session and it is subtracted from the Items in session column.
Exporting customer sessions
Use this feature to obtain a CSV file with customer sessions from your Application. This allows you, for example, to import this data in any BI tool to run reports and obtain further insights.
Select the Application from which you want to export the sessions.
On the Campaigns page, click Campaign Exports at the top-right corner.
Click Customer Sessions.
Set your desired time frame:
- In the Date Range tab, set your desired dates.
- In the After Recent Export tab, select any previous customer session export from the Created after drop-down menu.
In Customer session state, select the state of your choice.
In Date format, select the date format of your choice.note
Data is exported in UTC.
Click Export Data.
The data automatically downloads and a notification pops up, indicating that the customer sessions have been exported.