Intent Session data to Alert Task


(Arulvelu Gunasekaran) #1

Hi Team,

We are trying to achieve a notification functionality using alert task. We have a work flow to create an incident in service now, we want to notify user when ever there is a status change in the incident in service now. We have configured service node to trigger the alert task from main work flow. I am copying the image here.


We have configured the alert task to poll a rest web service for every 5 minutes and configured a simple response back to end user. But we are not receiving any response back to user chat even after 10 minutes. Not sure what is going wrong. Do we need to explicitly pass any session data in alerts task. Static API URL is working fine while testing in the alert console. I am copying the images of alert configuration.

We are not receiving any notification messages to the user not sure either alert task is running as per the scheduled 5 minutes or not.


(Yoga Ramya Mendu) #2

Hi @arulvelug,

When the alert task is configured with an API, the alert will be " triggered " as per the scheduled time but it will be " displayed " in the chat window only if the response is not matched with any of the previous responses.

The alert task will have a log that stores all the responses from the API. We have “Deduplication strategy” for the alert task which checks all the previous responses from the logs with the current response as soon as the alert is triggered and displays the response on the chat window only if it is not matched with any of the previous ones as explained above.

Currently, in the case of the API that you have configured for the alert task, the response might not be changing for short durations like 5mins. The response will have a change for long durations.

So, when the service node is executed, the user will be automatically subscribed for the alert and he/she will be given alerts only when the response from the Service now API is changed.

Logically, there will be no requirement to throw alerts to the user when there is no change in the response. Hence, as per your configuration, the user will be registered for the alert and will be notified on status change from service now.

To test whether the alert API if it is giving the response after registering, you can set up an intial poll in the alert settings so that user will be notified as soon as the alert is subscribed and then whenever the response changes, the user will be notified again as explained above.


Hope the behavior of alert task is clarified now.

Kindly check and let us know if the initial poll is also not getting triggered.

Yoga Ramya.

(Arulvelu Gunasekaran) #3


We have set up the initial poll in the alert settings and tried to initiate the alert task by initiating the chat from the console. But there was no response from the alert task to chat window. There were no logs found under the alert tasks. It was saying “Looks like there are no logs available”. We have no clue on whether is alert task initiating the polling or not. If an alert API polling is failed due to some reason it should show in the logs isn’t it ? But we couldn’t find anything in the logs.

Please help us to resolve the issue, as we have some demo with customer in couple of days. Please let us know if you can help us by connecting over the call. Let me know if i need to raise an support case.


(Yoga Ramya Mendu) #4

Hi @arulvelug,

This looks like an issue specific to the bot.
Kindly create a support ticket, we will check and let you know.

Yoga Ramya.

(sadhvi chandra) #5

We have analyzed the scenario on the bot shared with us over the ticket and suspect that the alert task is not being called due to an issue with the Authorization.

Please create a new Authorization profile.

Ideally, an Authorization is created and integrated with the API to make sure that only the Authorized end-users are getting access to the API response.

Hence, the provision to configure form fields is given to get the Authorization from the user so that the bot knows whether the appropriate(Authorized) user is being given the response or not.

However, if you do not want the end user to give the Authorization details, then you can disable the form fields for Basic authentication by clicking on the “Disable” option.

And you can add other Authorization fields by clicking on the “Add Authorization field”.

Once the Authorization is set appropriately, test the API and check the response.

Enable the “Initial poll” of the alert task under the settings tab and the test the Alert.