Skip to content

Commit

Permalink
EUSR V1.1.0 merged to main
Browse files Browse the repository at this point in the history
  • Loading branch information
yerlibilgin committed Jun 30, 2023
2 parents 5c49a91 + 3e17cb4 commit 989ae3a
Show file tree
Hide file tree
Showing 90 changed files with 2,018 additions and 303 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@ generated/
~$*
# Ignore local scripts (starting with a dot)
.*.sh
Gemfile
./Gemfile
./Gemfile.lock
Gemfile.lock
2 changes: 1 addition & 1 deletion src/eusr/docs/bis/doc-section/1intro/namespaces.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ arbitrary and not semantically significant.
|Namespace URI

|eusr
|`urn:fdc:peppol:end-user-statistics-report:1.0`
|`urn:fdc:peppol:end-user-statistics-report:1.1`
|====
2 changes: 1 addition & 1 deletion src/eusr/docs/bis/doc-section/2busproc/parties.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Each SP will:

* Collect relevant data, taking care of the accuracy and validity of this data.
* Report this data in accordance to this document in a standardized and structured dataset.
* Ensure all data for a Reporting Period is reported within 10 calendar days following the end of the Reporting Period.
* Ensure all data for a Reporting Period is reported within the Statistics Report Submitting Period following the end of the Reporting Period.
Note: the Reporting Period is defined by the PCA in a separate document.
* Transmit the Peppol End User Statistics Reporting document to the PCA in accordance with this specification.

Expand Down
16 changes: 7 additions & 9 deletions src/eusr/docs/bis/doc-section/2busproc/process.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ image::./images/eusr-process-view.png[]
*** Number of End Users that have received a Dataset
*** Number of End Users that have sent or received a Dataset
*** Peppol Dataset Type (Document Type ID) and Profile ID (Process ID)
*** End Users Country Code
** Only Dataset exchanges that resulted in a positive transport level
acknowledgment (like AS4 Receipts) MUST be included in the End User Statistics Report.
Transmissions that failed on a network or protocol level MUST NOT to be considered for the report.
** End User Statistics Reports MUST NOT be counted for an End User Statistics Report.
** Transaction Statistics Reports MUST NOT be counted for an End User Statistics Report.
** Only the sending SP MUST count the message as 'outgoing' and only the receiving SP MUST count the same message as 'incoming'.

NOTE: If the same End User is represented with multiple Participant Identifiers, the data needs to be gathered per End User and NOT per Participant Identifier.

Expand All @@ -38,21 +38,19 @@ NOTE: If the same End User is represented with multiple Participant Identifiers,
Before the End User Statistics Report data is transmitted to OpenPeppol it needs to be prepared for subsets.
The preparation can be performed on any of the above-mentioned data elements defined by the Internal Regulations.

The following subsets MUST be prepared to be compliant with this specification.
IF there are end users who have sent / received transactions within the reporting period, then the following
subsets MUST be prepared to be compliant with this specification.

* Dataset Type ID (Document Type ID) and End Users Country
* End Users Country
* Dataset Type ID (Document Type ID) and Process ID

The following subsets MUST be provided for **receiving end users only** to be compliant to this specification:

* Dataset Type ID (Document Type ID) and Process ID, Country of sender and Country of receiver^*^

NOTE: ^*^ The Country of sender and receiver will be mandatory, once the backing eDEC specifications become mandatory
* Dataset Type ID (Document Type ID) and Process ID and End Users Country

== Data Transmission

* Frequency
** An End User Statistics Report MUST be transmitted once per Reporting Period.
** An End User Statistics Report MUST be transmitted within 10 calendar days (inclusive) after the end of the previous Reporting Period.
** An End User Statistics Report MUST be transmitted within the Statistics Report Submitting Period, which is defined external to this document, after the end of the previous Reporting Period.
** The End User Statistics Report MUST be transmitted, even if no other Peppol transactions happened in the Reporting Period.
** In case the End User Statistics Report of one Service Provider is received multiple times for one Reporting Period, only the latest received document will be processed.
** End User Statistics Reports received after the deadline WILL NOT be processed.
Expand Down
2 changes: 1 addition & 1 deletion src/eusr/docs/bis/doc-section/3syntax/fullset.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Each shape represents a group of end users.
The Full Set is comprised from the outer green and blue shapes.
The overlapping part of green and blue indicate the end users that did send *and* receive.
The orange shape indicates the subset of end users that deals with invoices - this effects both sending and receiving end users.
The inner yellow shape indicates the subset of end users that deals with invoices from Finland (FI) to Germany (DE) and hence is a subset of the orange shape.
The inner yellow indicates the subset of End Users that deals with invoices from/to Finland (FI) and hence is a subset of the orange shape.

