Resolver code update - introducing template variables - 10 November 2020

34 views
Skip to first unread message

ni...@lansley.com

unread,
Nov 6, 2020, 1:22:47 PM11/6/20
to GS1 Digital Link Developers
Thanks to feedback from our triallists I am pleased to say that the next update to Resolver CE - scheduled for 10 November 2020 - adds the ability for you to add entries which use 'URI templates'.

For example, suppose your client wants to have a teddy bear product in Resolver, each with a unique serial number. They plan to make 10,000 bears and apply the GS1 Digital Link standard to have each bear's unique serial number in the Digital Link URI format.

Does that mean that they will have to upload 10,000 entries for the same product, especially as they share the same GTIN?

From 10 November, No!

Let's imagine our teddy bear has GTIN 05052004033992 and each has a unique serial number. The Digital Link for bear #1234 would be:
https://<resolver-domain-name>/gtin/0505200403399/ser/1234
and this would resolve to:
..where each bear owner might get a unique experience to their serial number. Perhaps they could name their bear, for example.

On the 10 November 2020 update, you would upload the data with this new 'variable' in the qualifiers column:
'/ser/{bearserial}'

...and in the targetUrl column you would enter:
..including a 'template variable' {bearserial}.

When Resolver receives ' https://<resolver-domain-name>/gtin/0505200403399/ser/1234' it will know to resolve to ' https://amazing-bears-domain.com?teddybearnumber=1234'.

The template variable consists of a short string of characters between two curly {} braces. Any short string of characters can be used, but the same string has to be found in both the 'qualifiers' and 'targetUrl' columns.

The qualifiers entry still has to conform to the Digital Link standard, but this means you can variables for all kinds of qualifiers. As GTIN has CPV, LOT and SER, you can have a variable for each of these qualifiers. For example:

'/cpv/{variant}/lot/{lotnumber}/ser/{bearserial}'
..and you are free to place these variable in any relevant part of the targetUrl as befits the requirements of the destination server. For (contrived) example:

That's all to arrive on 10th November update. Your existing SQL data is completely unchanged in the update, although you'll need to refresh all the data in Mongo - a task that is easily started with a simple refresh instruction - more instructions to come with the update itself.

See you Tuesday 10th November 2020 then for the update.

Cheers
Nick

..


Reply all
Reply to author
Forward
0 new messages