Troubleshooting with the Session ID and Request ID
When troubleshooting an issue, the session and request IDs can help you uncover key information.
The session and request IDs can help you uncover key information about what is going wrong.
Session ID
The session ID is created by the Web Adapter during the first request. It’s stored in a cookie and consists of:
- a random part
- the selected application server
- its creation time
- the check sum
1Example: KEtLmGyI43gRwyow53NbmmyCjJy1Vshf1oU=
Request ID
The request ID is also created by the Web Adapter, but as a random series of characters. It’s passed with the request to the Application Server.
1Example: y2PuahYWlogkQAgAKk
Troubleshooting Client Side
Find the session ID and request ID on the client.
Session ID
In browser address field: JavaScript:alert(document.cookie)
The cookie name is sid.
Request ID
To view information about request ID information on non-production systems with page caching disabled, use the “Show Request Log”.
Troubleshooting Server Side
Find the session ID and request ID on the server.
On the server side, use the Salesforce B2C Commerce APIs to retrieve the session and request IDs.
| ID | API |
|---|
| Session | dw.system.Session.sessionID : String |
| Request | dw.system.Request.requestID : String |
Important storefront Application pipelines:
- OnSession-Do - called during first request of session, also if a cached page is delivered
- OnRequest-Do - called for each request, also if a cached page is delivered
- Prefix-Start - called before the actual pipeline if dynamic response is delivered
Important parameters for code instrumentation:
- Request.gethttpQueryString
- Request.gethttpReferer
- Request.gethttpUserAgent
See the B2C Commerce API Documentation for more information.