Export relational table data - ExportTable

Programmatically export relational table and relational table query data from your Acoustic Campaign org and uploading a CSV, TSV, or PSV file to the SFTP account or to the Stored Files directory associated with the session.

Elements (Required)

📘

TABLE_NAME or TABLE_ID?

You need to only include one in your call: TABLE_NAME or TABLE_ID.

TABLE_NAME - Specifies the folder path and name of the relational table or relational table query that you are exporting.
Note: If you specify TABLE_VISIBILITY, Acoustic Campaign ignores Private/Shared in TABLE_NAME.

TABLE_ID - Specifies the ID of the relational table or relational table query that you are exporting.

TABLE_VISIBILITY - Only required if not specified in TABLE_NAME. Defines the visibility of the table you are referencing: 0 (private) or 1 (shared).

EXPORT_FORMAT - Specifies the file format for the exported data. Valid values are:

  • CSV – create a comma-separated values file
  • TAB – create a tab-separated values file
  • PIPE – create a pipe-separated values file

Elements (Optional)

EMAIL - If specified, Acoustic Campaign sends a completion email to the provided email address.

FILE_ENCODING - Defines the encoding of the exported file. Supported values are:

  • utf-8
  • iso-8859-1
    If not specified, Acoustic Campaign uses the organization default encoding.

ADD_TO_STORED_FILES - Writes output to the Stored Files folder in Acoustic Campaign. If you omit this element, Acoustic Campaign moves exported files to the download directory of your FTP account.

DATE_START - Specifies the beginning boundary of information to export (relative to the last modified date of the row). If time is included, it must be in 24-hour format.

DATE_END - Specifies the ending boundary of information to export (relative to the last modified date of the row). If time is included, it must be in 24-hour format.

<Envelope>
  <Body>
    <ExportTable>
      <TABLE_NAME>Web Analytics Purchases</TABLE_NAME>
      <TABLE_VISIBILITY>1</TABLE_VISIBILITY>
      <EXPORT_FORMAT>CSV</EXPORT_FORMAT>
      <ADD_TO_STORED_FILES/>
      <DATE_START>07/25/2011 12:12:11</DATE_START>
      <DATE_END>09/30/2011 14:14:11</DATE_END>
    </ExportTable>
  </Body>
</Envelope>
<Envelope>
  <Body>
    <ExportTable>
      <TABLE_NAME>Shared/Web Analytics Purchases - last 30 days</TABLE_NAME>
      <EXPORT_FORMAT>PIPE</EXPORT_FORMAT>
      <ADD_TO_STORED_FILES/>
    </ExportTable>
  </Body>
</Envelope>
<Envelope>
  <Body>
    <ExportTable>
      <TABLE_ID>59294</TABLE_ID>
      <EXPORT_FORMAT>CSV</EXPORT_FORMAT>
      <ADD_TO_STORED_FILES/>
      <DATE_START>01/01/2017 00:00:01</DATE_START>
    </ExportTable>
  </Body>
</Envelope>
<Envelope>
  <Body>
    <RESULT>
      <SUCCESS>TRUE</SUCCESS>
      <JOB_ID>499600</JOB_ID>
      <FILE_PATH>
        /download/Purchases – Oct 11 2011 03-58- 17PM.CSV
      </FILE_PATH>
    </RESULT>
  </Body>
</Envelope>

Elements (Results)

SUCCESS - True if successful; False if not.

JOB_ID - Identifies the Acoustic Campaign background job created and scheduled for this export.

FILE_PATH - Returns the file name and path of the exported file.