Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR for Release Version 1.x #298

Merged
merged 196 commits into from
Aug 4, 2022
Merged
Changes from 2 commits
Commits
Show all changes
196 commits
Select commit Hold shift + click to select a range
6e0f757
Added sample proposal
Dec 26, 2021
65df607
Renamed RFC file naming format
Dec 26, 2021
cbd8dfb
Update core.yaml
BLR-0118 Jan 20, 2022
9c53309
Update core.yaml
BLR-0118 Jan 21, 2022
d7f5cbf
Update core.yaml
BLR-0118 Jan 21, 2022
3232480
Update core.yaml
BLR-0118 Jan 21, 2022
3fe4c4c
Update core.yaml
BLR-0118 Jan 21, 2022
a2e822d
Update core.yaml
BLR-0118 Jan 21, 2022
83066f1
Create ERROR_CODES.md
BLR-0118 Jan 21, 2022
521df87
Delete ERROR_CODES.md
BLR-0118 Jan 21, 2022
a8e1e2d
Update core.yaml
BLR-0118 Jan 21, 2022
0973811
Create ERROR
BLR-0118 Jan 22, 2022
eb24af1
Rename ERROR to ERROR_CODES.md
BLR-0118 Jan 22, 2022
310a951
Create BECKN-RFC-005-Error-Codes-Draft-01.md
BLR-0118 Jan 25, 2022
bdb0780
Delete ERROR_CODES.md
BLR-0118 Jan 25, 2022
d0a1f4a
Update core.yaml
BLR-0118 Jan 25, 2022
4b9b458
Create BECKN-RFC-006-Signing-Beckn-APIs-In-HTTP-Draft-01.md
BLR-0118 Jan 25, 2022
4785893
Update BECKN-RFC-006-Signing-Beckn-APIs-In-HTTP-Draft-01.md
BLR-0118 Jan 25, 2022
59200ec
Update BECKN-RFC-006-Signing-Beckn-APIs-In-HTTP-Draft-01.md
BLR-0118 Jan 25, 2022
36e5f0f
Update BECKN-RFC-006-Signing-Beckn-APIs-In-HTTP-Draft-01.md
BLR-0118 Jan 25, 2022
76a2862
Merge pull request #210 from Open-network-for-digital-commerce/error-…
Jan 27, 2022
ce3ae98
Merge pull request #204 from Open-network-for-digital-commerce/paymen…
Jan 27, 2022
3a60828
Update BECKN-RFC-006-Signing-Beckn-APIs-In-HTTP-Draft-01.md
BLR-0118 Jan 28, 2022
248fb96
Update BECKN-RFC-006-Signing-Beckn-APIs-In-HTTP-Draft-01.md
BLR-0118 Jan 28, 2022
a585e53
Update BECKN-RFC-006-Signing-Beckn-APIs-In-HTTP-Draft-01.md
BLR-0118 Jan 28, 2022
edac76e
Update BECKN-RFC-006-Signing-Beckn-APIs-In-HTTP-Draft-01.md
BLR-0118 Jan 28, 2022
5d5d166
Update BECKN-RFC-006-Signing-Beckn-APIs-In-HTTP-Draft-01.md
BLR-0118 Jan 28, 2022
3b00d1a
Update BECKN-RFC-006-Signing-Beckn-APIs-In-HTTP-Draft-01.md
BLR-0118 Jan 28, 2022
f74e481
Update BECKN-RFC-006-Signing-Beckn-APIs-In-HTTP-Draft-01.md
BLR-0118 Jan 28, 2022
96b9031
Update BECKN-RFC-006-Signing-Beckn-APIs-In-HTTP-Draft-01.md
BLR-0118 Feb 4, 2022
13c5fe0
Update core.yaml
BLR-0118 Feb 6, 2022
7d341f8
Update BECKN-002-Payments-On-Beckn-Enabled-Networks.md
BLR-0118 Feb 14, 2022
eeb86b3
Update BECKN-002-Payments-On-Beckn-Enabled-Networks.md
BLR-0118 Feb 14, 2022
c64bfe6
Updated Item description.
techframewirk Feb 21, 2022
8406f83
Merge pull request #236 from techframewirk/update-item-desc
Feb 22, 2022
36a5a82
Merge pull request #233 from Open-network-for-digital-commerce/paymen…
Feb 22, 2022
4b82c4d
Merge pull request #225 from Open-network-for-digital-commerce/paymen…
Feb 22, 2022
e9a72d5
Merge pull request #206 from Open-network-for-digital-commerce/auth-h…
Feb 22, 2022
85ad70b
rfc-draft01
techframewirk Mar 10, 2022
a331dc1
Merge pull request #240 from techframewirk/rating-and-reputation-rfc
Mar 10, 2022
6085821
Merge remote-tracking branch 'origin/core-0.9.4-draft' into draft
Mar 10, 2022
f1b5b35
Updated descriptions of schema level objects
techframewirk Mar 22, 2022
843aabe
more descriptions
techframewirk Mar 24, 2022
56fb538
Format issue resolved with the id property of Item schema
AyushAgrawal25 Mar 25, 2022
38b71f0
updated item and order
techframewirk Mar 28, 2022
2e7aa90
Review comments from Pramod
techframewirk Apr 2, 2022
9f16c0d
Added rating communication sequence
Apr 21, 2022
88997d6
Added rating flow sequence diagram
Apr 21, 2022
ed0d85c
Merge pull request #244 from AyushAgrawal25/draft
May 5, 2022
db4495a
Merge pull request #242 from techframewirk/object-definitions
Aug 3, 2022
88e2c26
Update README.md
Mar 31, 2022
4845a8a
Update README.md
Mar 31, 2022
fec401d
Added link to community guidelines
techframewirk Apr 5, 2022
044271a
removed space
Jul 18, 2022
31839bc
Added full address string
Jul 18, 2022
3078ead
Added space
Jul 18, 2022
95c4611
Added jcard field in contact
Jul 18, 2022
5c9b83f
Added Organization schema
Jul 18, 2022
715c5d4
Removed format restrictions on Name schema
Jul 18, 2022
c2a6d5a
Added space
Jul 18, 2022
1c7811b
Fixed order object
Jul 19, 2022
58975d1
Added Feedback Form
Jul 19, 2022
7b09467
Removed ProxyAuth header
Jul 19, 2022
21598b2
Added / removed unnecessary spaces
Jul 19, 2022
72cc4e3
Removed required fields
Jul 19, 2022
99fb5da
added CargoItem schema
Jul 19, 2022
916c9ec
added WIP Verifiable Credential schema
Jul 19, 2022
1792eb0
Added video as a property in descriptor
Jul 19, 2022
e6fc24c
Added Item Quantity as a property of Item
Jul 19, 2022
36e3ff9
Added payment_id to Item to reference Payment terms
Jul 19, 2022
46e9f5e
Updated Order object
Jul 19, 2022
1c3ab14
Removed Old Organization schema
Jul 19, 2022
705f3bb
Added payload schema
Jul 19, 2022
9e27bee
Removed tl_method property from Payment
Jul 19, 2022
c802e94
Added bank related params and vpas in Payment schema
Jul 19, 2022
6d9db93
Added id to person schema
Jul 19, 2022
6f8bb9b
Added credentials in Person schema
Jul 19, 2022
cba04a0
Added feedback url as a response to a rating call
Jul 19, 2022
517528f
Updated Scalar schema fields to DecimalValue
Jul 19, 2022
8eb7775
Added cancellation terms
Jul 19, 2022
6d73306
Added order update terms
Jul 19, 2022
1463cb9
Added order update terms
Jul 19, 2022
dbc28b8
Added cancellation, update, return and replacement terms in Order schema
Jul 19, 2022
d5c9678
Updated version number to 1.0.0-draft
Jul 19, 2022
91b1cd2
Removed gateway subscriber auth
Jul 19, 2022
4134f6c
Bug fixes in openapi file
Jul 19, 2022
effeda2
Schema fixes
venkatramanm Jul 21, 2022
9e9f316
Removed merge conflicts
Aug 3, 2022
99aff62
Merge pull request #296 from beckn/ecosystem-fixes
Aug 3, 2022
c8df9f8
Added default reponse codes instead of 200, removed format:uri in bap_id
Aug 3, 2022
0ce527b
Added media files as a property in Descriptor
Aug 3, 2022
b10adfd
Added descriptions to ItemQuantity properties
Aug 3, 2022
e88dc0a
Added unitized quantity to ItemQuantity to represent quntity availabl…
Aug 3, 2022
e2c531f
Added mediafile type
Aug 3, 2022
d0cc033
Added double quotes instead of signle quotes in certain places
Aug 3, 2022
5e1bec8
Added external refs in cancellation terms
Aug 3, 2022
3a14dec
Added confirmation terms
Aug 3, 2022
f862c02
Generalized FeedbackForm to Form
Aug 3, 2022
dac5c74
Removed feedback form url object
Aug 3, 2022
868563a
Added manufacturer property to item
Aug 3, 2022
0d3e4be
Added terms to item and order
Aug 3, 2022
0de4246
Added refund terms
Aug 3, 2022
186d7ca
Added id and description
Aug 3, 2022
bbf3374
Merge pull request #297 from beckn/ecosystem-fixes
Aug 3, 2022
7f3faec
Added sample proposal
Dec 26, 2021
52469f0
Renamed RFC file naming format
Dec 26, 2021
c920153
Update core.yaml
BLR-0118 Jan 20, 2022
8de94a1
Update core.yaml
BLR-0118 Jan 21, 2022
8f629f7
Update core.yaml
BLR-0118 Jan 21, 2022
ae13c72
Update core.yaml
BLR-0118 Jan 21, 2022
732d453
Update core.yaml
BLR-0118 Jan 21, 2022
bc916bf
Update core.yaml
BLR-0118 Jan 21, 2022
36c7a19
Create ERROR_CODES.md
BLR-0118 Jan 21, 2022
2cd564a
Delete ERROR_CODES.md
BLR-0118 Jan 21, 2022
1432a6a
Update core.yaml
BLR-0118 Jan 21, 2022
dce702a
Create ERROR
BLR-0118 Jan 22, 2022
452d1b2
Rename ERROR to ERROR_CODES.md
BLR-0118 Jan 22, 2022
813e438
Create BECKN-RFC-005-Error-Codes-Draft-01.md
BLR-0118 Jan 25, 2022
e5c7147
Delete ERROR_CODES.md
BLR-0118 Jan 25, 2022
30a2fea
Update core.yaml
BLR-0118 Jan 25, 2022
4f047dc
Create BECKN-RFC-006-Signing-Beckn-APIs-In-HTTP-Draft-01.md
BLR-0118 Jan 25, 2022
e287d9f
Update BECKN-RFC-006-Signing-Beckn-APIs-In-HTTP-Draft-01.md
BLR-0118 Jan 25, 2022
628eb7f
Update BECKN-RFC-006-Signing-Beckn-APIs-In-HTTP-Draft-01.md
BLR-0118 Jan 25, 2022
c53557e
Update BECKN-RFC-006-Signing-Beckn-APIs-In-HTTP-Draft-01.md
BLR-0118 Jan 25, 2022
bcf0601
Update BECKN-RFC-006-Signing-Beckn-APIs-In-HTTP-Draft-01.md
BLR-0118 Jan 28, 2022
a59bf3d
Update BECKN-RFC-006-Signing-Beckn-APIs-In-HTTP-Draft-01.md
BLR-0118 Jan 28, 2022
73ca0a0
Update BECKN-RFC-006-Signing-Beckn-APIs-In-HTTP-Draft-01.md
BLR-0118 Jan 28, 2022
9202e17
Update BECKN-RFC-006-Signing-Beckn-APIs-In-HTTP-Draft-01.md
BLR-0118 Jan 28, 2022
922754a
Update BECKN-RFC-006-Signing-Beckn-APIs-In-HTTP-Draft-01.md
BLR-0118 Jan 28, 2022
8d58f93
Update BECKN-RFC-006-Signing-Beckn-APIs-In-HTTP-Draft-01.md
BLR-0118 Jan 28, 2022
3dd0895
Update BECKN-RFC-006-Signing-Beckn-APIs-In-HTTP-Draft-01.md
BLR-0118 Jan 28, 2022
79a6c29
Update BECKN-RFC-006-Signing-Beckn-APIs-In-HTTP-Draft-01.md
BLR-0118 Feb 4, 2022
f6fcd96
Update core.yaml
BLR-0118 Feb 6, 2022
b3114f0
Update BECKN-002-Payments-On-Beckn-Enabled-Networks.md
BLR-0118 Feb 14, 2022
3abcc4b
Update BECKN-002-Payments-On-Beckn-Enabled-Networks.md
BLR-0118 Feb 14, 2022
6856273
Updated Item description.
techframewirk Feb 21, 2022
14daa42
rfc-draft01
techframewirk Mar 10, 2022
9a08b26
Updated descriptions of schema level objects
techframewirk Mar 22, 2022
338039f
more descriptions
techframewirk Mar 24, 2022
3946435
Format issue resolved with the id property of Item schema
AyushAgrawal25 Mar 25, 2022
c3b7597
updated item and order
techframewirk Mar 28, 2022
c8b83f3
Review comments from Pramod
techframewirk Apr 2, 2022
089a4d7
Added rating communication sequence
Apr 21, 2022
63b8c47
Added rating flow sequence diagram
Apr 21, 2022
a3b6af7
removed space
Jul 18, 2022
84943d1
Added full address string
Jul 18, 2022
fbd692c
Added space
Jul 18, 2022
1c0b6f8
Added jcard field in contact
Jul 18, 2022
6bbc9e7
Added Organization schema
Jul 18, 2022
18f5fd7
Removed format restrictions on Name schema
Jul 18, 2022
4c544a9
Added space
Jul 18, 2022
e7dc3a3
Fixed order object
Jul 19, 2022
9f93baf
Added Feedback Form
Jul 19, 2022
fd3c07a
Removed ProxyAuth header
Jul 19, 2022
652763c
Added / removed unnecessary spaces
Jul 19, 2022
3fd7cd2
Removed required fields
Jul 19, 2022
b52b864
added CargoItem schema
Jul 19, 2022
ef9c400
added WIP Verifiable Credential schema
Jul 19, 2022
823344e
Added video as a property in descriptor
Jul 19, 2022
c121666
Added Item Quantity as a property of Item
Jul 19, 2022
7e8eb66
Added payment_id to Item to reference Payment terms
Jul 19, 2022
01644a2
Updated Order object
Jul 19, 2022
5c1bf7c
Removed Old Organization schema
Jul 19, 2022
d6ae425
Added payload schema
Jul 19, 2022
5d91fa4
Removed tl_method property from Payment
Jul 19, 2022
f6d209a
Added bank related params and vpas in Payment schema
Jul 19, 2022
282681a
Added id to person schema
Jul 19, 2022
0d8f3db
Added credentials in Person schema
Jul 19, 2022
a388b80
Added feedback url as a response to a rating call
Jul 19, 2022
95282e5
Updated Scalar schema fields to DecimalValue
Jul 19, 2022
337358e
Added cancellation terms
Jul 19, 2022
4e6b867
Added order update terms
Jul 19, 2022
941f027
Added order update terms
Jul 19, 2022
ff30bcb
Added cancellation, update, return and replacement terms in Order schema
Jul 19, 2022
2e7c88b
Updated version number to 1.0.0-draft
Jul 19, 2022
1e67155
Removed gateway subscriber auth
Jul 19, 2022
3c40fbd
Bug fixes in openapi file
Jul 19, 2022
8021ccd
Schema fixes
venkatramanm Jul 21, 2022
4050570
Removed merge conflicts
Aug 3, 2022
249e9a6
Added default reponse codes instead of 200, removed format:uri in bap_id
Aug 3, 2022
0413f6d
Added media files as a property in Descriptor
Aug 3, 2022
500b745
Added descriptions to ItemQuantity properties
Aug 3, 2022
fd4f9e6
Added unitized quantity to ItemQuantity to represent quntity availabl…
Aug 3, 2022
7b89d39
Added mediafile type
Aug 3, 2022
f3a9615
Added double quotes instead of signle quotes in certain places
Aug 3, 2022
5dd9016
Added external refs in cancellation terms
Aug 3, 2022
04030cc
Added confirmation terms
Aug 3, 2022
edb5ec5
Generalized FeedbackForm to Form
Aug 3, 2022
8f48d7c
Removed feedback form url object
Aug 3, 2022
5ad48ab
Added manufacturer property to item
Aug 3, 2022
e7c16ef
Added terms to item and order
Aug 3, 2022
cd05e60
Added refund terms
Aug 3, 2022
b682252
Added id and description
Aug 3, 2022
b58943a
Merge branch 'release-1.x' into draft
Aug 3, 2022
fe8a8b7
Fix
Aug 4, 2022
8c0f06b
Fix
Aug 4, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
163 changes: 163 additions & 0 deletions docs/proposals/BECKN-RFC-Rating and Reputation on Beckn Protocol.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
# Rating and Reputation on Beckn Protocol

