Rest api add Calls

Hi,

I'm a developer at Ringover, a web-based telephony solution.
We use Sugar's REST API to log calls in our client's instances.


One of our mutual clients reported an issue: when we add a call, emails are sent.

This behavior is undesirable but we haven't seen anything in the API that allows us to control this behavior.

The client persists in claiming it's on our end (he contacted Sugar support).
He sends us an image of the sugar interface, but we haven't found anything in the API that references this.



Can anyone help us with this ?
We use this rest route to add a call.
support.sugarcrm.com/.../


Thank you !
Regards
Rémi MOINAS
Ringover Group

Parents
  • If I am not mistaken, and I've not tried this, setting the $callsBean->send_invites  to false in your Calls bean should stop the notifications from being sent, by default they are sent.

    Again, I've not tried this, I just checked the _sendNotifications function in

    data/SugarBean.php in v25.1

    It looks like this, note the  comments about some bugs that may affect you.

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    /**
    * Send assignment notifications and invites for meetings and calls
    * @param bool $check_notify
    */
    // @codingStandardsIgnoreLine PSR2.Methods.MethodDeclaration.Underscore
    protected function _sendNotifications($check_notify)
    {
    if ($check_notify || (isset($this->notify_inworkflow) && $this->notify_inworkflow == true) && // cn: bug 5795 - no invites sent to Contacts, and also bug 25995, in workflow, it will set the notify_on_save=true.
    !$this->isOwner($this->created_by) && // cn: bug 42727 no need to send email to owner (within workflow)
    $this->module_name !== 'PushNotifications'
    ) {
    $admin = Administration::getSettings();
    $sendNotifications = false;
    if ($admin->settings['notify_on']) {
    $GLOBALS['log']->info('Notifications: user assignment has changed, checking if user receives notifications');
    $sendNotifications = true;
    } elseif (isset($this->send_invites) && $this->send_invites == true) {
    // cn: bug 5795 Send Invites failing for Contacts
    $sendNotifications = true;
    } else {
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    FrancescaS

Reply
  • If I am not mistaken, and I've not tried this, setting the $callsBean->send_invites  to false in your Calls bean should stop the notifications from being sent, by default they are sent.

    Again, I've not tried this, I just checked the _sendNotifications function in

    data/SugarBean.php in v25.1

    It looks like this, note the  comments about some bugs that may affect you.

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    /**
    * Send assignment notifications and invites for meetings and calls
    * @param bool $check_notify
    */
    // @codingStandardsIgnoreLine PSR2.Methods.MethodDeclaration.Underscore
    protected function _sendNotifications($check_notify)
    {
    if ($check_notify || (isset($this->notify_inworkflow) && $this->notify_inworkflow == true) && // cn: bug 5795 - no invites sent to Contacts, and also bug 25995, in workflow, it will set the notify_on_save=true.
    !$this->isOwner($this->created_by) && // cn: bug 42727 no need to send email to owner (within workflow)
    $this->module_name !== 'PushNotifications'
    ) {
    $admin = Administration::getSettings();
    $sendNotifications = false;
    if ($admin->settings['notify_on']) {
    $GLOBALS['log']->info('Notifications: user assignment has changed, checking if user receives notifications');
    $sendNotifications = true;
    } elseif (isset($this->send_invites) && $this->send_invites == true) {
    // cn: bug 5795 Send Invites failing for Contacts
    $sendNotifications = true;
    } else {
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    FrancescaS

Children
  • Hi,

    Thanks for this response and sorry for the delay.

    I tried setting "send_invites" to false/0 in the query parameters of the POST request.
    No change, invitation emails are still sent.
    Is there an email address to contact Sugar technical support ?

    Regards
    Rémi MOINAS
    Ringover Group