This commit is contained in:
2022-03-25 21:33:30 +00:00
parent b5cd90ebfc
commit 5f9e3bddd9

View File

@@ -1,6 +1,10 @@
# Importing Customers
## Field used to match records
## Required fields
- Name
## Field used to match to existing records
- Name
@@ -34,67 +38,135 @@
- Latitude
- Longitude
# Linked object support
## Linked object fields
- HeadOffice via "HeadOfficeViz" field which should contain the name of an existing HeadOffice
- Contract via "ContractViz" field which should contain the name of an existing Contract
The following linked objects are supported for import / update:
- HeadOffice via "HeadOfficeViz" field which must contain the name of an existing HeadOffice
- 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 format
The .json file must contain an array of Customer objects even if it's a single object.
The first Customer record here illustrates importing a Customer with a link to existing Contract and Head office objects.
```JSON
{
Name: "XYZ Accounting",
Active: true,
Notes: "Ergonomic impactful info-mediaries",
Wiki: null,
CustomFields: null,
Tags: ["black", "zone2", "zone3"],
WebAddress: "https://example.biz",
AlertNotes: null,
BillHeadOffice: true,
HeadOfficeId: 1,
HeadOfficeViz: "XYZ Head Office",
TechNotes: null,
AccountNumber: "10402542",
ContractId: null,
ContractViz: null,
ContractExpires: null,
LastWorkOrderViz: 350,
LastServiceDateViz: "2022-03-09T00:00:00Z",
Phone1: "373-707-7322 x535",
Phone2: "281.718.4551",
Phone3: "1-452-791-5760 x84358",
Phone4: null,
Phone5: null,
EmailAddress: "Annabel.Hahn64@example.org",
PostAddress: null,
PostCity: null,
PostRegion: null,
PostCountry: null,
PostCode: null,
Address: "9723 Tiara Summit",
City: "Hansenside",
Region: "Mississippi",
Country: "Japan",
Latitude: -7.7692,
Longitude: 165.0654
}
[
{
"Name": "Armstrong LLC",
"Active": true,
"Notes": "Ergonomic empowering project",
"Wiki": null,
"Tags": [
"black",
"purple",
"quince",
"zone1",
"zone4"
],
"WebAddress": "https://example.biz",
"AlertNotes": null,
"BillHeadOffice": true,
"HeadOfficeViz": "XYZ HeadOffice",
"TechNotes": null,
"AccountNumber": "88129181",
"ContractViz": "Gold Contract",
"ContractExpires": "2022-12-30T00:00:00Z",
"Phone1": "(948) 817-1939",
"Phone2": "768-686-6990",
"Phone3": "(343) 810-7973",
"Phone4": null,
"Phone5": null,
"EmailAddress": "Talia.Terry53@example.net",
"PostAddress": "7942 Herman Dale",
"PostCity": "Mabelville",
"PostRegion": "Michigan",
"PostCountry": "Denmark",
"PostCode": "53147",
"Address": "7937 Dale Estates",
"City": "Mabelville",
"Region": "Michigan",
"Country": "Denmark",
"Latitude": 46.805900,
"Longitude": -64.101600
},
{
"Name": "Adams Inc",
"Active": true,
"Notes": "Stand-alone clear-thinking contingency",
"Wiki": null,
"Tags": [
"zone3"
],
"WebAddress": "https://example.org",
"AlertNotes": null,
"TechNotes": null,
"AccountNumber": "27263133",
"Phone1": "534.467.2146",
"Phone2": "(897) 987-0916 x510",
"Phone3": "(389) 833-8807",
"Phone4": null,
"Phone5": null,
"EmailAddress": "Ramona_Gulgowski@example.com",
"PostAddress": "398 Mary Ridge",
"PostCity": "East Colbyberg",
"PostRegion": "Rhode Island",
"PostCountry": "Sierra Leone",
"PostCode": "41587",
"Address": "720 Jennie Green",
"City": "East Colbyberg",
"Region": "Rhode Island",
"Country": "Sierra Leone",
"Latitude": 23.620900,
"Longitude": -0.382100
},
{
"Name": "Bartell Inc",
"Active": true,
"Notes": "Devolved asynchronous info-mediaries",
"Wiki": null,
"CustomFields": null,
"Tags": [
"zone7"
],
"WebAddress": "http://example.org",
"AlertNotes": null,
"BillHeadOffice": false,
"TechNotes": null,
"AccountNumber": "28202278",
"Phone1": "670.690.0352 x841",
"Phone2": "1-687-856-1614",
"Phone3": "1-665-462-1998 x08190",
"Phone4": null,
"Phone5": null,
"EmailAddress": "Autumn99@example.org",
"PostAddress": "5112 Stanley Heights",
"PostCity": "North Hazelport",
"PostRegion": "Alabama",
"PostCountry": "Turkey",
"PostCode": "53994",
"Address": "5111 Wilkinson Bypass",
"City": "North Hazelport",
"Region": "Alabama",
"Country": "Turkey",
"Latitude": 47.351400,
"Longitude": 161.438500
}
]
```
00000000000000000000000000000000000000000000
Notes for docs:
Import new records - if checked will import any records that are not found to match by name
Update matching records - if checked will overwrite any existing records that match by name with any values in the import file, if you do not want a particular field updated, do not include it in the import file
all dates and times assumed to be in UTC
csv and json supported
csv must have first row headers which must match expected field names in order to map
Records are matched by primary identifier, usually "Name" field and must be unique
## CSV Format
Field names must be the expected ones this means csv column headers as well as json property names, unrecognized fields will be thrown out and ignored
The first row of the .csv file must contain column headers that match the field names listed above.
Each type of supported importable object's allowed fields and types is documented below
The first Customer record here illustrates importing a Customer with a link to existing Contract and Head office objects.
CSV will be converted to JSON before importing, if there are any errors in the CSV the import will not proceed and the results of the CSV parser's errors found will be displayed on the import page
Errors from the parser are in English language only
Tags in CSV must be quotation delimited comma separated list of items like this: "blue,red,white", if it's only one tag then simply "blue" is fine
```
Name,Active,Notes,Wiki,Tags,WebAddress,AlertNotes,BillHeadOffice,HeadOfficeViz,TechNotes,AccountNumber,ContractViz,ContractExpires,Phone1,Phone2,Phone3,Phone4,Phone5,EmailAddress,PostAddress,PostCity,PostRegion,PostCountry,PostCode,Address,City,Region,Country,Latitude,Longitude
Armstrong LLC,true,Ergonomic empowering project,,"black,purple,quince,zone1,zone4",https://example.biz,,true,XYZ HeadOffice,,88129181,Gold Contract,2022-12-30T00:00:00Z,(948) 817-1939,768-686-6990,(343) 810-7973,,,Talia.Terry53@example.net,7942 Herman Dale,Mabelville,Michigan,Denmark,53147,7937 Dale Estates,Mabelville,Michigan,Denmark,46.8059,-64.1016
Adams Inc,true,Stand-alone clear-thinking contingency,,zone3,https://example.org,,,,,27263133,,,534.467.2146,(897) 987-0916 x510,(389) 833-8807,,,Ramona_Gulgowski@example.com,398 Mary Ridge,East Colbyberg,Rhode Island,Sierra Leone,41587,720 Jennie Green,East Colbyberg,Rhode Island,Sierra Leone,23.6209,-0.3821
Bartell Inc,true,Devolved asynchronous info-mediaries,,zone7,http://example.org,,false,,,28202278,,,670.690.0352 x841,1-687-856-1614,1-665-462-1998 x08190,,,Autumn99@example.org,5112 Stanley Heights,North Hazelport,Alabama,Turkey,53994,5111 Wilkinson Bypass,North Hazelport,Alabama,Turkey,47.3514,161.4385
```