No announcement yet.

Changing Entity Displayed in Stream

  • Filter
  • Time
  • Show
Clear All
new posts

  • Changing Entity Displayed in Stream

    Hello again,

    Can I just start by saying how much I appreciate the EspoCRM community. I've posted 3 or 4 times on here now and you all have been nothing but accommodating. I really appreciate it and I apologize for making another post trouble-shooting a small issue but I've searched through every single post and I cannot find the answer.

    So I have created a base entity called "Quotes" which is properly linked to my Accounts, Leads and Contacts entity... However, my stream is constantly being spammed every single time I post anything, and moreover, especially for the "Quote" stream entity, it is posting the product code rather than the associated account (whether thats a lead, account or contact.)

    I suppose, my question in the simplest form is - how do I change the default reporting value of my entity in the stream? I'd rather have the customer name be created rather than the product code.

    Also, part two - how do I turn the noise down on the Stream? I'm still in the process of setting this up for my company and so far it's working well (obviously there are limitations we hope to solve when we purchase the sales package) but for now, I need to iron out all the kinks before we can proceed.

    I've attached a picture of my stream, I hope it makes sense.

    Just to note - the pink "produce code" section is where I'd rather have the customer name displayed... surely it's possible to set what the default recording values are?

    PS, an afterthought - would the developers of EsproCRM be open to a discord server? I think it would go along way to fixing small issues rather than taking up an entire post on the forum. I'm sure my problem is something silly but I just can't seem to figure it out.

    Cheers again for all the help, you guys are amazing!

    PSPS, I think I initially posted this to the wrong sub-forum, sorrryyy

  • #2
    Welcome Marcus, it good that you post. Keep the forum alive and what not.

    Creating a new entity call Quotes is probably not a good idea I think, because you will probably need to code it to work properly as true Quotes entity. But if you just need the basic I suppose it will be good enough.

    Personally I don't bother to create Quote/Invoice/Purchase entity yet because I'm planning to just buy the Extensions once we have "CRM upgrade money".

    To answer your question, the Stream section is relating to the "Audit" option in field. Any field that you don't want Stream (Audit) then you can turn off that option.
    For example: Administration \ Entity \ Manager \Account Fields \ name > audited

    Personal I feel that the stream is quite clogging at the moment which I don't use quite often, furthermore it being Lock up top making it difficult to browse. Hopefully in the future audit trail can be separated from "Timeline" trail.


    In term of Discord server, this post will be hidden away in a thread that is not related and will get bury. Probably best to post as a new thread and different thread.

    In term of putting another place where they need to manage I doubt they (the official team) would be considering it at this stage. However if you want to start one up I would not mind joining, although I am rarely active on discord but sometime for "instant feedback" discord is a good channel to use.
    Last edited by espcrm; 02-27-2020, 06:58 AM.


    • #3
      Hello there, I appreciate your reply.

      We are as well planning to buy the Extensions but first I need to use it and understand it.

      I appreciate that you can turn the audit'd name off, I've already done this but it still seems awfully spammy. My main question still remains unanswered though... say I have a product called X... it posts to the stream "Marcus created quote X"... rather than "Marcus created quote X for Customer Y" or even just "Marcus created quote for customer Y".. That's what I want to change... I want the actual ENTITY being displayed to be changed.... and I don't know how to do that?

      PS: I've been a member of this forum for less than a monthly, I'm far from the best person to start the discord server
      Last edited by Marcus; 02-27-2020, 10:12 AM.


      • espcrm
        espcrm commented
        Editing a comment
        Can't help you there, telecastg seem to post the solutions if you're technical enough to use that function.

        In term of your qualification, it doesn't really matter at this stage, you're a Feb 2020, I'm just a Jan 2020 but as long as we are active enough that is good enough for now. We not getting pay for this and we all learning from each others about EspoCRM.

        Not unless the discord server is use to chat about life, hobbies or interest.

    • #4
      Here is another example of the stream showing basically no specific information. I uploaded around 30 documents and it shows this.... How do I change the default stream entity from "Document" to maybe the file name;

      eg: "Marcus created document CustomerXYZInvoice"


      • #5
        Right, so I've done a bit of digging and it appears that the code will pull the {entitytype}

        "streamMessages": {
        "post": "{user} posted on {entityType} {entity}",
        "attach": "{user} attached on {entityType} {entity}",
        "status": "{user} updated {field} of {entityType} {entity}",
        "update": "{user} updated {entityType} {entity}",

        So the stream will automatically post "user updated status of entitytype" rather than for isntance, "user updated status of account"...

        Does anyone know if there is a way to have it pull for instance, an account or contact instead?


        • #6
          Check this thread, I think it may help

          Also please note that the language JSON scripts (everything under sub-folders i18n) do nothing but provide translations for labels on different languages, they don't affect any logic.
          Last edited by telecastg; 02-27-2020, 03:32 PM.


          • #7
            Hello Telecastg, thanks for the quick reply. There is no custom/Espo/Custom/Hooks/ folder on my webserver, nor any hook-related files except webhook which looks largely irrelevant. I don't think that thread helps at all, maybe I'm missing something though?


            • #8
              Hi Marcus,

              custom/Espo/Custom/Hooks is a folder that you would create to store your custom hook to make changes to the stream before or after the record has been saved to the database.

              The custom hook doesn't exist out of the box, you need to create it.

              Here's some information on Espo hooks
              Last edited by telecastg; 02-28-2020, 04:18 PM.


              • #9
                Hello telecastg, thanks for the quick reply.

                So just to check, if I added a custom hook - that would override and change the how the stream content is delivered?


                • #10
                  Hi, it would not change "how" it is delivered (the presentation) but it would change "what" (the content) that is delivered.

                  The custom hook will store the Note (stream is a collection of "Notes") information and then that information will be delivered as part of the Stream.


                  • #11
                    Hello Telecast, thanks for your reply.

                    I have to be honest because I am even more confused now than when I started this whole exercise.

                    Please see the attached photo - when I updated a "task" relating to a specific "customer/lead" - it printed out in the stream, EXACTLY how I wanted the stream to be presented. What makes Lead different because this is exactly what I want, for everything?

                    When I update, say a document - I want it to say "documents related to @Account", or when I setup a meeting for a specific account, I want it to say "meeting related to {account}.." but it doesnt?!
                    Last edited by Marcus; 03-04-2020, 09:03 AM.


                    • #12
                      Hello Marcus,

                      The note that your are seeing (remember that the Stream is a collection of "Note" records) when the task linked to a lead was updated, was generated automatically by Espo.

                      You can check the script application\Espo\Services\Stream.php if you would like to learn how this is done, but in order to make any changes to your installation "upgrade safe" I would not recommend to make any changes to this or any other core script.

                      To make custom changes to a Note that is automatically generated or to write a custom note after an event (for example linking a Document to an Account) you need to create or change the Note record using a custom hook.

                      This is exactly the case that was addressed in the posting that I originally recommended.

                      What you are trying to accomplish is something that at least at present, will require some back-end development and a basic familiarity with the concept of custom hooks in Espo. There is no way (that I know of) to accomplish your goal using settings or a GUI facility.
                      Last edited by telecastg; 03-04-2020, 04:15 PM.


                      • #13
                        Gotcha, I appreciate the reply. I'll continue to look into this and appreciate your patience. I'll get back to you with my successes or failures in the next few days.. Thanks again!

                        Sidenote, EspoCRM should really let us customize the content on the Stream! It's such a powerful tool that really needs the ability to tailor content!

                        I see you are a fairly senior member of the EspoCRM forum, if you by chance talk to the developers (or are one - I'm still new around here so I don't know whos who yet), would be a great implementation into version 6.0!


                        • telecastg
                          telecastg commented
                          Editing a comment
                          You're very welcome :-)

                          I am not a professional developer, and not related to the Espo team at all, I am only a user and my experience comes from adapting Espo to our own business needs but I believe like I think many other contributors do, that a way to "payback" for the benefits of having such a great open source and free platform is to make this forum a knowledge database that can help promote and advance it.


                        • espcrm
                          espcrm commented
                          Editing a comment
                          It easy to tell who the developer is:

                          From the look of it there is only 2 mains person. Everyone else is user who made contribution. If you have the coding knowledge, you can always try to do a Pull Request and if the main developer believe it the code is good for the mass user they will implement it. Otherwise you would just have your own development channel like telecastg did:

                          I pretty much using all of telecastg extension, well installed but haven't really use it at this stage.

                          In term of "Member" Title, don't think too much about "Junior" or "Senior" members, if you post enough you just automatic get update to that Title (like every other forums). You can also tell if we are a community user by our lack of decoration (no avatar). We are not restrict, just that I think most don't care about customizing their forum profile.

                          (Wow I just notice this SMS gateway thing, going to look like this).
                          Last edited by espcrm; 03-05-2020, 06:08 AM.

                        • telecastg
                          telecastg commented
                          Editing a comment
                          bandtank another forum contributor, who is lot more skilled with Github and many other areas than me, created a repository where my extensions, and hopefully soon, others from the community participants, can be stored and made available.

                          Please note that the other scripts in my repository are mostly work in-progress which you are free to check and comment on them but they are not ready to be downloaded as an extension.
                          Last edited by telecastg; 03-05-2020, 07:27 PM.

                      • #14
                        Thanks for the replies telecastg and espcrm . Unfortunately my coding knowledge is quite limited so I don't think I'll make an attempt at this however, I would say an extension that allows customization of the stream would be a great addition if any contributor felt so inclined! Thanks again for your time, I love this community, I just wish I had more to contribute other than support-related content haha


                        • #15
                          Based on this screenshot here:

                          I think it just a matter of time before it get changed to look more readable. I believe why it looking it is can only be of two reason (1) No coding for it yet or (2) Did it on purpose to make the system faster.

                          Yes, the whole Hook thing sound too complicate for me, if it just require some slight {field} coding then no problem.

                          ---- Marcus I was just about to post above but had a look at my EspoCRM and it look here, everything is linked and file is shown nicely.

                          See screenshot. Is there something I'm missing?
                          Last edited by espcrm; 03-13-2020, 08:41 AM.