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

Case Study: Global Communications Company

Case Study: Global Communications Company

A leading communications company used our cloud Voice platform to send 30 million OTP calls per month to their customers, resulting in cost reduction and incrased conversion

Read Article
Bridging The Delay Gap in Conversational AI: The Backpressure Analogy

Bridging The Delay Gap in Conversational AI: The Backpressure Analogy

Conversational AI struggles with the time gap between text generation and speech synthesis. A “backpressure” mechanism, akin to network data flow control, could slow text generation to match speech synthesis speed, improving user interaction.

Read Article
How Voice AI Agents Can Automate Outbound Calls and Unlock New Opportunities for Businesses: A Deeper Dive

How Voice AI Agents Can Automate Outbound Calls and Unlock New Opportunities for Businesses: A Deeper Dive

AI voice agents transform healthcare scheduling by reducing costs, administrative tasks, and no-shows. They offer 24/7 service, multilingual support, proactive reminders, and valuable insights, improving efficiency and patient experiences.

Read Article
How to Fix Your Context: Mitigating and Avoiding Context Failures in LLMs

How to Fix Your Context: Mitigating and Avoiding Context Failures in LLMs

Larger context windows in LLMs cause poisoning, distraction, confusion, and clash. Effective context management (RAG, pruning, quarantine, summarization, tool loadouts, offloading) remains essential for high-quality outputs.

Read Article

SUBSCRIBE TO OUR NEWSLETTER

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