Package 

Class CfLogLevelEvent.Builder


  • 
    public final class CfLogLevelEvent.Builder
    
                        

    CfLogLevelEvent is to log the update of user level. It required the user level before update and user level after the update. You need to pass module Id as well if the level update event is triggered because of the e-learning content block, any achievement in the e-learning platform.

    • Method Detail

      • setPreviousLevel

         final <ERROR CLASS> setPreviousLevel(Integer prev_level)

        setPreviousLevel is required to set the previous score/level number for the user.

      • setNewLevel

         final <ERROR CLASS> setNewLevel(Integer new_level)

        setNewLevel is required to set the new score/level number for the user. This can be from any source, e-learning or e-commerce or even social.

      • setModuleId

         final <ERROR CLASS> setModuleId(String module_id)

        setModuleId is for specific use-case when update of level is from e-learning. In such case module id is required, otherwise you can pass null for this as well.

      • setMeta

         final <ERROR CLASS> setMeta(Object meta)

        You can pass any type of value in setMeta. It is for developer and partners to log additional information with the log that they find would be helpful for logging and providing more context to the log. Default value for the meta is null.

      • updateImmediately

         final <ERROR CLASS> updateImmediately(Boolean update_immediately)

        updateImmediately is responsible for updating the values ot the backend immediately. By default this is set to false or whatever the developer has set in the SDK initialisation block. This differs the time for which the logs will be logged, if true, the SDK will log the content instantly and if false it will wait till the end of user session which is whenever the app goes into background.

      • build

         final <ERROR CLASS> build()

        build will validate all of the values provided and if passes will call the track function and queue the events based on it's updateImmediately value and also on the user's network resources.