Authors:
Lesley Dean, Marco Heuer
Changed on:
22 Oct 2024
The Fluent CLI provides command line tooling for interacting with Fluent Accounts and Modules.
Usage
The Fluent CLI is activated by typing the keyword
`fluent`
`fluent <command> <subcommand> <argument> [options]`
`<command>`
`<subcommand>`
`<argument>`
`<command>`
`[options]`
`<command>`
`<subcommand>`
Author:
Marco Heuer
Changed on:
22 Oct 2024
Global options to control the functioning of the CLI.
As one would expect, the tool has several top-level options:
`--version`
`--help`
To control the verbosity of the output:
`--debug`
`--quiet`
Author:
Lesley Dean
Changed on:
22 Oct 2024
The
`profile`
`create`
`update`
`export`
`create`
The
`create`
`.fluentcommerce`
`profile.json`
`user.<account_admin>.json`
1fluent profile create <profile_name> [options]
Language: sh
Name: Profile Create
Description:
Example usage of the Fluent CLI Profile Create command
Argument Name | Description | Example |
| The name of the profile to create |
|
Option Name | Description | Required | Default | Example |
| A valid Fluent Account ID | ✅
| N/A |
|
| The Account specific API Url | ✅
| N/A |
|
| The Account Admin Username | ✅
| N/A |
|
| The Account Admin Password | ✅
| N/A |
|
| The Account Client Secret | ✅
| N/A |
|
Let’s assume you have a Sandbox Account called
`ACME`
`acme_admin`
`my-acme-profile`
1fluent profile create my-acme-profile --id ACME --base-url https://acme.sandbox.api.fluentretail.com --username acme_admin --password S3CR37 --client-secret abc123-xyz987-s3cr37
Language: sh
Name: Example Usage
Description:
Example of creating a new Profile
1/Users/jonsnow/.fluentcommerce/my-acme-profile/
2 profile.json
3 user.acme_admin.json
Language: plain_text
Name: Profile Directory
Description:
Example of the Profile directory created as a result of the example command
`profile.json`
1{
2 "id": "ACME",
3 "baseUrl": "https://acme.sandbox.api.fluentretail.com",
4 "clientSecret": "abc123-xyz987-s3cr37",
5 "user": "acme_admin"
6}
Language: plain_text
Name: profile.json file
Description:
Example contents of the profile.json file
`user.acme_admin.json`
1{
2 "username": "acme_admin",
3 "password": "S3CR37"
4}
Language: plain_text
Name: user json file
Description:
Example contents of a user json file
`update`
The
`update`
`.fluentcommerce`
It can be used to perform the following actions:
`retailer`
`user`
`user`
`user`
1fluent profile update <profile_name> [options]
Language: plain_text
Name: Profile Update Usage
Description:
Profile Update Command Usage
Argument Name | Description | Example |
| The name of the profile to create |
|
Option Name | Description | Required | Default | Example |
| A User Reference (username) | ✅ *when updating a profile or retailer user reference | N/A | acme_admin |
| The User’s Username | ✅ *when adding a user | N/A | acme_admin |
| The User’s Password | ✅ *when adding a user | N/A | S3CR37 |
| A Retailer Reference | ✅ *when adding a retailer | N/A | fc_fashion |
| A Retailer ID | ✅ *when adding a retailer | N/A | ACME |
Let’s assume you have the ACME Account Profile with a single Retailer
`fc_fashion`
1# Add a new User:
2fluent profile update my-acme-profile --username acme_super --password S3CR37
3
4# Update the default Account User Ref in profile.json:
5fluent profile update my-acme-profile --user acme_super
6
7# Add a new (but existing) Retailer (and User):
8fluent profile update my-acme-profile --retailer fc_sports --id 2 --username fc_sports_admin --password S3CR37
9
10# Update the default Retailer User Ref in retailer.<retailer_ref>.json:
11fluent profile update my-acme-profile --retailer fc_fashion --user fc_fashion_super
Language: plain_text
Name: Command Examples
Description:
Examples of Profile Update Command Usage
1/Users/jonsnow/.fluentcommerce/my-acme-profile/
2 profile.json
3 retailer.fc_fashion.json
4 retailer.fc_sports.json
5 user.acme_admin.json
6 user.acme_super.json
7 user.fc_fashion_admin.json
8 user.fc_sports_admin.json
Language: plain_text
Name: Updated Profile Directory
Description:
The updated contents of the Profile Directory
`profile.json`
1{
2 "id": "ACME",
3 "baseUrl": "https://acme.sandbox.api.fluentretail.com",
4 "clientSecret": "abc123-xyz987-s3cr37",
5 "user": "acme_super"
6}
Language: sh
Name: Updated Profile Json
Description:
Updated
`profile.json`
`retailer.fc_fashion.json`
1{
2 "id": "1",
3 "ref": "fc_fashion",
4 "user": "fc_fashion_super"
5}
Language: json
Name: Updated Retailer File
Description:
Updated
`retailer.fc_fashion.json`
Note: You would need to add the `fc_fashion_super`
`retailer.fc_sports.json`
1{
2 "id": "2",
3 "ref": "fc_sports",
4 "user": "fc_sports_admin"
5}
Language: json
Name: Added Retailer File
Description:
Added
`retailer.fc_sports.json`
`user.acme_super.json`
1{
2 "username": "acme_super",
3 "password": "S3CR37"
4}
Language: json
Name: Added User File
Description:
Added
`user.acme_super.json`
`export`
The
`export`
1fluent profile export <profile_name> [options]
Language: sh
Name: profile export usage
Description:
profile export command usage
Argument Name | Description | Example |
| The name of the profile to export |
|
Option Name | Description | Required | Default | Example |
| The format to export to. Currently only
| ✅
| N/A |
|
| The Retailer Ref to include. This can be provided multiple times. | ✅ | N/A |
|
Let’s assume you will export the
`my-acme-profile`
`fc_fashion`
1fluent profile export my-acme-profile --format postman --retailer fc_fashion
Language: sh
Name: Example Profile Export
Description:
Profile Export Command Example
1{
2 "name": "ACME-Env",
3 "values": [
4 {
5 "key": "fluent.account.host",
6 "value": "https://acme.sandbox.api.fluentretail.com",
7 "type": "default",
8 "enabled": true
9 },
10 {
11 "key": "fluent.account.client_id",
12 "value": "ACME",
13 "type": "default",
14 "enabled": true
15 },
16 {
17 "key": "fluent.account.username",
18 "value": "acme_admin",
19 "type": "default",
20 "enabled": true
21 },
22 {
23 "key": "fluent.account.password",
24 "value": "S3CR37",
25 "type": "secret",
26 "enabled": true
27 },
28 {
29 "key": "fluent.account.client_secret",
30 "value": "abc123-xyz987-s3cr37",
31 "type": "secret",
32 "enabled": true
33 },
34 {
35 "key": "fluent.retailer.fc_fashion.id",
36 "value": "1",
37 "type": "default",
38 "enabled": true
39 },
40 {
41 "key": "fluent.retailer.fc_fashion.ref",
42 "value": "fc_fashion",
43 "type": "default",
44 "enabled": true
45 },
46 {
47 "key": "fluent.retailer.fc_fashion.user.username",
48 "value": "fc_fashion_admin",
49 "type": "default",
50 "enabled": true
51 },
52 {
53 "key": "fluent.retailer.fc_fashion.user.password",
54 "value": "S3CR37",
55 "type": "secret",
56 "enabled": true
57 },
58 {
59 "key": "fluent.retailer.current.id",
60 "value": "1",
61 "type": "default",
62 "enabled": true
63 },
64 {
65 "key": "fluent.retailer.current.ref",
66 "value": "fc_fashion",
67 "type": "default",
68 "enabled": true
69 },
70 {
71 "key": "fluent.retailer.current.user.username",
72 "value": "fc_fashion_admin",
73 "type": "default",
74 "enabled": true
75 },
76 {
77 "key": "fluent.retailer.current.user.password",
78 "value": "S3CR37",
79 "type": "secret",
80 "enabled": true
81 }
82 ]
83}
Language: json
Name: Profile Export Example Postman Environment
Description:
Example Postman Environment file generated with the Profile Export Command
Author:
Lesley Dean
Changed on:
22 Oct 2024
The
`retailer`
`create`
`create`
The
`create`
1fluent retailer create <retailer_ref> [options]
Language: sh
Name: Retailer Create Usage
Description:
Usage of the Retailer Create command
Argument Name | Description | Example |
| The reference name of the Retailer to create |
|
Option Name | Description | Required | Default | Example |
| The Profile to create the Retailer on | ✅
| N/A |
|
| The Retailer’s Contact Email Address | ✅
| N/A |
|
| The Trading Name of the Retailer | ❌ | N/A |
|
| The Region of the Retailer | ❌ | N/A |
|
| The Retailer’s Contact Phone Number | ❌ | N/A |
|
| The Retailer’s website Url | ❌ | N/A | `https://fcfashion.test.com |
Let’s assume you will create a Retailer called
`fc_fashion`
`ACME`
`my-acme-profile`
1fluent retailer create fc_fashion --email fc_fashion@test.com --profile my-acme-profile
Language: sh
Name: Retailer Create Command Example
Description:
Example using Retailer Create command
1/Users/jonsnow/.fluentcommerce/my-acme-profile/
2 profile.json
3 retailer.fc_fashion.json
4 user.acme_admin.json
5 user.fc_fashion_admin.json
Language: plain_text
Name: Updated Profile Directory
Description:
Updated view of the contents of the Profile directory
`retailer.fc_fashion.json`
1{
2 "id": "1",
3 "ref": "fc_fashion",
4 "user": "fc_fashion_admin"
5}
Language: json
Name: retailer.fc_fashion.json File
Description:
Example of the retailer.fc_fashion.json file
`user.fc_fashion_admin.json`
1{
2 "username": "fc_fashion_admin",
3 "password": "S3CR37"
4}
Language: json
Name: user.fc_fashion_admin.json file
Description:
Example of the user.fc_fashion_admin.json file
Author:
Lesley Dean
Changed on:
22 Oct 2024
The
`module`
`config`
`install`
`config`
The
`config`
The Configuration file may contain a series of keys and empty values to be populated for the specific Retailer prior to installation.
Not all Modules require configuration.
1fluent module config <module_path> [options]
Language: sh
Name: Usage of the module config command
Description:
Module Config Command usage
Argument Name | Description | Example |
| The Module name, URL, archive filename or path to a Fluent Module directory. Recognized Module Names are:
|
|
Option Name | Description | Required | Default | Example |
| The Profile to configure the module for | ✅
| N/A |
|
| The Retailer Reference to configure the module for | ✅
| N/A |
|
| The version of the module to install. Applies only to Fluent Reference Modules |
|
|
Let’s assume you will install the
`order`
`fc_fashion`
`ACME`
`my-acme-profile`
1fluent module config order --retailer fc_fashion --profile my-acme-profile
Language: sh
Name: Module Config Example
Description:
Module Config Command Example
1<my_current_working_dir>/
2 module.config.fc_fashion.order.json
Language: plain_text
Name: Current Working Directory
Description:
Example output of the Module Config Command
`module.config.fc_fashion.order.json`
1{
2 "default:system.rejected.location.ref": "",
3 "default:inventory.catalogue.ref": "",
4 "default:inventory.retailer.id": "",
5 "default:carrier.ref": "",
6 "default:label.url": "",
7 "workflow:order:cc:network.ref": "",
8 "workflow:order:cc:virtual.catalogue.ref": "",
9 "workflow:order:hd:network.ref": "",
10 "workflow:order:hd:virtual.catalogue.ref": "",
11 "workflow:order:multi:network.ref": "",
12 "workflow:order:multi:virtual.catalogue.ref": ""
13}
Language: json
Name: Example module.config.fc_fashion.order.json file
Description:
Example of the generated Config file of the Order Module
This file should be populated with the relevant values aligned to the specific project / Retailer set up you are implementing. This will ensure that the module workflows and settings assets will be correctly configured with values during installation.
`install`
The
`install`
1fluent module install <module_path> [options]
Language: sh
Name: Module Install Usage
Description:
Module Install Usage
Argument Name | Description | Example |
| The Module name, URL, archive filename or path to a Fluent Module directory. Recognized Module Names are:
|
|
Option Name | Description | Required | Default | Example |
| The Profile to configure the module for | ✅
| N/A |
|
| The Retailer Reference to configure the module for | ✅
| N/A |
|
| The Configuration file containing valid values required by the Module Assets. The install command will produce an error if the Config is required and not provided. If the Module does not required Config, it will install without Config | ✅ *when the module requires a config only
| N/A |
|
| The version of the module to install. Applies only to Fluent Reference Modules |
|
|
Continuing from the previous example, let’s assume you will install the
`order`
`fc_fashion`
`ACME`
`my-acme-profile`
1fluent module install order --config module.config.fc_fashion.order.json --retailer fc_fashion --profile my-acme-profile
Language: sh
Name: Module Install Command Example
Description:
Module Install Command Example
This will install all the Assets included in the Module package.
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.