=== W2A CRM Sync for Attio ===
**Contributors:** woo2pipe, woo2attio  
**Tags:** attio, woocommerce, crm, sync, automation  
**Requires PHP:** 8.0  
**Requires at least:** 6.2  
**Tested up to:** 7.0
**Stable tag:** 0.1.1
**License:** GPLv3 or later  
**License URI:** http://www.gnu.org/licenses/gpl-3.0.html

**Sync your WooCommerce store with Attio** to effortlessly manage customer activity and orders in one place.

== Description ==

**W2A CRM Sync for Attio** connects your WooCommerce store with **Attio CRM**.
Automatically **sync your orders and customers activity**, ensuring your sales team has access to the most **up-to-date information**, enabling better decision-making and customer interactions.

The synchronization itself is performed by the W2A service (see *External Services* below): the plugin formats your WooCommerce data and hands it to the service, which authenticates against Attio, handles rate limiting and retries, and writes the records into your Attio workspace. To connect the plugin to that service you create a W2A account and paste your W2A API key in the plugin settings. The W2A service is a hosted, paid service (a free trial is available); its pricing, terms and privacy policy are published at [woocommerce-to-attio.com](https://woocommerce-to-attio.com/). The plugin itself is free and GPL-licensed.

**Learn More here** : [https://woocommerce-to-attio.com/](https://woocommerce-to-attio.com/)

== Features ==

- **Seamless WooCommerce ↔ Attio Sync:** Automatically sync your orders and customers so your sales team always has the latest data at their fingertips, mapped to Attio's **People**, **Companies** and **Deals** objects.
- **Smart Tasks from Events:** Turn WooCommerce events into actionable Attio tasks. For example, automatically create an "Onboarding call" task when a new customer registers. Never miss an opportunity to follow up.
- **Abandoned Cart Tracking:** Detect when a cart is abandoned and instantly create a deal or task in Attio. Choose how long a cart must be inactive before it's considered abandoned (default: 2 hours).
- **Instant Access to Your Attio Schema:** Automatically fetch your Attio configuration – object attributes, workspace members, deal stages and select/status options – so configuration is fast and accurate.
- **Automatic Deal Stage Mapping:** Map each WooCommerce order outcome (open, won, lost) to your own Attio deal stages, with smart auto-matching you can review and adjust.
- **Automatic Linking:** Deals are automatically linked to the related person and company via Attio record references – no manual mapping required.
- **Full Historical Sync:** Need to catch up on past data? Import all your previous WooCommerce customers and orders, even those created before installing the plugin.
- **Flexible Field Mapping & Conditions:** Map WooCommerce data to Attio attributes with precision. Add conditions and advanced options (deduplication, skip-if-exists) to fit your exact business needs.
- **Flexible Products Handling:** Send order products to Attio your way – as a note on the deal, into your own Attio object, or into a dedicated "Line items" object the plugin can create for you.
- **Error Logging & Debugging Made Easy:** Detailed logs let you monitor syncs, spot issues, and fix them quickly – ensuring your sales data is always reliable.

Check all our features on our [dedicated page:](https://woocommerce-to-attio.com/features)

== Use this plugin to ==

- Gain a **centralized view** of your WooCommerce sales in Attio.
- **Automate sales processes** and follow-ups.
- Enhance **customer relationship management**.
- **Analyze and track sales performance** with better insights.

== Installation ==

### Automatic Installation

1. Go to your **WordPress dashboard**.
2. Navigate to **"Plugins > Add New"**.
3. Search for **"W2A CRM Sync for Attio"**.
4. Click **"Install Now"** and then **"Activate"**.

After activation, open the **W2A** menu, enter your Attio API key, and check the connection.

== Screenshots ==

1. **Choosing which WooCommerce and WordPress events sync to Attio People**
   The People settings tab: enable the events (order placed or updated, user registration, profile update, abandoned cart, and more) that push records to your Attio People, and pick which attributes each event sends.

2. **Mapping WooCommerce data to Attio attributes, with fallbacks and conditions**
   The attribute mapping screen for an Attio Person: map attributes such as Name, Email addresses, Phone numbers or Primary location from WooCommerce fields, chain fallback variables, set send conditions, and enable deduplication and auto-linking to existing Attio records.

3. **Synchronization history with per-record Attio IDs and statuses**
   The History tab lists every sync — action, hook, target object (People, Companies or Deals), WooCommerce source, the resulting Attio record ID, and its state (DONE, CANCELED, INVALID) — filterable by hook, category, state and source.

== External Services ==

This plugin relies on two external services to do its work. Both are required for the synchronization features described above.

**1. W2A synchronization service (woocommerce-to-attio.com)**

What it is: a synchronization service that receives a generic, version-independent payload from the plugin, adapts it to Attio's current API, and writes the records into your Attio workspace. It performs work that cannot be done reliably from a WordPress site alone:

* API resilience: the plugin sends a generic payload; the service maps it to the current Attio API. When Attio changes its API, the mapping is updated once on the server, so existing stores keep working without having to update the plugin.
* Reliable delivery under rate limits: Attio enforces a write rate limit, while PHP requests have a hard maximum execution time and WordPress cron is request-triggered and not guaranteed. The service is a persistent worker that throttles to Attio's limit, backs off when the limit is reached, and resumes later until every record is delivered.
* It holds the Attio connection server-side and routes each record to the correct Attio object.

What data is sent and when: when one of the synchronization events you enabled occurs (a WooCommerce order reaching a mapped status, a user registering or updating their profile, an abandoned cart being detected) and on a scheduled background job every 15 minutes, the plugin sends the corresponding records to the service. Depending on your field mapping this includes order details (amounts, status, products), customer information (name, email, phone, billing/shipping address) and the related WooCommerce/Attio identifiers. A W2A API key, created with your W2A account, is sent to authenticate the request.

Account and pricing: using the service requires a W2A account and API key. It is a paid, hosted service with a free trial; current pricing is published on the W2A website.

Terms and privacy: [Terms and Conditions](https://woocommerce-to-attio.com/terms-and-conditions) — [Privacy Policy](https://woocommerce-to-attio.com/privacy-policy).

**2. Attio API (api.attio.com)**

What it is: the official Attio REST API. The plugin's settings screen calls it directly to read your Attio workspace configuration so you can map fields — object attributes, workspace members, deal stages and select/status options.

What data is sent and when: these calls happen while you configure the plugin in the WordPress admin (e.g. opening the mapping screens or checking the connection). The plugin sends your Attio API key as a Bearer token; no WooCommerce customer data is sent on these configuration calls.

Terms and privacy: [Attio Terms of Service](https://attio.com/legal/terms-and-conditions) — [Attio Privacy Policy](https://attio.com/legal/privacy).

== Frequently Asked Questions ==

**Q: How can I set up the plugin?**  
You can find all our setup tutorials on this page:  
[https://woocommerce-to-attio.com/setup-guide](https://woocommerce-to-attio.com/setup-guide)

**Q: What data gets synced to Attio?**  
The plugin syncs order details, customer information, product details, and custom metadata to your Attio People, Companies and Deals.

**Q: Can I customize attribute mappings?**  
Yes, the plugin allows you to customize mappings between WooCommerce data and your Attio object attributes.

**Q: What happens if the sync fails?**  
The plugin provides **detailed logs** for failed sync attempts. If you have any questions, feel free to reach out to us via our contact page.

**Q: Does the plugin need an external service?**  
Yes. The synchronization is carried out by the W2A service (see *External Services* above). You connect the plugin to it with a W2A API key from your W2A account.

**Q: Does the plugin sync previous data?**  
Yes, the plugin supports syncing customers and orders made before the installation, through the full historical sync.

== Changelog ==
**= 0.1.1 - 2026-06-16 =**
- WooCommerce is now optional: the plugin can run for contact-only sync (users synced to Attio People/Companies via registration and profile updates). Order, cart and deal features activate automatically when WooCommerce is present.

**= 0.1.0 - 2026-06-02 =**
- Initial release of the WooCommerce to Attio integration.
- Connect to the Attio REST API and fetch object attributes (People, Companies, Deals).
- Map WooCommerce orders and customers to Attio People, Companies and Deals.
- Interactive deal stage mapping with auto-matching against your workspace stages.
- Global default deal owner, applied automatically to synced deals.
- Automatic linking of deals to the related person and company (Attio record references).
- Create Attio tasks from WooCommerce events (with assignee and deadline).
- Flexible products handling: as a note on the deal, into an existing object, or a dedicated "Line items" object.
- Abandoned cart tracking, full historical sync, conditions and deduplication options, and detailed error logging.

== Upgrade Notice ==

**= 0.1.0 =**  
Initial release of the Attio integration. After installation, open the **W2A** menu, add your Attio API key, and check the connection to get started.
