=== Super Inquiry — Inquiry Forms & CRM for B2B & B2C Websites ===
Contributors: superinquiry
Donate link: https://superinquiry.com
Tags: contact form, crm, lead capture, smtp, b2b
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 3.2.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Inquiry forms with country dial codes, a built-in inquiry CRM, SMTP, reports and an AI blog writer — built for B2B & B2C websites.

== Description ==

Super Inquiry turns a WordPress site into a working sales desk for B2B and B2C businesses. Instead of a contact form that only sends an email, every submission becomes a tracked inquiry you can assign, follow up and report on — and all of it stays in your own database.

**Inquiry forms**

* Drag-and-drop builder with 15 field types.
* Country field auto-fills the international dial code (230+ countries) and detects the visitor's country.
* Place a form with the `[superinquiry_form id="1"]` shortcode or the block.
* Honeypot and time-trap spam protection, plus a per-IP submission rate limit.

**Inquiry CRM**

* Every inquiry records the page title, URL, country, IP, UTM parameters and referrer.
* Assign inquiries to salespeople; a dedicated "Sales" role sees only their own.
* Follow-up statuses: New → Following Up → Quoted → Won → No Intent → Spam, with feedback notes and a full history.
* Inquiries left without feedback past your threshold are flagged red.

**Email**

* Per-form notification emails with smart tags.
* Global SMTP settings with a test button, plus a log-only mode for staging.

**Reports**

* Per-salesperson and per-source breakdowns, win rate and overdue counts.
* CSV export (UTF-8, opens cleanly in Excel).

**AI blog writer**

* Works with any OpenAI-compatible endpoint — DeepSeek, Qwen, Kimi, OpenAI — using your own API key.
* Write on demand, or queue topics and publish on a schedule.
* A mock mode lets you try the whole flow without an API key.

**Social syndication**

* Publish posts to Facebook, Instagram, LinkedIn and Pinterest, and attribute inbound visitors back to the channel that sent them.

**Bilingual**

* Full English and 简体中文 interface, front end and admin.

= External services =

This plugin can contact third-party services. All of them are **optional**, are **off until you configure them**, and use credentials you supply.