image::./images/eusr-venn.png[]

Expand Down
52 changes: 40 additions & 12 deletions src/eusr/docs/bis/doc-section/3syntax/snippet/snippet-1.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<eusr:EndUserStatisticsReport xmlns:eusr="urn:fdc:peppol:end-user-statistics-report:1.0">
<eusr:CustomizationID>urn:fdc:peppol.eu:edec:trns:end-user-statistics-report:1.0</eusr:CustomizationID>
<eusr:EndUserStatisticsReport xmlns:eusr="urn:fdc:peppol:end-user-statistics-report:1.1">
<eusr:CustomizationID>urn:fdc:peppol.eu:edec:trns:end-user-statistics-report:1.1</eusr:CustomizationID>
<eusr:ProfileID>urn:fdc:peppol.eu:edec:bis:reporting:1.0</eusr:ProfileID>

<!-- tag::Header[] -->
Expand All @@ -25,28 +25,56 @@
</eusr:FullSet>
<!-- end::FullSet[] -->

<!-- tag::SubsetPerEUC[] -->
<eusr:Subset type="PerEUC">
<eusr:Key metaSchemeID="CC" schemeID="EndUserCountry">PT</eusr:Key>
<!-- How many distinct end users from PT received transactions -->
<eusr:SendingEndUsers>12</eusr:SendingEndUsers>
<!-- How many distinct end users from PT sent transactions -->
<eusr:ReceivingEndUsers>23</eusr:ReceivingEndUsers>
<!-- How many distinct end users from PT were involved in transactions (sent or received) -->
<eusr:SendingOrReceivingEndUsers>26</eusr:SendingOrReceivingEndUsers>
</eusr:Subset>
<!-- end::SubsetPerEUC[] -->

<!-- tag::SubsetPerDT-EUC[] -->
<Subset type="PerDT-EUC">
<Key metaSchemeID="DT" schemeID="busdox-docid-qns">urn:oasis:names:specification:ubl:schema:xsd:Invoice-2::Invoice##urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0::2.1</Key>
<Key metaSchemeID="CC" schemeID="EndUserCountry">PT</Key>
<!-- How many distinct end users from PT received transactions for dataset ...eu:2017:poacc:billing:3.0::2.1 -->
<SendingEndUsers>5</SendingEndUsers>
<!-- How many distinct end users from PT sent transactions for dataset ...eu:2017:poacc:billing:3.0::2.1 -->
<ReceivingEndUsers>2</ReceivingEndUsers>
<!-- How many distinct end users from PT were involved in transactions (sent or received) for dataset ...eu:2017:poacc:billing:3.0::2.1 -->
<SendingOrReceivingEndUsers>6</SendingOrReceivingEndUsers>
</Subset>
<!-- end::SubsetPerDT-EUC[] -->

<!-- tag::SubsetPerDT-PR[] -->
<eusr:Subset type="PerDT-PR">
<eusr:Key metaSchemeID="DT" schemeID="busdox-docid-qns">urn:oasis:names:specification:ubl:schema:xsd:Invoice-2::Invoice##urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0::2.1</eusr:Key>
<eusr:Key metaSchemeID="PR" schemeID="cenbii-procid-ubl">urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</eusr:Key>
<!-- How many distinct end users sent transactions containing the above dataset type and process id -->
<eusr:SendingEndUsers>4</eusr:SendingEndUsers>
<!-- How many distinct end users received transactions containing the above dataset type and process id -->
<eusr:ReceivingEndUsers>2</eusr:ReceivingEndUsers>
<!-- How many distinct end users were involved in transactions (sent or received) containing the above dataset type and process id -->
<eusr:SendingOrReceivingEndUsers>5</eusr:SendingOrReceivingEndUsers>
</eusr:Subset>
<!-- end::SubsetPerDT-PR[] -->

