Tags : The edge of beckn | CWG Working Draft #316
ravi-prakash-v
started this conversation in
Core Specification
Replies: 1 comment
-
|
@core-wg-admin Have we defined, how multi-language catalogs will be published? For e.g. A BPP have product catalog in multiple languages (English, Hindi, Telugu, Gujrati etc). If needed, I may post this question altogether in a new thread. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Document Details
Supported Protocol Version
TODO
This version
TODO
Latest published version
TODO
Latest editor's draft
TODO
Stress Test report
TODO
Implementation report
TODO
Editors
Ravi Prakash (Beckn Foundation)
Authors
Ravi Prakash (Beckn Foundation)
Feedback
Issues: TODO
Discussions : TODO
PRs : TODO
Errata
No Errata exists as of now
Context
Beckn protocol is a generic transaction protocol that allows any producer and consumer to interact and perform digitally signed transactions via a standard set of APIs. The schema of beckn has been abstracted to a level that allows any real-world entity to be represented as a generic object.
Fundamentally, all transactions are the same according to beckn protocol. But practically, things are somewhat different. Sometimes, interacting entities (a.k.a Network Participants) need to send additional information related to various real-world entities to comply with policies and conventions governing the domain, network or the region of operation. Strictly speaking, this information may not be necessary to perform a transaction, but to allow an element of trust and convenience to be associated with a transaction.
A retailer selling fast moving consumer goods might be legally obligated to send nutritional information, manufacturer details, food certification details, and other relevant information related to the products they are selling. On the other hand, consumers might want to narrow their search by sending specific information about the product they want.
A car rental provider might want to send additional information on the make, model, variant, and other features of a car that might be useful to the customer to make a decision. It is also useful to the provider to provide faster and better search results if this additional information was sent by the customer while searching for the right car to rent.
Similarly, a hospitality service provider may want to transmit additional information related to a room like AC/Non-AC, WiFi availability, Breakfast included, etc to allow the customer to choose the right room for themselves.
As you can see from the above examples, the above information is not strictly necessary for an order to be created. But rather as metadata for display purposes, grouping, and filtering at the consumer’s end; and for enabling search optimization at the provider’s end.
Problem
How to transmit extended metadata related to a transaction in beckn protocol without breaking interoperability across implementations.
Solution
Beckn protocol defines three schemas, namely, Tags, TagGroup and Tag, that allow groups of key-value pairs to be transmitted between network participants as metadata. Let us look at them in more detail.
The Tags schema
The Tags schema is an array of TagGroup objects. This contains all the extended metadata about the container object. The schema is represented below
The Tags schema is explicitly referenced in the following schemas.
However, this can be added to any schema to carry extended metadata under the reserved keyname “tags”.
The TagGroup Schema
The TagGroup schema defines a key-value set that can be listed under a common heading. Examples of key-value sets are Nutritional Information, Technical Specifications, Manufacturer Information, etc. Each of these headings contain a set of key-value pairs that contain additional metadata specific to that heading. For example, the Tag Group named “Nutritional Content” might contain a key-value set containing kcal = 100, carbohydrates = 11g, protein = 0.2g, fat = 0.11g, etc. Similarly, a Tag group named “Technical Specifications” for a mobile phone product may contain a key-value set containing RAM = 12GB, Display Size = 6.5in, Weight = 128g, Processor = Snapdragon 855, and so on.
The TagGroup schema is represented as shown below,
As you can see, the TagGroup is of type “object” contains four properties,
The Tag Schema
The tag schema contains a key-value pair containing the actual extended metadata to be communicated.
The Tag schema is shown below.
As you can see, the Tag schema has the following properties
The Tag schema is referenced in the TagGroup schema in its property - “list”.
Recommendations
This section contains recommendations for entities using the Tag schema.
For BPPs
For BAPs
For Network Facilitators
For Domain-specific Working Groups
Reserved Keywords
Beckn protocol reserves some values for the “key” property of the Tag schema. These values are
Recommendations
For BPPs
For BAPs
For Network Facilitators
Concrete Examples
Example 1: A retail domain-specific working group wants to publish a set of standard tags for various categories of product.
TODO
Example 2: A network facilitator with domain as examplenetwork.org wanted to mandate a retail-specific tag called country_of_mfg (Country of manufacture) to be sent as part of the Item. The network facilitator’s domain name is mynetwork.org. The following fields are mandated to be shown whenever packaged goods are being sold.
TODO
It will first check with the tag list maintained by the local retail working group. If it finds the tag listed, it will simply publish that tag with a link to the source tag list. If it doesn’t find the desired tag listed, it will simply namespace and publish it as @examplenetwork/org/country_of_origin
Example 3: A packaged food product needs to be sent in response to a search request. The network policy states that product information displayed on a BAP app must be in compliance with the statutory laws of the region.
For example, if the FQDN of a network facilitator is mynetwork.org, and the key name is “fssai_license_number” then the namespace will be equal to “@mynetwork.org/fssai_license_number”.
Example 4: Searching for teleconsulatation services by providing symptoms and language as hindi
TODO
Acknowledgements
The author would like to thank the following people for their support and contributions to this document.
Beta Was this translation helpful? Give feedback.
All reactions