public final class

SosOptions

extends Object
implements Serializable
java.lang.Object
   ↳ com.salesforce.android.sos.api.SosOptions

Class Overview

Encapsulates the information required to start a session. An instance of this class is passed to the SOS API when starting a session, and includes the information needed to route the session to a service agent.

Summary

Constants
String INTENT_TAG The tag used to store the options in the Intent when starting the SosService.
Public Constructors
SosOptions(Map<StringObject> customData, String liveAgentPod, String orgId, String deploymentId)
Construct a version of the SosOptions using custom field data.
SosOptions(String liveAgentPod, String orgId, String deploymentId)
Construct an SosOptions instance for starting an SOS session.
Public Methods
Map<StringObject> getCustomData()
Retrieve the custom data for the session.
String getDeploymentId()
Retrieve the deployment identifier.
String getLiveAgentPod()
Retrieve the LiveAgent pod hostname.
String getOrgId()
Retrieve the Salesforce organization ID.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final String INTENT_TAG

The tag used to store the options in the Intent when starting the SosService.

Constant Value: "com.salesforce.android.sos.api.SosOptions"

Public Constructors

public SosOptions (Map<StringObject> customData, String liveAgentPod, String orgId, String deploymentId)

Construct a version of the SosOptions using custom field data.

Parameters
customData The custom data used to populate fields on the SosSession object. The keys and values in this map must reflect the custom fields added to the SosSession object within your Salesforce organization. The keys in this map should reference the field's API name, and the value stored at that key should be of the same type as the custom field in Salesforce.

The following table shows the Java types that should be used for various custom field types in Salesforce.

Custom Field TypeJava Type
Checkboxboolean
Currencyint | float
DateString ("yyyy-MM-dd")
Date/TimeString ("yyyy-MM-dd'T'HH:mm:ssZ")
EmailString
GeolocationUnsupported
Numberint | float
Percentint | float
PhoneString ("xxxxxxxxxx")
TextString
Text AreaString
URLString
liveAgentPod The hostname of the LiveAgent API endpoint assigned to you organization.
orgId You Salesforce fifteen character UID for your Salesforce organization.
deploymentId The deployment identifier used to route the session. This identifier is used to route the session to a specific set of agents. New deployments can be create in Salesforce on the Setup tab under SOSDeployments.

public SosOptions (String liveAgentPod, String orgId, String deploymentId)

Construct an SosOptions instance for starting an SOS session.

Parameters
liveAgentPod The hostname of the LiveAgent API endpoint assigned to you organization.
orgId You Salesforce fifteen character UID for your Salesforce organization.
deploymentId The deployment identifier used to route the session. This identifier is used to route the session to a specific set of agents. New deployments can be create in Salesforce on the Setup tab under SOSDeployments.
Throws
IllegalArgumentException If any of the supplied options are determined to be invalid.

Public Methods

public Map<StringObject> getCustomData ()

Retrieve the custom data for the session.

Returns
  • The custom data that will be used to populate the fields in the SosSession object on the Salesforce servers.

public String getDeploymentId ()

Retrieve the deployment identifier.

Returns
  • The identifier for the deployment used to route the session to agents.

public String getLiveAgentPod ()

Retrieve the LiveAgent pod hostname.

Returns
  • The LiveAgent pod hostname assigned to the organization.

public String getOrgId ()

Retrieve the Salesforce organization ID.

Returns
  • The fifteen character identifier for the Salesforce organization.