Last Updated yesterday

Configuring and using the PShow AI Feed module

Configuring and using the PShow AI Feed module

The module sends the shop products to OpenAI so that ChatGPT can recommend them to shoppers, also in ads. The products reach OpenAI as a file that the module uploads to the SFTP server of your OpenAI ads account. In the module, such a file is a catalog. Each catalog has its own countries, language and currency, so you can prepare, for example, one catalog with prices in zloty and another one in euro. The whole configuration is described below: the OpenAI account, the module settings, the first sending, automatic sending and checking the results.

Stage 1. Ads account and API key in OpenAI

Sending requires an ads account in OpenAI. The API key lets the module create the product feed and the SFTP access by itself and check how OpenAI processed each file that was sent.
Step 1. Log in to Ads Manager at ads.openai.com or create an ads account there.
Step 2. Go to the Settings page of Ads Manager (ads.openai.com/settings) and create an Advertiser API key. Copy the key, you will enter it in the module in stage 3.
Note. The ads account must have access to product feeds. If the module shows the message The OpenAI ads account has no access to product feeds yet, contact your OpenAI account team. If you do not want to use the API key, you can enter the SFTP details given by OpenAI yourself (stage 5, option B).

Stage 2. Shop details sent with every product

These details are shared by all catalogs and are sent to OpenAI with every product.
Step 1. In the admin menu, select PrestaShow Modules > PShow AI Feed. The list Catalogs sent to OpenAI opens, with the Shop details sent with every product panel below it.
image

Step 2. (Optional) In the Seller name field, enter the shop name shown to ChatGPT users. Leave it empty to use the shop name.
Step 3. (Optional) In the Seller website field, enter the address of the shop home page. Leave it empty to use the shop address.
Step 4. In the Return policy page field, select the CMS page with the rules of returns. OpenAI requires its address for every product. If the shop does not have such a page yet, create it:
  • PrestaShop 1.7, 8 and 9: Design > Pages,
  • PrestaShop 1.6: Preferences > CMS.
image

Step 5. (Optional) In the Country of the shop field, select the country where the shop operates. By default, the module uses the default country of the shop.
Step 6. In the Product description field, choose which description is sent to OpenAI: Description or Summary (short description). When the chosen description is empty, the module sends the other one.
Step 7. (Optional) In the Image size field, select the size of the product images. By default, the module picks the large size.
Step 8. Click Save below the panel.
Note. Until you select the return policy page, the warning The return policy page is not selected is shown above the list of catalogs. You can save the other settings, but the catalogs are not sent to OpenAI.

Stage 3. API key in the module

Skip this stage if you enter the SFTP details yourself (stage 5, option B).
Step 1. Below the shop details panel there is the Connection with the OpenAI Ads API panel. In the Advertiser API key field, paste the key copied in stage 1.
image

Step 2. Click Save below the panel. The key is stored encrypted. After saving, the field is empty and the hint below it says A key is saved. Leave the field empty to keep it.
Note. To remove the saved key, set the Remove the saved API key switch to Yes and click Save.

Stage 4. Adding a catalog

A catalog defines which products are sent to OpenAI, in which language and currency, and in which countries they are shown. In the following example, a catalog for Poland with prices in zloty will be added.
Step 1. Click the + icon (Add a catalog) in the header of the Catalogs sent to OpenAI list.
image

Step 2. In the Catalog panel, in the Name field, enter a name by which you will recognise the catalog. In this example, enter Poland PLN. If the feed is created with the API key (stage 5, option A), the feed in OpenAI gets the same name.
Step 3. Make sure the Active switch is set to Yes. Automatic sending (stage 7) includes only active catalogs.
Step 4. In the Main country field, select the country whose ChatGPT users will see the products. Prices include the taxes of this country. The list contains the active countries of the shop. In this example, select Poland.
image

Step 5. (Optional) In the Other countries field, select more countries where the products should be shown. They get the same prices and the same currency as the main country.
Step 6. In the Language and Currency fields, select the language of names and descriptions and the currency of prices. In this example, select Polish and zloty (PLN).
Note. OpenAI shows products from a standard upload in the USA by default. Other countries and currencies need a confirmation from OpenAI.
Step 7. (Optional) In the Products panel, in the Categories tree, select the categories whose products should be included in the catalog. Products from at least one of the selected categories are sent. Select nothing to send products from all categories.
image

Step 8. (Optional) In the Manufacturers field, select the manufacturers whose products should be included in the catalog. Select nothing to send products of all manufacturers.
Step 9. Set the Send combinations as separate products switch:
  • Yes - each combination is sent to OpenAI as a separate product with its own price, availability and image, linked with its product. The name includes the variant, for example T-shirt - S, White,
  • No - a product with combinations is sent to OpenAI as one product.

Step 10. (Optional) Set the Hide products that are not in stock switch to Yes if ChatGPT should not show products that are out of stock. They are still sent, but marked as unavailable, so they disappear from ChatGPT at once.
Step 11. OpenAI requires a brand for every product. In the Products without a manufacturer field, choose what to do with products that have no manufacturer assigned:
  • Do not send them - such products are skipped,
  • Send them with the brand below - then enter the brand in the Brand for products without a manufacturer field, for example the shop name.

Step 12. In the Connection with OpenAI (SFTP) panel, leave the access fields empty if you use the API key, because the bulk action in stage 5 fills them in. The File name field is products by default (without the extension, which the module adds itself), and the File format is CSV (.csv) by default, as described in the OpenAI ads guide.
Step 13. Click Save. The catalog appears in the list.

