Rules SDK Setup & Plugin Creation
Authors:
Ankit Mehta, Cille Schliebitz, Anita Gu
Changed on:
4 Feb 2025
Overview
In this lesson, you will learn about Rules SDK, the Software Development Kit for Fluent Order Management, and the key features of the SDK.
Key points
- Prerequisites software installation
What is the Rules SDK?
Rules SDK (also referred to as Fluent SDK) is the software development kit for the OMX Workflow Framework. It allows Java developers to build custom rules to extend the standard Rule Library as part of the OMX Workflow Framework.
Rules SDK provides developers with the ability to:
- Build plugins containing custom-developed Rules for deployment into OMX Platform.
- Easily install plugins on the OMX Platform for use in the client workflows.
- Remain unique and competitive within their own market space.
- Have control over the optimisation and processing of their omni-channel orchestrations.
Key Features of Rules SDK
- Ready to use Java Maven Archetype for creating a new Fluent Plugin Project.
- Easy to use Install Scripts for Windows, Linux, and Mac OS.
- Java API Clients for both Fluent REST and GraphQL API.
- Ready to execute Postman, Insomnia, and GraphiQL Scripts for both Fluent REST and GraphQL API.
- Sample Rules which are ready to deploy and run in a Workflow.
Rules SDK Installation Guide
Before you begin this lesson, make sure that you've installed the software covered in the Prerequisites Section.
❗️The Rules SDK installation will not proceed until all prerequisites are installed.
Please also ensure that:
- IntelliJ (Java IDE) has a JDK path set to 1.8 and Maven 3.6 is configured within IntelliJ.
- If you are using Maven version > 3.6, add a mirror (a dependency provided in the Prerequisites Section) in your Maven directory .m2 >repository > settings.xml
Step 1. Download and install Rules SDK
Download the Rules SDK from here - Download the Fluent SDK.
Navigate to the downloaded folder and extract the zip file to a suitable project location on your system. You may wish to save it on the following project location based on your system:
Operating System | Project Location |
Mac / Linux | ~/dev/fluent |
Windows | C:\dev\fluent |
⚠️ Remember this location — it will be needed to create your Plugin Project later in the course.
Folder structure:
- Name and version of Rules SDK being downloaded. This folder contains lib folder, installation scripts and Readme file
- Installation Script based on your operating system
- For Mac/unix: Install.sh
- For Windows: Install.bat
- Readme File is the text file which provides the Installation and configuration steps
- Archetype jar file containing all the Archetype required for setting up a new project
- Foundation sources jar file containing all source code of all the rules that are being provided in an account. All the rules provided are part of Foundation Plugin
Step 2. Run the Installation Command
- Open up a Terminal / Command prompt and navigate to your extracted SDK folder.
- The installation script for your environment is in the SDK Folder. Refer to the table below — run the installation script for your specific environment (Mac/Linux or Windows):
Operating System | Project Location |
Mac / Linux | install.sh run the command: My-MacBook-Pro:~/dev/fluent me$ ./install.sh *Replace [the location ] with your extracted folder location |
Windows | install.bat run the command: C:\dev\fluent > install.bat *Replace [the location] with your extracted folder location |
Step 3. Configure your Plugin Project
Configure the plugin project with the details from your sandbox account. You need to define the values for the following properties:
- 'groupId'. This is your Maven group id. Typically made up of a reverse of your primary root domain e.g. com.acme
- 'artifactId'. This is a descriptive unique Maven Java module name in kebab case format (I.e. hyphens between each word in lower case). Follow the naming convention . For training purposes, you may use your name as the <pluginShortName>. For e.g. rubix-plugin-training-manav
`rubix-plugin-<fluentaccountId>-<pluginshortname>`
- 'fluentAccountId'. This is your Fluent Account ID. You can get the value from Postman.
- 'fluentApiHost': https://<fluentAccountId>.sandbox.api.fluentretail.com. This value is pre-populated with your sandbox url. Press Enter to accept the value
- 'fluentApiPassword'. This is your Fluent Account password. You can get the value from Postman.
- 'fluentApiPort' = 443'. This value is pre-populated for SSL. Press Enter to accept the value
- 'fluentApiUserName'. This is your Fluent Account Name. You can get the value from Postman.
- 'fluentApiClientSecret'. This is your Fluent Account Secret Key. You can get the value from Postman.
- 'fluentPluginName'. Use the same name you have used in your artifactid eg. manav
- 'fluentVendorName'. This is your company name. e.g. Training Ltd (opens in a new tab)
- Confirm your parameters by entering the letter Y. If you need to change any of the values , then enter the letter N followed by Enter key, and repeat the above steps.
⚠️ Once confirmed the script will create a new Maven plugin project in your current SDK folder.
View an example of a successful build

- This is the same extracted Rules SDK folder(discussed above ),from where you have run the installation script for your system.
- This is the installed and configured plugin rubix-plugim-fctrainau543- manav which is created as a result of successful build.
Video Demonstrating Steps 2 & 3
This video illustrates how to:
✅ Structure of an extracted SDK Folder
✅ How to run the Installation Script on a Mac System
✅ How to configure the plugin project by providing values to the required properties.