ImportDefinition

Defines a reusable pattern of import options. For example, you could create an import definition to upload Subscribers.csv every day into the Customers list to prevent having to re-enter the same parameters every day.

If you import information to a data extension, you must create a data extension object and set the ObjectID property or customer key on the data extension object. You must then set the DestinationObject property to that object. If you are importing to a list, you must create a list object, set an ID property, and set the DestinationObject property to that object. You must specify the ID property for a list. Imports don't currently support the use of ObjectID or CustomerKey when importing to a list.

You can specify what character encoding you wish to use with your imports, but this specification applies to all imports in an account and can only be enabled by your Account Executive.

  • To create an ImportDefinition where the destination object is a list, you need the Email | Subscribers | List | Import Subscribers permission.
  • To create or update an ImportDefinition where the destination object is a data extension, you need the Email | Subscribers | Data Extension | Import and Manage Data permissions.
  • To create or update an ImportDefinition where the destination object is a list and the list ID is the All Subs List ID, you need the Email | Subscribers | All Subscribers | Import Subscribers and View permissions.
NameData TypeDescription
AllowErrorsBooleanSpecifies whether an import continues after an error occurs. A value of true permits the import process to continue, and a value of false stops the import process after the first error.
AutoGenerateDestinationImportDefinitionAutoGenerateDestination objectSpecifies the properties of the destination to be generated automatically during an import.
ClientClientID objectSpecifies the account ownership and context of an object.
ControlColumnStringSpecifies the column name in which to find control values as part of an import. Use when the value of ImportDefinitionUpdateType is ColumnBased.
ControlColumnActionsArray of ImportDefinitionColumnBasedAction objectsSpecifies the control column actions to apply to an import.
ControlColumnDefaultActionImportDefinitionColumnBasedActionTypeDefines default control column action to take as part of an import definition. Valid values include:
  • AddAndUpdate
  • AddButDoNotUpdate
  • Delete
  • Skip
  • UpdateButDoNotAdd
CorrelationIDStringIdentifies correlation of objects across several requests.
CreatedDateDateTimeThe date and time when the object was created.
CustomerKeyStringUser-supplied unique identifier for an object within an object type. This property corresponds to the external key assigned to an object.
DateFormattingLocaleLocale objectSpecifies how dates are formatted in the imported data.
DeleteFileBooleanIndicates whether the call deletes the file used in the import once the process completes.
DelimiterStringSpecifies the delimiter used as part of an import definition.
DescriptionStringDescribes and provides information regarding the object.
DestinationObjectAPIObject objectSpecifies the destination of an import.
DestinationTypeIntNot used.
EndOfLineRepresentationStringSpecifies the line-ending character(s) used in delimited files to be imported.
FieldMappingTypeImportDefinitionFieldMappingType objectDefines how fields are mapped within an import definition. Valid values include:
  • InferFromColumnHeadings
  • MapByOrdinal
  • ManualMap
FieldMapsArray of FieldMap objectsSpecifies the mapping of fields to columns in a file.
FileSpecStringDefines the file-naming pattern associated with an activity (valid substitutions include%%YEAR%%, %%MONTH%%, and %%DAY%%).
FileTypeFileType objectSpecifies column delimiter of a file. Valid values include:
  • CSV
  • TAB
  • Other
FilterStringSpecifies filter to apply to retrieve.
HeaderLinesIntSpecifies the number of header lines in the file to ignore.
IDIntRead-only identifier for an object. Some objects use the ObjectID property as a unique ID.
InteractionObjectIDStringReturns associated ID for activities within the asynchronous process of the overall conversation or program.
KeywordStringNot used.
MaxFileAgeIntSpecifies the age of the oldest file to be included in an import definition. Any files older than the maximum age aren't included in the import definition.
MaxFileAgeScheduleOffsetIntSpecifies an offset in hours to associate with a file age for accomodating timezone differences. This time represents the maximum allowable difference between the scheduled time and the time the import definition actually accesses the file to be imported.
MaxImportFrequencyIntSpecifies the number of hours to wait before allowing a file to be imported again. This property prevents an import definition run within a program from executing if a specified number of hours have passed since the program began.
ModifiedDateDateTimeThe date and time when the object was last modified.
NameStringName of the object or property.
NotificationAsyncResponse objectSpecifies the email address to which to send a notification.
NullRepresentationStringDefines character used to represent a null value during an import.
ObjectIDStringSystem-controlled, read-only text string identifier for object.
ObjectStateStringNot used.
OwnerOwner objectDescribes account ownership of subscriber in an on-your-behalf account.
PartnerKeyStringUnique identifier provided by partner for an object. This property is accessible only via API.
PartnerPropertiesArray of APIProperty objectsA collection of metadata supplied by the client and stored by the system. These properties are accessible only via API.
RetrieveFileTransferLocationFileTransferLocation objectSpecifies the file transfer location to contain the file.
SourceObjectAPIObject objectSpecifies source of the import.
StandardQuotedStringsBooleanSpecifies whether standard quoted strings are used as part of an import definition. A true value indicates standard quoted strings are used in an import definition.
SubscriberImportTypeImportDefinitionSubscriberImportType objectSpecifies the subscriber import type for an import definition. Possible values are Email and SMS. The default value is Email.
SubscriptionDefinitionIdStringIdentifies subscription to which the import definition is associated.
UpdateTypeImportDefinitionUpdateType objectIndicates update type associated with an import definition. Valid values include:
  • AddAndUpdate
  • AddAndDoNotUpdate
  • UpdateButDoNotAdd
  • Merge
  • Overwrite
  • ColumnBased