This can be implemented perfectly by using the Goals module (disclosure: I'm its maintainer), as further detailed below.
Part 1 - Configure 2 goals
You'd start by configuring the appropriate set of Goals and related Tasks. For a basic introduction about Goals, have a look at:
Here is what it would take:
- Goal1 = "New user", with only 1 Task = "Save 1 node" (say with machine name =
save_a_node
).
- Goal2 = "Mature user", with Task = "Save 5 nodes".
Part 2 - Create a rule to record progress on the tasks
Create a rule using Rules Event "After saving new content". The purpose of this rule is to make Goals automatically track the progress on completing the tasks (which you can do via an appropriate Rules Action to record that progress).
The interesting part of this is that you can reuse the same rule (related to that machine name = save_a_node
) to keep track of the progress of any user to become a New/Mature customer (check the video for a similar sample).
Part 3 - Trigger your rules after a goal is achieved
Together with what is above, you should write these 2 rules to implement what your question is actually about:
a rule with these specs:
- Rules Event: "After a user completed Goal1"
- Rules Action: "Send an eMail"
a rule with these specs:
- Rules Event: "After a user completed Goal2".
- Rules Action: "Assign role to user".