Service relative URI | ~/Files/Services/AVAGServices.onesrv?m=AddOrUpdateVehicle&HTTP_SOAPACTION=true | ||||
---|---|---|---|---|---|
Methods |
|
Methods
AddOrUpdateVehicleFromThirdPartyService
The AVAG Tenant contains the AVAGInventoryManager that extends the InventoryManager and overrides the AddOrUpdateVehicleFromThirdPartyService method.
Gets a ThirdPartyLocatorVehicleModel, maps to OneDealer, and creates the vehicle in OneDealer if there is no vehicle with the given VIN, or updates the vehicle found to have the same VIN.
The Request Object
This is the base model used in various Inventory methods.
The ThirdPartyLocatorVehicleModel needs to be mapped to VehicleEditViewModel in order to use the existing CreateOrUpdateVehicleByVin method.
Property | Type | Mapped to | Notes | Description |
---|---|---|---|---|
fahrzeugid | string | ThirdPartyVehicleID | Vehicle ID | |
funktion | string | ThirdPartyVehicleValidUntil | Using CalculateVehicleValidityDateTimeByFunction() | Function Code |
markencode | string | MakeCode | Mapped to XIS_MFCTCD via GetAVAGMapping() | Make Code |
modellcode_marketing | string | Model Code Marketing | ||
modellcode_packagecode | string | Model Code Package Code | ||
modelljahr | string | ProductionYear | Model Year | |
typ | string | CarTypeCode | Mapped to XIS_CARTYPES via GetAVAGMapping() | Type Description |
art | string | Vehicle Type | ||
kennzeichen | string | LicenseNumber | License Plate | |
fahrgestellnummer | string | VIN | VIN | |
hubraum | decimal | EngineDisplacementCode | Checks if there is the displacement in DB and stores it | Displacement (ccm) |
farbe | string | ExteriorColorCode | Mapped to XIS_CAR_COLORS via GetAVAGMapping() | Color |
km | decimal | Mileage | Mileage | |
anzahl_halter | decimal | NumberOfVehicleOwners | Number of Vehicle Owners | |
kw | decimal | PowerKW | KW | |
datum_huau | date | NextTechnicalInspectionDate | Date Main Inspection / Exhaust Inspection. Date(DD.MM.YYYY) | |
datum_ez | date | FirstRegistrationDate | Initial Registration Date. Date(DD.MM.YYYY) | |
ausstattung_zeilen | string | Option Lines | ||
ausstattung_komma | string | Option Lines | ||
datum_liefertermin | date | Delivery Date. Date(DD.MM.YYYY) | ||
taxi_miet_fahrschulwagen | decimal | Taxi/Rental/Driving School | ||
anhaengerkupplung | decimal | Trailer Hitch | ||
fahrbereit | decimal | Ready for Driving | ||
vk_preis_netto | decimal | Net Sales Price | ||
vk_preis_brutto | decimal | Gross Sales Price | ||
unfallschaden | decimal | AccidentValue | Accident Damage | |
besonderheiten | string | Particularities | ||
mandant_zugehoerigkeit | string | Company Membership | ||
lagerortcode_zugehoerigkeit | string | Branch Membership | ||
mandant_neu | string | ThirdPartyCompany | Company New | |
lagerortcode_neu | string | ThirdPartyLocation | Branch New | |
benutzerkennung | string | ThirdPartyReservedBy | User ID | |
polsterung | string | InteriorTypeCode | Mapped to XIS_INTRTYPE via GetAVAGMapping() | Upholstery |
pa_nummer | string | ThirdPartyVehicleNumber | PA Number | |
ek_preis_netto | decimal | ListPrice | Net Purchase Price | |
nova | decimal | NoVA | ||
fahrzeugtyp | string | Locator Vehicle Type | ||
datum_bestellung | dateTime | PurchaseDate | Purchase Date DateTime(YYYY-MM-DD HH:mm:ss) | |
kraftstoffart | string | FuelTypeCode | Mapped to XIS_FUEL_TYPES via GetAVAGMapping() | Fuel Type |
co2 | integer | CO2Emissions | Co2 | |
nox | decimal | NoxEmission | Nox | |
partikel | decimal | Diesel particulate filter | ||
bonus_malus | decimal | Bonus/Malus | ||
modellcode | string | ModelCode | Mapped to XIS_MDLS via GetAVAGMapping() | Model Code |
motorcode | string | Engine | Motor Code | |
getriebecode | string | TransmissionType | Mapped to XIS_4WDTYPES via GetAVAGMapping() | Transmission Code |
emmisionscode | string | EmissionsStickerCode | Mapped to XIS_EMISSTICKER via GetAVAGMapping() | Emission Code |
<?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:ws_crm_locator" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body> <ns1:schickeFahrzeugdaten> <fahrzeugid xsi:type="xsd:string">ID{{$randomPassword}}</fahrzeugid> <funktion xsi:type="xsd:string">1</funktion> <markencode xsi:type="xsd:string">TESTMERCEDES</markencode> <modellcode_marketing xsi:nil="true" /> <modellcode_packagecode xsi:type="xsd:string"></modellcode_packagecode> <modelljahr xsi:type="xsd:string">2018</modelljahr> <typ xsi:type="xsd:string">Coupe</typ> <art xsi:type="xsd:string">SUV</art> <kennzeichen xsi:type="xsd:string">{{$randomBankAccountBic}}</kennzeichen> <fahrgestellnummer xsi:type="xsd:string">VN{{$randomPassword}}</fahrgestellnummer> <hubraum xsi:type="xsd:decimal">1231</hubraum> <farbe xsi:type="xsd:string">TESTBLACK</farbe> <km xsi:type="xsd:decimal">0</km> <anzahl_halter xsi:type="xsd:decimal">0</anzahl_halter> <kw xsi:type="xsd:decimal">147</kw> <datum_huau xsi:type="xsd:date">10.04.2019</datum_huau> <datum_ez xsi:type="xsd:date"></datum_ez> <ausstattung_zeilen xsi:type="xsd:string">New Santa Fe (MJ20) 2.2 CRDi4WD 8AT Premium EUR netto 44.201,68 , EUR brutto 52.600,00 |10|3|S1W52F\r\n Magnetic Force EUR netto 579,83 , EUR brutto 690,00 |20|1|M2F\r\n Black one-tone EUR netto 0, EUR brutto 0|30|2|NNB</ausstattung_zeilen> <ausstattung_komma xsi:type="xsd:string">New Santa Fe (MJ20) 2.2 CRDi4WD 8AT Premium, Magnetic Force, Black one-tone</ausstattung_komma> <datum_liefertermin xsi:nil="true" /> <taxi_miet_fahrschulwagen xsi:type="xsd:decimal">0</taxi_miet_fahrschulwagen> <anhaengerkupplung xsi:type="xsd:decimal">0</anhaengerkupplung> <fahrbereit xsi:type="xsd:decimal">0</fahrbereit> <vk_preis_netto xsi:type="xsd:decimal">44781.51</vk_preis_netto> <vk_preis_brutto xsi:type="xsd:decimal">53290</vk_preis_brutto> <unfallschaden xsi:type="xsd:decimal">0</unfallschaden> <besonderheiten xsi:type="xsd:string"></besonderheiten> <mandant_zugehoerigkeit xsi:type="xsd:string">99</mandant_zugehoerigkeit> <lagerortcode_zugehoerigkeit xsi:type="xsd:string">99</lagerortcode_zugehoerigkeit> <mandant_neu xsi:type="xsd:string">{{$randomDomainWord}}</mandant_neu> <lagerortcode_neu xsi:type="xsd:string">{{$randomCity}}</lagerortcode_neu> <benutzerkennung xsi:type="xsd:string">{{$randomInt}}</benutzerkennung> <polsterung xsi:type="xsd:string">TESTLEATHER</polsterung> <pa_nummer xsi:type="xsd:string">{{$randomInt}}</pa_nummer> <ek_preis_netto xsi:type="xsd:decimal">38175.47</ek_preis_netto> <nova xsi:nil="true" /> <fahrzeugtyp xsi:type="xsd:string">Locator-NW</fahrzeugtyp> <datum_bestellung xsi:type="xsd:dateTime">2020-02-20 13:10:30</datum_bestellung> <kraftstoffart xsi:type="xsd:string">TESTDIESEL</kraftstoffart> <co2 xsi:type="xsd:integer">0</co2> <nox xsi:type="xsd:decimal">0</nox> <partikel xsi:type="xsd:decimal">0</partikel> <bonus_malus xsi:type="xsd:decimal">0</bonus_malus> <modellcode xsi:type="xsd:string">TESTVITO</modellcode> <motorcode xsi:type="xsd:string">{{$randomInt}}</motorcode> <getriebecode xsi:type="xsd:string">TESTFWD</getriebecode> <emmisionscode xsi:type="xsd:string">TEST</emmisionscode> </ns1:schickeFahrzeugdaten> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
<env:Envelope xmlns:env="http://www.w3.org/2001/06/soap-envelope" > <env:Body> <m:AddOrUpdateVehicleResponse env:encodingStyle="http://www.w3.org/2001/06/soap-encoding" xmlns:m ="http://example.org/2001/06/quotes"> <ResultObject> <VIN>VNwa6N66NG_nQCPeq</VIN> <Price /> <Code>1000607</Code> <MakeCode>10</MakeCode> <MakeDescription>MERCEDES</MakeDescription> <ModelCode>10115V1021</ModelCode> <ModelDescription>Vito 113 2.0</ModelDescription> <ModelAsAComment /> <FamilyCode /> <FamilyDescription>VITO</FamilyDescription> <VariantCode /> <VariantDescription /> <BodyStyleCode>01</BodyStyleCode> <BodyStyleDescription>SUV</BodyStyleDescription> <CarTypeCode /> <CarTypeDescription /> <CarStatusCode>UsedVehicle</CarStatusCode> <CarStatusDescription>Used vehicles</CarStatusDescription> <InteriorColorCode /> <InteriorColorDescription /> <InteriorTypeCode>LEATHER</InteriorTypeCode> <InteriorTypeDescription>LEATHER</InteriorTypeDescription> <FuelTypeCode>1</FuelTypeCode> <FuelTypeDescription>Diesel</FuelTypeDescription> <Mileage /> <FirstRegistrationDate>1/1/0001 12:00:00 πμ</FirstRegistrationDate> <Engine>58</Engine> <EngineDisplacementCode /> <EngineDisplacementDescription /> <GearNumber /> <GearTypeCode /> <GearTypeDescription /> <DriveType /> <NumberOfSeats /> <NumberOfDoorsCode /> <NumberOfDoorsDescription /> <ExteriorColorCode>BLACK</ExteriorColorCode> <ExteriorColorDescription>BLACK</ExteriorColorDescription> <LicenseNumber>CJLINTB1</LicenseNumber> <Yearbook /> <ProductionYear>2018</ProductionYear> <NumberOfCylinders /> <PowerHP /> <PowerKW /> <Acceleration /> <TopSpeed /> <FuelConsumptionCombined>0</FuelConsumptionCombined> <FuelConsumptionUrban>0</FuelConsumptionUrban> <FuelConsumptionExtraUrban>0</FuelConsumptionExtraUrban> <CO2Emissions>0</CO2Emissions> <CO2EmissionsCity /> <CO2EmissionsLong /> <EmissionClassCode /> <EmissionClassDescription /> <EmissionsStickerCode>1</EmissionsStickerCode> <EmissionsStickerDescription>1</EmissionsStickerDescription> <WarrantyEndDate /> <WarrantyLimitationKm /> <TireSizeCode /> <TireSizeDescription /> <FrontTireSize /> <RearTireSize /> <DriveSide /> <UsageType /> <NumberOfAxles /> <NumberOfVehicleOwners>0</NumberOfVehicleOwners> <PrivateOrCommercial /> <LastMaintenanceDate /> <LastMaintenanceOdometer>0</LastMaintenanceOdometer> <NextTechnicalInspectionDate>10/4/2019 12:00:00 πμ</NextTechnicalInspectionDate> <TaxGroupCode /> <TaxGroupDescription /> <NonSmokerVehicle /> <HasFullServiceHistory /> <AbsSystem /> <Climatisation /> <ParkAssistance /> <Damaged /> <KBA /> <CarRegistrationInfo /> <OwnerBpCode /> <OwnerBpName /> <SponsorBPCode /> <SponsorBPName /> <Notes /> <Enabled>true</Enabled> <BranchName /> <ConstructionSeries /> <RegistrationType /> <ManufColorCode /> <ManufColorName /> <MaxWeight /> <DriversCab /> <Wheelbase /> <AdditionalConstruction /> <EmissionStandardCode /> <NMHCEmission /> <HCNoxEmission /> <NoxEmission /> <THCEmission /> <PMEmission /> <MicroParticleBadge /> <PolutantLevel /> <DieselParticleFilter /> <CFL1 /> <CFL2 /> <CFL3 /> <Description1 /> <Description2 /> <Date1 /> <Date2 /> <Property1 /> <Property2 /> <Property3 /> <Property4 /> <Property5 /> <VehicleCaseNo /> <VehiclePowerKW /> <VendorBPCode /> <IsSalable>true</IsSalable> <ListPrice /> <HasFixedDamages>false</HasFixedDamages> <FixedDamageValue /> <FixedDamageDesc /> <IsAccidentVehicle>false</IsAccidentVehicle> <HasCurrentDamage>false</HasCurrentDamage> <AccidentValue /> <AccidentDesc /> <VehicleMicroParticleBadge /> <VehiclePollutantLevel /> <EngineTypeCode /> <EngineTypeCode2 /> <VehiclePowerKW2 /> <VehiclePowerHP2 /> <FuelTypeCode2 /> <EngineDisplacementCode2 /> <FuelConsumptionCombined2 /> <FuelConsumptionUrban2 /> <FuelConsumptionExtraUrban2 /> <CO2Emissions2 /> <AvailableForSalesFrom /> <VehicleAvailabilityStatus /> <SalesSegment /> <ThirdPartyAppCode>AvagLocator</ThirdPartyAppCode> <ThirdPartyVehicleID>ID1cOedEhnFnS5ARy</ThirdPartyVehicleID> <ThirdPartyVehicleNumber>38</ThirdPartyVehicleNumber> <ThirdPartyVehicleValidUntil>2021-04-21T00:00:00</ThirdPartyVehicleValidUntil> <ThirdPartyCompany>santino</ThirdPartyCompany> <ThirdPartyLocation>Abdielburgh</ThirdPartyLocation> <ThirdPartyReservedBy>429</ThirdPartyReservedBy> <PurchaseDate>2020-02-20T00:00:00</PurchaseDate> <TransmissionType>1</TransmissionType> <DimensionCompany>RCGENDEV</DimensionCompany> <DimensionBranch>1</DimensionBranch> <DimensionLocation>B1L1</DimensionLocation> <DimensionMake>98</DimensionMake> <DimensionMarketSegment /> </ResultObject> <Success>true</Success> <ErrorDescription /> </m:AddOrUpdateVehicleResponse> </env:Body> </env:Envelope>
Private Methods
CalculateVehicleValidityDateTimeByFunction
Complete Namespace | OneDealer.AVAG.BusinessLayer.Managers.CalculateVehicleValidityDateTimeByFunction |
---|---|
Requires | An AVAG function code |
Returns | DateTime |
This method gets a function code from the AVAG Locator (OneCore.Core.Models.Models.AVAG.Inventory.ThirdPartyLocatorVehicleModel.funktion) and returns a future DateTime depending on the value.
If the function code is set to "1" the returned DateTime will be 1 Day in the future.
If the function code is set to "2", "3", or "4" the returned DateTime will be 1 Month in the future
GetAVAGMapping
Complete Namespace | OneDealer.AVAG.BusinessLayer.Managers.GetAVAGMapping |
---|---|
Requires | An OneDealer Entity name and the Request value to be mapped |
Returns | The value found in Entity table or null if none found |
This method maps the value given to a Mapping Object of AVAG Locator Mapper.
If the value can be mapped the mapped code is returned, else null is returned
Add Comment