Customer Portal

Get Involved. Join the Conversation.

Topic

    Jseymour jseymour@solihull.gov.uk
    Active customer portal accounts
    Topic posted June 27, 2019 by Jseymour jseymour@solihull.gov.ukGreen Ribbon: 100+ Points 
    28 Views, 1 Comment
    Title:
    Active customer portal accounts
    Summary:
    Report on when customers last logged on
    Content:

    I have a report that tells me how many accounts have been set up but I would like to know date last logged in to establish if customers are actively using the customer portal or have set up account and then only visited once. So is it possible to have date last logged in ?

    Version:
    19A

    Comment

     

    • Dev Aditya

      Hi Jseymour,

      Oracle Service Cloud provides you table that logs all the actions performed on CP- 'clickstreams'. Please check the below documents to better understand its usage

      1. Answer ID- 5142

      2. Answer ID- 5013

       

      However, if you want to make something custom, that give you exact data you are looking for, then, you can implement below given solution:

      1. Create a custom object with 'Contact' as parent object. Let us name it 'Contact Session' It will have mainly two date fields- LogIn and Log Out. Both of them will be of date/time data type. You can create more fields as per your requirement.

      2. Write two hooks- 'pre_login' and 'pre_logout'

      3. pre_login: In this hook, create new 'Contact Session' object record under contact ID who is trying to log in and stamp system date in 'Log In' field under custom object. This will create a new record for every login

      4. pre_logout: In this hook, stamp the system date in the latest 'Contact Session' record under the respective contact.

       

      Now you have Login and Log out time stamped for each contact for each session, you just need to fetch them in report.

       

      I hope it helps.

       

      Thanks,

      Dev