*Draft 01*

Author:
=======

Ravi Prakash (ravi@becknfoundation.org)

Scope
=====

This document is intended for anyone wishing to design a Rating and Reputation system for beckn protocol enabled Open Networks. This specification is agnostic of any implementation technology but contains examples of run-time JSON objects for the sake of clarity. 

Context
=======

Customers expect quality in any products and services they have bought. To ensure such quality is maintained, providers usually expect their customers to rate their services and products based on how satisfied they are with the product consumed or service rendered. Most e-commerce systems nowadays implement an online rating system that allows their users to rate the products and services bought on that platform.

Platforms selling physical products usually allow their users to rate the quality of their products and sometimes, the delivery. Business aggregators allow their users to also rate businesses as a whole. Businesses allow their customers to rate the customer support they received. There are many more such entities that can be rated based on the customer's level of satisfaction.

Typically, a rating system allows the consumer to provide a rating value from 1 to 5 where 1 represents lowest quality of service and 5 represents the highest quality of service. In some cases, fractional ratings are also used for further granularity; and in other cases non-numeric values like "Good" or "Bad''; and Ratings from 1 to 10 are also used. The rating value of a particular product or service is typically made visible to the public. A rating system is expected to be fair and transparent to its users, both customers and providers.

In the case of beckn protocol, many such platforms connect to each other via beckn and thus present a new challenge of managing rating and reputation on a decentralized network. (Talk about the challenge presented) due to open commerce networks and the purpose of this document.

