bus_facade_eventNotification


**Description :** Used in the retrieval of event data via the API : be sure to check out Event Notification documentation for more information, and ensure these are set to the client pull option.
**Default Methods** Please ensure you're familiar with... - [**Introduction to Beans**](/documentation/soap/gettingstarted/beans) - [**Requests and Responses**](/documentation/soap/gettingstarted/requests) - [**Anatomy of a session**](/documentation/soap/gettingstarted/session)
**Unique Methods** To call these methods use the following example structure...
paintRequest:
contextId   string  :   C-KFDsCMMHXpDUi0ltN0p3FvF
className   string  :   bus_facade_eventNotification
processName string  :   methodName  i.e. getBatch
entityData  array   :   i.e. array('variableName'  => value) 
processData array   :   i.e. array('variableName'  => value)
Name Parameters Description
getBatch >Entity Data:
notificationTypes = array("OPEN", "CLICK"),
maxNotifications = 1000
markAsReadInd = Y
Call this method to retrieve a batch of event notifications. Event notifications are read in reverse data order for the notification types selected. Note that notification data is returned in a base 64 encoded CSV format string. Each row in the string will contain the data relevant to the notification type as the the Pure Interfaces specification.
notificationTypes is an array of the types of events to retrieve i.e. ("OPEN", "CLICK", "DELIVERYSTART"),
maxNotifications dictates the size of the batch,
markAsReadInd if set to Y then the events will be marked as collected and removed from the platform.

Example Process - Retrieving Open and Click Event Notification Data

[**WSDL**](http://paint.pure360.com/paint.pure360.com/ctrlPaint.wsdl) *Our WSDL defines our web service and where to locate our web service. In understanding these examples please familiarise yourself with the handleRequest (paintRequest / paintResponse)*
**Step 1 :** Perform the getBatch process on the bus_facade_eventNotification gateway, using the context ID from the session and the configuration for retrieving these * Use the contextId (beanId of the context entity in the bean store) that ties a session together. * To access the eventNotification entity use the eventNotification entry point/gateway * Perform a getBach process with entityData parameters for the types of notification, the amount to retireve and whether to mark these as read, and therefore remove them from the platform **Example Request / Response**
paintRequest:
contextId   string  :   C-KFDsCMMHXpDUi0ltN0p3FvF
className   string  :   bus_facade_eventNotification
processName string  :   getBatch
entityData  array   :   'notificationTypes'  => array:
                                                        "OPEN", "CLICK")
                                 'maxNotifications'   =>  1000
                                 'markAsReadInd'      => "Y"
processData array   :   null
paintResponse:
Result   array : 
         'result'     => "success"
         'resultData' => array: 
                         'bus_entity_eventNotificationBatch' => array:
                                                'eventCount'=>4
                                                'eventMeta'=>array:
                                                             'CLICK' =>
                                                              "type,email,Message Name,Delivery Date,Click Url,Click Date"
                                                              'OPEN' =>
                                                              "type, email, messageName, deliveryDate"
                                                'eventData'=>base64 encoded string
                                                ...other variables....
                                                

bus_entity_eventNotification/bus_search_eventNotification variables

The only variables that are writeable and required are the notificationTypes, maxNotifications, and markAsReadInd for the getBatch process.