HookApi

HookApi

new HookApi()

Hooks allow you to customize some standard Five9 Adapter operations, like Search, Save Log, Screen Pop, Set Disposition etc. Also, you can cancel the action.

Hook implementation should return resolved Promise. Promise must contain object with 'status' (HookApiStatus) attribute. Hook can return no value, it'll be treated as Proceed status.

When hook returns Confirmation status, the Yes/No confirmation dialog will be shown. Yes is treated as ProceedWithParams status (if you don't want to change any params, pass the original hook argument as params). No is treated as Cancel status.

Screen pop object type is CRM-dependent. Find your CRM object description in the documentation.

There must be only one Hook API implementation. The reason for this is that the Five9 adapter expects only one hook response. If there are multiple responses, and they differ, the Five9 adapter cannot determine the correct one. In practice, the first response is processed, and the rest are ignored, with no guarantee of the order in which responses are received.

Note: the Hook Api must be enabled when loading the adapter URL with the f9hookapi=true parameter.

Methods

registerApi(param) → {void}

Registers implementation of callbacks integrating ADT with CRM system. See example in Integrating ADT inside web page

Parameters:
Name Type Description
param HookApiCallbacks

object with properties corresponding to callbacks you would like to implement

Returns:
Type:
void