--- title: "Install the cartridge and import the metadata" url: "https://docs.adyen.com/plugins/salesforce-commerce-cloud/sfra/install-the-cartridge-and-import-the-metadata" source_url: "https://docs.adyen.com/plugins/salesforce-commerce-cloud/sfra/install-the-cartridge-and-import-the-metadata.md" canonical: "https://docs.adyen.com/plugins/salesforce-commerce-cloud/sfra/install-the-cartridge-and-import-the-metadata" last_modified: "2023-06-15T13:21:00+02:00" language: "en" --- # Install the cartridge and import the metadata [View source](/plugins/salesforce-commerce-cloud/sfra/install-the-cartridge-and-import-the-metadata.md) ## Prerequisites Before you install the Adyen cartridge, make sure that you: 1. Have access to the Salesforce Sandbox. 2. Installed the [Storefront Reference Architecture (SFRA) repository on GitHub](https://github.com/SalesforceCommerceCloud/storefront-reference-architecture/tree/master). You need developer access to access the repository on GitHub. 3. Downloaded the Adyen cartridge from our [GitHub repository](https://github.com/Adyen/adyen-salesforce-commerce-cloud). 4. v25.3.0 or later: the Adyen cartridge uses modern JavaScript ES6+. If your Salesforce environment requires ES5 compatibility, you must [transpile the source code](#step-3-build-the-code). ## Step 1: Set your credentials and version In your cartridge's root directory, create a `dw.json` file that includes the information required to establish a server connection and the code version that you want to upload your cartridge to. Read more about [WebDAV authentication in the Salesforce documentation](https://help.salesforce.com/s/articleView?id=cc.b2c_webdav_authentication_and_authorization.htm\&type=5). ```json { "hostname": "YOUR-SANDBOX-HOSTNAME.demandware.net", "username": "*@example.com", "password": "YOUR_WEBDAV_ACCESS_KEY", "code-version": "VERSION_TO_UPLOAD_TO" } ``` ## Step 2: Install Node modules From your cartridge's root directory, install Node modules using your command line:  ```sh npm install ``` ## Step 3: Build the code The source files in the **/src** directory use modern Javascript ES6+ syntax and modern tooling that Salesforce Commerce Cloud does not natively support. You must run the following to generate output that is compatible with JavaScript ES5: ```sh npm run build ``` This command does the following: * Transpiles the JavaScript ES6+ code so that it is compatible with ES5. * Compiles the modern JavaScript modules. * Outputs deployable code in the **/cartridges** directory ## Step 4: Import the metadata To add new configuration items, import the predefined metadata:  1. Include your customizations in the metadata file. 2. Open the **package/metadata/site\_import/sites/** folder. 3. Rename the **yourSiteId** (RefArch) folder to the ID of your site in your Salesforce Business Manager. 4. Open the **package/metadata/site\_import/jobs.xml** file. 5. Rename the `site-id` to the ID of your site in your Salesforce Business Manager. 6. Zip the **site\_import** folder.  7. In the Business Manager, go to **Administration** > **Site Development** > **Site Import & Export** and import the zipped file. After the import, attributes named **Adyen\[attributeName]** are added to:  * **Administration** > **Site Development** > **System Object Types** > **Site Preferences** > **Attribute Definitions** * **Administration** > **Site Development** > **System Object Types** > **Order** > **Attribute Definitions** * **Administration** > **Site Development** > **Custom Object Types**  Also, the following services are added to **Administration** > **Operations** > **Services**: * **AdyenPayment** * **AdyenRecurring** * **AdyenRecurringDisable** * **AdyenPosPayment** * **AdyenOriginKeys** * **AdyenCheckoutPaymentMethods** * **AdyenPaymentDetails** Make sure that you do not change the version numbers of the endpoints in the above services. Doing so could lead to errors in your integration. Watch how to import the metadata: Embedded video (Vimeo): ## Next steps [required](/plugins/salesforce-commerce-cloud/sfra/set-up-the-cartridge) [Set up the cartridge](/plugins/salesforce-commerce-cloud/sfra/set-up-the-cartridge) [Configure the cartridge in the Adyen Customer Area and in the Salesforce Business Manager.](/plugins/salesforce-commerce-cloud/sfra/set-up-the-cartridge)