When trying to use Batch Import, if the upload fails what are some common issues that cause this?
The following are some common causes of a failing batch import:
Upload file is failing
If the following error is being returned when trying to import file: “The request signature we calculated does not match the signature you provided. Check your key and signing method”, this issue is likely to be related to the checksum, size and content-Md5 values not matching the imported file. Try using the following online tools for the checksum and content-Md5:
The status is error after the file is imported with no link to a log file
Check if the import file you are importing is GZIPPED. Import files must be GZIPPED, not ZIPPED.
The status is error after the file is imported with a link to a log file
After clicking on the error log file, the details of any errors will be shown. The error log file contains a line for each row in the import. Using the ref in the import file find the row that contains the error and read the details of the log. Generally errors are related to data model in the import file see, for the data models for orders and guests in the import files: https://doc.sitecore.com/cdp/en/developers/sitecore-customer-data-platform--data-model-2-1/sitecore-cdp-guest-data-model-for-batch-api.html and https://doc.sitecore.com/cdp/en/developers/sitecore-customer-data-platform--data-model-2-1/sitecore-cdp-order-data-model-for-batch-api.html.
Some difficult to debug errors are:
Failed to parse import file: if the date of birth is the date format "YYYY-MM-DDT00:00:00.000Z" not "YYYY-MM-DDT00:00:00Z"
Corrupted file: the JSON in the import file is invalid
Not enough identifying information: the identifier being used for identity resolution in the tenant (i.e. the identity rules for the tenant) is not being passed in the import file.
Link to github repo with Batch Import postman collection: https://github.com/soreilly6/TechnicalTrainingCourse/blob/main/Batch%20Imports%20%26%20Audience%20Sync.postman_collection.json
I was getting "corrupted" status, as I was providing the wrong file size. My windows explorer was not showing the correct size for some reason, so I had to check the file details (right click on the file - properties) to get the correct size in bytes, I generated new GUID for the API after and it works!