31
How to Integrate Text and Phone Messaging with Your Website

How to Integrate Text and Phone Messaging with your Website

Embed Size (px)

DESCRIPTION

Sending and Receiving text and phone messages on my website.

Citation preview

Page 1: How to Integrate Text and Phone Messaging with your Website

How to Integrate Text and Phone Messaging

with Your Website

Page 2: How to Integrate Text and Phone Messaging with your Website

by Cindy Cullencindycullen.com

Programming since 1983Building websites since 1999

Freelance web developer since 2003Cell phone user since they were too big to carry

Taught Computers to children and adults – Online, Homeschool co-ops, Elementary School,

Junior High, High School, College, Seminars

Page 3: How to Integrate Text and Phone Messaging with your Website

Messages

Page 4: How to Integrate Text and Phone Messaging with your Website

MyOutdoorCalendar.com

Page 5: How to Integrate Text and Phone Messaging with your Website

Images courtesy of vectorolie / FreeDigitalPhotos.net

Page 6: How to Integrate Text and Phone Messaging with your Website

We tried…

“We need phone calls and text messages”

Email Mobile Apps

Page 7: How to Integrate Text and Phone Messaging with your Website

Image courtesy of zirconicusso / FreeDigitalPhotos.net

Page 8: How to Integrate Text and Phone Messaging with your Website

Short Codes

O Five digit number

O About $1000+/month

O Long application approval process

Page 9: How to Integrate Text and Phone Messaging with your Website

Shared Short CodesO Buy Keyword(s) – about $25/month

O Phone numbers – about $3/monthO Voice – about $0.05/minuteO Text - about $0.05/minute

O Bulk Monthly plans usually available

Page 10: How to Integrate Text and Phone Messaging with your Website

Images courtesy of vectorolie / FreeDigitalPhotos.net

Page 11: How to Integrate Text and Phone Messaging with your Website

BowlingGreenMassage.com

Page 12: How to Integrate Text and Phone Messaging with your Website

Mass TextOpening today at 3pm

Database of phone numbers

Opening today at 3pm

Opening today at 3pm

Opening today at 3pm Opening today at 3pm

Openin

g to

day a

t 3pm

I’ll ta

ke it!615-555-0123 gets it!

Page 13: How to Integrate Text and Phone Messaging with your Website

Web Meets Messaging with 10 digit phone numbers

O Twilio

O Tropo

O Plivo

O Nexmo

Page 14: How to Integrate Text and Phone Messaging with your Website

How it WorksO Buy Phone Number (or short code)

O Receive messages on my websiteO Call or Text that numberO Twilio/Tropo/Plivo/Nexmo sends the message to

my URLO My website processes the message and

responds (usually with XML)

O Send messages from my websiteO My website sends instructions to that number

using a provided library and API

Page 15: How to Integrate Text and Phone Messaging with your Website

PricingO Phone Numbers

O $0.80/month - $3/month (Avg. $1/month)

O VoiceO Inbound $0.0050/min – $0.03/min (Avg. $0.01/min)O Outbound $0.0130/min – $0.03/min (Avg.

$0.02/min)

O SMSO Inbound Free – $0.01/msg (Avg $0.0075/msg)O Outbound $0.0065/msg - $0.01/msg (Avg.

$0.0075/msg)

Page 16: How to Integrate Text and Phone Messaging with your Website

My Pick

Page 17: How to Integrate Text and Phone Messaging with your Website

TwilioO Average pricingO Great documentationO Great tutorialsO SubaccountsO AnalyticsO Developer toolsO TriggersO Easiest to get up and running for ME

Page 18: How to Integrate Text and Phone Messaging with your Website

Mass TextOpening today at 3pm

Database of phone numbers

Opening today at 3pm

Opening today at 3pm

Opening today at 3pm Opening today at 3pm

Openin

g to

day a

t 3pm

I’ll ta

ke it!615-555-0123 gets it!

Page 19: How to Integrate Text and Phone Messaging with your Website

Sent to My Script

Page 20: How to Integrate Text and Phone Messaging with your Website

require "Services/Twilio.php";$AccountSid = “Bxxxxxxx”;$AuthToken = “2xxxxxxxx";$client = new Services_Twilio($AccountSid, $AuthToken);$twilio_number = “615-555-0123”;