* **AI provider (for the AI blog writer).** When you generate an article, the topic and your writing instructions are sent to the OpenAI-compatible endpoint you configure — by default `https://api.deepseek.com`, or any other base URL you enter (OpenAI, Alibaba Qwen/DashScope, Moonshot/Kimi …). Nothing is sent until you enter an API key and request generation. Review the terms and privacy policy of whichever provider you choose, e.g. DeepSeek (https://platform.deepseek.com/downloads/DeepSeek%20Terms%20of%20Use.html, https://platform.deepseek.com/downloads/DeepSeek%20Privacy%20Policy.html) or OpenAI (https://openai.com/policies/terms-of-use/, https://openai.com/policies/privacy-policy/).
* **Meta (Facebook & Instagram).** If you connect an account, the post title, excerpt, link and image are sent to the Facebook Graph API to publish. Terms: https://www.facebook.com/terms.php — Privacy: https://www.facebook.com/privacy/policy/
* **LinkedIn.** If you connect an account, the post title, excerpt and link are sent to the LinkedIn API to publish. Terms: https://www.linkedin.com/legal/user-agreement — Privacy: https://www.linkedin.com/legal/privacy-policy
* **Pinterest.** If you connect an account, the post title, link and image are sent to the Pinterest API to create a pin. Terms: https://policy.pinterest.com/terms-of-service — Privacy: https://policy.pinterest.com/privacy-policy
* **Your SMTP server.** If you enable SMTP, outgoing site email is delivered through the mail server you specify. That server is chosen and controlled by you.

The plugin does not send your inquiry data anywhere on its own, and has no analytics or usage tracking.

= Data stored on your site =

Inquiries are stored in your own database in tables prefixed `superinquiry_`, including the submitted fields plus the visitor's IP address, user agent, referrer and UTM parameters. Settings → General has an option to delete every table and setting when the plugin is uninstalled. Because inquiries contain personal data, mention this plugin in your site's privacy policy and keep only what you need.

= A paid version exists =

A commercial version adds customer auto-replies, AI reply drafts and translation, AI featured images, a Kanban pipeline, SLA reports, push notifications, webhooks, a REST API, file-upload fields, conditional logic, login hardening and an SEO analyzer. This free plugin is complete and fully functional on its own — nothing here is time-limited or crippled.

== Installation ==

1. Upload the `superinquiry` folder to `/wp-content/plugins/`, or install the ZIP from Plugins → Add New → Upload.
2. Activate. A sample "Contact Us" form and the "Sales" role are created for you.
3. Put `[superinquiry_form id="1"]` on a page, or insert the Super Inquiry block.
4. Configure Super Inquiry → Settings for SMTP, AI and social accounts.

== Frequently Asked Questions ==

= Do I need an API key to use the plugin? =

No. Forms, the inquiry CRM, notifications, reports and CSV export all work with no external service at all. An API key is only needed for the AI blog writer, and social accounts only for syndication.

= Which AI providers work? =

Any service that implements the OpenAI-compatible `/chat/completions` endpoint, including DeepSeek, Qwen (DashScope), Moonshot/Kimi and OpenAI. You enter the base URL and your own key, so usage is billed by that provider.

= Where is my inquiry data stored? =

In your own WordPress database. Nothing is sent to us — the plugin has no home-phoning and no telemetry. You can export everything to CSV at any time.

= Can I try the AI and email features without credentials? =

Yes. Settings → General has mock switches for email, AI and social that log what would have been sent instead of sending it.

= Does it work with my theme and page builder? =

Yes. The form is a standard shortcode/block and inherits your theme's styling; it works with Elementor, Gutenberg and classic themes.

= Is it compatible with Yoast or Rank Math? =

Yes, the free version does not output SEO meta tags at all, so there is nothing to conflict.

== Screenshots ==

1. Inquiry list with status, source, assignee and overdue highlighting.
2. Drag-and-drop form builder.
3. Inquiry detail with captured metadata and follow-up history.
4. Reports: per-salesperson performance, sources and win rate.
5. AI blog writer with topic queue and scheduling.
6. Settings — SMTP, AI and social tabs.

== Changelog ==

= 3.1.0 =
* Maintenance release. (The new Performance module this version adds — full-page cache, image optimization, CDN, database cleanup, Redis object cache — is part of the paid Pro modules and has no effect on the free plugin.)

= 3.0.12 =
* Maintenance release. (The new `llms.txt` support this version adds is part of the paid Pro modules and has no effect on the free plugin.)

= 3.0.11 =
* Fix: "Test connection" (Settings → AI) could report a misleading empty-response error against hybrid-thinking models (e.g. DeepSeek's newer "flash" line) whose internal thinking pass could consume the connectivity probe's whole token budget before writing a reply. The probe now uses a larger budget and disables thinking mode for DeepSeek endpoints specifically. Actual AI blog generation was never affected.

= 3.0.10 =
* Maintenance release. (The new SEO/GEO admin page and 404 monitor this version adds are part of the paid Pro modules and have no effect on the free plugin.)

= 3.0.9 =
* Maintenance release. (New sitemap/redirects/schema functionality this version is part of the paid Pro modules and has no effect on the free plugin.)

= 3.0.8 =
* New: Settings → General now has a WhatsApp number field and a "Show a floating WhatsApp button" toggle for a site-wide click-to-chat button (middle-right of the screen).

= 3.0.7 =
* Repositioned for B2B & B2C websites generally, not only foreign-trade/export sites. No functional changes.

= 3.0.6 =
* Fix: the License screen showed a stale pre-fork vendor placeholder.

= 3.0.5 =
* Maintenance release.

= 1.0.4 =
* Maintenance release.

= 1.0.3 =
* Hardening across request-path handling.
* Failed-login tracking is bounded so it cannot grow without limit.

= 1.0.2 =
* Maintenance release.

= 1.0.1 =
* Fix: the Form Builder screen could return "Sorry, you are not allowed to access this page." when opened from the Forms list.

= 1.0.0 =
* First release.

== Upgrade Notice ==

= 3.0.8 =
New: optional floating WhatsApp button.

= 1.0.4 =
Recommended hardening and stability fixes.
