BPM: notify a favorite user

Hello, is it possible through sugarbpm to notify a user who has indicated a record as a favorite?

I'll explain better:

  • user 1 indicates the ABC account as a favorite
  • a note (or call or meeting) related to the ABC account is created
  • through BPM I would like to send an email to all users who have indicated the ABC account as a favorite

Thanks,

Mirco

  • Hi Out of the Box it is not possible to do that. But it is possible to extend SugarBPM components in order to accomplish such a requirement.

    André Lopes
    Lampada Global
    Skype: andre.lampada
  • Hi André, thank you for your answer, I'll try to do it. Thanks

    Mirco Marcigaglia
    Presales Consultant & Process Innovation
  • second possibility is that can help with his awesome logic builder :-)

    Bests

    Björn

  • You could also achieve this with a custom after_relationship_add logic hook on the account.

    The MailerFactory makes it easy to send an email.

    I have not played with this before but Favorites are stored in the SugarFavorites module so you should be able to use the "accounts_favorite" link which links the Users module to the Accounts module for this purpose, and the Users related to the Account, and their primary email address from there, at which point you can compose a group email, or email the users individually and let them know which Related record was added to that Account.

    Per the Accounts vardefs:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    'accounts_favorite' =>
    array (
    'lhs_module' => 'Users',
    'lhs_table' => 'users',
    'lhs_key' => 'id',
    'rhs_module' => 'Accounts',
    'rhs_table' => 'accounts',
    'rhs_key' => 'id',
    'relationship_type' => 'user-based',
    'join_table' => 'sugarfavorites',
    'join_key_lhs' => 'modified_user_id',
    'join_key_rhs' => 'record_id',
    'relationship_role_column' => 'module',
    'relationship_role_column_value' => 'Accounts',
    'user_field' => 'created_by',
    ),
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    I don't know if you've considered this, but maybe, instead of creating more email, Following/Favoriting records would be enough for your business purpose?

    https://support.sugarcrm.com/Documentation/Sugar_Versions/12.0/Ent/Application_Guide/User_Interface/#Following_Records

    FrancescaS

  • thank you too. I need to forward everything to my colleagues to evaluate the best alternative. Have a nice day (cc )

    Mirco Marcigaglia
    Presales Consultant & Process Innovation
  • Se riuscite a usare quello che offre il software vi rendete la vita più semplice a lungo termine... con Sugar si può fare di tutto e in mille modi, ma non sempre è un bene farlo. 

    Buona giornata,

    Francesca