02-05-2025 10:40 AM
Hi Community,
I have a requirement to perform database deep based on certain value in email's subject when agents pick/pull an activity from ECE. I have PCCE 12.6(2) integrated with ECE 12.6 and most of the agents work with pick/pull method.
To do this, I am thinking to use ECE Call Variables in ICM script, so whenever an activity is picked or pulled by an agent, ICM script will pass thru PickPull node and then I can trigger a VXML app with Call Variables that can do database deep. Now I see two ECE Call variables in ICM, configured as Expanded Call Variables in my system, activity_id and customer_name as user.ece.activity.id and user.ece.customer.name respectively. I see ECE has a call variable called "subject", so I added an Expanded Call Variable called "user.ece.subject" in CCE Admin, but that variable is not populated when activity hits the ICM script.
I have two questions:
1. How do I add ECE Call Variable "subject" in CCE Admin so it shows up in ICM when activity hits ICM script.
2. Is there a better way to handle my requirement then what I am thinking.
Thanks as always for any feedback that you can give.
CCE Admin Expanded call variable screenshot ("activity.id" and "customer.name" works, but "subject" doesnt):
ECE Call Variable screenshot:
Solved! Go to Solution.
02-07-2025 02:28 PM
@piyush aghera wrote:
Have you tried using Data Adapter to connect to Database? If so, how does it work? I used it to connect to APIs in the past and that works fine.
This is a copy/paste I sent to eGain back in 2019
Business Needs: The customer would like to use ECE to retrieve data from Service Now. They would like this data plugged into custom attributes and displayed in the Agent UI. The expectation is that an email will enter ECE, and the subject line will have diCase:n, where n is the Case number generated by Service Now. An API call via the Data Link will be done and information on the Case number will be returned and plugged into custom attributes.
What I have done so far: I have created the Data Link Access and Data Link Usage and both test successfully. The API call is a URL and requires a dynamic value (the Case number). In the Data Link Usage, I’m specifying that the dynamic value will be populated by the subject of the email. If I send an email with only the Case number, the API call is successful, results return, and I see all the values in the Agent UI.
Problem I’m having: I need to modify the subject so that I’m extracting only the case number and having the data link use just the number, rather than diCase:n . I can successfully modify the subject using the Pattern type if I do not invoke the Data Link. If I modify the subject line AND try to retrieve the results to plug into custom attributes, the workflow fails and the email routes to the default exception queue.
So you can see, the big problem I ran into early on was parsing the subject line. My subject lines were not static, so I had to count for a lot of different scenarios. But the above is just the GET method, at some point, I needed to use POST method to create a Service Now ticket, but I couldn't even get past this point. We tried different things like using two Modify Object nodes, one to update the Subject line and the other to update the custom attributes using the data access links. Separating the two modify object nodes was a dead end for me. I even tried two separate workflows where one workflow modifies the subject and the other populates the custom attributes. So after some back and forth, eGain suggested the following:
Another thing that you can explore is:
ws/v12/interaction/activity/attributes?$attribute=custom
Details here: https://developer.cisco.com/docs/enterprise-chat-and-email/#!interaction-api-developer-guide
I tried what they suggested above, and it still did not work. At this point, I had a couple Webex meetings with one of their Technical Architects. What we found is that once an email enters the department, the usage data link is invoked BEFORE the workflow, and yes, we're talking like microseconds, but that's the order of operations. The Architect seemed to think that it was a bug and said that ECE is looking for a pattern in the email content, even though it's not supposed to do that. If it finds the pattern in the content, the only thing changing is the subject, otherwise, the subject remains unchanged. At the end of all of it, eGain came back and said the following:
I do not see any other possible way to achieve it. The only way I think is, agent being manually inputting the case number and calling the API from agent console. Even, modifying the subject is not at all recommended as the case_id appended in the subject by the application is used in several other operations and actions. I have discussed this requirement with our architect as well, as we are not able to use the custom attribute while passing the input parameter to the API I do not see any way to do it without agent’s intervention. The main problem is application is not allowing any of the custom attribute to be passed to the link in real time to fetch the data hence we have to depend on the key attributes of activity.
This was on ECE 11.6 / eGain 15. I followed up with them when eGain 17 was released, but it was the same problem. The person I was working with said that he will make it an enhancement request. I will say though that the folks from eGain spent a lot of time with me to help me out and I appreciate them throwing a few resources my way.
02-05-2025 02:57 PM
If you add ECC variables, you have to restart the server, at least for UCCE, I would assume it'd be the same for PCCE.
"If you change the configuration of any ECC variable with the Expanded Call Variable List tool, restart the Unified CVP Call Server or VRU PIM to force a renegotiation of the ECC variables."
02-05-2025 03:05 PM
Thanks Bill. Actually new ECC variable is showing up under ECCPayload, so that part is fine. But I just found out that ECC variable should be mapped to respective ECE Call Variable in ECE Admin's Queue configuration, like below:
It seems like this needs to be done for each individual ECE queue, if that is the case then its a cumbersome work when you have lots of queues, like I have. I will test this further and update this thread.
02-05-2025 03:06 PM
Any suggestion on the method that I am attempting for my task.. will it be effective? any other suggestions?
Thanks.
02-06-2025 01:43 PM
I had a very similar project 6 years ago - it was probably the most mentally draining project I've ever worked on. The customer used ServiceNOW to manage helpdesk tickets. They wanted to use ECE to route emails into UCCE and perform a data dip to see if the ticket number in the subject line was an existing ticket, if not, create one. It was my first go at doing data dips when it came to ECE. I was hoping that I could use the Data Adapter to do the data dip - I had never used it before. Found out quickly that the Data Adapter is beyond useless and didn't do what I needed it to do. Then I as hoping I could do something in the workflow like parse the subject line or use the Modify Object node to send information into UCCE - nope. The best I could do was use RegEx in the Modify Object node to send some information into UCCE. Here's the thing, unless something changed since v11.6, you cannot send emails/chats into a Call Studio application because Call Studio only works with the Voice MRD. So we had to stand up two new servers (for HA) running Tomcat and we built an application in Eclipse. We used the AppGateway to send all the information to the Tomcat servers that launched the app (again, built in Eclipse, not Call Studio) and we conducted our API calls from there. We then returned the results to the AppGateway and plugged in the necessary information into Peripheral Variables. Part of the existing ticket lookup was bringing over the responsible agent for that ticket, so we used sticky agent (preferred agent) to send the email to, but after some time, send it off to a skill group.
It was just a crazy project... if you can convince this customer to go to WxConnect where this is all native, all the better. But if you're going to do data dips, it cannot be done within ECE or a Call Studio app (again, unless something changed). Good Luck
02-06-2025 02:22 PM
Thanks Omar for taking out time and write this up. This does sound like an overwhelming project.
What I am envisioning is that when activity hits ICM script, I can read Subject of the activity using ECE Call Variable "subject" which is mapped to ECC variable "user.ece.subject". Now using ICM functions, I can get customer reference number from the subject, which has a specific format. Next is the interesting part. Most of my agents use pick/pull method, so I am planning to insert Call Studio app at the place highlighted below, just before pick/pull node:
As you see, activities traverse thru that path, so theoretically, call studio app should trigger and I can pass customer reference number that I had extracted earlier from subject. Now all Call Studio app has to do is to use that customer reference number and do a data dip to get certain details and pass them back to ICM. I have no intention or need to pass entire activity to call studio app. I think it will work, but I am going to try all this starting Monday and see if it really works (fingers crossed).
Evenif all this works, I still have two challenges:
1. once I get information back from call studio to ICM, how do I pass that back to ECE and add into a reply template.
2. as I said, most of the activities go thru pick/pull node, but some get assigned directly from PQ to agent. how do I trigger call studio app for such activities.
I think answer to these two questions are "not possible" and I may have to look for some other way to do it.
02-06-2025 04:31 PM
You should be able to pass in the Subject line no problem, but you have to make sure your ECC variable has a high enough character limit - your customer will have to expect truncation from time-to-time. Please keep us updated in this thread because in my experience, you will not be able to pass in anything due to the activity/task being part of the ECE_Email MRD.
once I get information back from call studio to ICM, how do I pass that back to ECE and add into a reply template
I've tried many things to get an activity to go back to ECE from ICM.... I was unable to do it
02-07-2025 11:14 AM - edited 02-07-2025 11:29 AM
Subject line of my incoming email are fixed because they are auto generated email and only customer reference number changes for each email. So I can easily manipulate and get customer reference number out of subject line. However if data does not pass from ICM to ECE, then my plan will not work. I have to think something else.
ECE document defines Data Adapter as - It is a flexible integration tool for accessing data from external sources
such as local and remote databases, HTTP or HTTPS services, XML files, and so on.
Have you tried using Data Adapter to connect to Database? If so, how does it work? I used it to connect to APIs in the past and that works fine.
02-07-2025 02:28 PM
@piyush aghera wrote:
Have you tried using Data Adapter to connect to Database? If so, how does it work? I used it to connect to APIs in the past and that works fine.
This is a copy/paste I sent to eGain back in 2019
Business Needs: The customer would like to use ECE to retrieve data from Service Now. They would like this data plugged into custom attributes and displayed in the Agent UI. The expectation is that an email will enter ECE, and the subject line will have diCase:n, where n is the Case number generated by Service Now. An API call via the Data Link will be done and information on the Case number will be returned and plugged into custom attributes.
What I have done so far: I have created the Data Link Access and Data Link Usage and both test successfully. The API call is a URL and requires a dynamic value (the Case number). In the Data Link Usage, I’m specifying that the dynamic value will be populated by the subject of the email. If I send an email with only the Case number, the API call is successful, results return, and I see all the values in the Agent UI.
Problem I’m having: I need to modify the subject so that I’m extracting only the case number and having the data link use just the number, rather than diCase:n . I can successfully modify the subject using the Pattern type if I do not invoke the Data Link. If I modify the subject line AND try to retrieve the results to plug into custom attributes, the workflow fails and the email routes to the default exception queue.
So you can see, the big problem I ran into early on was parsing the subject line. My subject lines were not static, so I had to count for a lot of different scenarios. But the above is just the GET method, at some point, I needed to use POST method to create a Service Now ticket, but I couldn't even get past this point. We tried different things like using two Modify Object nodes, one to update the Subject line and the other to update the custom attributes using the data access links. Separating the two modify object nodes was a dead end for me. I even tried two separate workflows where one workflow modifies the subject and the other populates the custom attributes. So after some back and forth, eGain suggested the following:
Another thing that you can explore is:
ws/v12/interaction/activity/attributes?$attribute=custom
Details here: https://developer.cisco.com/docs/enterprise-chat-and-email/#!interaction-api-developer-guide
I tried what they suggested above, and it still did not work. At this point, I had a couple Webex meetings with one of their Technical Architects. What we found is that once an email enters the department, the usage data link is invoked BEFORE the workflow, and yes, we're talking like microseconds, but that's the order of operations. The Architect seemed to think that it was a bug and said that ECE is looking for a pattern in the email content, even though it's not supposed to do that. If it finds the pattern in the content, the only thing changing is the subject, otherwise, the subject remains unchanged. At the end of all of it, eGain came back and said the following:
I do not see any other possible way to achieve it. The only way I think is, agent being manually inputting the case number and calling the API from agent console. Even, modifying the subject is not at all recommended as the case_id appended in the subject by the application is used in several other operations and actions. I have discussed this requirement with our architect as well, as we are not able to use the custom attribute while passing the input parameter to the API I do not see any way to do it without agent’s intervention. The main problem is application is not allowing any of the custom attribute to be passed to the link in real time to fetch the data hence we have to depend on the key attributes of activity.
This was on ECE 11.6 / eGain 15. I followed up with them when eGain 17 was released, but it was the same problem. The person I was working with said that he will make it an enhancement request. I will say though that the folks from eGain spent a lot of time with me to help me out and I appreciate them throwing a few resources my way.
02-10-2025 12:30 PM
Thanks Omar. You've provided a lot of good information. I think I am going to accept your answer.
BTW, ECE Call Variable subject can be mapped to ICM's ECC variable and value does get filled in properly.
02-11-2025 12:42 PM - edited 02-11-2025 01:02 PM
Hi Omar,
I am back with a question. While using ECE Interaction API to get Custom Attribute, how do you pass x-egain-session header with valid current session ID? Its a mandatory field and without it i am getting error code 401 - Unauthorized.
Also, for everyone's information: below is the valid ECE 12.6 API URL. ECE developer guide has wrong version number:
https://<Webserver>/system/ws/v20/interaction/activity/attributes
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide