Case 1 - When setting up tenant
Your CSV or XML file, formatted in the correct way, should be placed in this FTP folder:ImportHistoricalPointsFromFileJob which will validate and import historical point files and store them in the database.
How to import points history
Example with ValidTo
Example with ExpireAfterMonthsInactive
Case 2 - When tenant is already active
When the tenant is already active, another job is used. This is a bit slower but more safe and ensures that no data is modified incorrectly. Your CSV or XML file, formatted in the correct way, should be placed in this FTP folder:ImportPointsFromFileJob and this validates, reads and imports the points.
Procedure
Create a file, and add it to the folder specified. Then run the scheduled job mentioned in the information. When the job runs it will handle all files added to the folder. The import will add points in the same way as points are usually added in the system. To have the correct balance for point accounts after the import, the Update Balance job needs to run.Properties used
Must be an existing, not deleted, approved contact of type Member.
Cannot be 0.
Definition must exist in Engage.
Can be NULL. Defaults to UTC Now Offset.
Should not be empty. If points-based member levels are used, and you want to exclude some points, only use these predefined values:
- Purchase
- Adjustment
- BonusBalanceAdjustment
- Return
- RewardVoucher
- UpdateBalance
- BonusPromotion
- BonusPromotionReturn
- Automation
Should not be empty.
Can be excluded from the file. Defaults to UTC Now Offset.
Can be excluded from the file. Defaults to the expiry rules set up for the tenant (for example, 12 months rolling expiry). Cannot be combined with a value in
ExpireAfterMonthsInactive. One or the other may be used, or neither — never both in the same row.Can be excluded from the file. Defaults to the expiry rules set up for the tenant (for example, “6” months). Must be higher than 0. Cannot be combined with a value in
ValidTo. One or the other may be used or neither, but never both in the same row. Only to be used on active transactions. Transactions that have already expired must have an expiry date in ValidTo and no value in this field. Only applies if using the expiry method “Contact inactive”.validTo or expireAfterMonthsInactive matches that expiration setting, these fields can both be set to blank and Engage will add the values based on what is set up in these expiration settings.
Example with ValidTo
Example with ExpireAfterMonthsInactive
Validation errors
Here are the validations errors you might get and what they mean.Missing Field Exception
Missing Field Exception
PointTransaction file import missing mandatory columns, will skip file: [FileName]
Here, the import file does not define all fields used. The file will be skipped and the error logged.
Here, the import file does not define all fields used. The file will be skipped and the error logged.
Missing Contact ID
Missing Contact ID
Missing contactId: [contactId] In data that was not valid: [[notAccepted]]
The contact ID used does not represent an existing, not-deleted and approved contact of type “Member”. The file line will be skipped and the error logged.
The contact ID used does not represent an existing, not-deleted and approved contact of type “Member”. The file line will be skipped and the error logged.
Missing Definition ID
Missing Definition ID
Missing PointDefinitionId: [[definitionIds]] In data that was not valid: [[notAccepted]]
Definition ID does not have a corresponding point definition in the database. File line will be skipped and the error logged.
Definition ID does not have a corresponding point definition in the database. File line will be skipped and the error logged.
Source is empty
Source is empty
Other error message: [[error]] In data that was not valid: [[notAccepted]]
Source does not have a value. File line will be skipped and the error logged.
Source does not have a value. File line will be skipped and the error logged.
Description is empty
Description is empty
Other error message: [[error]] In data that was not valid: [[notAccepted]]
Description does not have a value. File line will be skipped and the error logged.
Description does not have a value. File line will be skipped and the error logged.
Amount is 0
Amount is 0
No error message
Points value given is zero. No points added, no logs or errors created.
Points value given is zero. No points added, no logs or errors created.
Point account not found or exists more than once
Point account not found or exists more than once
No error message
Point account with the specified definition does not exist, or exists several times. Creation of new account is not working as intended. An exception is created.
Point account with the specified definition does not exist, or exists several times. Creation of new account is not working as intended. An exception is created.
ExpireAfterMonthsInactive is negative
ExpireAfterMonthsInactive is negative
Other error message: [[error]] In data that was not valid: [[notAccepted]]
The value
The value
ExpireAfterMonthsInactive is negative. File line will be skipped and the error logged.ExpireAfterMonthsInactive is zero
ExpireAfterMonthsInactive is zero
Other error message: [[error]] In data that was not valid: [[notAccepted]]
The value
The value
ExpireAfterMonthsInactive is 0. File line will be skipped and the error logged.ExpireAfterMonthsInactive and ValidTo in the same file line
ExpireAfterMonthsInactive and ValidTo in the same file line
Other error message: [[error]]
The value
The value
ExpireAfterMonthsInactive has a valid integer value and ValidTo also has a date value. File line will be skipped and the error logged.