Fluent Commerce Logo
Docs
Sign In

Create a new Rules SDK Plugin Project

How-to Guide

Author:

Lesley Dean

Changed on:

1 July 2024

Key Points

  • A step-by-step guide to creating Rule SDK Plugin Project.
  • The Rules SDK comes with a Maven Archetype for generating a new Rules Plugin Project, and a handy script file to run the project generation steps.
  • A fully setup and functioning Fluent Account is required as of this activity.

Steps

Step arrow right iconDownload and Extract the Rules SDK

Click the link to download the Rules SDK.

Extract the zip file to a suitable location on your computer, for example: 

`~/dev/fluent/`
 or 
`C:\dev\fluent\`

Step arrow right iconRun the Install Scripts

Open your system terminal or command prompt, and navigate to the extracted SDK folder.

Run the install script relevant to your environment:

  • For Mac / Linux: 
    `./install.sh`
  • For Windows: 
    `install.bat`

Populate each of the prompts:

Parameter Name

Description

Example Value

`groupId`

The Maven Project Group ID, typically your company domain name in reverse.

`com.acme`

`artifactId`

The Maven Project Artefact ID.

We recommend the following convention:

`rubix-plugin-<YOUR_COMPANY_NAME>-<YOUR_PLUGIN_NAME>`

`rubix-plugin-acme-base`

`fluentAccountId`

Your Fluent Account ID.

To allow this plugin to be deployed into any Account, use the recommended wildcard value: 

`_`
.

Note: If you intend to use the Postman collection provided in the SDK postman folder, set this to your actual Account ID.

`_`
 or 
`ACME`

`fluentApiHost`

Your Fluent Account API Host.

Just press 'ENTER' to accept the default.

Note: This is not used inside the Maven Project, however if you intend to use the Postman collection provided in the SDK postman folder, this should be set correctly.

https://ACME.sandbox.api.fluentretail.com

`fluentApiPort`

The Fluent API port.

Just press 'ENTER' to accept the default.

`443`

`fluentApiClientSecret`

Your Fluent Account Client Secret Host.

Note: This is not used inside the Maven Project, however if you intend to use the Postman collection provided in the SDK postman folder, this should be set correctly.

`acmesecret`

`fluentApiPassword`

Your Fluent Account Password.

Note: This is not used inside the Maven Project, however if you intend to use the Postman collection provided in the SDK postman folder, this should be set correctly.

`acmepassword`

`fluentApiUserName`

Your Fluent Account Username.

Note: This is not used inside the Maven Project, however if you intend to use the Postman collection provided in the SDK postman folder, this should be set correctly.

`acmeusername`

`fluentPluginName`

The last part of your Artefact ID.

`base`

`fluentVendorName`

Your full Company name.

`ACME (Pty) Ltd.`

Type 

`y`
 to accept the confirmed values and complete project generation.


Step arrow right iconOpen the Project in your IDE (IntelliJ)

The new project folder will be generated in the SDK working directory.

For example: 

`\dev\fluent\sdk-1.2021.3.1\rubix-plugin-acme-base`

Open IntelliJ, and click Open.

Navigate to the plugin project folder and open it in your IDE.


Step arrow right iconWhat's next?

If you are using JDK 17+, make sure to (Optional) Update your Plugin Project for JDK 17+ before moving to the next step.

You are now ready to Write your first Rule (Hello World)

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.

Fluent Logo