---
schema_version: "1"
id: 9727d96be102907117c9dabaca88dcb9552e6eb2a4123bfcc68de3b9cd3317e4
title: Troubleshooting with the Session ID and Request ID
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/commerce-cloud/b2c-commerce/guides/ops-troubleshooting/b2c-troubleshooting-session-id-request-id.md
canonical_url: https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/b2c-troubleshooting-session-id-request-id.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 6f91161bd6ad2d6c4de49c81e319013a95454dca5f7ad72bfa1d3e11d3c3a036
products:
  - Composable Storefront
  - Salesforce APIs
---
# 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

```
Example: 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.

```
Example: 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.