For platforms connected to each other in an open commerce network, an interoperable and shared rating and reputation system must be implemented that allows users to rate various entities on the network. The rating system must adhere to the following design principles

1. Non-repudiability

2. Privacy protected

3. Cross-platform compatibility

Abstract
========

This document defines design specifications to create an interoperable, secure and non-repudiable system for managing Rating and Reputation of various physical and virtual entities on beckn-enabled Open Commerce Networks. It describes the various roles involved in the system and their respective functions. It also describes the format in which rating must be transmitted and stored on the network. There are multiple approaches to design a system, each approach has its advantages and limitations.

Terminology
===========

1. **Rating Category**: For example: Agent, Fulfillment, Provider

2. **Rateable Object**: The runtime object of a Rating Category that can be rated

3. **Rating Sender**: The actor that rates a Rateable Object

4. **Rating Receiver**: The actor that receives the rating for a Rateable Object

Problem
=======

How to ensure that the customers receive quality services rendered from different providers on an open network?

Forces
======

1. Same Rateable Objects may exist on more than one BPP under different names

Expected Outcomes after reading this document
=============================================

After reading this document, the reader should be able to

1. Understand how ratings work on Open Commerce Networks enabled by beckn protocol

2. Understand how to connect their platforms to the Rating and Reputation system on open commerce networks. 

