Rules to Automate Bookings

Events happening in the community are now at Drupal community events on www.drupal.org.
Anonymous's picture

I am trying to set up a Rule and Rules Sets for the work-flow of an anonymous user making a booking.

The modules being used are: Bookings API & Event bookings.

What I think it ought to look like is:

RULE

Event is “A new booking has been added”

Then DO Rule set 1

        Arguments: Booking API + Content

        Revoke content permissions by role (protect each new booking page from future public access ie anon)
        Redirect to page (Thanks for booking)
        Send email to an arbitrary address (applicant's booking details)

    Rule set 2 – Scheduled in 7 days

        Arguments: Booking API + Content

        Send email to an arbitrary address (reminder to booking manager based on status not having been changed)
        Send email to an arbitrary address (reminder to applicant if they haven't paid by then to do so (based on status))
        or
        Send email to an arbitrary address (confirmation to applicant if payment made and booking status finalized)

The things is that I can not see these sets to choose them from the rule; and all the tokens aren't working now that the actions are inside a set.

The Booking API module owner said there was an issue with it's tokens in Rules and is looking into it but I didn't think it had any further to do with Rules. http://drupal.org/node/944664

I'd appreciate any further feedback and advice on how to accomplish this. I figure it must be glaringly obvious to a Rules Guru, but I am not there yet. ;)

Thanks

Comments

Update 1

Quartz's picture

Thanks to this post http://drupal.org/node/430086#comment-1772612 I added "load content by id" to the Rule, and it (somehow) lets me select the sets necessary.

Now onto why the tokens are not being replaced......

And why the applicant is not getting their email.....

Update 2

Quartz's picture

Why the tokens are not being replaced......

Removing Token Starter didn't fix it

Removing Token Actions didn't fix it

Updating Tokens to dev hasn't fixed it

Threads referenced:
http://drupal.org/node/432518
http://drupal.org/node/486168
http://drupal.org/node/830170
http://groups.drupal.org/rules/faq

I do however see in Watchdog this type of error "Wrong datatype for second argument".

The arguments that are there are Booking API and Content.

How can either of these be the wrong type of argument? What should be added instead?

Update 3

Quartz's picture

The "Wrong datatype for second argument" was a red herring. This was referring to the theme and not the rule.

So still waiting to see if the 'fix' that is to come with the Bookings API also fixes the CCK tokens that are not replacing, although I am not sure why one would suppress the other.

This would also explain why the applicant was not getting their email as the "To" field uses a token to grab the input of the email field in the newly created Booking node (custom content type).

Are there other 'tests' or 'eliminations' that I could be doing in the interim to find out why the tokens are not being replaced?

Thanks

Rules

Group organizers

Group categories

Categories

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: