LeadSquared Converse System Notification to Users

Through this API, send automated notifications to your users through LeadSquared Converse. The notifications are delivered through a user called “System”. The notification will be pinned to the top of your LeadSquared Converse pop-up, for easy of use and navigation. These messages include notifications for new leads, lead assignments, important lead activities, task reminders, automation driven follow-ups, etc.

Converse API_1

Note:

 

API URL

POST
https://api-in21.leadsquared.com/v2/Converse.svc/NotifyUser?accessKey=AccessKey&secretKey=SecretKey
Copy URL

Request

JSON Body/Payload

Content-Type: application/json

{
   "Type":"Lead",
   "CardContents":{
      "Message":"New Lead Assigned .",
      "Description":"Lead submitted the form in our campaign page.",
      "CTA":{
         "CTALabel":"View Lead",
         "CTALink":"https://us11.leadsquared.com/LeadManagement/LeadDetails?LeadID=4fd84498-d53c-4de5-a540-6ac466a6aa6c&pageNumber=1"
      },
      "IconColorCode":"rgb(247, 79, 103, 0.9)"
   },
   "ToUser":"2f5508b5-f7ed-11ea-b39f-122cab85b441",
   "ExternalSource":{
      "ExternalReferenceId":"190781237",
      "InvocationSource":"Platform"
   }
}

JSON Properties

Parameter Description
Type

Defines the type of notification.

Possible values can be “Lead”, “Opportunity”, “Activity”, “Task”, and so on.

CardContents

Specifies the content in the notification.

Message – The notification message that’s sent to the user. The maximum message length is 200 characters.

Description – The notification description that’s sent to the user. The maximum description length is 500 characters.

 

CTA

The call to action (CTA) notification the user will receive.

CTALable – The maximum length is 120 characters.

CTALink – This can be a link that redirects anywhere, both within and outside LeadSquared.

IconColorCode

Each event type (Lead, Opportunity, Activity, Task, etc.) has an icon. This background of these icons can be customized, by passing a colour code in this field. If no colour code is passed, then the default icon colour is displayed.

ToUser

The user to whom the notification should be sent. You’ll have to enter the UserID here.

ExternalSource

You can pass a reference ID to help with debugging of issues.

Example – In case the notification is being triggered by a Lapp, you can then pass the Lapp ID here.

Response

200 OK

Content-Type: application/json

{
    "MessageID": "3ed50a6c-15cf-4cf1-8d1a-f87cc33f9d64_1603193012260",
    "Success": true
}

HTTP Response Code

Code Description
200 OK

This is the status code for successful API call.

401 Unauthorized

The API call was made with invalid access credentials. Check your AccessKey and SecretKey.

400 Bad Request

The message body on the request is not as per API specification. Make sure that content type is set to “application/json” and the JSON body has correct attribute names and structure.

404 Not Found

The API could not be found. Please check the API signature.

429 Too Many Requests

API calls exceeded the limit of 25 in 5 second(s)

500 Internal Server Error

The API called failed. There could be many reasons for it. Check the exception message to get more details.