watsonx Assistant

 View Only
Expand all | Collapse all

Including chat history with post-chat feedback using custom panels

  • 1.  Including chat history with post-chat feedback using custom panels

    Posted Tue April 05, 2022 09:30 AM
    Hi,

    Looking into ways to offer customers the option of providing direct feedback from the Watson Assistant web chat window, e.g. with thumbs up / -down or star-rating buttons, and possibly some text input, it seems like implementing a Custom Panel would be the way to go - does that make sense?

    When sending the feedback, it would be useful to include the chat history with the submitted feedback.  How can that data be obtained from the web chat API JS instance?

    ------------------------------
    Björn Þór Jónsson
    ------------------------------

    #WatsonAssistant


  • 2.  RE: Including chat history with post-chat feedback using custom panels

    Posted Tue April 05, 2022 10:10 AM
    A custom panel makes sense, that is one of the envisioned uses of the panels.  I would limit the amount of data and dialog in that panel - keep it to just stars, thumbs up/down, and a single line for comments.  Chat history can be pulled in other ways from AP, especially if you provide a conversation ID and timestamp - do that as a post-processing step when it is needed.

    ------------------------------
    Daniel Toczala
    Community Leader and Customer Success Manager - Watson
    dtoczala@us.ibm.com
    ------------------------------



  • 3.  RE: Including chat history with post-chat feedback using custom panels

    Posted Tue April 05, 2022 01:02 PM
    Edited by System Fri January 20, 2023 04:23 PM
    Thanks for the input, Daniel.

    Good to know I'm on the right track with panels; will try something like you suggest, thumbs or stars, a line for a comment and maybe another optional for an email address, should the customer like to be contacted.

    Are there API (v2) endpoints for pulling the chat history by conversation ID and timestamp?  Can you please point to such endpoints or even provide an example? - I haven't found in the documentation what endpoints I could use for that, though I do see v1 logs can be filtered by conversation_id.

    ------------------------------
    Björn Þór Jónsson
    ------------------------------



  • 4.  RE: Including chat history with post-chat feedback using custom panels

    Posted Tue April 05, 2022 04:57 PM
    Edited by System Fri January 20, 2023 04:34 PM
    - It's also unclear to me from where I could obtain the conversation ID:

    examining the "event.data" from the receive event, I see "data.history.timestamp" but the ID attributes observed there under "data" - "id", "request_id", "thread_id" - all seem to be different at each turn of the conversation.  Should I be using some other event to obtain the conversation ID ?

    ------------------------------
    Björn Þór Jónsson
    ------------------------------



  • 5.  RE: Including chat history with post-chat feedback using custom panels

    Posted Tue April 05, 2022 05:01 PM
    I think it requires a V1 API endpoint.  You can use both APIs - even in the same project.

    ------------------------------
    Daniel Toczala
    Community Leader and Customer Success Manager - Watson
    dtoczala@us.ibm.com
    ------------------------------



  • 6.  RE: Including chat history with post-chat feedback using custom panels

    Posted Tue April 05, 2022 05:34 PM
    Thanks.

    How could the conversation ID be obtained, to send along with other feedback data, from the Custom Panel?

    ------------------------------
    Björn Þór Jónsson
    ------------------------------



  • 7.  RE: Including chat history with post-chat feedback using custom panels

    Posted Mon April 18, 2022 02:51 PM
    Hello,  

    Not sure if you have look at this documentation for v2 API
    https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-filter-reference
    https://cloud.ibm.com/apidocs/assistant/assistant-v2#listlogs

    If you give it a try on the Postman like this.
    https://api.us-south.assistant.watson.cloud.ibm.com/instances/{{instance_id}}/v2/assistants/{{assistant_id}}/logs?version=2021-06-14&response_timestamp>2022-01-01&response_timestamp<2022-02-15

    This will filter the logs given between the two time frames.
    In your case, you might want to filter based on
    • assistant_id
    • customer_id
    • session_id
    • response_timestamp

    We have an accelerator which is not exactly the same use case, but the concept is to print out all the conversation in an Administrative dashboard.  We used a different strategy than calling the /logs api.  We store the conversations as they happened because we can also do some analysis.  Here is a screen shot of what it looks like.  


    If you need help doing the implementation, feel free to contact me at my email.  We might be able to help you.  Thanks. 



    ------------------------------
    Talent Creator (Jane Fung)
    Principal Educator
    Talent Creator Inc.
    educator@talentcreator.ca
    ------------------------------



  • 8.  RE: Including chat history with post-chat feedback using custom panels

    Posted Wed November 16, 2022 04:42 PM
    hi,

    I have a similar requirement. Were you able implement the survey in Watson Web chat UI? Any Challenges?

    ------------------------------
    Subbu Venkataraman
    ------------------------------



  • 9.  RE: Including chat history with post-chat feedback using custom panels

    Posted Thu November 17, 2022 05:47 AM
    Hi,

    A survey in the form of thumb-icons has been implemented, but not deployed or thoroughly tested.  Instead of obtaining the chat history from the logs API as discussed above, the first iteration collects it to a data structure client side and posts it along with the feedback to a REST endpoint (implemented with Node-RED in this case).

    The main challenge was with the UI components, as we wanted to use CSS based icons from Font Awesome, but that didn't work out, so we display custom, pixel based icons.  The implementation can be seen here:

    https://github.com/island-is/spjallmenni

    ------------------------------
    Björn Þór Jónsson
    ------------------------------



  • 10.  RE: Including chat history with post-chat feedback using custom panels

    Posted Thu November 17, 2022 08:25 AM
    Thanks so much for your response.  I would expect Watson to have some OOTB UI  functionality to make developer lives easier. 
    I may recommend going with displaying options for Survey ie "Was i helpful"   "Not helpful"  as first release.  We are implementing chatbot to internal users. So, i guess there is a bit more time to experiment the UX

    Thanks again for your quick response

    Subbu

    ------------------------------
    Subbu Venkataraman
    ------------------------------