<!-- tag::SubsetPerDT-PR-CC[] -->
<Subset type="PerDT-PR-CC">
<!-- tag::SubsetPerDT-PR-EUC[] -->
<Subset type="PerDT-PR-EUC">
<Key metaSchemeID="DT" schemeID="busdox-docid-qns">urn:oasis:names:specification:ubl:schema:xsd:Invoice-2::Invoice##urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0::2.1</Key>
<Key metaSchemeID="PR" schemeID="cenbii-procid-ubl">urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</Key>
<Key metaSchemeID="CC" schemeID="SenderCountry">FI</Key>
<Key metaSchemeID="CC" schemeID="ReceiverCountry">PT</Key>
<!-- MUST always be zero -->
<SendingEndUsers>0</SendingEndUsers>
<ReceivingEndUsers>1</ReceivingEndUsers>
<!-- MUST always be the same as ReceivingEndUsers -->
<SendingOrReceivingEndUsers>1</SendingOrReceivingEndUsers>
<Key metaSchemeID="CC" schemeID="EndUserCountry">FI</Key>
<!-- How many distinct end users from "FI" sent transactions containing the above dataset type and process id-->
<SendingEndUsers>4</SendingEndUsers>
<!-- How many distinct end users from "FI" received transactions containing the above dataset type and process id-->
<ReceivingEndUsers>2</ReceivingEndUsers>
<!-- How many distinct end users from "FI" were involved in transactions (sent or received) containing the above dataset type and process id-->
<SendingOrReceivingEndUsers>5</SendingOrReceivingEndUsers>
</Subset>
<!-- end::SubsetPerDT-PR-CC[] -->
<!-- end::SubsetPerDT-PR-EUC[] -->

</eusr:EndUserStatisticsReport>
96 changes: 69 additions & 27 deletions src/eusr/docs/bis/doc-section/3syntax/subset.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,65 @@ The technical representation of the subsets was designed in a generic way,
Each `Subset` element therefore requires a `@type` attribute that defines
the type of the subset. The value range is defined by the
<<codelist-subsettype>> code list.


== Subset Cardinality per End Users Country
This subset is identifierd by the `@type` attribute having the value `PerEUC`.

* This subset requires one `Key` element with a Meta Scheme ID of `CC`
(Country Code) and the `schemeID` attribute of `EndUserCountry`.
The value of the `Key` element MUST have a value according to the
<<codelist-countrycode>> code list.

The element `eusr:Subset/eusr:SendingEndUsers` contains the number of distinct
end users (cardinality) from the given End User Country, who have sent transactions.
Only values &ge; 0 are allowed.

The element `eusr:Subset/eusr:ReceivingEndUsers` contains the number of distinct
end users (cardinality) from the given End User Country, who have received transactions.
Only values &ge; 0 are allowed.

The element `eusr:Subset/eusr:SendingOrReceivingEndUsers` contains the number of distinct
end users (cardinality) from the given End User Country, who have sent/received transactions.
Only values &ge; 0 are allowed.


.Example of a subset per Dataset Type and Process ID:
[source, xml]
----
include::./snippet/snippet-1.xml[tags=SubsetPerEUC]
----

== Subset Cardinality per Dataset Type and End Users Country
This subset is identifierd by the `@type` attribute having the value `PerDT-EUC`.

* This subset requires one `Key` element with a Meta Scheme ID of `DT` (Dataset Type).
The `@schemeID` attribute of this `Key` element MUST be the Document Type Identifier Scheme
of the exchanged Dataset (usually `busdox-docid-qns`). The value of the `Key` element MUST be
the Dataset Type (Document Type) Identifier value of the exchanged dataset.

* This subset requires one `Key` element with a Meta Scheme ID of `CC`
(Country Code) and the `schemeID` attribute of `EndUserCountry`.
The value of the `Key` element MUST have a value according to the
<<codelist-countrycode>> code list.

The element `eusr:Subset/eusr:SendingEndUsers` contains the number of distinct
end users (cardinality) from the given End User Country, who have sent transactions containing the given Dataset Type.
Only values &ge; 0 are allowed.

The element `eusr:Subset/eusr:ReceivingEndUsers` contains the number of distinct
end users (cardinality) from the given End User Country, who have received transactions containing the given Dataset Type.
Only values &ge; 0 are allowed.

The element `eusr:Subset/eusr:SendingOrReceivingEndUsers` contains the number of distinct
end users (cardinality) from the given End User Country, who have sent/received transactions containing the given Dataset Type.
Only values &ge; 0 are allowed.

