Technical¶
Components¶
- Table and Field Definitions Lime CRM
- Frontend with Lime Web Components (webclient)
- Custom endpoints
- Topic matching
- Portal
- Lime Connect
Table and Field Definitions Lime CRM¶
The installation of Lime Connect will create the ulconversation table and add a ulconversation field on the table specified in the installer config. If a document limetype is specified, a ul_messageid field will be added to the document table.
Below is an example of the database structure changes when the installation targets the Helpdesk limetype.
Table database name: ulconversation
| Field | Field type | Required | Read only | Invisible | Note |
|---|---|---|---|---|---|
| conversationid | Integer | No | Yes | No | |
| link | Link (512) | No | Yes | No | |
| contactid | Text (256) | No | Yes | On Forms | |
| helpdesk | Relation | - | Yes | No | |
| startedtime | Date and Time | No | Yes | No | |
| contactfirstmessagetime | Date and Time | No | Yes | No |
Warning
The entire ulconversation table should be invisible
Table database name: helpdesk
| Field | Field type | Required | Read only | Invisible | Note |
|---|---|---|---|---|---|
| ulconversation | Relation | - | No | No |
Table database name: document
| Field | Field type | Required | Read only | Invisible | Note |
|---|---|---|---|---|---|
| ul_messageid | Text (256) | No | Yes | Yes | Used for media files import. |
Lime Web Components¶
Hijacks the create new conversation button to link a new conversation in Lime Connect to an existing limeobject.
Custom Endpoints¶
Lime Connect¶
POST¶
/userlike/
Creates a history note of the transcript and connects it to the created instance object.
Payload (for full example see the chat_session_end example here):
{
"id": 1,
"topics": [{ "text": "lead" }],
"contact": {
"name": "example",
"email": "example@lime.tech"
},
"transcript": [
{
"body": "Hello, you're talking to Lisa Abel. How can I help?",
"operator_name": "Lisa Abel"
},
{
"body": "hi",
"operator_name": ""
}
]
}
Response:
{ "url": "<URL_TO_INSTANCE_OBJECT>" }
Conversation¶
POST¶
/conversation/
Connect a conversation to a limeobject.
Query parameters:
{
"limetype": "helpdesk",
"limeobjectId": 1500,
"conversationId": "1000"
}
Response:
{
"limetype": "helpdesk",
"limeobjectId": 1500
}
Translations¶
GET¶
/translations/
Gets all translations for the limepkg-userlike package. Language is based on the Accept-Language header.
Topic Matching¶
A conversation that is sent from Lime Connect can carry more than one topic, and several of them can be mapped in Lime CRM. Lime CRM always creates one single object per sent conversation, so when several mapped topics arrive at the same time, one of them has to be picked.
Lime CRM reads the runtime configuration from top to bottom and stops at the first mapping that matches:
- The instances are checked in the order they are listed in Lime Admin.
- Within each instance, its mappings are checked in the order they are listed.
- The first mapping that matches one of the conversation's topics wins. The object is created on that instance, using the default values from that mapping.
Topics that are not configured in any mapping are ignored. The order in which Lime Connect lists the topics has no effect on the result.
Avoid the conflict in Lime Connect
Ordering decides what happens when several mapped topics arrive at once. A cleaner setup is to make sure only one topic reaches Lime CRM in the first place. In Lime Connect this can be handled with AI Actions or Workflows that set the topic before the conversation is sent, with a default topic on the widget, or by agreeing with the operators on which topic to set manually. See the Lime Connect help center for details.
Mappings That Contradict Each Other¶
Two mappings on the same instance often set the same property to different values. A conversation that carries topics from both of them can only get one of the two.
Take a helpdesk instance with these mappings:
| Order | Mapping topics | Default values |
|---|---|---|
| 1 | resolved |
Status: Closed |
| 2 | support |
Status: Open |
A conversation sent with both support and resolved creates a closed ticket, because the resolved mapping is listed first.
Tip
Order the mappings so that the outcome you want to win sits at the top. If the support mapping had been listed first here, the ticket would have been created as open, and anything the solution triggers on a new open ticket, such as an automatic reply to the contact, would run for a case that was already handled in the chat.
Several Instances¶
The same rule applies across instances, and instance order is checked before mapping order. If a deal instance is listed above a helpdesk instance, a conversation carrying topics for both creates a deal, even when the matching helpdesk mapping sits higher up within its own instance.
If none of the conversation's topics match a configured mapping, no object is created and Lime Connect receives an error.
Note
Changing the order of the instances or the mappings in Lime Admin changes which object is created for conversations that carry several matching topics.
Portal¶
The Portal is a standalone Stencil frontend application served as an iframe inside the Lime Connect operator view. It communicates with the backend via the following endpoints. All portal endpoints are authenticated using JWT tokens and impersonate the userlike@lime API user.
Portal Client¶
GET¶
/limepkg-userlike/portal/client/
Serves the portal HTML page. This is the URL that should be configured as the iframe URL in the Lime Connect custom panel. The response includes a Content-Security-Policy header with frame-ancestors set to the configured portal_frame_ancestor.
Portal Data¶
GET¶
/limepkg-userlike/portal/client/data/
Returns CRM data for the contact. Requires an Authorization: Bearer <jwt> header.
Query parameters:
| Parameter | Description |
|---|---|
connect_payload |
A JSON string containing the Lime Connect contact information (id, name, email, etc.). |
Response (when a match is found):
{
"id": 1234,
"limetype": {
"name": "person",
"localname": "Person",
"icon_name": "user",
"color": "lime-green"
},
"descriptive": "Jane Doe",
"properties": [
{
"name": "email",
"label": "Email",
"type": "email",
"value": "jane.doe@example.com",
"text": "jane.doe@example.com",
"relation": null
},
...
],
"aggregations": [
{
"limetype": {
"name": "helpdesk",
"localname": "Helpdesk",
"icon_name": "headset",
"color": "lime-green"
},
"label": "Helpdesk",
"totalcount": 12,
"items": [
{
"id": 5001,
"text": "Cannot log in",
"secondary_text": "2025-12-01"
},
...
],
"filter": "a filter set"
}
]
}
Returns null if no matching CRM record is found.
Portal Translations¶
GET¶
/limepkg-userlike/portal/client/translations/
Returns portal-specific UI translations based on the application language.
Lime Connect¶
Please contact Lime Connect or see their documentation for technical information about Lime Connect from the Lime Connect point of view.