Prerequisite

  1. Organization is enabled for Bulk Event Export (BEX).
  2. Organization Admin user can login to Watson Campaign Automation and get an access token.
  3. Organization Admin user has logged into FTP once and the folder for the user exists.

How it works

The API Module is used to create Job Definition for the Existing Active Organization. 

Endpoint

Note: This is currently unavailable in Swagger.

Creating Job Definition using Advanced Rest Client

In Methods: GET, POST, PUT and DELETE Options can be selected.

Post URL: http://<host:port_no>/rest/bulkeventexport/jobdefinition”>

GET URL: http://<host:port_no>/rest/bulkeventexport/jobdefinition/<Valid Job Definition Id>

PUT URL: http://<host:port_no>/rest/bulkeventexport/jobdefinition/<Valid Job Definition Id>

Note: PUT has Same format as POST, the job definition for the listId needs to exist.

DELETE URL: http://rest/bulkeventexport/jobdefinition/<Valid Job Definition Id>

 

Authorization: Bearer

Valid Header name:  content-type

Header value: application/json

Parameters

Attribute: contactSourceId

Description: ContactSourceId is list_Id for which job definition is created. Accepts Id for database only – required

Attribute: ftpUserId

Description: Primary email (login) of the Org admin user. ftpUserId is used to access user’s ftp account location to export event file – required

Attribute: exportFileName

Description: This is used, if user wishes to specifically include some term. The specified term will be Appended with channel, timestamp and frequency # added by Watson Campaign Automation.  if not specified, Default ‘Recipient Event Bulk Export_<channel>’  – optional

Attribute: exportFileFormat

Description: This is the format of file which would be exported. Default is ‘CSV’. Other formats supported are ‘PSV’, ‘TSV’ – optional

Attribute: jobFrequency

Description: This is the periodic interval in hours in which rotation job will be run and all tmp files will be rotated and exported to expected file format. Valid Job frequency is 1,2,3,4,6,8,12,24 – required

Attribute: type

Description: This specifies channel type.(Supported channel type is only “Email”) – required

Attribute: mailingType

Description: These are type of mailing (Supported mailing types are “SendExperience”, “Programs”, “AMG”, “AutoResponder”, “ABTest”) – optional

Attribute: columnName

Description: Up to 5 custom LMR column names can be requested from the contactSource for which job definition is created – optional

Attribute: columnOrder

Description: If columnName provided: This is the order of LMR columns in which they will be exported – required

Attribute: eventType

Description: Event Types that need to be exported (Supported event types are “emailClick”, “emailSend”, “emailSuppressed”, “emailOpen”, “emailBounce” and “emailOptOut”). left blank, default is all of the events mentioned here. User can specify events, if not all are required – optional

Example of POST JSON to create a job

{  
   “channels”:[  
      {  
         “eventTypes”:[  
            {  
               “eventType”:”emailSend”
            },
            {  
               “eventType”:”emailOpen”
            },
            {  
               “eventType”:”emailClick”
            },
            {  
               “eventType”:”emailOptOut”
            },
            {  
               “eventType”:”emailSuppressed”
            },
            {  
               “eventType”:”emailBounce”
            }
         ],
         “columnNames”:[  
            {  
               “columnName”:”column1″,
               “columnOrder”:0
            },
            {  
               “columnName”:”column2″,
               “columnOrder”:1
            }
         ],
         “mailingTypes”:[  
            {  
               “mailingType”:”SendExperience”
            },
            {  
               “mailingType”:”Programs”
            },
            {  
               “mailingType”:”AutoResponder”
            },
            {  
               “mailingType”:”AMG”
            },
            {  
               “mailingType”:”ABTest”
            }
         ],
         “exportFileName”:”Test_Email”,
         “exportFileFormat”:”CSV”,
         “jobFrequency”:1,
         “type”:”Email”
      }
   ],
   “contactSourceId”:”423251″,
   “ftpUserId”:”ubx1@in.ibm.com”
}

Response: JobId
Outcome: File stored in the ftp folder of the requesting ord admin user.

Headers in the Exported FTP File

Email
RECIPIENT_ID
ENCODED_RECIPIENT_ID
contactId
code
messageId
userAgent
messageName
mailingTemplateId
subjectLine
docType
reportId
sendType
bounceType
urlDescription
clickUrl
optOutDetails
messageGroupId
programId
timestamp
originatedFrom
eventId
externalSystemName
externalSystemReferenceId
trackingCode

Note: not all columns will be populated for every event, only if the data is available in the event and applicable to that event.

Join The Discussion

Your email address will not be published. Required fields are marked *