If ($_POST[‘From’] == $twilio_number) { $body =; $users = get_users('meta_key=phone'); $special_chars = array("-","(",")");

foreach ($users as $user) { $phone = '+1'.str_replace($special_chars,"",get_user_meta($user->ID, 'phone', true)); $numbers[] = $phone; }

foreach ($numbers as $number) { $sms = $client->account->messages->sendMessage($twilio_number, $number, $_POST[‘Body’]); }} else { // Process user message}

Page 21: How to Integrate Text and Phone Messaging with your Website

Respond to Text

<?php header(“content-type: text/xml”);echo “<?xml version=\”1.0\” encoding=\”UTF-8\” ?>\n”;?>

<Response> <Message>Thanks <?php echo $name ?> for your response.</Message></Response>

Page 22: How to Integrate Text and Phone Messaging with your Website

CloneMeServices.com

Dial 1 for emergency

Dial 2 to leave a message

Image courtesy of Stuart Miles /FreeDigitalPhotos.net

Page 23: How to Integrate Text and Phone Messaging with your Website

When the number is called…<?php date_default_timezone_set('America/Chicago'); header("content-type: text/xml");echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";if (date("H") > '20') : // time later than 9PM? ?> <Response> <Gather action="/user-input" numDigits="1"> <Say>Welcome to Clone Me Services.</Say> <Say>If this is an emergency please press 1</Say> <Say>Otherwise, please press2</Say> </Gather> <Say>Sorry, I didn't get your response.</Say> <Redirect>/phone</Redirect></Response><?php else: ?> // time before 9PM, just forward <Response> <Dial>+12707916649</Dial> </Response><?php endif; ?>

Page 24: How to Integrate Text and Phone Messaging with your Website

User presses number…<?php // if the caller pressed anything but 1 or 2 send them back if($_REQUEST['Digits'] != '1' and $_REQUEST['Digits'] != '2') { header("Location: /phone"); die; } // otherwise, if 1 was pressed we Dial CloneMeServices. If 2 we make an audio recording up to 30 seconds long. header("content-type: text/xml"); echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n”; ?>

<Response><?php if ($_REQUEST['Digits'] == '1') { ?> <Dial>+16155551111</Dial> <Say>The call failed or the remote party hung up. Goodbye.</Say><?php } elseif ($_REQUEST['Digits'] == '2') { ?> <Say>Record your message after the tone.</Say> <Record maxLength="30" action="/after-recording" /><?php } ?></Response>

Page 25: How to Integrate Text and Phone Messaging with your Website

After the recording…

<?phpheader("content-type: text/xml");echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";?>

<Response> <Say>Thanks for your message. Goodbye.</Say></Response>

Page 26: How to Integrate Text and Phone Messaging with your Website

Image courtesy of zirconicusso / FreeDigitalPhotos.net

Page 27: How to Integrate Text and Phone Messaging with your Website

ApplicationsO Appointment RemindersO Call Queue’s – matching callers and

agentsO Call Screening – find a live body to

answerO Call MetricsO Click to Call – button on website

(calls to or from browsers or mobile devices $0.0025/min)

O Automated Phone System

Page 28: How to Integrate Text and Phone Messaging with your Website

More ApplicationsO Conference CallsO Phone PollsO Voice BroadcastO VoicemailO Voice TranscriptionO Audio Recording from your WebsiteO Browser PhoneO Browser to Browser Calls

Page 29: How to Integrate Text and Phone Messaging with your Website

And More!O Group ChatO Text to SpeechO SMS notificationsO SMS from a callO MMS (some may support – only on

short codes with twilio)

Page 30: How to Integrate Text and Phone Messaging with your Website

Who Will Want This?O DoctorsO DentistsO Hair and Nail SalonsO Massage TherapistsO Other Professional ServicesO Marketers (careful with bulk

messaging!)O Dry CleanersO Restaurants

Page 31: How to Integrate Text and Phone Messaging with your Website

Who Can Use this?O SchoolsO Clubs and GroupsO ChurchesO Political GroupsO Fitness Centers & Sports ClubsO Anybody!