Creating contacts
Create a file that contains the names and email addresses of contacts and upload it to Environmental Intelligence Suite.
About this task
If you plan to send email notifications for weather alerts, you define contacts in a JSON file or a CSV file. Import the file by using the Job Management component.
Note: You can create assets, contacts, and subscriptions in a single JSON file.
Use the following format for the JSON file.
{"eventCode": "objectUpsertEvent", "eventDetails": {"businessObject": {"type": "Contact", "firstName": "{first_name}", "lastName": "{last_name}", "emailAddress": "{email@email.com}", "locale": "en", "globalIdentifiers": [{"name": "eis.geospatial.globalId", "value": "{contact_ID}"}]}}}
Use the following format for the CSV
file.
contactIdentifier,emailAddress,firstName,lastName
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 your contacts 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
Example
{"eventCode": "objectUpsertEvent", "eventDetails": {"businessObject": {"type": "Contact", "firstName": "Alice", "lastName": "Smyth", "emailAddress": "alice@email.com", "locale": "en", "globalIdentifiers": [{"name": "eis.geospatial.globalId", "value": "0123456789"}]}}}
The following file is an example of a contacts file in CSV
format.
contactIdentifier,emailAddress,firstName,lastName
0123456789,alice@mail.com,Alice,Smyth