I need to build a site that will sell products on behalf of merchants referenced on the site and I need to notify these merchants every time a sell of their products occurs and send them information about the order we received for their product. Out of the box, commerce uses rules to send an email to the buyer and can also notify the site admin that a new order was created.
That is great but what if I need to notify a third party? Is there a way to do this out of the box or via configuration? Or is there a module for that? I have been looking and couldn't find anything. When I try to use rules the only email available for order checkout as tokens are the customer email and the site admin email.
For the sake of clarity here is the setup I have gone for so far and where I am stuck:
I have setup a field collection on my product pages listing the contact details for the merchant selling the product.
I collect three fields information inside the field collection:
- name of merchant
- contact email
I can easily make them visible on the order form with views by using relationships but I need to make the contact email available to rules so that I can set up a rule that will send and email to the merchant when the checkout process is completed.
Thanks for your help