Yes, notifications can be delivered as a file by a scheduled batch process.
To set this up follow the instructions in the Event Manager User Guide. to set up a scheduled delivery configuration which is then used when subscribing phone numbers for monitoring.
The files are automatically created every 24 hours in the Media Storage system. this is the same file storage system used when processing batch files.
The output files are downloaded using the file_id. This can be obtained by either
- parsing the file id from a Media Storage notification that the file has been created.
- searching the stored files using the /files method which returns a list of files and their information.
Using notifications to identify when the output file is ready
A subscription for file notifications can be created from the Event Manager. The subscription should use the MSS-Messages topic. If preferred notification can be further restricted to
- event type "event_file_complete" which will only send a notification once the file is complete
- file_name startswith 'TRUEDISCONNECT' which will only send notifications for files starting with TRUEDISCONNECT.
The event of interest is "event_file_complete". This indicates that the file is complete and includes all the events for the previous 24 hours. The notification will include the file_id, name & file URI. These details can then be used to download the file.
An example notification for this event is shown in the Event Manager page.
Searching for Output files
Alternatively the file list can be searched on a regular basis, i.e. once a day, to identify new files to download.
Searches can be performed using a GET call to the /files method. This returns a list of files and files details.
The files search can be narrowed down by searching using the file name. For example the file name may be configured to start with "TRUE_DISCONNECT_EVENT" or similar.
The file details include
- the file status, only files with status COMPLETE should be downloaded.
- file creation/modified time. These can be used to identify what day the file was completed.
Once the latest complete file is identified then it can be downloaded using the /file method.