Get Started with Chat
Get rolling quickly with chat sessions between your customers and your agents.
The legacy chat product is scheduled for retirement on February 14, 2026, and is in maintenance mode until then. During this phase, you can continue to use chat, but we no longer recommend that you implement new chat channels. To avoid service interruptions to your customers, migrate to Messaging for In-App and Web before that date. Messaging offers many of the chat features that you love plus asynchronous conversations that can be picked back up at any time. Learn about chat retirement in Help.
Before doing this tutorial, be sure that you’ve set up Service Cloud for Chat. See Org Setup for Chat in Lightning Experience with a Guided Flow for more information.
This tutorial shows you how to get Chat into your iOS app.
-
Create an Xcode project. For this example, let’s make a Single View Application. Name it
HelloChat.

-
Install the SDK as described in Install the Service Chat SDK for iOS.
-
Go to your storyboard and place a button somewhere on the view. Name it
Chat.
-
Add a
Touch Up Insideaction to yourUIViewControllerimplementation. Name itlaunchChat.

-
Import the SDK. Wherever you intend to use the Chat SDK, be sure to import the ServiceCore framework and the ServiceChat framework.
In Swift:
In Objective-C:
-
Launch a chat session from within the
launchChatmethod.From the button action implementation, launch chat using the
showChat(with:showPrechat:)method onSCSChatInterface.In Swift:
In Objective-C:
Fill in the placeholder text for the Chat API endpoint, the org ID, the deployment ID, and the button ID.
- Deployment ID
The unique ID of your Chat deployment. To get this value, from Setup, select Chat | Deployments. The script at the bottom of the page contains a call to the
liveagent.initfunction with the pod, the deploymentId, and orgId as arguments. Copy the deploymentId value.
For instance, if the deployment code contains the following information:
The deployment ID value is:
Be sure not to use the org ID value (which is also in this deployment code) for the deployment ID.
- Button ID
The unique button ID for your chat configuration. To get this value, from Setup, search for Chat Buttons and select Chat Buttons & Invitations. Copy the
idfor the button from the JavaScript snippet.
For instance, if your chat button code contains the following information:
The button ID value is:
Be sure to omit the
liveagent_button_online_text from the ID when using it in the SDK.
-
Launch Service Cloud Console. From the Omni-Channel widget, ensure that an agent is online.

Now you can build and run the app. When you tap the Chat button, the app requests a chat session, which an agent can accept from the Service Cloud Console. From the console, an agent can real-time chat with a customer.
