<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: First and Last Name - Script in Contact Center</title>
    <link>https://community.cisco.com/t5/contact-center/first-and-last-name-script/m-p/4552606#M123296</link>
    <description>&lt;P&gt;Hello Sean, Thanks for your help ,its worked&amp;nbsp; by&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;inputs of&amp;nbsp; Caller ANI (calling number) at script&amp;nbsp;..&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;seeking a help, script ANI calling number input its own to&amp;nbsp; display "name" ?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 15 Feb 2022 10:46:33 GMT</pubDate>
    <dc:creator>mathanmogan</dc:creator>
    <dc:date>2022-02-15T10:46:33Z</dc:date>
    <item>
      <title>First and Last Name - Script</title>
      <link>https://community.cisco.com/t5/contact-center/first-and-last-name-script/m-p/3398644#M105793</link>
      <description>&lt;P&gt;How can i extract first and last name of calling user once call lands on UCCX system. Our requirement is to get First name and last name of calling user and pass it to other application. I tried to use Get User field but it says- User ID is blank.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Mar 2019 01:14:45 GMT</pubDate>
      <guid>https://community.cisco.com/t5/contact-center/first-and-last-name-script/m-p/3398644#M105793</guid>
      <dc:creator>madhav.kumar.bhardwaj12</dc:creator>
      <dc:date>2019-03-15T01:14:45Z</dc:date>
    </item>
    <item>
      <title>Re: First and Last Name - Script</title>
      <link>https://community.cisco.com/t5/contact-center/first-and-last-name-script/m-p/3398680#M105796</link>
      <description>&lt;P&gt;Take it that these are from internal calls where you have an End user in call manager?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If so you might need to do a lookup of sorts&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;dir_url&lt;/TD&gt;
&lt;TD&gt;String&lt;/TD&gt;
&lt;TD&gt;"http://xxx:8080/ccmcip/xmldirectorylist.jsp?n="&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;Where xxx is your PUB&amp;nbsp;&lt;/P&gt;
&lt;TABLE&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;calling_number&lt;/TD&gt;
&lt;TD&gt;String&lt;/TD&gt;
&lt;TD&gt;""&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;xml&lt;/TD&gt;
&lt;TD&gt;Document&lt;/TD&gt;
&lt;TD&gt;null&lt;/TD&gt;
&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;calling_number = Get Call Contact Info (--Triggering Contact--, Calling Number)&lt;/P&gt;
&lt;P&gt;XML = Create XML Document (URL[dir_url + calling_number])&lt;/P&gt;
&lt;P&gt;calling_name = Get XML Document Data (xml, "//DirectoryEntry/Name")&lt;/P&gt;
&lt;P&gt;Set Enterprise Call Info (--Trigger Contact--) Variables Used:calling_name,calling_number)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jun 2018 10:58:59 GMT</pubDate>
      <guid>https://community.cisco.com/t5/contact-center/first-and-last-name-script/m-p/3398680#M105796</guid>
      <dc:creator>tom.miller1</dc:creator>
      <dc:date>2018-06-13T10:58:59Z</dc:date>
    </item>
    <item>
      <title>Re: First and Last Name - Script</title>
      <link>https://community.cisco.com/t5/contact-center/first-and-last-name-script/m-p/3412128#M106192</link>
      <description>&lt;P&gt;Thanks Tom. It seems that as output, we are receiving full name but we need first name and last name in separate variable. Is there option in xml directory to use first name as variable ?&lt;/P&gt;</description>
      <pubDate>Sun, 08 Jul 2018 08:53:24 GMT</pubDate>
      <guid>https://community.cisco.com/t5/contact-center/first-and-last-name-script/m-p/3412128#M106192</guid>
      <dc:creator>madhav.kumar.bhardwaj12</dc:creator>
      <dc:date>2018-07-08T08:53:24Z</dc:date>
    </item>
    <item>
      <title>Re: First and Last Name - Script</title>
      <link>https://community.cisco.com/t5/contact-center/first-and-last-name-script/m-p/3691452#M107606</link>
      <description>&lt;P&gt;Hmm&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Not that I can think of off the top of my head, I did some digging and I am a bit stuck to come up a solution for that requirement as well.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Maybe someone else here could advise, have to admit I am curious if that is possible as well now.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Aug 2018 13:39:38 GMT</pubDate>
      <guid>https://community.cisco.com/t5/contact-center/first-and-last-name-script/m-p/3691452#M107606</guid>
      <dc:creator>tom.miller1</dc:creator>
      <dc:date>2018-08-20T13:39:38Z</dc:date>
    </item>
    <item>
      <title>Re: First and Last Name - Script</title>
      <link>https://community.cisco.com/t5/contact-center/first-and-last-name-script/m-p/3691589#M107610</link>
      <description>&lt;P&gt;You have a few issues in your logic.&amp;nbsp; First you will receive a "best match" of 32 directory entries from the CUCM directory if there is no explicit match on your directory number query.&amp;nbsp; If none of them match, your next Get XML step will fail, because it is returning a "null" response.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Once you do have a matching response, you can parse the XML data from the array string using a Java .split().&lt;/P&gt;
