---
schema_version: "1"
id: 40b82d3975d3853e6d7d309489a0b279831c859f3b8067e33cffe70fa508ae7f
title: Troubleshooting
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.md
canonical_url: https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/b2c-troubleshooting.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: bfc1105691c0ad8cdb4bcf1422affdca815ef715e95625fb0d0151b40ffa86e2
products:
  - Composable Storefront
  - Salesforce APIs
---
# Troubleshooting

If a problem occurs with your Salesforce B2C Commerce installation, knowing the best ways to approach it will minimize customer impact and avoid frustration.

1. Can you see an error on a web page?

   - Document your most recent actions leading up to the problem.
   - If it's a non-production system, use the Show Request Log to get more detailed error information.
   - If it's a production system, note the session ID, URL, and exact time. Use them to identify the corresponding error in log files.

1. Did a user report an error?

   - Are session ID, URL, exact time, performed activity information available? Try to correlate this information with the log messages.
   - Review error log files daily during the QA phase and production.

1. Try to reproduce the error. Then document your findings clearly and precisely. The more details, the better.
1. Review the available log files and use them to identify the click stream and the original referrer.
1. In more complex situations, use _code instrumentation_ to capture more detailed information.

**tip:** Code instrumentation: adding extra statements to source code for the purposes of testing, debugging, tuning, or tracing.

## Speed Up Diagnostics with the B2C Commerce CLI

The [B2C Commerce CLI](https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/b2c-developer-tooling.md) lets you stream, filter, and search logs from your terminal, so you can correlate errors without logging into Business Manager. To install the tool and authenticate, see [Agentic B2C Developer Toolkit](https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/b2c-developer-tooling.md).

```bash
# Watch ERROR- and FATAL-level entries in real time
b2c logs tail --level ERROR --level FATAL

# Filter the tail to a specific string
b2c logs tail --search "OrderMgr"

# Pull the last 200 error entries as JSON for further processing
b2c logs get --count 200 --level ERROR --json

# Look at the last hour of errors matching a keyword
b2c logs get --since 1h --level ERROR --search "PaymentProcessor"

# Inspect the most recent job execution log (or only failed executions)
b2c job log my-custom-job
b2c job log my-custom-job --failed
```

For the full command reference, see [Logs Commands](https://salesforcecommercecloud.github.io/b2c-developer-tooling/cli/logs.html) and [Job Commands](https://salesforcecommercecloud.github.io/b2c-developer-tooling/cli/jobs.html) in the Agentic B2C Developer Toolkit documentation.

## Considerations

| Item to consider                                                        | Helps you understand                                                      |
| ----------------------------------------------------------------------- | ------------------------------------------------------------------------- |
| [Infrastructure](https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/b2c-troubleshooting-infrastructure.md)                 | How the various components work together.                                 |
| [Session ID / Request ID](https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/b2c-troubleshooting-session-id-request-id.md) | How to track requests and sessions.                                       |
| [Log Files / Log Levels](https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/site-development/b2c-log-files-overview.md) | How to glean important information from the log file.                     |
| [Remote Includes](https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/b2c-understanding-remote-includes.md)                 | Additional Application Server requests.                                   |
| [Staging Problems](https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/b2c-identifying-staging-problems.md)                 | How to identify and correct staging problems.                             |
| [Reporting to B2C Commerce Support](https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/b2c-reporting-to-support.md)      | Whom to notify concerning specific types of issues and how to notify them |
