Importing Preference Data via API¶
As you set up the Preference Center for your existing user base, the need to pre-fill the platform with available preference data might arise. To streamline this process, our Preference Manager provides a dedicated open API endpoint, enabling you to import records under the specified WidgetID using a strictly formatted CSV (Comma-Separated Values) file.
Key Details and Guidelines¶
To effectively use this feature, keep in mind the following requirements:
CSV File Format
-
The CSV file needs to follow a comma-separated format, with each value enclosed in quotes for Options values.
-
The file header must include the IDs of the Topics for which new preference values are to be imported.
-
Each row represents the corresponding preference setup for a specific User ID.
Size Limit
-
Each CSV file being processed should not exceed 2 MB in size.
-
For larger datasets, consider breaking them down into multiple manageable files.
Handling User ID Duplicates
- Duplicate User IDs within the CSV file will be ignored during the import process to maintain data consistency and avoid conflicts.
Single-Select Topics
- In cases where multiple values are specified for a Topic with the "Single-Select" type, only the first value encountered will be considered during the import. Subsequent values for the same Topic will be disregarded.
Error Handling
- Incorrect or non-matching Topic or Option IDs will halt the import process. Always verify the correctness of IDs before initiating the import.
Mandatory Values
- There is no validation for mandatory values within the Topics during the import process. Ensure that the required values are appropriately set in the CSV file to maintain data integrity.
Import Response
- Any issues encountered during import will be noted in the response's payload, providing transparency in the import process.
CSV Import File Structure
Here is an example of the CSV file structure in plaintext format:
userId,TopicID_1,TopicID_2
UserID,"OptionID_11,OptionID_12,OptionID_13","OptionID_21,OptionID_12"
By leveraging this efficient feature, you can populate the Preference Center with relevant data, providing your existing user base a seamless experience. Simplify the setup process and enhance user engagement with our user-friendly CSV import functionality.
For further guidance and assistance, refer to our comprehensive technical documentation and API references, or contact our dedicated support team for prompt assistance.
Sample Import Response Payload:
{
"status": "XXXX records imported",
"message": "ISSUES IDENTIFIED DURING EXPORT"
}