Auto Invitation
- 28 Jul 2022
- 5 Minutes to read
- Print
- DarkLight
Auto Invitation
- Updated on 28 Jul 2022
- 5 Minutes to read
- Print
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback
Auto Invitation
You need the Manage Campaigns Form permission to manage Auto Invitation.
Auto Invitations
- Auto Invitations ManageGET livechat/autoInvitations
- Get the list of Auto InvitationsGET livechat/autoInvitations/{id}
- Get a single Auto InvitationPOST livechat/autoInvitations
- Create a new Auto InvitationPOST livechat/autoInvitations/{id}:disable
- Disable the Auto InvitationPOST livechat/autoInvitations/{id}:enable
- Enable the Auto InvitationPUT livechat/autoInvitations/{id}
- Update the Auto InvitationDELETE livechat/autoInvitations/{id}
- Remove the Auto Invitation
Auto Invitation JSON Format
Auto Invitation is represented as simple flat JSON objects with the following keys:
Name | Type | Description |
---|---|---|
id | guid | Id of the auto invitation. |
campaignId | guid | Id of the campaign. |
name | string | Name of the auto invitation. |
isEnabled | bool | Whether auto invitation is enabled or not. |
isDisplayedOnceInOneSession | bool | Whether only pop-up once per site visit or not. |
order | integer | Order of the auto invitation. |
text | string | Message of the auto invitation. |
logicalExpression | string | Detail of the logic expression. |
conditionMetType | string | Allowed values are "all", "any", "logicalExpression". |
style | string | Allowed values are "bubble", "chatWindow". |
autoInvitationConditions | autoInvitationConditions[] | Reference to Condition. |
Auto Invitation Conditions JSON Format:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id | guid | Id of the condition. | ||||||||||||||||||||||||||||||||||||||||||
autoInvitationId | guid | Id of the auto invitation. | ||||||||||||||||||||||||||||||||||||||||||
operator | string | Allowed values are "is", "contains", "notContains", "isMoreThan", "isLessThan", "isNot", "isNotLessThan", "isNotMoreThan", "regularExpression", "isOneOf", "isNotIn". | ||||||||||||||||||||||||||||||||||||||||||
value | string | Value of the condition. | ||||||||||||||||||||||||||||||||||||||||||
order | integer | Order of the condition. | ||||||||||||||||||||||||||||||||||||||||||
fieldName | string | Name of the related field.
|
Get the list of Auto Invitations
GET livechat/autoInvitations
Parameters:
No Parameters
Response:
An array of Auto Invitation
Example
Sample Request:
curl https://api11.comm100.io/v4/livechat/autoInvitations \
-X 'GET' \
-H 'Authorization: Bearer {access_token}' \
Response:
HTTP/1.1 200 OK
[
{
"id": "d5c5e6f5-8167-4406-8d31-e50ef878d926",
"campaignId": "760571e6-e7b9-4bc3-8f97-55fc5483e439",
"name": "is",
"isEnabled": false,
"isDisplayedOnceInOneSession": false,
"order": 1,
"text": "Hello, how may I help you?",
"logicalExpression": "(1 or 2)",
"conditionMetType": "all",
"style": "bubble",
"autoInvitationConditions": [
{
"id": "52B05329-7C46-EB11-8100-00155D081D0B",
"autoInvitationId": "760571e6-e7b9-4bc3-8f97-55fc5483e439",
"operator": "is",
"value": "test",
"order": 1,
"fieldName": "{!Visitor.Number of visits}"
}
]
}
]
Get a single Auto Invitation
GET livechat/autoInvitations/{id}
Parameters:
No Parameters
Response:
Example
Sample Request:
curl https://api11.comm100.io/v4/livechat/autoInvitations/d5c5e6f5-8167-4406-8d31-e50ef878d926 \
-X 'GET' \
-H 'Authorization: Bearer {access_token}' \
Response:
HTTP/1.1 200 OK
{
"id": "d5c5e6f5-8167-4406-8d31-e50ef878d926",
"campaignId": "760571e6-e7b9-4bc3-8f97-55fc5483e439",
"name": "is",
"isEnabled": false,
"isDisplayedOnceInOneSession": false,
"order": 1,
"text": "Hello, how may I help you?",
"logicalExpression": "(1 or 2)",
"conditionMetType": "all",
"style": "bubble",
"autoInvitationConditions": [
{
"id": "52B05329-7C46-EB11-8100-00155D081D0B",
"autoInvitationId": "760571e6-e7b9-4bc3-8f97-55fc5483e439",
"operator": "is",
"value": "test",
"order": 1,
"fieldName": "{!Visitor.Number of visits}"
}
]
}
Create a new Auto Invitation
POST livechat/autoInvitations
Parameters:
Name | Type | in | Required | Description |
---|---|---|---|---|
campaignId | guid | body | yes | Id of the campaign. |
name | string | body | yes | Name of the auto invitation. |
isEnabled | bool | body | no | Whether auto invitation is enabled or not. |
isDisplayedOnceInOneSession | bool | body | no | Whether only pop-up once per site visit or not. |
order | integer | body | no | Order of the auto invitation. |
text | string | body | no | Message of the auto invitation. |
logicalExpression | string | body | no | Detail of the logic expression. |
conditionMetType | string | body | no | Allowed values are "all", "any", "logicalExpression". |
style | string | body | no | Allowed values are "bubble", "chatWindow". |
autoInvitationConditions | autoInvitationConditions[] | body | no | Reference to Condition. |
Response:
Example
Sample Request:
curl https://api11.comm100.io/v4/livechat/autoInvitations \
-X 'POST' \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
-D '{"campaignId":"760571e6-e7b9-4bc3-8f97-55fc5483e439","name":"is","isEnabled":false,"isDisplayedOnceInOneSession":false,"order":1,"text":"Hello, how may I help you?","logicalExpression":"(1 or 2)","conditionMetType":"all","style":"bubble","autoInvitationConditions":[{"operator":"is","value":"test","order":1,"fieldName":"{!Visitor.Number of visits}"}]}'
Response:
HTTP/1.1 201 Created
{
"id": "d5c5e6f5-8167-4406-8d31-e50ef878d926",
"campaignId": "760571e6-e7b9-4bc3-8f97-55fc5483e439",
"name": "is",
"isEnabled": false,
"isDisplayedOnceInOneSession": false,
"order": 1,
"text": "Hello, how may I help you?",
"logicalExpression": "(1 or 2)",
"conditionMetType": "all",
"style": "bubble",
"autoInvitationConditions": [
{
"id": "52B05329-7C46-EB11-8100-00155D081D0B",
"autoInvitationId": "760571e6-e7b9-4bc3-8f97-55fc5483e439",
"operator": "is",
"value": "test",
"order": 1,
"fieldName": "{!Visitor.Number of visits}"
}
]
}
Disable the Auto Invitation
POST livechat/autoInvitations/{id}:disable
Parameters:
Name | Type | in | Required | Description |
---|---|---|---|---|
id | guid | query | yes | Id of the campaign. |
Response:
Example
Sample Request:
curl https://api11.comm100.io/v4/livechat/autoInvitations/d5c5e6f5-8167-4406-8d31-e50ef878d926:disable \
-X 'POST' \
-H 'Authorization: Bearer {access_token}' \
Response:
HTTP/1.1 200 OK
{
"id": "d5c5e6f5-8167-4406-8d31-e50ef878d926",
"campaignId": "760571e6-e7b9-4bc3-8f97-55fc5483e439",
"name": "is",
"isEnabled": false,
"isDisplayedOnceInOneSession": false,
"order": 1,
"text": "Hello, how may I help you?",
"logicalExpression": "(1 or 2)",
"conditionMetType": "all",
"style": "bubble",
"autoInvitationConditions": [
{
"id": "52B05329-7C46-EB11-8100-00155D081D0B",
"autoInvitationId": "760571e6-e7b9-4bc3-8f97-55fc5483e439",
"operator": "is",
"value": "test",
"order": 1,
"fieldName": "{!Visitor.Number of visits}"
}
]
}
Enable the Auto Invitation
POST livechat/autoInvitations/{id}:enable
Parameters:
Name | Type | in | Required | Description |
---|---|---|---|---|
id | guid | query | yes | Id of the campaign. |
Response:
Example
Sample Request:
curl https://api11.comm100.io/v4/livechat/autoInvitations/d5c5e6f5-8167-4406-8d31-e50ef878d926:enable \
-X 'POST' \
-H 'Authorization: Bearer {access_token}' \
Response:
HTTP/1.1 200 OK
{
"id": "d5c5e6f5-8167-4406-8d31-e50ef878d926",
"campaignId": "760571e6-e7b9-4bc3-8f97-55fc5483e439",
"name": "is",
"isEnabled": true,
"isDisplayedOnceInOneSession": false,
"order": 1,
"text": "Hello, how may I help you?",
"logicalExpression": "(1 or 2)",
"conditionMetType": "all",
"style": "bubble",
"autoInvitationConditions": [
{
"id": "52B05329-7C46-EB11-8100-00155D081D0B",
"autoInvitationId": "760571e6-e7b9-4bc3-8f97-55fc5483e439",
"operator": "is",
"value": "test",
"order": 1,
"fieldName": "{!Visitor.Number of visits}"
}
]
}
Update the Auto Invitation
PUT livechat/autoInvitations/{id}
Parameters:
Name | Type | in | Required | Description |
---|---|---|---|---|
campaignId | guid | body | no | Id of the campaign. |
name | string | body | no | Name of the auto invitation. |
isEnabled | bool | body | no | Whether auto invitation is enabled or not. |
isDisplayedOnceInOneSession | bool | body | no | Whether only pop-up once per site visit or not. |
order | integer | body | no | Order of the auto invitation. |
text | string | body | no | Message of the auto invitation. |
logicalExpression | string | body | no | Detail of the logic expression. |
conditionMetType | string | body | no | Allowed values are "all", "any", "logicalExpression". |
style | string | body | no | Allowed values are "bubble", "chatWindow". |
autoInvitationConditions | autoInvitationConditions[] | body | no | Reference to Condition. |
Response:
Example
Sample Request:
curl https://api11.comm100.io/v4/livechat/autoInvitations/d5c5e6f5-8167-4406-8d31-e50ef878d926 \
-X 'PUT' \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
-D '{"campaignId":"760571e6-e7b9-4bc3-8f97-55fc5483e439","name":"is","isEnabled":false,"isDisplayedOnceInOneSession":false,"order":1,"text":"Hello, how may I help you?","logicalExpression":"(1 or 2)","conditionMetType":"all","style":"bubble","autoInvitationConditions":[{"operator":"is","value":"test","order":1,"fieldName":"{!Visitor.Number of visits}"}]}'
Response:
HTTP/1.1 200 OK
{
"id": "d5c5e6f5-8167-4406-8d31-e50ef878d926",
"campaignId": "760571e6-e7b9-4bc3-8f97-55fc5483e439",
"name": "is",
"isEnabled": false,
"isDisplayedOnceInOneSession": false,
"order": 1,
"text": "Hello, how may I help you?",
"logicalExpression": "(1 or 2)",
"conditionMetType": "all",
"style": "bubble",
"autoInvitationConditions": [
{
"id": "52B05329-7C46-EB11-8100-00155D081D0B",
"autoInvitationId": "760571e6-e7b9-4bc3-8f97-55fc5483e439",
"operator": "is",
"value": "test",
"order": 1,
"fieldName": "{!Visitor.Number of visits}"
}
]
}
Remove the Auto Invitation
DELETE livechat/autoInvitations/{id}
Parameters:
Name | Type | in | Required | Description |
---|---|---|---|---|
id | guid | query | yes | Id of the campaign. |
Response:
No Content
Example
Sample Request:
curl https://api11.comm100.io/v4/livechat/autoInvitations/d5c5e6f5-8167-4406-8d31-e50ef878d926 \
-X 'DELETE' \
-H 'Authorization: Bearer {access_token}' \
Response:
HTTP/1.1 204 No Content
Was this article helpful?