Skip to main content
Version: Any 26

Smart URLs

A smart URL is a stable link to a content of Any, built from the metadata of that content rather than from its internal identifier.

It answers the need to point to a document from the outside (an intranet, an email, a business application) without knowing its technical identifier, and without the link breaking when the document changes. The sending system usually knows a business reference (a contract number, a name, a status): it is that reference that is placed in the URL, and Any finds the matching content when the link is clicked.

Principle​

A smart URL is configured in two parts:

  • The Template declares the variable slots of the URL, called smart keys, as {key}. The template {name}/{status} accepts, for instance, a URL ending with contract-123/Approved.
  • The GQL Predicate describes the content to find, reusing those keys with the ${key} syntax.

When the link is opened, Any reads the values present in the URL, injects them into the predicate, then runs the search.

The predicate determines what the link stays attached to over time. To target a specific version of a document, use a metadata that identifies it uniquely, such as its identifier:

core.object_id = '${core.object_id}'

For the link to follow the versions of the document and always point to the most relevant one, combine business metadata. This predicate designates, for instance, the approved version of the document, whichever it is:

core.name = '${core.name}' and standard.status = '${standard.status}'

Refer to the GQL reference guide for more details.

To display the preview of a URL, click the wanted URL: it appears in the dedicated area at the top of the configuration table.

This section defines the behavior of the "copy to clipboard" menu offered on a selection of contents.

The Mode option disables the feature, or chooses whether the copied link downloads the content or locates it.

Criteria can be added, such as the expected status of the selected content. The full names of the aspect attributes must then be used.

  • Template: smart keys to use in the GQL predicate.
  • GQL Predicate: GQL predicate matching the wanted content.

Download URLs​

This URL displays the Any sign-in dialog box, then downloads the content.

  • Template: smart keys to use in the GQL predicate. For instance: {name}/{status}.
  • Format: wanted format, chosen in the drop-down list.
  • GQL Predicate: GQL predicate matching the wanted content. For instance: core.name = '${name}' and standard.status = '${status}'.

Selecting an item in the first column opens the menu to:

  • Change the order (move the value up or down)
  • Delete the item

Locate URLs​

This URL opens Any, displays the sign-in dialog box, then locates the content in the search section.

  • Template: smart keys to use in the GQL predicate. For instance: {name}/{status}.
  • GQL Predicate: GQL predicate matching the wanted content. For instance: core.name = '${name}' and standard.status = '${status}'.

Search URLs​

This URL opens Any, displays the sign-in dialog box, then runs a search. Unlike the previous ones, it does not target a single content but returns every matching content.

  • Template: smart keys to use as search terms. For instance: {name}/{status}.
  • Term: GQL search to run. For instance: core.name = '${name}' and standard.status = '${status}'.