Creating assets
Create a file that contains a list of assets and asset details, such as the geographic location of assets, and upload the file to Environmental Intelligence Suite.
About this task
If you plan to send email notifications for weather alerts, you define assets in a JSON file or a CSV file. Import the file by using the Job Management component. You can verify that the assets are created by using the Data explorer.
If you are alerting contacts by email, you must associate contacts with an asset. Otherwise, you can leave the contact ID in the CSV file blank.
Use the following format for the JSON file.
Note: You can create assets, contacts, and
subscriptions in a single JSON
file.
{"eventCode": "objectUpsertEvent", "eventDetails": {"businessObject": {"type": "Asset", "description": "{Description}", "currentLocationCoordinates": "latitude, longitude", "assetType": "STATIC", "globalIdentifiers": [{"name": "eis.geospatial.globalId", "value": "{asset_ID}"}], "assetIdentifier": "{asset_ID}", "contacts": {"globalIdentifiers": [{"name": "eis.geospatial.globalId", "value": "{contact_ID}"}]}}}}
Use the following format for the CSV
file.
assetIdentifier,assetType,status,description,currentLocationCoordinates,contacts.contactIdentifier
Note: To delete assets by using a file, define the same configuration but select Delete
data in the Job Management component. For a JSON file, set the event code to
objectArchiveEvent
.Procedure
- Prepare an assets file by using the file format in the About this task section.
- From the side navigation menu, click New job. and then click
- Select Import data as the job type and click Next.
- Click Add file and browse to upload your CSV or JSON file.
- Select the default schema type and click Next.
- Review your data and click Import.
Results
The following common errors can occur during the upload process.
- The file is not in a JSON or CSV file format.
- The asset IDs are not unique.
- Required fields and columns were left blank.
Example
{"eventCode": "objectUpsertEvent", "eventDetails": {"businessObject": {"type": "Asset", "description": "Head office", "currentLocationCoordinates": "35.8587, -98.8218", "assetType": "STATIC", "globalIdentifiers": [{"name": "eis.geospatial.globalId", "value": "head_office"}], "assetIdentifier": "head_office", "contacts": {"globalIdentifiers": [{"name": "eis.geospatial.globalId", "value": "{0123456789}"}]}}}}
The
following file is an example of an assets file in CSV
format.
assetIdentifier,assetType,status,description,currentLocationCoordinates,contacts.contactIdentifier
head_office,STATIC,active,Head_office,"35.8587, -98.8218",0123456789