ServiceGrid Article - XSL Templates

From DocWiki

Jump to: navigation, search



Templates are used for transforming internal (call) data to an external form and external (call)-data to internal SD namespace. Templates are written in XSLT (XSL transformation).

Three types of outbound templates are available:

  • Text templates: Change the internal SD XML structure to a text structure.
  • XML templates: Change the internal SD XML structure to a different XML structure
  • HTML templates: Change the internal SD XML structure to a HTML document.

Inbound templates change an external XML structure to an internal SD XML structure (inbound namespace).

Templates can be self created and individually or copied from the standard-templates (and individually adapted). Templates are created and saved as XSL transformations. The template can use all the fields of a call. Templates are used in SD for:

  • Definition of content of outbound messages
  • Definition of translation of inbound XML messages C
  • reation of templates to view Call Data
  • Creation of templates for sending emails manually out from a call

Elements of an XSL Template are:

<XSL:STYLESHEET  version="1.0" xmlns:xsl="">
<XSL:TEMPLATE  match="Setups">
<XSL:CALL-TEMPLATE name="My_Main-Template">
<XSL:TEMPLATE name="My_Main-Template">
<XSL:TEXT>Here ends the first part of the Main-Template. </XSL:TEXT>
<!-- The next line will start the Include Template -->
<XSL:CALL-TEMPLATE name="My_Include-Template">
<!-- A parameter is handed over to the Include Template. -->
<!-- End of the Conclude Template -->
<XSL:TEXT> End of the Main Template.</XSL:TEXT>

Include Template

<XSL:TEMPLATE name="My_Include-Template">
<!-- Initilalsation of the parameters -->
<XSL:PARAM name="My_Parameter"></XSL:PARAM>
<XSL:TEXT>This is the parameter for my Incluce-Template: </XSL:TEXT>
<!-- The parameter is used as a varaible -->
<XSL:VALUE-OF select="$My_Parameter"></XSL:VALUE-OF>


Here ends the first part of the Main Template.
This is the parameter for my Include Template: HELLO WORLD.
End of the Main Template.

Control Tags

Control tags are used to control B2B messages based on user-defined functions.

Control Tags Template

<span style="display: none;" id="1430995406497S"> </span><?xml version="1.0" encoding="UTF-8"?> 
<xsl:stylesheet xmlns:xsl="" version="1.0"> <xsl:template match="/"> 
<CALL> <xsl:attribute name="Valid">No</xsl:attribute> <!-- Attribute specifying if the message will be processed to create or update a call; 
set to "No" to suppress the message --> <!-- ATTENTION Order of attributes and controlls MUST be first ATTRIBUTES then CONTROLS --> 
<!-- Control Tags BEGIN --> 
<Control.ForwardAfterClose><xsl:value-of select="/" /></Control.ForwardAfterClose> 
<!-- Control Tag if set to """"N"""" Partner-Outbound-MessageTrigger will not be fired if call was closed before update with actual record. 
Possible Values: """"Y/N""""--><br><Control.MakePreSelection><xsl:value-of select="/" /></Control.MakePreSelection> 
<!-- If set to ""Y"", converter tries to find an open Call only using SPCallID or CustCallID (Without ContractInformation). 
Possible Values: ""Y""/""N"" --><br><Control.SetCurrentCallState>
<xsl:value-of select="/" /></Control.SetCurrentCallState> 
<!-- Inbound ControlTag - Values: """"Y/N"""" - If set to yes, current CallState will be set explicit, if no CallState is sent. 
(Activates Mapping-Rules) --><br><Control.UpdateAfterCloseAllowed><xsl:value-of select="/" />
</Control.UpdateAfterCloseAllowed> <!-- Inbound ControlTag Values: """"Y/N"""" - 
If set to yes, the customer can update an existing Call after close if no Calls.ID is given. --><br>
<Control.UseCodeDefaults><xsl:value-of select="/" /></Control.UseCodeDefaults> <!-- If it is set to ""N"" 
no default-code (e.g. Priority) will be set, if value is not given by inbound interface. --><br>
<Control.UseSuccessors><xsl:value-of select="/" />
</Control.UseSuccessors> <!-- Control Tag If set to ""N"" only Partner-Successors are valid. Own Successors will be ignored. Values: Y/N -->
<br><Control.UseIndependentDeviceRef><xsl:value-of select="/" /></Control.UseIndependentDeviceRef> 
<!-- If yet to ""Y"", the call is searched for without device data and the device used for the call-device relationship is searched for independently
<xsl:value-of select="/"/>
</Control.MergeDefaultsOnContractOrContractElementChange> <!-- If set to ""Y"" and the message cheanges the Contract/ContractElement of the call,
the defaults are re-merged from Con/CEl to Call --><br>
<!-- Control Tags END -->

New Control Tags Fields in Cisco ServiceGrid Release 7.1


A new inbound control field Control.DeactivateOutboundTriggers has been implemented. This inbound message control field has several value selections that allow specific message trigger behaviors.

The possible values are as follows:

  • OfPartner—prevents my partner's message triggers from being activated.
  • MyOwn—prevents my message triggers from being activated.
  • BothSides—prevents both my message triggers as well as those of my partner’s from being activated.
  • No—allows all message triggers to be activated. This is the default value of this message control field.

The field description is available in the CommonContent > Dictionary > Fields document.

For more information, refer to the Common Content document.


A new inbound control field Control.UsePartnerSideSuccessors has been implemented. With field control field, it can be defined if the successor rules of my partner should be deactivated.

The possible values are as follows:

  • Y: Successor rules on partner side will be validated and the update will only be processed if the successor rules is not violated.
  • N: Successor rules on partner side will not be checked. Deactivation of successor allows the ticket to be set to the state that was sent in the inbound message whether it is allowed or not.

For more information on Control Tags, refer to the XSL Template document.

Related Articles

Common Content

For a complete list of Cisco ServiceGrid Articles, go to the List of Articles page.

Rating: 0.0/5 (0 votes cast)

Personal tools