Create a relational table - CreateTable

Create a relational table in Acoustic Campaign

Elements (Required)

TABLE_NAME - The name of the new table.

COLUMNS > COLUMN - XML nodes that define the table columns that you are inserting or updating.
Note: Unique key columns must be part of the submission with column names and
values.

The following elements are children of COLUMN (not all children elements may be required for your call):

NAME - The name of the column.

TYPE - The type of column to create. This is a list of valid values:

  • TEXT
  • YESNO
  • NUMERIC
  • DATE
  • TIME
  • COUNTRY
  • SELECTION
  • EMAIL
  • DATE_TIME
  • SYNC_ID

IS_REQUIRED - Defines whether to create the column as required. Valid values are
True or False.

KEY_COLUMN - Added to field definition and defines a field as a unique key for
the table when set to True. You can define more than one unique field for each table.

DEFAULT_VALUE - Defines the default value of the column if the row does not contain
a value for this column.

SELECTION_VALUES - Defines values in a drop-down list. You must provide at least one
VALUE element for when your TYPE is set to SELECTION.

VALUE - A single value in a drop-down list.

<Envelope>
  <Body>
    <CreateTable>
      <TABLE_NAME>Purchases</TABLE_NAME>
      <COLUMNS>
        <COLUMN>
          <NAME>RecordId</NAME>
          <TYPE>NUMERIC</TYPE>
          <IS_REQUIRED>true</IS_REQUIRED>
          <KEY_COLUMN>true</KEY_COLUMN>
        </COLUMN>
        <COLUMN>
          <NAME>PurchaseDate</NAME>
          <TYPE>DATE</TYPE>
          <IS_REQUIRED>true</IS_REQUIRED>
        </COLUMN>
        <COLUMN>
          <NAME>ProductId</NAME>
          <TYPE>NUMERIC</TYPE>
          <IS_REQUIRED>true</IS_REQUIRED>
        </COLUMN>
      </COLUMNS>
    </CreateTable>
  </Body>
</Envelope>
<Envelope>
  <Body>
    <RESULT>
      <SUCCESS>TRUE</SUCCESS>
      <TABLE_ID>499600</TABLE_ID>
    </RESULT>
  </Body>
</Envelope>

Elements (Results)

SUCCESS - True if successful; False if not.

TABLE_ID - The ID of the relational table created in Acoustic Campaign.