Author Image

By: Aivis Olsteins

In News

2018-02-20

Usecase: Phone based Donation service

This usecase explains how we set up automated payment collection service for a charity

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

 

Leave a comment
About Author
Author Image
My name is Aivis Olsteins and I am owner of DataTechLabs. My experience in Telecoms started in early 1990's and I have worked in multiple technical positions in mobile, messaging and data networks. My expertise lies in telecom networks, database systems, distributed processing and large data analysis. These posts are my attempt to share my knowledge with everyone who might find it useful.

Get in Touch

If you have something to say, please use the contact form below to get in touch with us. We will get back to you as soon as possible.

Mail Us

DataTechLabs SIA, Muzikas str 12A
Jurmala, LV-2008, Latvia.

Call Us

+371 67 66 09 01
+ 1 202 499 1550

E-mail Us

info@datatechlabs.com
support@datatechlabs.com