Service relative URI~/Files/Services/AVAGServices.onesrv?m=AddOrUpdateVehicle&HTTP_SOAPACTION=true
Methods
Service MethodManager Method
AddOrUpdateVehicleOneCore.Core.Interfaces.Inventory.IInventoryManager.AddOrUpdateVehicleFromThirdPartyService


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.

PropertyTypeMapped toNotesDescription

fahrzeugid

stringThirdPartyVehicleID
Vehicle ID
funktionstringThirdPartyVehicleValidUntilUsing CalculateVehicleValidityDateTimeByFunction()Function Code
markencodestringMakeCodeMapped to XIS_MFCTCD via GetAVAGMapping()Make Code
modellcode_marketingstring

Model Code Marketing
modellcode_packagecodestring

Model Code Package Code
modelljahrstringProductionYear
Model Year
typstringCarTypeCodeMapped to XIS_CARTYPES via GetAVAGMapping()Type Description
artstring

Vehicle Type
kennzeichenstringLicenseNumber
License Plate
fahrgestellnummerstringVIN
VIN
hubraumdecimalEngineDisplacementCodeChecks if there is the displacement in DB and stores itDisplacement (ccm)
farbestringExteriorColorCodeMapped to XIS_CAR_COLORS via GetAVAGMapping()Color
kmdecimalMileage
Mileage
anzahl_halterdecimalNumberOfVehicleOwners
Number of Vehicle Owners
kwdecimalPowerKW
KW
datum_huaudateNextTechnicalInspectionDate
Date Main Inspection / Exhaust Inspection. Date(DD.MM.YYYY)
datum_ezdateFirstRegistrationDate
Initial Registration Date. Date(DD.MM.YYYY)
ausstattung_zeilenstring

Option Lines
ausstattung_kommastring

Option Lines
datum_liefertermindate

Delivery Date. Date(DD.MM.YYYY)
taxi_miet_fahrschulwagendecimal

Taxi/Rental/Driving School
anhaengerkupplungdecimal

Trailer Hitch
fahrbereitdecimal

Ready for Driving
vk_preis_nettodecimal

Net Sales Price
vk_preis_bruttodecimal

Gross Sales Price
unfallschadendecimalAccidentValue
Accident Damage
besonderheitenstring

Particularities
mandant_zugehoerigkeitstring

Company Membership
lagerortcode_zugehoerigkeitstring

Branch Membership
mandant_neustringThirdPartyCompany
Company New
lagerortcode_neustringThirdPartyLocation
Branch New
benutzerkennungstringThirdPartyReservedBy
User ID
polsterungstringInteriorTypeCodeMapped to XIS_INTRTYPE via GetAVAGMapping()Upholstery
pa_nummerstringThirdPartyVehicleNumber
PA Number
ek_preis_nettodecimalListPrice
Net Purchase Price
novadecimal

NoVA
fahrzeugtypstring

Locator Vehicle Type
datum_bestellungdateTimePurchaseDate
Purchase Date DateTime(YYYY-MM-DD HH:mm:ss)
kraftstoffartstringFuelTypeCodeMapped to XIS_FUEL_TYPES via GetAVAGMapping()Fuel Type
co2integerCO2Emissions
Co2
noxdecimalNoxEmission
Nox
partikeldecimal

Diesel particulate filter
bonus_malusdecimal

Bonus/Malus
modellcodestringModelCodeMapped to XIS_MDLS via GetAVAGMapping()Model Code
motorcodestringEngine
Motor Code
getriebecodestringTransmissionTypeMapped to XIS_4WDTYPES via GetAVAGMapping()Transmission Code
emmisionscodestringEmissionsStickerCodeMapped to XIS_EMISSTICKER via GetAVAGMapping()Emission Code
SOAP Example for Usage with PostMan
<?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>
Response Example
<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 NamespaceOneDealer.AVAG.BusinessLayer.Managers.CalculateVehicleValidityDateTimeByFunction
RequiresAn AVAG function code
ReturnsDateTime

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 NamespaceOneDealer.AVAG.BusinessLayer.Managers.GetAVAGMapping
RequiresAn OneDealer Entity name and the Request value to be mapped
ReturnsThe 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


Write a comment…