Forum Discussion

ronaksomani's avatar
9 years ago

Activity Object for User Update

Hi,

 

I want to capture the rank change activity for a User in community. I have tried to make use of Freemarker Activity Context Object as below: 

<#if activity.results.name.UserUpdated?? >

</#if>

But above condition is success only in new session, if in same session there is Rank change for member, this condition still returns false. I am writing it in Page Footer section.

Also, if condition is success, it symbolizes that User Object has been updated, but I want to capture Rank change event in specific.

 

Is there a way to achieve it?

Any help will be appreciated.

  • ChhamaJ's avatar
    ChhamaJ
    Khoros Staff

    Hi There,

     

    Unfortunately there is no way to get Rank change specific event updates via freemarker as of now.  The only best solution I can suggest is to get in touch with Professional services since they have more access to event listeners than what we expose to freemarker. They will be able to build a customization for you.

     

    Sorry about that.

     

    Regards,
    Chhama

    • ronaksomani's avatar
      ronaksomani
      Mentor

      Hi ChhamaJ,

       

      Thanks for the response.

       

      So other part of query, in same session if there is a change in User Object due to number of page views or messages read, below userUpdated condition does not return success. Is there any way I can achieve it?

       

      <#if activity.results.name.UserUpdated?? >

      </#if>

       

      Another observation, API2 call for users resource takes time to reflect latest info. So is there a way to retrieve latest user info as soon as there is change in user object.

       

       

      • ChhamaJ's avatar
        ChhamaJ
        Khoros Staff

        So for the UserUpdated event, there are some properties that get updated as soon as you save (without coming out of the session), for example, any thing changed on the My Settings page will result in the user updated event getting fired immediately. 

         

        But that said, there are certain things that gets updated only when a user signs in. So, you definitely need to be in a new session for the user updated event to get fired. Rank change is one of those.

         

        As for API v2, is your use case to get info for all users or can you query by id? if you constrain by id then the query goes to database and is fast enough to give you most updated info. API v2 uses lucene indexes (except when queried by id) which may take some time to get updated depending on the load on the queue. But it should be fast enough for most cases.

         

        Hope this helps.

         

        Regards,
        Chhama