# 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.\
  \&#xNAN;*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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://limechatai.gitbook.io/limechat-product-guide/helpdesk/integrations/limechat-leadsquared-integration-scope.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
