Installing Comptoir AI on your site.
The prerequisites to check before activating the plugin, in order. The first two govern contact form replies, notifications and follow-ups: without them, emails land in spam or leave hours late.
Updated on
Environment
- PHP 8.1 or later.
- WordPress 6.5 or later.
- WooCommerce is optional: without a shop, the assistant answers questions and takes appointments or bookings.
No object cache or transient is used on the conversation path: the plugin works with WP Rocket, LiteSpeed Cache and a Redis object cache without any special setting.
1. An SMTP plugin configured on your domain
By default WordPress sends from wordpress@<domain> through the server's mail function, and most mailboxes file those emails as spam. Install WP Mail SMTP or FluentSMTP, set up authenticated sending (your host's SMTP, Brevo, Mailgun, SES…) with an address on the site's domain as the sender, and check that the domain carries that service's SPF and DKIM records.
What Comptoir AI does:
- all its emails (reply to the customer, draft to the merchant, copy, notifications, monthly report, transcript, resume link) go through the SMTP plugin as soon as it is in place;
- without a recognised plugin, the Contact forms card on the Your site screen shows "To fix", and emails are signed
noreply@<domain>instead ofwordpress@<domain>; - the address that receives notifications and drafts is set in Settings ("Notification email"); an invalid address is ignored and the admin address takes over.
2. A system cron job every minute
By default, WP-Cron only runs when a visitor loads a page. Comptoir AI schedules its work as tasks: reply to a form (five seconds after submission), conversation summaries and topics, site analysis, knowledge index, daily purge, monthly report. Without a system job, all of that waits for the next visitor.
In wp-config.php, above the line /* That's all, stop editing! */:
define( 'DISABLE_WP_CRON', true );
In the server scheduler (cPanel › Cron jobs, or crontab -e), one line every minute, replacing the path and the domain:
* * * * * /usr/local/bin/php /home/<account>/public_html/wp-cron.php >/dev/null 2>&1
HTTP variant if command-line PHP is not available:
* * * * * curl -s https://www.example.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1
Check: the Contact forms card reads "System cron job in place" with the time of the last run. It switches to "To fix" if DISABLE_WP_CRON is not defined and nothing has run for ten minutes, or if the system job has stopped.
3. AI access
In Settings › AI access, two options:
- Plan with included conversations: paste your site token, supplied when the trial or the subscription starts. The model is chosen for you.
- Own key: declare your Anthropic API key in
wp-config.phpasCOMPTOIR_API_KEY. You choose the model and pay for the AI directly to its provider.
4. After activation
- Your site › Run the analysis again, then read the cards (sector, payment, shipping, forms, age check).
- Assistant rules: read the rules deduced from your site.
- Try the assistant from the admin, then run the regression test (Settings, or
wp comptoir regressionon the command line). - Contact forms: start in "Suggestion by email" mode, then switch to automatic after a few days of review.
Online payment for appointments (SmartAgenda with Stripe)
Paying online is the customer's choice, never an obligation. For a service that carries a deposit, the assistant offers to confirm without paying today (appointment created at once, payment on site) or to pay online (Stripe Checkout page, appointment created as soon as payment is confirmed). A discount is only mentioned when the online price really is lower than the price of the slot.
Per SmartAgenda account, in Settings › Your calendars:
- Stripe secret key (
sk_test_…for trials,sk_live_…in production), encrypted in the database. Without it there is no online option: the appointment is taken and any deposit is paid on site. - Stripe webhook: in the Stripe dashboard (Developers › Webhooks), declare the URL shown in Your site › Appointment payments, for the right mode (test or live), with the events
checkout.session.completed,checkout.session.expired,checkout.session.async_payment_succeededandcheckout.session.async_payment_failed. Then copy the signing secret (whsec_…) into the same account. Without a webhook, the appointment is only created when the customer returns to the site; Your site flags this after 24 hours without a delivery. - Time zone: choose your city in WordPress Settings › General. In UTC, the times shown (last webhook, proof of payment, appointments) would be shifted; Your site flags this.
The payment methods offered are those enabled in the account's Stripe dashboard.
SmartAgenda has no notion of payment: Comptoir AI keeps the proof (Stripe session, amount, mode, service, appointment) in the conversation record and in the email sent to the merchant for each payment received.
Accommodation (MotoPress Hotel Booking)
Comptoir AI reads MotoPress Hotel Booking (accommodation types, rates, services, stay rules, gateways, pages) and books on the customer's behalf through MotoPress's own booking controller, with its validation, its emails and its automations. No setting is needed on the Comptoir AI side; the settings that matter are MotoPress's:
- Settings › General: confirmation mode. "Upon payment": the booking is confirmed only once paid; "Manual" or "By email": the booking is created at once and the assistant says so. The terms text of the booking page is what the assistant quotes for cancellation, tourist tax or pets.
- Settings › Payments: active gateways and their mode (test or live). An online gateway (Stripe, PayPal…) gives the option "confirm by paying online"; an on-site gateway (cash, bank transfer) gives "book and pay on site"; both together leave the choice to the customer. The time after which an unpaid booking is abandoned is MotoPress's.
- Settings › Pages: booking page, "Booking received" page, "Payment failed" page and Terms page. If the acceptance checkbox points to another page (a cookie policy, for instance), Your site flags it.
The journey with the assistant
Dates and guests, availability search, rate and services chosen, contact details asked one at a time, summary card, explicit agreement by button.
- On site: the booking is created immediately, with a confirmation card showing the number and the "View my booking" link.
- Online: the MotoPress booking page opens prefilled (accommodation, dates, rate, guests). The customer enters their details there and pays in the gateway's form, never in the conversation. Proof of payment is kept in the conversation record and in the email to the merchant.
Several rooms for the same stay form one booking and one payment: the summary lists each room with its rate and the combined total. Only published services are offered. The amount recorded is the one collected by the gateway: if the customer changes options on the booking page, that amount is the one that counts.
A booking cancelled after payment turns the card to "Booking cancelled" and alerts the merchant; the refund is handled by the team, under the terms of the rate.
A site can have WooCommerce active without selling: with no published product and no active WooCommerce gateway, Comptoir AI treats it as an accommodation site, not as a shop.