&lt;P&gt;I will try to attach the working code (not sure if the website will allow .aef attachments... but I will try.)&lt;/P&gt;
&lt;P&gt;This is a working script, you just need to provide the inputs of your CUCM IP address and the ANI (calling number) you wish to query in the directory.&lt;/P&gt;
&lt;P&gt;Sincerely,&lt;/P&gt;
&lt;P&gt;Sean&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2018-0820-uccxCallerName-solved.png" style="width: 999px;"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/17170i272634D6F59962F1/image-size/large?v=v2&amp;amp;px=999" role="button" title="2018-0820-uccxCallerName-solved.png" alt="2018-0820-uccxCallerName-solved.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Aug 2018 16:14:40 GMT</pubDate>
      <guid>https://community.cisco.com/t5/contact-center/first-and-last-name-script/m-p/3691589#M107610</guid>
      <dc:creator>Sean Lynch</dc:creator>
      <dc:date>2018-08-20T16:14:40Z</dc:date>
    </item>
    <item>
      <title>Re: First and Last Name - Script</title>
      <link>https://community.cisco.com/t5/contact-center/first-and-last-name-script/m-p/3691761#M107616</link>
      <description>&lt;P&gt;This is all I do - it pulls the calling name from the phone.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Set callingParty = {&lt;BR /&gt;java.lang.reflect.Field ciscoCallField = contact.getClass().getDeclaredField("ciscoCall");&lt;BR /&gt;ciscoCallField.setAccessible(true);&lt;BR /&gt;com.cisco.jtapi.extensions.CiscoCall ciscoCall = (com.cisco.jtapi.extensions.CiscoCall)ciscoCallField.get(contact);&lt;BR /&gt;return ciscoCall.getCurrentCallingPartyDisplayName();&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then under Select Resource, set enterprise call info and assign callingParty to a callvariable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Internal calls are 100% reliable, but external of course rely on the carrier information that was sent.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Aug 2018 21:04:03 GMT</pubDate>
      <guid>https://community.cisco.com/t5/contact-center/first-and-last-name-script/m-p/3691761#M107616</guid>
      <dc:creator>Mike_Brezicky</dc:creator>
      <dc:date>2018-08-20T21:04:03Z</dc:date>
    </item>
    <item>
      <title>Re: First and Last Name - Script</title>
      <link>https://community.cisco.com/t5/contact-center/first-and-last-name-script/m-p/3692186#M107631</link>
      <description>...the requirement was to be able to separate the First and Last name from the directory displayed name, in separate variables.  Did you see that part?&lt;BR /&gt;&lt;BR /&gt;:-)</description>
      <pubDate>Tue, 21 Aug 2018 13:30:57 GMT</pubDate>
      <guid>https://community.cisco.com/t5/contact-center/first-and-last-name-script/m-p/3692186#M107631</guid>
      <dc:creator>Sean Lynch</dc:creator>
      <dc:date>2018-08-21T13:30:57Z</dc:date>
    </item>
    <item>
      <title>Re: First and Last Name - Script</title>
      <link>https://community.cisco.com/t5/contact-center/first-and-last-name-script/m-p/3701520#M107853</link>
      <description>&lt;P&gt;...I had some fun working with this, and created a script with some error handling for missing first name (last name is required for a directory entry, but first name is not--which produces a "null" error&amp;nbsp;when trying to extract XML data from an empty set), multiple entries found (you will need to add your own logic for what to do when there is more than one user with the same dialed number), etc.&lt;/P&gt;
