Cisco Support Community
Showing results for 
Search instead for 
Did you mean: 

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

need suggestions/helps to write customer code to a text file


The service team likes to know how many calls are received from each customer. I came out the following solution.

When a customer calls in, the script plays wlecome prompts and ask the customer to enter the customer code (a pre-assigned code to each customer), the sript then write the code along with calling number and calling time to a text file. A team lead will access this file to know the number of calls from each customer.

I have no problem to collect the code and write it to a file (UCCX 5.1), but it will overwrite the code every time. How can I append a line to a text file?

Or, if you know any other ways to do the same functions?




need suggestions/helps to write customer code to a text file

You could write the customer code to a custom call variable using the set enterprise call info step. No need to write to a text file at all.

need suggestions/helps to write customer code to a text file

It sounds like you are overwriting the file every time a new call comes in.  In order to append the call data, you will need to get the existing file from the repository first, append the text for the new call, then save it back to the repository.  You will still have issues with this method because 2 or more simultanious calls will result in missing data.  This is caused from the file being updated simultaniously and only data from the last simultanious call is saved.  There are ways around this, but it would be complex and prone to other issues.

I would recommend that you not use the text file and create a database to store this data.  This would resolve those file contention issues described above. 

CreatePlease to create content