3 Replies Latest reply: Oct 13, 2011 10:28 AM by 694628 RSS

    COD Functions

    user99976
      Where do we get the list of Interal COD functions ? Help document doenst have these listed.
        • 1. Re: COD Functions
          694628
          Setting and using character variables
          Set
          $Variable = 'thevariable'

          Test
          $Variable=='variable'


          ------------------------------
          SYSTEM VARIABLES
          $ACD_PRIORITY Initially this variable is set to the priority of the project, which is set in the
          Priority list box.
          If you enable Customer Priority Routing, Oracle Contact Center Anywhere
          can change the value of this variable to the customer priority. For more
          information on variables, see About Assigning Priority Levels to
          Customers on page 343.

          $ANI The current incoming phone number.

          $CID If your project prompts the customer for the customer ID, the value that
          the customer enters is stored in the $CID variable.
          If you do not select the Use Prompt to ask for customer ID check box, the
          $CID variable remains empty.

          $CONVERTDATE Converts a string YYYYMMDD to second values (seconds or INVALID).
          This special system variable lets you convert a date (in the format
          YYYYMMDD) to a POSIX style format (number of seconds since January 1st,
          1970). For example, to convert the date 19900505 (05 May 1990) to the
          POSIX value for that date, in any project menu location where you can set
          a variable, enter:
          $CONVERTDATE = 19900505
          Then, the next time you test or access the value of $CONVERTDATE, it will
          contain the POSIX equivalent of May 5th, 1990.

          $CURRENTTIME Stores the current time in the format HHMM.

          $DATE Current POSIX time in seconds (number of seconds since January 1st,
          1970).

          $DAYOFWEEK Day of the week (where 1= Sunday,... 7=Saturday).

          $DNIS The phone number the caller dialed.

          $INTDATE The date and time when the current interaction began. $INTDATE has a
          POSIX timestamp format (the number of seconds since Midnight, January
          1, 1970, UTC/GMT.)

          $INTID The ID of the current interaction.

          $PREDCID The predictive contact ID of the current predictive call.

          $SQLSTATUS The status of the last query executed from an SQL Query project menu. The
          possible values are:
          ¦ FAIL
          ¦ NO-ROWS
          ¦ PENDING
          ¦ SUCCESS
          For more information on SQL Query menus, see Creating SQL Query
          Menus on page 237.

          $TODAYSDATE Stores the current date in the format YYYYMMDD.

          ================================================================================================

          !GetSubString($VAR,x,y): This function returns a substring from the string represented by $VAR where x is the start and y is the number of characters.

          Example: $VAR=8584101600
          x = 0, y = 3 !GetSubString($VAR,0,3) = 858
          x = 1, y = 2 !GetSubString($VAR,1,2) = 58

          !GetStringLength($VAR): This function returns the length of the string represented by the variable $VAR.

          Example: $VAR=8584101600
          !GetStringLength($VAR) = 10

          !GetWGLoggedIN($WG): This function returns the number of agents loggedin to the workgroup represented by the variable $WG. This function is blocking and will request the ACDServer for the number. In case of no response in 5 seconds from the ACDServer, the result will be empty.

          !SGetAllLoggedIN(): This function returns the number of all agents logged in. This function is blocking and will request the ACDServer for the number. In case of no response in 5 seconds from the ACDServer, the result will be empty.

          * Each function needs to start with a "!", no spaces at all. All functions are case sensitive.

          New in R19 - 8.2.1
          GetWGAvailable(workgroupID) - Number of Available Agents for Specified Workgroup
          GetWGCallQueued(workgroupID) - Number of Callers in Queue for Specified Workgroup
          GetCOACDCAllQueued() - Number of callers in Queue Company Wide
          Random() - Random Number Generator for Percent based routing
          GetUserID(username) - User ID
          GetWGID(workgroup name) - Workgroup ID
          DAYOFYEAR Variable for Country Code
          DAY OF YEAR - Variable for Day of Year
          WEEK OF YEAR – Variable for Week of Year
          Reference: For calculation method. http://www.margatefl.com/calendar/cal_week.php?op=week&catview=0
          COMPANYDATE – Returns the time stamp and company time zone (including DST offset)
          • 2. Re: COD Functions
            user99976
            Thanks for the response. For the function GetWGLoggedIN($WG), what is the paramter? Is it Workgroup Id or Workgroup Name?

            And is there any way, I can get the Workgroup ID dynamically for a selective Workgroup Name? (Workgroup name is identified at the run time)
            • 3. Re: COD Functions
              694628
              For !GetWGLoggedIN($WG) , $WG is workgroup name.

              In R19 you can use !GetWGID(workgroup name) to get the workgroup ID