Developer forum

Forum » Development » Users Smart Search + Email Marketing

Users Smart Search + Email Marketing

Nuno Aguiar
Reply

Hi,

 

We need to set up a 3 monthly email for users that reached 100, 200 and 300 points and send them a (unique) voucher for a discount on a next purchase

  • We created 3 smart searches for it
  • We created 3 voucher lists
  • We created 3 pages, each one with the Context Voucher Renderer module for the proper voucher list
  • We created 3 newsletters

 

All of this works well, but what the customer wants is once the email is sent, to reset the user's points. Example:

  • They get the 100 points newsletter - the voucher gives them an $10 discount and we deduct 100 points from their balance
  • If he purchases enough on the following month, he might receive the newsletter again with another $10 discount voucher

 

We successfully developed a method that updates the user's balance and update their point history BUT we need the proper place to trigger it. We tried to do it in the Context Voucher Renderer template, but it's not working 100% in our tests:

  • Is there a Notification/Subscriber we could hook to?
  • Is there a better way to do it?

 

Best Regards,

Nuno Aguiar


Replies

 
Nicolai Høeg Pedersen
Reply

My best bet is OnBeforeMerging or OnBeforePreProcessing notifications.

 
Nuno Aguiar
Reply

Hi Nicolai,

 

FYI: None of them worked, but we managed to do it on the paragraph. We are using the Context Voucher Renderer module and at that time updating the User's points balance (if they are not logged into the backend). I know it's not perceft, but it works (for now).

 

Best Regards,

Nuno Aguiar

 

You must be logged in to post in the forum