This guide assumes the following in Salesforce:
- Commerce is enabled
- Logik.io Base Managed Package is installed
- System Administrator or similar access is available in order to perform the steps listed.
- If it isn't already installed, download and install the Salesforce Command Line Interface (CLI) using the instructions here: https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_install_cli.htm
- Download and extract the logik-b2b.zip file, which contains the components used for the B2B integration.
- On Windows, right click and select "Extract All...". Follow the prompts that appear on screen.
- On Mac, double click the file and its contents will be extracted automatically in the same location.
- Launch the program Terminal (on Mac or Linux) or Powershell (on Windows).
- Use the change directory (cd) command to navigate to the unzipped directory. For example, if the files were extracted in the Downloads folder, type and enter the command "cd Downloads/logik-b2b".
- For an in-depth guide to navigation using the command line, refer the following:
- Type and enter the command "ls" and a list of files and folders in that directory will be returned. Included in the list should be the folder "src" and the file "sfdx-project.json", along with this README.
- Run the command "sfdx auth:web:login --setalias myOrg -r https://example-dev-ed.my.salesforce.com"
- Replace the URL following "-r " with the one that the Logik-B2B integration will be set up on.
- The text following "--setalias " is a nickname that is used to identify and reference the correct Salesforce org (multiple Salesforce orgs can be connected to a single machine). The example "myOrg" will be used for the purposes of this guide; if using another alias here, be sure to use that same alias in the following steps.
- The URL specified in the previous login command will be opened in the default browser. Log in and authorize the "Salesforce CLI" connected app.
- In the command line, run the command "sfdx force:source:deploy -p src -u myOrg". After a few moments, the command line will return a confirmation message, "Deploy Succeeded."
- (Optional) If the Salesforce org isn’t already open in a browser, it can be opened and logged in by running the command “sfdx force:org:open -u myOrg”.
Next steps depend on the type of integration with Logik: the pre-built Logik UI embedded on the product detail page, a REST API to consume, or both. To use the Logik's native UI, refer to "iFrame Integration Setup" in the docs folder. To use the REST API to add configurations to carts, refer to "REST API Integration", also in the docs folder.