{"title":"Install the cartridge and import the metadata","category":"default","creationDate":1677244080,"content":"<h2>Prerequisites<\/h2>\n<p>Before you install the Adyen cartridge, make sure that you:<\/p>\n<ol>\n<li>Have access to the Salesforce Sandbox.<\/li>\n<li>Installed the <a href=\"https:\/\/github.com\/SalesforceCommerceCloud\/storefront-reference-architecture\/tree\/master\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Storefront Reference Architecture (SFRA) repository on GitHub<\/a>. You need developer access to access the repository on GitHub.<\/li>\n<li>Downloaded the Adyen cartridge from our <a href=\"https:\/\/github.com\/Adyen\/adyen-salesforce-commerce-cloud\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">GitHub repository<\/a>.<\/li>\n<li>v25.3.0 or later: the Adyen cartridge uses modern JavaScript ES6+. If your Salesforce environment requires ES5 compatibility, you must <a href=\"#step-3-build-the-code\">transpile the source code<\/a>.<\/li>\n<\/ol>\n<h2>Step 1: Set your credentials and version<\/h2>\n<p>In your cartridge's root directory, create a <code>dw.json<\/code> 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 <a href=\"https:\/\/help.salesforce.com\/s\/articleView?id=cc.b2c_webdav_authentication_and_authorization.htm&amp;type=5\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\"> WebDAV authentication in the Salesforce documentation<\/a>.<\/p>\n<pre><code class=\"language-json\">{\n    \"hostname\": \"YOUR-SANDBOX-HOSTNAME.demandware.net\",\n    \"username\": \"*@example.com\",\n    \"password\": \"YOUR_WEBDAV_ACCESS_KEY\",\n    \"code-version\": \"VERSION_TO_UPLOAD_TO\"\n}<\/code><\/pre>\n<h2 id=\"step-2-install-node-modules\">Step 2: Install Node modules<\/h2>\n<p>From your cartridge's root directory, install Node modules using your command line:\u00a0<\/p>\n<pre><code class=\"language-sh\">npm install<\/code><\/pre>\n<h2 id=\"step-3-build-the-code\">Step 3: Build the code<\/h2>\n<p>The source files in the <strong>\/src<\/strong> 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:<\/p>\n<pre><code class=\"language-sh\">npm run build<\/code><\/pre>\n<p>This command does the following:<\/p>\n<ul>\n<li>Transpiles the JavaScript ES6+ code so that it is compatible with ES5.<\/li>\n<li>Compiles the modern JavaScript modules.<\/li>\n<li>Outputs deployable code in the <strong>\/cartridges<\/strong> directory<\/li>\n<\/ul>\n<h2 id=\"step-4-import-the-metadata\">Step 4: Import the metadata<\/h2>\n<p>To add new configuration items,\u00a0import the predefined metadata:\u00a0<\/p>\n<ol>\n<li>Include your customizations in the metadata file.<\/li>\n<li>Open the\u00a0<strong>package\/metadata\/site_import\/sites\/<\/strong>\u00a0folder.<\/li>\n<li>Rename the\u00a0<strong>yourSiteId<\/strong> (RefArch) folder to the ID of your site in your Salesforce Business Manager.<\/li>\n<li>Open the <strong>package\/metadata\/site_import\/jobs.xml<\/strong> file.<\/li>\n<li>Rename the <code>site-id<\/code> to the ID of your site in your Salesforce Business Manager.<\/li>\n<li>Zip the\u00a0<strong>site_import<\/strong>\u00a0folder.\u00a0<\/li>\n<li>In the Business Manager, go to <strong>Administration<\/strong> &gt; <strong>Site Development<\/strong> &gt; <strong>Site Import &amp; Export<\/strong>\u00a0and\u00a0import the zipped file.<\/li>\n<\/ol>\n<p>After the import, attributes named\u00a0<strong>Adyen[attributeName]<\/strong>\u00a0are added to:\u00a0<\/p>\n<ul>\n<li><strong>Administration<\/strong>\u00a0&gt;\u00a0<strong>Site Development<\/strong>\u00a0&gt;\u00a0<strong>System Object Types<\/strong>\u00a0&gt;\u00a0<strong>Site Preferences<\/strong>\u00a0&gt;\u00a0<strong>Attribute Definitions<\/strong><\/li>\n<li><strong>Administration<\/strong>\u00a0&gt;\u00a0<strong>Site Development<\/strong>\u00a0&gt;\u00a0<strong>System Object Types<\/strong>\u00a0&gt;\u00a0<strong>Order<\/strong>\u00a0&gt;\u00a0<strong>Attribute Definitions<\/strong><\/li>\n<li><strong>Administration<\/strong>\u00a0&gt;\u00a0<strong>Site Development<\/strong>\u00a0&gt;\u00a0<strong>Custom Object Types<\/strong>\u00a0<\/li>\n<\/ul>\n<p>Also, the following services are added to\u00a0<strong>Administration<\/strong>\u00a0&gt; <strong>Operations<\/strong>\u00a0&gt; <strong>Services<\/strong>:<\/p>\n<ul>\n<li><strong>AdyenPayment<\/strong><\/li>\n<li><strong>AdyenRecurring<\/strong><\/li>\n<li><strong>AdyenRecurringDisable<\/strong><\/li>\n<li><strong>AdyenPosPayment<\/strong><\/li>\n<li><strong>AdyenOriginKeys<\/strong><\/li>\n<li><strong>AdyenCheckoutPaymentMethods<\/strong><\/li>\n<li><strong>AdyenPaymentDetails<\/strong><\/li>\n<\/ul>\n<div class=\"notices yellow\">\n<p>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.<\/p>\n<\/div>\n<p>Watch how to import the metadata:<\/p>\n<iframe src=\"https:\/\/player.vimeo.com\/video\/781802253\" width=\"640\" height=\"360\" frameborder=\"0\" allow=\"autoplay; fullscreen; picture-in-picture\" allowfullscreen><\/iframe>","url":"https:\/\/docs.adyen.com\/pt\/plugins\/salesforce-commerce-cloud\/sfra\/install-the-cartridge-and-import-the-metadata","articleFields":{"next_steps":[{"title":"Set up the cartridge","description":"Configure the cartridge in the Adyen Customer Area and in the Salesforce Business Manager.","url":"\/plugins\/salesforce-commerce-cloud\/sfra\/set-up-the-cartridge","required":true}],"id":"42850191","type":"page","_expandable":{"operations":""},"status":"current","last_edit_on":"15-06-2023 13:21","feedback_component":true,"filters_component":false},"algolia":{"url":"https:\/\/docs.adyen.com\/pt\/plugins\/salesforce-commerce-cloud\/sfra\/install-the-cartridge-and-import-the-metadata","title":"Install the cartridge and import the metadata","content":"Prerequisites\nBefore you install the Adyen cartridge, make sure that you:\n\nHave access to the Salesforce Sandbox.\nInstalled the Storefront Reference Architecture (SFRA) repository on GitHub. You need developer access to access the repository on GitHub.\nDownloaded the Adyen cartridge from our GitHub repository.\nv25.3.0 or later: the Adyen cartridge uses modern JavaScript ES6+. If your Salesforce environment requires ES5 compatibility, you must transpile the source code.\n\nStep 1: Set your credentials and version\nIn 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.\n{\n    \"hostname\": \"YOUR-SANDBOX-HOSTNAME.demandware.net\",\n    \"username\": \"*@example.com\",\n    \"password\": \"YOUR_WEBDAV_ACCESS_KEY\",\n    \"code-version\": \"VERSION_TO_UPLOAD_TO\"\n}\nStep 2: Install Node modules\nFrom your cartridge's root directory, install Node modules using your command line:\u00a0\nnpm install\nStep 3: Build the code\nThe 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:\nnpm run build\nThis command does the following:\n\nTranspiles the JavaScript ES6+ code so that it is compatible with ES5.\nCompiles the modern JavaScript modules.\nOutputs deployable code in the \/cartridges directory\n\nStep 4: Import the metadata\nTo add new configuration items,\u00a0import the predefined metadata:\u00a0\n\nInclude your customizations in the metadata file.\nOpen the\u00a0package\/metadata\/site_import\/sites\/\u00a0folder.\nRename the\u00a0yourSiteId (RefArch) folder to the ID of your site in your Salesforce Business Manager.\nOpen the package\/metadata\/site_import\/jobs.xml file.\nRename the site-id to the ID of your site in your Salesforce Business Manager.\nZip the\u00a0site_import\u00a0folder.\u00a0\nIn the Business Manager, go to Administration &gt; Site Development &gt; Site Import &amp; Export\u00a0and\u00a0import the zipped file.\n\nAfter the import, attributes named\u00a0Adyen[attributeName]\u00a0are added to:\u00a0\n\nAdministration\u00a0&gt;\u00a0Site Development\u00a0&gt;\u00a0System Object Types\u00a0&gt;\u00a0Site Preferences\u00a0&gt;\u00a0Attribute Definitions\nAdministration\u00a0&gt;\u00a0Site Development\u00a0&gt;\u00a0System Object Types\u00a0&gt;\u00a0Order\u00a0&gt;\u00a0Attribute Definitions\nAdministration\u00a0&gt;\u00a0Site Development\u00a0&gt;\u00a0Custom Object Types\u00a0\n\nAlso, the following services are added to\u00a0Administration\u00a0&gt; Operations\u00a0&gt; Services:\n\nAdyenPayment\nAdyenRecurring\nAdyenRecurringDisable\nAdyenPosPayment\nAdyenOriginKeys\nAdyenCheckoutPaymentMethods\nAdyenPaymentDetails\n\n\nMake 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.\n\nWatch how to import the metadata:\n","type":"page","locale":"pt","boost":16,"hierarchy":{"lvl0":"Home","lvl1":"Plugins","lvl2":"Salesforce Commerce Cloud - B2C Commerce","lvl3":"Storefront Reference Architecture (SFRA)","lvl4":"Install the cartridge and import the metadata"},"hierarchy_url":{"lvl0":"https:\/\/docs.adyen.com\/pt","lvl1":"https:\/\/docs.adyen.com\/pt\/plugins","lvl2":"https:\/\/docs.adyen.com\/pt\/plugins\/salesforce-commerce-cloud","lvl3":"https:\/\/docs.adyen.com\/pt\/plugins\/salesforce-commerce-cloud\/sfra","lvl4":"\/pt\/plugins\/salesforce-commerce-cloud\/sfra\/install-the-cartridge-and-import-the-metadata"},"levels":5,"category":"Plugins","category_color":"green","tags":["Install","cartridge","import","metadata"]}}
