Gen AI
Last updated
Last updated
Nected’s GenAI feature is designed to help you minimize the struggle of writing custom conditions using JS Code and Formula Editors. It has two options Ask AI and Explain Code. Ask AI to help in your coding challenges while Explain Code provides a full explanation of your written code in the editor.
To access the Gen AI you can go to the formula editor and JS editors available under additional data and data type options within Rules.
Similarly, it can be accessed in Workflows through the Code node, Response node, and Set Variable node.
See the image below for a better understanding:
Note: The GenAI feature in Nected is available within the Formula and JavaScript editors
Once you've selected from the options, you will see the editor screen where you can find two key features of GenAI:
As discussed above, GenAI has two features: Explain Code and Ask AI. Below is the definition of each:
Located after the "Functions" option, this button explains code snippets in plain text. Just click on it, and the code present on the screen will be explained.
Let’s understand this feature taking a scenario below:
Code Example:
*{{.customInput.asset_price}}-({{.customInput.asset_price}}*{{.outputData.dynamic_discount}});*
Explanation given by GenAI:
Positioned on the right side of the screen, this feature provides coding assistance. You can copy-paste code or write a query to generate an answer.
Let’s take some use-case scenarios of Ask AI:
Ask AI can assist in identifying potential issues by analyzing your code, suggesting improvements, or offering troubleshooting tips directly within the editor.
Example Scenario: You have written a complex formula or script and need help identifying why it's not working as expected.
Prompt given:
Result:
Use the Ask AI feature to get code snippets or logic suggestions tailored to your needs.
Example Scenario: You want to implement a dynamic discount system that supports multiple coupons.
Prompt Given: Write logic for applying dynamic discounts based on coupons, allowing multiple coupons to be applied.
Result:
The above code is generalised and can be adapted to work with different input formats e.g tokens.
In cases where you need to create formulas involving multiple variables, the Ask AI can help generate accurate expressions, saving time and reducing errors.
Example Scenario: You want to calculate a final product price by considering multiple variables, such as base price, tax rate, and multiple discounts.
Prompt Given: Create a formula to calculate the final price after applying a tax rate and two different discount percentages.
Result:
With the GenAI features seamlessly integrated into the formula and JavaScript editors, coding challenges become simpler and more efficient. Whether you’re defining complex conditions, generating expressions, debugging, or simply seeking to understand existing code, the GenAI is there to guide you.