" /> Interaction history DB - Genesys CTI User Forum

Author Topic: Interaction history DB  (Read 3528 times)

Offline Timur Karimov

  • Sr. Member
  • ****
  • Posts: 415
  • Karma: 2
Interaction history DB
« on: August 17, 2009, 01:18:08 PM »
Advertisement
Hi All,

another strange question - does any one know where in interaction/contact database Genesys store the attached user data? or any other way to get key same as GSIP_REC_FN from Genesys but with out using API ?

WBR Tim





Offline René

  • Administrator
  • Hero Member
  • *****
  • Posts: 1832
  • Karma: 62
Re: Interaction history DB
« Reply #1 on: August 17, 2009, 02:24:05 PM »
Hi Tim,

UserData are stored in the "interaction" table in the column "AllAttributes". Unfortunately, data are stored as binary object so it nearly impossible to read them using SQL language. If you want to read just a few keys from UserData you can configure Universal Contact Server to store value of these keys to special columns available in "interaction" table. These columns are named "StrAttribute<number>" (10 columns) and "IntAttribute<number>" (5 columns). Read chapter "Making an Attached Attribute Sortable" of "Multimedia 7.6 Selected Conceptual Data Models for the UCS Database" document for instruction how to configure UCS.

Hope it helps you.
R.

Offline Timur Karimov

  • Sr. Member
  • ****
  • Posts: 415
  • Karma: 2
Re: Interaction history DB
« Reply #2 on: August 17, 2009, 03:32:45 PM »
Rene, it's work like the contact attribute ? great. but also terrible. coz, it work for new interaction and no way to convert old millions of interaction =(

however, fanx very match.

Offline René

  • Administrator
  • Hero Member
  • *****
  • Posts: 1832
  • Karma: 62
Re: Interaction history DB
« Reply #3 on: August 17, 2009, 03:48:07 PM »
[quote]coz, it work for new interaction and no way to convert old millions of interaction =([/quote]

If you need to do the conversion for old interactions then the only option is to write an application that will read binary data from database, recode it, read value of defined key and store it back to database.

R.

Offline Timur Karimov

  • Sr. Member
  • ****
  • Posts: 415
  • Karma: 2
May be it can be intresting for sameone
« Reply #4 on: August 19, 2009, 05:01:30 PM »
C# code snipet for read and decode AllAtribute value
read it to array and after it do :

string mime = Convert.ToBase64String(bytes.ToArray(), Base64FormattingOptions.InsertLineBreaks);
            byte[] mb = Convert.FromBase64String(mime);
            char [] str = new char[8000]; int i =0;
            foreach (byte b in mb)
            {
                if (b == 0) str[i] = ' ';
                else
                {
                    if (i > 0)
                    {
                        if (str[i - 1] != ' ')
                        {
                            str[i] = Convert.ToChar(b);
                        }
                    }
                    else str[i] = Convert.ToChar(b);
                }
                i++;
            }
            string all_interactions = new string (str);

in all_interactions u got samething like this:
M  PegAGCPM      CBR-contract_DBIDs    RTargetPlaceSelected 7110_CPM RRequestedSkills      ServiceType default  RTenant Resources  RTargetTypeSelected 2  RTargetObjectSelected CPM  RTargetRuleSelected    RRequestedSkillCombination    RTargetObjSelDBID 106  RStrategyName Outbound  RTargetRequested CPM  CBR-Interaction_cost   
GSIP_REC_FN recorder/7110/2009-08-19/3002_8FKOJ3T39D67P96TB45JG4MGG800002H.wav  RVQID    CBR-IT-path_DBIDs    CustomerSegment default  RTargetAgentSelected cag1  ServiceObjective    RStrategyDBID 123  CBR-actual_volume