How to join tags

THRON Semantic Engine extracts concepts from your content in a general way, sometimes your business just doesn’t need that level of detail. Sometimes you just want to tell THRON that a group of tags refer to a single concept which is relevant for your taxonomy. This is what joining tags is about: it allows you to train THRON to apply tags by referring only to those concepts you care about. It can also be very useful when restructuring tag trees, when you want to simplify tag trees and group tags together.

The operation of joining two tags together has two different declinations:

  • Combine: from the moment you combine two (or more) tags together, they will begin to exist as a whole which is called combination: visits made on content associated to any tag of the combination will be taken into account for each other tag. This operation can be reverted at any time through a divide operation.

Let's make an example: let's suppose you have a "Bags" tag, which is a relevant concept for your business, and then you have other related tags, maybe extracted by the semantic engine, which are not strictly relevant for your business, and can refer to the main concept "Bags":

tagsbags.png

In this case you can decide to combine the tags into the "Bags" tag in order to consider the whole visits on each single tag as visits on the "Bags" concept. 

combined.png

  • Merge: by merging combined tags they will form a single tag.  This operation can not be reverted. You can extract a merged tag: this will re-create a tag by retrieving its label, prettyId (if still available), linked metadata and selected externalIds.

 

Combine & Divide

Web service that must be used in order to combine two or more tags together is combine which is included in the itagdefinition package of xintelligence.

 

Requirements

This web service can be invoked only by those users/applications with the permission to manage the specific classification. It allows you to combine a "source" tag into a "target" one; ExternalIds, linked metadata, and ids are combined into the target tag. After a combine operation the target tag can not be updated. There are some constraints in order to perform the operation:

  • the "source" tag must be in status "APPROVED" (they cannot be in a "COMBINED" state).
  • "source" tags with children can not be combined.
  • organized tags can not be combined into non-organized tags.
  • "source" and "target" must belong to the same classification.

 

Create a tags combination

 

The url of the web service is structured as follows:

//[clientId]-view.thron.com/api/xintelligence/resources/itagdefinition/combine/[clientId]/[classificationId]

Where:

  • clientId: it is the domain name used to access THRON, usually your company name.
  • classificationId: it is the ID of the classification to which the tags to be combined belong.

Parameters that must be included within the body of the request are:

  • targetId: target ITagdefinition id, prettyId or externalId.
  • sourceId: source ITagdefinition id, prettyId or externalId.

 

Revert a tags combination

 

Web service that must be used in order to revert a tag combination is divide, which can be found in the itagdefinition package of xintelligence. Combined tag will recover its id, prettyId, linked metadata and ExternalIds. Constraints are:

  • source tag must be in "combined" status.
  • the combined tag, after the divide operation will have the same parent of the target tag.

 

The URL of the web service is structured as follows:

//[clientId]-view.thron.com/api/xintelligence/resources/itagdefinition/divide/[clientId]/[classificationId]

Where:

  • clientId: it is the domain name used to access THRON, usually your company name.
  • classificationId: it is the ID of the classification to which the tags to be devided belong.

Parameters that must be included within the body of the request are:

  • targetId: target ITagdefinition id, prettyId or externalId.
  • combinedId: Tagdefinition id, prettyId or externalId of the tag to be divided.

 

Merge & Extract

Web service that must be used in order to merge two or more combined tags together is merge which is included in the itagdefinition package of xintelligence.

 

 

Requirements

 

This web service can be invoked only by those users/applications with the permission to manage the specific classification. It allows you to merge "source" tags into a "target" one; the service moves linked metadata and externalIds from the combined tags to the target. After the merge process, the user can only extract the tags. The prettyId and names of the combined tags are not merged into the target. There are some constraints in order to perform the operation:

  • the "source" tags must be in status "COMBINED".
  • all references to combined tags (on Contents/Contacts/Users) will be replaced by the target tag.

 

Merge tags

 

The url of the web service is structured as follows:

//[clientId]-view.thron.com/api/xintelligence/resources/itagdefinition/merge/[clientId]/[classificationId]

Where:

  • clientId: it is the domain name used to access THRON, usually your company name.
  • classificationId: it is the ID of the classification to which the tags to be combined belong.

Parameters that must be included within the body of the request are:

  • targetId: target ITagdefinition id, prettyId or externalId.
  • combinedIdList: an array of combined Itagdefinition id to be merged into the target tag.

 

This is a sample JSON which can be pasted in the body of the request, filling required parameters:

{
    "targetId": "",
    "combinedIdList": {
        "ids": [
            ""
        ]
    }
}

 

Extract a merged tag

The extract operation allows you to retrieve a merged ITagDefinition from a target tag. Information that will be restored are:

  • prettyId (if still available)
  • linked metadata
  • names
  • some selected externalIds taken from the source tag

No previous link to content/contact will be restored. The tag will be restored within the same parent tag of the target (if the tag tree is not full), otherwise it will be moved at the root level. The source tag must be in "MERGED" status.

The url of the web service is structured as follows:

//[clientId]-view.thron.com/api/xintelligence/resources/itagdefinition/extract/[clientId]/[classificationId]

Where:

  • clientId: it is the domain name used to access THRON, usually your company name.
  • classificationId: it is the ID of the classification to which the tags to be combined belong.

Parameters that must be included within the body of the request are:

  • targetId: target ITagdefinition id, prettyId or externalId.
  • mergedId: the Itagdefinition id to be extracted from the target tag.

 

 

Was this article helpful?
0 out of 0 found this helpful

Have any question?

Open a ticket
Comments