AI Сonsultant (ChatGPT)
AI Сonsultant (ChatGPT)
Manual
1. Installation and Initial Setup
- Go to Add-on Settings.
- Click «Generate Files» — products will be sent to OpenAI, and an assistant ID will be created.
If necessary:
- Click «Recreate Assistant» — if responses are incorrect or you need to change the instruction.
- Click «Delete Dialogs» — clears the request history of authorized users.
2. Creating a Form
- Go to Website > MS: GPT.
- Click «Add Form» in the upper right corner.
- Select a mode:
Product Selection
— ChatGPT receives links to JSON files with products.Content
— GPT works without files.
- Specify the display position of the form and, if necessary, a starting prompt.
- The product prompt will be added after selecting the mode.
- Click the «Create» button.
If necessary, you can change the GPT instruction. To do this, open Settings > Text and Languages.
In the variable ms_goods_gpt.assistant.instructions
you can change the GPT instruction. To apply it, click «Recreate Assistant» in the add-on settings.
3. Creating Groups
- After creating a form, two new tabs will appear: «Content» and «Form Testing».
- Click the newly appeared «Add Group» button — this is required to create variations of GPT requests with different prompts and parameters (fields).
- Specify:
- Name
- Group Prompt
- Display Position
Created groups will be displayed in «Content».
Here you can manage groups:
- 1 - specify the position in the content list
- 2 - specify whether the field is required or not
- 3 - delete or edit the field
4. Adding Fields
- Next to a group, click «Add Field», these are parameters for more precise query formation. Users can select these fields themselves.
Specify:
- Field Name
- Field Type (checkbox, radio group, list, text, etc.)
- Select the desired group
- CSS classes for storefront styling if necessary
- Prompt (optional, if left empty, the group name will be included in the prompt)
- Required or not
There are different field types. In the example above, a Checkbox is selected. Just a checkmark. There are also input fields, phone input, etc., where users can enter arbitrary data. There are options. For example, you need to add the Gender parameter.
- Select «List of Options» or «Radio Group» as the field type.
- After saving, a new «Options» tab will appear next to it, where you can specify them.
5. Testing the Prompt
- On the «Form Testing» tab.
- Here you can see which prompt is ultimately sent to GPT, and also see the generated response.
- All groups and fields we created are available here.
6. Testing GPT Response
- Click «Check Response».
- The following will be displayed:
Run ID
- Status (while GPT is generating a response, it will be
status = in_progress
) - ChatGPT response
In my case, there are no products in the store, so the response looks like this.
7. Displaying the Form on the Storefront
- Create a page (you can create a separate block and embed it wherever needed): Content > Pages.
- Go to Layouts, add the block «Product Recommendations»:
- Enter a name, the template will already be selected.
- In Content, specify the required form.
- Adjust block settings if necessary.
- Create and place a link to the page on the storefront.
8. Result
An interactive form appears on the storefront. The user fills out the form, clicks «Select», and receives results with recommendations and products from ChatGPT. The response from ChatGPT may take some time.