Usecase: Phone based Donation service
Back to Articles
VoIP API Payment Processing Voice Mail Javascript IVR

Usecase: Phone based Donation service

February 20, 2018 3 min
Aivis Olsteins

Aivis Olsteins

Some time ago we were approached by a telecom company who needed a specific setup: to build automated answering system for a charity. Users would be given a toll free phone number where they could dial in, and then guided through the automated process, which would allow them to choose amount they would like to donate, and enter their card details to make a payment. The system would then connect via one of the payment processing companies API to charge the card online, and let users know if their donation was successful.

The requirement asked to create a multi-stage IVR which would do the following:

1) Give user an initial choice: a) to switch to another language b) to make a donation c) to leave a message

2) Next, if user selected to make a donation, it would ask for their a) phone number b) donation amount c) card number, expiry and CVV code

3) Payment would be processed

4) In case of successful result, user would be asked if they wanted to receive a receipt. Then they would be prompted to leave a VM with their name and address, and an email would be sent to operator to listed to the voice mail and process the request.

Since the requirement was fairly complex we decided to use IVR scripting language we created and described in this post. On top of that, we took Authorize.net API for processing credit cards. We added a range of new functions especially for this request, for example:

Function to process card payments by authorize.net:


var auth = new AuthorizeNet({
cardNumber : cc_number,
expirationDate : cc_expiry,
amount : amount,
cvv : cc_cvv
});

Also send attachments by email:

sendMail({
to: email_recipient,
subject: "You've got the mail - Receipte request",
text : "The message with name and address is in attachment",
attachments : [recording]
});

I will not post entire script here because it is very long, however, there were some specific challenges which we needed solve to make users experience more easy and seemless, for example detecting number of CVV code digits based on card type. Here is small piece which does that:

// check if card number matches Amex pattern
var amexcheck = new RegExp("^34[0-9]{13}$|^37[0-9]{13}$")
if ( amexcheck.test(cc_number) == true) {
// set CCV to 4 digits for Amex
cc_cvv_length = 4;
}

Finally, we needed to run a stress test of the system to check if it can handle large campaigns. We were delighted to learn that system could take up to 400 simultaneous calls on one switch instance. We estimated that one user in average spends 3 minutes when making a donation, which results in more than 100 donations per minute.

Lastly, we have a live demo of the service available online on our website for your review. It does not have original voice prompts from that specific project, but the process flow is exactly the same. You can even use test VISA card number 4111 1111 1111 1111 with expiry 0120 and CVV 123 to test it out.

Checkout other possible use cases of our script based IVR here

 

Share this article

Aivis Olsteins

Aivis Olsteins

An experienced telecommunications professional with expertise in network architecture, cloud communications, and emerging technologies. Passionate about helping businesses leverage modern telecom solutions to drive growth and innovation.

Related Articles

The Commitment Economy: Why Voice AI Bookings Must Be Integrated, Not Just Conversational

The Commitment Economy: Why Voice AI Bookings Must Be Integrated, Not Just Conversational

AI can promise a booking, but what about the broken promise? Learn why systemic integration, Accuracy Rate, and System Sync define the real test of Voice AI reliability

Read Article
Beyond the Dial Tone: 3 Metrics That Define Outbound AI Success

Beyond the Dial Tone: 3 Metrics That Define Outbound AI Success

Outbound AI requires a new scorecard. Learn the 3 metrics (Connection Rate, Engagement Quality, and Conversion Impact) that measure pipeline movement, not just call volume

Read Article
The New AI Scorecard: How to Measure Campaign Effectiveness Beyond "Call Volume"

The New AI Scorecard: How to Measure Campaign Effectiveness Beyond "Call Volume"

Stop guessing with 'Call Volume'. Discover the 3-Layer Framework for measuring Voice AI success: Goal Completion Rate (GCR), Sentiment Drift, and Knowledge Retrieval. Turn phone calls into structured marketing data

Read Article
What Happens to Metrics When "Hold Time" Hits Zero?

What Happens to Metrics When "Hold Time" Hits Zero?

Does Voice AI just save money? No. Discover the "CSAT Paradox" and how zero hold time improves revenue, lead capture, and team morale simultaneously.

Read Article

SUBSCRIBE TO OUR NEWSLETTER

Stay up to date with the latest news and updates from our telecom experts