tracking - GetTrkLink 

Page / - last modified by Outhman Moustaghfir on 2022/09/21 17:08 

GetTrkLink 
last modified by Outhman Moustaghfir
on 2022/09/21 17:08

Table of Contents
Introduction
Parameters
Uses

Introduction
In this section, we will go throw an XSL function to get all tracking linked to a certain tracking regardless of their types.
Parameters
GetTrkLink uses 4 params to help retrieve trackings in question: 
 1.	trkID : tracking ID.
 2.	trackingType: it refers to the type of tracking wanted. (eg : order , product, baseArticle ...)
 3.	sensType: top (parent), bot (children), any (same level).
 4.	trackingTypeCible: an optional param, that filter the result by a tracking type.
Uses
We suppose that we have a tracking type named Product. It has 3 data (Name, Brand, and Country).
if we want to get tracking linked to a product with trkID = '632061e5f8aef457701a28d3'  that has 3 links  ( 2 top and 1 bot)
•	    "top": [
      {
        "trkID": "632889a3eecc82117ec1b653",
        "env": "iXPath",
        "trkType": "Corporate"
      },
      {
        "trkID": "62fa0c69f84a1875df235633",
        "env": "iXPath",
        "trkType": "IXUser"
      }
    ],
•	    "bot": [
      {
        "trkID": "63289920bd508344f9682d5f",
        "env": "iXPath",
        "trkType": "Category"
      }
    ]
  }
to get all trackings on top links : 
<xsl:value-of select="ixf:GetTrkLink('632061e5f8aef457701a28d3', 'Product', 'top')"></xsl:value-of>
to get all trackings on top links with tracking type equals to IXUser :
<xsl:value-of select="ixf:GetTrkLink('632061e5f8aef457701a28d3', 'Product', 'top', 'IXUser')"></xsl:value-of>