Send leads and activities to Lead Router, the Real Geeks Leads API.
For more details see our documentation.
Add this line to your application's Gemfile:
gem 'lead_router'
And then execute:
$ bundle
Or install it yourself as:
$ gem install lead_router
First get a user and token from the lead_router
project, it will identify your project and which permissions you have.
If you're a Real Geeks client send a message to support and we'll give you credentials.
require 'lead_router'
lr = LeadRouter.new("receivers.leadrouter.realgeeks.com", "user", "token")
with a client created use one the methods below. For details on which fields
you can send for a lead
or an activity
, see our API docs
Send a new lead.
site_uuid
is a string with the RG2 Site UUIDlead
id a dictionary with lead fields
Update an existing lead.
site_uuid
is a string with the RG2 Site UUIDlead_uuid
is a string with the Lead Manager Lead UUIDlead
id a dictionary with lead fields to be overriden
Add activities to an existing lead.
site_uuid
is a string with the RG2 Site UUIDlead_uuid
is a string with the Lead Manager Lead UUIDactivities
is a list of dictionaries, each dictionary is an activitity
Send a new potential seller lead. Somebody who attempted to view a property valuation but didn't sign-up to give contact details. So all we have is the property they looked at.
site_uuid
is a string with the RG2 Site UUIDlead
id a dictionary with lead fields
After checking out the repo, run bin/setup
to install dependencies. You can also run bin/console
for an interactive prompt that will allow you to experiment.
To run tests:
$ rake
To install this gem onto your local machine, run bundle exec rake install
. To release a new version, update the version number in version.rb
, and then run bundle exec rake release
, which will create a git tag for the version, push git commits and tags, and push the .gem
file to rubygems.org.