> For the complete documentation index, see [llms.txt](https://limechatai.gitbook.io/limechat-product-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://limechatai.gitbook.io/limechat-product-guide/helpdesk/integrations/limechat-leadsquared-integration-scope.md).

# LimeChat × LeadSquared — Integration Scope

### Overview

Connect LimeChat with LeadSquared so new leads/opportunities automatically create a ticket in LimeChat, agents stay in sync across both systems, tags drive workflow updates, and stage/status changes trigger WhatsApp messages via Flow-builder.

### What’s Included (Scope)

1. **Auto-create ticket on new lead/opportunity**\
   When a new lead/opportunity is created in LeadSquared, a corresponding ticket (conversation) is created in LimeChat.
2. **Two-way agent/owner sync**
   * Changing the **owner** in LeadSquared updates the **assigned agent** on the linked LimeChat ticket.
   * Changing the **assigned agent** in LimeChat updates the **owner** in LeadSquared.
   * **Requirement:** the agent uses the **same email** on both platforms.
3. **Two-way tag & field updates**
   * LeadSquared field updates can **auto-add tags** to the linked LimeChat conversation.
   * Adding tags in LimeChat can **update fields** or **post activities** on the linked record in LeadSquared.
4. **Flow-builder campaigns on stage/status change**
   * Send messages to end users when a lead/opportunity **stage or status** changes.

### How It Works (At a Glance)

* **Create Opportunity from LimeChat:**\
  Agents see a **pre-filled form** (built from your LeadSquared field configuration). They review and submit; an opportunity is created in LeadSquared and a linked ticket is ensured in LimeChat.\
  *Note: Dates use the YYYY-MM-DD format.*
  * The process of submitting the form and ticket creation can be automated via LimeChat's automation rules feature.
* **Continuous Sync:**\
  The link between the LimeChat ticket and the LeadSquared record keeps ownership and tags/fields in sync, as described above.
* **Campaign Triggers:**\
  Flow-builder watches for **stage/status changes** in LeadSquared and sends the right message template to the end user.

### Assumptions & Rules

* **Identity match:** Agent email addresses must **match** across LeadSquared and LimeChat for assignment sync to work.
* **Linked records only:** Two-way sync applies to records/tickets **created or linked** by this integration.
* **Field mapping:** We’ll align required fields (e.g., name, email, phone, city, check-in/out dates) to your LeadSquared setup.

### Security & Authentication

* Integration uses **secure header-based authentication** configured by LimeChat. No credential storage or changes are required from your team beyond granting standard access for setup.

### What We Need From You

* Confirm **field mappings** (required vs optional) and any **tag ↔ field/activity** rules you want.
* Ensure **agent emails** are consistent across both systems.
* Provide test records and a short **UAT window** to validate create, assign, tag, and campaign flows.

### Out of Scope&#x20;

* Historical backfills or retroactive re-assignment.
* Custom business logic beyond the stated tag/field rules.
* Non-LeadSquared CRMs or multi-CRM routing.

### UAT Checklist

* Create lead/opportunity in LeadSquared ⇒ **Ticket appears** in LimeChat.
* Change owner in LeadSquared ⇒ **Agent updates** in LimeChat (and vice-versa).
* Update a mapped field in LeadSquared ⇒ **Tag appears** on the LimeChat ticket.
* Add a tag in LimeChat ⇒ **Mapped field/activity updates** in LeadSquared.
* Change stage/status in LeadSquared ⇒ **Message is sent** via Flow-builder.
