Skip to content

Search Events

Info

This document is a work in progress.

Currently, Search events contain below events, still working in progress:

  • Search Events
    • Entity Action Event - When user initiates an action (eg: click a candidate, call the phone number of that poi, drive to that poi/address) from a search result (from search result list or detail page), HMI/application should send "ENTITY_ACTION" event.
    • Entity Cached Action Event - When user initiates action (eg: click a candidate, call the phone number of that poi, drive to that poi/address) from a pre-stored poi/address (home/work address, favorite result list, recent poi/address), HMI/application should send "ENTITY_CACHE_ACTION" event.

Entity Action Event

When user take action (eg: click a candidate, call the phone number of that poi, drive to that poi/address) from a search result (from search result list or detail page), HMI/application should send an "ENTITY_ACTION" event.

TNEntityActionEventBuilder Methods Details
entityId(_ entityId: String) The EntityId address/POI that was selected, mandatory data field.
referenceId(_ referenceId: String) The reference/transaction id of the search from which the result was selected to view details, optional data field.
action(_ action: TNEntityActionType) ActionType as CLICK/CALL/DIRECTION, mandatory data field.
display(_ display: TNEntityDisplayType) DisplayType as MAP_VIEW/LIST_VIEW where entity is displayed when entity is taken action mandatory data field.
enum TNEntityActionType Details
click click 1 candidate
call call the phone number of that poi
direction drive to that poi/address
enum TNEntityDisplayType Details
mapView entity is displayed on Map when it is taken action
listView entity is displayed on List when it is taken action
1
2
3
4
5
6
let eventBuilder = TNEntityActionEvent.builder()
eventBuilder.entityId("EntityId").referenceId("ReferenceId")
    .action(.click).display(.listView)
if let event = eventBuilder.build() {
    dataCollectorClient.send(event: event)
}
1
2
3
4
5
6
7
8
TNEntityActionEventBuilder * eventBuilder = [TNEntityActionEvent builder];
[[eventBuilder entityId: @"EntityId"] referenceId: @"ReferenceID"];
[eventBuilder action:TNEntityActionTypeClick];
[eventBuilder display:TNEntityDisplayTypeListView];
TNEntityActionEvent * event = [eventBuilder build];
if (event != NULL) {
    [dataCollectorClient sendWithEvent:event];
}

Entity Cache Action Event

When user intiates an action (eg: click a candidate, call the phone number of that poi, drive to that poi/address) from a pre-stored poi/address (home/work address, favorite result list, recent poi/address), HMI/application should send "ENTITY_CACHE_ACTION" event. Key methods:

TNEntityCacheActionEventBuilder Methods Details
entityId(_ entityId: String) The EntityId address/POI that was selected, mandatory data field.
action(_ action: TNEntityActionType) ActionType as CLICK/CALL/DIRECTION , mandatory data field.
source(_ source: TNEntityCacheSourceType) Source type RECENT/FAVORITE/HOME/WORK, optional data field.
enum TNEntityActionType Details
click click 1 candidate
call call the phone number of that poi
direction drive to that poi/address
enum TNEntityCacheSourceType SourceType
recent entity cache is from recent source
favorite entity cache is from favorite source
home entity cache is from home source
work entity cache is from work source
1
2
3
4
5
let eventBuilder = TNEntityCacheActionEvent.builder()
eventBuilder.entityId("EntityId").action(.direction).source(.favorite)
if let event = eventBuilder.build() {
    dataCollectorClient.send(event: event)
}
1
2
3
4
5
6
7
TNEntityCacheActionEventBuilder * eventBuilder = [TNEntityCacheActionEvent builder];
[[eventBuilder entityId: @"EntityId"] action:TNEntityActionTypeClick];
[eventBuilder source:TNEntityCacheSourceTypeWork];
TNEntityCacheActionEvent * event = [eventBuilder build];
if (event != NULL) {
    [dataCollectorClient sendWithEvent:event];
}