Special cases for sending sales data to Samtrafiken
On this page you can see the different special cases specifically for sales data that can be sent to Samtrafiken.
ServiceFacilitySet - attributes
The <ServiceFacilitySet>
element has been extended with a <KeyValue>
containing the attributes
. The attributes
are ServiceFacilities but specified with the codes defined in TRP/Silverrail. That way the full range of attributes necessary in the sales system, both the old and the new systems, can be specified.
If you specify the KeyValue
attributes
then you do not have to specify the same facilities using the standard NeTEx enums, so you can just use the KeyValue
attributes
if you want to.
Note that there can exist ServiceFacilities belonging to both ServiceJourney-elements (if they should be applied to the entire journey) and to JourneyPart-elements (if the attributes only apply to a part of the journey). See the NeTEx example below in the ServiceJourney-productCode-section.
The complete list of allowed attribute codes can be found here: Codelist: Attributes (service properties)
ServiceJourney - productCode
The <ServiceJourney>
element has been extended with a <KeyValue>
containing the productCode
.
The complete list of allowed productCodes can be found here: Codelist: Product Category
If you use other values than those listed then the import will fail.
Here is an example of real NETEX ServiceJourney XML, containing a valid value "RE"
in the <KeyValue>
productCode
.
<ServiceJourney version="any" id="SE:074:ServiceJourney:30_300_300_1036_1036_J_RE_2">
<keyList>
<KeyValue>
<Key>productCode</Key>
<Value>RE</Value>
</KeyValue>
</keyList>
<PrivateCode>1036</PrivateCode>
<TransportMode>rail</TransportMode>
<TransportSubmode>
<RailSubmode>unknown</RailSubmode>
</TransportSubmode>
<dayTypes>
<DayTypeRef ref="SE:074:DayType:ah0l8tejnuptnmgqvmp348sc3t8pmk72"/>
</dayTypes>
<JourneyPatternRef ref="SE:074:JourneyPattern:949400000000636569" version="any"/>
<OperatorRef ref="SE:074:Operator:9013300000100000"/>
<trainNumbers>
<TrainNumberRef>1036</TrainNumberRef>
</trainNumbers>
<passingTimes>
...
</passingTimes>
<facilities>
<ServiceFacilitySet version="any" id="SE:074:ServiceFacilitySet:949400000001112786">
<keyList>
<KeyValue>
<Key>attributes</Key>
<Value>KOMAB,BOKEJB,EVFEUJ,KOMEL,KOMIUK,KOMLYF</Value>
</KeyValue>
</keyList>
<MobilityFacilityList>suitableForWheelchairs</MobilityFacilityList>
<PassengerCommsFacilityList>powerSupplySockets internet</PassengerCommsFacilityList>
<ServiceReservationFacilityList>noReservationsPossible</ServiceReservationFacilityList>
</ServiceFacilitySet>
</facilities>
</ServiceJourney>
Line - salesAuthorityNumber
The <Line>
element has been extended with a <KeyValue>
containing the salesAuthorityNumber
. The salesAuthorityNumber refers to the number/PrivateCode of the Authority that is responsible for sales and prices. Below is an example of SL PendeltĂĄg line 40.
The salesAuthorityNumber is not mandatory to specify. It is only necessary to specify if it is different from the Authority that runs the line (the one that is referred through the Network reference on the Line).
<Line version="any" id="SE:030:Line:9011222004000000">
<ValidBetween>
<FromDate>2022-10-19T00:00:00</FromDate>
</ValidBetween>
<keyList>
<KeyValue>
<Key>salesAuthorityNumber</Key>
<Value>275</Value>
</KeyValue>
</keyList>
<Name>40</Name>
<TransportMode>rail</TransportMode>
<TransportSubmode>
<RailSubmode>unknown</RailSubmode>
</TransportSubmode>
<PublicCode>40</PublicCode>
<PrivateCode>40</PrivateCode>
<RepresentedByGroupRef ref="SE:030:Network:9010222000000000"/>
</Line>
Â