on ‎2018 Dec 13 1:37 PM
Hi,
I've got a question about customizing an IVR. The idea is that when a call comes in, the IVR checks if the number is in a VIP list (ie. txt file located in a shared folder). If it is, it's transfered to queue A, if not, it's transfered to queue B.
We have similar solution in a different application, but I'd like to implement it into SAP IVR. I've managed to compare ANumber to a defined var with a small amount of numbers, but currentrly the list contain hundreds and hundreds of phone numbers.
Any ideas or suggestions would be awesome.
Kind Regards,
Alder
Request clarification before answering.
# coding=latin-1
import VER
VER.VER(__file__,
"""
Company: K2 Consult
Filename: Check_VIP_Number.py
Description: Custom Method to check VIP number from .csv file of VIP numbers.
Created: 27.02.2019
Modified: -
""",
"1.0.0.0")
from Env import *
from ICustomize import *
from IVRUtil import *
from ADO import *
import csv
class Check_VIP_Number(ICustomize):
# Customizer for check existance of VIP number in file
# NOTE: Keep name, Filename and class name identical.
# ========================================================================
def __init__(self, AppConf):
#self.checkVipInFile = checkVipInFile
ICustomize.__init__(self, AppConf)
def checkVipInFile(self, params):
# Path to .csv file with VIP numbers
# be carefull with path to file, if your use windows, whatever you must use
filename = '//your_shared_folder/numbers.csv'
numbersList = []
namesList = []
with open(filename, 'r') as _filehandler:
csv_file_reader = csv.DictReader(_filehandler)
for row in csv_file_reader:
numbersList.append(row['Number'])
namesList.append(row['Name'])
# Number of calling person
# callerNumber is string
callerNumber = params.get("callerNumber", None)
# If number not exists
if not callerNumber:
return "ERROR"
# If txt file with numbers not exists or unavailable
if not _filehandler:
return "ERROR"
# check number in file
if callerNumber in numbersList:
return "OK", namesList[numbersList.index(callerNumber)]
else:
return "OK", None
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Alder,
As a starter I would recommend to check SAP note 1951158. The note contains some nice examples for IVRs and specially for your case there is VIP IVR example.
Br,
Jukka
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jukka,
I'm familiar with the given SAP note. Unfortunetly that is not the solution I'm looking for. If I'm not mistaken the VIP IVR recommends to add VIP info to the internal Directory. We have tried silimar solution to show customer name, but if we have several hundred thousand customers, then the Directory is not the place to hold that information. SAP has even given us the same answer, that the Directory is not meant for that.
I'm mostly interested in checking the VIP status from a given file. Since info in that file can change on a daily basis. We rather not burden the Directory with such queries.
PS: I've tried to set up the VIP IVR, but the Customstate "Method name" won't save. It gives me missing or invalid attribute value.
Kind Regardsm
Alder
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.