Before you can use the Fluent CLI, you will need to create a Profile for the Account you intend to interact with:`fluent profile create cli-b2c --id <ACCOUNT_ID> --base-url https://<account_id>.sandbox.api.fluentretail.com --username <account_id>_admin --password <password> --client-secret <client_secret>`Make sure you replace the placeholders above with the relevant Account information.
Create a Retailer
Next, create the B2C Retailer on the Account:`fluent retailer create b2c --email b2c@test.com --profile cli-b2c`
Note
Take note of the Retailer ID if you are not using a fresh Account - this will be needed in the next step.
Configure Modules
The Order and Inventory Modules require configuration to be provided to the install. To generate the configuration files, run the following commands:`fluent module config order --retailer b2c --profile cli-b2c``fluent module config inventory --retailer b2c --profile cli-b2c`This will produce new module configuration files in the current working directory:
module.config.b2c.order.json
module.config.b2c.inventory.json
You will need to open each of these in a text editor to populate the relevant information. Since we are providing a Sample B2C Data Module, we know the set up we’re creating, and can populate these files with the following information.
Check the Retailer ID!
If you are creating this Retailer on a fresh Account, the Retailer Id is likely 1, however, please check the Retailer Id of the Retailer you created in the previous step, and update the below configurations appropriately.
If you are creating this Retailer on a fresh Account, the Retailer Id is likely 1, however, please check the Retailer Id of the Retailer you created in the previous step, and update the below configurations appropriately.
Install Reference Modules
You’re now ready to install each of the Reference Modules.
Install the Order Reference Module with our configuration: `fluent module install order --config module.config.b2c.order.json --retailer b2c --profile cli-b2c`
Install the Inventory Reference Module with our configuration: `fluent module install inventory --config module.config.b2c.inventory.json --retailer b2c --profile cli-b2c`
The Reference Modules are now installed on the Account for Retailer`b2c`.
Configure & Install the Sample Data Module
The Sample B2C Data Module requires a module configuration file:
Configure the Sample B2C Data Module: `fluent module config https://downloads.fluentcommerce.com/v1.0.0/modules/fcx/b2c-sample-data/latest --retailer b2c --profile cli-b2c`
Install the Sample B2C Data Module: `fluent module install https://downloads.fluentcommerce.com/v1.0.0/modules/fcx/b2c-sample-data/latest --retailer b2c --profile cli-b2c`
Sample B2C Data Config for Sample B2C Retailer set up:
Configure & Install the Sample Data Inventory Module
Wait 10 Minutes!
Due to Fluent Platform Caches, you should wait 10 minutes after creating a new Inventory Catalogue before installing the Inventory Data Module! Otherwise, the inventory batches/events will not be processed into the catalogues.
The Sample B2C Data Inventory Module requires a module configuration file:
Configure the Sample B2C Data Inventory Module: `fluent module config https://downloads.fluentcommerce.com/v1.0.0/modules/fcx/b2c-sample-data-inventory/latest --retailer b2c --profile cli-b2c`
Install the Sample B2C Data Inventory Module: `fluent module install https://downloads.fluentcommerce.com/v1.0.0/modules/fcx/b2c-sample-data-inventory/latest --config module.config.b2c.b2c-sample-data-inventory.json --retailer b2c --profile cli-b2c`
Note
The configuration file is pre-populated with a value to disable Batch pre-processing on the Account. This is applicable for the Training environment, however, you should not disable this on other Accounts.
Test your Account Setup
Now that you have completed the set up of the Account and Retailer, let’s test it out.We’ve added a Profile Export capability for a Postman Environment File which can be used with the Postman Collection provided in the Sample B2C Project postman folder.
Export the Profile for Postman: `fluent profile export cli-b2c --format postman --retailer b2c` This will create a new Postman Environment File in the current working directory.
Open the Postman Environment File and copy the password for the b2c Retailer Admin User.
Open the Fluent OMS web app in a browser, and log in to the Fluent OMS web app: `https://<account_id>.sandbox.apps.fluentcommerce.com/oms/`
Take a look around at the following areas to see the data created:
Run the “Get Plugin Rules” request. Click on the “Visualize” tab in the response window to view the Installed Plugins and Rules library.
Authenticate the Retailer Admin User
View the installed Workflows
Create a Customer
Create a CC Order
Create a HD Order
Return to the Fluent OMS web app, and view the new Orders, and the Inventory Reservations
Open the Fluent Store web app: `https://<account_id>.sandbox.apps.fluentcommerce.com/store/`
Log in with username / password: B2C_SYD_1 / B2C_SYD_1 Note: Replace the 1 with the relevant Retailer Id, should this not be the first Retailer in the Account.
Create a Wave, and complete the Pick, Pack, Dispatch process Note: You can see the Order and Fulfilment statuses change for each step in Fluent OMS
Collect the Articles using the Customer Collection and Carrier Collection Screens
The Orders should now be completed
Congratulations!
You have completed a baseline Account and Retailer set up based on Reference Modules and a Sample B2C Retailer!