.Example of a subset per Dataset Type and Process ID:
[source, xml]
----
include::./snippet/snippet-1.xml[tags=SubsetPerDT-EUC]
----

== Subset Cardinality per Dataset Type and Process ID

This subset is identified by the `@type` attribute having the value `PerDT-PR`.
Expand Down Expand Up @@ -49,9 +107,9 @@ The element `eusr:Subset/eusr:SendingOrReceivingEndUsers` contains the number of
include::./snippet/snippet-1.xml[tags=SubsetPerDT-PR]
----

== Subset Cardinality per Dataset Type, Process ID, Sender Country and Receiver Country
== Subset Cardinality per Dataset Type, Process ID and End User Country

This subset is identified by the `@type` attribute having the value `PerDT-PR-CC`.
This subset is identified by the `@type` attribute having the value `PerDT-PR-EUC`.

* This subset requires one `Key` element with a Meta Scheme ID of `DT` (Dataset Type).
The `@schemeID` attribute of this `Key` element MUST be the Document Type Identifier Scheme
Expand All @@ -65,46 +123,30 @@ The value of the `Key` element MUST be the Process ID value of the process
(Peppol profile) used.

* This subset requires one `Key` element with a Meta Scheme ID of `CC`
(Country Code) and the `schemeID` attribute of `SenderCountry`.
(Country Code) and the `schemeID` attribute of `EndUserCountry`.
The value of the `Key` element MUST have a value according to the
<<codelist-countrycode>> code list.

* This subset requires one `Key` element with a Meta Scheme ID of `CC`
(Country Code) and the `schemeID` attribute of `ReceiverCountry`.
The value of the `Key` element MUST have a value according to the
<<codelist-countrycode>> code list.


Each distinct combination of the Dataset Type, Process ID, Sender Country and Receiver Country
Each distinct combination of the Dataset Type, Process ID and End User Country
MUST be reported in a separate `Subset` element.


The element `eusr:Subset/eusr:SendingEndUsers` contains the number of distinct
end users (cardinality) that have sent datasets using this combination of the Dataset Type, Process ID, Sender Country and Receiver Country.
Only the values `0` is allowed.
end users (cardinality) that have sent datasets using this combination of the Dataset Type, Process ID and End User Country.
Only values &ge; 0 are allowed.

The element `eusr:Subset/eusr:ReceivingEndUsers` contains the number of distinct
end users (cardinality) that have received datasets using this combination of the Dataset Type, Process ID, Sender Country and Receiver Country.
end users (cardinality) that have received datasets using this combination of the Dataset Type, Process ID and End User Country.
Only values &ge; 0 are allowed.

The element `eusr:Subset/eusr:SendingOrReceivingEndUsers` contains the number of distinct
end users (cardinality) that have either sent or received datasets using this combination of the Dataset Type, Process ID, Sender Country and Receiver Country.
end users (cardinality) that have either sent or received datasets using this combination of the Dataset Type, Process ID and End User Country.
Only values &ge; 0 are allowed.


====
IMPORTANT: This subset can only be counted for receiving end users, because only those have the full data available.
The count of sending end users in this subset MUST always be `0`.
As a conclusion, `ReceivingEndUsers` and `SendingOrReceivingEndUsers` must be identical within this subset.
====

NOTE: This subset is currently optional and will be mandatory when the backing eDEC
specifications (Peppol Envelope (SBDH)) become mandatory.


.Example of a subset per Dataset Type, Process ID, Sender Country and Receiver Country:
.Example of a subset per Dataset Type, Process ID and End User Country:
[source, xml]
----
include::./snippet/snippet-1.xml[tags=SubsetPerDT-PR-CC]
include::./snippet/snippet-1.xml[tags=SubsetPerDT-PR-EUC]
----

52 changes: 46 additions & 6 deletions src/eusr/docs/bis/doc-section/4rules/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -148,16 +148,56 @@ SCH-EUSR-15
| Each Subset combination of Dataset Type ID and Process ID, for which data is reported, MUST NOT occur more than once per Report.
| SCH-EUSR-13

// Subset DT-PR-CC
// Subset DT-PR-EUC

| BR-EUSR-26
| Each Subset combination of Dataset Type ID, Process ID, Sender Country and Receiver Country for which data is reported, MUST NOT occur more than once per Report.
| Each Subset combination of Dataset Type ID, Process ID and End User Country for which data is reported, MUST NOT occur more than once per Report.
| SCH-EUSR-29

