anchor.diff:  -spec maybe_handle_event(kz_term:api_binary(), kz_json:object()) -> 'ok'.
   maybe_handle_event('undefined', _JObj) -> 'ok';
   maybe_handle_event(AccountId, JObj) ->
  -  lager:info("IAM webhook JObj: ~p",[JObj]),
  -  lager:info("IAM webhook AccountId: ~p",[AccountId]),
       case webhooks_util:find_webhooks(?HOOK_NAME, AccountId) of
           [] ->
               lager:debug("no hooks to handle for ~s", [AccountId]);
  
positive.code:     end.
  
  handle_event(<<"CHANNEL_CREATE">>, JObj, Hook) ->
      lager:info("=================================================="),
      lager:info("IAM print_hooks event_name: CHANNEL_CREATE"),
      lager:info("IAM print_hooks webhook.hook_event: ~p", [Hook#webhook.hook_event]),
      lager:info("=================================================="),
      {'ok', Cookie} = amocrm_auth_cookie(Hook),
      contact_lookup(Cookie, JObj, Hook),
      'ok';
  
  handle_event(<<"CHANNEL_ANSWER">>, JObj, Hook) ->
      lager:info("=================================================="),
      lager:info("IAM print_hooks event_name: CHANNEL_ANSWER"),
      lager:info("IAM print_hooks webhook.hook_event: ~p", [Hook#webhook.hook_event]),
      lager:info("=================================================="),
      {'ok', Cookie} = amocrm_auth_cookie(Hook),
      case contact_lookup(Cookie, JObj, Hook) of
          {'ok', 'contact_not_found'} ->
              'ok';
          {'ok', Contact} ->
              Note = compose_note(JObj, Contact),
              lager:info("IAM print_hooks Note: ~p", [Note]),
            Res =  set_note(Cookie, Note, Hook),
              lager:info("IAM print_hooks set_note Res: ~p", [Res]),
              'ok';
          {'error', 'contact_lookup_failed'} ->
              'ok'
      end;
  
  handle_event(<<"CHANNEL_DESTROY">>, _JObj, Hook) ->
      lager:info("=================================================="),
      lager:info("IAM print_hooks event_name: CHANNEL_DESTROY"),
      lager:info("IAM print_hooks webhook.hook_event: ~p", [Hook#webhook.hook_event]),
      lager:info("=================================================="),
      'ok'.
  
  compose_note(JObj, Contact) ->
      ElementTypes = [{<<"contact">>, 1}
  
negative.code:                  ,<<"App-Version">>
                   ,<<"App-Name">>
                   ,<<"Event-Category">>
                   ,<<"Custom-Channel-Vars">>
                   ],
      kz_json:normalize_jobj(JObj1, RemoveKeys, []).
  