Email Visibility in Contact Stream

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Stefan
    Member
    • Jul 2021
    • 80

    #1

    Email Visibility in Contact Stream

    Hello,

    could someone please explain to me how it’s determined whether emails appear in the contact stream or not?

    I’ve noticed that – even when emails are correctly linked – they don’t always show up in the stream, even for me as an admin.

    My assumption is that regular users only see emails from their assigned team. Is that correct?

    I actually thought that as an admin, I would be able to see all emails in the contact stream, but that doesn’t seem to be the case in practice.
  • Stefan
    Member
    • Jul 2021
    • 80

    #2
    Could someone please explain this to me?

    I would like the e-mail history of Contacts to be visible to the assigned users/groups in the stream. But somehow this doesn't seem to work.

    Comment

    • yuri
      Member
      • Mar 2014
      • 8900

      #3
      Stream notes about emails are visible to users who have access to referenced emails (via the users or teams links IIRC). A note is linked with users and teams separately (otherwise we would have a massive performance drop).
      If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

      Comment

      • Stefan
        Member
        • Jul 2021
        • 80

        #4
        Originally posted by yuri
        Stream notes about emails are visible to users who have access to referenced emails (via the users or teams links IIRC). A note is linked with users and teams separately (otherwise we would have a massive performance drop).
        Thanks for the answer yuri! As admin I have access to emails (on the Email page) which are not visible in the stream. Why is that? How can I change it?

        For example (It is correctly related to a contact Jana XXX):

        Click image for larger version

Name:	email01.png
Views:	51
Size:	63.4 KB
ID:	116919

        But I don't see this email in the stream.

        Comment

        • yuri
          Member
          • Mar 2014
          • 8900

          #5
          Are those emails added in the stream of the Account related to the Contact?
          If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

          Comment

          • yuri
            Member
            • Mar 2014
            • 8900

            #6
            If the parent of the email was modified after it was imported, the email won't appear in the stream of the new parent.
            If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

            Comment

            • Stefan
              Member
              • Jul 2021
              • 80

              #7
              Originally posted by yuri
              If the parent of the email was modified after it was imported, the email won't appear in the stream of the new parent.
              I see.

              This means, for example, if the email has no parent when it is imported. And I assign a parent (Contact A) to the email afterwards. The email is not displayed in the stream of Contact A. Have I understood this correctly?

              Is there a way to change this behavior? Or to somehow display these emails in the stream?

              Or could we not somehow display all connected emails for a contact via the layout manager or similar? A relatsionship is apparently available.

              Comment

              • Stefan
                Member
                • Jul 2021
                • 80

                #8
                Is there a way to display these mails in the stream, i.e. to link them somehow, using a formula, workflow or hook?

                I have managed to display all mails via Report Panel, but it would be much more practical if notes and e-mails were visible in one panel (stream) for the chronological sequence of activities.

                Comment

                • Stefan
                  Member
                  • Jul 2021
                  • 80

                  #9
                  Sorry to push this topic up again, but for us it would be very important that all activities (Notes, emails) are visible chronologically in a field (stream?).

                  Is this possible by default or does it require custom coding?

                  Comment

                  • yuri
                    Member
                    • Mar 2014
                    • 8900

                    #10
                    It's possible to create a Workflow that will create a stream Note for an email if the parent is changed.
                    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

                    Comment


                    • yuri
                      yuri commented
                      Editing a comment
                      Renata is going to help with the workflow rule later.
                  • Stefan
                    Member
                    • Jul 2021
                    • 80

                    #11
                    Originally posted by yuri
                    It's possible to create a Workflow that will create a stream Note for an email if the parent is changed.
                    Thank you yuri!

                    I have already tried a bit in the sandbox myself. What I see as a problem is that it is either only possible with new incoming mails, or I can probably also display old mails in the stream with a report, but then not in chronological order.

                    So if I want to note the email from last week in the stream, even if I change createdAt, it is displayed today. This is the formula I tried for testing purposes in the sandbox:

                    Code:
                    $noteId = record\create('Note',
                      'parentType', 'Contact',
                      'parentId', parentId,
                      'post', "Test"
                    );
                    Code:
                    record\update(
                      'Note', $noteId,
                      "createdAt", "2025-05-04 12:00:00");
                    I just want to display all connected activities (emails, notes) in the stream in chronological order.

                    Comment

                    • lazovic
                      Super Moderator
                      • Jan 2022
                      • 955

                      #12
                      Hi Stefan,

                      You can create the following workflow for the note about received email to appear after Contact parent changed for email:

                      Click image for larger version  Name:	image.png Views:	0 Size:	51.9 KB ID:	117338

                      Click image for larger version  Name:	image.png Views:	0 Size:	54.1 KB ID:	117339

                      Formula script:
                      Code:
                      createdById = 'system';
                      createdByName = 'System';
                      
                      $emailId = workflow\targetEntity\attribute('id');
                      $emailName = workflow\targetEntity\attribute('name');
                      
                      $parentId = workflow\targetEntity\attribute('parentId');
                      $parentName = workflow\targetEntity\attribute('parentName');
                      
                      $data = object\create();
                      
                      object\set($data, 'emailId', $emailId);
                      object\set($data, 'emailName', $emailName);
                      object\set($data, 'personEntityId', $parentId);
                      object\set($data, 'personEntityName', $parentName);
                      object\set($data, 'personEntityType', 'Contact');
                      
                      data = $data;


                      Also, you can create the following workflow for the note about sent email to appear after Contact parent changed for email:

                      Click image for larger version  Name:	image.png Views:	0 Size:	51.1 KB ID:	117340
                      Click image for larger version  Name:	image.png Views:	0 Size:	33.6 KB ID:	117341

                      Formula script:
                      Code:
                      createdById = 'system';
                      createdByName = 'System';
                      
                      $data = object\create();
                      
                      $emailId = workflow\targetEntity\attribute('id');
                      $emailName = workflow\targetEntity\attribute('name');
                      
                      object\set($data, 'emailId', $emailId);
                      object\set($data, 'emailName', $emailName);
                      
                      data = $data;


                      I kindly ask you to note that it is not possible to change the createdAt field of notes.

                      Comment

                      • Stefan
                        Member
                        • Jul 2021
                        • 80

                        #13
                        Thank you very much for the detailed answer lazovic !

                        Unfortunately, I don't think this is a solution to my problem, because it only affects new e-mails, correct?

                        Comment

                        Working...