Configure Context Information for your Android App

The Live Experience widget lets you define a variety of context information that's relayed to the Associate Desktop and displayed to an associate when in a call.

The context information can include the caller's name and email address, phone number, and geographical location, which is then displayed for each caller in the caller information pane.
Shows the caller information pane displaying the customer's name, email address, and other details. The details presented in the caller information pane are determined by the Live Experience administrator as context attributes.
  1. To configure a particular piece of context information, use the contextAttributes set method, and specify a key indicating the name of the context attribute to set and a value indicating the value of that context attribute.

    The following table lists the default context attribute key/value pairs you can configure.

    Default Context Attribute Key and Value Pairs

    Key Value Example Notes
    appLocation "Support Tab" The appLocation value should match the name of a value configured for Application Location in the Admin Console. For information on configuring an Application Location on an engagement scenario, see Manage Engagement Scenarios.
    email "bob@example.com" Retrieved from your application's UI.
    fullName "Bob Dobbs" Retrieved from your application's UI.
    location "Scottsdale, AZ" Retrieved via the device's location API.
    phone "415-555-1212" Retrieved from your application's UI.
  2. To configure context information for the widget, add the following code to your onCreate event handler following the service configuration lines:
    // Optional context attributes...
    CommunicationFragment.contextAttributes.set("fullName","Bob Dobbs"); 
    CommunicationFragment.contextAttributes.set("email","customer@example.com"); 
    CommunicationFragment.contextAttributes.set("phone","415-555-1212"); 
    CommunicationFragment.contextAttributes.set("appLocation","Support Tab"); 

    This sets context information for a user's name, email address, and phone number, which are displayed to associates when calls come into the Associate Desktop. The example also sets the location in the app from where the call originates. For more information on context configuration, see the Live Experience Android API Reference.

What to do next

Next, Initialize and Display the Live Experience Widget for your Android App