0.0
No commit activity in last 3 years
No release in over 3 years
Provides a clean and simple gem to connect to Simpledesk
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
~> 10.0
~> 3.0
~> 2.6
~> 1.1

Runtime

 Project Readme

Build Status

OLD NAME

Moved to Send Sonar.

SimpleDesk

Simple Desk is an SMS customer engagement platform that allows companies to have 2-way conversations with their customers over SMS - whether it's for sales, customer service, funnel abandonment, or transactional messages.

Installation

Add this line to your application's Gemfile:

gem 'simple_desk'

And then execute:

$ bundle

Compatibility

Works with Ruby 1.8.7 or greater

Changes

See RELEASE.md

  • Configuration is now done through an initializer
  • Support for sandbox server
  • When creating a customer, properties is no longer a separate param (see readme)

Setup

Initialize the gem by creating an initializer.

# config/initializers/simple_desk.rb

SimpleDesk.configure do |config|
  if Rails.env.production?
    config.env = :live
    config.token = ENV['SIMPLEDESK_PRODUCTION_TOKEN'] || 'YOUR_PRODUCTION_TOKEN'

  elsif Rails.env.staging?
    config.env = :sandbox
    config.token = ENV['SIMPLEDESK_SANDBOX_TOKEN'] || 'YOUR_PRODUCTION_TOKEN'
  end
end

Usage

The API currently allows sending messages and adding customers.

Sending Messages

SimpleDesk.message_customer(text: 'message text', to: '1234567890')

The response is a SimpleDesk::Message object with the following accessors:

  • to (phone number as string)
  • text
  • status

Status is one of "queued" or "unsubscribed". Messages with "queued" status are usually sent within seconds. Messages with "unsubscribed" status will not be sent, as customer has previously unsubscribed from API messages.

If you send a message to a new phone number the API will automatically create a new user.

#<SimpleDesk::Message to="1234567890", text="content!", status="queued">

Adding Customers

If a customer already exists with the given phone number, that customer will be updated.

SimpleDesk.add_customer(
  phone_number: "5555555555",
  email: "user@example.com",
  first_name: "john",
  last_name: "doe",
  properties: { great_customer: "true" }
)

You can send an unlimited number of properties with arbitrary keys and values.

The response is a SimpleDesk::Customer object with the following accessors:

  • id
  • phone_number (string)
  • email
  • first_name
  • last_name
  • subscribed (boolean)
  • properties (hash)

Support

Email api-help@getsimpledesk.com if you are having issues with the gem or service.

Contributing

Please file an issue on Github and have a conversation with us before creating a pull request

  1. Fork it ( https://github.com/[my-github-username]/simple_desk/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request