PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Randomize Multiple Recipient Notifications

  1. 1) I love GF, super awesome product, thanks for taking the time to read this.

    2) I have a basic contact form that I simply need to have the notifications randomly cycle through multiple users. It is a lead generation form for a real estate brokerage, so to make it fair, I need to have each new lead randomly select a user to receive the notification. Make sense?

    3) The order doesn't have to be random, it can have some sort of hierarchy. Ideally, it would pull email and name info from the wp users. If we have to input user info twice, that's ok.

    Any guidance is extremely appreciated!

    Thanks in advance,
    Jose

    Posted 11 years ago on Tuesday June 18, 2013 | Permalink
  2. David Peralty

    Gravity Forms is not built for Random, but here's what I would do. I would use one of our hooks, and generate a random number (let's say there are 5 agents, so a number between one and five). I would take that number and put it in a hidden field.

    Then in the notifications, I would have a condition that says "only send this notification if randomnumber is 1" and I would create five notifications like this to the different e-mail addresses.

    That way each time someone submits a form, it generates a random number (should be an even distribution over time) and sends the form to that specific agent.

    Posted 11 years ago on Tuesday June 18, 2013 | Permalink
  3. Thanks for the help, David! That would work if we didn't have 32 agents, ha!

    I'll go to that as a last resort. Thanks again for taking the time!

    Best,
    Jose

    Posted 11 years ago on Tuesday June 18, 2013 | Permalink
  4. David Peralty

    You could, using programming then maybe have one notification, and swap the e-mail address by using the same random number idea, and matching it to an e-mail address in the code, and instead of putting the number in the field, you could put the e-mail address in and have the TO address be the merge tag for the hidden e-mail field.

    Posted 11 years ago on Tuesday June 18, 2013 | Permalink
  5. I'm working on setting up a similar lead generation form. We have a list of contractors, and would like the notification emails to cycle through the list.

    Is it possible to have them go through the list in order using a counter or similar, rather than random?

    Posted 11 years ago on Tuesday July 2, 2013 | Permalink
  6. David Peralty

    Again, you would have to code this all yourself, as it isn't something Gravity Forms supports out of the box.

    Posted 11 years ago on Tuesday July 2, 2013 | Permalink

This topic has been resolved and has been closed to new replies.