=== Integration for Zoho Campaigns - Contact Form 7, WPForms, Elementor, Gravity Forms and More ===
Contributors: plugcrux, integrazo, padmadev
Tags: zoho campaigns, contact form 7, wpforms, elementor forms, gravity forms
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 1.0.11
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Connect Contact Form 7, WPForms, Elementor Forms, Gravity Forms, and more form submissions with Zoho Campaigns.

== Description ==

This plugin sends form submissions from Contact Form 7, WPForms, Elementor Forms, Gravity Forms, and Formidable Forms to Zoho Campaigns.

When a user submits a form, the plugin can create or update subscribers in your Zoho Campaigns mailing lists. This helps reduce manual data entry and keeps your Zoho Campaigns lists in sync with your website forms.

Supported form plugins:

- [Contact Form 7](https://wordpress.org/plugins/contact-form-7/)
- [WPForms](https://wordpress.org/plugins/wpforms-lite/)
- [Elementor Forms](https://wordpress.org/plugins/elementor/)
- [Gravity Forms](https://www.gravityforms.com/)
- [Formidable Forms](https://wordpress.org/plugins/formidable/)

Video tutorial:

https://www.youtube.com/watch?v=M5MKPvSrpD0

== Authentication ==

To connect your Zoho Campaigns account:

1. Go to the Accounts page in the plugin.
2. Click Add Account.
3. Enter an identifiable account name (for example, “Main Zoho Campaigns Account”).
4. Select the appropriate data center (for example, `zoho.com`, `zoho.eu`).
5. Click Authenticate to open the Zoho authorization page.
6. Log in to Zoho and approve the requested permissions.
7. After approval, you will be redirected back to WordPress, and the account will be listed on the Accounts page.

== Add Integration ==

To create a new integration:

1. Go to the Setup page.
2. Click Add Integration.
3. Enter an integration name (for example, “Newsletter Signup”).
4. Select the form type (Contact Form 7, WPForms, Elementor, Gravity Forms, or Formidable).
5. Choose the connected Zoho Campaigns account.
6. Select the Zoho Campaigns list where subscribers should be added.
7. Map form fields to Zoho Campaigns fields in the field mapping section.
8. Optionally map additional fields such as custom fields, country, city, UTM parameters, or submitted URLs (where supported).
9. Use the filter criteria section to apply conditions (for example, sync only if a checkbox is selected).
10. Click Save Mapping.

== Logs ==

The plugin provides a logs section to review how data is being sent to Zoho Campaigns.

- Open the Logs page to see a list of submissions and their statuses.
- Typical statuses include:
  - SUCCESS – record synced successfully.
  - RECORD_FAILED – record not synced due to an error (for example, an invalid email).
  - AI_DETECTION – record held due to AI rules (for example, based on domain rules).

Additional options:

- Filter logs by integration, status, or date range.
- Open the log details view to see the full request, response, and error messages.
- Resync or delete individual records, or use bulk actions where available.
- Review AI-detected records and resync them after manual review, if required.

== Settings ==

Global settings can be managed from the Settings page:

- Delete data on uninstall – when enabled, plugin data will be removed when the plugin is deleted from WordPress.
- Error email notification – enable or disable email notifications when a record fails.
- Notification emails – specify one or more email addresses (comma-separated) to receive error notifications.
- Email subject – set the subject line for error notification emails.

== AI Settings ==

AI-related options can be managed from the AI Settings section:

- Email validation – configure rules to handle email addresses from specific domains (for example, public email domains).
- Blocked domains – add or remove domains that should be treated according to your rules.
- Action for blocked emails:
  - Send to Zoho Campaigns (ignore AI detection), or
  - Store in logs for review and manual resync later.
- Tabs for Email Validation, Email Detection, and Spam Detection – configure rules separately for each type of check.

Note: If Double Opt-in is enabled in Zoho Campaigns, subscribers will receive a confirmation email and will be added to the list only after confirmation. This behavior can be adjusted in Zoho Campaigns settings.

== Privacy and Data Handling ==

- Form submission data is sent from your WordPress site to Zoho Campaigns via their API.
- The plugin does not send data to any third-party service other than the configured Zoho services.
- Data handling is subject to your Zoho Campaigns account configuration and policies.

== Free and Paid Features ==

The plugin is available in a free version with optional paid features.

Free version includes:

- Connect up to 2 Zoho Campaigns accounts
- Connect up to 2 forms
- Support for standard fields and basic field mapping
- Custom value support
- Basic AI settings for email handling
- System fields mapping where applicable
- Error log view and basic management
- No daily record limit enforced by the plugin

Paid version adds:

- Unlimited account connections (subject to Zoho limits)
- Unlimited form connections
- Premium field support
- Custom field mapping
- Advanced AI options and additional controls
- Extended resync options and log handling
- Email notifications for failed records

Upgrade now: https://integrazo.com/products/integrate-with-zoho-campaigns

== Features Overview ==

- Connect Zoho Campaigns to supported form plugins
- Configure multiple Zoho Campaigns accounts and lists
- Map form fields to Zoho Campaigns fields, including custom fields
- Real-time syncing of form submissions to Zoho Campaigns
- Optional conditional logic to control when records are created or updated
- Activity logs with status and error details
- Resync options for failed or AI-held records
- AI-based rules for email and spam handling
- Optional email notifications for errors
- Settings to control data removal on uninstall

== Installation ==

Automatic installation  
1. Go to Plugins > Add New in your WordPress dashboard.  
2. In the search bar, type Integrazo and locate this plugin.  
3. Click Install and then Activate.  
4. Go to the plugin settings to connect your Zoho Campaigns account and start syncing.

Manual installation  
1. Upload the plugin ZIP file via Plugins > Add New > Upload Plugin.  
2. Activate the plugin.  
3. Go to the plugin settings and complete the setup.

== Screenshots ==  

1. Connect your Zoho Campaigns account
2. Map form fields to Zoho Campaigns fields
3. View integration logs and submission statuses
4. Detailed log view with request and response data
5. Plugin settings page
6. AI validation settings  

== Frequently Asked Questions ==

= Which WordPress form plugins does this support? =

This plugin currently supports:

- Contact Form 7  
- WPForms  
- Elementor Forms  
- Gravity Forms  
- Formidable Forms  

= How do I integrate Contact Form 7 with Zoho Campaigns? =

1. Open the plugin and go to the Setup tab.  
2. Choose Contact Form 7 as the form type.  
3. Select the Zoho Campaigns list.  
4. Map the Contact Form 7 fields to Zoho Campaigns fields.  
5. Save the integration.

= How do I integrate WPForms with Zoho Campaigns? =

1. Go to the plugin’s Setup section.  
2. Select WPForms as the form type.  
3. Choose the Zoho Campaigns list.  
4. Map WPForms fields to Zoho Campaigns fields.  
5. Save the integration.

The same general steps apply for Elementor Forms, Gravity Forms, and Formidable Forms: choose the form type, select the Zoho Campaigns list, map fields, and then save.

= Can I map custom fields in Zoho Campaigns? =

Yes, you can map form fields to custom fields in Zoho Campaigns where available. This helps organize and segment your data more effectively.

= What happens if a submission fails to sync with Zoho Campaigns? =

Failed submissions are:

- Recorded in the Logs section  
- Shown with the error message returned by Zoho  
- Available for manual or bulk resync, where supported  

= Does this plugin support real-time sync? =

Yes. Form entries are sent to Zoho Campaigns immediately after submission, subject to API availability and configuration.

= How can I troubleshoot integration issues? =

If records are not being created as expected:

1. Re-authenticate your Zoho account, if needed.  
2. Check that required fields are mapped correctly.  
3. Review the Logs page for error messages.  
4. Verify Zoho API limits and account-level restrictions.  
5. Contact support if the issue continues:  
   https://integrazo.com/pages/contact

= Do I need a Zoho Campaigns account to use this plugin? =

Yes. You need an active Zoho Campaigns account to send data from your WordPress site to Zoho Campaigns.

= Is data transfer secure between WordPress and Zoho Campaigns? =

The plugin uses:

- OAuth 2.0 for authentication  
- Communication over HTTPS (provided your site and Zoho endpoints use HTTPS)  

You should ensure your site is configured to use HTTPS for best security.

== Changelog ==

= 1.0.11 =
* Security: Added ABSPATH check to prevent direct file access across missing files.
* Security: Replaced wp_redirect() with wp_safe_redirect() for improved redirect safety.
* Fixed: License expiry notice now displays correctly for all expired licenses, 
  regardless of how long ago the license expired.

= 1.0.10 =
* Fixed: Settings link in Plugins page now uses admin_url() for improved compatibility.
* Improved: Code hardening with stricter output escaping in admin views.
* Checked: Tested and confirmed compatible with WordPress 6.9.1.

= 1.0.9 =
* Improved: Readme content clarity and wording for better understanding of supported forms and Zoho integrations.
* Updated: Short description to clearly mention support for other form submissions.
* Improved: Minor UI text refinements across admin pages.

= 1.0.8 =
* Changed: Replaced transient-based account authentication storage with WordPress options for improved reliability.
* Improved: Account authentication flow stability during Zoho OAuth redirects.
* Improved: Better handling of authentication errors and session recovery.
* Improved: Data sanitization and validation in the Accounts and Setup pages.
* Fixed: Edge cases where account data could be lost during browser refresh or delayed redirects.

= 1.0.7 =
* Checked: Plugin tested and confirmed compatible with WordPress 6.9
* Updated: "Tested up to" value updated to 6.9 in readme.txt

= 1.0.6 =
* Updated: Readme file revised to follow WordPress.org guidelines.
* Updated: Description, tags, and sections rewritten for clarity and compliance.

= 1.0.5 =
* Changed: Updated Elementor Forms integration flow for improved setup.
* Improved: Reliability when mapping Elementor Forms fields.

= 1.0.4 =
* Added: FAQ entry about disabling specific integrations.
* Fixed: All known error notices reported by WordPress debug logs.
* Checked: Tested with WordPress 6.8.

= 1.0.3 =
* Fixed: Elementor Forms field-loading issue.

= 1.0.2 =
* Added: Improved validation and sanitization.
* Fixed: Issue causing a blank page when selecting a list.

= 1.0.1 =
* Added: Compatibility with WordPress 6.8.
* Fixed: Removed unnecessary use of `$wpdb->prepare()` for static table names.
* Fixed: i18n issue by removing an empty `__()` string in `get_columns()`.

= 1.0.0 =
* Initial release with:
  - Support for Contact Form 7, Gravity Forms, WPForms, Elementor Forms, and Formidable Forms.
  - Error logging and resync options for failed submissions.
  - Email notifications for integration failures.

== Support ==

If you need help or want to request a feature:

- https://integrazo.com/pages/contact  
- https://integrazo.com/pages/request-feature  

Website: https://integrazo.com/  
Email: support@integrazo.com  

== Additional Notes ==

This plugin supports WordPress multisite installations and has been tested for compatibility with recent WordPress versions.
