Skill Level: Intermediate
Watson Campaign Automation¬†exports the results to a CSV file, then adds that file to the FTP account associated with the current session. You can copy the results file to¬†Stored Files¬†in Watson Campaign Automation.
Note:¬†If the database is a Double Opt-in database, Watson Campaign Automation¬†exports only confirmed contacts. In addition, the database security settings that allow this operation to be used are disabled by default for all¬†Double Opt-In¬†databases.
Syntax of the request and response XML for ExportList
Operation <ExportList> Elements LIST_ID Unique identifier for the database, query, or contact list Watson Campaign Automation¬†is exporting. ¬† Optional If specified, this email address receives notification when the job is complete. ¬† EXPORT_TYPE Specifies which contacts to export. Valid values are:
- ALL – export entire database.
- OPT_IN – export only currently opted-in contacts.
- OPT_OUT – export only currently opted-out contacts.
- UNDELIVERABLE – export only contacts who are currently marked as undeliverable.
¬† EXPORT_FORMAT Specifies the format (file type) for the exported data. Valid values
- CSV – create a comma-separated values file.
- TAB – create a tab-separated values file.
- PIPE – create a pipe-separated values file.
¬† FILE_ENCODING Optional Defines the encoding of the exported file. Supported values are:
If not specified, Watson Campaign Automation¬†uses the Organization default encoding.
¬† ADD_TO_STORED_FILES Optional
Use the ADD_TO_STORED_FILES parameter to write the output to the Stored Files folder within Watson Campaign Automation.
If you omit the ADD_TO_STORED_FILES parameter, Watson Campaign Automation¬†moves exported files to the download directory of the user’s FTP space.
¬† DATE_START Optional
Specifies the beginning boundary of information to export (relative to the last modified date). If time is included, it must be in 24-hour format.
Specifies the ending boundary of information to export (relative to the last modified date). If time is included, it must be in 24-hour format.
¬† DATE_END Optional If included, the DATE_START and DATE_END range are relative to the contact create date rather than last modified date. ¬† USE_CREATED_DATE Optional If included, the DATE_START and DATE_END range are relative to the contact’s create date rather than last modified date.Note: The contact’s create date might not always be the same as the contacts opted in date. ¬† INCLUDE_LEAD_SOURCE Optional Specifies whether to include the Lead Source column in the resulting file. Supported values are:
If the element is not included in the request, the Lead Source column does not appear in the generated file.Note: This element is only used when not using EXPORT_COLUMNS to export specific database columns.
¬† LIST_DATE_FORMAT Optional Used to specify the date format of the date fields in your exported file if date format
differs from “mm/dd/yyyy” (month, day, and year can be in any order you choose). Valid values for
- MM (for example, 01)
- M (for example, 1)
- MMM (for example, Jan)
- MMMM (for example, January)
Valid values for Day are:
- dd (for example, 02)
- d (for example, 2)
Valid values for Year are:
- yyyy (for example, 1999)
- yy (for example, 99)
Separators can be up to two characters in length and can consist of periods, commas, question marks, spaces, and forward slashes (/).
- If dates in your file are formatted as “Jan 2, 1975” your LIST_DATE_FORMAT would be “MMM d, yyyy”.
- If dates in your file are formatted as “1975/09/02” your LIST_DATE_FORMAT would be “yyyy/MM/dd”.
¬† INCLUDE_RECIPIENT_ID Optional Include this parameter to return Recipient ID in the exported field. ¬† EXPORT_COLUMNS Optional XML node that is used to request specific custom database columns to export for each
¬† ¬† COLUMN The name of a column to export. All custom columns can be specified by using their name. The following System columns are also available:
- CRM Account ID
- CRM Contact Type
- CRM Enable Sync
- CRM Lead Source
- CRM Sync ID
- Email Type
- Opt In Date
- Opt In Details
- Opt Out Details
- Opted Out
- Opted Out Date
- Last Modified Date
<Envelope> <Body> <ExportList> <LIST_ID>59294</LIST_ID> <EXPORT_TYPE>ALL</EXPORT_TYPE> <EXPORT_FORMAT>CSV</EXPORT_FORMAT> <ADD_TO_STORED_FILES/> <DATE_START>06/25/2017 01:00:00</DATE_START> <DATE_END>06/28/2017 23:59:59</DATE_END> <EXPORT_COLUMNS> <COLUMN>FIRST_NAME</COLUMN> <COLUMN>INITIAL</COLUMN> <COLUMN>LAST_NAME</COLUMN> </EXPORT_COLUMNS> </ExportList> </Body> </Envelope>
Response <RESULT> Elements SUCCESS True if successful ¬† JOB_ID Identifies the Watson Campaign Automation Background Job that is created and scheduled for this import. ¬† FILE_PATH Identifies the file name of the exported file. Example
<Envelope> <Body> <RESULT> <SUCCESS>TRUE</SUCCESS> <JOB_ID>135477159</JOB_ID> <FILE_PATH>/download/Master Customer List - All - Feb 2 2018 02-25-08 PM.CSV</FILE_PATH> </RESULT> </Body> </Envelope>