This API allows you to set a secondary location for a visitor. The secondary location set using this API will be visible within the visitor information page under the Secondary Location section.
The setLocation() API takes an object with specific keys representing the visitor's location as a parameter.
Note: If the latitude and longitude of the visitor are set using this API, the visitor's device location will be overridden while showing the current location in the map for the location widget. This is applicable only if a pre-selected location is not added within the bot script.
|visitorLocation||SIQVisitorLocation||The location of the visitor. This location is displayed as the "Secondary Location" within visitor information.|
The SIQVisitorLocation contains the following properties:
|latitude||Latitude of visitor's location(Decimal degrees)|
|longitude||Longitude of visitor's location(Decimal degrees)|
|zipCode||ZIP code at a visitor's location|
|city||Name of the city|
|state||Name of the state|
|country||Name of the country|
|countryCode||Country code for the country|
SIQVisitorLocation location = new SIQVisitorLocation(); location.latitude = 30.1750; location.longitude = -97.7547; location.city = "Austin"; location.state = "Texas"; location.country = "United States of America"; location.countryCode = "US"; location.zipCode = "78617"; ZohoSalesIQ.setVisitorLocation(location);