Rating using Beckn Protocol
===========================

In beckn, **rating** is done via the rating action. This action allows any NP to rate a Rateable Object of another NP according to the rating policy of the NP. The rating policy of an NP defines,

1. What can be rated

2. How to rate

Communication Protocol for Rating
---------------------------------

### Rating Policy Handshake

Before a NP rates another NP's service, an agreement must be reached between both NPs regarding the rating policy. The agreement is done via the Rating Policy agreement handshake. The sequence of messages to be exchanged in this handshake is shown below.

1. The Rating Sender should call the **get_rating_categories** action on the Rating Receiver's protocol API.

2. The Rating receiver must immediately respond with an ACK. 

3. The Rating Receiver should then send back a list of Rating Categories by calling the **rating_categories** callback action on the Rating Sender's protocol API. The **rating_categories** message should contain the following information

1. Name of the Rateable Category. This name should be the same as the name of the Schema from Core Specification. For example, "Agent", or "Provider"

2. The equivalent real-world name of the Schema. For example,
`{ "Agent" : "Delivery Rider" }`

3. The rating conditions that must be fulfilled before rating that object. Meaning, the message must contain attributes that must be set and what their expected values must be before rating that Object. The attributes must be in the form of a runtime schema path.  For example,
`{ "conditions" : [ { "order.id" : "true", "fulfillment.status" : "COMPLETE"}, { x : y}  ] }`