&lt;P&gt;Use the interactive debugger to see what works for your requirements.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2018-0905-RetrieveFirstAndLastNm2.PNG" style="width: 715px;"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/18193iB7D43EC1AA3DB0CF/image-size/large?v=v2&amp;amp;px=999" role="button" title="2018-0905-RetrieveFirstAndLastNm2.PNG" alt="2018-0905-RetrieveFirstAndLastNm2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Enjoy!&lt;/P&gt;</description>
      <pubDate>Wed, 05 Sep 2018 20:14:46 GMT</pubDate>
      <guid>https://community.cisco.com/t5/contact-center/first-and-last-name-script/m-p/3701520#M107853</guid>
      <dc:creator>Sean Lynch</dc:creator>
      <dc:date>2018-09-05T20:14:46Z</dc:date>
    </item>
    <item>
      <title>Re: First and Last Name - Script</title>
      <link>https://community.cisco.com/t5/contact-center/first-and-last-name-script/m-p/4552606#M123296</link>
      <description>&lt;P&gt;Hello Sean, Thanks for your help ,its worked&amp;nbsp; by&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;inputs of&amp;nbsp; Caller ANI (calling number) at script&amp;nbsp;..&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;seeking a help, script ANI calling number input its own to&amp;nbsp; display "name" ?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Feb 2022 10:46:33 GMT</pubDate>
      <guid>https://community.cisco.com/t5/contact-center/first-and-last-name-script/m-p/4552606#M123296</guid>
      <dc:creator>mathanmogan</dc:creator>
      <dc:date>2022-02-15T10:46:33Z</dc:date>
    </item>
    <item>
      <title>Re: First and Last Name - Script</title>
      <link>https://community.cisco.com/t5/contact-center/first-and-last-name-script/m-p/4552639#M123298</link>
      <description>&lt;P&gt;Working NOW..&lt;/P&gt;</description>
      <pubDate>Tue, 15 Feb 2022 11:29:25 GMT</pubDate>
      <guid>https://community.cisco.com/t5/contact-center/first-and-last-name-script/m-p/4552639#M123298</guid>
      <dc:creator>mathanmogan</dc:creator>
      <dc:date>2022-02-15T11:29:25Z</dc:date>
    </item>
    <item>
      <title>Re: First and Last Name - Script</title>
      <link>https://community.cisco.com/t5/contact-center/first-and-last-name-script/m-p/4687923#M124932</link>
      <description>&lt;P&gt;I realize we are a few years removed from the last response. Hoping someone can shed some light on a variation of the above request. Our Numbers are formatted as "+1 555-555-5555" obviously the space is causing the problems with the query. Is there anyway to search for "Best Match"? thinking through the logic of the script...&lt;/P&gt;&lt;P&gt;Capture ANI&lt;/P&gt;&lt;P&gt;&amp;nbsp;Trim ANI to a variable that only includes the "555-555-5555"&lt;/P&gt;&lt;P&gt;Insert said variable at the end of the xmldirectory url with a wildcard variable (If one exists)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyone have any recommendations or thoughts on this?&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2022 14:20:21 GMT</pubDate>
      <guid>https://community.cisco.com/t5/contact-center/first-and-last-name-script/m-p/4687923#M124932</guid>
      <dc:creator>Jrod Alley</dc:creator>
      <dc:date>2022-09-15T14:20:21Z</dc:date>
    </item>
  </channel>
</rss>