| BR-EUSR-27
| The Subset combination of Dataset Type ID, Process ID, Sender Country and Receiver Country MUST only be filled out by receiving entities (C3).
The End User Cardinality that have sent datasets MUST hence always be zero.
| SCH-EUSR-31
// Subset PerDT-EUC

| BR-EUSR-28
| The Report MUST contain the End User Cardinality that have sent datasets during the Reporting Period,
subset by Dataset Type ID and End User Country.
| SCH-EUSR-37

| BR-EUSR-29
| The Report MUST contain the End User Cardinality that have received datasets during the Reporting Period,
subset by Dataset Type ID and End User Country.
| XSD

SCH-EUSR-38

| BR-EUSR-30
| The Report MUST contain the End User Cardinality that have sent or received datasets during the Reporting Period,
subset by Dataset Type ID and End User Country.
This is the Cardinality of the union of the End Users targeted by BR-EUSR-28 and BR-EUSR-29.
| XSD

SCH-EUSR-38


// Subset PerEUC


| BR-EUSR-31
| The Report MUST contain the End User Cardinality that have sent datasets during the Reporting Period,
subset by End User Country.
| XSD

SCH-EUSR-39

| BR-EUSR-32
| The Report MUST contain the End User Cardinality that have received datasets during the Reporting Period,
subset by End User Country.
| XSD

SCH-EUSR-40

| BR-EUSR-33
| The Report MUST contain the End User Cardinality that have sent or received datasets during the Reporting Period,
subset by End User Country.
This is the Cardinality of the union of the End Users targeted by BR-EUSR-31 and BR-EUSR-32.
| SCH-EUSR-40

|====
6 changes: 3 additions & 3 deletions src/eusr/docs/bis/doc-section/7bisinfo/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ In the table below you will find the values to be used as the specification iden
|Process ID

|End User Statistics Report
|`urn:fdc:peppol.eu:edec:trns:end-user-statistics-report:1.0`
|`urn:fdc:peppol.eu:edec:trns:end-user-statistics-report:1.1`
|`urn:fdc:peppol.eu:edec:bis:reporting:1.0`
|====

.XML example representation
[source, xml, indent=0]
----
<eusr:CustomizationID>urn:fdc:peppol.eu:edec:trns:end-user-statistics-report:1.0</eusr:CustomizationID>
<eusr:CustomizationID>urn:fdc:peppol.eu:edec:trns:end-user-statistics-report:1.1</eusr:CustomizationID>
<eusr:ProfileID>urn:fdc:peppol.eu:edec:bis:reporting:1.0</eusr:ProfileID>
----

.Full Peppol Document Type identifier
[source, indent=0]
----
urn:fdc:peppol:end-user-statistics-report:1.0::EndUserStatisticsReport##urn:fdc:peppol.eu:edec:trns:end-user-statistics-report:1.0::1.0
urn:fdc:peppol:end-user-statistics-report:1.1::EndUserStatisticsReport##urn:fdc:peppol.eu:edec:trns:end-user-statistics-report:1.1::1.1
----
2 changes: 1 addition & 1 deletion src/eusr/docs/bis/doc-section/appendix/a2.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

The following example report represents a valid example message.
This example represents the data for a Service Provider that only sent documents within a Reporting Period.
This implies, that the "Subsets per Dataset Type, Process ID, Sender Country and Receiver Country" is not contained.
This implies, that the "Subsets per Dataset Type, Process ID and End User Country" is not contained.

[source, xml]
----
Expand Down
Binary file modified src/eusr/docs/bis/images/eusr-process-simple.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/eusr/docs/bis/images/eusr-process-view.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/eusr/docs/bis/images/eusr-venn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/eusr/docs/bis/settings.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
:lang: en

:doctitle: Peppol End User Statistics Reporting Process
:version: 1.0.0
:version: 1.1.0
:doctype: book

:name-op-en: OpenPeppol AISBL, Operating Office
4 changes: 2 additions & 2 deletions src/eusr/process.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
title: Peppol End User Statistics Reporting - v1.0.0
title: Peppol End User Statistics Reporting - v1.1.0
description: Peppol End User Statistics Reporting Process
version: "1.0.0"
version: "1.1.0"
Loading

0 comments on commit 989ae3a

Please sign in to comment.