4. The rating conditions must be an array where a single element of that array represents all the conditions that must be fulfilled simultaneously. (AND function). 

5. The OR conditions are expressed as the separation between individual elements of the array. Example needed. 

6. Post-rating effects such as links to feedback forms

1. Feedback_form_url

2. Callbacks

3. ...

7. Rating level type 

4. The Rating sender must respond with an ACK.

The Rating Sender must design their business logic to accept rating from the user only when the Rating Receiver's rating conditions are matched during a transaction.

### Rating Call

Once the rating handshake is complete, the Rating should happen via the following process.

1. The Rating Sender should call the rating action on the Rating Receiver's API. The rating message should contain the following information as key/value pairs

1. The name of the Rating Category: "rating_category" : "Agent"

2. The UUID of the Rateable Object: "id" : "2324-35454-2324"

3. The rating value: "value" : "4"

4. Additional data collected via the feedback form (if required)* 

3. The Rating Receiver must send an ACK

4. The Rating Receiver must call the on_rating action on the Rating Sender's API. the message must contain any additional information that may be required after the rating is complete. (Requires further elaboration)

Rating Ledger Architecture
==========================

The Rating Ledger is a table containing records with the following fields. This table can be implemented on a centralized database or a decentralized database like a blockchain.

|Attribute|Description|Example|
|---------|-----------|-------|
|id|Primary key |`<Some UUID>`|
|rateable_object_id|This is a UUID generated by the BPP that is mapped against a unique ID.||
|total_rating_value|Total Rating Value|4350|
|total_rating_count|Total number of ratings|1000|

This table can be accessed by implementing the same rating action on its API. It is capable of receiving bulk rating information and publishing the information for all network participants to view without revealing confidential information regarding a rateable entity.

When a Rating Sender wants to rate a Rateable Object, it must first call the rating action on the Rating Receiver's API.

At the end of a periodic cycle, say at the end of every day, the Rating Sender must send all the ratings done for the day in bulk.

The Rating Ledger should compute the cumulative rating value of the Rateable Object by adding the sent value to the last calculated value and updating the record of that rateable object.

When a Rating Sender wants to verify the rating of a Rateable Entity, it should call the lookup action on the Rating Ledger's API by sending the id of the Rateable Entity. This requires the Rateable Entity's ID and it's average rating to be sent in the catalog during the on_search action.

To verify the rating of a Rateable Object in the catalog, the Rating Sender must calculate the average rating by dividing the total_rating_value with the total_rating_count.

`Average Rating Value = total_rating_value / total_rating_count`

If this value matches the rating value sent in the catalog, then the rating is accurate. A margin of error may be introduced in the Network Rating Policy  specifying the number of significant digits to be used while comparing the average rating with the received rating.

If the rating value does not match or is not within the margin of error, then the Rating Sender should report the error to the Network Facilitator.