AI integration

The AI Integration module is designed to reduce the manual workload by updating values in specific cases using AI engines. Engines such as ChatGpt, Gemini AI and Jasper AI are supported.

Basic use case

The basic use case of the module is to create a predefined promt that can be used multiple times for different products, for example. Everything in the promt is passed to an AI engine and the answer it gives back is the result of an operation. Depending on the type of use operation, it can be printed only in the frontend or directly in the backend. When creating a prompt, you can use branch functions to enter values from different fields of an entity, or even values from fields of related entities, using {{ }} and the path to the value you are looking for. The final prompt will display the value instead of {{ }} and the branch function. This way you can have different prompts for different records but with the same structure.

Connection

Before creating use cases, the connection to an AI engine must be set up. It is set up in the same way as any other connection in PIM.

Action set

For one AI engine only one connection can be set.

Use cases

AI can update fields in backend and frontend. Lets create promts for every type.

Updating values in frontend

To create a predefined prompt that can be used multiple times for different records, but does not affect the database before the user specifically saves the result, you need a UI handler. Go to Administration/UI handlers and create one with Set value by AI type.

Action set

First select an entity in which you want to use this prompt. Then select a field. Each handler can only affect one field at a time - if the user needs AI for more fields, simply create new UI handlers for them. Next, select an AI engine to work with and connect to it. Then choose a trigger method - we suggest clicking an action button - this is the clearest way for the user. If you want to check and perhaps modify the prompt, check Preview / Edit Prompt before running.

Now all the user needs to do is create a prompt that leads to the most appropriate response. This is a case of trial and error and is no different to writing a prompt in AI by hand.

After all the preparation, let's use our prompt.

We will go to Brands and update the brand Hella. Go to edit mode or use inline edit - now you will see the Set value by AI button.

Action set

As we have selected the Preview / Edit Prompt before running checkbox, we will see a final prompt and can now edit and send it or cancel the action. If the Preview / Edit prompt before running check box is not selected, this step is skipped and the predefined prompt is sent automatically without confirmation.

Action set

If an answer is given, it will appear in the field, but will not be saved until the user specifically saves the value. The result given by the AI can also be modified by the user.

Action set

Updating values in backend

A pre-defined prompt that can be used multiple times on different records, but does not affect the database until the user actually saves the result, can only be used on one record at a time. If the user wants mass updates using AI, a Set Value By AI action must be created. This can only be done in the backend and the changes are always written to the database. Go to Administration/Actions and create one with Set value by AI type.

For actions and workflows functionality to be available user needs Workflows module to be installed.

The basic logic of an action is the same as in the Ui handler, but instead of a trigger method the user can choose to display an action and if he wants it to be a mass action. The usage of the created action is the same as in the Update type action.

Here you can see an example of such action:

Action set

It can be used in the single product, as a mass action or as a part of a workflow.

For actions that are used as part of a workflow or as part of a mass action with 5 or more products, it is better to leave the Preview/Edit Prompt Before Execution checkbox unchecked so that the user is not forced to confirm multiple prompts that slow down the process.