Connect PrestaShop
Connect PrestaShop with a read-only key for catalog sync and order lookups, then add web chat to your theme.
Connecting PrestaShop gives the AI agent your product catalog and your customers' orders. It can recommend products and answer order questions, and your team can look up the same orders. Setup has two independent parts:
- Connect store data by creating a Webservice key in PrestaShop and saving it in the Octocom dashboard.
- Install web chat by adding your organization's script tag to the storefront theme.
Neither part needs an Octocom PrestaShop module. Store data connects directly through PrestaShop's Webservice API, and web chat uses the script copied from your Octocom settings.
If your store has an earlier Octocom module installed, follow Replace an earlier Octocom module below. If that module created a key with broad permissions, follow PrestaShop permissions and security to restrict or replace it.
1. Create a PrestaShop Webservice key
You create and control the key in your own PrestaShop back office:
- Open Advanced Parameters -> Webservice.
- Enable PrestaShop's Webservice API.
- Select Add new webservice key and generate a key.
- Set its description to Octocom and enable the key.
- Grant GET access to these resources:
| Resource | Permission |
|---|---|
| products | GET |
| stock_availables | GET |
| categories | GET |
| countries | GET |
| tax_rules | GET |
| taxes | GET |
| specific_prices | GET |
| orders | GET |
| order_states | GET |
| customers | GET |
Do not enable POST, PUT, PATCH or DELETE for the standard Octocom integration. It reads product and order information and does not need permission to change or delete store data.
See PrestaShop's Webservice access guide for more information about creating keys and assigning permissions.
2. Connect the store in Octocom
- In Octocom, open Settings -> Workspace -> Integrations and select PrestaShop.
- Enter the public base URL of the storefront, such as https://shop.example.com.
- Paste the Webservice API key.
- Select Test and connect.
Octocom checks the connection and every required permission before saving it. The API key is encrypted and is not displayed again after it is saved.
Enable and verify order tracking
Connecting the store saves its credentials. A new connection installs standard Python order lookup actions and an Orders sidebar widget when there is no existing action or widget configuration to preserve. Reconnecting preserves existing configuration, including inactive actions and widgets.
Connecting does not create an order-tracking workflow or replace an existing demo action. A successful connection test confirms API access, not that the AI agent calls the right action.
For configurable order tracking, ask Copilot to:
- Inspect and customize the installed Python actions, or create one using the PrestaShop order helpers. The helpers read the current business's saved credentials. Custom API calls can use get_integration_credentials; never return or log the key.
- Look up the printed order reference or numeric ID and verify the checkout email against the order's customer before returning order details. Treat an API failure separately from an order that does not match.
- Enable the action in the relevant workflow variant and instruct the AI agent to call it. Loading a workflow does not perform an automatic order lookup.
- Return only data read from PrestaShop. An order status is not a carrier tracking timeline or delivery estimate. Carrier names and tracking URL templates require additional GET access to
carriers; the standard connection test does not check this optional resource. - Test a known order and matching email, a wrong email, and a nonexistent order. Confirm the AI agent calls the real action and does not disclose order details for a mismatch. Disable demo workflows and replace or deactivate mock actions before customer testing.
When workflow routing depends on order data, use a Python condition provider to read the order and supply the conditions required by its variants. If a lookup fails, inspect the Python action or provider result and verify the saved connection and permissions.
You remain in control of the API key
Replacing or disconnecting the key in Octocom does not change it in PrestaShop. To revoke access completely, disable or delete the key under Advanced Parameters -> Webservice.
If your site restricts access by IP address
By default, Octocom connects to your PrestaShop Webservice API over HTTPS and authenticates with the API key you created. No IP allowlisting is needed.
Some sites, often pre-production environments, are password-protected or only accept requests from approved IP addresses. In that case, allow Octocom's proxy IP address, 74.242.171.127. Octocom sends the connection test, product sync and order lookups through this address.
Prefer HTTPS and the API key
HTTPS and the Webservice API key, the default setup, are the access control to rely on. Add an IP allowlist only where your site requires one. If the address ever changes, Octocom notifies affected customers in advance.
If the connection test reports that your site blocked Octocom before the request reached PrestaShop, a password or IP restriction in front of your store rejected the request. Allow the address above, or remove the restriction for the /api path, and select Test and connect again.
Python actions call your store directly by default, not through the proxy address above. If the store accepts only Octocom's proxy IP, use proxy_session for every store request in the action. A passing dashboard connection test does not verify that the action's direct requests are allowed.
3. Install web chat
Add your organization's script
- In Octocom, select the correct organization and business, then open Settings -> Channels -> Web Chat -> Deployment and choose Copy script. Keep both
id="octocom-script"anddata-organization-idin the copied tag. The organization ID is public installation configuration, not an API key. - Ask your developer to add the complete tag once to the active storefront theme's shared HTML head, so it loads on every page. In PrestaShop 1.7 and newer, this is normally
themes/<active-theme>/templates/_partials/head.tpl. In PrestaShop 1.6, it is normallythemes/<active-theme>/header.tpl, before</head>. Use a child theme or your existing theme customization process so theme updates preserve the change. If the theme extends a parent template, add the script inside the appropriate head block.
The copied script looks like this. Replace the placeholder with the ID from your copied script:
<script
id="octocom-script"
data-organization-id="YOUR_ORGANIZATION_ID"
src="https://www.octocom.ai/chatbot/bundle.js"
async
></script>- In the same Octocom Deployment tab, add the storefront hostname, such as
shop.example.com, and enable deployment. Enter only the hostname, withouthttps://, paths or a trailing slash. Keep the default script to use domain and page rules. Use Use only this web chat only when you intend to bypass those rules. - In PrestaShop, open Advanced Parameters -> Performance and select Clear cache. Clear any separate full-page or CDN cache too.
- Open the homepage and a product page in a private browser window without extensions. In page source, check that the Octocom script appears once and retains its organization ID. Confirm that the launcher appears and opens the chat. If it does not, check browser console and network errors and share the exact page URL with Octocom support.
PrestaShop documents the shared head template and cache controls. See Launch the chat widget for domain and troubleshooting details.
Replace an earlier Octocom module
Earlier Octocom PrestaShop modules are no longer distributed. Version 1.1.0 only added a script without an organization ID, which loads chat only on domains that were already approved for it, not on new ones. It does not connect catalog or order data.
- Copy your complete script from Octocom as described above.
- In PrestaShop Modules -> Module Manager, disable or uninstall the Octocom module. Remove any other Octocom script from the theme or tag manager.
- Add the copied script, clear caches and verify the storefront using the steps above. Keep only one Octocom script installation.
Removing the module does not disconnect the separately configured store-data integration or revoke Webservice keys. If you used version 1.0.0, also review the permissions of the key it created. Do not reinstall or reset that version, which can create another broad-permission key.
Managing or removing the integration
The API connection and storefront script are independent:
- Disconnect in Octocom to remove the saved store connection. Disable or delete the key in PrestaShop as well if it should no longer be usable.
- Remove the storefront script to stop web chat. Disable or uninstall any remaining Octocom module too. This does not disconnect or revoke the separately managed Webservice key.
- Replace the key by creating or selecting a key in PrestaShop and using Test and update in the Octocom integration settings.