Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. URI: Specify the /bulk/notification as URI. Based on the Luma instance the Endpoint URL is formed. For example, https://luma2.serviceaide.com/gateway/api/v1/bulk/notification.

  2. HTTP Method for the operation: POST 

  3. Pass the following as Headers:

    1. Generate and copy the API Access Token from Luma VA and pass it to the API as the Header. Provide Send Channel Notifications permission when creating API access key. Refer to Create and Manage API Access Keys to create an API access key with Send Channel Notifications permission.

    2. Fetch the Tenant External ID from Luma VA and pass it to the API as the Header. Click on the Tenant → Settings. Copy the Tenant External ID on Tenant Information.  Refer to Tenant Information for more details.

    3. Pass thedata format for the request and response, for example, JSON, TEXT, XML payload. Pass ‘application/json’ as Content-Type.

  4. Pass the Request Parameters. The API requires the following parameters:

    1. Recipients: These are the users who should receive the notifications. Notifications can be sent based on:

      1. Users - a list of specific Luma users.

      2. Groups - one or more groups available in Luma VA

      3. Contact Channel Authentication (CCA) - Specific users based on the user’s ChannelScope ID and ChannelScopeContact ID. These IDs are specific to users that are assigned when a user is registered to a specific Channel.

    2. Agent Channels - The channel information where the user should be notified.

    3. BotExternalId - The Virtual Agent ID to be notified.

    4. Notification ID- Channel Notification details to be triggered.

    5. Message - Notification Message to be sent to the users
      Using the above elements including the Request URL, parameters, and headers, you can send the web service request to notify users. The request is passed in the following JSON format. Update the various parameters in the request as required. Refer to the next sections for more details.

      Code Block
      curl -X-location --request POST 'httphttps://localhost:90luma2.serviceaide.com/gateway/api/v1/bulk/notification' \
      --header 'Content-TypeLuma-api-access-key: application/json' \
      --header 'Luma-tenant-externalId: ' \
      
      --header 'Luma-api-access-keyContent-Type: application/json' \
      --data-raw '{
      {"agentChannels": [
      {
      "agentExternalId": null,
      "channelTypes": [
      "WEB_WIDGET",
      "TEST_WIDGET"
      ]
      }
      ],
      "configuration": {
      "id": null,
      "name": "ISM Outagetest",
      "recipient": {
      "users": [
      {
      "id": -3,
      "userName": null
      },
      {
      "id": null,
      "userName": "admin@dev.comtest1"
      },
      {
      "id": null,
      "userName": "admin@betatwothree.comtest2"
      }
      ],
      "groups": [
      {
      "id": 1,
      "name": null
      },
      {
      "id": null,
      "name": "Default Administrators"
      }
      ],
      "contactChannels": [
      {
      "id": null,
      "channelScopeId": "8560f2ef-3dea-4701-ae4a-a66101784acb",
      "channelScopeContactId": "89d83c3e-a14a-11e9-870d-a44cc82a824c",
      "agentChannel": {
      "id": null,
      "channelType": "TEST_WIDGET"
      }
      }
      ]
      },
      "message": "[   {           \"format\": \"CAROUSEL\", \"content\": {\"cards\": [{\"title\": \"Create Support Issue : \", \"buttons\": [{\"type\": \"postBack\", \"title\": \"Create Ticket in ISM\", \"value\": \"val1\"}], \"subtitle\": null}], \"title\": \"Hey, I have rebooted the server, If you have an issue please create a support ticket\"}, \"sendButtonTextAsPayload\": true}]"
      }
      }'

  5. Once the notification is successfully triggered, the response is received in the following JSON format.

    Code Block
    {
    "status":"Success",
    "statusCode":0,
    "statusLine":null,
    "errors":null,
    "resultData":"fa1e784e-4d7e-40d4-826d-a627764ea546",
    "warnings":[],
    "timestamp":1641915369739,
    "reasonPhrase":null,
    "metaInfo":null
    }

    1. Timestamp is the date and time of the wen service execution. It is in UNIX or epoch format.

    2. Status is the result of your request. For more details, see Status Codes.

    3. Error shows the error message in case the web service execution fails.

...