User Attribute and User Metric Record Type Files
When you send user data to Insights as part of a batch upload, you send the user attribute data, the user metric data, and the event data to Insights as separate files. These files are called record type files.
The following guidelines apply to user attribute record type files and user metric record type files:
- Do not mix user attributes and user metrics in the same file
- Include a header row with field labels
- Include all required fields
- Fields can appear in any order
- Include one row per user
- Use the same date for all rows; to send data for multiple dates, create a separate batch upload for each date
See Event Record Type Files for the expected format of record type files for event data.
Fields in User Attribute Record Type Files
Field | Description |
---|---|
Date | The age of the data in the record type file. All rows should have the same date. Format: ISO-8601 "standard" (YYYY-MM-DD) |
External User ID | The external ID of the user. Must be unique in the record type file. |
External Account ID | The external ID of the account. |
Attributes | Fields containing attribute values for the user. Format: Text, Numeric, Boolean, Date, or Datetime You can mix attribute formats in the record type file. When a user is included in the record type file, all attribute values included in the record type file are updated for the user. If an attribute value is null, the attribute for the user will be updated to null. If a user is excluded in the record type file, none of the attribute values in the record type file are updated for the account. The user will retain values from the previous batch date. |
Fields in User Metric Record Type Files
Field | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
Date | The age of the data in the record type file. All rows should have the same date. Format: ISO-8601 "standard" (YYYY-MM-DD)
Create a separate batch upload for each metric frequency. For example, when you need to send monthly metrics, do not mix the monthly metrics with the day's daily metrics. Create a separate batch upload with a user record type file containing the monthly metrics. | ||||||||
External User ID | The external ID of the user. Must be unique in the record type file. | ||||||||
External Account ID | The external ID of the account. | ||||||||
Metrics | Fields containing metric values for the user. Format: Numeric |
Examples
The following file illustrates how to prepare a record type file in CSV format. Replace the sample values before uploading the file to Insights.
Sample record type file containing user attribute data
To obtain a sample record type file containing user metric data, modify the sample record type file containing account metric data to include an External User ID field.