Configure Context Information for your iOS 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. For more information on context configuration, see the Live Experience iOS API Reference.
  1. To configure a particular piece of context information, you'll use the contextAttributes setValue 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 and 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, use the contextAttributes.setValue() method:
    // Optional context attributes...
    Controller.shared.contextAttributes.setValue("Bob Dobbs", forKey: "fullName")
    Controller.shared.contextAttributes.setValue("bob@example.com", forKey: "email")
    Controller.shared.contextAttributes.setValue("202-555-0171", forKey: "phone")
    Controller.shared.contextAttributes.setValue("Support Tab", forKey: "appLocation")

    The example above 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.

What to do next

Next, Add the Live Experience Widget to your iOS App.