An endpoint is one of the ends of a communication channel. When an API interacts with another system, the touchpoints of this communication are considered endpoints. For APIs, an endpoint can include a URL of a server or service. Each endpoint is the location from which APIs can access the resources they need to carry out their function. For example, https://lumapro.serviceaide.com/gateway/api/v1.
Following are the various Luma APIs available for Skill developers:
The Luma API GetContact is used to verify if the user exists in Luma and retrieve user details like Display Name, Phone Number, Contact Id. Use the following details to configure and use the Web Service operation for your Skill:
HTTP Method for the operation: GET
URI: /contacts
Verify if no data or error is received.
If the user is found, Extract the user details such as registered Phone Number for user validation.
Extract the matched user’s Contact ID which will be used to associate the Luma Contact ID to the channel account.
If the user exists, then Luma returns an array of user details. If the ''data'' array returns any value, then it means that a single or multiple users exist in Luma, that align to that data as shown below.
{ "status": "Success", "statusCode": 0, "statusLine": "Successfully retrieved the contact profile(s).", "errors": null, "resultData": [ { "href": "/api/v1/contacts/2", "id": 2, "contactExternalId": "8ad83517-2a3d-4075-99d0-888e6b4a5458", "userName": "John", "email": "test@gmail.com", "title": null, "firstName": "John", "lastName": "Smith", "middleName": null, "phone": "+91 1235667788", "displayName": "John Smith" } ], "warnings": [], "timestamp": 1622794112816, "reasonPhrase": null, "metaInfo": { "totalRecordCount": 1, "currentRecordCount": 1 } } |
If the user does not exist, Luma returns an empty ''data'' array as shown below.
{ "status": "Success", "statusCode": 0, "statusLine": "Successfully retrieved the contact profile(s).", "errors": null, "resultData": [], "warnings": [], "timestamp": 1622793185448, "reasonPhrase": null, "metaInfo": { "totalRecordCount": 0, "currentRecordCount": 0 } } |
The Luma API MapUserToChannelAccount API is used to associate the verified contact/user with channel account with appropriate authentication status and mode.
HTTP Method for the operation: PUT
URI: /contactchannelauthentication/{channelAccountId}
Pass the Channel account ID and user's Luma Contact ID as Outbound payload. The contact id is the user's contact id in Luma and is obtained using GetContact API.
{ "ccaExternalId": "@{channel.channelAccountId}", "authenticationStatus": "SUCCESS", "authenticationMode": "MANUAL", "contact": { "id": @{global.ootb_contact_id} } } |
|
Luma API Get Channel Account Records is used to retrieve the list of channel accounts for users available in Luma. Add filter conditions to retrieve a refined list of Account Ids. Use the following details to configure and use the Web Service operation for your Skill:
As a response, the web service generates a list of Channel Account ids available in the tenant. Following is the sample response received from the web service.
{ "status": "Success", "statusCode": 0, "statusLine": "Successfully retrieved the contact channel authentication records", "errors": null, "resultData": [ { "href": "/api/v1/ContactChannelAuthentication/6", "id": 6, "ccaExternalId": "65dda1f7-697e-4b6a-9899-c503135a41f6", "channelScopeContactId": "02643e4a-ebea-43f4-a115-6d046ed78c9b", "channelScopeId": "afafa5d4-20f7-4eca-ad5d-511535de6346", "contact": { "href": "/api/v1/contacts/4", "id": 4, "contactExternalId": null, "userName": null, "email": null, "title": null, "firstName": null, "lastName": null, "middleName": null, "phone": null, "displayName": null, "agentChannel": { "channelType": null }, "authenticationStatus": "SUCCESS", "authenticationMode": "MANUAL" } }, { "href": "/api/v1/ContactChannelAuthentication/5", "id": 5, "ccaExternalId": "131f5b13-b870-4a14-8784-0f4b2398944c", "channelScopeContactId": "0a27859e-7429-44de-94cd-08efcbcf2830", "channelScopeId": "afafa5d4-20f7-4eca-ad5d-511535de6346", "contact": { "href": "/api/v1/contacts/-2", "id": -2, "contactExternalId": null, "userName": null, "email": null, "title": null, "firstName": null, "lastName": null, "middleName": null, "phone": null, "displayName": null }, "agentChannel": { "channelType": null }, "authenticationStatus": "INITIATED", "authenticationMode": "MANUAL" }, { "href": "/api/v1/ContactChannelAuthentication/7", "id": 7, "ccaExternalId": "7ae4c07d-a466-4c9b-a776-e029148f3fe6", "channelScopeContactId": "0cfcdda4-64bb-4aeb-a992-b3a53bc36819", "channelScopeId": "afafa5d4-20f7-4eca-ad5d-511535de6346", "contact": { "href": "/api/v1/contacts/-2", "id": -2, "contactExternalId": null, "userName": null, "email": null, "title": null, "firstName": null, "lastName": null, "middleName": null, "phone": null, "displayName": null }, "agentChannel": { "channelType": null }, "authenticationStatus": "INITIATED", "authenticationMode": "MANUAL" }, { "href": "/api/v1/ContactChannelAuthentication/2", "id": 2, "ccaExternalId": "5b169c54-6a3c-46a0-ad01-b5f45acce134", "channelScopeContactId": "372613da-6056-44c7-afa5-f90473ece892", "channelScopeId": "afafa5d4-20f7-4eca-ad5d-511535de6346", "contact": { "href": "/api/v1/contacts/2", "id": 2, "contactExternalId": null, "userName": null, "email": null, "title": null, "firstName": null, "lastName": null, "middleName": null, "phone": null, "displayName": null }, "agentChannel": { "channelType": null }, "authenticationStatus": "SUCCESS", "authenticationMode": "AUTOMATIC" } ], "warnings": [], "timestamp": 1641293230594, "reasonPhrase": null, "metaInfo": { "totalRecordCount": 4, "currentRecordCount": 4 } } |
As a response, the web service generates responses based on the additional conditions.
{ "status": "Success", "statusCode": 0, "statusLine": "Successfully retrieved the contact channel authentication records", "errors": null, "resultData": [ { "href": "/api/v1/ContactChannelAuthentication/6", "id": 6, "ccaExternalId": "65dda1f7-697e-4b6a-9899-c503135a41f6", "channelScopeContactId": "02643e4a-ebea-43f4-a115-6d046ed78c9b", "channelScopeId": "afafa5d4-20f7-4eca-ad5d-511535de6346", "contact": { "href": "/api/v1/contacts/4", "id": 4, "contactExternalId": "02643e4a-ebea-43f4-a115-6d046ed78c9b", "userName": "test", "email": "test@serviceaide.com", "title": null, "firstName": "test", "lastName": "test", "middleName": null, "phone": "0123456789", "displayName": "test" }, "agentChannel": { "channelType": "TEST_WIDGET" }, "authenticationStatus": "SUCCESS", "authenticationMode": "MANUAL" } ], "warnings": [], "timestamp": 1641293230594, "reasonPhrase": null, "metaInfo": { "totalRecordCount": 1, "currentRecordCount": 1 } } |