on 06-24-2016 9:25 PM
Hello,
I am using the Customstate element to invoke a Python customizer method, but when I tested the IVR calling the Customstate I got the error below.
>>>> ERR> <type 'exceptions.AttributeError'> : ICustomize instance has no attribute 'getQueueById'
My code, where I set the method name to call.
from Env import *
from ICustomize import *
from IVRUtil import *
from ADO import *
class Get_Queue_Number(ICustomize):
# NOTE: Keep name, Filename and class name identical.
# ========================================================================
def __init__(self, AppConf):
# Call the base class constructor
ICustomize.__init__(self, AppConf)
def getQueueById(self, params):
BR
Rodrigo
Hi Rodrigo,
make sure that your filename of the IVR customizer file is Get_Queue_Number.py.
BR,
Thomas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello
Couple things you could check:
1) intendation used in the customizer file, see e.g. https://docs.python.org/2.7/reference/lexical_analysis.html#indentation
2) some examples from SAP Note 1951158 - SAP Contact Center 7.0 - IVR Samples (there are some with customizers you can build on)
BR,
-Lasse
Hi Rodrigo,
if you send me your customizer file, then I can check it on my side.
My opinion is, that Copy & Paste in SCN is no solution for that because here you can't see the right intendation. It's important to always use the right amount of spaces for intendation. Python is very sensitive for that.
BR,
Thomas
Hi Rodrigo,
In your initial post you wrote the following error line:
>>>> ERR> <type 'exceptions.AttributeError'> : ICustomize instance has no attribute 'getQueueById'
In your customizer file you defined "def getCustomerById(self, params)", but not "def getQueueById(self, params)". This has to be the reason for this error.
This means, in your IVR at the customstate you have to use "getCustomerById" instead of "getQueueById", or you have to define getQueueById in your customizer instead of getCustomerById.
I didn't test it but I guess you will have another problem.
You wrote:
SELECT [MobilePhone] FROM DimAgentProfile WITH(NOLOCK) WHERE UserInitials = 'UserInitials'
ODBC = CEMODBC.ODBCConnection("VWU_DSN", self.m_E, ["XXX"])
recordset = ODBC.execute(UserInitials)
This will not work, because you didn't write the SQL statement as String.
I would try:
sqlCmd = "SELECT [MobilePhone] FROM DimAgentProfile WITH(NOLOCK) WHERE UserInitials = ?"
ODBC = CEMODBC.ODBCConnection("VWU_DSN", self.m_E, ["XXX"])
recordset = ODBC.execute(sqlCmd, (UserInitials))
BR,
Thomas
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
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.