Sending notifications to campfire using RuleManager
Kevin Miller
January 25, 2008

Dovetail is starting to use Campfire more and more. Recently we created a room for our Service and Support staff to hang out in to act as a virtual team room. Using campfire has been very handy. It helps us share knowledge and have an on-going persistent and searchable conversation even when the team members are working remotely.

Effective Support Triage

 

I noticed a pattern where Dan Bergondy would, quite diligently, notify the room when a support case came in. The people present would take a look at the case to triage it and discuss how best to handle it.

 

image

 

Excellent, in 10 minutes we had a game plan and a lot of effective multitasking going on. After this pattern repeated itself a few times, I knew I wanted to automate how Dan was notifying us of new support cases to campfire. I Googled around for a campfire API and found Tinder and heck even a blog post by Dave Naffis on how to do 90% of what needed –Campfire SVN and email notification.  All I had to do was edit the example in the post down to this ruby code.

Installing Ruby

 

I like the ruby one-click installer as I am using a Windows OS.

Installing Tinder

 

            c:\ruby\bin>gem install tinder –include-dependencies

Script to speak to campfire

require ‘rubygems’
require ‘tinder’

 

campfire = Tinder::Campfire.new ”
campfire.login ‘kmiller@dovetailsoftware.com’, ”
room = campfire.find_room_by_name(”)
room.join

 

room.speak(ARGV[0])

Run the script

 

            c:\ruby\bin>ruby campfire-notification.rb “Case 1234 – <crm url to open case>”

 

All that is left is for us to somehow have this command line be executed when a case is dispatched to the support queue. Enter RuleManager.

RuleManager Notifications

 

RuleManager is a rules engine where you conditionally apply actions to the different events that occur within a Clarify system. The canonical example of why you would want to use this application is the following story.

 

“As a support engineer. When a case is dispatched to the queue named ‘support’. An email notification should be sent to all queue members.”

 

What if, in addition to our existing trusty email notification we also have an action that invokes the ruby script. Gary has already posted on Having RuleManager invoke command line scripts so I left it to the expert and basically sat and watched as Gary concocted the following rule.

 

image

 

Ran a test (dispatched an old case to support) to make sure that everything was working and here is the result.

 

image

 

Next thing to do is add a user specifically for posting to Campfire so that no one continues to confuse me with a very small shell script.

 

image

Leave a Comment

International: +1 (512) 610-5400
Toll Free: 1 (800) 684-2055