locked
Unified Service Desk questions RRS feed

  • Question

  • Hi,

    im trying to wrap my head around the configuration (scripting) parts of USD but there is really not enough documentation available. Im stuck in several parts of my configuration och have written down some questions that Im hoping that you guys could help me with. 

    Many thanks

    Rickard

    1. Is it possible to use $Expression, $Multiline or [[script.scriptname]] in a Call script inside an agent script script task? Where are they allowed to be used?

    2. How does Conditions for a button/ call script answer work. Example: I want to enable a Dashboard button in the toolbar in the Dashboard isnt open. But when the Dashboard is Open I want to disable the button. Hopw do I accomplish this? Is there any documentation on the syntax allowed?

    3. I cant get the User Notes Hosted Control to load. Ive tried to call the action script manually with the debugger but it doesnt seem to load. The action script action is to the default UII action of the hosted control. There must be something that I have missed.
    4. Whats $Escaped used for and how does it work?
    5. Trying to add a hosted control of USD component type sessionrows, i get the following error: Message>The plug-in execution failed because no Sandbox Hosts are currently available. Please check that you have a Sandbox server configured and that it is running.

    System.ServiceModel.EndpointNotFoundException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #867162F2</Message>

    [Microsoft.Uii.Customization.Plugin: Microsoft.Uii.Customization.Plugin.RestrictDataDuplicationPlugin]
    [059ec311-f7c6-df11-85fd-00155d289c77: Microsoft.Uii.Customization.Plugin.RestrictDataDuplicationPlugin: Create of uii_hostedapplication]
    I dont have any HC of type sessionrows.
    why?

    6. I have added a call script hosted control and a call script task for the contact entity. To load this call script task just for contacts I created an action call that has the condition "[[$Context.InitialEntity]+]"=="contact" under advanced and pointing it to the hosted controller and the action GoToTask. When I load up USD and open a contact in a new session the call script wont load. I can manually call the action call to load the call script task from the debugger. Whats wrong?

    7. What does  IN DESKTOP CORE CALLING EXE DEFAULT ACTIONS IN DO SET CONTEXT mean thats showing in the debugger in USD. Im trying to load teh user notes hosted control but it doesnt seem to work.
    Wednesday, June 24, 2015 11:03 AM

