=== Task Session CRM ===
Contributors: tasksession
Tags: crm, leads, woocommerce, abandoned cart, email marketing
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Connect your site to Task Session CRM: form entries become leads, WooCommerce customers sync with consent, and carts get reminder emails.

== Description ==

[Task Session CRM](https://www.tasksession.com/) is a CRM for small teams, with leads, projects, invoices and email marketing. This plugin connects your website to your Task Session CRM workspace (Cloud or self-hosted).

**Forms to leads**
Contact Form 7, Gravity Forms, WPForms, Elementor Pro forms, Ninja Forms, Fluent Forms and Formidable Forms are found automatically. You choose in the CRM which forms create leads and where each field goes (lead fields, custom fields or notes).

**WooCommerce**

* Customers and orders sync to the CRM, each store kept separate.
* Marketing consent: an optional checkbox at checkout (classic and block checkout). Only customers who agree are added to your email list, unless you choose otherwise.
* Abandoned cart: carts are saved only for shoppers who gave their email and agreed to emails. The reminder email has a link that refills the cart.
* Browse abandonment for known contacts.
* Which email led to which order (email attribution).
* One click links the store to the CRM Ecommerce module.

**Signup popup**
A small popup to grow your list. Text and timing are set in the CRM.

**Light and safe**

* Data is saved first and sent in the background, so a slow connection never slows your site or loses an entry.
* Every request is signed with a key that only your website and your CRM know.
* No tracking of anonymous visitors.

**Useful links**

* [Website](https://www.tasksession.com/)
* [Setup guide: sync WooCommerce with Task Session CRM](https://www.tasksession.com/docs/integrations/how-to-sync-woocommerce-customers-and-orders-with-task-session-crm/)
* [Documentation](https://www.tasksession.com/docs/)
* [Pricing](https://www.tasksession.com/pricing/)

== External services ==

This plugin connects your website to Task Session CRM, a CRM service made by Task Session (https://www.tasksession.com/). It is needed for everything the plugin does: without a connection the plugin sends nothing.

The plugin talks only to the Task Session CRM address you enter on the Connect screen: your workspace on app.tasksession.com (for example https://yourcompany.app.tasksession.com/), or the address of your own self-hosted Task Session CRM. All requests after connecting are signed with a key that only your website and your CRM know.

What is sent, and when:

* When you click Connect: the CRM address is checked (a request to /api/v1/integrations/info), then your browser goes to the CRM sign-in page with this site's address and name. After you press Allow, a one-time code is exchanged for the website key.
* When you paste a website key instead: the same check, then the CRM settings are loaded with that key.
* Every 15 minutes, and when the CRM says they changed: the settings you chose in the CRM are loaded (which forms create leads, store and popup settings). Nothing about your visitors is sent for this.
* When a visitor submits a form that you switched on in the CRM: the form entry, the page address and campaign tags (utm_source, utm_medium, utm_campaign) if the visitor came from a link that had them.
* When a WooCommerce customer or order is created or changes: customer name, email, phone, city, country, order number, items, totals, status, refunds, coupon and the checkout consent choice. Past orders of the last 12 months only when you click "Send past orders".
* Carts and product views: only for shoppers who gave their email and agreed to emails, when the cart changes or they view a product.
* When a visitor signs up in the popup: email and first name.
* Once a day: the plugin, WordPress and WooCommerce versions, and the list of forms found on the site (form titles and field names, no entries).
* When you click "Link to Ecommerce": a WooCommerce API key the plugin creates for the CRM, with the store address and name.
* When you click Disconnect: a notice to the CRM that this website disconnected.

Nothing is sent before you connect, and nothing is sent after you disconnect. Entries are saved on your site first and sent in the background, so they may arrive a minute later.

* Terms and conditions: https://www.tasksession.com/terms-and-conditions/
* Privacy policy: https://www.tasksession.com/privacy-policy/

== Installation ==

1. Install and activate the plugin.
2. Go to Task Session in the WordPress menu.
3. Choose Cloud or Self-hosted, enter your CRM address and click Connect.
4. Sign in to the CRM and press Allow.
5. In the CRM, switch on the forms that should create leads and pick an automation.

The [setup guide](https://www.tasksession.com/docs/integrations/how-to-sync-woocommerce-customers-and-orders-with-task-session-crm/) walks through connecting and the first WooCommerce sync step by step.

== Frequently Asked Questions ==

= Do I need WooCommerce? =

No. Forms work on any WordPress site. Store features appear when WooCommerce is active.

= Can I connect two stores to one CRM? =

Yes. Each website is its own connection, and customers and orders stay separate per store. A person who buys in both stores is one email contact with one unsubscribe.

= Can I connect without signing in? =

Yes. In the CRM go to Settings > Integrations > Add a website by key, and paste the key under "Use an API key instead".

= What happens when I delete the plugin? =

Nothing in the CRM changes. If you ticked "Delete the plugin data" in the plugin Settings, the plugin's own data on this website is removed too.

== Screenshots ==

1. Overview: what the website sent to the CRM, what is switched on, and the getting started checklist.
2. WooCommerce: store orders, sync health, consent, past orders and the latest orders.
3. Forms found on the website and which of them send leads.
4. Activity: everything the website sent, with filters.

== Changelog ==

= 1.1.0 =
* Security: every admin action has its own nonce and capability check, and the signup popup uses a nonce.
* All function, class, option, table, cron and script names now use the tscrm prefix. Settings, the connection and unsent items move over on their own when you update.
* Admin styles load only on the plugin page.
* The once-a-minute job is scheduled correctly on activation.

= 1.0.3 =
* Settings shows the address the plugin sends data to, with a warning when it is not the connected CRM.
* Fix: the once-a-minute job is created again on every page load when it is missing, so the "WP-Cron is switched off" notice no longer shows by mistake.

= 1.0.2 =
* Customers created from Task Session CRM can skip the WooCommerce "new account" email (same CRM setting as order emails).

= 1.0.1 =
* Order changes made in Task Session CRM can skip WooCommerce customer emails (CRM store setting "WooCommerce customer emails").

= 1.0.0 =
* First release.

== Upgrade Notice ==

= 1.1.0 =
Security and code review fixes. Your connection and settings are kept.

= 1.0.3 =
Shows where the plugin sends data, so a wrong connection is easy to spot.

= 1.0.2 =
The CRM setting for WooCommerce customer emails now also covers the "new account" email.

= 1.0.1 =
Lets Task Session CRM change orders without emailing the customer, when you choose so in the CRM.

= 1.0.0 =
First release.
