In my website, I need to send a notification email to suppliers. I’ve created a content type supplier with email, warehouse 1 and warehouse 2 as fields.

In commerce product, I’ve created a supplier field (entity reference). Now, I need to send an email on the rule event ‘completing the checkout process’ to those suppliers for them to start preparing the products for pickup and I can’t find any related tokens on the Rules Action ‘Send email’.

Any suggestions?

1 Answer 1


Assuming your question is about D7, you could try to create a view (using the Views module) of those suppliers that you want to send an eMail to.

After you succeeded in creating such view, you can process the results of a VBO enabled view via Rules, whereas your rule performs 2 Rules Actions (in the rule you already have in place related to your Rules Event about "completing the checkout process":

  • load the VBO list of those suppliers.
  • add a loop to perform a Rules Action "send an eMail", for each supplier contained in your Views results.

For more details, have a look at the tutorial "How to process the results of a VBO enabled view via Rules?".

  • Sorry for the delay, was swamped in the project, what I did so far, is generate suppliers emails in views, and used the views rule module to loop the supplier emails and send them the mails one by one. the weird thing is, in rules, the views loop is performing once, although i have several rows Sep 26, 2016 at 13:44
  • @user3414580 I assume you mean the Views rules module. If my assumption is correct, then I'm not surprised about your "performing once" problem. What I suggested in my answer here is different, and it does not use that "Views rules" module. Want to retry what I suggested in my answer? Only using "VBO" and "Rules"? Sep 26, 2016 at 13:56
  • Yes i'll try it, once done, i'll get back here and update Sep 27, 2016 at 12:06
  • Hi, i've tried your way exactly and it works perfectly. Thanks Sep 29, 2016 at 8:43
  • @ram_griever : merci for "accept" ... next question!?!? Sep 29, 2016 at 11:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.