NuanceMessagingFragment

NuanceMessagingFragment is an Android Fragment component which implements a messaging UI. SDK allows you to customize the look and feel of the Messaging UI. NuanceMessagingFragment uses all the SDK Api's described in the previous session of this document to create an engagement with the agent.

NuanceMessagingFragment inherits all of the style properties of NuanceMessagingActivity to customize its look and feel.


	  if(NuanMessaging.getInstance().isChatInProgress()) {
            nuanceMessagingFragment = NuanMessaging.getInstance().restoreBrandedMessagingFragment(this, engageParams);
        } else {
            nuanceMessagingFragment = NuanMessaging.getInstance().getBrandedMessagingFragment(this, engageParams, agentAttrs, dataPasses);
        }
        nuanceMessagingFragment.setNuanceMessagingFragmentActionListener(this);
        nuanceMessagingFragment.setTitleUpdateListener(this);



Use the SDK exposed API's to instantiate the messaging fragment

Public Methods
  • public NuanceMessagingFragment getBrandedMessagingFragment(final Context context, final HashMap engageParams, final HashMap agentAttributes, final HashMap datapass)

    Context: Current context object

    engageParams:Engage parameters needed to create an engagement.It must be an instance of HashMap with following keys.

    siteID SiteID parameter is mandatory to create an engagement.
    buID Mandatory Business Unit ID to check agent availability and HOP availability.
    agID Mandatory AgentGroupID which is required for a new engagement.
    brID Mandatory Business rule ID is used to tie this engagement to a business rule for reporting purposes
    openerText Opener message that will be added to transcript upon agent assign.
    opID ID of the Opener message that is configure is portal.
    brName BusinessRuleName parameter is optional.
    autoID Associated automation ID with this engagement request.
    pageID Page Marker ID where an engagement starts.
    priority Initial engagement priority of the engagement request. A higher number indicates a higher priority in the queue
    qmSpecID The ID of the queue messaging spec as identified in TouchPortal. If the queue messaging spec is valid, it will pull the proper queue message and display it as message text when the API caller calls the Get message API call.
    qt Queue threshold value for engagement. Used to calculate whether this engagement goes into the queue in cases where agent slots are not available.
    scriptID ID of the agent’s scripts for this engagement.
    isAsyncEngagement Set the value to true if this is an asyncronus engagement.
    customerName Value of this parameter will be displayed in the customer bubble.

    Refer "Displaying Customer/Agent name in bubbles" section of this page.

    autoDataPass Use this field to pass automaton Datapass.

    agentAttributes: List of agent attributes used in routing process. Format: attribute1,value1;attribute2,value2 etc.

    dataPass: Data pass attributes in name and value pairs.

  • public NuanceMessagingFragment restoreBrandedMessagingFragment(final Context context, final HashMap engageParams)

    Context: Current context object

    engageParams:Engage parameters needed to create an engagement.It must be an instance of HashMap with following keys.

  • public void onPoped()

    Use this method to clean up the resource if in case fragment is poped from backstack

NuanceMessagingFragment is designed to be used within a fragment. Its up to the containing activity to provide the title and title action icons like close and minimize.

shadowed image