# Stats Events

These events are in stats.js file.

# Ti.App.fireEvent('exception')

Sends stats with event_redirect_runtimeError.

This acts like a filter while getting the cached data from tbl_reports_v3 via a query.

Example:

Ti.App.fireEvent('exception', {})

# Ti.App.fireEvent('close')

Exits app.

Disconnects any bluetooth call that is active. Stops listening and searching.

Example:

Ti.App.fireEvent('close', {})

# Ti.App.fireEvent('showGesture')

Shows gestures on a newly created gestureModal.

Example:

Ti.App.fireEvent('showGesture', {})

# Ti.App.fireEvent('sendCLMPoint')

Used for Emotional Feedback.

Sends the scroll points and last scrolled page for the Emotional Feedback.

Example:

Ti.App.fireEvent('sendCLMPoint', {
  pX: 'myScrollPositionX',
  pY: 'myScrollPositionY',
  lastScrollPage: 'myLastPageScrolled'
})
  • pX - x postiion value of the scroll point.
  • pY - y position value of the scroll point.
  • lastScrollPage - last scrolled page.

# Ti.App.fireEvent('stopDetailing')

Stops the call planning detailing.

Example:

Ti.App.fireEvent('stopDetailing', {
  notes: '[note0, note1, ...]',
  customParams: 'myCustomParams',
  eventJSON: "{ 'eventType' : 'myEventType' }",
  eventID: 'myEventID',
  unexecuted: true,
  cancelCall: true,
  saveForLater: true,
  askedOutcome: true,
  noContacts: true,
  dontAsk: false,
})
  • notes - notes related to call.
  • customParams - custom parameters.
  • eventJSON - includes eventType object, can be: "ToT", "Meeting", "Coaching". If set, each of the types make the event mark as realized.
  • eventID - ID of the call event.
  • unexecuted - is the call unexecuted?
  • cancelCall - is the call cancelled?
  • saveForLater - should the call be saved for later?
  • askedOutcome - is outcome asked?
  • noContacts - are there any contacts?
  • dontAsk - stops a call automatically and launches the account and contact selection if true

# Ti.App.fireEvent('startHandsFree')

Starts the hands free mode.

Example:

Ti.App.fireEvent('startHandsFree', {})

# Ti.App.fireEvent('stopHandsFree')

Stops the hands free mode by stopping language listener within the app itself.

Example:

Ti.App.fireEvent('stopHandsFree', {})

# Ti.App.fireEvent('logout')

Handles all of the operations that happen on logging out from CRM.

Example:

Ti.App.fireEvent('logout', {
  disableAutoSync: true
})
  • disableAutoSync - if true, CRM will be disabled.

# Ti.App.fireEvent('showCachedOrders')

Shows all of the offline call records.

When one uses app in offline scenarios, all of the calls that are made is cached. This event shows that cached events.

Example:

Ti.App.fireEvent('showCachedOrders', {
  xPos: 365,
  yPos: 364,
  heightV: 322,
  widthV: 312
})
  • xPos - x position of the modal.
  • yPos - y position of the modal.
  • heightV - height of the modal.
  • widthV - width of the modal.

# Ti.App.fireEvent('startDetailing')

Starts the call planning detailing.

Example:

Ti.App.fireEvent('startDetailing', {
  callback: 'myCallBack',
  askStart: true,
  skipPrecall: true,
  noContacts: true
})
  • callback - callback function.
  • askStart - start the call?
  • skipPrecall - skip precall and start direct call planning, or show precall selector?
  • directPlanning - if true, zoom to the map becomes true and this means that this call is an unplanned call.
  • noContacts - is there any contacts?

# Ti.App.fireEvent('startPrecall')

Starts the precall.

Example:

Ti.App.fireEvent('startPrecall', {
  xPos: 365,
  yPos: 364,
  heightV: 322,
  widthV: 312,
  askStart: true,
  index: 1,
  keepModalOpen: true
})
  • xPos - x position of the modal. If undefined, then the values for the parameters will be set to, respectively; 525, 605, 120, 20
  • yPos - y position of the modal.
  • heightV - height of the modal.
  • widthV - width of the modal.
  • askStart - start the call?
  • index - 1 -> Quick Planning 2 -> Detailed Planning
  • keepModalOpen - true or false, default is false, it decides the keeping previous modal open or not when returned from the planning screen. Currently only valid for Quick Planning (index: 1)

# Ti.App.fireEvent('startNetwork')

Starts all of the network capabilities of Impact application.

Example:

Ti.App.fireEvent('startPrecall', {
  xPos: 365,
  yPos: 364,
  heightV: 322,
  widthV: 312
})
  • xPos - x position of the remote connection popover.
  • yPos - y position of the remote connection popover.
  • heightV - height of the remote connection popover.
  • widthV - width of the remote connection popover.

# Ti.App.fireEvent('setCategory')

Sets the category.

Example:

Ti.App.fireEvent('setCategory', {
  category: 'myCategory'
})
  • category - to-be-setted category.

# Ti.App.fireEvent('changeCategory')

Changes the shown category.

Example:

Ti.App.fireEvent('changeCategory', {
  ID: 'myCategoryID'
})
  • ID - to-be-changed category ID.

# Ti.App.fireEvent('showProducts')

Shows products within each category.

Example:

Ti.App.fireEvent('showProducts', {
  xPos: 365,
  yPos: 364,
  heightV: 322,
  widthV: 312
})
  • xPos - x position of the product popover.
  • yPos - y position of the product popover.
  • heightV - height of the product popover.
  • widthV - width of the product popover.

# Ti.App.fireEvent('showPlanningViewInReadMode')

Shows the planning view in a read-only mode (browsing accounts/contacts without the option to plan a call).

Example:

Ti.App.fireEvent('showPlanningViewInReadMode', {})