Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merged PR 60301: Fail rows in campaign sync if we cannot get or creat…
…e contact ## What's being changed Campaign sync. If we cannot get or create a contact, this indicates a problem and we should fail the send. ## Why it's being changed If we don't fail the send, the same row will be processed on the next sync, and skipped again. Campaign sync can only send to 10 contact ids in one request, so the database query is also limited to 10. This means that pretty quickly, if we don't fail the sends, we're not able to send any campaigns at all because we keep checking the same 10 rows. ## How to review / test this change - Create a contact in all caps in Dotdigital - Suppress this contact - In Magento create an account for this contact (use lowercase now) - Place an order - Review the product in your order - Now set up campaign sends for order reviews - Run review sync to get a campaign in email_campaign - Run campaign sync ## Notes The all-caps / lowercase switch is intended to trigger a (400) ResponseValidationException from the PATCH request. This may not always happen because it relates to a platform bug. The fact remains though, that if we can't get or create a contact, there's a problem, and we can't proceed with the send. There is an expiry on 'processing' sends but not on 'pending' sends. The Cleaner does clear out campaigns, but by default, only once per month, for records older than 1 month. Related work items: #279514
- Loading branch information