Authors:
Marco Heuer, Lesley Dean
Changed on:
21 Oct 2024
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.
Next, create the B2C Retailer on the Account:
`fluent retailer create b2c --email b2c@test.com --profile cli-b2c`
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:
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.
Order Config for Sample B2C 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": "B2C_CC_1",
8 "workflow:order:cc:virtual.catalogue.ref": "BASE:1",
9 "workflow:order:hd:network.ref": "B2C_HD_1",
10 "workflow:order:hd:virtual.catalogue.ref": "BASE:1",
11 "workflow:order:multi:network.ref": "B2C_BASE_1",
12 "workflow:order:multi:virtual.catalogue.ref": "BASE:1"
13}
Language: json
Name: module.config.b2c.order.json
Description:
Updated order module config for a retailer with id = 1.
Inventory Config for Sample B2C 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.b2c.inventory.json
Description:
Updated inventory module config for a retailer with id = 1.
You’re now ready to install each of the Reference Modules.
`fluent module install core --retailer b2c --profile cli-b2c`
`fluent module install fulfilment --retailer b2c --profile cli-b2c`
`fluent module install order --config module.config.b2c.order.json --retailer b2c --profile cli-b2c`
`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`
You’re now ready to install the Sample Data Module for the B2C Retailer.
`fluent module install https://downloads.fluentcommerce.com/v1.0.0/modules/fcx/b2c-sample-data/latest --retailer b2c --profile cli-b2c`
The Sample B2C Data Inventory Module requires a module configuration file:
`fluent module config https://downloads.fluentcommerce.com/v1.0.0/modules/fcx/b2c-sample-data-inventory/latest --retailer b2c --profile cli-b2c`
`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`
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.
`fluent profile export cli-b2c --format postman --retailer b2c`
`https://<account_id>.sandbox.apps.fluentcommerce.com/oms/`
`https://<account_id>.sandbox.apps.fluentcommerce.com/store/`
Copyright © 2024 Fluent Retail Pty Ltd (trading as Fluent Commerce). All rights reserved. No materials on this docs.fluentcommerce.com site may be used in any way and/or for any purpose without prior written authorisation from Fluent Commerce. Current customers and partners shall use these materials strictly in accordance with the terms and conditions of their written agreements with Fluent Commerce or its affiliates.