Bootstrap an account using the Fluent CLI
Author:
Ankit Mehta
Changed on:
21 Mar 2025
Key Points
- Create a profile
- Create a retailer
- Configure and Install the Fluent Reference Modules
- Configure and Install the Extension Data module
- Validate the Account setup
Steps
Prerequisites
- Access to a Fluent Account, including the Account Admin credentials
- The Fluent CLI is successfully installed (see Getting Started with the Fluent CLI)
- Postman (and the Fluent CLI Test Collection)
Create a Profile
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-sample --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 a sample Retailer on the Account:
`fluent retailer create sample --email sample@test.com --profile cli-sample`
Configure Reference 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 sample --profile cli-sample`
`fluent module config inventory --retailer sample --profile cli-sample`
This will produce new module configuration files in the current working directory:
- module.config.sample.order.json
- module.config.sample.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 Data Module, we know the set up we’re creating, and can populate these files with the following information.
Order Config for Sample Retailer set up:
1{
2 "default:system.rejected.location.ref": "RJT_1",
3 "default:inventory.catalogue.ref": "DEFAULT:1",
4 "default:inventory.retailer.id": "1",
5 "default:carrier.ref": "DEFAULT_CARRIER:1",
6 "default:label.url": "DEMO_UK_RoyalMail_Label.pdf",
7 "workflow:order:cc:network.ref": "SAMPLE_CC_1",
8 "workflow:order:cc:virtual.catalogue.ref": "BASE:1",
9 "workflow:order:hd:network.ref": "SAMPLE_HD_1",
10 "workflow:order:hd:virtual.catalogue.ref": "BASE:1",
11 "workflow:order:multi:network.ref": "SAMPLE_BASE_1",
12 "workflow:order:multi:virtual.catalogue.ref": "BASE:1"
13}
Language: json
Name: module.config.sample.order.json
Description:
Updated order module config for a retailer with id = 1.
Inventory Config for Sample Retailer set up:
1{
2 "default:product.catalogue.ref": "PC:MASTER:1",
3 "default:product.catalogue.type": "MASTER",
4 "default:inventory.catalogue.ref": "DEFAULT:1",
5 "default:inventory.catalogue.type": "DEFAULT",
6 "default:inventory.retailer.id": "1",
7 "default:inventory.change.event.name": "InventoryChanged",
8 "default:virtual.catalogue.base.ref": "BASE:1",
9 "default:virtual.catalogue.aggregate.ref": "ATS:1"
10}
Language: json
Name: module.config.sample.inventory.json
Description:
Updated inventory module config for a retailer with id = 1.
Install Reference Modules
You’re now ready to install each of the Reference Modules.
- Install the Core Reference Module:
`fluent module install core --retailer sample --profile cli-sample`
- Install the Fulfilment Reference Module:
`fluent module install fulfilment --retailer sample --profile cli-sample`
- Install the Order Reference Module with our configuration:
`fluent module install order --config module.config.sample.order.json --retailer sample --profile cli-sample`
- Install the Inventory Reference Module with our configuration:
`fluent module install inventory --config module.config.sample.inventory.json --retailer sample --profile cli-sample`
The Reference Modules are now installed on the Account for
`sample`
Configure and Install the Extension Data Module
Once the Account is ready with the Reference Modules, it's time to create assets like settings, users, locations, products, etc using an extension data module. Follow one of the below recipes:
Test your Account Setup
Now that you have completed the set up of the Account and Retailer, let’s test it out.
Note: The below validation steps may only work if the Extension Data Module is setup completely (including the products, locations, settings, etc)
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: This will create a new Postman Environment File in the current working directory.
`fluent profile export cli-sample --format postman --retailer sample`
- Open the Postman Environment File and copy the password for the sample Retailer Admin User.
- Open the Postman Environment File and copy the password for the sample 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 (as per the configured Extension Data Module):
- Retailers
- Carriers
- Users
- Roles
- Settings
- Locations
- Networks
- Product Catalogues (Including Products & Categories)
- Inventory Catalogue
- Virtual Catalogues
- Control Groups
- Take a look around at the following areas to see the data created (as per the configured Extension Data Module):
- Import the Environment File and CLI Test Collection into Postman
- Authenticate the Account Admin User
- 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 (Dependent on Product / Inventory Feeds)
- Create a HD Order (Dependent on Product / Inventory Feeds)
- Authenticate the Account Admin User
- 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: <LocationRef> / <LocationPassword>
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
- Log in with username / password: <LocationRef> / <LocationPassword>