# Set up Bolt on SAP Commerce Cloud

> Install the Bolt backoffice and Spartacus frontend modules on SAP Commerce Cloud (hybris).

Source: https://help.boltapp.com/platforms/sap

Install Bolt on SAP Commerce Cloud (also known as hybris) by adding the Bolt backoffice extensions and wiring the Bolt Checkout module into your Spartacus storefront.

<Note>
  The SAP integration is delivered by your Bolt CSM as a package. Contact your CSM to get the Bolt file before you start.
</Note>

**Platform support**

This guide is for SAP Commerce Cloud. Other platforms and custom web apps have their own quickstarts.

<IntegrationTable>
  <CommercePlatforms current="sap" />
</IntegrationTable>

## Prerequisites [#prerequisites]

* Bolt merchant account
* SAP Commerce Cloud (hybris) installation with access to `/hybris/config`
* A Spartacus storefront
* The Bolt integration file provided by your CSM

## Backoffice setup [#backoffice-setup]

1. Unzip the Bolt file from your CSM to a temporary folder.
2. Copy the `boltbackoffice` and `boltocc` directories into your Commerce Cloud installation.
3. In `/hybris/config/localextensions.xml`, register the extensions:

```xml title="XML"
<extension name="boltocc" />
<extension name="boltbackoffice" />
```

4. Restart the server (Commerce Cloud: **Deploy with Recreate**; local: `ant clean all`, start the server, then run a system update).

**Expected result:** the **Bolt** tab appears in the backoffice menu. If it does not, refresh the backoffice: press **F4**, open the menu icon, and select **Reset Everything**.

## Frontend setup (Spartacus) [#frontend-setup-spartacus]

1. Copy the **Bolt-Checkout** folder into `project folder/js_storefront/spartacusstore/src/app/Spartacus`.
2. Import `BoltCheckoutModule` in `checkout-feature.module.ts` (`spartacus/features/checkout`) and add it to the module `imports`:

```js title="JavaScript"
import { BoltCheckoutModule } from '../../bolt-checkout-base/bolt-checkout.module';

@NGModule({
    declarations: [],
    imports: [CheckoutRootModule, BoltCheckoutModule],
    providers: [
        provideConfig(<CmsConfig>){
            featureModules: {
                [CHECKOUT FEATURE]: {
                    module: () =>
                        import('../../bolt-checkout-base/bolt-checkout.module').then(
                            (m) => m.BoltCheckoutModule
                        ),
                },
            },
        },
    ],
})
```

3. Copy the files under `spartacus/features/shared`.
4. In `apps.module.ts`, add `BoltMessageComponentModule` to `imports` and `...boltErrorHandlers` to `providers`.

**Expected result:** the Bolt Checkout module builds with your Spartacus storefront.

## Production checklist [#production-checklist]

* Switch to production API keys and dashboard
* Approved production domain
* Processor live credentials configured in the Bolt dashboard

## Troubleshooting [#troubleshooting]

* **Bolt** tab missing in backoffice: reset the backoffice (**F4** > menu icon > **Reset Everything**).
* Extensions not loading: confirm both `boltocc` and `boltbackoffice` are registered in `localextensions.xml` and that a system update ran.
