This commit is contained in:
2022-03-29 14:16:45 +00:00
parent 8d791a6119
commit cec97d06fa

View File

@@ -1,4 +1,4 @@
# Part import / update specifications
# Unit import / update specifications
Names of fields listed here are the exact case and spelling required to be recognized by AyaNova for [importing / updating](adm-import.md).
@@ -6,120 +6,178 @@ Any field in the import file that is not listed on this page will be removed bef
## Required fields
- Name
- Serial
- CustomerViz
## Key field used to match to existing records
- Name
- Serial
## Fields directly importable / updateable
- Name (import only)
- Serial (import only)
- Active
- Description
- Notes
- Wiki
- Tags
- ManufacturerNumber
- WholeSalerNumber
- AlternativeWholeSalerNumber
- Cost
- Retail
- UnitOfMeasure
- UPC
- PartSerialsViz (update will overwrite *all* existing serial numbers if this field is included)
- UnitHasOwnAddress
- BoughtHere
- Receipt
- PurchasedDate
- Description
- OverrideModelWarranty
- WarrantyLength
- WarrantyTerms
- ContractExpires
- Metered
- LifeTimeWarranty
- Text1
- Text2
- Text3
- Text4
- Address
- City
- Region
- Country
- Latitude
- Longitude
## Linked object fields
The following linked objects are importable / updateable:
- Manufacturer via "ManufacturerViz" field which must contain the name of an existing Vendor
- Wholesaler via "WholeSalerViz" field which must contain the name of an existing Vendor
- Alternative wholesaler via "AlternativeWholeSalerViz" field which must contain the name of an existing Vendor
- Customer owner of unit via "CustomerViz" which must contain the name of an existing customer and is **required**
- Unit that is the "parent" of this unit via "ParentUnitViz" which must contain the serial of an existing unit
- Unit model via "UnitModelNameViz" which must contain an existing Unit model name
- Vendor the unit was purchased from via "PurchasedFromVendorViz" field which must contain the name of an existing Vendor
- Unit that is the replacement of this unit via "ReplacedByUnitViz" which must contain the serial of an existing unit
- Contract via "ContractViz" field which must contain the name of an existing Contract
If the Contract is specified then the ContractExpires field can be used to set the expiry date of the Contract.
If ContractExpires is omitted then it is set to the import date and time minus 1 minute so that it won't take effect until it's been set to a future date.
## JSON file format
The .json file must contain an array of one or more Part objects.
The first Part record here illustrates importing a Part with links to existing Manufacturer, Wholesaler and Alternative Wholesaler and also how to include serial numbers.
The .json file must contain an array of one or more Unit objects.
```JSON
[
{
"Name": "048902",
"Active": true,
"Description": "test description",
"Notes": "Alias nihil beatae dolores quam quisquam molestiae repudiandae magni consequatur dolores inventore distinctio.",
"Wiki": "# Headings\n# Heading 1st level\n## Heading 2nd level\n### Heading 3rd level\n#### Heading 4th level\n##### Heading 5th level\n###### Heading 6th level",
"Tags": [
"orange",
"zebra",
"zone2",
"zone4",
"zone5"
],
"ManufacturerViz": "Yellow Cedar Consulting",
"ManufacturerNumber": "man-048902",
"WholeSalerViz": "Ruecker - Jakubowski",
"WholeSalerNumber": "ws-048902",
"AlternativeWholeSalerViz": "Considine Group",
"AlternativeWholeSalerNumber": "aws-048902",
"Cost": 15.200000000000000000,
"Retail": 18.240000000000000000,
"UnitOfMeasure": "each",
"UPC": "4058773855392",
"PartSerialsViz": "387992910, 387992911, 387992912"
},
{
"Name": "097091",
"Active": true,
"Description": null,
"Notes": "Vel sit id quia provident cum et quaerat.",
"Wiki": null,
"Tags": [
"black",
"purple",
"silver",
"violet",
"zebra"
],
"ManufacturerViz": "Littel Group",
"ManufacturerNumber": "man-097091",
"WholeSalerViz": "Ruecker - Jakubowski",
"WholeSalerNumber": "ws-097091",
"AlternativeWholeSalerViz": "Jakubowski, Hoeger and Hauck",
"AlternativeWholeSalerNumber": "aws-097091",
"Cost": 18.060000000000000000,
"Retail": 21.670000000000000000,
"UnitOfMeasure": "each",
"UPC": "2820615657752",
"PartSerialsViz": ""
},
{
"Name": "198660",
"Active": true,
"Description": null,
"Notes": "Fuga quaerat neque quasi ut inventore explicabo velit explicabo delectus.",
"Notes": "Magni est consequatur itaque atque explicabo quibusdam debitis reprehenderit.",
"Wiki": null,
"Tags": [
"jade",
"zone5",
"zone8",
"zone0"
],
"Serial": "00897259",
"CustomerViz": "Stanton, Wiza and Hahn",
"ParentUnitViz": null,
"UnitModelNameViz": "Ranchero Garden - 625229",
"UnitHasOwnAddress": true,
"BoughtHere": false,
"PurchasedFromVendorViz": "Considine Group",
"Receipt": "599307",
"PurchasedDate": "2020-05-31T21:07:05.099769Z",
"Description": "Ergonomic Metal Car",
"ReplacedByUnitViz": null,
"OverrideModelWarranty": false,
"WarrantyLength": null,
"WarrantyTerms": null,
"ContractViz": "Bronze",
"ContractExpires": "2023-03-27T18:44:21.679721Z",
"Metered": false,
"LifeTimeWarranty": false,
"Text1": "21491466",
"Text2": null,
"Text3": null,
"Text4": null,
"Address": "6036 Reggie Pine",
"City": "South Velva",
"Region": "Georgia",
"Country": "Chile",
"Latitude": 41.188300,
"Longitude": -152.686600
},
{
"Active": true,
"Notes": "Ullam magni voluptatum numquam pariatur consectetur accusantium accusantium excepturi.",
"Wiki": null,
"Tags": [
"red",
"zone0"
],
"Serial": "01052815",
"CustomerViz": "Gulgowski Group",
"ParentUnitViz": null,
"UnitModelNameViz": "Fiesta Toys - 144172",
"UnitHasOwnAddress": false,
"BoughtHere": false,
"PurchasedFromVendorId": 4,
"PurchasedFromVendorViz": "Weimann Group",
"Receipt": "123706",
"PurchasedDate": "2018-02-02T18:22:09.24824Z",
"Description": "Intelligent Plastic Gloves",
"ReplacedByUnitViz": null,
"OverrideModelWarranty": false,
"WarrantyLength": null,
"WarrantyTerms": null,
"ContractViz": null,
"ContractExpires": null,
"Metered": false,
"LifeTimeWarranty": false,
"Text1": null,
"Text2": null,
"Text3": null,
"Text4": null,
"Address": null,
"City": null,
"Region": null,
"Country": null,
"Latitude": null,
"Longitude": null
},
{
"Active": true,
"Notes": "Deleniti et cupiditate qui corrupti aut eius.",
"Wiki": null,
"CustomFields": null,
"Tags": [
"black",
"blue",
"violet",
"white",
"zone9"
],
"ManufacturerViz": "Yellow Cedar Consulting",
"ManufacturerNumber": "man-198660",
"WholeSalerViz": "Weimann Group",
"WholeSalerNumber": "ws-198660",
"AlternativeWholeSalerViz": "Considine Group",
"AlternativeWholeSalerNumber": "aws-198660",
"Cost": 13.740000000000000000,
"Retail": 16.490000000000000000,
"UnitOfMeasure": "each",
"UPC": "5708648426804",
"PartSerialsViz": ""
"Serial": "01367224",
"CustomerViz": "O'Hara LLC",
"ParentUnitViz": null,
"UnitModelNameViz": "Challenger Music - 926816",
"UnitHasOwnAddress": false,
"BoughtHere": false,
"PurchasedFromVendorViz": "Weimann Group",
"Receipt": "714259",
"PurchasedDate": "2019-05-31T23:35:01.24309Z",
"Description": "Gorgeous Cotton Bike",
"ReplacedByUnitViz": null,
"OverrideModelWarranty": false,
"WarrantyLength": null,
"WarrantyTerms": null,
"ContractViz": null,
"ContractExpires": null,
"Metered": false,
"LifeTimeWarranty": false,
"Text1": null,
"Text2": null,
"Text3": null,
"Text4": null,
"Address": null,
"City": null,
"Region": null,
"Country": null,
"Latitude": null,
"Longitude": null
}
]
```
@@ -127,7 +185,7 @@ The first Part record here illustrates importing a Part with links to existing M
The first row of the .csv file must contain column headers that match the field names listed above.
The first Part record here illustrates importing a Part with links to existing Manufacturer, Wholesaler and Alternative Wholesaler and also how to include serial numbers.
The first Unit record here illustrates importing a Unit with links to existing Manufacturer, Wholesaler and Alternative Wholesaler and also how to include serial numbers.
```
Name,Active,Description,Notes,Wiki,Tags,ManufacturerViz,ManufacturerNumber,WholeSalerViz,WholeSalerNumber,AlternativeWholeSalerViz,AlternativeWholeSalerNumber,Cost,Retail,UnitOfMeasure,UPC,PartSerialsViz