All replies

  • 1. Is it possible to use $Expression, $Multiline or [[script.scriptname]] in a Call script inside an agent script script task? Where are they allowed to be used?

    $Expression, $Multiline and [[script.<Scriptlet_Name>]], all of them have their own unique behavior. Depending on your needs you can use them in any Action Call (not just limited to Agent Script's). Below are some information and sample that may help you to visualize the use of these.

    Scriplets:

    Scriptlets are snippets of JavaScript that are executed when using a special syntax for your replacement parameter. Sometimes the system generated replacement parameters contain the proper data needed for these functions, but might not contain the data in the desired format. For example, in Computer Telephone Integration (CTI), phone numbers typically arrive from phone system as a string of digits such as “3035551212”, without any formatting. However, Microsoft Dynamics CRM stores phone numbers as a string that typically includes formatting characters such as dashes as in (303) 555-1212. If you were to search your CRM entity using the data supplied directly by the phone system, changes are slim that a match would ever be found. You address this using scriptlets in Unified Service Desk.

    $Expression, $Multiline

    Often times, there is a need to do something simple, like an if/then/else type construct that does not warrant creating a scriptlet. These situations require using a scriptlet inside an action call. There are two specialized handlers to assist when building inline scriptlets in action calls: $Expression and $Multiline.

    url= http://mysite/showmessage.aspx?displayname=$Expression(“[[$Context.etc]]" == "1" ? "[[account.Name]u]" : "[[contact.FullName]u]" )

    url= http://mysite/showmessage.aspx?displayname=$Multiline($Expression(
    function doWork()
    {
          If ("[[$Context.etc]]" == "1")
              return "[[account.Name]u]"
          else
              return "[[contact.FullName]u]"
    }
    doWork();
    ))

    2. How does Conditions for a button/ call script answer work. Example: I want to enable a Dashboard button in the toolbar in the Dashboard isnt open. But when the Dashboard is Open I want to disable the button. Hopw do I accomplish this? Is there any documentation on the syntax allowed?

    Enable and Visible Conditions takes replacement values or predefined values to set the enable or visible property on the toolbar button. Below replacement value can be mentioned in the Dashboard toolbar 'Enable Condition' to disable the dashboard toolbar button when it is already opened. (in the below expression Dashboard is the name of the dashboard hosted control)

    "[[Dashboard.HostedControlStatus]+]" != "open"

    Alternatively you can add a custom parameter to Context (say DashboardStatus) and update value to it when Dashboard it opened and closed. Refer that contact parameter to the 'Enable Condition' of dashboard toolbar button.

    "[[$Context.DashboardStatus]+]" != "open"

    3.I cant get the User Notes Hosted Control to load. Ive tried to call the action script manually with the debugger but it doesnt seem to load. The action script action is to the default UII action of the hosted control. There must be something that I have missed.

    Onlything you could have missed is, by default NOTES hosted control is by Session based hosted control (its not global as like Dashboard). Create a Session and invoke the Notes hosted control, you will be able to see it.

    4.Whats $Escaped used for and how does it work?

    In some cases where multi-line values are needed, you can supply the multi-line value directly in the data field for the action call. When supplying a multi-line value where other replacement parameters exists, you can escape the newlines with $ and surround with $Escaped() as in the following example

    Mymultiline=$Escaped([[myvalue]$])

    Alternative you can use the below syntax too,

    Mymultiline=[[myvalue]^]

    5. Trying to add a hosted control of USD component type sessionrows, i get the following error: Message>The plug-in execution failed because no Sandbox Hosts are currently available. Please check that you have a Sandbox server configured and that it is running.

    Hosted Controls NAME should be UNIQUE. You cannot have more than one hosted control with same Name. Please make sure that you are not creating the new one with already existing name (even if its Inactive hosted control)

    6. I have added a call script hosted control and a call script task for the contact entity. To load this call script task just for contacts I created an action call that has the condition "[[$Context.InitialEntity]+]"=="contact" under advanced and pointing it to the hosted controller and the action GoToTask. When I load up USD and open a contact in a new session the call script wont load. I can manually call the action call to load the call script task from the debugger. Whats wrong?

    You have created an Action Call to load Agent Script (that belongs to contact), but where did you mention when to load it ? You need to pair the created Action Call to an Event, Say on 'SessionNEW' Or 'PageLoadComplete' of Contact Hosted Control.

    7.What does  IN DESKTOP CORE CALLING EXE DEFAULT ACTIONS IN DO SET CONTEXT mean thats showing in the debugger in USD. Im trying to load teh user notes hosted control but it doesnt seem to work.

    DEFAULT action on a hosted control calls the action that's marked as default for the hosted control.  However, in Unified Service Desk, none of the predefined actions for the predefined hosted controls are marked as default, so if you call the default action on a hosted control, it just loads the hosted control.  For a custom hosted control in Unified Service Desk, you can define an action, set it as default, and that action is called when you call the default action on the hosted control.

    To Load NOTES hosted control, refer Point No 3

    Thanks & Regards

    Vinoth

    Friday, June 26, 2015 12:21 AM
  • Hi Vinoth,

    many thanks for your quick reply and helpful answers.

    I have some more questions and thoughts that I thought you might be able to help me with.

    1. Using scriptlets, $Expression, $Multiline in action calls works fine. But it is possible to use them inside scripttext. By scripttext I mean the text that the customer service agent reads to the customer.

    2. Is it possible to use the Multi enity search that ships in the navigation with CRM 2015 directly from USD? I want to use a CTI adapter to recieve some information about the customer when we have an incoming call and then automatically use the multi entity search from CRM to search for a existing contact or account. If not found then we automatically show a new form for create contact. Is it possible and how? :)

    3. What is the treefield hosted control and what is it used for?

    4. When loading up a ex. a contact session tab then in data parameters i get three different contact data parameters "contact, Contact and contact#contact". Why do I get three instead of just getting just Contact. They all seem to have the same information.

    5. We open several tabs in relation to an inbound phone call (via the CTI control) via several concurrent action calls
    These tabs often are not named correctly using our Session Name items
    Is this due to the pattern of opening several tabs in parallel? 
    Is a preferable pattern to open an initial tab and obtain a session name and only when fully loaded then open additional tabs?
    If so – would this be achieved by using an event for when the initial tab has loaded, established a session name and then perform additional action?

    6. Is there a customisation/configuration way to have a “subject hierarchy” type control in a USD panel? What are options are there?

    Best Regards
    Rickard Sundling

    Friday, June 26, 2015 9:43 AM