OroCRM Forums

Covering OroCRM topics, including community updates and company announcements.

Forums Forums OroCRM OroCRM – Feature Requests Send email to Case assignee when assignee is changed

This topic contains 26 replies, has 4 voices, and was last updated by  Bhavesh Tailor 7 years, 2 months ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
    Topic
  • #29991

    ianfp
    Participant

    When a Case is assigned, or when the assignee is changed, I want the new assignee to be notified by email.

    So I go to System > Emails > Notification Rules and I start adding a new rule. I choose “Case” as the Entity Name, but it seems the only “dynamic” recipient I can choose is the Case owner — I can’t choose the Case assignee. Furthermore, the only Event Name options I have are “Entity create”, “remove”, and “update” — “Entity change assignee” is not an event option.

    Questions:
    1) Have I correctly understood the limitations of the Notification Rules system, or is there some way to get it to do what I want?

    2) If it cannot do what I want, are there any plans to make it more flexible?

    3) In the meantime, can I add some custom code to do what I need? How would I begin? Can I add an event listener that can identify if the assignee has been changed?

Viewing 11 replies - 16 through 26 (of 26 total)
  • Author
    Replies
  • #30007

    Bhavesh Tailor
    Participant

    Hi Mike ,

    I have create this process by custom code and it’s work . Thank you for quick response .

    Thank You


    Bhavesh

    #30008

    Mike Kudelya
    Participant

    Could you please let me know what I am doing wrong?

    Please change:

    to:

    Don’t forget set cron as i said above.

    #30009

    Bhavesh Tailor
    Participant

    Hi Mike ,

    Yes sure mike , i already set corn as you mention in above comment like this

    */1 * * * * /usr/bin/php /home/ilogix/Workspace/orocrmdemo/app/console –env=prod oro:cron >> /dev/null

    Mike i am not able to create case don’t know why . i have setup all as per your guidance . I am able to create process via custom but not through process.yml

    thank you for your quick response .


    Bhavesh

    #30010

    Mike Kudelya
    Participant

    You didn’t answer on my question:

    As i understood you have the following flow:

    In contact request form email field is mandatory.

    1. I think you should search contact by email. Something like this “select * from orocrm_contact c where c.email = ’email which user entered’”.
    1.1 Contact has been found – case must be created, ContactRequest is not.
    1.2 Contact hasn’t been found – ContactRequest must be created, case is not.

    Right ?

    #30011

    Bhavesh Tailor
    Participant

    Yes i created custom query for search by email into

    Workspace/tdm_marketsnap_com/src/MarketSnap/Bundle/EmbeddedFormBundle/Controller/EmbedFormController.php . There customize code as per my requirement .

    1.search contact by email.
    1.1 Contact has been found – case must be created, ContactRequest is not.
    1.2 Contact hasn’t been found – ContactRequest must be created, case is not.

    Thank You


    Bhavesh

    #30012

    Mike Kudelya
    Participant

    Here is process that does the following work:

    1.search contact by email.
    1.1 Contact has been found – case must be created, ContactRequest is not.
    1.2 Contact hasn’t been found – ContactRequest must be created, case is not.

    #30013

    Bhavesh Tailor
    Participant

    Hi Mike ,

    It’s Work For me . Do you have any idea how to assign.

    for example for user xyz@gmaail.com which is already exist and case created with assign,
    1. if user assign for xyz user then assign value also add into create case from embedded
    2 if not assign any single case for this user then it should be blank .


    Bhavesh

    #30014

    Mike Kudelya
    Participant

    Hi

    I think you should add this before @remove_entity

    Also i want to notice that you can look at orocrm actions and learn how they work here.

    #30015

    Bhavesh Tailor
    Participant

    Hi Mike ,

    I am not able to get assign value, i have added assign entity as per you mention above my code is :


    Bhavesh

    #30016

    Mike Kudelya
    Participant

    This additional code allows you assign to case entity, contact’s assign user, if contact’s assign user exists. As i understood this is what you want. I tested this code, it works.

    #30017

    Bhavesh Tailor
    Participant

    Hi Mike ,

    For Example I have user XYZ and this user have case with Assigned To value (if you edit case then this field will display) . If you given Assigned To is ABC and

    If another case will create for XYZ user from embedded web form then this Assigned To value is set for this also .

    I hope you understand .

    Thank You


    Bhavesh

Viewing 11 replies - 16 through 26 (of 26 total)

The forum ‘OroCRM – Feature Requests’ is closed to new topics and replies.

Back to top