Stage 5. Connecting the catalog with OpenAI

The module uploads the catalog file to the SFTP server of the feed in OpenAI. You can get the access details automatically with the API key (option A) or enter them yourself (option B).

Option A. Automatically, with the API key


Step 1. In the list of catalogs, tick the checkbox next to the catalog.
Step 2. Click Bulk actions below the list and select Create the feed and SFTP access in OpenAI. Confirm the message.
image

Step 3. The module creates the feed in OpenAI with the countries of the catalog, gets the SFTP access details and saves them in the catalog. After a moment you will see a message that the feed is ready in OpenAI, and its ID appears in the Feed in OpenAI column. You can go on to stage 6.
Note. The feed is created only once. Using this action again for the same catalog creates new SFTP access, and the previous SFTP password stops working. OpenAI saves the countries of the feed when it is created. Each product that is sent contains the current list of countries of the catalog anyway.

Option B. Manually, with the details from OpenAI


Step 1. In the list of catalogs, click Edit next to the catalog and go to the Connection with OpenAI (SFTP) panel.
Step 2. In the Server field, paste the address given by OpenAI, for example sftp://user@sftp.example.com:22. The port and the user name are filled in automatically. You can also enter the Server, Port and User name separately.
image

Step 3. In the Password field, enter the SFTP password. If OpenAI gave you key access instead of a password, paste the key in the Private SSH key field. The password is then used to unlock the key.
Step 4. Click Save. The password and the key are stored encrypted. When you edit the catalog again, these fields are empty: leave them empty to keep the saved details. To remove them, set the Remove the saved password and key switch to Yes.
Note. A catalog connected manually has no feed ID in OpenAI, so the export history does not show the status of processing its file in OpenAI.

Stage 6. The first sending


Step 1. (Recommended) Tick the catalog in the list, click Bulk actions and select Test the SFTP connection. If the details are correct, you will see the message Poland PLN: the connection works.
Step 2. (Optional) In the bulk actions, select Generate the file without sending. The file appears in the export history, where you can download and check it before anything is sent to OpenAI.
Step 3. In the bulk actions, select Send to OpenAI. After sending, you will see a message with the number of products sent and skipped, for example Poland PLN: 120 products sent to OpenAI, 3 skipped. The Last export and Last result columns show the date and the result of the sending.
image

Note. Every sending replaces the file on the server with the full catalog. After a change of the file name or format, the module removes the previous file from the server. The module never sends an empty file, because such a file would remove all products of the shop from ChatGPT.

Stage 7. Automatic sending (CRON)

OpenAI recommends updating the products at least once a day. The sending is then done by a CRON job on the shop server.
Step 1. Above the list of catalogs, copy the address of the CRON job, for example https://your-shop.com/en/module/pshowaifeed/cron?token=....
Step 2. In the hosting panel, add a CRON job that opens this address at least once a day, for example with the command curl -s "address of the CRON job". Night time, when the shop traffic is low, is a good choice.
Step 3. Each run sends all active catalogs of the shop. For catalogs connected with the API key, the module also checks the status of earlier sendings in OpenAI before sending.
Tip. To make the job send only one catalog, add its ID to the address, for example &id_catalog=3. The catalog ID is shown in the first column of the list.
Note. In a shop with several shops (multistore), each shop has its own CRON job address, which sends only the catalogs of that shop. Select the shop at the top of the page to see its address.

Stage 8. Export history and results from OpenAI


Step 1. In the side menu of the module, click Export history. The list shows every sending and every generated file: the date, the catalog, the result, the status in OpenAI, the number of products sent and skipped and the file size.
image

Step 2. Click View next to an entry to open its details. With the Download the file button at the top of the page, you can download the file that was sent. The Skipped products table shows which products were not included in the file and why, for example no image, no description, no manufacturer or price is zero. Complete this data in the products, and they will be sent to OpenAI with the next sending.
image

Step 3. After sending, OpenAI processes the file. The Status in OpenAI column shows the result:
  • Processing in OpenAI - OpenAI is still processing the file,
  • Accepted by OpenAI - the file was accepted without problems,
  • Accepted with errors - the file was accepted, but some rows have problems,
  • Rejected by OpenAI or Not processed by OpenAI - the products from this file were not updated.
The details of an entry also show the number of rows accepted and rejected by OpenAI, the number of rows that can be used in ads and the list Problems reported by OpenAI with the field each problem concerns.
Step 4. The status is checked automatically when you open the details of an entry (not more often than once a minute) and by the CRON job before the next sending. To check it at once, click Check the status in OpenAI at the top of the details page.
Note. The status in OpenAI is shown only for catalogs connected with the API key (stage 5, option A), while the key is saved in the module. The module keeps the files of the last 5 exports of every catalog.

Important information

  • Only products that are active and visible in the shop are sent to OpenAI. Each of them must have a name, a description, an image, a brand (the manufacturer or the fallback brand from the catalog settings) and a price higher than zero.
  • A product deleted or disabled in the shop disappears from the file with the next sending, but OpenAI may still show it for up to 14 days. Products that are out of stock disappear from ChatGPT at once if the Hide products that are not in stock option is enabled in the catalog.
  • In a shop with several shops (multistore), a catalog belongs to the shop in which it was created. To edit or send it, select that shop at the top of the page.

Please Wait!

Please wait... it will take a second!

Kliknij by skopiować