# developer Service Cloud - Full Documentation # About SOSL Use the Salesforce Object Search Language (SOSL) to construct text-based search queries against the search index. You can search text, email, and phone fields for multiple objects, including custom objects, that you have access to in a single query in the following environments. - SOAP or REST calls - Apex statements - Visualforce controllers and getter methods - Schema Explorer of the Eclipse Toolkit **note:** If your org has relationship queries enabled, SOSL supports SOQL relationship queries. ## Compare SOSL and SOQL Use SOQL when: - You want to search against the org's database. Results from a database search include matches for the exact search string. - You know in which objects or fields the data resides. - You want to retrieve data from a single object or from multiple objects that are related to one another. - You want to count the number of records that meet specified criteria. - You want to sort results as part of the query. - You want to retrieve data from number, date, or checkbox fields. Use SOSL when: - You don't know in which object or field the data resides, and you want to find it in the most efficient and fastest way possible. - You want to retrieve data for a specific term that you know exists within a field. Because SOSL can tokenize multiple terms within a field and build a search index off this, SOSL searches are faster and can return more relevant results. Depending on the search object, SOSL searches also take advantage of the advanced features of the search index, such as out-of-order matching, synonyms, lemmatization, and spell check. - You want to retrieve multiple objects and fields efficiently, and the objects might or might not be related to one another. - You want to retrieve data for a particular division in an org using the divisions feature, and you want to find it in the most efficient way possible. ## Define Efficient SOSL Text Searches If your searches are too general, they are slow and return too many results. Use the following clauses to write more targeted and useful searches. - IN: Limits the types of fields to search, including email, name, or phone. - LIMIT: Specifies the maximum number of rows to return. - OFFSET: Displays the search results on multiple pages. - RETURNING: Limits the objects and fields to return. - WITH DATA CATEGORY: Specifies the data categories to return. - WITH DivisionFilter: Specifies the division field to return. - WITH NETWORK: Specifies the Experience Cloud site ID to return. - WITH PricebookId: Specifies the price book ID to return. ## Example: Update an Article’s Keyword Tracking with SOSL The `UPDATE TRACKING` clause is used to report on Salesforce Knowledge article searches and views. It allows developers to track the keywords used in Salesforce Knowledge article searches. Also, the language attribute can be used to search by a specific language (locale). However, only one language can be specified in a single query. Make a separate query for each language that you want. Use the Java format, which uses the underscore (for example, fr_FR, jp_JP, and so on), to supply locales. Search the Web for “java locale codes” to get a list of supported locales. You can use this syntax to track a keyword used in Salesforce Knowledge article search: ```soql FIND {Keyword} RETURNING KnowledgeArticleVersion (Title WHERE PublishStatus="Online" and language="en_US") UPDATE TRACKING ``` ## Example: Update an Article’s Viewstat with SOSL The optional `UPDATE VIEWSTAT` clause is used to report on Salesforce Knowledge article searches and views. It allows developers to update an article’s view statistics. Also, the language attribute can be used to search by a specific language (locale). However, only one language can be specified in a single query. Make a separate query for each language that you want. Use the Java format, which uses the underscore (for example, fr_FR, jp_JP, and so on), to supply locales. Search the Web for “java locale codes” to get a list of supported locales. You can use this syntax to increase the view count for every article you have access to online in US English: ```soql FIND {Title} RETURNING FAQ__kav (Title WHERE PublishStatus="Online" and language="en_US" and KnowledgeArticleVersion = 'ka230000000PCiy') UPDATE VIEWSTAT ``` # Abstract Message The `abstractMessage` object acts as a container for various message types within the Bring Your Own Bot (BYOB) API. It encapsulates essential metadata like `id`, `messageType`, `inReplyToMessageId` and specific content payloads like `staticContent`, `choices`, or `form`. It provides a structured way to represent and manage diverse messages exchanged in bot conversations, including text, interactive choices, and forms, along with references to Salesforce records. | Property Name | Type | Description | Required | | :--------------------------------- | :------ | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------- | | abstractMessage | object | The message details. | | | abstractMessage.messageType | string | The message type for the interaction. Set this value to **StaticContentMessage**. For more information on `messageType`, see [Message Types and Message Format Types](https://developer.salesforce.com/docs/service/messaging-byob/references/byob-reference/message-types-format-types.md). | | | abstractMessage.staticContent | object | The details for the static content. For messages, set `formatType` to **Text**, and provide your message content for `text`. | | | abstractMessage.id | string | A unique ID for the interaction. This value must match the `entryPayload.id` value in this payload. | | | abstractMessage.inReplyToMessageId | string | Holds an identifier (ID) of a previous message to which the current message is a reply. It's used to maintain context or thread information in a conversation. | | | abstractMessage.references | array | An array or list that contains references to related records or entities to link conversation entries to specific data within Salesforce or other systems. | | | references.recordId | string | Within the `references` array, each item has a `recordId` property. This property holds the unique identifier of a specific record that is related to the conversation or message. | | | references.id | string | Within the `references` array, each item has an `id` property. This is an identifier for the specific reference itself to track or manage the relationship between the message and the referenced item. | | | abstractMessage.Choices | object | Specifies how the choices will be presented to the end user. | | | choices.formatType | string | Specifies how the choices will be presented to the user. Valid values are `Buttons`, `QuickReplies`, and `Carousel`. It defines the visual layout or style of the choices. | | | choices.items | array | An array that holds the individual choice options available to the end user. Each item in this array represents a single selectable choice within the interaction. | | | choices.images | array | An array that contains image details associated with the choices. These images can be used to enhance the visual appearance of the choice options, displaying them alongside or within individual choice items. | | | images.assetType | string | Specifies the type of the image asset. For example, for `Carousel` payload, the value is `ImageAsset`. | | | images.description | string | A textual description of the image. | | | images.id | string | A unique identifier for the image asset. This ID is used to reference and manage the image within the system. | | | images.mimeType | string | The MIME type of the image file. For example, `image/png` or `image/jpeg` indicates the format of the image. | | | images.assetUrl | string | The URL where the image asset can be accessed. This is the location of the image file. | | | images.referenceId | string | The reference ID that links the image to another entity or item. This is used to associate the image with a specific choice option. | | | choices.items | array | An array of items within a choice message, specifically used in the `Carousel` `formatType`. Each item in this array represents a single item or card that can be selected from the carousel. Each item can have its own title, subtitle, image, and interaction items. | | | items.titleItem | object | An object within each item in the `items` array, providing the details of the title-related information for that item. It includes properties like the title text, subtitle, image, and related identifiers. | | | titleItem | object | An object that can be nested within other objects to describe the title details of an item or option. It contains various properties to define and display title information effectively. | | | titleItem.itemType | string | Indicates the specific type of title item, which can be `TitleItem` for basic text titles or `TitleImageItem` for titles with associated images. It determines how the title will be presented. | | | titleItem.secondarySubTitle | string | An additional subtitle displayed under the main subtitle, providing further details or context related to the item's title. It can be optional or `null` if not needed. | | | titleItem.title | string | The main title text for the item or option. This is the primary heading or label for the item. | | | titleItem.subTitle | string | A secondary title or subtitle displayed below the main title, adding more descriptive information about the item. | | | titleItem.tertiarySubTitle | string | A third-level subtitle, used to provide even more detailed information or context under the main title and subtitle. It's optional and can be set to `null` if not needed. | | | titleItem.referenceId | string | An ID or reference that links the title item to another entity or record in the system. It helps in establishing relationships or referencing external data associated with the title item. | | | titleItem.imageSubTitle | string | A subtitle specifically associated with an image. If the `titleItem` includes an image, this subtitle provides a caption or description for that image. | | | titleItem.imageId | string | The unique ID of an image associated with the title item, especially in `TitleImageItem` types. This ID is used to reference and retrieve the corresponding image. | | | items.interactionItems | object | An array within each item of the `items` array (specifically used in the `Carousel` formatType). It contains interactive elements associated with each item in the carousel. These elements can be buttons or options that the user can interact with. | | | interactionItems.itemType | string | Specifies the type of interaction item within the `interactionItems` array. This determines how the item behaves or what it represents. For example, a button or hyperlink. | | | interactionItems.titleItem | object | An object within each `interactionItem` that provides the title or label information for that specific interaction element. It can contain the text to display on a button or the title of a link. | | | interactionItems.optionIdentifier | string | A unique identifier for a specific option within the `interactionItems` array. This is used to identify the option the user selects. | | | interactionItems.optionId | string | Holds an additional option identifier. It's also to identify the option that the user selects. | | | abstractMessage.form | object | Represents a form object that is part of an `abstractMessage`. It encapsulates all details of a form that can be sent to the user in the context of a chatbot interaction. This form can contain input fields, titles, sections, and images. | | | form.formType | string | Specifies the type or format of the form. A valid value is `Inputs` which indicates that the form will collect data through input fields. | | | form.formTitle | object | An object that contains information about the title of the form. This will be the main heading or label for the form presented to the user. | | | form.formatType | string | Specifies the type or format of the form. Valid value is `MessageDefinition`. | | | form.parameters | object | The parameters relevant to the form. | | | form.sections | array | An array or list of sections within the form. Each section can contain input fields, instructions, or other elements that logically group parts of the form. | | | form.images | array | An array or list of images associated with the form. These images can be used for visual cues, instructions, or to enhance the form's presentation. | | | form.messageDefinitionNameOrId | string | Represents the messaging component ID. For more information, see [Create a Secure Form](https://help.salesforce.com/s/articleView?id=service.messaging_components_forms.htm&type=5). | | | form.targetLocale | string | The target language or locale for the form. | | | formTitle.itemType | string | Specifies the type of the title item used for the form title. Valid value is `TitleItem`. | | | formTitle.title | string | The actual textual title of the form, which will be displayed to the user as the form's main heading. | | | sections.sectionType | string | Specifies the type of section within a form. It indicates how the inputs are structured and displayed in that specific section. For example, if it's a single input or multiple inputs. Valid value is `SingleInputSection`. | | | sections.input | object | An object that contains details of the input fields or controls within a section of the form. It holds properties defining the type of input (text, selection), its ID, label, and whether it is required. | | | sections.submitForm | boolean | A boolean value indicating whether submitting the form is enabled or triggered by the input in this section. If `true`, submitting the form occurs after this section's input is completed. | | | input.inputType | string | Specifies the type of input field or control. It determines what kind of data the user is expected to enter. For example, text, number, or date. Valid value is `TextInput`. | | | input.id | string | A unique identifier for the input field or control. This ID is used to reference and manage the input data when submitting the form. | | | input.label | object | An object that contains details about the label displayed for the input field. It provides a title or instructions for the user about what data to enter. | | | input.required | boolean | A boolean value indicating whether the input field is mandatory. If true, the user must fill in the field before submitting the form. | | | label.itemType | string | Specifies the type of the label item. Determines the format and display of the label text. Valid value is `TitleItem`. | | | label.title | string | The textual content of the label for the input field. This is the actual text displayed to the user, guiding them on what data to enter. | | # acceptAgentWork Accepts a work item that’s assigned to an agent. Available in API versions 32.0 and later. ## Syntax ```javascript sforce.console.presence.acceptAgentWork(workId:String, (optional) callback:function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`workId`|String|The ID of the work item the agent accepts.| |`callback`|function|JavaScript method to call when an agent accepts the work item associated with the `workId`.| ## Sample Code–Visualforce ```apex_page Accept Assigned Work Item ``` ## Response This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following properties: |Name|Type|Description| |----|----|-----------| |`success`|Boolean|`true` if accepting the work item was successful; `false` if accepting the work item wasn’t successful.| # acceptAgentWork for Lightning Experience Accepts a work item that’s assigned to an agent. ## Arguments |Name|Type|Description| |----|----|-----------| |`workId`|string|The ID of the work item the agent accepts.| ## Sample Code Component code: ```html ``` Controller code: ```javascript ({ acceptWork: function(cmp, evt, hlp) { var omniAPI = cmp.find("omniToolkit"); omniAPI.getAgentWorks().then(function(result) { var works = JSON.parse(result.works); var work = works[0]; omniAPI.acceptAgentWork({workId: work.workId}).then(function(res) { if (res) { console.log("Accepted work successfully"); } else { console.log("Accept work failed"); } }).catch(function(error) { console.log(error); }); }); } }) ``` ## Response This method returns a promise that, upon success, resolves to `true` and is rejected on error. # acceptChat() Accepts a chat request. Available in API version 29.0 or later. This method isn't supported with Omni-Channel in API version 37.0 or later. ## Syntax ```javascript sforce.console.chat.acceptChat(chatKey:String, (optional)callback:Function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`chatKey`|String|The chat key for the chat request you wish to accept.| |`callback`|function|JavaScript method called upon completion of the method.| ## Sample Code–Visualforce ```apex_page Accept Chat ``` ## Response This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following properties: |Name|Type|Description| |----|----|-----------| |`success`|Boolean|`true` if accepting the chat was successful; `false` if accepting the chat wasn’t successful.| # Access Concentrator Represents an Access Concentrator configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. ## Configuration Item Type Definition ||| |-|-| |Name|Access Concentrator| |Developer Name|`SD_AcCo`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Network Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-network-device.md)| |Rule Name|Default rule for all Windows Hosts| |Identifier(s)|Serial Number| ## Attributes No associated attributes for this configuration item type. # Access Control Device Represents an Access Control Device configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Device. ## Configuration Item Type Definition ||| |-|-| |Name|Access Control Device| |Developer Name|`SD_AcCoDe`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-device.md)| |Rule Name|Default rule for all AWS Snapshots| |Identifier(s)|Snapshot Id| ## Attributes No associated attributes for this configuration item type. # Access Conversation Data The data for enhanced conversations in Salesforce are saved in on-platform and off-platform objects. Refer to the [Messaging Object Model](https://developer.salesforce.com/docs/service/messaging-object-model/guide/messaging-object-model.md) to see which type of data is stored in on-platform versus off-platform objects. We provide tools to help you query, report on, or export this information regardless of where it’s stored. ## Access On-Platform Data All on-platform conversation objects are queryable using SOQL, and many are also available through Salesforce standard reporting. For help setting up reports that you can use to track response time, handle time, and other KPIs, see [Report on Messaging Activity in Service Cloud](https://help.salesforce.com/s/articleView?id=service.messaging_reporting.htm). ## Access Off-Platform Data Off-platform data, such as the actual messages exchanged in a conversation, is not available through SOQL or standard reporting. There are three supported ways to access off-platform data: ### Access Conversation Data via API Salesforce provides two APIs for accessing conversation data: the newer [Conversation Data GET API](https://developer.salesforce.com/docs/service/messaging-object-model/guide/conversation-data-api/references/conversation-data-api-reference?meta=getConversationEntries) and the [Conversation Entries Connect Rest API](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_resources_conversation_entries.htm). This section will detail the differences between these APIs and outline their respective limitations for retrieving conversation data. #### Considerations for Accessing Conversation Data When choosing an API for your integration, keep the following timing and availability factors in mind. Both the Conversation Data GET API and the Connect REST API provide near real-time access to conversation data as it is generated. However, voice call entries are only associated with the voice call record after the call ends. Therefore, you may not be able to retrieve conversation entries for voice calls until the call has concluded. #### Differences Between our New Conversation Data GET API and the Connect REST API. The [Conversation Data GET API](https://developer.salesforce.com/docs/service/messaging-object-model/guide/conversation-data-api/references/conversation-data-api-reference?meta=getConversationEntries) is planned to eventually replace the legacy [Connect REST API](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_resources_conversation_entries.htm). While no end-of-support date has been set for the Connect API, we strongly recommend building all new data access integrations using this new GET API. The Conversation Data GET API provides a key functional advantage that it returns the full conversation entry payload, including all conversation entry types (such as rich content, URLs, bot messages, bot selections, etc.) that the legacy Connect API omits. Transcripts returned via the Connect REST API are text-only, so they don’t include rich content or bot messages. The rate limits for these APIs also differ. The [Conversation Data GET API rate limit](https://developer.salesforce.com/docs/service/conversation-data-api/guides/rate-limits.md) is currently 90 requests per user per minute. In contrast, the [Connect REST API rate limit](https://developer.salesforce.com/docs/atlas.en-us.salesforce_app_limits_cheatsheet.meta/salesforce_app_limits_cheatsheet/salesforce_app_limits_platform_api.htm#Total%20API%20Request%20Allocations) varies by organization but is generally higher and is evaluated over a 24-hour period rather than per minute. Please note that while the Connect API limit is currently higher, there are plans to increase the rate limit for the Conversation Data GET API in the future to meet enterprise requirements. ### Sync Conversation Data to Data Cloud Sync your off-platform conversation data to Data Cloud. After off-platform conversation data is synced to Data Cloud, you can: - Analyze your messages using Data Cloud Reports. - Export the data programmatically via Data Cloud APIs. While our direct APIs are ideal for near real-time access to individual records, Data Cloud is better suited for exporting large batches or chunks of data at once. Note that it can take up to an hour for conversation data to become visible in Data Cloud. Conversation data uses a minimal amount of Data Cloud capacity. If your Salesforce edition includes free Data Cloud, in many cases, the capacity used to store your off-platform conversation data comfortably fits within the limits of the free tier. To sync off-platform conversation data to Data Cloud: 1. Enable access to conversation transcripts in Data Cloud. See [Analyze Conversation Transcripts in Data Cloud](https://help.salesforce.com/s/articleView?id=service.conversation_transcript_analyze.htm) for steps on how to enable access. 2. [Create Data Streams for Conversation Transcripts](https://help.salesforce.com/s/articleView?id=service.conversation_transcript_data_streams.htm). We strongly recommend using Data Cloud for bulk export use cases because it lacks the limitations that exist with our APIs, such as having to fetch each conversation 1 by 1, and its use for conversation data comes at no additional cost for most customers. ### Download Conversation Data Using the Bulk Export Tool To download all of your conversation data from all time, the [bulk export tool](https://help.salesforce.com/s/articleView?id=service.Conversation_transcript_export_1.htm) is the best option. The tool performs a complete export of message data and can only be used once every 7 days. The tool is best used for archival or compliance use cases and not frequent syncing. **See Also** - [Messaging Object Model](https://developer.salesforce.com/docs/service/messaging-object-model/guide/messaging-object-model.md) - [On-Platform vs. Off-Platform Messaging Objects](https://developer.salesforce.com/docs/service/messaging-object-model/guide/messaging-object-model-on-off-platform.md) - _Connect REST API Developer Guide:_ [Conversation Entries](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_resources_conversation_entries.htm) - _Salesforce Help:_ [Service Cloud Messaging Limits and Considerations](https://help.salesforce.com/s/articleView?id=service.livemessage_limitations.htm) - _Salesforce Help:_ [Export Conversation Transcripts](https://help.salesforce.com/s/articleView?id=service.Conversation_transcript_export_1.htm) - _Knowledge Article:_ [Data Cloud: Access and Provisioning](https://help.salesforce.com/s/articleView?id=000396444&type=1) # Access Point Represents an Access Point configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Switch. ## Configuration Item Type Definition ||| |-|-| |Name|Access Point| |Developer Name|`SD_AcPo`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Switch](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-switch.md)| |Rule Name|Default rule for all AIX Servers| |Identifier(s)|MAC address Hostname| ## Attributes No associated attributes for this configuration item type. # Access Token Create an access token to enable survey invitation creation, and gather feedback from unauthenticated participants. ## Resource ```nolang ///accessToken ``` ## Resource Example ```nolang https://yourInstance.salesforce-scrt.com​/surveys/v1/accessToken ``` ## HTTP Methods POST ## Request Body for POST Pass the 18 digit `orgId` in the request. Make a `Query()` request on the Organization object to fetch the organization ID. See[ Execute a SOQL Query](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_query.htm). ```nolang { "orgId": "00DSB00000026pJ2AQ" } ``` ## Response Body for POST ### JSON Example ```nolang { "accessToken": "eyJraWQiOiIwM2ZiN......-UA", "expiresIn": 3600, "tokenType": "Bearer" } ``` # Accessibility with the Service Chat SDK for Android The Service Chat SDK is accessible to customers that use a screen reader. Depending on your needs, you can also change some settings to expand accessibility. **important:** 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](https://help.salesforce.com/s/articleView?id=service.miaw_intro_landing.htm&type=5) before that date. Messaging offers many of the [chat features](https://help.salesforce.com/s/articleView?id=service.miaw_chat_vs_messaging.htm&type=5) that you love plus asynchronous conversations that can be picked back up at any time. Learn about chat retirement in [Help](https://help.salesforce.com/s/articleView?id=001790618&type=1). ## Disable the Minimized View in Chat By default, a chat session starts out as a minimized, thumbnail view that you tap to open. This minimized view is not optimal for accessibility because a visually impaired person could have trouble locating the thumbnail. To improve accessibility, we suggest starting the session in the full-screen view. When building the [`ChatUIConfiguration`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/ui/ChatUIConfiguration.html) object, set `defaultToMinimized` to `false`. ```java ChatUIConfiguration uiConfig = new ChatUIConfiguration.Builder() .chatConfiguration(chatConfiguration) .defaultToMinimized(false) .build(); ``` See [Quick Setup: Chat in the Service Chat SDK](https://developer.salesforce.com/docs/service/service-sdk-android/guide/android-chat-basic-setup.md). ## Contrast Ratio Considerations By default, we brand the SDK using a 4.2 contrast ratio. You can customize the colors to increase this contrast ratio. See [Customize Colors with the Service Chat SDK](https://developer.salesforce.com/docs/service/service-sdk-android/guide/android-customize-colors.md). ## Known Issues - Chat: A screen reader doesn’t read the event text when an agent invites another agent to the chat session. # Accessibility with the Service Chat SDK for iOS The Service Chat SDK is accessible to customers that use a screen reader. Depending on your needs, you can also change some settings to expand accessibility. **important:** 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](https://help.salesforce.com/s/articleView?id=service.miaw_intro_landing.htm&type=5) before that date. Messaging offers many of the [chat features](https://help.salesforce.com/s/articleView?id=service.miaw_chat_vs_messaging.htm&type=5) that you love plus asynchronous conversations that can be picked back up at any time. Learn about chat retirement in [Help](https://help.salesforce.com/s/articleView?id=001790618&type=1). ## Disable the Minimized View in Chat By default, a chat session starts out as a minimized, thumbnail view that you tap to open. This minimized view is not optimal for accessibility because a visually impaired person could have trouble locating the thumbnail. To improve accessibility, we suggest starting the session in the full-screen view. When creating the [`SCSChatConfiguration`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSChatConfiguration.html) object, set `allowMinimization` and `defaultToMinimized` to `false`. ```java let config = SCSChatConfiguration(liveAgentPod: "YOUR_POD_NAME", orgId: "YOUR_ORG_ID", deploymentId: "YOUR_DEPLOYMENT_ID", buttonId: "YOUR_BUTTON_ID") config?.allowMinimization = false config?.defaultToMinimized = false ``` See [Configure a Chat Session](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/configure-lac-session.md). ## Contrast Ratio Considerations By default, we brand the SDK using a 4.2 contrast ratio. You can customize the colors to increase this contrast ratio. See [Customize Colors with the Service Chat SDK](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/customize-colors.md). ## Dynamic Text Warning When changing the iOS text size, the Apple Accessibility Inspector displays the following warning: “Dynamic Text font sizes are unsupported.” Dynamic text is supported, but it requires restarting the app after changing the font size. # accessToken Listed are the error codes and error code messages associated with the Salesforce Feedback Management (SFM) UnAuth Response APIs for the `accessToken` resource. ## Error Codes and Responses for the `accessToken` Resource This table lists the HTTP response code descriptions that are unique to this resource. |HTTP Response Code|Error Code|Description| |------------------|----------|-----------| |400|`INVALID_API_INPUT`|{orgId} isn’t valid. Specify a valid orgId value and try again.| |400|`INVALID_API_INPUT`|You can’t access the specified org. Specify a different orgId value and try again.| |400|`API_CURRENTLY_DISABLED`|The UnauthenticatedSurveyParticipation API isn’t enabled in your Salesforce org. Ask your Salesforce admin for help.| # ActionableListMbrInvitation Represents a relationship between an Actionable List Member and an Appointment Invitation. This object is available in API version 59.0 and later. ## Supported Calls `create()`, `delete()`, `describeLayout()`, `describeSObjects()`, `getDeleted()`, `getUpdated()`, `query()`, `retrieve()`, `search()`, `undelete()`, `update()`, `upsert()` ## Special Access Rules Salesforce Scheduler must be enabled. ## Fields ### ActionableListMemberId - **Type**: reference - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The ID of the actionable list member that’s associated with the actionable list member invitation record. This field is a relationship field. - **Relationship Name**: ActionableListMember - **Relationship Type**: Lookup - **Refers To**: ActionableListMember ### AppointmentInvitationId - **Type**: reference - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The ID of the appointment invitation that’s associated with the actionable list member invitation record. This field is a relationship field. - **Relationship Name**: AppointmentInvitation - **Relationship Type**: Lookup - **Refers To**: AppointmentInvitation ### LastReferencedDate - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: The date and time when the current user last viewed a related record. ### LastViewedDate - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: The date and time when the current user last viewed this record. ### Name - **Type**: string - **Properties**: Autonumber, Defaulted on create, Filter, idLookup, Sort - **Description**: Auto-assigned number that identifies the actionable list member invitation record. ### ServiceAppointmentId - **Type**: reference - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The ID of the service appointment that’s associated with the actionable list member invitation. This field is a relationship field. - **Relationship Name**: ServiceAppointment - **Relationship Type**: Lookup - **Refers To**: ServiceAppointment ## Associated Objects This object has the following associated objects. If the API version isn’t specified, they’re available in the same API versions as this object. Otherwise, they’re available in the specified API version and later. [ActionableListMbrInvitationFeed](https://developer.salesforce.com/docs/atlas.en-us.244.0.object_reference.meta/object_reference/sforce_api_associated_objects_feed.htm): Feed tracking is available for the object. [ActionableListMbrInvitationHistory](https://developer.salesforce.com/docs/atlas.en-us.244.0.object_reference.meta/object_reference/sforce_api_associated_objects_history.htm): History is available for tracked fields of the object. # Add a Component to Workplace Command Center Users will need to add custom components to the Workplace Command Center. Once Workplace Command Center is installed in an org, all Command Center component changes must be done by admin configuration. If a customer installs or creates other components to display in the Command Center, the admin must clone the Command Center page and drag and drop new components on the Command Center Lightning Page. It isn’t possible to configure a new component to automatically appear in the Command Center after installation. Because of this, you should provide documentation for your users on how to set up your app and add your components to the Command Center. **See Also** - [*Salesforce Help*: Clone the Command Center](https://help.salesforce.com/articleView?id=wcc_setup_clone_command_center.htm&type=5) # Add a Custom Icon Add a custom icon to uniquely identify the messaging channel integration. After the admin installs the managed package, the icon appears when they add the messaging channel. 1. Create an image, such as a channel logo, to represent the custom icon. For best results, set the image size to 50px x 50px and save the image in SVG file format. 2. Add the custom icon to Salesforce by [defining the static resource](https://help.salesforce.com/s/articleView?id=platform.pages_static_resources_create.htm). 3. When you create the ConversationChannelDefinition record, set `customIconId` to the name of the static resource file. **See Also** - _Salesforce Help_: [Static Resources](https://help.salesforce.com/s/articleView?id=platform.pages_static_resources.htm) # Add a Custom Icon Add a custom icon to uniquely identify the messaging channel integration. After the admin installs the managed package, the icon appears when they add the messaging channel. 1. Create an image, such as a channel logo, to represent the custom icon. For best results, set the image size to 50px x 50px and save the image in SVG file format. 2. Add the custom icon to Salesforce by [defining the static resource](https://help.salesforce.com/s/articleView?id=platform.pages_static_resources_create.htm). 3. When you create the ConversationChannelDefinition record, set `customIconId` to the name of the static resource file. **See Also** - _Salesforce Help_: [Static Resources](https://help.salesforce.com/s/articleView?id=platform.pages_static_resources.htm) # Add a Support App to Employee Workspace with Employee Concierge With Employee Concierge, add a searchable knowledge base and ticketing system to your Employee Workspace site. Employee Concierge includes Agent Desk, a custom Salesforce app IT Agents can use to respond to and resolve tickets. To get started with Employee Concierge, see [Salesforce Help: Employee Concierge](https://help.salesforce.com/articleView?id=service.employee_concierge.htm&type=5). - **[Employee Concierge Data Triggers](https://developer.salesforce.com/docs/service/workdotcom-dev/guide/wkdw-data-triggers.md)** When the Employee Concierge managed package is installed, data triggers on the Employee and Case objects are added. We recommend using the default settings for the Employee Concierge triggers. - **[Custom Field Used by Employee Concierge](https://developer.salesforce.com/docs/service/workdotcom-dev/guide/wkdw-custom-objects-fields.md)** The Employee Concierge package includes a custom field on the standard object Case. Employee Concierge requires Employee Workspace and builds on the Employee standard object and the person account record type. - **[Custom Metadata Types Used by Employee Concierge](https://developer.salesforce.com/docs/service/workdotcom-dev/guide/wkdw-custom-metadata-types.md)** The Employee Concierge package includes custom metadata types. # Add Citations in Agent Responses To build trust in Agentforce Service Agent responses, include citations to source information. Citations appear in static text messages as a `citationContent` field in the outbound message event payload. To support this optional feature, parse the `citationContent` field and render inline markers and a sources list in your UI. For example, include inline markers like \[1\], \[2\] and a Sources section at the end of the message. There’s no capability registration required to turn on the feature. Citations appear in static text messages as an optional `citationContent` field. This field contains: - Citation references: Links to source articles with optional display labels and optional Salesforce record IDs - Inline metadata: Character offset positions indicating where citation markers should appear in the message text ## Structure of Outbound Message Event with Citations When a message includes citations, the `staticContent` object contains a `citationContent` field. ```JSON { "staticContent": { "formatType": "Text", "text": "To replace your iPhone battery, you can follow step-by-step instructions available on various platforms. Here are some options: 1. DIY Replacement: You can replace the battery yourself using DIY kits. Detailed instructions and comparisons of costs, savings, and time for different models can be found here. 2. Professional Repair Shop: You can take your iPhone to a reputable repair shop.", "citationContent": { "citations": [ { "citedReference": { "citedReferenceType": "Link", "link": { "url": "https://www.example.com/Wiki/iPhone_Battery_Replacement" }, "recordId": null, "label": "https://www.example.com/Wiki/iPhone_Battery_Replacement" }, "citedDetails": { "citedDetailsType": "InlineMetadata", "inlineMetadata": [ { "claim": { "claimStartOffset": 0, "claimEndOffset": 309 }, "citedLocationOffset": 309 } ] } }, { "citedReference": { "citedReferenceType": "Link", "link": { "url": "https://www.example.com/News/11220/3-ways-replace-iphone-battery" }, "recordId": null, "label": "https://www.example.com/News/11220/3-ways-replace-iphone-battery" }, "citedDetails": { "citedDetailsType": "InlineMetadata", "inlineMetadata": [ { "claim": { "claimStartOffset": 309, "claimEndOffset": 391 }, "citedLocationOffset": 391 } ] } } ] } } } ``` ## Handle Citation Offsets All offsets are zero-indexed character positions in the `staticContent.text` field. - `citedLocationOffset` specifies where to insert a citation marker (e.g., \[1\]) - `claimStartOffset` / `claimEndOffset` define which portion of the text the citation supports. ## Citation Schema Reference The citation schema uses a discriminator pattern with the following fields. | Field | Type | Description | | :--------------------------- | :------ | :--------------------------------------------------------------------------------------------------------- | | `CitationContent` | Object | Contains an array of citation objects. | | `citations` | Array | Array of citation objects | | `citation` | Object | Represents a single citation reference and its metadata. | | `citedReference` | Object | The source being cited (currently supports `Link` type). | | `citedDetails` | Object | Metadata about where the citation applies in the message text. | | `LinkCitedReference` | Object | Citation reference pointing to a URL. | | `citedReferenceType` | String | Must be `"Link"`. | | `link` | Object | Link object containing a `url` field. | | `label` | String | Display label for the citation (e.g., "example" for example.com). | | `recordId` | String | Salesforce record ID if citation links to a Salesforce object. | | `InlineMetadataCitedDetails` | Object | Specifies where citations should appear in the message text. | | `citedDetailsType` | String | Must be `"InlineMetadata"`. | | `inlineMetadata` | Array | Array of metadata objects (minimum 1\). | | `citedLocationOffset` | Integer | Zero-indexed character position where citation marker should be inserted. | | `claim` | Object | Defines the text span this citation supports with `claimStartOffset` and `claimEndOffset` (both integers). | # Add Messaging to a Salesforce Voice with Partner Telephony Managed Package To add Bring Your Own Channel for CCaaS Messaging capabilities to a preexisting managed package configured for Salesforce Voice with Partner Telephony (formerly Service Cloud Voice with Partner Telephony), follow these steps. Before you begin, check that you have an existing managed package for Salesforce Voice with Partner Telephony. 1. Ensure that the [prerequisites are in place](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/introduction.md) to enable Bring Your Own Channel for CCaaS. 2. [Set up an external client app](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/create-connected-app.md) to integrate a third-party CCaaS system with Salesforce using Interaction Service API. **note:** If your CCaaS system architecture requires admins to create and manage the external client app (ECA) during Bring Your Own Channel for CCaaS setup instead, set the `connectedAppType` field in the Conversation Channel Definition to `Customer`, don’t create or include an ECA in your managed package, and notify your customers to follow instructions in the _Configure an External Client App for OAuth Integration_ section of this [Salesforce help article](https://help.salesforce.com/s/articleView?id=service.byoc_ccaas_create_channel.htm). 3. [Generate an access token](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/generate-token.md) for authenticating requests to Interaction Service API. 4. [Create and configure a custom platform event](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/create-platform-event.md) to send and receive messages between Salesforce and the CCaaS provider system. 5. [Create a Conversation Channel Definition](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/create-conversationchanneldefinition-record.md) record to bundle the metadata used for your Messaging integration. 6. Update the [Conversation Vendor Info record](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/create-conversationvendorinfo-record.md) to set `vendorType` as `BringYourOwnContactCenter`. 7. Publish an upgrade to the managed package to add these components: - the new Conversation Channel Definition record - the new connected app, unless you require admins to create one instead 8. Push the package upgrade to subscribers or notify customers that they can upgrade their package. Only customers who have the Digital Engagement license with Partner Messaging are able to use Messaging capabilities in their contact centers. **See Also** - _First-Generation Managed Packaging Developer Guide_: [Publish Upgrades to First-Generation Managed Packages](https://developer.salesforce.com/docs/atlas.en-us.pkg1_dev.meta/pkg1_dev/publish_upgrades.htm) - _First-Generation Managed Packaging Developer Guide_: [Push Package Upgrades to Subscribers](https://developer.salesforce.com/docs/atlas.en-us.pkg1_dev.meta/pkg1_dev/push_upgrade_intro.htm) - _Second-Generation Managed Packaging Developer Guide_: [Push a Package Upgrade for Second-Generation Managed Packages](https://developer.salesforce.com/docs/atlas.en-us.pkg2_dev.meta/pkg2_dev/push_upgrade_intro_2GP.htm) - _Object Reference_: [ConversationVendorInfo](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_conversationvendorinfo.htm) - _Salesforce Voice with Partner Telephony Developer Guide_: [Set Up and Publish Your Partner Telephony Package](https://developer.salesforce.com/docs/atlas.en-us.voice_pt_developer_guide.meta/voice_pt_developer_guide/voice_pt_setup_publish_telephony_package.htm) # Add Multiple Participants to a Messaging Conference With Conferencing for Bring Your Own Channel for CCaaS, a rep adds one or more additional reps to an ongoing Messaging session to help resolve customer concerns. They can directly add a new rep, add a rep by adding a queue, or add a rep by initiating an Omni-Channel flow. Adding a rep provides a warm transfer, where information is passed between reps before one rep leaves the session. Or multiple reps can stay in the session with the messaging end user. These instructions are for implementations with partner-owned routing (`ConversationChannelDefinition.routingOwner` is `Partner`). If Salesforce controls routing, no implementation is necessary. **note:** Bring Your Own Channel for CCaaS doesn’t support conferencing with external contacts. Reps can only have a conference with other users in the same Salesforce org. Like all enhanced Messaging channel types, Bring Your Own Channel for CCaaS also doesn’t currently support conferencing with AI agents or bots. 1. When you create the ConversationChannelDefinition record, set these fields to support the Conferencing feature. - To specify that your integration supports conferencing, set `isConferenceSupported` to `true`. - To set your own limit for how many participants can be in a Messaging session conference, set a number value for `MaxParticipantsForCnfrOverride`. This field is needed only if you want to use a different limit instead of the platform limit. If this field isn’t set or is set to a value higher than the Messaging platform limit, the integration defaults to the Messaging platform limit of how many participants can be in a Messaging session conference at one time. See [Service Cloud Messaging Limits and Considerations](https://help.salesforce.com/s/articleView?id=service.livemessage_limitations.htm) for the platform limit. 2. Reps search for contacts to include in the conference in a Start Conference destination list. ![Search for a conference destination](https://developer.salesforce.com/docs/media/messaging-byoc-ccaas/messaging_conference_destination_list_reps.png '{"class": "image-sm"}') To support this list, modify your connector code for the Service Connector API method [getContacts()](/docs/service/service-connector-api/references/connector-api/service-connector-interface-getcontacts.html) to filter which contacts can be requested for a conference. For [Contact](/docs/service/service-connector-api/references/connector-api/service-connector-objects-contact.html), the `listType` parameter accepts `Transfer`, `Conference`, or `All`. This parameter specifies whether a rep can be listed as a transfer destination, as a contact that can be added to a messaging conference, or both (`All`). 3. Implement your connector to listen for a routing requested event that fires when a rep selects another rep, a queue, or a flow from the Request Conference target list. This event has `routingType` set to `Conference` to signify that this request is for a conference. 4. Perform these Interaction Service API calls in the order listed when the rep clicks on the conferencing target. - To start a conference with a flow or queue, call the Route API (`POST /api/v1/route`) with `routingType` set to `Conference`. Don’t call this API for adding a rep to a conference directly. - To start a conference using a flow, use this API call to execute the `flowId` provided by the routing requested event. Provide a fallback `queueId` in case the Omni-Channel flow fails. The Omni-Channel flow uses the logic in the flow to route the conversation to a rep or queue. The flow returns the `psrId` with the `userId` (rep) or `queueId` (queue). - To start a conference using a queue, specify the `queueId` of the target queue provided by the routing requested event. - Call the agentWork API (`POST /api/v1/agentWork`) with `routingType` set to `Conference` to create an AgentWork record when the system finds a rep to add to the work item. - Call the routingResult API (`POST /api/v1/routingResult`) with `routingType` set to `Conference` to notify Salesforce whether adding a participant to the Messaging session succeeded or failed. 5. If a rep cancels a conference that they requested, Salesforce sends a RoutingResult event with `CancelReason` set to `Cancel`. - If the AgentWork is already created when the rep cancels the conference request, call the Cancel AgentWork API (`PATCH /api/v1/agentWork`). 6. Listen for a work declined event sent through [onAgentWork()](/docs/service/service-connector-api/references/connector-api/service-connector-interface-onagentwork.html) to detect when a rep who’s requested to join a conference declines, and handle declining the work. 7. If a rep that’s requested for a conference doesn’t accept the conference request, call the Cancel AgentWork API (`PATCH /api/v1/agentWork`). 8. If the conferencing request otherwise results in an error, call the Clear Routing API (`DELETE /api/v1/route`) to delete the pending service request (PSR) record. Specify the `cancelReason` as part of the API call. **See Also** - _Salesforce Help_: [Add Conferencing to Messaging Sessions](https://help.salesforce.com/s/articleView?id=service.livemessage_agent_conferencing_session.htm) - _Service Connector API_: [getContacts()](/docs/service/service-connector-api/references/connector-api/service-connector-interface-getcontacts.html) - _Service Connector API_: [Contact](/docs/service/service-connector-api/references/connector-api/service-connector-objects-contact.html) - [Interaction Service API](https://developer.salesforce.com/docs/service/interaction-service-api/overview) - _GitHub_: [Interaction Service APIs](https://github.com/salesforce-misc/interaction-service-apis) # Add Multiple Participants to a Messaging Conference With Conferencing for Bring Your Own Channel for Messaging, a rep adds one or more additional reps to an ongoing Messaging session to help resolve customer concerns. They can directly add a new rep, add a rep by adding a queue, or add a rep by initiating an Omni-Channel flow. Adding a rep provides a warm transfer, where information is passed between reps before one rep leaves the session. Or multiple reps can stay in the session with the messaging end user. **note:** Like all enhanced Messaging channel types, Bring Your Own Channel for Messaging doesn’t currently support conferencing with AI agents or bots. When you create the ConversationChannelDefinition record, set these fields to support the Conferencing feature. - To specify that your integration supports conferencing, set `isConferenceSupported` to `true`. - To set your own limit for how many participants can be in a Messaging session conference, set a number value for `MaxParticipantsForCnfrOverride`. This field is needed only if you want to use a different limit instead of the platform limit. If this field isn’t set or is set to a value higher than the Messaging platform limit, the integration defaults to the Messaging platform limit of how many participants can be in a Messaging session conference at one time. See [Service Cloud Messaging Limits and Considerations](https://help.salesforce.com/s/articleView?id=service.livemessage_limitations.htm) for the platform limit. # Add or Change the Translation of a Survey Field If a survey field can be translated or is already translated into a particular language, you can add or change the translated value of the survey field. This resource is available in REST API version 48.0 and later. **note:** This URI can only be used for the flow process type `Survey`. ## Syntax **URI:** `/services/data/vXX.X/localizedvalue/record/developerName/language` **Formats:** JSON **HTTP methods:** POST **Authentication:** `Authorization: Bearer token` **Request body JSON example** ```nolang { "value": "China" } ``` **Request parameters** |Parameter|Description| |---------|-----------| |`developerName`|Optional. Developer name of the flow field.| |`language`|Optional Translated language of the flow field.| |`value`|Required. Translated value of the flow field.| **Response parameters** |Parameter|Description| |---------|-----------| |`createdBy`|ID of the user who translated the flow field.| |`createdDate`|Date and time the flow field was translated.| |`developerName`|Developer name of the flow field.| |`language`|Language into which the flow field was translated.| |`value`|Translated value of the flow field.| |`isOutofDate`|Indicates if the flow field is out of date.| ## Example ```nolang { "createdBy": "005xxx", "createdDate": "2018-09-14T00:10:30Z", "developerName": "Flow.Flow.MyFlow.1.Choice.Choice_1_Master.InputLabel", "language": "zh_CN", "value": "中國", "isOutOfDate": true } ``` # Add or Update the Translated Value of Multiple Survey Fields in One or More Languages If one or more survey fields can be translated or are already translated, you can add or update the translated values of the survey fields in the languages into which survey fields can be translated. This resource is available in REST API version 48.0 and later. **note:** This URI can only be used for the flow process type `Survey`. ## Syntax **URI:** `/services/data/vXX.X/localizedvalue/records/upsert` **Formats:** JSON **HTTP methods:** POST **Request body JSON example** ```nolang [ { "developerName": "Flow.Flow.MyFlow.1.Choice.Choice_1_Master.InputLabel", "language": "en_US", "value": "China" }, { "developerName": "Flow.Flow.MyFlow.1.Choice.Choice_1_Master.InputLabel", "language": "zh_CN", "value": "中國" } ] ``` **Request parameters** |Parameter|Description| |---------|-----------| |`developerName`|Required. Developer name of the flow field.| |`language`|Required. Language into which the flow field is translated.| |`value`|Required. New or updated value of the flow field.| **Response parameters** |Parameter|Description| |---------|-----------| |`createdBy`|ID of the user who translated the flow field.| |`createdDate`|Date and time the flow field was translated.| |`developerName`|Developer name of the flow field.| |`language`|Language into which the flow field was translated.| |`value`|Updated value of the flow field.| |`isOutofDate`|Indicates if the flow field is out of date.| ## Example ```nolang [ { "createdBy": "005xxx", "createdDate": "2018-09-14T00:10:30Z", "developerName": "Flow.Flow.MyFlow.1.Choice.Choice_1_Master.InputLabel", "language": "en_US", "value": "China", "isOutOfDate": false }, { "createdBy": "005xxx", "createdDate": "2018-09-14T00:10:30Z", "developerName": "Flow.Flow.MyFlow.1.Choice.Choice_1_Master.InputLabel", "language": "zh_CN", "value": "中國", "isOutOfDate": false } ] ``` # Add Support for After Conversation Work After Conversation Work (ACW) gives reps a set amount of time after a customer conversation to wrap up their work before making themselves available for new work to be received. Follow these steps to support the After Conversation Work feature for Bring Your Own Channel for CCaaS. 1. To trigger After Conversation Work for a rep’s AgentWork, call the Interaction Service [Remove a Participant](https://developer.salesforce.com/docs/service/interaction-service-api/references/interaction-service-reference/api-participant.html) API (`POST /api/v1/participant`). 2. If the rep wraps up their work before the After Conversation Work period runs out, end the work from your integration by calling the Interaction Service [Update or Close an AgentWork Record](https://developer.salesforce.com/docs/service/interaction-service-api/references/interaction-service-reference/api-agentWork-patch.html) API (`PATCH /api/v1/agentWork`) with `status` set to **Close** and `contextType` set to **Agent**. That closes the AgentWork record from your server and aligns with capacity and messaging session behavior for After Conversation Work. 3. If the rep is working in the Salesforce console and finishes early, they can select **All Done** or close the record tab to show they’re ready to help the next customer. In that case, use the `closeAgentWork()` method of the Lightning Console JavaScript API (omniToolkitAPI) to change the work item status to Closed and remove it from the list of work items in the Omni-Channel utility. 4. Otherwise, After Conversation Work times out based on the **Max Time** in seconds specified by the Salesforce admin. **note:** Use the Interaction Service Remove a Participant API and Update or Close an AgentWork Record API for messaging sessions only. To control After Conversation Work for Voice, see [_Salesforce Voice with Partner Telephony Developer Guide_: After Conversation Work](https://developer.salesforce.com/docs/atlas.en-us.voice_pt_developer_guide.meta/voice_pt_developer_guide/voice_pt_after_conversation_work.htm). **See Also** - _Interaction Service API_: [Remove a Participant](https://developer.salesforce.com/docs/service/interaction-service-api/references/interaction-service-reference/api-participant.html) - _Interaction Service API_: [Update or Close an AgentWork Record](https://developer.salesforce.com/docs/service/interaction-service-api/references/interaction-service-reference/api-agentWork-patch.html) - _Salesforce Console Developer Guide_: [closeAgentWork for Lightning Experience](https://developer.salesforce.com/docs/atlas.en-us.api_console.meta/api_console/sforce_api_console_lightning_closeagentwork.htm) - _Omni-Channel Developer Guide_: [Methods for Omni-Channel in Lightning Experience](https://developer.salesforce.com/docs/atlas.en-us.omni_channel_dev.meta/omni_channel_dev/service_presence_console_api_lightning_methods.htm) - _Salesforce Help_: [Configure After Conversation Work Time](https://help.salesforce.com/s/articleView?id=service.omnichannel_configure_after_conversation_work_time.htm) # Add Support for Custom Parameters Use parameters, parameter mappings, and flows to route custom data to Salesforce objects. For example, pass the name of a Messaging end user to the messaging session object using a flow. 1. To pass custom parameters in the API, set the `capabilitiesSupportsCustomChannelParameters` field to `true` in ConversationChannelDefinition. 2. Ask your admin to use the guidance in [Route Data to Objects in Bring Your Own Channel](https://help.salesforce.com/s/articleView?id=service.partner_messaging_parameters.htm) to take these steps. Their business needs will be different than those in the example, so the exact flow logic will differ. - The admin should create an Omni-Channel flow with a variable that’s used to route data to an object. For example, use a variable named `newEndUserName` to update the Name field of a Messaging User object. - Ask the admin for the DurableId of their flow. The DurableId always starts with 300 and is different from the FlowId. - In Messaging Settings, the admin should create a custom parameter that matches the variable name in the Omni-Channel flow and add a parameter mapping for the custom parameter. For example, the admin creates a custom parameter named newEndUserName and maps it. When the admin creates the new parameter and mapping, ask them to note the Channel Variable Name and Maximum Length. ![Note Channel Variable Name in new parameter](https://developer.salesforce.com/docs/media/messaging-partner/messaging_byoc_add_custom_parameter.png '{"class": "image-md"}') 3. To route the flow if your implementation uses partner-owned routing (`ConversationChannelDefinition.routingOwner` is `Partner`), make a call to the Interaction Service Route Conversation API (`POST /api/v1/route`). - Set `routingType` to `Initial`, and pass in the target flow ID and fallback queue ID through `routingInfo.flow`. - Use the `routingAttributes` parameter to pass the key-value pair for the flow variable in the format `"routingAttributes" : {"key" : "value"}`, where `key` is the channel variable name in the parameter mapping, and `value` is the value. The value length should be less than or equal to the Maximum Length that the Salesforce admin set for the custom parameter in Messaging Settings. In the sample payload, in routingAttributes the key is set to `newEndUserName` which is mapped to the input `newEndUserName` parameter in Salesforce. Here is a sample payload for `POST /api/v1/route`. ```json { "conversationIdentifier": "1234a5bc-52b8-43ed-9608-7997f7b88dc1", "routingType": "Initial", "routingInfo": { "flow":{ "flowId": "300SG00000H3idpYAB", "queueId": "00GSG000004PZNl" }, "routingAttributes": { "newEndUserName" : "Sally Goforth" } } } ``` **See Also** - _Salesforce Help_: [Route Data to Objects in Bring Your Own Channel](https://help.salesforce.com/s/articleView?id=service.partner_messaging_parameters.htm) - _Salesforce Help_: [Understand the Details of the Routing Lifecycle](https://help.salesforce.com/s/articleView?id=service.omnichannel_psr_lifecycle.htm) - [Interaction Service API](https://developer.salesforce.com/docs/service/interaction-service-api/guide/get-started.html) - _GitHub_: [Interaction Service APIs](https://github.com/salesforce-misc/interaction-service-apis) # Add Support for Custom Parameters Use parameters, parameter mappings, and flows to route custom data to Salesforce objects. For example, pass the name of a Messaging end user to the messaging session object using a flow. 1. To pass custom parameters in the API, set the `capabilitiesSupportsCustomChannelParameters` field to `true` in ConversationChannelDefinition. 2. Ask your admin to use the guidance in [Route Data to Objects in Bring Your Own Channel](https://help.salesforce.com/s/articleView?id=service.partner_messaging_parameters.htm) to take these steps. Their business needs will be different than those in the example, so the exact flow logic will differ. - The admin should create an Omni-Channel flow with a variable that’s used to route data to an object. For example, use a variable named `newEndUserName` to update the Name field of a Messaging User object. - In Messaging Settings, the admin should create a custom parameter that matches the variable name in the Omni-Channel flow and add a parameter mapping for the custom parameter. For example, the admin creates a custom parameter named newEndUserName and maps it. When the admin creates the new parameter and mapping, ask them to note the Channel Variable Name and the Maximum Length. ![Note Channel Variable Name in new parameter](https://developer.salesforce.com/docs/media/messaging-partner/messaging_byoc_add_custom_parameter.png '{"class": "image-md"}') 3. To send a message while passing the parameter and its value to the object, make a call to the Interaction Service API. Choose the endpoint that matches your use case. - If the messaging end user sends the first message in the conversation, call the Interactions API (`POST /api/v1/interactions`). - If an AI agent sends the first message in the conversation through proactive messaging, call the Establish Conversation API (`POST /api/v1/conversation`). - For either endpoint, use the `routingAttributes` parameter to pass the key-value pair for the flow variable in the format `"routingAttribute" : "key" : "value"`, where `key` is the channel variable name in the parameter mapping, and `value` is the value. The value length must be less than or equal to the Maximum Length that the Salesforce admin set for the custom parameter in Messaging Settings. In the sample payload, in `routingAttributes` the key is set to `newEndUserName` which is mapped to the input `newEndUserName` parameter in Salesforce. Here is a sample payload for `POST /api/v1/interactions`. ```json { "to": "b8a600d5-9c5f-4e9a-a42a-0b82cee60ede", "from": "APlusCustomer", "routingAttributes": { "newEndUserName" : "Sally Goforth" }, "interactions": [ { "timestamp": 8002345678, "interactionType": "EntryInteraction", "payload": { "id": "f7904eb8-5352-5c5e-bdf6-5f1005001007", "entryType": "Message", "abstractMessage": { "messageType": "StaticContentMessage", "id": "f7904eb8-5352-5c5e-bdf6-5f1005001007", "staticContent": { "formatType": "Text", "text": "Hi there" } } } } ] } ``` **See Also** - _Salesforce Help_: [Route Data to Objects in Bring Your Own Channel](https://help.salesforce.com/s/articleView?id=service.partner_messaging_parameters.htm) - _Salesforce Help_: [Understand the Details of the Routing Lifecycle](https://help.salesforce.com/s/articleView?id=service.omnichannel_psr_lifecycle.htm) - [Interaction Service API](https://developer.salesforce.com/docs/service/interaction-service-api/guide/get-started.html) - _GitHub_: [Interaction Service APIs](https://github.com/salesforce-misc/interaction-service-apis) # Add the Service SDK Frameworks Manually Add the SDK frameworks by manually embedding the appropriate frameworks. ## Before You Begin **important:** 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](https://help.salesforce.com/s/articleView?id=service.miaw_intro_landing.htm&type=5) before that date. Messaging offers many of the [chat features](https://help.salesforce.com/s/articleView?id=service.miaw_chat_vs_messaging.htm&type=5) that you love plus asynchronous conversations that can be picked back up at any time. Learn about chat retirement in [Help](https://help.salesforce.com/s/articleView?id=001790618&type=1). **note:** If you are using Xcode 12.3 or later, you must install the SDK using XCFramework files. 1. Download the SDK frameworks from the [Service Chat SDK download page](https://github.com/forcedotcom/ServiceSDK-iOS/wiki/Get-the-iOS-SDK). 2. Embed the relevant Service Chat SDK frameworks into your project. You can find the framework files within the `Frameworks` folder. Specifically, the following frameworks are available for you to use: | Framework | Description | | ------------- | ----------------------------------------------------------- | | `ServiceCore` | Contains all the common components used by the Service SDK. | | `ServiceChat` | Contains access to the Chat features of the SDK. | Add the relevant frameworks to the **Frameworks, Libraries, and Embedded Content** section of the **General** tab for your target app. **important:** Before embedding a framework into your project, be sure to copy the framework file into your project folder (or another location found in the framework search path). If Xcode can’t find the framework, you won’t be able to access its contents in your code. Once you've added the SDK frameworks, proceed with [the installation instructions](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/ios-sdk-install-overview.md). # Add the Service SDK Frameworks with CocoaPods Add the SDK frameworks using CocoaPods, a developer tool that automatically manages dependencies. **important:** 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](https://help.salesforce.com/s/articleView?id=service.miaw_intro_landing.htm&type=5) before that date. Messaging offers many of the [chat features](https://help.salesforce.com/s/articleView?id=service.miaw_chat_vs_messaging.htm&type=5) that you love plus asynchronous conversations that can be picked back up at any time. Learn about chat retirement in [Help](https://help.salesforce.com/s/articleView?id=001790618&type=1). 1. If you haven't already done so, install the [CocoaPods](https://cocoapods.org/) gem and initialize the CocoaPods main repository. ```java sudo gem install cocoapods pod setup ``` **note:** The minimum supported version of CocoaPods is 1.0.1. If you're not sure what version you have, use `pod --version` to check the version number. 2. If you already have [CocoaPods](https://cocoapods.org/) installed, update your pods to the latest version. ```java pod update ``` 3. Change to the root directory of your application project. 4. Create or edit a file named `Podfile` that contains the Service Chat SDK dependency. 1. If you want to install the complete _Service Chat SDK_, update your `Podfile` to include `ServiceSDK`. ```java source 'https://github.com/CocoaPods/Specs.git' source 'https://github.com/goinstant/pods-specs-public' # To use the SDK (with all components) target '' do pod 'ServiceSDK' end ``` 2. If you want to install a single _Service Chat SDK_ component, create a similar `Podfile` to the one specified above, but only include the desired pod. | Feature | Pod name | | ------- | ----------------- | | Chat | `ServiceSDK/Chat` | For example, the following `Podfile` installs Chat. ```java source 'https://github.com/CocoaPods/Specs.git' source 'https://github.com/goinstant/pods-specs-public' # To use Chat target '' do pod 'ServiceSDK/Chat' end ``` If you don't specify a version number, you automatically get the latest version of that component. If you want to add a specific version to your component, be sure to add the version number of the Service Chat SDK and _not_ the version number of the individual component. 5. Run the CocoaPods installer. ```java pod install ``` This command generates a `.xcworkspace` file for you with all the dependencies included. **note:** If you run into issues installing or updating the SDK, clear the local CocoaPods cache and then perform a `pod update`. 6. Open the `.xcworkspace` file that CocoaPods generated and continue with the installation process. **note:** Be sure to open the `.xcworkspace` file (which includes all the dependencies) and _not_ the `.xcodeproj` file. Once you've added the SDK frameworks, proceed with [the installation instructions](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/ios-sdk-install-overview.md). # addEventListener() Adds a listener for a custom event type or a standard event type when the event is fired. This method adds a listener for custom event types in API version 25.0 or later; it adds a listener for standard event types in API version 30.0 or later. For the list of standard events, see [Methods for Console Events](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-methods-events.md). ## Syntax ```javascript sforce.console.addEventListener( eventType: String, eventListener:Function, (optional)additionalParams:Object ) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`eventType`|string|Custom event type for which eventListener listens.| |`eventListener`|function|JavaScript method called when an eventType is fired.| |`additionalParams`|object|Optional parameters accepted by this method. The supported properties on this object are `tabId`: The ID of the tab to listen for the specified event. This argument is only available in API version 30.0 or later.| ## Sample Code API Version 25.0 or Later–Visualforce ```apex_page ``` ## Response This method is asynchronous, so it returns its response in an object in a callback method. The response object contains the following field: |Name|Type|Description| |----|----|-----------| |`message`|string|The message which is sent with the fired event. If the response is from a custom keyboard shortcut, the `message` includes the following information on which the browser is focused, in this order:
  1. Object ID of the primary tab
  2. ID of the primary tab
  3. Object ID of the subtab
  4. ID of the subtab
| ## Sample Code API Version 30.0 or Later–Visualforce ```apex_page ``` ## Response This method is asynchronous, so it returns its response in an object in a callback method. The response object contains the following field: |Name|Type|Description| |----|----|-----------| |`message`|string|The message which is sent with the fired event. If the response is from a console event, the `message` includes payload details as described in [Methods for Console Events](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-methods-events.md). If the response is from a custom keyboard shortcut, the `message` includes the following information on which the browser is focused, in this order:
  1. Object ID of the primary tab
  2. ID of the primary tab
  3. Object ID of the subtab
  4. ID of the subtab
| # Additional Salesforce Scheduler Objects Additional Salesforce Scheduler objects, including appointment assignment, scheduling policies, and related junction objects that are documented in the Salesforce Object Reference. These objects are documented in the [Salesforce Object Reference](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_list.htm). - [AppointmentAssignmentPolicy](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_appointmentassignmentpolicy.htm) - [AppointmentScheduleAggr](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_appointmentscheduleaggr.htm) - [AppointmentScheduleLog](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_appointmentschedulelog.htm) - [AppointmentSchedulingPolicy](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_appointmentschedulingpolicy.htm) - [AppointmentTopicTimeSlot](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_appointmenttopictimeslot.htm) - [OperatingHoursHoliday](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_operatinghoursholiday.htm) - [ServiceTerritoryWorkType](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_serviceterritoryworktype.htm) # addPushNotificationListener() Adds a listener for a push notification. A user can only register a listener once until he or she removes the listener, or the listener is removed by another user. This method is only available in API version 26.0 or later. For more information on push notifications, see [Methods for Push Notifications](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-methods-push-notifications.md). ## Syntax ```javascript sforce.console.addPushNotificationListener( objects: array, eventHandler:Function ) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`objects`|array|Objects set to receive notifications.| |`eventHandler`|function|JavaScript method called when there is a push notification.| ## Sample Code–Visualforce ```apex_page ``` ## Response This method is asynchronous so it returns its response in an object in a callback method. |Name|Type|Description| |----|----|-----------| |`id`|string|The object ID of the push notification.| |`entityType`|string|The type of object included in the push notification. For example, Account or Contact. Objects available for push notifications are determined by the administrator who set up a Salesforce console.| |`Type`|string|The field of the object included in the push notification. For example, the `Account Name` field on Account. Notifications occur when the field is either updated or created. Fields on objects available for push notifications are determined by the administrator who set up a Salesforce console.| |`LastModifiedById`|string|The user ID of the user who last modified the object in the push notification.| # Address Work.com uses the Address standard object to store data about a workplace location address. The Workplace Command Center managed package installs custom fields for the Address standard object. The VisitorAddressId field on the [Location](https://developer.salesforce.com/docs/service/workdotcom-dev/guide/wdc-cc-sforce-api-objects-location.md) object relates address data to a location. ## Custom Fields | Field | Type | Properties | Description | | ------------------- | -------- | ------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | wkcc\_\_County\_\_c | string | Create, Filter, Group, Nillable, Sort, Update | For locations within the United States, use this field for the county in which a location is found. For locations outside the United States, this field can be used for the local municipality name. Available in API version 50.0 and later. | | wkcc\_\_Region\_\_c | picklist | Create, Filter, Group, Nillable, Restricted picklist, Sort, Update | The geographic region to which a location belongs. The values for this picklist are managed by Salesforce and can’t be edited. The valid values are:
  • `AMER`
  • `APAC`
  • `EMEA`
  • `LATAM`
Available in API version 50.0 and later. | # Address Migration Roadblocks Learn about common roadblocks to watch for and ways to address them. ## `voiceCallId` missing from `CALL_STARTED` Supervisor view shows no call data, and VoiceCall ownership is never assigned. Always populate `callAttributes.voiceCallId`. ## Publishing events from inside a method Salesforce called This situation causes duplicate events and state machine bugs. Return a Promise with the result; let the framework publish. ## Not following the call scenario diagrams With the new base connector, events emitted out of context are rejected. Follow the canonical sequences for single-call and multiparty call. The base connector enforces ordering: `CALL_CONNECTED` before `CALL_STARTED`, `PARTICIPANT_ADDED` without an active call, and other out-of-sequence events are dropped. See [Call Scenario Diagrams](https://developer.salesforce.com/docs/atlas.en-us.voice_pt_developer_guide.meta/voice_pt_developer_guide/voice_pt_advanced_call_scenario_diagrams.htm) for details. ## Not respecting `enqueueNextState` Causes dropped calls when reps go Offline mid-call. Declare `hasPendingStatusChange: true` and honor the flag in `setAgentStatus()`. Offline is the worst status to flip to mid-call; always queue it. ## Running Open CTI adapter and Salesforce Voice with Partner Telephony connector simultaneously Both will create records on call end. Deactivate the Open CTI adapter before activating Salesforce Voice with Partner Telephony in production. ## Putting screen pop logic in the connector JS This may work in a single tab, but it breaks on reconnect and multi-tab. Screen pop belongs in an Omni-Channel flow, not the connector. ## Building from scratch instead of cloning the demo connector The demo connector handles dozens of edge cases in the event lifecycle. Always start from it. See [Clone Before You Build](https://developer.salesforce.com/docs/service/api-cti/guide/clone-before-build.md). ## Modeling VoiceCall as a kind of Task VoiceCall is a richer, voice-native object. Use it directly; let customers decide whether they also want a Task, a Case, or an Opportunity related to it. # addToBrowserTitleQueue() Adds a browser tab title to a list of titles, which rotates every three seconds. This method is only available in API version 28.0 or later. ## Syntax ```javascript sforce.console.addToBrowserTitleQueue( title:String, callback:Function ) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`title`|string|Browser tab title that is displayed.| |`callback`|function|JavaScript method that’s called upon completion of the method.| ## Sample Code–Visualforce ```apex_page Click here to enqueue a browser title ``` ## Response This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following fields: |Name|Type|Description| |----|----|-----------| |`success`|boolean|If `true`, the title was successfully added to the browser title queue. If `false`, the title wasn’t added to the browser title queue.| |`callback`|function|JavaScript method that’s called upon completion of the method.| # addToBrowserTitleQueue() for Lightning Experience Adds a string to a list of titles that rotate in the browser title bar every three seconds.This method works only in Lightning console apps. This method isn’t supported for Lightning Web Components (LWC). **note:** Accurate browser tab titles help improve accessibility. Screen readers announce page titles when a page is first loaded, and don’t announce dynamic updates to the title. Use the root node of the document, like `document.title`, to announce the updated browser tab title instead. ## Arguments |Name|Type|Description| |----|----|-----------| |`title`|string|The browser tab title to add.| ## Aura Components Sample Code This component has a button that, when pressed, adds a string to a list of titles that rotate in the browser title bar every three seconds. Component code: ```html ``` Controller code: ```javascript ({ handleAddToBrowserTitleQueue : function(component, event, helper) { var workspaceAPI = component.find("workspace"); workspaceAPI.addToBrowserTitleQueue({ title: "New Browser Title" }) .then(function(result){ console.log(result); }) .catch(function(error) { console.log(error); }); } }) ``` ## Response This method returns a promise that, upon success, resolves to `true`. # Agent Availability Check Always Fails What to look into when agent availability fails. If you use the [Permitted Domains setting in your Chat deployment](https://help.salesforce.com/articleView?id=live_agent_deployment_settings.htm&type=0), you’ll get unreliable information from the chat availability check in the SDK. For instance, the agent availability status may always return `false`. If you want to use Permitted Domains for your web chat deployment, we strongly advise that you create a separate deployment for the Service SDK. # Agentforce IT Service Associated Objects This section provides a list of objects associated to Channel Revenue Management standard objects with their standard fields. Some fields may not be listed for some objects. To see the system fields for each object, see [System Fields](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/system_fields.htm) in the *Object Reference for Salesforce and Lightning Platform*. To verify the complete list of fields for an object, use a describe call from the API or inspect with an appropriate tool. For example, inspect the WSDL or use a schema viewer. These associated objects are documented in the [Salesforce Object Reference](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_associated_objects_list.htm). - [StandardObjectName ChangeEvent](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_associated_objects_change_event.htm) - [StandardObjectName Feed](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_associated_objects_feed.htm) - [StandardObjectName History](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_associated_objects_history.htm) - [StandardObjectName OwnerSharingRule](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_associated_objects_ownersharingrule.htm) - [StandardObjectName Share](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_associated_objects_share.htm) # Agentforce IT Service Developer Guide Previous PDF Versions | API Version | Release | PDF | | ----------- | ---------- | --------------------------------------------------------------------------------------------------------- | | 68.0 | Winter '27 | [Download PDF](https://resources.docs.salesforce.com/264/latest/en-us/sfdc/pdf/agentforce_it_service.pdf) | | 67.0 | Summer '26 | [Download PDF](https://resources.docs.salesforce.com/262/latest/en-us/sfdc/pdf/agentforce_it_service.pdf) | | 66.0 | Spring '26 | [Download PDF](https://resources.docs.salesforce.com/260/latest/en-us/sfdc/pdf/agentforce_it_service.pdf) | | 65.0 | Winter '26 | [Download PDF](https://resources.docs.salesforce.com/258/latest/en-us/sfdc/pdf/agentforce_it_service.pdf) | # Agentforce IT Service Fields on Standard Objects Agentforce IT Service adds standard fields to some standard Salesforce objects to represent information specific to IT issues and service requests. These fields are available only in orgs where Agentforce IT Service is enabled. |Required Editions| |-----------------| |Available in: **Enterprise**, and **Developer** Editions.| The topics in this guide describe the object fields specific to Agentforce IT Service. See also the general descriptions of these objects in the [Salesforce Object Reference](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_list.htm). - **[ChangeRequest](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/sforce-api-objects-changerequest.md)** Standard fields extend the ChangeRequest object for use in Agentforce IT Service to represent the fix implemented for an issue. This object is available in API version 65.0 and later. - **[Incident](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/sforce-api-objects-incident.md)** Standard fields extend the Incident object for use in Agentforce IT Service to represent an issue. This object is available in API version 65.0 and later. - **[Problem](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/sforce-api-objects-problem.md)** Standard fields extend the Problem object for use in Agentforce IT Service to represent the root cause of an issue. This object is available in API version 65.0 and later. # Agentforce IT Service Metadata API Types Metadata API enables you to access some types and feature settings that you can customize in the user interface. For more information about Metadata API and to find a complete reference of existing metadata types, see **[Metadata API Developer Guide](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_intro.htm)**. This type is documented in the [Metadata API Developer Guide](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_intro.htm). - [ActionPlanTemplate](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_actionplantemplate.htm) - **[NtfcnDefinition](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/meta-ntfcndefinition.md)** Represents a notification definition, including the criteria that trigger the notification and the channels, recipients, and content used to deliver it. This type extends the Metadata metadata type and inherits its fullName field. - **[ServiceMgmtKnwlgArtclConfig](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/meta-servicemgmtknwlgartclconfig.md)** Represents a collection of settings to configure Service Management Knowledge. - **[Settings](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/agentforce-it-service-metadata-api-settings.md)** Represents the organization settings related to a feature. For example, your password policies, session settings and network access controls are all available in the SecuritySettings component type. For more information, see **[Settings](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_settings.htm)**. # Agentforce IT Service Platform Event Use the SvcMgmtProacAgntUpdtEvnt event to get the updated details from the response of a proactive agent action and sends the updated details to be displayed on a record page when the user refreshes the action. |Required Editions| |-----------------| |Available in: Lightning Experience| |Available in: **Enterprise**, and **Unlimited** Editions| - **[SvcMgmtProacAgntUpdtEvnt](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/sforce-api-objects-svcmgmtproacagntupdtevnt.md)** Represents an event that gets the updated details from the response of a proactive agent action and sends the updated details to be displayed on a record page when the user refreshes the action. The event stores details such as the source record for which the action is triggered, the message type for which detals are stored, and the status of the response. This object is available in API version 65.0 and later. # Agentforce IT Service Standard Objects Agentforce IT Service data model provides objects and fields to track and manage IT issues and service requests. Use these objects to manage your IT service processes. |Required Editions| |-----------------| |Available in: Lightning Experience| |Available in: **Enterprise**, and **Unlimited** Editions| - **[AssetActivity](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/sforce-api-objects-assetactivity.md)** Represents an activity that changes an asset's status, location, or ownership. This object is available in API version 67.0 and later. - **[AssetActivityFieldChange](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/sforce-api-objects-assetactivityfieldchange.md)** Represents a change to an asset field value that occurred during an asset activity. This object is available in API version 67.0 and later. - **[AssetDepreciationLog](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/sforce-api-objects-assetdepreciationlog.md)** Records activity, status updates, and errors generated during the asset depreciation process. This object is available in API version 67.0 and later. - **[AssetServiceRequest](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/sforce-api-objects-assetservicerequest.md)** Junction entity used to link Multiple ServiceRequest to an Asset and Multiple Assets to a ServiceRequest This object is available in API version 66.0 and later. - **[CertDisposalOrderLineItem](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/sforce-api-objects-certdisposalorderlineitem.md)** Links an individual asset to a certificate of disposal for audit traceability. This object is available in API version 67.0 and later. - **[CertificateOfDisposal](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/sforce-api-objects-certificateofdisposal.md)** Stores the proof of disposal for compliance and audit purposes. This object is available in API version 67.0 and later. - **[CertificateOfDisposalHistory](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/sforce-api-objects-certificateofdisposalhistory.md)** Represents the history of changes made to a certificate of disposal. This object is available in API version 67.0 and later. - **[CertificateOfDisposalShare](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/sforce-api-objects-certificateofdisposalshare.md)** Represents a sharing entry on a certificate of disposal. This object is available in API version 67.0 and later. - **[ChangeRequestCnfgItem](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/sforce-api-objects-changerequestcnfgitem.md)** Represents the relationship between a change request and a configuration item reference. This object is available in API version 65.0 and later. - **[ChangeRequestConflict](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/sforce-api-objects-changerequestconflct.md)** Represents the details related to a conflict between a change request and other scheduled activities, such as scheduled events or other change requests that are planned for deployment in the same period. This object is available in API version 66.0 and later. - **[CnfgItemChangeEvent](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/sforce-api-objects-cnfgitemchangeevent.md)** Stores Configuration Item (CI) change events when a CI is created or updated in CMDB and matches a CI Type that's enabled for asset tracking. This object is available in API version 66.0 and later. - **[ConfigurationItem](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/sforce-api-objects-configurationitem.md)** Represents a record in the core Salesforce system that refers to a configuration item record stored in an external system. This object is available in API version 65.0 and later. - **[CnfgMgmtCredential](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/sforce-api-objects-cnfgmgmtcredential.md)** Represents authentication information needed to access and interact with various IT devices and systems during the discovery processes. For example, SSH key. This object is available in API version 65.0 and later. - **[CnfgMgmtDiscoveryAgent](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/sforce-api-objects-cnfgmgmtdiscoveryagent.md)** Represents an installed discovery agent on a system. Serves as a child object of Discovery Agent and tracks individual agent instances across the environment. This object is available in API version 65.0 and later. - **[CnfgMgmtDiscoveryAgentDef](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/sforce-api-objects-cnfgmgmtdiscoveryagentdef.md)** Represents discovery agents installed on various operating systems. Acts as a parent object that groups agent instances by type and operating system. Captures metadata such as version and upgrade preferences. This object is available in API version 65.0 and later. - **[CnfgMgmtDiscoveryApp](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/sforce-api-objects-cnfgmgmtdiscoveryapp.md)** Represents the definition of a discovery application used for agentless discovery. These applications are installed on customer network hosts and are used to scan other devices in the environment. This object is available in API version 65.0 and later. - **[CnfgMgmtDiscoveryProbe](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/sforce-api-objects-cnfgmgmtdiscoveryprobe.md)** Represents the definition of probe types that determine which commands or scripts are executed during a discovery scan. For example, deep host scan, basic host scan, or vcenter scan. This object is available in API version 65.0 and later. - **[CnfgMgmtDiscoverySchd](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/sforce-api-objects-cnfgmgmtdiscoveryschd.md)** Represents the definition of a schedule that controls when a discovery scan should run. For example, a daily or weekly cron-based schedule for scanning cloud infrastructure. This object is available in API version 65.0 and later. - **[CnfgMgmtDiscoveryTarget](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/sforce-api-objects-cnfgmgmtdiscoverytarget.md)** Represents the definition of a logical grouping of endpoints or environments to be scanned during IT infrastructure or asset discovery. For example, New York datacenter, Washington office ground floor, or AWS Staging. This object is available in API version 65.0 and later. - **[CnfgMgmtDiscoveryTgtCrdl](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/sforce-api-objects-cnfgmgmtdiscoverytgtcrdl.md)** Represents the credentials associated with a specific discovery target. Credentials are used to authenticate and execute commands during the scan. This object is available in API version 65.0 and later. - **[CnfgMgmtDiscoveryTgtParm](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/sforce-api-objects-cnfgmgmtdiscoverytgtparm.md)** Represents the definition of parameters used to control or refine cloud infrastructure scans. For example, imported items such as virtual machines, ports, or host names. This object is available in API version 65.0 and later. - **[DepreciationPlan](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/sforce-api-objects-depreciationplan.md)** Represents the rules and methods used to calculate the depreciation value of an asset. This object is available in API version 66.0 and later. - **[DisposalOrder](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/sforce-api-objects-disposalorder.md)** Manages the disposal of IT hardware assets, tracking the method, vendor, costs, and status. This object is available in API version 67.0 and later. - **[DisposalOrderHistory](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/sforce-api-objects-disposalorderhistory.md)** Represents the history of changes made to a disposal order. This object is available in API version 67.0 and later. - **[DisposalOrderLineItem](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/sforce-api-objects-disposalorderlineitem.md)** Represents an individual asset linked to a disposal order. This object is available in API version 67.0 and later. - **[DisposalOrderLineItemHistory](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/sforce-api-objects-disposalorderlineitemhistory.md)** Represents the history of changes made to a disposal order line item. This object is available in API version 67.0 and later. - **[DisposalOrderShare](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/sforce-api-objects-disposalordershare.md)** Represents a sharing entry on a disposal order. This object is available in API version 67.0 and later. - **[IncidentConfigurationItem](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/sforce-api-objects-incidentconfigurationitem.md)** Represents the relationship between an incident and a configuration item reference. This object is available in API version 65.0 and later. - **[ObjectMilestonePauseTime](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/sforce-api-objects-objectmilestonepausetime.md)** Represents the details related to the duration, start and end times of when users pause and resume milestones for a specific object. This object is available in API version 65.0 and later. - **[ProblemConfigurationItem](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/sforce-api-objects-problemconfigurationitem.md)** Represents the relationship between a problem and a configuration item reference. This object is available in API version 65.0 and later. - **[Release](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/sforce-api-objects-release.md)** Represents a release for service management operations, such as incidents, problems, and change requests. A release is a period during which new or updated service operations are deployed. This object is available in API version 65.0 and later. - **[ReleaseParticipant](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/sforce-api-objects-releaseparticipant.md)** Represents the relationship between a release and a user or group who participates in a release, such as an owner or a manager. This object is available in API version 65.0 and later. - **[ReleaseRelatedRecord](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/sforce-api-objects-releaserelatedrecord.md)** Represents the relationship between a release and a record, such as incident, problem, or change request. This object is available in API version 65.0 and later. - **[SrvcMgmntApprovalAssignment](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/sforce-api-objects-srvcmgmntapprovalassignment.md)** Represents the relationship between a service operation and a group or user to which the operation is assigned by default for approval. This object is available in API version 65.0 and later. - **[SrvcMgmntRecEvntAsgnt](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/sforce-api-objects-srvcmgmntrecevntasgnt.md)** Represents the relationship between events automatically created by the system and assigned to a related record, such as a release or a change request. This object is available in API version 65.0 and later. - **[SrvcMgmntRuleAssignment](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/sforce-api-objects-srvcmgmntruleassignment.md)** Represents the relationship between a business operation and a group or user to which the operation is assigned by default. This object is available in API version 65.0 and later. - **[ServiceManagementPrivilege](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/sforce-api-objects-servicemanagementprivilege.md)** Represents an individual service management privilege available in the system, including its type, scope, and permitted level of access. This object is available in API version 66.0 and later. # Agentforce IT Service Tooling API Objects Tooling API exposes metadata used in developer tooling that you can access through REST or SOAP. Tooling API’s SOQL capabilities for many metadata types allow you to retrieve smaller pieces of metadata. For more information about Tooling API objects and to find a complete reference of all the supported objects, see **[Introducing Tooling API](https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/intro_api_tooling.htm)**. - **[CnfgItemAttrDef](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/tooling-api-objects-cnfgitemattrdef.md)** Represents the definition of an attribute or a property for a configuration item. Each attribute of a configuration item can be defined with characterists such as whether the attribute is hidden, mandatory, what's the data type, status, and so on. For example, CI name, CI owner, Status, and so on. This object is available in API version 65.0 and later. - **[CnfgItemAttrPcklstValDef](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/tooling-api-objects-cnfgitemattrpcklstvaldef.md)** Represents a specific value for a configuration item attribute. For example, high, medium, and low are picklist values of the attribute Business Criticality. This object is available in API version 65.0 and later. - **[CnfgItemAttrPicklistDef](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/tooling-api-objects-cnfgitemattrpicklistdef.md)** Represents a definition for a configuration item attribute that allows multiple possible values. For example, the attribute Business Criticality can have multiple values. This object is available in API version 65.0 and later. - **[CnfgItemAttrSetAttr](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/tooling-api-objects-cnfgitemattrsetattr.md)** Specifies the attribute set to which an attribute belongs. For example, Stakeholders attribute set definition contains the attribute Owner. This object is available in API version 65.0 and later. - **[CnfgItemAttrSetDef](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/tooling-api-objects-cnfgitemattrsetdef.md)** Represents the definition of a logical grouping of configuration item attributes that's used to display similar attributes together. For example, Stakeholder attribute set has the attributes owner, business owner, escalation group, and support group This object is available in API version 65.0 and later. - **[CnfgItemTypeAttrRelDef](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/tooling-api-objects-cnfgitemtypeattrreldef.md)** Represents the definition of a relationship between a configuration item type and an attribute that's applicable for the item type. For example, a server configuration item type has the attributes manufacturer, name, and IP address. This object is available in API version 65.0 and later. - **[CnfgItemTypeDef](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/tooling-api-objects-cnfgitemtypedef.md)** Represents the definition of a configuration item type. A configuration item type represents a category that is used to classify configuration items. The components share common characteristics. For example, server, application, and network device. This object is available in API version 65.0 and later. - **[CnfgItemTypeIdentFieldMap](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/tooling-api-objects-cnfgitemtypeidentfieldmap.md)** Represents the mapping of configuration item attributes used in an identification rule to evaluate whether a discovered item already exists in CMDB. For example, an identification rule for a Linux Server may use host name and MAC address as identification field mappings. This object is available in API version 66.0 and later. - **[CnfgItemTypeIdentRule](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/tooling-api-objects-cnfgitemtypeidentrule.md)** Represents the definition of a rule used to identify whether a configuration item (CI) already exists in the CMDB or needs to be created as a new record. For example, an identification rule can check if an application server with the same host name and IP address already exists in CMDB. This object is available in API version 66.0 and later. - **[CnfgItemTypeRelationDef](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/tooling-api-objects-cnfgitemtyperelationdef.md)** Represents how the configuration items are related to each other within a CMDB. For example, Payroll Application RUNS ON App1 WebServer. This object is available in API version 65.0 and later. - **[CnfgMgmtCiSourceDef](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/tooling-api-objects-cnfgmgmtcisourcedef.md)** Represents the definition of a configuration item source from which data can be added to Configuration Management Database (CMDB). Sources include automated discovery, file import, and manual entry. This object is available in API version 67.0 and later. - **[CnfgMgmtRelationTypeDef](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/tooling-api-objects-cnfgmgmtrelationtypedef.md)** Represents the relationship between configuration item types or configuration items as defined in the CMDB. For example, Depends on or Connected to. This object is available in API version 65.0 and later. - **[CnfgMgmtSvcMapLyot](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/tooling-api-objects-cnfgmgmtsvcmaplyot.md)** Represents the business specific layout in a service map. A layout specifies which configuration item types and relationship types are included or excluded. The layout also specifies whether IP-level connections are shown. Use map layouts to create different service map perspectives. For example, infrastructure, communication, or outage impact. This object is available in API version 66.0 and later. - **[CnfgMgmtSvcMapLyotItmTyp](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/tooling-api-objects-cnfgmgmtsvcmaplyotitmtyp.md)** Represents the relationship between a service map layout and a configuration item type definition. Use this mapping to include specific configuration item types in a map. For example, an infrastructure map can include servers, databases, and load balancers. This object is available in API version 66.0 and later. - **[CnfgMgmtSvcMapLyotRelTyp](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/tooling-api-objects-cnfgmgmtsvcmaplyotreltyp.md)** Represents the relationship between a service map and a configuration item relationship type definition. Use this mapping to include specific relationship types in a map. For example, a service topology map can include runs on, hosted on, and served by. This object is available in API version 66.0 and later. - **[NtfcnChannelActionDef](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/tooling-api-objects-ntfcnchannelactiondef.md)** Represents the actions associated with the definition of a notification that's configured for a specific object. For example, the Notification for Creation of Problems is a setup definition that applies to in-app and email notifications and the recipient user can take an action such as opening the record in Salesforce from within the notification. This object is available in API version 62.0 and later. - **[NtfcnChannelCont](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/tooling-api-objects-ntfcnchannelcont.md)** Represents the content associated with the definition of a notification that's configured for a specific object. For example, the Notification for Creation of Problems is a setup definition that applies to in-app and email notifications and the admin can configure the content such as the notification title and body. This object is available in API version 62.0 and later. - **[NtfcnChannelDef](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/tooling-api-objects-ntfcnchanneldef.md)** Represents the messaging channels associated with the definition of a notification that's configured for a specific object. For example, the Notification for Creation of Problems is a setup definition that applies to in-app and email notifications but eliminates Slack as a channel for notifying users. This object is available in API version 62.0 and later. - **[NtfcnChannelRec](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/tooling-api-objects-ntfcnchannelrec.md)** Represents the recipients associated with the definition of a notification that's configured for a specific object. For example, the Notification for Creation of Problems is a setup definition that applies to in-app and email notifications and the notifications are shared with specific users or email IDs. This object is available in API version 62.0 and later. - **[NtfcnCondition](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/tooling-api-objects-ntfcncondition.md)** Represents the conditions associated with the definition of a notification that's configured for a specific object. For example, the Notification for Creation of Problems is a setup definition with a criteria that all conditions must be met, and it has two conditions: When Impact is Critical and when Status is not Closed. This object is available in API version 62.0 and later. - **[NtfcnCriteria](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/tooling-api-objects-ntfcncriteria.md)** Represents the criteria associated with the definition of a notification that's configured for a specific object. For example, the Notification for Creation of Problems is a setup definition with a criteria that allows admins to say that when all conditions are fulfilled for a specific event type such as creation of a record, only then notifications can be triggered. This object is available in API version 62.0 and later. - **[NtfcnDefinition](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/tooling-api-objects-ntfcndefinition.md)** Represents the definition of a notification that's configured for a specific object. For example, Notification for Creation of Problems is a setup definition that helps admins configure how, when, and the type of notifications that are shared across multiple channels such as Slack, Email, or In-App when a problem record is either created or updated. This object is available in API version 62.0 and later. - **[ServiceMgmtKnwlgArtclConfig](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/tooling-api-objects-servicemgmtknwlgartclconfig.md)** Represents a collection of settings to configure Service Management Knowledge. This object is available in API version 65.0 and later. - **[ServiceOpPriorityConfig](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/tooling-api-objects-serviceoppriorityconfig.md)** Represents the configuration that determines the priority of a service operation, such as an incident, problem, or a change request based on impact and urgency. This object is available in API version 65.0 and later. - **[SrvcMgmntEmailRoutgAddr](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/tooling-api-objects-srvcmgmntemailroutgaddr.md)** Represents the relationship between an email address and a generated email address for a specific type of service management operation, such as an incident. This object is available in API version 65.0 and later. - **[SrvcMgmtObjCollabAppCnfg](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/tooling-api-objects-srvcmgmtobjcollabappcnfg.md)** Represents the configuration for a specific service management object and the types of collaboration apps supported for that object, such as whether swarming is enabled or not, the record type and page layout of the object that's supported for a specific app within the collaboration app, and more. This object is available in API version 65.0 and later. - **[StaticDynamicValMapping](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/tooling-api-objects-staticdynamicvalmapping.md)** Represents the mapping configuration between values of a dynamic picklist on a source object to the values of a static picklist on a target object. This object is available in API version 65.0 and later. # AIX Server Represents an AIX Server configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Server. ## Configuration Item Type Definition ||| |-|-| |Name|AIX Server| |Developer Name|`SD_AiSe`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Server](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-server.md)| |Rule Name|Default rule for all Citrix Netscalers| |Identifier(s)|MAC address| ## Attributes No associated attributes for this configuration item type. # Allocated From Represents the Allocated From relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. ## Relationship Type Definition ||| |-|-| |Developer Name|`SD_AlFr`| |Description|Defines the Allocated From relationship between configuration items in the CMDB.| |Master Label|Allocated From| |Direct Relationship|Allocated From| |Inverse Relationship|Allocated To| |Line Stroke|Solid| |Color Code|`#336699`| # Allocated To Represents the Allocated To relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. ## Relationship Type Definition ||| |-|-| |Developer Name|`SD_AlTo`| |Description|Defines the Allocated To relationship between configuration items in the CMDB.| |Master Label|Allocated To| |Direct Relationship|Allocated To| |Inverse Relationship|Allocated From| |Line Stroke|Solid| |Color Code|`#003366`| # Analytics with the Service Chat SDK for Android You can listen to user-driven events from the Service Chat SDK using the `ServiceAnalytics` system. **important:** 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](https://help.salesforce.com/s/articleView?id=service.miaw_intro_landing.htm&type=5) before that date. Messaging offers many of the [chat features](https://help.salesforce.com/s/articleView?id=service.miaw_chat_vs_messaging.htm&type=5) that you love plus asynchronous conversations that can be picked back up at any time. Learn about chat retirement in [Help](https://help.salesforce.com/s/articleView?id=001790618&type=1). Implement [`ServiceAnalyticsListener`](https://forcedotcom.github.io/ServiceSDK-Android/releases/common/8.0.5/api/reference/com/salesforce/android/service/common/analytics/ServiceAnalyticsListener.html) and add your listener to [`ServiceAnalytics`](https://forcedotcom.github.io/ServiceSDK-Android/releases/common/8.0.5/api/reference/com/salesforce/android/service/common/analytics/ServiceAnalytics.html) to start receiving events. In Java: ```java ServiceAnalytics.addListener(new ServiceAnalyticsListener() { @Override public void onServiceAnalyticsEvent(String behaviorId, Map eventData) { // TO DO: Do something with analytics data } }); ``` In Kotlin: ```java ServiceAnalytics.addListener { behaviorId, eventData -> // TO DO: Do something with analytics data } ``` When you receive an event, inspect the `behaviorId` to see the behavior that caused the event (for example, `KNOWLEDGE_UI_USER_LAUNCH`). Inspect the `eventData` map for contextual data related to the event (for example, `KnowledgeUIAnalytics.DATA_CATEGORY_GROUP_NAME`). For a list of behaviors and the key constants for parsing the `eventData` map, see the analytics class for the desired feature. - Knowledge Analytics - : [`KnowledgeUIAnalytics`](https://forcedotcom.github.io/ServiceSDK-Android/releases/knowledge/4.3.6/api/reference/com/salesforce/android/knowledge/ui/KnowledgeUIAnalytics.html) - Case Management Analytics - : [`CasesUIAnalytics`](https://forcedotcom.github.io/ServiceSDK-Android/releases/case/4.2.7/api/reference/com/salesforce/android/cases/ui/CasesUIAnalytics.html) - Chat Analytics - : [`ChatAnalytics`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/ChatAnalytics.html) # Android Examples Use these examples to learn more about the Service Chat SDK. **important:** 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](https://help.salesforce.com/s/articleView?id=service.miaw_intro_landing.htm&type=5) before that date. Messaging offers many of the [chat features](https://help.salesforce.com/s/articleView?id=service.miaw_chat_vs_messaging.htm&type=5) that you love plus asynchronous conversations that can be picked back up at any time. Learn about chat retirement in [Help](https://help.salesforce.com/s/articleView?id=001790618&type=1). Check out our [sample apps on GitHub](https://github.com/forcedotcom/ServiceSDK-Android/tree/master/Examples) ([github.com/forcedotcom/ServiceSDK-Android](https://github.com/forcedotcom/ServiceSDK-Android/tree/master/Examples)). # Android Guidelines These guidelines describe how to use the Android SDKs (both the [UI SDK](https://developer.salesforce.com/docs/service/messaging-in-app/guide/android-ui-sdk.md) and the [Core SDK](https://developer.salesforce.com/docs/service/messaging-in-app/guide/android-core-sdk.md)). To learn how to use the iOS SDKs, refer to the [iOS Guidelines](https://developer.salesforce.com/docs/service/messaging-in-app/guide/ios-guidelines.md). ![Enhanced In-App Chat Android Example](https://developer.salesforce.com/docs/media/messaging-in-app/messaging-android-device-small.png) # Android Sample Apps for Enhanced In-App Chat To view Android examples, visit our [GitHub repository](https://github.com/Salesforce-Async-Messaging/messaging-in-app-android). # Apache Tomcat Server Represents an Apache Tomcat Server configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Application Service. ## Configuration Item Type Definition ||| |-|-| |Name|Apache Tomcat Server| |Developer Name|`SD_ApToSe`| |Component|No| |End User Compute/Unmetered|Yes (tracked for license compliance)| |Parent|[Application Service](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-application-service.md)| |Rule Name|Default rule for all Cisco Systems Content Engines| |Identifier(s)|MAC address| ## Attributes ### Process Name - **Type**: text - **Developer Name**: `SD_PrNa` - **Attribute Set**: [Process Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-process-details.md) - **Description**: The name of the process running the Apache Tomcat Server. - **Required**: Optional ### Product Version - **Type**: text - **Developer Name**: `SD_PrVe1` - **Attribute Set**: [Software Instance Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-software-instance-details.md) - **Description**: The version of the Apache Tomcat Server product. - **Required**: Required ### Type - **Type**: text - **Developer Name**: `SD_Ty` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The type classification of the Apache Tomcat Server. - **Required**: Optional # Apache Web Server Represents an Apache Web Server configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Application Service. ## Configuration Item Type Definition ||| |-|-| |Name|Apache Web Server| |Developer Name|`SD_ApWeSe`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Application Service](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-application-service.md)| |Rule Name|Default rule for all Cisco Systems Global Site Selectors| |Identifier(s)|MAC address| ## Attributes ### Process Name - **Type**: text - **Developer Name**: `SD_PrNa` - **Attribute Set**: [Process Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-process-details.md) - **Description**: The name of the process running the Apache Web Server. - **Required**: Optional ### Type - **Type**: text - **Developer Name**: `SD_Ty` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The type classification of the Apache Web Server. - **Required**: Optional # Apex Classes for External Calendars The LxScheduler namespace provides an interface and classes for integrating Salesforce Scheduler with external calendars and determine the availability of service resources. The following are the apex interface and classes available for external calendar within the Salesforce Scheduler platform. ## Interface - [ServiceResourceScheduleHandler Interface](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_interface_lxscheduler_ServiceResourceScheduleHandler.htm) — Allows an implementing class to check external calendar events to find already booked time slots for the requested service resources. ## Classes - [ServiceAppointmentRequestInfo Class](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_lxscheduler_ServiceAppointmentRequestInfo.htm) — Represents the list of parameters that are passed to the ServiceResourceScheduleHandler interface. This class is implemented internally by Apex. - [ServiceResourceInfo Class](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_lxscheduler_ServiceResourceInfo.htm) — Contains information about a service resource. - [ServiceResourceSchedule Class](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_lxscheduler_ServiceResourceSchedule.htm) — Use this class to pass results from your implemented Apex class to the ServiceResourceScheduleHandler interface methods. - [UnavailableTimeslot Class](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_lxscheduler_UnavailableTimeslot.htm) — Use this class to pass the unavailable time slots to the lxscheduler.ServiceResourceSchedule class. Timezones that differ across operating hours are handled and results are always returned in UTC. # Apex Reference The Cofiguration Management Database Apex Reference provides the ItSvcAssetDcvr namespace for IT Service Asset Discovery, including base configuration item types and configuration item tags. - **[ItSvcAssetDcvr Namespace](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/ns-itsvcassetdcvr/apex-namespace-itsvcassetdcvr.md)** Provides classes for IT Service Asset Discovery, including base configuration item types and configuration item tags. # API End-of-Life Policy Salesforce is committed to supporting each API version for a minimum of 3 years from the date of first release. To improve the quality and performance of the API, versions that are over 3 years old sometimes are no longer supported. Salesforce notifies customers who use an API version scheduled for deprecation at least 1 year before support for the version ends. **note:** Version 20.0 of REST API and SOAP API have now been deprecated and are no longer supported. You can continue to access this legacy API version until Summer ’22 is released, at which point this legacy version will be retired and will become unavailable. For more information, see this Knowledge Article: [Salesforce Platform API Versions 7.0 through 20.0 Retirement](https://help.salesforce.com/articleView?id=000351312&type=1&mode=1). **note:** Versions 21.0 through 30.0 of REST API and SOAP API will be deprecated in the Summer ’22 release. For more information, see this Knowledge Article: [Salesforce Platform API Versions 21.0 through 30.0 Retirement](https://help.salesforce.com/articleView?id=000354473&type=1&mode=1). # API End-of-Life Policy Salesforce is committed to supporting each API version for a minimum of 3 years from the date of first release. To improve the quality and performance of the API, versions that are over 3 years old sometimes are no longer supported. Salesforce notifies customers who use an API version scheduled for deprecation at least 1 year before support for the version ends. **note:** Version 20.0 of REST API and SOAP API have now been deprecated and are no longer supported. You can continue to access this legacy API version until Summer ’22 is released, at which point this legacy version will be retired and will become unavailable. For more information, see this Knowledge Article: [Salesforce Platform API Versions 7.0 through 20.0 Retirement](https://help.salesforce.com/articleView?id=000351312&type=1&mode=1). **note:** Versions 21.0 through 30.0 of REST API and SOAP API will be deprecated in the Summer ’22 release. For more information, see this Knowledge Article: [Salesforce Platform API Versions 21.0 through 30.0 Retirement](https://help.salesforce.com/articleView?id=000354473&type=1&mode=1). # API Support Salesforce is committed to supporting each Open CTI version for a minimum of three years from the date of its first release. **important:** Open CTI is in maintenance mode and is scheduled for retirement in February 2028. No new features or enhancements are being added to Open CTI. Effective immediately, Open CTI is deprecated and unavailable for newly created Agentforce Service orgs. To ensure long-term compatibility and access to the latest innovations, we recommend transitioning your development efforts to Salesforce Voice. For more information, see this [Knowledge Article](https://help.salesforce.com/s/articleView?id=005306437&type=1), [learning map](https://help.salesforce.com/s/articleView?id=service.cti_migrate_map.htm), and [developer migration guide](/docs/service/api-cti/guide/migrate-cti.html). To improve the quality and performance of Open CTI, versions that are more than three years old might not be supported. When a Open CTI version is scheduled to be unsupported, a no-longer-available notice will be given at least one year before support for the version ends. Salesforce will directly notify customers using Open CTI versions that will no longer be available. # App Owner Represents the App Owner relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. ## Relationship Type Definition ||| |-|-| |Developer Name|`SD_ApOw`| |Description|Defines the App Owner relationship between configuration items in the CMDB.| |Master Label|App Owner| |Direct Relationship|App Owner| |Inverse Relationship|Owned| |Line Stroke|Solid| |Color Code|`#202a30`| # Appliance Represents an Appliance configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. ## Configuration Item Type Definition ||| |-|-| |Name|Appliance| |Developer Name|`SD_Appxx2`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Network Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-network-device.md)| |Rule Name|Default rule for all AWS Security Groups| |Identifier(s)|Group Id| ## Attributes No associated attributes for this configuration item type. # Application Represents an Application configuration item in the Configuration Management Database (CMDB). ## Configuration Item Type Definition ||| |-|-| |Name|Application| |Developer Name|`SD_Appxx`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Base](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-base.md)| |Rule Name|Default rule for all Network Servers| |Identifier(s)|MAC address| ## Attributes ### Application Name - **Type**: text - **Developer Name**: `SD_ApNa` - **Attribute Set**: [Application Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-application-details.md) - **Description**: The application name of the Application. - **Required**: Optional ### Host Name - **Type**: text - **Developer Name**: `SD_HoNa` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The host name of the Application. - **Required**: Optional ### Local FQDN - **Type**: text - **Developer Name**: `SD_LoFq` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The local fqdn of the Application. - **Required**: Optional ### Server IP Address - **Type**: text - **Developer Name**: `SD_SeIpAd` - **Attribute Set**: [Application Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-application-details.md) - **Description**: The server ip address of the Application. - **Required**: Optional ### Uptime - **Type**: text - **Developer Name**: `SD_Up` - **Attribute Set**: [Hardware and Network](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-hardware-and-network.md) - **Description**: The uptime of the Application. - **Required**: Optional ### UUID - **Type**: text - **Developer Name**: `SD_Uu` - **Attribute Set**: [Virtual Machine Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-virtual-machine-details.md) - **Description**: The uuid of the Application. - **Required**: Optional # Application Details Represents the Application Details attribute set in the Configuration Management Database (CMDB). This attribute set groups related attributes for configuration items. ## Configuration Item Attribute Set Definition ||| |-|-| |Display Name|Application Details| |Developer Name|`SD_ApDe`| |Master Label|Application_Details| ## Attributes ### Application Name - **Type**: text - **Developer Name**: `SD_ApNa` - **Description**: Describes the Application Name for configuration items. - **Required**: Optional ### Server IP Address - **Type**: text - **Developer Name**: `SD_SeIpAd` - **Description**: Describes the Server IP Address for configuration items. - **Required**: Optional # Application Server Represents an Application Server configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Server. ## Configuration Item Type Definition ||| |-|-| |Name|Application Server| |Developer Name|`SD_ApSe1`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Server](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-server.md)| |Rule Name|Default rule for all AWS EBS| |Identifier(s)|Volume Id| ## Attributes No associated attributes for this configuration item type. # Application Service Represents an Application Service configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Application. ## Configuration Item Type Definition ||| |-|-| |Name|Application Service| |Developer Name|`SD_ApSe`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Application](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-application.md)| |Rule Name|Default rule for all Enterprise Services| |Identifier(s)|Asset Name| ## Attributes ### Server Port - **Type**: text - **Developer Name**: `SD_SePo` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The port number on which the application service is listening. - **Required**: Optional # Appointment Bundling REST APIs Use the Appointment Bundling REST APIs to create bundles, remove bundle members, start the automated process for creating bundles, unbundle one or more bundles, and update a bundle. ## Limitations **Create Bundle, Remove Bundle Members, Unbundle, Unbundle Multiple, Update Bundle** - 1000 API calls within 24 hours. - 50 API calls per engineer license within 24 hours (in addition to the 1000 API calls). - 10 concurrent API calls. **Start Batch** - One API call per hour, per territory. - **[Create Bundle](https://developer.salesforce.com/docs/service/field-service-dev/guide/fsl-rest-bundle.md)** Creates a bundle of service appointments manually. This resource accepts service appointment IDs and a manual bundling policy ID. The manual bundling policy specifies the bundling rules and has to be marked for manual bundling. This resource returns the ID of the bundle service appointment. This API is not supported in Gov Cloud. This endpoint is available in version 54.0 and later of the Salesforce API. - **[Remove Bundle Members](https://developer.salesforce.com/docs/service/field-service-dev/guide/fsl-rest-remove.md)** Removes one or more service appointments from an existing bundle. This resource accepts service appointment IDs. This API is not supported in Gov Cloud. This endpoint is available in version 54.0 and later of the Salesforce API. - **[Start Batch](https://developer.salesforce.com/docs/service/field-service-dev/guide/fsl-rest-startbatch.md)** Creates service appointment bundles automatically. The resource uses appointment bundle policies that are marked for automatic bundling. Service appointments that are already bundled manually stay untouched by this API. The resource returns the success or failure message of starting the batch process of automatic bundling. This API is not supported in Gov Cloud. This endpoint is available in version 54.0 and later of the Salesforce API. - **[Unbundle](https://developer.salesforce.com/docs/service/field-service-dev/guide/fsl-rest-unbundle.md)** Unbundle a bundle of service appointments. This resource accepts a bundle ID. This API is not supported in Gov Cloud. This endpoint is available in version 54.0 and later of the Salesforce API. - **[Unbundle Multiple](https://developer.salesforce.com/docs/service/field-service-dev/guide/fsl-rest-unbundlemultiple.md)** Unbundle one or more bundles of service appointments. This resource accepts one or more bundle IDs. This API is not supported in Gov Cloud. This endpoint is available in version 54.0 and later of the Salesforce API. - **[Update Bundle](https://developer.salesforce.com/docs/service/field-service-dev/guide/fsl-rest-updatebundle.md)** Adds service appointments to an existing bundle. This resource accepts a bundle ID and service appointment IDs. This API is not supported in Gov Cloud. This endpoint is available in version 54.0 and later of the Salesforce API. # Appointment Candidates (GET) Contains the error codes and error code messages related with the Salesforce Scheduler API for `getAppointmentSlots` (GET) resource. This table lists HTTP response code descriptions that are unique to this resource. |HTTP Response Code|Error Code|Description| |------------------|----------|-----------| |400|`MISSING_ARGUMENT`|Specify either a `workTypeGroupId` or `WorkTypeId`.| |400|`MISSING_ARGUMENT`|Specify a `serviceTerritoryId` with either a `workTypeGroupId` or `WorkTypeId`.| |400|`INVALID_INPUT`|This isn't a valid `workTypeGroupId` value. Specify a valid ID for the `workTypeGroupId` parameter.| |400|`INVALID_INPUT`|This isn't a valid `serviceTerritoryId` value. Specify a valid ID for the `territoryId` parameter.| # Appointment Slots (GET) Contains the error codes and error code messages related with Salesforce Scheduler API for the `getAppointmentSlots` (GET) resource. This table lists HTTP response code descriptions that are unique to this resource. |HTTP Response Code|Error Code|Description| |------------------|----------|-----------| |400|`BAD_REQUEST`|Specify either a `workTypeGroupId` or a `workTypeId` and try again.| |400|`BAD_REQUEST`|This isn't a valid `durationInMinutes` value. Specify a valid duration in minutes for the `durationInMinutes` parameter.| |400|`BAD_REQUEST`|`AppointmentTopicTimeSlot` is not accessible for the current user.| |400|`BAD_REQUEST`|Looks like you don't have access to `{WorkTypeGroup}` or `{WorkType}` object. Your Salesforce admin can help with that.| |400|`BAD_REQUEST`|Looks like you don't have access to `{ServiceTerritory} `object. Your Salesforce admin can help with that.| |400|`BAD_REQUEST`|Looks like you don't have access to `{ServiceResource}` object. Your Salesforce admin can help with that.| |400|`BAD_REQUEST`|Remove the `primaryResourceId` from the requiredResourceIds list and try again.| |400|`BAD_REQUEST`|Provide a valid `primaryResourceId` and try again.| |400|`BAD_REQUEST`|The maximum number of required service resources is 5. Reduce the number of service resources in your request and try again.| |400|`BAD_REQUEST`|Provide a resource ID in the `requiredResourceIds` field, and try again.| |400|`BAD_REQUEST`|Specify a valid `workType` and try again.| |400|`BAD_REQUEST`|Provide an end time that's after the start time, and try again.| |400|`BAD_REQUEST`|This isn't a valid `startTime` or `endTime` value. Specify a valid date and time for the `startTime` or `endTime` parameter.| |400|`BAD_REQUEST`|There is no active `workTypeGroup`.| # AppointmentCategory Represents the category of work types and shifts. This object is available in API version 58.0 and later. ## Supported Calls `create()`, `delete()`, `describeLayout()`, `describeSObjects()`, `getDeleted()`, `getUpdated()`, `query()`, `retrieve()`, `search()`, `undelete()` ## Special Access Rules Salesforce Scheduler must be enabled. ## Usage Use appointment categories to differentiate between various types of appointments, such as drop in, regular, and group. To define the work types and shifts available for these categories, assign appointment categories to work types and shifts. ## Fields ### IsDropIn - **Type**: boolean - **Properties**: Create, Defaulted on create, Filter, Group, Sort - **Description**: Indicates whether the appointment mode is drop-in (`true`) or not (`false`). - **Default value**: `false` ### IsGroup - **Type**: boolean - **Properties**: Create, Defaulted on create, Filter, Group, Sort - **Description**: Indicates whether the appointment mode is group (`true`) or not (`false`). It also indicates whether work types and shifts support the group category. Available in API version 61.0 and later. - **Default value**: `false` ### IsScheduled - **Type**: boolean - **Properties**: Create, Defaulted on create, Filter, Group, Sort - **Description**: Indicates whether the appointment mode is regular (`true`) or not (`false`). It also indicates whether work types and shifts support the group category. - **Default value**: `false` ### LastReferencedDate - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: The date when the appointment category record was last modified. Its label in the user interface is Last Modified Date. ### LastViewedDate - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: The date when the appointment category record was last viewed. ### Name - **Type**: string - **Properties**: Create, Filter, Group, idLookup, Sort, Update - **Description**: Name of the appointment category. ## Associated Objects This object has the following associated objects. If the API version isn’t specified, they’re available in the same API versions as this object. Otherwise, they’re available in the specified API version and later. [AppointmentCategoryFeed](https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_associated_objects_feed.htm): Feed tracking is available for the object. [AppointmentCategoryHistory](https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_associated_objects_history.htm): History is available for tracked fields of the object. # AppointmentInvitation Represents information about an appointment invitation that’s created for customers who can use it for booking appointments. This object is available in API version 55.0 and later. ## Supported Calls `create()`, `delete()`, `describeLayout()`, `describeSObjects()`, `getDeleted()`, `getUpdated()`, `query()`, `retrieve()`, `search()`, `undelete()`, `update()`, `upsert()` ## Special Access Rules Salesforce Scheduler must be enabled. ## Usage An appointment invitation can show the availability of one or more resources represented in the Appointment Invitee object. ## Fields ### AppointmentTopicId - **Type**: reference - **Properties**: Create, Filter, Group, Nillable, Sort - **Description**: Appointment topic that's associated with this invitation. This field is a polymorphic relationship field. - **Relationship Name**: AppointmentTopic - **Relationship Type**: Lookup - **Refers To**: WorkType, WorkTypeGroup ### AppointmentTopicType - **Type**: string - **Properties**: Filter, Group, Nillable, Sort - **Description**: Type of appointment topic that's related to this invitation. For example, work type or work type group. ### AppointmentType - **Type**: picklist - **Properties**: Create, Filter, Group, Nillable, Sort - **Description**: Appointment type for the appointment invitation. This field is available in API version 57.0 and later. Recommended values are: Salesforce Scheduler verifies whether the API name of a picklist value matches the name of a utility icon that Lightning Design System provides. If the names match, Salesforce Scheduler uses the icon with the same name. If the names don't match, Salesforce Scheduler uses the default groups icon. - `groups`—Group - `resource_territory`—In Person - `phone_portrait`—Phone - `video`—Video call ### BookingEndDate - **Type**: date - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: Date until which an appointment can be booked by using the appointment invitation URL. ### BookingStartDate - **Type**: date - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: Date from which an appointment can be booked by using the appointment invitation URL. - **Default value**: current date ### EngagementChannelTypeId - **Type**: reference - **Properties**: Create, Filter, Group, Nillable, Sort - **Description**: Engagement channel type for the appointment invitation. For example, users can choose video call as the engagement channel type when they create an appointment invitation. This field is available in API version 57.0 and later. This field is a relationship field. - **Relationship Name**: EngagementChannelType - **Relationship Type**: Lookup - **Refers To**: EngagementChannelType ### InvitationIdentifier - **Type**: string - **Properties**: Filter, Group, Nillable, Sort - **Description**: Invitation URL identifier that’s used to book an appointment in a flow. ### InvitationNumber - **Type**: string - **Properties**: Autonumber, Defaulted on create, Filter, idLookup, Sort - **Description**: Auto-assigned number that identifies the appointment invitation. ### InvitationUrl - **Type**: url - **Properties**: Create, Filter, Group, Nillable, Sort - **Description**: Appointment invitation URL that’s shared with users to book appointments. ### IsActive - **Type**: boolean - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: Indicates whether the invitation URL is available for a customer to book an appointment. - **Default value**: `true` ### LastReferencedDate - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: Date on which the appointment invitation was last modified. Its label in the user interface is Last Modified Date. ### LastViewedDate - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: Date on which the appointment invitation was last viewed. ### OwnerId - **Type**: reference - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: Owner of the appointment invitation. This field is a polymorphic relationship field. - **Relationship Name**: Owner - **Relationship Type**: Lookup - **Refers To**: Group, User ### ServiceTerritoryId - **Type**: reference - **Properties**: Create, Filter, Group, Nillable, Sort - **Description**: Service territory that's associated with the appointment invitation. This field is a relationship field. - **Relationship Name**: ServiceTerritory - **Relationship Type**: Lookup - **Refers To**: ServiceTerritory ### UrlExpiryDate - **Type**: date - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: Expiration date of the appointment invitation URL. ## Associated Objects This object has the following associated objects. If the API version isn’t specified, they’re available in the same API versions as this object. Otherwise, they’re available in the specified API version and later. [AppointmentInvitationChangeEvent](https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_associated_objects_change_event.htm): Change events are available for the object. [AppointmentInvitationFeed](https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_associated_objects_feed.htm): Feed tracking is available for the object. [AppointmentInvitationHistory](https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_associated_objects_history.htm): History is available for tracked fields of the object. [AppointmentInvitationOwnerSharingRule](https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_associated_objects_ownersharingrule.htm): Sharing rules are available for the object. [AppointmentInvitationShare](https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_associated_objects_share.htm): Sharing is available for the object. # AppointmentInvitee Represents information about the participant and resources required for creating an appointment invitation URL. This object is available in API version 55.0 and later. ## Supported Calls `create()`, `delete()`, `describeLayout()`, `describeSObjects()`, `getDeleted()`, `getUpdated()`, `query()`, `retrieve()`, `search()`, `undelete()`, `update()`, `upsert()` ## Special Access Rules Salesforce Scheduler must be enabled. ## Fields ### AppointmentInvitationId - **Type**: reference - **Properties**: Create, Filter, Group, Sort - **Description**: ID of the appointment invitation. This field is a relationship field. - **Relationship Name**: AppointmentInvitation - **Relationship Type**: Lookup - **Refers To**: AppointmentInvitation ### IsPrimaryResource - **Type**: boolean - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: Indicates whether a service resource that's used to book an appointment is a primary resource. - **Default value**: `false` ### IsRequiredResource - **Type**: boolean - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: Indicates whether a service resource is required to book an appointment. - **Default value**: `false` ### LastReferencedDate - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: Date on which the appointment invitee record was last modified. Its label in the user interface is Last Modified Date. ### LastViewedDate - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: Date on which the appointment invitee record was last viewed. ### Name - **Type**: string - **Properties**: Autonumber, Defaulted on create, Filter, idLookup, Sort - **Description**: Auto-assigned number that identifies the appointment invitee. ### ParticipantServiceResourceId - **Type**: reference - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: Service resource who's assigned to the appointment invitation. This field is a relationship field. - **Relationship Name**: ParticipantServiceResource - **Relationship Type**: Lookup - **Refers To**: ServiceResource ## Associated Objects This object has the following associated objects. If the API version isn’t specified, they’re available in the same API versions as this object. Otherwise, they’re available in the specified API version and later. [AppointmentInviteeChangeEvent](https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_associated_objects_change_event.htm): Change events are available for the object. [AppointmentInviteeFeed](https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_associated_objects_feed.htm): Feed tracking is available for the object. [AppointmentInviteeHistory](https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_associated_objects_history.htm): History is available for tracked fields of the object. [AppointmentInviteeOwnerSharingRule](https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_associated_objects_ownersharingrule.htm): Sharing rules are available for the object. [AppointmentInviteeShare](https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_associated_objects_share.htm): Sharing is available for the object. # Archive the Primary Version of an Article Archives the primary version of an article. The actions are defined by the field change you request on the resource. To archive the primary version, use `"publishStatus":"Archived"`. To schedule a date for archiving, use `"archiveScheduleDate" : `. ## URI ```nolang /services/data/v25.0/knowledgeManagement/articleVersions/masterVersions/ ``` ## Formats JSON, XML ## HTTP Method PATCH ## Authentication `Authorization: OAuth {accesstoken}` ## Parameters | Parameter | Description | | ------------------- | ----------------------------------------------- | | publishStatus | Publishing status of the article. Use archived. | | archiveScheduleDate | Date to archive the article. | ## Input Archive: ```nolang { "publishStatus":"Archived" } ``` Schedule for archiving (using GMT date format): ```nolang { "archiveScheduleDate" : "2012-04-19T07:00:00.000+0000" } ``` ## Output HTTP status code 204 is returned when an existing record is updated. # Articles Details Gets all online article fields, accessible to the user. This resource is available with article IDs in REST API version 38.0 and later, and this resource is available with article URL names in version 44.0 and later. Salesforce Knowledge must be enabled in your organization. This resource can be used in API version 38.0 and later. The Custom File Field is not supported because it returns a link to a binary stream. Use the language code format used in [Which Languages Does Salesforce Support?](https://help.salesforce.com/apex/HTViewHelpDoc?id=faq_getstart_what_languages_does.htm). A lookup custom field is visible to guest users depending on the lookup entity type. For example, User is visible, but Case and Account are not visible. The following standard fields are not visible to a guest user, even if they are in the layout: - archivedBy - isLatestVersion - translationCompletedDate - translationImportedDate - translationExportedDate - versionNumber - visibleInInternalApp - visibleInPKB - visibleToCustomer - visbileToPartner ## Valid channel Values - When using the options string channel, where the matching articles are visible, the following values are valid. - `App`–Visible in the internal Salesforce Knowledge application - `Pkb`–Visible in the public knowledge base - `Csp`–Visible in the Customer Portal - `Prm`–Visible in the Partner Portal - If channel isn't specified, the default value is determined by the type of user. - `Pkb` for a guest user - `Csp` for a Customer Portal user - `Prm` for a Partner Portal user - `App` for any other type of user - If channel is specified, the specified value may be used to retrieve articles. - For guest, Customer Portal, and Partner Portal users, if the specified channel is other than the channel accessible to the user, an error is returned. - For all users other than guest, Customer Portal, and Partner Portal users, the specified channel value is used. ## Method GET ## Formats JSON, XML ## Authentication `Authorization: Bearer {token}` ## Endpoint `/services/data/v{XX.X}/support/knowledgeArticles/{articleId_or_articleUrlName}` ## HTTP Headers **Accept:** Optional. Can be either `application/json` or `application/xml`. **Accept-language:** Required. The article must be an active language in the user's organization. - If the language code isn't valid, an error message is returned: "The language code is not valid or not supported by Knowledge." - If the language code is valid, but not supported by Knowledge, then an error message is returned: "Invalid language code. Check that the language is included in your Knowledge language settings." ## Input string `channel`: Optional, defaults to user's context. For information on channel values, see [Valid channel Values](#valid-channel-values). - **App**: Visible in the internal Salesforce Knowledge application - **Pkb**: Visible in the public knowledge base - **Csp**: Visible in the Customer Portal - **Prm**: Visible in the Partner Portal boolean `updateViewStat`: Optional, defaults to true. If true, API updates the view count in the given channel as well as the total view count. boolean `isUrlName`: Optional, defaults to false. If true, indicates that the last portion of the endpoint is a URL name instead of an article ID. Available in API v44.0 and later. ## Output The detailed fields of the article, if the article is online and visible to the current user. **Article Detail** Full detail of an article, with complete metadata and layout-driven fields used for display of an article. It includes all the same properties as an [Article Summary](https://developer.salesforce.com/docs/service/salesforce-knowledge-dev-guide/guide/resources-knowledge-support-artlist.md#article-summary) representation. ```nolang { "id": Id, // articleId, "articleNumber": String, "articleType": String, // apiName of the article type, available in API v44.0 and later "title": String, "urlName": String, // available in API v44.0 and later "summary": String, "url": URL, "versionNumber": Int, "createdDate": Date, // in ISO8601 format "createdBy": User Summary, "lastModifiedDate": Date, // in ISO8601 format "lastModifiedBy": User Summary, "lastPublishedDate": Date, // in ISO8601 format "layoutItems": [ Article Field, ... ], // standard and custom fields visible to the user, sorted based on the layouts of the article type. "categories": [ Data Category Groups, ... ], "appUpVoteCount": Int, "cspUpVoteCount": Int, "prmUpVoteCount": Int, "pkbUpVoteCount": Int, "appDownVoteCount": Int, "cspDownVoteCount": Int, "prmDownVoteCount": Int, "pkbDownVoteCount": Int, "allViewCount": Int, "appViewCount": Int, "cspViewCount": Int, "prmViewCount": Int, "pkbViewCount": Int, "allViewScore": Double, "appViewScore": Double, "cspViewScore": Double, "prmViewScore": Double, "pkbViewScore": Double } ``` **User Summary** ```nolang { "id": String "isActive": boolean // true/false "userName": String // login name "firstName": String "lastName": String "email": String "url": String // to the chatter user detail url: /services/data/vXX.X/chatter/users/{userId}, for guest user, it will return null. } ``` **Article Field** An individual field of article information, which is listed in an Article Detail in the order required by the administrator's layout. ```nolang { "type": Enum, // see the Notes "name": String, // In API v43.0 and earlier, the developer name. In API v44.0 and later, the API name. "label": String, // label "value": String, } ``` ## Example Request ```nolang curl https://MYDOMAINNAME.my.salesforce.com/services/data/v66.0/support/knowledgeArticles/kA0xx000000000LCAQ HTTP Headers: Content-Type: application/json; charset=UTF-8 Accept: application/json Accept-Language: en-US ``` ## Example Response Body ```nolang { "allViewCount" : 17, "allViewScore" : 100.0, "appDownVoteCount" : 0, "appUpVoteCount" : 0, "appViewCount" : 17, "appViewScore" : 100.0, "articleNumber" : "000001004", "categoryGroups" : [ ], "createdBy" : { "email" : "user@company.com", "firstName" : "Test", "id" : "005xx000001SvoMAAS", "isActive" : true, "lastName" : "User", "url" : "/services/data/v66.0/chatter/users/005xx000001SvoMAAS", "userName" : "admin@salesforce.org" }, "createdDate" : "2016-06-21T21:10:54Z", "cspDownVoteCount" : 0, "cspUpVoteCount" : 0, "cspViewCount" : 0, "cspViewScore" : 0.0, "id" : "kA0xx000000000LCAQ", "lastModifiedBy" : { "email" : "user@company.com", "firstName" : "Test", "id" : "005xx000001SvoMAAS", "isActive" : true, "lastName" : "User", "url" : "/services/data/v66.0/chatter/users/005xx000001SvoMAAS", "userName" : "admin@salesforce.org" }, "lastModifiedDate" : "2016-06-21T21:11:02Z", "lastPublishedDate" : "2016-06-21T21:11:02Z", "layoutItems" : [ { "label" : "Out of Date", "name" : "IsOutOfDate", "type" : "CHECKBOX", "value" : "false" }, { "label" : "sample", "name" : "sample", "type" : "PICK_LIST", "value" : null }, { "label" : "Language", "name" : "Language", "type" : "PICK_LIST", "value" : "en_US" }, { "label" : "MyNumber", "name" : "MyNumber", "type" : "NUMBER", "value" : null }, { "label" : "My File", "name" : "My_File", "type" : "FILE", "value" : null } ], "pkbDownVoteCount" : 0, "pkbUpVoteCount" : 0, "pkbViewCount" : 0, "pkbViewScore" : 0.0, "prmDownVoteCount" : 0, "prmUpVoteCount" : 0, "prmViewCount" : 0, "prmViewScore" : 0.0, "summary" : "The number of characters required for complete coverage of all these languages' needs cannot fit in the 256-character code space of 8-bit character encodings, requiring at least a 16-bit fixed width encoding or multi-byte variable-length encodings. \r\n\r\nAlthough CJK encodings have common character sets, the encodings often used to represent them have been developed separately by different East Asian governments and software companies, and are mutually incompatible. Unicode has attempted, with some controversy, to unify the character sets in a process known as Han unification.\r\n\r\nCJK character encodings should consist minimally of Han characters p", "title" : "Test Images", "url" : "/services/data/v66.0/support/knowledgeArticles/kA0xx000000000LCAQ", "versionNumber" : 7 } ``` # Articles List Get a page of online articles for the given language and category through either search or query. This resource is available in REST API version 38.0 and later. ## URI `/services/data/v{XX.X}/support/knowledgeArticles` ## Method GET ## Formats JSON, XML ## Authentication `Authorization: Bearer {token}` ## HTTP Headers **Accept:** Optional. Can be either `application/json` or `application/xml`. **Accept-language:** Required. The article must be an active language in the user's organization. - If the language code isn't valid, an error message is returned: "The language code is not valid or not supported by Knowledge." - If the language code is valid, but not supported by Knowledge, then an error message is returned: "Invalid language code. Check that the language is included in your Knowledge language settings." ## Input string `q`: Optional. Performs an SOSL search. If the query string is null, empty, or not given, an SOQL query runs. The characters `?` and `*` are used for wildcard searches. The characters `(`, `)`, and `"` are used for complex search terms. See [https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_sosl_find.htm](https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_sosl_find.htm). string `channel`: Optional, defaults to user's context. For information on channel values, see [Valid channel values](#valid-channel-values). - **App**: Visible in the internal Salesforce Knowledge application - **Pkb**: Visible in the public knowledge base - **Csp**: Visible in the Customer Portal - **Prm**: Visible in the Partner Portal string `categories` in map json format `{"group1":"category1","group2":"category2",...}`: Optional, defaults to None. Category group must be unique in each group:category pair, otherwise you get `ARGUMENT_OBJECT_PARSE_ERROR`. There is a limit of three data category conditions, otherwise you get `INVALID_FILTER_VALUE`. string `queryMethod`: Values are `AT, BELOW, ABOVE, ABOVE_OR_BELOW`. Only valid when categories are specified, defaults to ABOVE_OR_BELOW. string `sort`: Optional. A sortable field name: `LastPublishedDate, CreatedDate, Title, ViewScore`. Defaults to `LastPublishedDate` for query and relevance for search. **note:** When sorting on `ViewScore` it is only available for query, not search, and no pagination is supported. You only get one page of results. string `order`: Optional. Either ASC or DESC, defaults to DESC. Valid only when sort is valid. integer `pageSize`: Optional, defaults to 20. Valid range 1 to 100. integer `pageNumber`: Optional, defaults to 1. ## Output A page of online articles in the given language and category visible to the current user. **Article Page** A page of articles. The individual entries are article summaries so the size can be kept at a minimum. ```nolang { "articles": [ Article Summary, … ], // list of articles "currentPageUrl": URL, // the article list API with current page number "nextPageUrl": URL, // the article list API with next page number, which can be null if there are no more articles. "pageNumber": Int // the current page number, starting at 1. } ``` **note:** The API supports paging. Each page of responses includes a URL to its page, as well as the URL to the next page of articles. **note:** If the user input parameter has the default value, the API does not show this parameter in either `currentPageUrl` or `nextPageUrl`. **Article Summary** A summary of an article used in a list of article responses. It shares similar properties to the Article Detail representation, as one is a superset of the other. ```nolang { "id": Id, // articleId "articleNumber": String, "articleType": String, // apiName of the article type, available in API v44.0 and later "title": String, "urlName": String, // available in API v44.0 and later "summary": String, "url": URL, // to the Article Detail API "viewCount": Int, // view count in the interested channel "viewScore": double (in xxx.xxxx precision), // view score in the interested channel. "upVoteCount": int, // up vote count in the interested channel. "downVoteCount": int, // down vote count in the interested channel. "lastPublishedDate": Date // last publish date in ISO8601 format "categoryGroups": [ Data Category Group, …. ]} ``` The "url" property always points to the Article Details resource endpoint. **Data Category Group** An individual data category group, its root category, and a list of selected data categories in the group. ```nolang { "groupName": String, // the unique name of the category group "groupLabel": String, // returns the translated version "selectedCategories": [ Data Category Summary, … ] } ``` **Data Category Summary** Provides a summary of data category information. The Summary and Detail responses share common properties. ```nolang { "categoryName": String, // the unique name of the category "categoryLabel": String, // returns the translated version, per the API language specified "url": String // returns the url for the DataCategory REST API. } ``` **note:** The outputs of Data Category Group and Data Category Summary in Article List API are different from the Data Category Groups API. ## Example Request ```nolang curl https://MYDOMAINNAME.my.salesforce.com/services/data/v66.0/support/knowledgeArticles?sort=ViewScore&channel=Pkb&pageSize=3 HTTP Headers: Content-Type: application/json; charset=UTF-8 Accept: application/json Accept-Language: en-US ``` ## Example Response Body ```nolang { "articles" : [ { "articleNumber" : "000001002", "categoryGroups" : [ ], "downVoteCount" : 0, "id" : "kA0xx000000000BCAQ", "lastPublishedDate" : "2015-02-25T02:07:18Z", "summary" : "With this online Chinese input tool, you can type Chinese characters through your web browser without installing any Chinese input software in your system. The Chinese online input tool uses the popular Pin Yin input method. It is a fast and convenient tool to input Chinese on English OS environments.", "title" : "Long text test", "upVoteCount" : 0, "url" : "/services/data/v66.0/support/knowledgeArticles/kA0xx000000000BCAQ", "viewCount" : 4, "viewScore" : 100.0 }, { "articleNumber" : "000001004", "categoryGroups" : [ ], "downVoteCount" : 0, "id" : "kA0xx000000000LCAQ", "lastPublishedDate" : "2016-06-21T21:11:02Z", "summary" : "The number of characters required for complete coverage of all these languages' needs cannot fit in the 256-character code space of 8-bit character encodings, requiring at least a 16-bit fixed width encoding or multi-byte variable-length encodings. \r\n\r\nAlthough CJK encodings have common character sets, the encodings often used to represent them have been developed separately by different East Asian governments and software companies, and are mutually incompatible. Unicode has attempted, with some controversy, to unify the character sets in a process known as Han unification.\r\n\r\nCJK character encodings should consist minimally of Han characters p", "title" : "Test Images", "upVoteCount" : 0, "url" : "/services/data/v66.0/support/knowledgeArticles/kA0xx000000000LCAQ", "viewCount" : 0, "viewScore" : 0.0 }, { "articleNumber" : "000001012", "categoryGroups" : [ ], "downVoteCount" : 0, "id" : "kA0xx000000006GCAQ", "lastPublishedDate" : "2016-06-21T21:10:48Z", "summary" : null, "title" : "Test Draft 2", "upVoteCount" : 0, "url" : "/services/data/v66.0/support/knowledgeArticles/kA0xx000000006GCAQ", "viewCount" : 0, "viewScore" : 0.0 } ], "currentPageUrl" : "/services/data/v66.0/support/knowledgeArticles?channel=Pkb&pageSize=3&sort=ViewScore", "nextPageUrl" : null, "pageNumber" : 1 } ``` ## Usage Salesforce Knowledge must be enabled in your organization. This resource can be used in API version 38.0 and later. The Custom File Field is not supported because it returns a link to a binary stream. Use the language code format used in [Which Languages Does Salesforce Support?](https://help.salesforce.com/apex/HTViewHelpDoc?id=faq_getstart_what_languages_does.htm). ## Valid channel Values - When using the options string channel, where the matching articles are visible, the following values are valid. - `App`–Visible in the internal Salesforce Knowledge application - `Pkb`–Visible in the public knowledge base - `Csp`–Visible in the Customer Portal - `Prm`–Visible in the Partner Portal - If channel isn't specified, the default value is determined by the type of user. - `Pkb` for a guest user - `Csp` for a Customer Portal user - `Prm` for a Partner Portal user - `App` for any other type of user - If channel is specified, the specified value may be used to retrieve articles. - For guest, Customer Portal, and Partner Portal users, if the specified channel is other than the channel accessible to the user, an error is returned. - For all users other than guest, Customer Portal, and Partner Portal users, the specified channel value is used. # Asset Primary Information Represents the Asset Primary Information attribute set in the Configuration Management Database (CMDB). This attribute set groups related attributes for configuration items. ## Configuration Item Attribute Set Definition ||| |-|-| |Display Name|Asset Primary Information| |Developer Name|`SD_AsPrIn`| |Master Label|Asset_Primary_Information| ## Attributes ### Action - **Type**: text - **Developer Name**: `SD_Ac` - **Description**: Describes the Action for configuration items. - **Required**: Optional ### Active - **Type**: boolean - **Developer Name**: `SD_Ac1` - **Description**: Indicates whether the configuration item is active (`true`) or not (`false`). - **Required**: Optional ### AMI Name - **Type**: text - **Developer Name**: `SD_AmNa` - **Description**: Describes the AMI Name for configuration items. - **Required**: Optional ### AMI State - **Type**: text - **Developer Name**: `SD_AmSt` - **Description**: Describes the AMI State for configuration items. - **Required**: Optional ### Approval State - **Type**: text - **Developer Name**: `SD_ApSt` - **Description**: Describes the approval state for configuration items. Possible values are `Approved`, `Awaiting Approval`, or `Rejected`. - **Required**: Optional ### Asset ID - **Type**: text - **Developer Name**: `SD_AsId` - **Description**: Describes the Asset ID for configuration items. - **Required**: Optional ### Asset Name - **Type**: text - **Developer Name**: `SD_AsNa` - **Description**: Describes the Asset Name for configuration items. - **Required**: Required ### Auto Scaling Group ARN - **Type**: text - **Developer Name**: `SD_AuScGrA` - **Description**: Describes the Auto Scaling Group ARN for configuration items. - **Required**: Optional ### Auto Scaling Group Name - **Type**: text - **Developer Name**: `SD_AuScGrN` - **Description**: Describes the Auto Scaling Group Name for configuration items. - **Required**: Optional ### Availability Zone - **Type**: text - **Developer Name**: `SD_AvZo` - **Description**: Describes the Availability Zone for configuration items. - **Required**: Optional ### AWS DB Cluster ARN - **Type**: text - **Developer Name**: `SD_AwDbClA` - **Description**: Describes the AWS DB Cluster ARN for configuration items. - **Required**: Optional ### AWS Listener Rule ARN - **Type**: text - **Developer Name**: `SD_AwLiRuA` - **Description**: Describes the AWS Listener Rule ARN for configuration items. - **Required**: Optional ### AWS Load Balancer Name - **Type**: text - **Developer Name**: `SD_AwLoBaN` - **Description**: Describes the AWS Load Balancer Name for configuration items. - **Required**: Optional ### AWS RDS ARN - **Type**: text - **Developer Name**: `SD_AwRdAr` - **Description**: Describes the AWS RDS ARN for configuration items. - **Required**: Optional ### Business Criticality - **Type**: text - **Developer Name**: `SD_BuCr` - **Description**: Describes the Business Criticality for configuration items. Possible values are `High`, `Low`, or `Medium`. - **Required**: Optional ### Canonical Hosted Zone Name - **Type**: text - **Developer Name**: `SD_CaHoZoN` - **Description**: Describes the Canonical Hosted Zone Name for configuration items. - **Required**: Optional ### Canonical Hosted Zone Name ID - **Type**: text - **Developer Name**: `SD_CaHoZo1` - **Description**: Describes the Canonical Hosted Zone Name ID for configuration items. - **Required**: Optional ### Chassis Cluster IP Address - **Type**: text - **Developer Name**: `SD_ChClIpA` - **Description**: Describes the Chassis Cluster IP Address for configuration items. - **Required**: Optional ### CI Location - **Type**: text - **Developer Name**: `SD_CiLo` - **Description**: Describes the CI Location for configuration items. - **Required**: Optional ### CI Owner - **Type**: text - **Developer Name**: `SD_CiOw` - **Description**: Describes the CI Owner for configuration items. - **Required**: Optional ### CI Owner Group - **Type**: text - **Developer Name**: `SD_CiOwGr` - **Description**: Describes the CI Owner Group for configuration items. - **Required**: Optional ### CIDR block - **Type**: text - **Developer Name**: `SD_CiBl` - **Description**: Describes the CIDR block for configuration items. - **Required**: Optional ### Company - **Type**: text - **Developer Name**: `SD_Co` - **Description**: Describes the Company for configuration items. - **Required**: Optional ### Condition - **Type**: text - **Developer Name**: `SD_Co2` - **Description**: Describes the condition for configuration items. Possible values are `At Risk`, `Critical`, or `Normal`. - **Required**: Optional ### Contracts - **Type**: text - **Developer Name**: `SD_Co1` - **Description**: Describes the Contracts for configuration items. - **Required**: Optional ### Created Time - **Type**: date - **Developer Name**: `SD_CrTi` - **Description**: Describes the Created Time for configuration items. - **Required**: Optional ### Database Name - **Type**: text - **Developer Name**: `SD_DaNa` - **Description**: Describes the Database Name for configuration items. - **Required**: Optional ### DB Cluster Resource ID - **Type**: text - **Developer Name**: `SD_DbClReI` - **Description**: Describes the DB Cluster Resource ID for configuration items. - **Required**: Optional ### DB Instance Class - **Type**: text - **Developer Name**: `SD_DbInCl` - **Description**: Describes the DB Instance Class for configuration items. - **Required**: Optional ### DB Resource ID - **Type**: text - **Developer Name**: `SD_DbReId` - **Description**: Describes the DB Resource ID for configuration items. - **Required**: Optional ### Default - **Type**: boolean - **Developer Name**: `SD_De2` - **Description**: Indicates whether the configuration item is the default (true) or not (false). - **Required**: Optional ### Default Pool - **Type**: text - **Developer Name**: `SD_DePo` - **Description**: Describes the Default Pool for configuration items. - **Required**: Optional ### Deployment Id - **Type**: text - **Developer Name**: `SD_DeId1` - **Description**: Describes the Deployment Id for configuration items. - **Required**: Optional ### Deployment Label - **Type**: text - **Developer Name**: `SD_DeLa` - **Description**: Describes the Deployment Label for configuration items. - **Required**: Optional ### Deployment Name - **Type**: text - **Developer Name**: `SD_DeNa1` - **Description**: Describes the Deployment Name for configuration items. - **Required**: Optional ### Description - **Type**: text - **Developer Name**: `SD_De` - **Description**: Describes the Description for configuration items. - **Required**: Optional ### Desired Capacity - **Type**: text - **Developer Name**: `SD_DeCa` - **Description**: Describes the Desired Capacity for configuration items. - **Required**: Optional ### Destination - **Type**: text - **Developer Name**: `SD_De1` - **Description**: Describes the Destination for configuration items. - **Required**: Optional ### Destination Address - **Type**: text - **Developer Name**: `SD_DeAd` - **Description**: Describes the Destination Address for configuration items. - **Required**: Optional ### DHCP options ID - **Type**: text - **Developer Name**: `SD_DhOpId` - **Description**: Describes the DHCP options ID for configuration items. - **Required**: Optional ### Earliest Restorable Time - **Type**: text - **Developer Name**: `SD_EaReTi` - **Description**: Describes the Earliest Restorable Time for configuration items. - **Required**: Optional ### EBS Optimized - **Type**: boolean - **Developer Name**: `SD_EbOp` - **Description**: Indicates whether the configuration item is EBS optimized (true) or not (false). - **Required**: Optional ### Group Name - **Type**: text - **Developer Name**: `SD_GrNa` - **Description**: Describes the Group Name for configuration items. - **Required**: Optional ### Host Name - **Type**: text - **Developer Name**: `SD_HoNa` - **Description**: Describes the Host Name for configuration items. - **Required**: Optional ### Hosted Zone Id - **Type**: text - **Developer Name**: `SD_HoZoId` - **Description**: Describes the Hosted Zone Id for configuration items. - **Required**: Optional ### IAM Instance Profile Name - **Type**: text - **Developer Name**: `SD_IaInPrN` - **Description**: Describes the IAM Instance Profile Name for configuration items. - **Required**: Optional ### Image Type - **Type**: text - **Developer Name**: `SD_ImTy` - **Description**: Describes the Image Type for configuration items. - **Required**: Optional ### IMEI Number - **Type**: text - **Developer Name**: `SD_ImNu` - **Description**: Describes the IMEI Number for configuration items. - **Required**: Optional ### Instance Owner - **Type**: text - **Developer Name**: `SD_InOw` - **Description**: Describes the Instance Owner for configuration items. - **Required**: Optional ### Internet Gateway Id - **Type**: text - **Developer Name**: `SD_InGaId` - **Description**: Describes the Internet Gateway Id for configuration items. - **Required**: Optional ### Is Public - **Type**: boolean - **Developer Name**: `SD_IsPu` - **Description**: Indicates whether the configuration item is public (true) or not (false). - **Required**: Optional ### Item Count - **Type**: text - **Developer Name**: `SD_ItCo` - **Description**: Describes the Item Count for configuration items. - **Required**: Optional ### Kernel ID - **Type**: text - **Developer Name**: `SD_KeId` - **Description**: Describes the Kernel ID for configuration items. - **Required**: Optional ### Key Name - **Type**: text - **Developer Name**: `SD_KeNa` - **Description**: Describes the Key Name for configuration items. - **Required**: Optional ### Key Type - **Type**: text - **Developer Name**: `SD_KeTy` - **Description**: Describes the Key Type for configuration items. - **Required**: Optional ### Last Discovered On - **Type**: date - **Developer Name**: `SD_LaScOn` - **Description**: Describes the Last Discovered On for configuration items. - **Required**: Optional ### Latest Stream ARN - **Type**: text - **Developer Name**: `SD_LaStAr` - **Description**: Describes the Latest Stream ARN for configuration items. - **Required**: Optional ### Latest Stream Label - **Type**: text - **Developer Name**: `SD_LaStLa` - **Description**: Describes the Latest Stream Label for configuration items. - **Required**: Optional ### Launch Template ARN - **Type**: text - **Developer Name**: `SD_LaTeAr` - **Description**: Describes the Launch Template ARN for configuration items. - **Required**: Optional ### Launch Template Name - **Type**: text - **Developer Name**: `SD_LaTeNa` - **Description**: Describes the Launch Template Name for configuration items. - **Required**: Optional ### Listener ARN - **Type**: text - **Developer Name**: `SD_LiAr` - **Description**: Describes the Listener ARN for configuration items. - **Required**: Optional ### Load Balancer ARN - **Type**: text - **Developer Name**: `SD_LoBaAr` - **Description**: Describes the Load Balancer ARN for configuration items. - **Required**: Optional ### Load Balancer Instance Count - **Type**: int - **Developer Name**: `SD_LoBaInC` - **Description**: Describes the Load Balancer Instance Count for configuration items. - **Required**: Optional ### Load Balancer Port - **Type**: text - **Developer Name**: `SD_LoBaPo` - **Description**: Describes the Load Balancer Port for configuration items. - **Required**: Optional ### Load Balancer State - **Type**: text - **Developer Name**: `SD_LoBaSt` - **Description**: Describes the Load Balancer State for configuration items. - **Required**: Optional ### Load Balancing Method - **Type**: text - **Developer Name**: `SD_LoBaMe` - **Description**: Describes the Load Balancing Method for configuration items. - **Required**: Optional ### Local FQDN - **Type**: text - **Developer Name**: `SD_LoFq` - **Description**: Describes the Local FQDN for configuration items. - **Required**: Optional ### Manufacturer - **Type**: text - **Developer Name**: `SD_Ma` - **Description**: Describes the Manufacturer for configuration items. - **Required**: Optional ### Model Number - **Type**: text - **Developer Name**: `SD_MoNu` - **Description**: Describes the Model Number for configuration items. - **Required**: Optional ### Monitor State - **Type**: text - **Developer Name**: `SD_MoSt` - **Description**: Describes the Monitor State for configuration items. - **Required**: Optional ### Name Space - **Type**: text - **Developer Name**: `SD_NaSp` - **Description**: Describes the Name Space for configuration items. - **Required**: Optional ### NAT Gateway ID - **Type**: text - **Developer Name**: `SD_NaGaId` - **Description**: Describes the NAT Gateway ID for configuration items. - **Required**: Optional ### Network ACL ID - **Type**: text - **Developer Name**: `SD_NeAcId` - **Description**: Describes the Network ACL ID for configuration items. - **Required**: Optional ### Owner Id - **Type**: text - **Developer Name**: `SD_OwId` - **Description**: Describes the Owner Id for configuration items. - **Required**: Optional ### Placement Group - **Type**: text - **Developer Name**: `SD_PlGr` - **Description**: Describes the Placement Group for configuration items. - **Required**: Optional ### Platform - **Type**: text - **Developer Name**: `SD_Pl` - **Description**: Describes the Platform for configuration items. - **Required**: Optional ### Pool Monitor - **Type**: text - **Developer Name**: `SD_PoMo` - **Description**: Describes the Pool Monitor for configuration items. - **Required**: Optional ### Progress - **Type**: text - **Developer Name**: `SD_Pr` - **Description**: Describes the Progress for configuration items. - **Required**: Optional ### Read Capacity - **Type**: text - **Developer Name**: `SD_ReCa` - **Description**: Describes the Read Capacity for configuration items. - **Required**: Optional ### Reader EndPoint - **Type**: text - **Developer Name**: `SD_ReEn` - **Description**: Describes the Reader EndPoint for configuration items. - **Required**: Optional ### Region - **Type**: text - **Developer Name**: `SD_Re` - **Description**: Describes the Region for configuration items. - **Required**: Optional ### Resource Group - **Type**: text - **Developer Name**: `SD_ReGr` - **Description**: Describes the Resource Group for configuration items. - **Required**: Optional ### Root Device Name - **Type**: text - **Developer Name**: `SD_RoDeNa` - **Description**: Describes the Root Device Name for configuration items. - **Required**: Optional ### Root Device Type - **Type**: text - **Developer Name**: `SD_RoDeTy` - **Description**: Describes the Root Device Type for configuration items. - **Required**: Optional ### Route Table Id - **Type**: text - **Developer Name**: `SD_RoTaId` - **Description**: Describes the Route Table Id for configuration items. - **Required**: Optional ### Scheme - **Type**: text - **Developer Name**: `SD_Sc` - **Description**: Describes the Scheme for configuration items. - **Required**: Optional ### Serial Number - **Type**: text - **Developer Name**: `SD_SeNu` - **Description**: Describes the Serial Number for configuration items. - **Required**: Optional ### Server Port - **Type**: text - **Developer Name**: `SD_SePo` - **Description**: Describes the Server Port for configuration items. - **Required**: Optional ### Server State - **Type**: text - **Developer Name**: `SD_SeSt` - **Description**: Describes the Server State for configuration items. - **Required**: Optional ### SSL Policy - **Type**: text - **Developer Name**: `SD_SsPo` - **Description**: Describes the SSL Policy for configuration items. - **Required**: Optional ### State - **Type**: text - **Developer Name**: `SD_St1` - **Description**: Describes the State for configuration items. - **Required**: Optional ### State Transition Message - **Type**: text - **Developer Name**: `SD_StTrMe` - **Description**: Describes the State Transition Message for configuration items. - **Required**: Optional ### State Transition Reason - **Type**: text - **Developer Name**: `SD_StTrRe` - **Description**: Describes the State Transition Reason for configuration items. - **Required**: Optional ### Status - **Type**: text - **Developer Name**: `SD_St` - **Description**: Describes the status for configuration items. Possible values are: - `Decommissioned` - `In Build` - `In Stock` - `In Test` - `In Use` - `Missing` - `New` - `Production` - `Retired` - **Required**: Optional ### Stream Enabled - **Type**: text - **Developer Name**: `SD_StEn` - **Description**: Describes the Stream Enabled for configuration items. - **Required**: Optional ### Subnet ID - **Type**: text - **Developer Name**: `SD_SuId1` - **Description**: Describes the Subnet ID for configuration items. - **Required**: Optional ### Subscription Id - **Type**: text - **Developer Name**: `SD_SuId` - **Description**: Describes the Subscription Id for configuration items. - **Required**: Optional ### Table ARN - **Type**: text - **Developer Name**: `SD_TaAr` - **Description**: Describes the Table ARN for configuration items. - **Required**: Optional ### Table Name - **Type**: text - **Developer Name**: `SD_TaNa` - **Description**: Describes the Table Name for configuration items. - **Required**: Optional ### Table Size - **Type**: text - **Developer Name**: `SD_TaSi` - **Description**: Describes the Table Size for configuration items. - **Required**: Optional ### Target - **Type**: text - **Developer Name**: `SD_Ta` - **Description**: Describes the Target for configuration items. - **Required**: Optional ### Target Group ARN - **Type**: text - **Developer Name**: `SD_TaGrAr` - **Description**: Describes the Target Group ARN for configuration items. - **Required**: Optional ### Target Group Name - **Type**: text - **Developer Name**: `SD_TaGrNa` - **Description**: Describes the Target Group Name for configuration items. - **Required**: Optional ### Terminal ID - **Type**: text - **Developer Name**: `SD_TeId` - **Description**: Describes the Terminal ID for configuration items. - **Required**: Optional ### Type - **Type**: text - **Developer Name**: `SD_Ty` - **Description**: Describes the Type for configuration items. - **Required**: Optional ### UsedBy (User Group) - **Type**: text - **Developer Name**: `SD_UsuGr` - **Description**: Describes the UsedBy (User Group) for configuration items. - **Required**: Optional ### UsedBy (User) - **Type**: text - **Developer Name**: `SD_Usu` - **Description**: Describes the Used By (User) for configuration items. - **Required**: Optional ### Virtual IP Addresses - **Type**: text - **Developer Name**: `SD_ViIpAd` - **Description**: Describes the Virtual IP Addresses for configuration items. - **Required**: Optional ### Virtualization type - **Type**: text - **Developer Name**: `SD_ViTy` - **Description**: Describes the Virtualization type for configuration items. - **Required**: Optional ### VLAN ID - **Type**: text - **Developer Name**: `SD_VlId` - **Description**: Describes the VLAN ID for configuration items. - **Required**: Optional ### VPC ID - **Type**: text - **Developer Name**: `SD_VpId` - **Description**: Describes the VPC ID for configuration items. - **Required**: Optional ### VPC State - **Type**: text - **Developer Name**: `SD_VpSt` - **Description**: Describes the VPC State for configuration items. - **Required**: Optional ### Write Capacity - **Type**: text - **Developer Name**: `SD_WrCa` - **Description**: Describes the Write Capacity for configuration items. - **Required**: Optional # AssetAccountParticipant Represents a junction between the Asset and Account objects describing the association between a participating account and an asset. This object is available in API version 56.0 and later. ## Supported Calls `create()`, `delete()`, `describeLayout()`, `describeSObjects()`, `getDeleted()`, `getUpdated()`, `query()`, `retrieve()`, `search()`, `undelete()`, `update()`, `upsert()` ## Fields ### `AccountId` - **Type**: reference - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The stakeholder account associated with the asset. This field is a relationship field. - **Relationship Name**: Account - **Relationship Type**: Lookup - **Refers To**: Account ### `AssetId` - **Type**: reference - **Properties**: Create, Filter, Group, Sort - **Description**: The asset associated with the account. This field is a relationship field. - **Relationship Name**: Asset - **Relationship Type**: Lookup - **Refers To**: Asset ### `EffectiveEndDate` - **Type**: date - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The date when the association between the stakeholder and the vehicle ended. ### `EffectiveStartDate` - **Type**: date - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The date when the association between the stakeholder and the vehicle was initiated. ### `IsActive` - **Type**: boolean - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: Indicates whether the association between the stakeholder and the vehicle is active (true) or not (false). - **Default value**: `false` ### `LastReferencedDate` - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: The most recent date on which a user referenced this record. ### `LastViewedDate` - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: The most recent date on which a user viewed this record. ### `Name` - **Type**: string - **Properties**: Create, Filter, Group, idLookup, Sort, Update - **Description**: The name of the asset account participant. ### `RecordTypeId` - **Type**: reference - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The record type associated with the asset account participant. This field is a relationship field. - **Relationship Name**: RecordType - **Relationship Type**: Lookup - **Refers To**: RecordType ### `StakeholderRole` - **Type**: picklist - **Properties**: Create, Filter, Group, Restricted picklist, Sort, Update - **Description**: Specifies the role of the associated account. Possible values are: - `Customer-Preferred Dealer` - `Nominated Dealer` - `Closest Dealer` - `Sales Dealer` - `Service Dealer` - `Customer` - `Driver` - `Financier` - `Owner` ### `UsageType` - **Type**: picklist - **Properties**: Create, Filter, Group, Restricted picklist, Sort, Update - **Description**: Specifies the usage type of the asset account participant. Possible values are: - `Automotive` - `FieldServiceLightning`—Field Service Lightning ### `VehicleId` - **Type**: reference - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The vehicle that's marked as an asset. This field is a relationship field. - **Relationship Name**: Vehicle - **Relationship Type**: Lookup - **Refers To**: Vehicle ## Associated Objects This object has the following associated objects. If the API version isn’t specified, they’re available in the same API versions as this object. Otherwise, they’re available in the specified API version and later. - [AssetAccountParticipantChangeEvent](https://developer.salesforce.com/docs/atlas.en-us.industries_reference.meta/industries_reference/sforce_api_associated_objects_change_event.htm): Change events are available for the object. - [AssetAccountParticipantFeed](https://developer.salesforce.com/docs/atlas.en-us.industries_reference.meta/industries_reference/sforce_api_associated_objects_feed.htm): Feed tracking is available for the object. - [AssetAccountParticipantHistory](https://developer.salesforce.com/docs/atlas.en-us.industries_reference.meta/industries_reference/sforce_api_associated_objects_history.htm): History is available for tracked fields of the object. # AssetActivity Represents an activity that changes an asset's status, location, or ownership. This object is available in API version 67.0 and later. ## Supported Calls `describeLayout()`, `describeSObjects()`, `getDeleted()`, `getUpdated()`, `query()`, `retrieve()` ## Fields ### ActivitySubtype - **Type**: picklist - **Properties**: Filter, Group, Nillable, Restricted picklist, Sort - **Description**: The specific type or phase of the activity, such as Assignment Initiated or Reclaim Completed. ### ActivityTimestamp - **Type**: dateTime - **Properties**: Filter, Sort - **Description**: The date and time when the activity occurred. ### ActivityType - **Type**: picklist - **Properties**: Filter, Group, Restricted picklist, Sort - **Description**: The type of activity performed on the asset. ### AssetId - **Type**: reference - **Properties**: Filter, Group, Sort - **Description**: The asset associated with the activity. This field is a relationship field. - **Relationship Name**: Asset - **Relationship Type**: Master-detail - **Refers To**: [Asset](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_asset.htm) (the master object) ### Description - **Type**: string - **Properties**: Filter, Group, Nillable, Sort - **Description**: Details about the activity performed on the asset, such as shipment delivery or assignment. ### LastReferencedDate - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: Date the product is expected to be picked up. ### LastViewedDate - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: The date when the product request was last viewed. ### Name - **Type**: string - **Properties**: Autonumber, Defaulted on create, Filter, idLookup, Sort - **Description**: The name of the asset. ### RelatedRecordId - **Type**: reference - **Properties**: Filter, Group, Nillable, Sort - **Description**: The date when the product request was last viewed. This field is a polymorphic relationship field. - **Relationship Name**: RelatedRecord - **Refers To**: DisposalOrderLineItem, FulfillmentOrderLineItem, ProductTransfer, ReturnOrderLineItem ### Status - **Type**: picklist - **Properties**: Filter, Group, Nillable, Restricted picklist, Sort - **Description**: The state of the asset activity. - **Possible values**: - `Cancelled` - `Completed` - `Created` # AssetActivityFieldChange Represents a change to an asset field value that occurred during an asset activity. This object is available in API version 67.0 and later. ## Supported Calls `describeLayout()`, `describeSObjects()`, `getDeleted()`, `getUpdated()`, `query()`, `retrieve()` ## Fields ### ActivityTimestamp - **Type**: dateTime - **Properties**: Filter, Sort - **Description**: The date and time when the field value was updated. ### AssetActivityId - **Type**: reference - **Properties**: Filter, Group, Sort - **Description**: The asset activity associated with the field change. This field is a relationship field. - **Relationship Name**: AssetActivity - **Relationship Type**: Master-detail - **Refers To**: AssetActivity (the master object) ### ChangeSource - **Type**: picklist - **Properties**: Filter, Group, Restricted picklist, Sort - **Description**: The source or event that initiated the change. ### LastReferencedDate - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: Date the product is expected to be picked up. ### LastViewedDate - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: The date when the product request was last viewed. ### ModifiedById - **Type**: reference - **Properties**: Filter, Group, Nillable, Sort - **Description**: The user who performed the update. This field is a relationship field. - **Relationship Name**: ModifiedBy - **Refers To**: User ### ModifiedField - **Type**: picklist - **Properties**: Filter, Group, Restricted picklist, Sort - **Description**: The name of the field on the asset that was updated. - **Possible values**: - `Account` - `Location` - `Status` ### Name - **Type**: string - **Properties**: Autonumber, Defaulted on create, Filter, idLookup, Sort - **Description**: The name of the asset. ### NewValue - **Type**: string - **Properties**: Filter, Group, Nillable, Sort - **Description**: The value of the field after the update. ### OldValue - **Type**: string - **Properties**: Filter, Group, Nillable, Sort - **Description**: The value of the field before the update. # AssetContactParticipant Represents a junction between the Asset and Contact objects describing the association between a participating contact and an asset. This object is available in API version 56.0 and later. ## Supported Calls `create()`, `delete()`, `describeLayout()`, `describeSObjects()`, `getDeleted()`, `getUpdated()`, `query()`, `retrieve()`, `search()`, `undelete()`, `update()`, `upsert()` ## Fields ### `AssetId` - **Type**: reference - **Properties**: Create, Filter, Group, Sort - **Description**: The asset associated with the contact. This field is a relationship field. - **Relationship Name**: Asset - **Relationship Type**: Lookup - **Refers To**: Asset ### `ContactId` - **Type**: reference - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The contact associated with the asset. This field is a relationship field. - **Relationship Name**: Contact - **Relationship Type**: Lookup - **Refers To**: Contact ### `EffectiveEndDate` - **Type**: date - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The date when the association between the stakeholder and the vehicle ended. ### `EffectiveStartDate` - **Type**: date - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The date when the association between the stakeholder and the vehicle was initiated. ### `IsActive` - **Type**: boolean - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: Indicates whether the association between the stakeholder and the vehicle is active (true) or not (false). - **Default value**: `false` ### `LastReferencedDate` - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: The most recent date on which a user referenced this record. ### `LastViewedDate` - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: The most recent date on which a user viewed this record. ### `Name` - **Type**: string - **Properties**: Create, Filter, Group, idLookup, Sort, Update - **Description**: The name of the asset contact participant. ### `StakeholderRole` - **Type**: picklist - **Properties**: Create, Filter, Group, Sort, Update - **Description**: Specifies the role of the associated contact. ### `UsageType` - **Type**: picklist - **Properties**: Create, Filter, Group, Restricted picklist, Sort, Update - **Description**: Specifies the usage type of the asset contact participant. Possible values are: - `Automotive` - `FieldServiceLightning`—Field Service Lightning ### `VehicleId` - **Type**: reference - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The vehicle that's marked as an asset. This field is a relationship field. - **Relationship Name**: Vehicle - **Relationship Type**: Lookup - **Refers To**: Vehicle ## Associated Objects This object has the following associated objects. If the API version isn’t specified, they’re available in the same API versions as this object. Otherwise, they’re available in the specified API version and later. - [AssetContactParticipantChangeEvent](https://developer.salesforce.com/docs/atlas.en-us.industries_reference.meta/industries_reference/sforce_api_associated_objects_change_event.htm): Change events are available for the object. - [AssetContactParticipantFeed](https://developer.salesforce.com/docs/atlas.en-us.industries_reference.meta/industries_reference/sforce_api_associated_objects_feed.htm): Feed tracking is available for the object. - [AssetContactParticipantHistory](https://developer.salesforce.com/docs/atlas.en-us.industries_reference.meta/industries_reference/sforce_api_associated_objects_history.htm): History is available for tracked fields of the object. # AssetDepreciationLog Records activity, status updates, and errors generated during the asset depreciation process. This object is available in API version 67.0 and later. ## Supported Calls `describeSObjects()`, `getDeleted()`, `getUpdated()`, `query()`, `retrieve()` ## Fields ### AssetDepreciationId - **Type**: reference - **Properties**: Filter, Group, Sort - **Description**: The asset associated with the log entry. This field is a relationship field. - **Relationship Name**: AssetDepreciation - **Refers To**: AssetDepreciation ### LogDescription - **Type**: textarea - **Description**: The details of the log entry. ### LogTimestamp - **Type**: dateTime - **Properties**: Filter, Sort - **Description**: The date and time when the log entry occurred. ### LogTitle - **Type**: string - **Properties**: Filter, Group, Sort - **Description**: The title of the log entry. ### Name - **Type**: string - **Properties**: Filter, Group, idLookup, Sort - **Description**: The title of the log entry. ### Status - **Type**: picklist - **Properties**: Filter, Group, Restricted picklist, Sort - **Description**: The status of the asset depreciation log entry, with possible values including Success, Warning, Error, or ActionRequired. - **Possible values**: - `FAILED` - `SUCCESSFUL` # AssetServiceRequest Junction entity used to link Multiple ServiceRequest to an Asset and Multiple Assets to a ServiceRequest This object is available in API version 66.0 and later. ## Supported Calls `create()`, `delete()`, `describeLayout()`, `describeSObjects()`, `getDeleted()`, `getUpdated()`, `query()`, `retrieve()`, `search()`, `undelete()`, `update()`, `upsert()` ## Fields ### AssetId - **Type**: reference - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: Asset associated with this record. This field is a relationship field. - **Relationship Name**: Asset - **Refers To**: Asset ### LastReferencedDate - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: The date and time when the asset service request was last referenced. ### LastViewedDate - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: The date and time when the asset service request was last viewed. ### Name - **Type**: string - **Properties**: Autonumber, Defaulted on create, Filter, idLookup, Sort - **Description**: An auto-assigned number that identifies the asset service request. ### ServiceRequestId - **Type**: reference - **Properties**: Create, Filter, Group, Sort - **Description**: ServiceRequest associated with this record. This field is a relationship field. - **Relationship Name**: ServiceRequest - **Relationship Type**: Master-detail - **Refers To**: ServiceRequest (the master object) # Assign a Task Related to a Primary Article Assigns a task to a user for a primary article, including due date and instructions. The actions are defined by the field change you request on the resource. ## URI ```nolang /services/data/v25.0/knowledgeManagement/articleVersions/masterVersions/ ``` ## Formats JSON, XML ## HTTP Method PATCH ## Authentication `Authorization: OAuth {accesstoken}` ## Parameters | Parameter | Description | | ----------- | ------------------------------------------------------- | | assigneeId | Assigns the primary article to a user ID or a queue ID. | | dueDate | Date that the task is due. | | instruction | Instructions for the task. | ## Input ```nolang { "assigneeId":"05Dxx0000dsads", "dueDate":"2012-04-19T07:00:00.000+0000", "instruction":"Please review." } ``` ## Output HTTP status code 204 is returned when an existing record is updated. # Assign a Task Related to a Translation Assigns a task to a user for a translated article, including due date and instructions. The actions are defined by the field change you request on the resource. ## URI ```nolang /services/data/v25.0/knowledgeManagement/articleVersions/translations/ ``` ## Formats JSON, XML ## HTTP Method PATCH ## Authentication `Authorization: OAuth {accesstoken}` ## Parameters | Parameter | Description | | ----------- | ------------------------------------------------------- | | assigneeId | Assigns the primary article to a user ID or a queue ID. | | dueDate | Date that the task is due. | | instruction | Instructions for the task. | ## Input ```nolang { "assigneeId":"05Dxx0000dsads", "dueDate":"2012-04-19T07:00:00.000+0000", "instruction":"Please review." } ``` ## Output HTTP status code 204 is returned when an existing record is updated. # Assign Concurrent Operating Hours to Service Territory Members Concurrent time slots are applicable only to service territory members. Assign operating hours to a service territory member using the Operating Hours field on the respective record page. **note:** If you don’t assign operating hours to a service territory member, it automatically uses its service territory’s operating hours. And if you don’t assign operating hours to a work type, it’s considered to be always available. 1. On a service territory member record page, edit the Operating Hours field. 2. Select a set of operating hours from the list. 3. Save your changes. On the first page in your app, you must provide users an option to select a work type group for the appointment. # Assign Concurrent Operating Hours to the Dummy Resource Assign operating hours to a service territory member by using the Operating Hours field on the respective member record page. Concurrent time slots are applicable only to service territory members. Assign concurrent time slots to the dummy resource so that only the dummy resource is visible when creating an appointment with concurrent scheduling. For more information, see [Assign Operating Hours to Service Territory Members](https://help.salesforce.com/s/articleView?id=platform.ls_assign_oh.htm&type=5). 1. On a service territory member record page, edit the Operating Hours field. 2. Select a set of operating hours from the dropdown list. 3. Save your changes. # Assign Regular Shifts to Actual Resources Service resources can set up and update their frequently changing work hours by using shifts. Service resources can set up shifts for different work hours for the same service territory, for hours beyond the service territory’s operating hours, and even for multiple service territories. Shifts can also be used to assign service resources for periods that follow a flexible pattern. For example, different working hours at the same service territory or availability of the same service resource at different service territories. 1. Create and assign regular shifts to the actual resources and your service territory. For more information, see [Create Shifts in Salesforce Scheduler](https://help.salesforce.com/s/articleView?id=platform.ls_create_shifts.htm&type=5). Now filter the resources available for appointment reassignment based on the shifts defined in the scheduling policy. # Assign Service Resources To choose appointment candidates from the new virtual service territory, assign service resources to the territory in Salesforce Scheduler. Set this new territory as the secondary territory for each service resource. For information on assigning service resources to the new service territory, see [Assign Service Resources to Service Territories in Salesforce Scheduler](https://help.salesforce.com/s/articleView?id=platform.ls_assign_resources_st.htm&type=5). # Assign Service Territory to Work Types To use the new virtual service territory, assign the territory to work types in Salesforce Scheduler. For information on assigning service territories, see [Assign Service Territories to Work Types in Salesforce Scheduler](https://help.salesforce.com/s/articleView?id=platform.ls_assign_wt_service_territories.htm&type=5). # Assigned To Represents the Assigned To relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. ## Relationship Type Definition ||| |-|-| |Developer Name|`SD_AsTo`| |Description|Defines the Assigned To relationship between configuration items in the CMDB.| |Master Label|Assigned To| |Direct Relationship|Assigned To| |Inverse Relationship|Assignee Of| |Line Stroke|Solid| |Color Code|`#A6BA59`| # AssignedResource Represents a service resource who is assigned to a service appointment in Salesforce Scheduler. Assigned resources appear in the Assigned Resources related list on service appointments. This object is available in API version 38.0 and later. ## Supported Calls `create()`, `delete()`, `describeLayout()`, `describeSObjects()`, `getDeleted()`, `getUpdated()`, `query()`, `retrieve()`, undelete(), `update()`, `upsert()` ## Usage You can assign multiple service resources to a service appointment. Service resources who are assigned to service appointments can’t be deactivated until they’re removed from the appointments. ## Fields ### AssignedResourceNumber - **Type**: string - **Properties**: Autonumber, Defaulted on create, Filter, idLookup, Sort - **Description**: An auto-generated number identifying the resource assignment. ### EventId - **Type**: reference - **Properties**: Filter, Group, Nillable, Sort - **Description**: The ID of the event that is added to the assigned resources calendar when the service appointment is created. This is a relationship field. - **Relationship Name**: Event - **Relationship Type**: Lookup - **Refers To**: Event ### IsPrimaryResource - **Type**: boolean - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: Indicates whether the service resource is a primary resource or not. Available in API version 47.0 and later. - **Default value**: `false` ### IsRequiredResource - **Type**: boolean - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: Indicates whether the service resource is a required resource or not. If this field is set to false, Salesforce Scheduler considers the resource as available for other appointments. - **Default value**: `false` ### ServiceAppointmentId - **Type**: reference - **Properties**: Create, Filter, Group, Sort - **Description**: The service appointment that the resource is assigned to. This is a relationship field. - **Relationship Name**: ServiceAppointment - **Relationship Type**: Lookup - **Refers To**: ServiceAppointment ### ServiceResourceId - **Type**: reference - **Properties**: Create, Update, Filter, Group, Sort - **Description**: The resource who is assigned to the service appointment. This is a relationship field. - **Relationship Name**: ServiceResource - **Relationship Type**: Lookup - **Refers To**: ServiceResource ## Associated Objects This object has the following associated objects. If the API version isn’t specified, they’re available in the same API versions as this object. Otherwise, they’re available in the specified API version and later. [AssignedResourceChangeEvent](https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_associated_objects_change_event.htm) (API version 48.0): Change events are available for the object. [AssignedResourceFeed](https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_associated_objects_feed.htm): Feed tracking is available for the object. # AssignedResource Custom Fields Custom fields associated with a service resource who is assigned to a service appointment in Field Service. Assigned resources appear in the Assigned Resources related list on service appointments. This object is available in API version 38.0 and later. The standard fields are documented in the [AssignedResource](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_assignedresource.htm) object reference. ## Supported Calls `create()`, `delete()`, `describeLayout()`, `describeSObjects()`, `getDeleted()`, `getUpdated()`, `query()`, `retrieve()`, `undelete()`, `update()`, `upsert()` ## Special Access Rules Field Service managed package must be installed. **See Also** - [AssignedResource](https://developer.salesforce.com/docs/atlas.en-us.244.0.object_reference.meta/object_reference/sforce_api_objects_assignedresource.htm) ## Fields ### FSL__EstimatedTravelDistanceFrom__c - **Type**: double - **Properties**: Create, Filter, Nillable, Sort, Update - **Description**: The estimated travel distance from the service resource’s assigned appointment location to their home base. For this field, the assigned appointment location must have latitude and longitude coordinates and be the last location of the day. If it doesn’t have coordinates, isn’t the last location of the day, or the travel calculations are disabled, this field is 0. ### FSL__EstimatedTravelDistanceTo__c - **Type**: double - **Properties**: Create, Filter, Nillable, Sort, Update - **Description**: The estimated travel distance to the service resource’s assigned appointment location from a service appointment, another resource absence location, or their home base. For this field, the assigned appointment location must have latitude and longitude coordinate. If it doesn’t have latitude and longitude coordinates or the travel calculations are disabled, this field is 0. ### FSL__EstimatedTravelTimeFrom__c - **Type**: double - **Properties**: Create, Filter, Nillable, Sort, Update - **Description**: The estimated travel time from the service resource’s assigned appointment location to their home base. For this field, the assigned appointment location must have latitude and longitude coordinates and be the last location of the day. If it doesn’t have coordinates, isn’t the last location of the day, or the travel calculations are disabled, this field is 0. ### FSL__Estimated_Travel_Time_From_Source__c - **Type**: picklist - **Properties**: Create, Filter, Group, Nillable, Restricted picklist, Sort, Update - **Description**: The method used to calculate the travel time from the service resource’s assigned appointment location to their home base. For this field, the assigned appointment location must have latitude and longitude coordinates and be the last location of the day. If it doesn’t have coordinates, isn’t the last location of the day, or the travel calculations are disabled, this field is `None`. - **Possible values**: - `Aerial` - `None` - `Predictive` - `SLR` ### FSL__Estimated_Travel_Time_To_Source__c - **Type**: picklist - **Properties**: Create, Filter, Group, Nillable, Restricted picklist, Sort, Update - **Description**: The method used to calculate the travel time to the service resource’s assigned appointment location from a service appointment, another resource absence location, or their home base. For this field, the assigned appointment location must have latitude and longitude coordinates. If it doesn’t have latitude and longitude coordinates or the travel calculations are disabled, this field is `None`. - **Possible values**: - `Aerial` - `None` - `Predictive` - `SLR` ## Internal Fields These internal fields are used by the Field Service managed package. Although they’re publicly accessible, they must only be updated by the managed package. - FSL__Last_Updated_Epoch__c—Used to prevent the overlapping of multiple concurrent scheduling requests. - FSL__UpdatedByOptimization__c—Equals _true_ if the record was updated by the optimization engine. - FSL__calculated_duration__c—Indicates the duration (start to end time) of the service appointment assigned to the resource in minutes. # Assignee Of Represents the Assignee Of relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. ## Relationship Type Definition ||| |-|-| |Developer Name|`SD_AsOf`| |Description|Defines the Assignee Of relationship between configuration items in the CMDB.| |Master Label|Assignee Of| |Direct Relationship|Assignee Of| |Inverse Relationship|Assigned To| |Line Stroke|Solid| |Color Code|`#FFEB3D`| # Associate Actions to Records with a Deployment Use an Actions & Recommendations deployment to show default actions when records open from phone screen popups, chats, list views, or related records. A deployment also lets you show recommendations from Next Best Action strategies. After you create a deployment, select it in the Actions & Recommendations component on your Lightning record pages. When you configure an Actions & Recommendations deployment, you define these settings. - Type of guidance to show—Select at least one option, **Flows and quick actions** or **Recommendations**. - Context objects—Specify which objects to use for object-specific quick actions and action strategies. - Channel defaults—For each channel, define the default actions that appear when a record is opened in that channel and no other RecordAction associations exist. - Additional actions—Define which actions users can launch at run time, as needed. When a user clicks Add and selects an action, it starts. We create a RecordAction that associates the action with the current record page. - Recommendation settings—Specify how Next Best Action recommendations appear, how many to show, and which action strategies to use. **note:** You can use Process Builder to create RecordActions that appear in the component, but to show recommendations, create a deployment or use API. Before you configure a deployment, first set up the flows and quick actions that you want to show in the component. If you want to include recommendations from Next Best Action strategies, configure them first as well. You can define a deployment in Setup, or programmatically using the metadata type [RecordActionDeployment](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_recordactiondeployment.htm). 1. From Setup, in the Quick Find box, enter `Actions & Recommendations`, and select **Actions & Recommendations**. 2. Click **New Deployment**. 1. Name your deployment. 2. Select at least one type of guidance to show, for example, **Flows and quick actions**. To display actions and offers that result from filtering recommendations with your Next Best Action strategies, select **Recommendations**. **note:** If you edit a deployment and deselect a type of guidance, we delete the related settings. 3. Select up to 10 objects that provide context for object-specific quick actions and Next Best Action strategies. You can associate quick actions and strategies with specific object types, giving them an object-specific, rather than global, context. When a page for a selected object opens, the component lists the global and object-specific actions and recommendations. On other pages, it displays only the global items. For example, you define an object-specific quick action for the Contact object. To show this quick action in the component on Contact pages, add Contact as a context object. Or, to filter recommendations with a strategy that uses case fields, add the Case object as a context object. Then, in strategy settings, select a strategy that filters recommendations for cases. **note:** To use object-specific quick actions in a deployment, add them to record page layouts for those objects. The component shows quick actions that are available in the page layout. 4. If you selected the option to show flows and quick actions, configure a default list for each channel. **important:** - The component shows channel defaults only when no other RecordActions exist and the record page is opened in that channel. For example, if you set up a process in Process Builder that creates RecordActions for a record page, the component shows the RecordActions from your process instead of the channel defaults that you configure here. - If a default action is added to an existing deployment, users see the action in the Actions & Recommendations component on new records only. 1. Click a tab to configure settings for that channel. - Chat This channel works with Chat in Lightning Experience. Use this channel to specify default actions for when agents chat with customers. To use this channel, add the component to the chat transcript record page. - Phone This channel works with Open CTI. Use this channel to specify default steps for when customers call and records are shown to the agent. To use this channel, update your softphone screen pop settings for no matching records and single-matching records. - Default Use this channel to specify default actions for when records open from list views or related records. The Chat and Phone channels display even if you don’t have these features in your org. ![Configure channel defaults.](https://developer.salesforce.com/docs/media/guided_action_deployment_channel.png) You can configure multiple channels. For example, if you use Open CTI, you can configure actions for the Phone and Default channels. That way, agents can select actions from the list when a caller’s contact record is popped. Agents can also navigate to a contact record manually, such as when they open a record from a list view. Then they see the actions that you set up in the Default channel. **note:** For information about Chat and Open CTI integration, see [Integrate Chat with Lightning Flow for Service](https://developer.salesforce.com/docs/atlas.en-us.salesforce_guided_engagement.meta/salesforce_guided_engagement/guided_engagement_integrate_live_agent.htm) and [Integrate Open CTI with Lightning Flow for Service](https://developer.salesforce.com/docs/atlas.en-us.salesforce_guided_engagement.meta/salesforce_guided_engagement/guided_engagement_integrate_cti.htm). 2. On each channel, drag actions from **All Actions** to the preview area. The preview area has three regions: Top Pinned, Unpinned, or Bottom Pinned. Use the pinned regions to specify actions that you want your users to complete first and last. The Unpinned region is for actions that you want your users to complete during the record’s life cycle. 3. Select actions that are important, and click **Mark Mandatory**. When a user tries to close a flow that’s marked as mandatory without completing it, a reminder appears. **note:** You don’t see a reminder for quick actions or autolaunched flows that are marked as mandatory. 4. Select actions that you don’t want users to remove at run time, and click **Unmark Removable**. By default, all actions are removable. 5. Specify whether to auto-launch the first action when the record page opens. 6. Click **Save**. 5. If you selected the option to show flows and quick actions, narrow the list of actions that users can launch at run time. When the user clicks Add, the component shows the subset of actions that you configure here. 6. If you selected the option to show recommendations, configure display settings and Next Best Action strategies. 1. On the General Settings tab, set up how recommendations display, and select a default strategy. Set the maximum number of recommendations to a value from 1 to 4. 2. On the Strategy Settings tab, you can select object-specific strategies that override the default strategy on those pages. **note:** For the component to display recommendations, select a default or an object-specific strategy. A strategy loads and filters recommendations so that your users can see the best next steps. ![You can select object-specific strategies that override the default strategy.](https://developer.salesforce.com/docs/media/guided_action_deployment_strategy.png) 3. Click **Save**. 7. In Lightning App Builder, [add the Actions & Recommendations component to a page](https://help.salesforce.com/articleView?id=console_lex_guided_action_use_deployment.htm), and select the deployment. If you don’t select a deployment in component properties, no actions appear when the user clicks Add. In addition, the component is empty unless other RecordActions exist for the record page. # Associate Actions to Records with Apex If you want to control how you trigger the creation of a RecordAction, you can use Apex to associate actions to records. The RecordAction object is exposed as a standard object in Apex. You can trigger it before a DML operation or on delete or undelete. You can also provide custom error handling. **note:** RecordAction is available in API version 42.0 and later. Here are some scenarios that Apex better accommodates. - Triggering before a DML operation rather than after - Triggering on delete and undelete DML operations - Validating data before the action is run - Custom error handling - Partial completion rather than complete failure ## Example This example uses an Apex class and trigger pair to associate a flow to a newly created account that satisfies specific criteria. In the class, a method is defined that takes in a list of accounts and creates a RecordAction for each of them. It sets the new account as the RecordId and the ActionDefinition as an active flow. The trigger is called after the insert of an account record. When the criterion (type is Customer) is satisfied, the class method is executed, and it adds the defined flow to the new account. **Apex Class** ```apex public class RecordActionHandler { public static void addNewCustomerFlow(Account[] accts) { RecordAction[] recordActions = new List(); for (Account a : accts) { RecordAction ra = new RecordAction(RecordId=a.Id, ActionDefinition='New_Customer_Flow', Order=1, ActionType='Flow'); recordActions.add(ra); } try { insert recordActions; } catch (DMLException e) { System.debug('An unexpected error has occurred: ' + e.getMessage()); } } } ``` **Apex Trigger** ```apex trigger RecordActionTrigger on Account (after insert) { Account[] customerAccounts = new List(); for (Account a : Trigger.new) { if (a.Type == 'Customer') { customerAccounts.add(a); } } RecordActionHandler.addNewCustomerFlow(customerAccounts); } ``` **See Also** - [*Apex Developer Guide*](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_dev_guide.htm) # Associate Actions to Records with Process Builder Process Builder is a point-and-click automation tool that you can use to design processes that kick off when a new or updated record meets specific criteria. After you create flows and quick actions, you can associate them with a record by building a process. Use Process Builder to create a process that, when triggered, creates a RecordAction. The RecordAction represents an association between an action and the record that kicked off the process. RecordActions appear in the Actions & Recommendations component on the record page, ready for your users to start. **note:** When you associate actions to records using Process Builder, you override any channel defaults that you configured in an Actions & Recommendations deployment. 1. [Define the process properties](https://help.salesforce.com/articleView?id=process_properties.htm). The process properties uniquely identify your process. 2. [Configure the process trigger](https://help.salesforce.com/articleView?id=process_start.htm). Every process includes a trigger, which tells the process when to start. How you configure that trigger depends on what type of process you’re creating. 3. [Add process criteria](https://help.salesforce.com/articleView?id=process_criteria.htm). Define the criteria that must be true before the process can execute the associated actions. 4. [Add actions to your process](https://help.salesforce.com/articleView?id=process_action.htm) and [create a record from the process](https://help.salesforce.com/articleView?id=process_action_create.htm). After you define a criteria node, create a record from the process when criteria are met. Actions are executed in the order in which they appear in the Process Builder. **note:** Flows is a supported Action Type in Process Builder. This type is different from creating a RecordAction. An Action Type of Flows supports only flows that don’t have screens, and is invoked immediately when the process is triggered. Creating a RecordAction doesn’t invoke the flow; rather, it associates a record with the flow so that your users can run it. **important:** To associate flows or quick actions to records, you must create a RecordAction. Specify the following. - Action Type: Create a Record - Record Type: RecordAction Set field values for the Create a Record action. |Field|Type|Value| |-----|----|-----| |Action|Picklist|Specify the action that you want to associate with the record.| |Action Type|Picklist|Specify whether the action is a flow or a quick action.| |Order|Number|Specify the order of the action among all actions associated with this record. Actions are ordered in comparison to other actions in their pinned or unpinned region. If two actions have the same order, then they are sorted by their last modified date.| |Parent Record ID|Field Reference|Specify the record associated with the action. For most use cases, select the ID for the object you’ve selected for your process trigger. For example, if you used the contact object, set the value to `[Contact].Id`.| |Is Mandatory|Boolean|If set to `True`, the flow is required. When a mandatory screen flow is launched, if the user tries to close the tab or window, a message appears and reminds the user to complete the flow. The reminder doesn’t appear for quick actions or autolaunched flows.| |Hide Remove Action in UI|Boolean|If set to `True`, users can’t see the Remove option for the action in the component. However, actions can still be deleted using the API.| |Pinned|Picklist|Specify whether the action is pinned to the top or bottom of the component. To display the action in the unpinned region, use None.| 5. Activate your process. When your criteria are met and your process runs, the actions that you specified are associated with the parent record. ## Example Create a process that adds a required flow for users to verify a contact’s information, like an email address, when their phone number changes. 1. Choose the contact object, and start the process when a record is created or edited. ![Screen shot of the Process Builder start screen.](https://developer.salesforce.com/docs/media/guided_engagement_process_builder_start.png) 2. Create criteria for when the `[Contact].MobilePhone` field changes. ![Screen shot of the criteria window with specified changes.](https://developer.salesforce.com/docs/media/guided_engagement_process_builder_criteria.png) 3. Add a Create a Record action, and specify `RecordAction` for the Record Type 4. Set field values for the record, pointing to your `Verify_Information` flow and the parent record ID. To encourage the user to complete this flow, specify the Is Mandatory field as `True`. ![Screen shot of the create a record window with specified changes.](https://developer.salesforce.com/docs/media/guided_engagement_process_builder_create_record_action.png) 5. Activate the process. When the contact’s MobilePhone field changes, the Verify Information flow opens as a subtab on the contact record. An asterisk next to the flow indicates that it is mandatory. # Associate Actions to Records with SOAP If your business maintains code outside the Salesforce platform, you can use SOAP API to create, retrieve, update, or delete a RecordAction. **note:** RecordAction is available in API version 42.0 and later. **See Also** - [*SOAP API Developer Guide*: RecordAction](https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_recordaction.htm) # Associate Actions with Records To associate actions to records declaratively, configure channel-specific defaults in an Actions & Recommendations deployment or use Process Builder. To associate flows to records programmatically, use SOAP or Apex. After you add the Actions & Recommendations component to your Lightning pages, you can display RecordActions that you’ve configured. - **[Associate Actions to Records with a Deployment](https://developer.salesforce.com/docs/service/salesforce-guided-engagement/guide/guided-engagement-setup-associate-deployment.md)** Use an Actions & Recommendations deployment to show default actions when records open from phone screen popups, chats, list views, or related records. A deployment also lets you show recommendations from Next Best Action strategies. After you create a deployment, select it in the Actions & Recommendations component on your Lightning record pages. - **[Associate Actions to Records with Process Builder](https://developer.salesforce.com/docs/service/salesforce-guided-engagement/guide/guided-engagement-setup-process-builder.md)** Process Builder is a point-and-click automation tool that you can use to design processes that kick off when a new or updated record meets specific criteria. After you create flows and quick actions, you can associate them with a record by building a process. Use Process Builder to create a process that, when triggered, creates a RecordAction. The RecordAction represents an association between an action and the record that kicked off the process. - **[Associate Actions to Records with SOAP](https://developer.salesforce.com/docs/service/salesforce-guided-engagement/guide/guided-engagement-setup-process-soap.md)** If your business maintains code outside the Salesforce platform, you can use SOAP API to create, retrieve, update, or delete a RecordAction. - **[Associate Actions to Records with Apex](https://developer.salesforce.com/docs/service/salesforce-guided-engagement/guide/guided-engagement-setup-process-apex.md)** If you want to control how you trigger the creation of a RecordAction, you can use Apex to associate actions to records. The RecordAction object is exposed as a standard object in Apex. You can trigger it before a DML operation or on delete or undelete. You can also provide custom error handling. **See Also** - [Developer Documentation: *Process Automation Cheatsheet*](https://resources.docs.salesforce.com/rel1/doc/en-us/static/pdf/SF_Process_Automation_cheatsheet_web.pdf) # Associate Partner Contact Center Users with Queues Set up queue management to associate partner contact center users with Omni-Channel queues. ## Overview Salesforce enhanced Queue Management behavior so that it’s easy for partners and their customers to associate users in a contact center to an associated queue. These queues can route Messaging sessions or Messaging sessions and Voice calls. To use this feature, implement these Apex interfaces from the `service_cloud_voice` namespace. - `QueueManager`. This class describes whether the contact center supports queue management. It contains this method. - `supportsQueueUserGrouping`. Indicates whether your implementation supports the queue user grouping feature. - `QueueSetup`. This class performs all the work so that your partner CCaaS implementation stays in sync with Salesforce. It contains these methods. - `listQueues`. Lists all existing queues. - `createQueue`. Creates a queue. - `removeQueue`. Removes an existing queue. - `associateUsersAndGroupsWithQueue`. Associates partner contact center users and groups with a Omni-Channel queue. The linked sample code in [Implement the Apex Class](#implement-the-apex-class) describes how to implement these methods. ## Set Up Queue Management for Bring Your Own Channel for CCaaS 1. When the vendor imports the `ConversationVendorInfo` record, they must set the following fields. - `CapabilitiesSupportsQueueManagement`. Set this value to true. - `IntegrationClassId`. This value contains the ID of Apex implementation class. For example, `01pxx000000wxyzABC`. 2. The admin must enable the queue management setting in the Salesforce Voice with Partner Telephony setup. From Setup, enter `Partner Telephony Setup` in the Quick Find box, then select **Partner Telephony Setup**. Enable **Update Partner Telephony Queues and Groups**. ![Enable toggle for Update Partner Telephony Queues and Groups](https://developer.salesforce.com/docs/media/messaging-byoc-ccaas/ccaas-enable-queue-management.png '{"class": "image-lg"}') ## Implement the Apex Class Implement the Apex class using the sample code from the [Salesforce Voice with Partner Telephony Developer Guide: Associate Partner Telephony Users and Groups with Queues](https://developer.salesforce.com/docs/atlas.en-us.voice_pt_developer_guide.meta/voice_pt_developer_guide/voice_pt_users_groups_queues.htm). Specify the class ID in the IntegrationClassId field of the ConversationVendorInfo record. If this value isn’t set, an error message appears when trying to set up a queue mapping. # Asynchronous Calls with Open CTI Open CTI lets you issue asynchronous calls. Asynchronous calls allow the client-side process to continue instead of waiting for a callback from the server. To issue an asynchronous call, you must include an extra parameter with the API call, referred to as a callback function. Once the result is ready, the server invokes the callback method with the result. Asynchronous syntax: - In Salesforce Classic: - : ```javascript method('ARG1','ARG2', ..., CALLBACK_METHOD); ``` - In Lightning Experience: - : ```javascript method({callback : FUNCTION}) ``` ## Example - In Salesforce Classic: - : ```javascript //Set softphone height sforce.interaction.cti.setSoftphoneHeight(300, callback); ``` - In Lightning Experience: - : ```javascript //Disable clickToDial sforce.opencti.disableClickToDial({callback: callback}); ``` **note:** The call result depends on the execution context. For example, calling `setSoftphoneWidth()` in the standard Salesforce application has no effect, but calling `setSoftphoneWidth()` in the Salesforce console resizes the width of the softphone. # Asynchronous Calls with the Salesforce Console Integration Toolkit The Salesforce Console Integration Toolkit lets you issue asynchronous calls. Asynchronous calls allow the client-side process to continue instead of waiting for a callback from the server. To issue an asynchronous call, you must include an additional parameter with the API call, which is referred to as a callback function. Once the result is ready, the server invokes the callback method with the result. Asynchronous syntax: ```javascript method('ARG1','ARG2', ..., CALLBACK_METHOD); ``` Where `ARG1`, `ARG2`, and `CALLBACK_METHOD` are variables. For example: ```javascript //Open a new primary tab with the Salesforce home page in it sforce.console.openPrimaryTab(null, 'https://salesforce.com', false, 'Salesforce', callback); ``` # Attached To Represents the Attached To relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. ## Relationship Type Definition ||| |-|-| |Developer Name|`SD_AtTo`| |Description|Defines the Attached To relationship between configuration items in the CMDB.| |Master Label|Attached To| |Direct Relationship|Attached To| |Inverse Relationship|Attaches| |Line Stroke|Solid| |Color Code|`#C799AB`| # Attaches Represents the Attaches relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. ## Relationship Type Definition ||| |-|-| |Developer Name|`SD_Attxx`| |Description|Defines the Attaches relationship between configuration items in the CMDB.| |Master Label|Attaches| |Direct Relationship|Attaches| |Inverse Relationship|Attached To| |Line Stroke|Solid| |Color Code|`#FF99FF`| # Audio Device Represents an Audio Device configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. ## Configuration Item Type Definition ||| |-|-| |Name|Audio Device| |Developer Name|`SD_AuDe`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Network Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-network-device.md)| |Rule Name|Default rule for all Videoconferencing Devices| |Identifier(s)|MAC address| ## Attributes No associated attributes for this configuration item type. # Aura Events for Enhanced Messaging JavaScript can be executed when certain types of events occur in a console, such as when a user closes a tab. A few events are specific to Messaging. These events apply to Aura components in Lightning Experience only. - **[lightning:conversationAgentSend](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-events-messaging-conversationagentsend.md)** Messaging event triggered when an agent sends a message through the Salesforce console. This method intercepts the message before it’s sent to the chat visitor. This event is also triggered when using Enhanced Messaging channels. To work with Enhanced Messaging channels, the session must be active and the Enhanced Conversation Component must be visible on the page. - **[lightning:conversationChatEnded](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-events-messaging-conversationchatended.md)** Messaging event triggered when an active chat ends or an agent leaves a chat conference. This event is also triggered when using Enhanced Messaging channels. To work with Enhanced Messaging channels, the session must be active and the Enhanced Conversation Component must be visible on the page. - **[lightning:conversationNewMessage](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-events-messaging-conversationnewmessage.md)** Messaging event triggered when the customer sends a new message. In Enhanced Messaging channels, this event is triggered only for text messages. This event is not triggered for messages with files or rich content. To work with Enhanced Messaging channels, the session must be active and the Enhanced Conversation Component must be visible on the page. # Aura Methods for Enhanced Messaging in Lightning Experience Enable your developers to customize the agent experience by allowing custom components to interact with the Enhanced Conversation Component. These methods apply to Aura components in Lightning Experience only. Use Enhanced Messaging methods when: - The methods are invoked within the page context of the Enhanced Messaging session. - The Enhanced Messaging session is active. - The Enhanced Conversation Component is visible on the page. These methods apply to Aura components in Lightning Experience only. - **[endChat() for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/conversationtoolkitapi/sforce-api-console-lightning-endchat.md)** Ends a chat in which an agent is currently engaged. This method works only in Lightning console apps. - **[getChatLog() for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/conversationtoolkitapi/sforce-api-console-lightning-messaging-getchatlog.md)** Returns the chat log of an Enhanced Messaging chat associated with a specific recordId. This method works only in Lightning console apps. - **[sendMessage() for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/conversationtoolkitapi/sforce-api-console-lightning-sendmessage.md)** Sends a new chat message from the agent to a chat with a specific chat key. This method works only in Lightning console apps. - **[setAgentInput() for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/conversationtoolkitapi/sforce-api-console-lightning-setagentinput.md)** Sets the text in the agent's text box while showing typing indicators. This method works only in Lightning console apps. # Authenticate API Calls with Salesforce Scheduler APIs Use OAuth—the most secure SOAP and REST API call authentication method—to get an access token. **note:** You can't modify an existing appointment via a guest user profile. You can use an integration user who has permissions to read and update only the required objects. If you are working in a Salesforce organization that has a Developer Edition, an Enterprise Edition, or above, verify that you have the API Enabled permission. This permission is enabled by default. This permission allows you to access any Salesforce API. # Authenticate Between Work.com and Other Orgs If Work.com has been installed in a new, dedicated org, but your solution must access the original org, you need a strategy for authenticating to the other org. The following are recommended strategies for authenticating to another org. Use the existing, original org as an identity provider. Use user authentication from the original org to log in to the Work.com org. Avoid creating replicated logins in the new Work.com org. If the existing org is already using a different identity provider, you can either connect the Work.com org to the same identity provider, or connect the Work.com org to the existing org. **See Also** - [*Salesforce Help*: Configure SAML SSO Between Salesforce Orgs or Experience Cloud Sites](https://help.salesforce.com/articleView?id=experience.sso_between_multiple_orgs.htm&type=5) # Authenticate Salesforce Scheduler APIs The first step in an API-based integration is to connect to Salesforce and get an access token using OAuth. OAuth access token authentication is the most secure way to authenticate SOAP and REST API calls. **note:** To build a custom appointment scheduling application using Salesforce Scheduler APIs for prospects or unauthenticated users, you must build it using a logged-in user. For example, an integration user or an administrator. If you are working in a Salesforce organization that has a Developer Edition, an Enterprise Edition, or above, verify that you have the API Enabled permission. This permission is enabled by default. This permission allows you to access any Salesforce API. When you have this permission, you can connect to Salesforce and authenticate. Then make a request to REST or Connect API and check the response. For more information, see [Connect REST API Quick Start](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/quickstart.htm). **See Also** - [Connect REST API Developer Guide: Connect REST API Quick Start](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/quickstart.htm) # Authenticate with a Connected App The OAuth access token authentication is the most secure way to authenticate SOAP and REST API calls. Before you use Salesforce Scheduler for API-based integration, authenticate the API calls using OAuth. **note:** To build a custom appointment scheduling application using Salesforce Scheduler APIs for prospects or unauthenticated users, you must build it using a logged-in user. For example, an integration user or an administrator. If you are working in a Salesforce organization that has a Developer Edition, an Enterprise Edition, or above, verify that you have the API Enabled permission. This permission is enabled by default. This permission allows you to access any Salesforce API. When you have this permission, you can connect to Salesforce and authenticate. Then make a request to REST or Connect API and check the response. For more information, see [Connect REST API Quick Start](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/quickstart.htm). # Authenticate with a Connected App The first step in an API-based integration is to connect to Salesforce and get an access token using OAuth. OAuth access token authentication is the most secure way to authenticate SOAP and REST API calls. **note:** To build a custom appointment scheduling application using Salesforce Scheduler APIs for prospects or unauthenticated users, you must build it using a logged-in user. For example, an integration user or an administrator. If you are working in a Salesforce organization that has a Developer Edition, an Enterprise Edition, or above, verify that you have the API Enabled permission. This permission is enabled by default. This permission allows you to access any Salesforce API. When you have this permission, you can connect to Salesforce and authenticate. Then make a request to REST or Connect API and check the response. For more information, see [Connect REST API Quick Start](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/quickstart.htm). # Authenticate with a Connected App The first step in an API-based integration is to connect to Salesforce and get an access token using OAuth. OAuth access token authentication is the most secure way to authenticate SOAP and REST API calls. **note:** To build a custom appointment scheduling application using Salesforce Scheduler APIs for prospects or unauthenticated users, you must build it using a logged-in user. For example, an integration user or an administrator. If you are working in a Salesforce organization that has a Developer Edition, an Enterprise Edition, or above, verify that you have the API Enabled permission. This permission is enabled by default. This permission allows you to access any Salesforce API. When you have this permission, you can connect to Salesforce and authenticate. Then make a request to REST or Connect API and check the response. For more information, see [Connect REST API Quick Start](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/quickstart.htm). # Authenticate with a Connected App The OAuth access token authentication is the most secure way to authenticate SOAP and REST API calls. Before you use Salesforce Scheduler for API-based integration, authenticate the API calls using OAuth. **note:** To build a custom appointment scheduling application using Salesforce Scheduler APIs for prospects or unauthenticated users, you must build it using a logged-in user. For example, an integration user or an administrator. If you are working in a Salesforce organization that has a Developer Edition, an Enterprise Edition, or above, verify that you have the API Enabled permission. This permission is enabled by default. This permission allows you to access any Salesforce API. When you have this permission, you can connect to Salesforce and authenticate. Then make a request to REST or Connect API and check the response. For more information, see [Connect REST API Quick Start](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/quickstart.htm). # Authenticate with a Connected App The first step in an API-based integration is to connect to Salesforce and get an access token by using OAuth. OAuth access token authentication is the most secure way to authenticate SOAP and REST API calls. **note:** It's not possible to modify an existing appointment via a guest user profile. You can use an integration user who has permissions to read and update only the required objects. If you are working in a Salesforce organization that has a Developer Edition, an Enterprise Edition, or above, verify that you have the API Enabled permission. This permission is enabled by default. This permission allows you to access any Salesforce API. When you have this permission, you can connect to Salesforce and authenticate. Then make a request to REST or Connect API and check the response. For more information, see [Connect REST API Quick Start](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/quickstart.htm). # Authenticate with a Connected App The first step in an API-based integration is to connect to Salesforce and get an access token using OAuth. OAuth access token authentication is the most secure way to authenticate SOAP and REST API calls. **note:** To build a custom appointment scheduling application using Salesforce Scheduler APIs for prospects or unauthenticated users, you must build it using a logged-in user. For example, an integration user or an administrator. If you are working in a Salesforce organization that has a Developer Edition, an Enterprise Edition, or above, verify that you have the API Enabled permission. This permission is enabled by default. This permission allows you to access any Salesforce API. When you have this permission, you can connect to Salesforce and authenticate. Then make a request to REST or Connect API and check the response. For more information, see [Connect REST API Quick Start](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/quickstart.htm). # Authenticate with Salesforce Scheduler APIs The first step in an API-based integration is to connect to Salesforce and get an access token using OAuth. OAuth access token authentication is the most secure way to authenticate SOAP and REST API calls. **note:** It's not possible to modify an existing appointment via a guest user profile. You can use an integration user who has permissions to read and update only the required objects. If you are working in a Salesforce organization that has a Developer Edition, an Enterprise Edition, or above, verify that you have the API Enabled permission. This permission is enabled by default. This permission allows you to access any Salesforce API. # Authenticating Using the Salesforce Mobile SDK These instructions describe how to authenticate the Service Chat SDK using the provided authentication mechanism within the Salesforce Mobile SDK. ## Before You Begin **important:** 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](https://help.salesforce.com/s/articleView?id=service.miaw_intro_landing.htm&type=5) before that date. Messaging offers many of the [chat features](https://help.salesforce.com/s/articleView?id=service.miaw_chat_vs_messaging.htm&type=5) that you love plus asynchronous conversations that can be picked back up at any time. Learn about chat retirement in [Help](https://help.salesforce.com/s/articleView?id=001790618&type=1). Before starting, make sure that you’ve already: - Installed the Service Chat SDK. See [Install the Service SDK for Android](https://developer.salesforce.com/docs/service/service-sdk-android/guide/android-install-sdk.md). - Installed the [Salesforce Mobile SDK](https://github.com/forcedotcom/SalesforceMobileSDK-Android). If you want to install this SDK using maven, add a dependency on `com.salesforce.mobilesdk:SalesforceSDK:` to your module's `build.gradle` file. - Created a connected app that allows the SDK to authenticate with your Salesforce Experience Cloud site. See [Connected Apps](https://help.salesforce.com/articleView?id=connected_app_overview.htm). For an overview of Salesforce authentication from a mobile device, see [Understand Security and Authentication](https://trailhead.salesforce.com/en/modules/mobile_sdk_introduction/units/mobilesdk_intro_security). **note:** When creating a connected app, be sure that it has access to the `chatter_api` scope. See [Scope Parameter Values](https://help.salesforce.com/articleView?id=remoteaccess_oauth_scopes.htm). 1. If you're using a Salesforce Experience Cloud site, be sure to configure the login endpoint as described in the Salesforce Mobile SDK documentation ([Configure the Login Endpoint](https://developer.salesforce.com/docs/atlas.en-us.mobile_sdk.meta/mobile_sdk/communities_login_endpoint.htm)). The documentation describes how to use the first server listed in your `servers.xml` file as the default login location. For example: ```xml ``` 2. Add an `account_type` property to `strings.xml`. The property must be unique to your app to prevent conflicts with other apps that use the Service Chat SDK or the Salesforce Mobile SDK. ```xml com.mycompany.myapp ``` 3. Implement [`AuthenticatedUser`](https://forcedotcom.github.io/ServiceSDK-Android/releases/common/8.0.5/api/reference/com/salesforce/android/service/common/http/AuthenticatedUser.html) as a wrapper to your Mobile SDK user. In Java: ```java import com.salesforce.androidsdk.accounts.UserAccount; import com.salesforce.android.service.common.http.AuthenticatedUser; public class MobileSdkUser implements AuthenticatedUser { private final String mUserId; public MobileSdkUser (UserAccount userAccount) { mUserId = userAccount.getUserId(); } @Override public String getUserId () { return mUserId; } } ``` In Kotlin: ```java class MobileSdkUser(userAccount: UserAccount) : AuthenticatedUser { private val mUserId: String init { mUserId = userAccount.getUserId() } override fun getUserId(): String { return mUserId } } ``` **note:** `AuthenticatedUser.getUserId` must return the Salesforce user ID (`UserAccount.getUserId`) for the Case Management message feed to display correctly. 4. Implement [`AuthTokenProvider`](https://forcedotcom.github.io/ServiceSDK-Android/releases/common/8.0.5/api/reference/com/salesforce/android/service/common/http/AuthTokenProvider.html) as a wrapper to your Mobile SDK authentication system. In Java: ```java import android.support.annotation.NonNull; import android.support.annotation.Nullable; import com.salesforce.android.service.common.http.AuthTokenProvider; import com.salesforce.android.service.common.http.ResponseSummary; import com.salesforce.androidsdk.rest.ClientManager; public class MobileSdkAuthTokenProvider implements AuthTokenProvider { private final ClientManager.AccMgrAuthTokenProvider mTokenProvider; private String mAuthToken; public MobileSdkAuthTokenProvider (ClientManager.AccMgrAuthTokenProvider tokenProvider, String initialToken) { mTokenProvider = tokenProvider; mAuthToken = initialToken; } @Nullable @Override public String getToken () { return mAuthToken; } @Nullable @Override public String getTokenType () { return "Bearer"; } @Override public boolean canRefresh () { return true; } @Override public void refreshToken (@NonNull ResponseSummary responseSummary) { mAuthToken = mTokenProvider.getNewAuthToken(); } } ``` In Kotlin: ```java class MobileSdkAuthTokenProvider( private val mTokenProvider: ClientManager.AccMgrAuthTokenProvider, private var mAuthToken: String?) : AuthTokenProvider { override fun getToken(): String? { return mAuthToken } override fun getTokenType(): String? { return "Bearer" } override fun canRefresh(): Boolean { return true } override fun refreshToken(responseSummary: ResponseSummary) { mAuthToken = mTokenProvider.getNewAuthToken() } } ``` 5. When your app launches, initialize the Salesforce Mobile SDK. ```java // Initialize the Salesforce Mobile SDK SalesforceSDKManager.initNative(context, null, MainActivity.class); ``` For more information, see the [SalesforceSDKManager documentation](https://developer.salesforce.com/docs/atlas.en-us.mobile_sdk.meta/mobile_sdk/android_native_classes_salesforcesdkmanager.htm) in the Mobile SDK Developer’s Guide. 6. Write code that allows a user to log in and log out of their org using the Salesforce Mobile SDK. Make sure the user logs in before showing the Service Chat SDK UI. For example: ```java public void login (final Activity activity) { SalesforceSDKManager.getInstance() .getClientManager() .getRestClient(activity, new ClientManager.RestClientCallback() { @Override public void authenticatedRestClient (RestClient client) { // Handle authenticated state activity here } }); } public void logout (final Activity activity) { SalesforceSDKManager.getInstance().logout(activity, true); } ``` 7. When configuring Knowledge (using [`KnowledgeConfiguration`](https://forcedotcom.github.io/ServiceSDK-Android/releases/knowledge/4.3.6/api/reference/com/salesforce/android/knowledge/core/KnowledgeConfiguration.html)) or Case Management (using [`CaseConfiguration`](https://forcedotcom.github.io/ServiceSDK-Android/releases/case/4.2.7/api/reference/com/salesforce/android/cases/core/CaseConfiguration.html)), use the `withAuthConfig` method in the builder and pass in your implementation for [`AuthenticatedUser`](https://forcedotcom.github.io/ServiceSDK-Android/releases/common/8.0.5/api/reference/com/salesforce/android/service/common/http/AuthenticatedUser.html) and [`AuthTokenProvider`](https://forcedotcom.github.io/ServiceSDK-Android/releases/common/8.0.5/api/reference/com/salesforce/android/service/common/http/AuthTokenProvider.html). This code sample illustrates how it works with Knowledge: ```java // Create Knowledge configuration builder KnowledgeConfiguration.Builder builder = KnowledgeConfiguration.builder(siteUrl).offlineResourceConfig(offlineConfig); // Grab a user account from the Salesforce Mobile SDK UserAccount userAccount = SalesforceSDKManager.getInstance().getUserAccountManager().getCurrentUser(); if (userAccount != null) { // Create an authorization token provider from the Salesforce Mobile SDK ClientManager.AccMgrAuthTokenProvider authTokenProvider = new ClientManager.AccMgrAuthTokenProvider( SalesforceSDKManager.getInstance().getClientManager(), userAccount.getInstanceServer(), userAccount.getAuthToken(), userAccount.getRefreshToken()); // Create a wrapper with the Salesforce Mobile SDK token provider AuthTokenProvider provider = new MobileSdkAuthTokenProvider(authTokenProvider, userAccount.getAuthToken()); // Build a config using the token provider and the authenticated user builder.withAuthConfig(provider, new MobileSdkUser(userAccount)); } // And now build a configuration object! KnowledgeConfiguration config = builder.build(); ``` This code sample illustrates how it works with Case Management: ```java // Create Case Management configuration builder CaseConfiguration.Builder builder = new CaseConfiguration.Builder(SITE_URL, CREATE_CASE_ACTION_NAME) // Grab a user account from the Salesforce Mobile SDK UserAccount userAccount = SalesforceSDKManager.getInstance().getUserAccountManager().getCurrentUser(); if (userAccount != null) { // Create an authorization token provider from the Salesforce Mobile SDK ClientManager.AccMgrAuthTokenProvider authTokenProvider = new ClientManager.AccMgrAuthTokenProvider( SalesforceSDKManager.getInstance().getClientManager(), userAccount.getInstanceServer(), userAccount.getAuthToken(), userAccount.getRefreshToken()); // Create a wrapper with the Salesforce Mobile SDK token provider AuthTokenProvider provider = new MobileSdkAuthTokenProvider(authTokenProvider, userAccount.getAuthToken()); // Build a config using the token provider and the authenticated user builder.withAuthConfiguration(provider, new MobileSdkUser(userAccount)) .caseListName(CASE_LIST_NAME); } // Create a core configuration instance CaseConfiguration coreConfiguration = builder.build(); ``` At this point, you can use the features of the Service Chat SDK as an authenticated user. # Authentication with the Service Chat SDK for Android The Service Chat SDK provides an authentication mechanism that allows your users to access user-specific information in Service Cloud. To authenticate, implement two interfaces and provide an access token to the SDK. **important:** 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](https://help.salesforce.com/s/articleView?id=service.miaw_intro_landing.htm&type=5) before that date. Messaging offers many of the [chat features](https://help.salesforce.com/s/articleView?id=service.miaw_chat_vs_messaging.htm&type=5) that you love plus asynchronous conversations that can be picked back up at any time. Learn about chat retirement in [Help](https://help.salesforce.com/s/articleView?id=001790618&type=1). - `AuthenticatedUser` - : [`AuthenticatedUser`](https://forcedotcom.github.io/ServiceSDK-Android/releases/common/8.0.5/api/reference/com/salesforce/android/service/common/http/AuthenticatedUser.html) contains information about the user who wants to be authenticated. ```java public interface AuthenticatedUser { @NonNull String getUserId (); } ``` - `AuthTokenProvider` - : [`AuthTokenProvider`](https://forcedotcom.github.io/ServiceSDK-Android/releases/common/8.0.5/api/reference/com/salesforce/android/service/common/http/AuthTokenProvider.html) is an interface to the system that obtains the access token. If the access token expires, the Service Chat SDK asks your implementation to refresh the token. ```java public interface AuthTokenProvider { @Nullable String getToken (); @Nullable String getTokenType (); boolean canRefresh (); void refreshToken (@NonNull ResponseSummary responseSummary); } ``` The following sequence diagram describes the basic authentication flow. ![OAuth diagram](https://developer.salesforce.com/docs/media/service-sdk/android-oauth-diagram.png '{"class": "image-xl"}') If you're using the Salesforce Mobile SDK, you can implement these classes as wrappers to existing authentication features. See [Authenticating Using the Salesforce Mobile SDK](https://developer.salesforce.com/docs/service/service-sdk-android/guide/android-authentication-mobilesdk.md) for more information. If you're not using the Salesforce Mobile SDK, make sure that your implementation can access whatever authorization server you're using to obtain the access token. # Authentication with the Service Chat SDK for iOS The Service Chat SDK provides an authentication mechanism that allows your users to access user-specific information in Service Cloud. To authenticate, create an `SCSAuthenticationSettings` object and pass it to the SDK. **important:** 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](https://help.salesforce.com/s/articleView?id=service.miaw_intro_landing.htm&type=5) before that date. Messaging offers many of the [chat features](https://help.salesforce.com/s/articleView?id=service.miaw_chat_vs_messaging.htm&type=5) that you love plus asynchronous conversations that can be picked back up at any time. Learn about chat retirement in [Help](https://help.salesforce.com/s/articleView?id=001790618&type=1). ## Authentication Settings Authentication with the Service Chat SDK uses an [`SCSAuthenticationSettings`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSAuthenticationSettings.html) object. Create this object with a client ID and a dictionary containing authentication settings. This authentication settings dictionary must contain a URL for your org (`SCSOAuth2JSONKeyInstanceUrl`) and an access token (`SCSOAuth2JSONKeyAccessToken`). If your OAuth2 flow supports refresh tokens, include a refresh token (`SCSOAuth2JSONKeyRefreshToken`) to the authentication settings. In Swift: ```java // Specify auth info let myClientId: String = "CLIENT_ID_VALUE" let authDictionary: [SCSOAuth2JSONKey: String] = [ .instanceUrl : "https://MYDOMAINNAME.my.salesforce.com", .accessToken : "ACCESS_TOKEN_VALUE" ] // Create auth settings object let authSettings = SCSAuthenticationSettings(oauth2: authDictionary, clientId: myClientId) ``` In Objective-C: ```java // Specify auth info NSString *myClientId = @"CLIENT_ID_VALUE"; NSDictionary *authDictionary = @{ SCSOAuth2JSONKeyInstanceUrl : @"https://URL_FOR_YOUR_ORG.com", SCSOAuth2JSONKeyAccessToken : @"ACCESS_TOKEN_VALUE" }; // Create auth settings object SCSAuthenticationSettings *authSettings = [[SCSAuthenticationSettings alloc] initWithOAuth2Dictionary: authDictionary clientId: myClientId]; ``` If you're using the [Salesforce Mobile SDK](https://developer.salesforce.com/page/Mobile_SDK), we provide a helper method that allows you to construct an [`SCSAuthenticationSettings`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSAuthenticationSettings.html) object directly from the Mobile SDK user account. You can use this sample code after you've successfully logged in a user. In Swift: ```java // Get user account info from the Salesforce Mobile SDK let identity: SFUserAccountIdentity = SFUserAccountIdentity(userId: myUserId, orgId: myOrgId) let account: SFUserAccount = SFUserAccountManager.sharedInstance().userAccount(forUserIdentity: identity)! // Create auth settings object from SFUserAccount let authSettings = SCSAuthenticationSettings(mobileSDK: account) ``` In Objective-C: ```java // Get user account info from the Salesforce Mobile SDK SFUserAccountIdentity *identity = [SFUserAccountIdentityClass identityWithUserId:myUserId orgId:myOrgId]; SFUserAccount *account = [[SFUserAccountManagerClass sharedInstance] userAccountForUserIdentity:identity]; // Create auth settings object from SFUserAccount SCSAuthenticationSettings *authSettings = [[SCSAuthenticationSettings alloc] initWithMobileSDKAccount:account]; ``` **note:** For developers who plan to use the [Salesforce Mobile SDK](https://developer.salesforce.com/page/Mobile_SDK) for authentication, the [Mobile SDK Developer’s Guide](https://developer.salesforce.com/docs/atlas.en-us.mobile_sdk.meta/mobile_sdk/intro.htm?search_text=SFUserAccount) contains [authentication](https://developer.salesforce.com/docs/atlas.en-us.mobile_sdk.meta/mobile_sdk/intro_oauth.htm) instructions. If you're using a Salesforce Experience Cloud site, be sure to configure the login endpoint as described in the Salesforce Mobile SDK documentation ([Configure the Login Endpoint](https://developer.salesforce.com/docs/atlas.en-us.mobile_sdk.meta/mobile_sdk/communities_login_endpoint.htm)). This documentation describes how to use the `SFDCOAuthLoginHost` property in your `info.plist` file to create a custom login URI. If you plan to use remote push notification to alert the user when an event occurs in your org, call `registerForPushNotifications` on the [`SCSAuthenticationSettings`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSAuthenticationSettings.html) object. To learn more, see [Notifications with the Service Chat SDK for iOS](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/ios-push-notifications.md). However you create an [`SCSAuthenticationSettings`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSAuthenticationSettings.html) object, pass it to the Service Chat SDK during the authentication flow. ## Authentication Flow You can either authenticate on-demand when the SDK calls [`serviceCloud(shouldAuthenticateServiceType:completion:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCServiceCloudDelegate.html#/c:objc(pl)SCServiceCloudDelegate(im)serviceCloud:shouldAuthenticateServiceType:completion:>) in your [`SCServiceCloudDelegate`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCServiceCloudDelegate.html) implementation, or you can authenticate explicitly (that is, before the app attempts to show the relevant UI) using the [`setAuthenticationSettings(settings:forServiceType:completion:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCServiceCloud.html#/c:objc(cs)SCServiceCloud(im)setAuthenticationSettings:forServiceType:completion:>) method in the [`ServiceCloud`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCServiceCloud.html) shared instance. With on-demand authentication, you perform the authentication asynchronously, after the SDK calls your [`serviceCloud(shouldAuthenticateServiceType:completion:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCServiceCloudDelegate.html#/c:objc(pl)SCServiceCloudDelegate(im)serviceCloud:shouldAuthenticateServiceType:completion:>) delegate method. Once authenticated, pass the [`SCSAuthenticationSettings`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSAuthenticationSettings.html) object to the completion block that you're given in the [`serviceCloud(shouldAuthenticateServiceType:completion:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCServiceCloudDelegate.html#/c:objc(pl)SCServiceCloudDelegate(im)serviceCloud:shouldAuthenticateServiceType:completion:>) method. The following sequence diagram illustrates the basic authentication flow for on-demand authentication. ![OAuth on demand diagram](https://developer.salesforce.com/docs/media/service-sdk/ios-oauth-diagram-on-demand.png '{"class": "image-xl", "title": "On-Demand Authentication"}') Alternatively, you can explicitly authenticate before any UI appears that requires authentication. Call the [`setAuthenticationSettings(settings:forServiceType:completion:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCServiceCloud.html#/c:objc(cs)SCServiceCloud(im)setAuthenticationSettings:forServiceType:completion:>) method in the [`ServiceCloud`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCServiceCloud.html) shared instance using the [`SCSAuthenticationSettings`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSAuthenticationSettings.html) object. The following sequence diagram illustrates the authentication flow for explicit authentication. ![OAuth explicit diagram](https://developer.salesforce.com/docs/media/service-sdk/ios-oauth-diagram-explicit.png '{"class": "image-xl", "title": "Explicit Authentication"}') To programmatically log out a user, call [`setAuthenticationSettings(settings:forServiceType:completion:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCServiceCloud.html#/c:objc(cs)SCServiceCloud(im)setAuthenticationSettings:forServiceType:completion:>) using `nil` for the [`SCSAuthenticationSettings`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSAuthenticationSettings.html) argument. ## Error Conditions Implement [`serviceCloud(authenticationFailed:forServiceType:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCServiceCloudDelegate.html#/c:objc(pl)SCServiceCloudDelegate(im)serviceCloud:authenticationFailed:forServiceType:>) in your [`SCServiceCloudDelegate`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCServiceCloudDelegate.html) object to handle error conditions. The SDK calls this method if the access token expires, and for any other scenario that results in an authentication failure. If you return `true` or `YES`, the SDK assumes that you want to proceed, and it subsequently calls [`serviceCloud(shouldAuthenticateServiceType:completion:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCServiceCloudDelegate.html#/c:objc(pl)SCServiceCloudDelegate(im)serviceCloud:shouldAuthenticateServiceType:completion:>) to give you a chance to send updated authentication information. If you return `false` or `NO`, the SDK goes back to the guest user state. The `error` argument in this method contains information about the error. The `code` property on this object contains the error code. The following errors are the most common error codes you can encounter: | Error Code | Description | | ------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `SCServiceUserSessionExpiredOrInvalidError` (401) | Occurs when the session has expired or the ID is invalid. Use the refresh token to acquire another access token and then update the `account` property, as shown in the next step. | | `SCServiceUserRequestRefusedError` (403) | Occurs when the user does not have sufficient access for the request. Verify that the logged in user has sufficient credentials. | | `SCServiceUserResourceNotFoundError` (404) | Occurs when the requested resource was not found. Check the URI and other parameters for errors. | See [Status Codes and Error Responses](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/errorcodes.htm) for a full set of possible error codes. ## Sample Code The following sample code illustrates how to implement an [`SCServiceCloudDelegate`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCServiceCloudDelegate.html) object to handle authentication. ```java class MyAuthHandler: NSObject, SCServiceCloudDelegate { override init() { super.init() // Subscribe to ServiceCloud events ServiceCloud.shared().delegate = self } /** Implementation of a `ServiceCloudDelegate` method that allows you to authenticate for a given service. */ func serviceCloud(_ serviceCloud: ServiceCloud, shouldAuthenticateServiceType service: SCServiceType, completion: @escaping (SCSAuthenticationSettings?) -> Void) -> Bool { // Rather than scrutinize the service to see if we want to authenticate, // let's just assume that we always want to authenticate... // TO DO: Authenticate asynchronously let urlRequest = URLRequest.init(url: URL(string: "https://example.com/auth")!) URLSession.shared.dataTask(with: urlRequest) { (data, response, error) in // TO DO: Populate the `SCSAuthenticationSettings` object from the result. var authSettings: SCSAuthenticationSettings? // Call the completion block with the authentication settings (asynchronously) completion(authSettings) }.resume() // Tell the SDK that we do plan to authenticate return true } /** Implementation of a `ServiceCloudDelegate` method to handle authentication failure events. */ func serviceCloud(_ serviceCloud: ServiceCloud, authenticationFailed error: Error, forServiceType service: SCServiceType) -> Bool { // For this example, let's not bother handling the error, // and just fall back to the guest user state... // TO DO: In your code, you should inspect this error. // If you want to handle the error, you could // return `true` and then you'd be called back in the // `shouldAuthenticateServiceType` method above. return false } } ``` # Authorization The Enhanced Chat API supports authenticated and unauthenticated users. For authenticated users, the API uses bearer token authentication. Requests are authenticated by JWT tokens generated by the service for individual clients and use the standard header `Authorization: Bearer ` for endpoints that require security, where `` is the JSON Web Token (JWT). To generate access tokens for authenticated users, see [Generate an Access Token](/docs/service/messaging-api/references/miaw-api-reference?meta=generateAccessTokenForAuthenticatedUser). To generate access tokens for unauthenticated users (unverified guests), see [Generate an Access Token for an Unauthenticated User](/docs/service/messaging-api/references/miaw-api-reference?meta=generateAccessTokenForUnauthenticatedUser). If you're implementing user verification, you can create a signed JSON Web Token (JWT) by following the steps in the [JWT and JWK Command Line Utility](https://github.com/Salesforce-Async-Messaging/key-command-line-utility) README file in GitHub. **See Also** - _Salesforce Help_: [Understanding User Verification](https://help.salesforce.com/s/articleView?id=service.user_verification_overview.htm) - _Salesforce Help_: [Add User Verification](https://help.salesforce.com/s/articleView?id=service.user_verification.htm) # Authorization: Integration User To access the Agentforce IT Service Configuration Management Database (CMDB) GraphQL API, you must authenticate using an Integration User via a standard OAuth 2.0 flow. You must have administrator access to your Salesforce org to create Integration Users and Connected Apps. 1. Log in to your Salesforce org as an administrator. 2. Create a dedicated User record with the Salesforce Integration **User License**. 3. Assign the Integration User to a Permission Set that includes at least one of the following permissions. These permissions determine what data you can access via the API: - `ItsrvcCnfgItmTypMgr` - `ItsrvcCnfgItmOwner` - `ItsrvcCnfgItmRead` 4. Create a Connected App (also known as an External Client App) and retrieve your OAuth credentials (Client ID and Client Secret). For detailed instructions, see [Authorization Through Connected Apps and OAuth 2.0](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/intro_oauth_and_connected_apps.htm). 5. Generate a Bearer Token by exchanging your client credentials for an access token. Send a POST request to the OAuth token endpoint: ```nolang POST /services/oauth2/token HTTP/1.1 Host: your-instance.salesforce.com Content-Type: application/x-www-form-urlencoded grant_type=client_credentials& client_id=& client_secret= ``` The response includes an access token: ```nolang { "access_token": "00D...", "instance_url": "https://your-instance.salesforce.com", "id": "...", "token_type": "Bearer", ... } ``` Use the `access_token` value in the `Authorization` header of your CMDB GraphQL requests. **See Also** - [GraphQL API Authorization](https://developer.salesforce.com/docs/platform/graphql/guide/authorization.html) # Authorization: User Sign-In To access the Agentforce IT Service Configuration Management Database (CMDB) GraphQL API, you must authenticate using an OAuth 2.0 Authorization Code flow with user sign-in, so that API calls run under the signed-in user's identity. You must have administrator access to your Salesforce org to create Connected Apps. 1. Log in to your Salesforce org as an administrator. 2. Create a Connected App (also known as an External Client App) and retrieve your OAuth credentials (Client ID and Client Secret). For detailed instructions, see [Authorization Through Connected Apps and OAuth 2.0](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/intro_oauth_and_connected_apps.htm). 3. Obtain the authorization code from the Salesforce authorization URL. Execute the following request to receive an authorization code at your callback URL: Authorization request: ```nolang POST /services/oauth2/authorize Host: your-instance.salesforce.com Content-Type: application/x-www-form-urlencoded response_type=code client_id= redirect_uri=https%3A%2F%2Flocalhost%2F scope=api%20sfap_api ``` Use the redirect URI from your Connected App. 4. Exchange your authorization code for an access token. Submit a POST request to the token endpoint using the code from the previous step: ```nolang POST /services/oauth2/token Host: your-instance.salesforce.com Content-Type: application/x-www-form-urlencoded grant_type=authorization_code& code=& redirect_uri=http://localhost/& client_id=& client_secret= ``` Use the `access_token` you received in the `Authorization` header for your CMDB GraphQL requests. # Auto-Response Component for Android Send customers structured content (such as survey links) with Messaging auto-response components. **important:** This feature requires version 1.2.0 or later of the Enhanced In-App Chat SDK. This article applies to the following implementations: | UI SDK | Core SDK | | :----: | :------: | | ✅ | ✅ | An auto-response is a text or link response sent when a customer initiates a messaging session, a rep joins, or a session ends. This topic describes how to send parameters to Salesforce for the auto-response Messaging component. You can use this component during or after the conversation to show the user a web page, such as a survey. To learn about and set up auto-response components, see [Create a Messaging Component: Auto-Response](https://help.salesforce.com/s/articleView?id=service.messaging_components_auto_response.htm). **note:** The Enhanced In-App Chat UI SDK automatically displays any auto-response components that you add in Salesforce. You don't write any code to display this component. If you're using the Core SDK, you can process the incoming `ConversationEntry` object as you would any other incoming message. This documentation shows you how to optionally pass additional parameters to the URL that is presented to the user. After you've set up the auto-response component in Salesforce, you can optionally send additional parameters from the app using the SDK. These parameters are mapped to the path and the query string of the auto-response URL. 1. Implement the [`TemplatedUrlValuesProvider`](https://salesforce-async-messaging.github.io/messaging-in-app-android/sdk/core/com.salesforce.android.smi.core/-templated-url-values-provider/index.html) interface. This provider contains the `setValues` method, which the SDK calls to set parameter values. 2. Add your provider to the SDK using the `CoreClient.registerTemplatedUrlValuesProvider` property. See the [`CoreClient`](https://salesforce-async-messaging.github.io/messaging-in-app-android/sdk/core/com.salesforce.android.smi.core/-core-client/index.html) reference documentation. **note:** This sample code requires the configuration object that you created when setting up the UI SDK or the Core SDK. See [Build a UI SDK App](https://developer.salesforce.com/docs/service/messaging-in-app/guide/android-ui-sdk.md) or [Build a Core SDK App](https://developer.salesforce.com/docs/service/messaging-in-app/guide/android-core-sdk.md) for more information. ```kotlin // Create a core client from a config val coreClient = CoreClient.Factory.create(myContext, config) // Register a provider coreClient.registerTemplatedUrlValuesProvider( object : TemplatedUrlValuesProvider { // Implement the setValues method override suspend fun setValues(input: TemplatedWebView): TemplatedWebView { // Iterate through all the path parameter fields input.pathParams.forEach { // Inspect key value using it.key // If we want to specify a value, then use the setPathParameterValue method input.setPathParameterValue(it.key, "My path parameter value") } // Iterate through all the query parameter fields input.queryParams.forEach { // Inspect key value using it.key // If we want to specify a value, then use the setQueryParameterValue method input.setQueryParameterValue(it.key, "My query parameter value") } // Return the same list, but with values set return input } }) ``` After you register your provider, the SDK automatically calls the `setValues` method before an auto-response Messaging component is shown. # Auto-Response Component for iOS Send customers structured content (such as survey links) with Messaging auto-response components. **important:** This feature requires version 1.2.0 or later of the Enhanced In-App Chat SDK. This article applies to the following implementations: | UI SDK | Core SDK | | :----: | :------: | | ✅ | ✅ | An auto-response is a text or link response sent when a customer initiates a messaging session, a rep joins, or a session ends. This topic describes how to send parameters to Salesforce for the auto-response Messaging component. You can use this component during or after the conversation to show the user a web page, such as a survey. To learn about and set up auto-response components, see [Create a Messaging Component: Auto-Response](https://help.salesforce.com/s/articleView?id=service.messaging_components_auto_response.htm). **note:** The Enhanced In-App Chat UI SDK automatically displays any auto-response components that you add in Salesforce. You don't write any code to display this component. If you're using the Core SDK, you can process the incoming `ConversationEntry` object as you would any other incoming message. This documentation shows you how to optionally pass additional parameters to the URL that is presented to the user. After you've set up the auto-response component in Salesforce, you can optionally send additional parameters from the app using the SDK. These parameters are mapped to the path and the query string of the auto-response URL. 1. Implement the [`TemplatedUrlDelegate`](https://salesforce-async-messaging.github.io/messaging-in-app-ios/documentation/smiclientcore/templatedurldelegate) interface. This delegate contains the `didRequestTemplatedValues` method, which the SDK calls to set parameter values. 2. Add your delegate to the SDK using the `CoreClient.templatedUrlDelegate` property. See the [`CoreClient`](https://salesforce-async-messaging.github.io/messaging-in-app-ios/documentation/smiclientcore/coreclient) reference documentation. ```swift class AutoResponseDelegateImplementation: TemplatedUrlDelegate { func core(_ core: CoreClient!, didRequestTemplatedValues template: SMITemplateable!, completionHandler: URLParameterValueCompletion!) { // Add any auto-response values for key in template.keys { let value = "my auto-response value" template.setValue(value, forKey: key) } // Pass template back to SDK completionHandler(template) } } ``` **note:** This sample code requires the configuration object that you created when setting up the UI SDK or the Core SDK. See [Build a UI SDK App](https://developer.salesforce.com/docs/service/messaging-in-app/guide/ios-ui-sdk.md) or [Build a Core SDK App](https://developer.salesforce.com/docs/service/messaging-in-app/guide/ios-core-sdk.md) for more information. ```swift // Create an instance of the auto-response delegate let myAutoResponseDelegate = AutoResponseDelegateImplementation() // Create a core client from a config let coreClient = CoreFactory.create(withConfig: config) // Assign the auto-response delegate coreClient.templatedUrlDelegate = myAutoResponseDelegate ``` After you register your delegate, the SDK automatically calls the `didRequestPrechatValues` method before an auto-response Messaging component is shown. # Auto-Responses in Enhanced Web Chat The auto-response API allows you to pass parameters to Salesforce so that you can provide additional data to the auto-response messaging component when showing the user a web page such as a survey. To learn about and set up auto-response components, see [Create a Messaging Component: Auto-Response](https://help.salesforce.com/s/articleView?id=service.messaging_components_auto_response.htm). You build out the auto-response experience from within Salesforce Setup, but you can also use the Auto-Response JavaScript API to add or remove URL query parameters that get sent to the URL configured in the auto-response Messaging component in Salesforce Setup. This section describes the steps to take from your web client to add or remove parameters. See the associated documentation for each step of this sequence. ![Auto-response sequence](https://developer.salesforce.com/docs/media/messaging-web/auto-response-sequence.png) 1. Before you initialize the API from the code snippet that we provide, add an event listener for [`onEmbeddedMessagingReady`](/docs/service/messaging-web/guide/event-listeners.html). This method notifies you when the API is ready for requests. 2. After the `onEmbeddedMessagingReady` event is dispatched, add or remove any items to the list of auto-response parameters. Use the `setAutoResponseParameters` method to add a parameter. You can also use `removeAutoResponseParameters` to remove a parameter value. 3. At some point during or after the conversation, the auto-response UI appears, using any parameters specified from within Salesforce and any parameters specified using this JavaScript API. Specifically, the auto-response messaging component can be shown during one of these phases: Conversation Acknowledgement, Start Conversation, or End Conversation. To learn more, see [Create a Messaging Component: Auto-Response](https://help.salesforce.com/s/articleView?id=service.messaging_components_auto_response.htm). This sample code illustrates how you can implement the key steps of this sequence. ```javascript window.addEventListener("onEmbeddedMessagingReady", () => { console.log("Received the onEmbeddedMessagingReady event…"); embeddedservice_bootstrap.autoResponseAPI.setAutoResponseParameters({ cartValue: "123", }); }); ``` The Enhanced Web Chat [reference documentation](/docs/service/messaging-web/references) describes these methods in more detail. **note:** If your Enhanced Web Chat deployment is on an Experience Cloud site, follow the instructions in _Salesforce Help_ to add JavaScript code to the head markup section of your site. See [Configure an Enhanced Web Chat Deployment in an Experience Builder Site](https://help.salesforce.com/s/articleView?id=service.miaw_deployment_experience_builder.htm) in _Salesforce Help_. # Automate How Agents Accept and Decline Shift Assignments Create an approval process and link it to a flow so that agents can acknowledge shift assignments. When a planner tentatively assigns a shift, the agent can accept or reject the shift assignment in Agent Home. | Required Editions | | ------------------------------------------------------------------------- | | Workforce Engagement is available in Lightning Experience | | Available in: **Enterprise**, **Performance**, and **Unlimited** Editions | Set up an approval process for Shift records that’s triggered by a flow. When a planner assigns or creates a shift, the flow starts an approval process that lets the agent approve or decline the shift assignment. After you create and activate them, the flow triggers the approval process when these conditions are true. - The shift status is Tentative. - The shift is assigned to an agent's service resource. - The owner of the shift record is the assigned service resource. The flow also triggers the approval process when planners create and assign themselves to a shift. You can extend the approval process and flow examples provided here, or use them as is. For example, if you customize shift status values, you can use a custom value instead of Tentative. If you want to turn off the ability for agents to approve shifts, be sure to deactivate both the approval process and flow. Because there are many steps, we break them into sections. 1. [Create an Approval Process for Shift Records](#create-an-approval-process-for-shift-records) 2. [Create a Flow to Trigger the Approval Process](#create-a-flow-to-trigger-the-approval-process) 3. [Test Your Approval Process and Flow](#test-your-approval-process-and-flow) ## Create an Approval Process for Shift Records An approval process automates how records are approved in Salesforce. When you create the flow, you specify the approval process as the action that the flow takes. From Setup, in the Quick Find box, enter `Approval Processes`, and select **Approval Processes**. Under Manage Approval Process For, select **Shift** as the record type. Under Create New Approval Process, select **Use Standard Setup Wizard**. The wizard walks you through steps to create the approval process. ### Create an Approval Process with the Standard Setup Wizard 1. For Step 1: Enter Name and Description, enter a name, a unique name, and an optional description for the approval process. You specify the unique name, such as `Let_Agents_Accept_and_Reject_Shifts`, when you create your flow, so remember it. Click **Next**. ![Enter a name for the approval process.](https://developer.salesforce.com/docs/media/workforce_engagement_app_process_step1.png) 2. Click **Next** to skip Step 2: Specify Entry Criteria. 3. For Step 3: Specify Approver Field and Record Editability Properties, select **Administrators OR the currently assigned approver can edit records during the approval process**. Click **Next**. ![Specify record editability.](https://developer.salesforce.com/docs/media/workforce_engagement_app_process_step3.png) 4. Click **Next** to skip Step 4: Select Notification Templates. 5. For Step 5: Select Fields to Display on Approval Page Layout, make these changes. 1. Add Shift Number, Owner Name, and Status to the selected fields. 2. Under Approval Page Fields, select **Display approval history information in addition to the fields selected above**. 3. Under Security Settings, select **Allow approvers to access the approval page from within the Salesforce application, or externally from a wireless-enabled mobile device**. 4. Click **Next**. ![Select fields to display on approval page layout](https://developer.salesforce.com/docs/media/workforce_engagement_app_process_step5.png) 6. For Step 6: Specify Initial Submitters, make these changes. 1. Under Submitter Type, in Search, select Creator. 2. Add Record Creator and Shift Owner as allowed submitters. Record Creator allows planners who create shifts to approve or reject shifts that are assigned to them. 3. Select **Add the Submit for Approval button and Approval History related list to all Shift page layouts**. 4. Save your approval process. ![Specify initial submitters.](https://developer.salesforce.com/docs/media/workforce_engagement_app_process_step6.png) ### Create an Approval Step Create an approval step in your process. Select **Yes, I’d like to create an approval step now**, and click **Go**. 1. For Step 1: Enter Name and Description, enter a name, a unique name, a step number, and an optional description for the approval step. Click **Next**. ![Enter a name for approval step.](https://developer.salesforce.com/docs/media/workforce_engagement_app_step_step1.png) 2. For Step 2: Specify Step Criteria, select **All records should enter this step**, and click **Next**. ![Specify step criteria.](https://developer.salesforce.com/docs/media/workforce_engagement_app_step_step2.png) 3. For Step 3: Select Assigned Approver, under Select Approver, select **Automatically assign to approver(s)**. For the approver, select **Related user** and **Owner Name**. Save your work. ![Select assigned approver.](https://developer.salesforce.com/docs/media/workforce_engagement_app_step_step3.png) 4. You created an approval step, but you can skip specifying workflow actions right now. Select **No, I will do this later. Take me to the approval process detail page to review what I’ve just created** and click **Go**. ### Create an Approval Action Create an approval action that updates the shift status to Published when the agent approves their shift assignment in Agent Home. 1. Click the name of your approval process to open it. 2. In the Approval Steps section, click **Show Actions**. 3. Under Approval Actions, click **Add New** and select **Field Update**. ![Create an approver action.](https://developer.salesforce.com/docs/media/workforce_engagement_app_action.png) 4. Under Identification, enter a name, unique name, and optional description. For example, name the action `Update Status to Published`. For the Shift object, select **Status** as the Field to Update. 5. Under Specify New Field Value and Picklist Options, select **A specific value**. Select **Published** as that value. 6. Save your approval action. You can skip defining a rejection action. If the agent rejects the shift assignment, the shift status remains set to Tentative. 7. In the **Final Approval Actions** section of your approval process, click **Edit** for the Record Lock type. Select **Unlock the record for editing**. Unlocking the Shift record is necessary so that the approval process can update shift status. Otherwise an error occurs when the agent tries to approve the shift assignment. ![Unlock the record for editing.](https://developer.salesforce.com/docs/media/workforce_engagement_finalapp_rec_lock.png) 8. Save your settings. 9. Review your approval process. If it looks OK, activate it. ![Activate the approval process.](https://developer.salesforce.com/docs/media/workforce_engagement_app_activate.png) ## Create a Flow to Trigger the Approval Process To trigger the approval process, you define outcomes in your flow that check for these conditions when a Shift record is updated. - The shift status is changed to Tentative. - A service resource is assigned the shift. - The owner of the shift record is changed to the assigned service resource. If any two conditions are true, the flow starts when the third condition becomes true. A fourth outcome covers the scenario when a planner creates a shift and self-assigns it. 1. From Setup, in the Quick Find box, enter `Flows`, and select **Flows**. 2. Click **New Flow** to get started creating your flow. Select Record-Triggered Flow as the flow type and click **Create**. 3. Configure when the flow starts. 1. Select the Shift object​​ as the object whose records trigger the flow. 2. Select **A record is created or updated** as the trigger. 3. Select **Action and Related Records**, and click **Done**. ![Configure when the flow starts.](https://developer.salesforce.com/docs/media/workforce_engagement_flow_start.png) 4. Click + on the Flow Builder and add a decision element to the flow. ![Add a decision element.](https://developer.salesforce.com/docs/media/workforce_engagement_flow_add_decision.png) 5. Enter a label, API name, and optional description for your flow. For example, enter `Trigger Accept or Reject Shift Assignment`as the name. 6. Add the first outcome and the conditions that must be met. This outcome starts the flow when the shift status is changed to Tentative and the other conditions are met. 1. Enter a label and an outcome API name. For example, `Status is Changed to Tentative`. 2. Select **All Conditions are Met(AND)**. 3. Specify resource, operator, and value fields to define each condition. For example, set `{!$Record.Status}` as the resource, `is Changed` as the operator, and `{!$GlobalConstant.True}` as the value. After it’s defined, the condition appears as \$Record > Status Is Changed True. Set these conditions for the first outcome. - {`!$Record.Status} is Changed {!$GlobalConstant.True}` - `{!$Record.Status} Equals Tentative` - `{!$Record.OwnerId} Equals {!$Record.ServiceResource.RelatedRecordId}` ![Define conditions for the first outcome.](https://developer.salesforce.com/docs/media/workforce_engagement_flow_outcome1.png) 7. Next to Outcome Order, click **+** to add the second outcome and the conditions that must be met. This outcome starts the flow when the shift owner is changed to the agent and the other conditions are met. 1. Enter a label and an outcome API name. For example, `Owner is Changed to Agent`. 2. Select **All Conditions are Met(AND)**. 3. Set these conditions. - `{!$Record.OwnerId} is Changed {!$GlobalConstant.True}` - `{!$Record.OwnerId} Equals {!$Record.ServiceResource.RelatedRecordId}` - `{!$Record.Status} Equals Tentative` ![Define conditions for the second outcome.](https://developer.salesforce.com/docs/media/workforce_engagement_flow_outcome2.png) 8. Next to Outcome Order, click **+** to add the third outcome. This outcome starts the flow when the shift is assigned to a service resource and the other conditions are met. 1. Enter a label and an outcome API name. For example, `Service Resource is Changed to Agent`. 2. Select **All Conditions are Met(AND)**. 3. Set these conditions. - `{!$Record.ServiceResourceId} is Changed {!$GlobalConstant.True}` - `{!$Record.OwnerId} Equals {!$Record.ServiceResource.RelatedRecordId}` - `{!$Record.Status} Equals Tentative` ![Define conditions for the third outcome.](https://developer.salesforce.com/docs/media/workforce_engagement_flow_outcome3.png) 9. Next to Outcome Order, click **+** to add the fourth outcome. This outcome starts the flow when planners create and assign themselves a shift and the other conditions are met. 1. Enter a label and an outcome API name. For example, `Shift is Created and Assigned to Creator`. 2. Select **All Conditions are Met(AND)**. 3. Set these conditions. - `{!$Record.OwnerId} Equals {!$Record.CreatedBy.Id}` - `{!$Record.OwnerId} Equals {!$Record.ServiceResource.RelatedRecordId}` - `{!$Record.Status} Equals Tentative` - `{!$Record__Prior} is Null {!$GlobalConstant.True}` ![Define conditions for the fourth outcome.](https://developer.salesforce.com/docs/media/workforce_engagement_flow_outcome4.png) 10. Under Outcome Order, click **Default Outcome**. Enter `No Action` as the label of the default outcome. ![Enter a label for the default outcome..](https://developer.salesforce.com/docs/media/workforce_engagement_flow_outcome_default.png) 11. In the Flow Builder, click **+** above the End element and add an action element. ![Add an action in flow builder.](https://developer.salesforce.com/docs/media/workforce_engagement_flow_add_action.png) 1. Select the **Submit for Approval** action. To make it easy to find this action, select **Approvals** as the filter category. 2. Enter a label, API name, and optional description for the action. For example, enter `Accept or Reject Shift` as the name. 3. Set the input value for the record ID to the shift record ID `{!$Record.Id}`. 4. Turn on the toggle to Include the approval process name. 5. Specify the exact API name of the approval process that you created earlier. For example, `Let_Agents_Accept_and_Reject_Shifts`. 6. Click **Done**. ![Define the submit for approval action and specify your approval process.](https://developer.salesforce.com/docs/media/workforce_engagement_flow_approval_action.png) 12. In the Flow Builder, link these outcomes to the Accept or Reject Shift action. - Status is Changed to Tentative - Owner is Changed to Agent - Service Resource is Changed to Agent - Shift is Created and Assigned to Creator 13. In the Flow Builder, link the No Action outcome to the End element. ![Link outcomes to the action in flow builder.](https://developer.salesforce.com/docs/media/workforce_engagement_flow_final.png) 14. Save and name your flow, for example, `Trigger Shift Approval`. 15. Activate your flow. ## Test Your Approval Process and Flow Now you’re ready to see the results of your work. 1. As a planner, create or select a shift. Set the shift status to Tentative. 2. Assign it to a service resource. 3. Change the shift owner to the service resource. 4. In Agent Home for that service resource, the agent can then accept or reject the shift. If the agent approves the shift, its status changes to Published. If the agent rejects the shift, the shift’s status remains as Tentative. When the agent refreshes Agent Home, the shift no longer appears on the agent’s schedule. If a planner assigns a shift to the wrong agent, the planner must terminate the approval process in the shift’s Approval History related list. Otherwise, the agent can reject the erroneously assigned shift. The planner can then reassign the shift to the right agent. **See Also** - [_Salesforce Help:_ Approvals](https://help.salesforce.com/s/articleView?id=platform.what_are_approvals.htm&type=5) - [_Salesforce Help:_ Flows](https://help.salesforce.com/s/articleView?id=platform.flow.htm&type=5) - [_Salesforce Help:_ Email Notifications for Intraday Management](https://help.salesforce.com/s/articleView?id=service.workforce_engagement_about_intraday_management_notifications.htm&type=5) # Automate Time Sheet Creation, Capture Omni Status Change, and Calculate Shrinkage Set up basic time sheet automation. Log agents' Omni-Channel status changes throughout the day and use that information to calculate the shrinkage percentage within a shift. - **Ease of Implementation:** Easy - **Estimated Time to Implement:** 60 minutes ## Prerequisites This example requires Omni Channel and Workforce Engagement to be turned on. ## Step 1: Create Custom Fields on the Time Sheet Object Create custom fields on the Time Sheet object in Salesforce to correspond to the data that you use to calculate shrinkage. 1. From Setup, select **Object Manager**. 2. In the Quick Find box, enter `Time Sheet`, and then select the **Time Sheet** object. 3. Select **Fields & Relationships** from the left pane. 4. To create a field, select **New**. 5. To create a custom field to hold the data, follow the steps. To learn more about creating custom fields, see [Create Custom Fields](https://help.salesforce.com/articleView?id=adding_fields.htm). 6. Create these fields. ![time sheet with customized fields](https://developer.salesforce.com/docs/media/custom_fields_on_time_sheet.png) 7. Make sure to add these fields to the layout for testing and deployment. ## Step 2: Create Custom Fields on the Time Sheet Entry Object Create custom fields on the Time Sheet object in Salesforce to correspond to the data that you use to calculate shrinkage. 1. From Setup, at the top of the page, select **Object Manager**. 2. In the Quick Find box, enter `Time Sheet Entry`, and then select the **Time Sheet Entry** object. 3. Select **Fields & Relationships** from the left pane. 4. To create a field, select **New**. 5. To create a custom field to hold the data, follow the steps. To learn more about creating custom fields, see [Create Custom Fields](https://help.salesforce.com/articleView?id=adding_fields.htm). 6. Create these fields. ![Time sheet fields for creation](https://developer.salesforce.com/docs/media/time_sheet_entry_fields.png) 7. Make sure to add these fields to the layout for testing and deployment. ## Step 3: Introduce Automation Using Salesforce Flow Two flows are used to allow agents to clock in, generate a Time Sheet, and capture Omni Channel status changes throughout the day. 1. From Setup, in the Quick Find box, enter `Flows`, and then select **Flows**. 2. To create your first flow, select **New**. 3. For more information, see: [Salesforce Flows](https://help.salesforce.com/s/articleView?id=platform.flow.htm&type=5) 4. Create a screen flow to place on the home page. ![Salesforce flow showing automation](https://developer.salesforce.com/docs/media/home_page_flow_1.png) ![Automation flow with shift times and records](https://developer.salesforce.com/docs/media/home_page_flow_2.png) 5. Create a record-triggered flow to capture an Omni status change. ![Record-triggered flow to capture Omni status](https://developer.salesforce.com/docs/media/omni_status_change_flow_1.png) ![Flow with entries for decisions and status](https://developer.salesforce.com/docs/media/omni_status_change_flow_2.png) ## Test This Example 1. Clock in using the screen flow. 2. To simulate the changes in agent availability, change Omni statuses between different presences. 3. Verify that time sheet entries are created and shrinkage is calculated. # Automation Relay Display Represents an Automation Relay Display configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. ## Configuration Item Type Definition ||| |-|-| |Name|Automation Relay Display| |Developer Name|`SD_AuReDi`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Network Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-network-device.md)| |Rule Name|Default rule for all AWS Route Tables| |Identifier(s)|Route Table Id| ## Attributes No associated attributes for this configuration item type. # autoResponseAPI This object contains all the APIs associated with the auto-response experience. For a guide, see [Auto-Response API](/docs/service/messaging-web/guide/auto-response.html). ## `setAutoResponseParameters({parameters})` Adds values to the list of parameters. These parameters are passed to the auto-response component in Salesforce. This method must be called after the [`onEmbeddedMessagingReady`](/docs/service/messaging-web/guide/event-listeners.html) event is dispatched. ### Parameters `{parameters}`: Required. A JSON object containing a list of key-value pairs of the parameter names and their values. ### Example ```javascript embeddedservice_bootstrap.autoResponseAPI.setAutoResponseParameters({ cartValue: "123", cartDescription: "My cart description", }); ``` ## `removeAutoResponseParameters({parameters})` Removes parameters from the list of parameters. This method must be called after the [`onEmbeddedMessagingReady`](/docs/service/messaging-web/guide/event-listeners.html) event is dispatched. ### Parameters `{parameters}`: Required. An array of strings. Each string is a parameter to be removed from the auto-response data. ### Example ```javascript embeddedservice_bootstrap.autoResponseAPI.removeAutoResponseParameters(["cartDescription"]); ``` # AV Device Represents an AV Device configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Communication Infra. ## Configuration Item Type Definition ||| |-|-| |Name|AV Device| |Developer Name|`SD_AvDe`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Communication Infra](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-communication-infra.md)| |Rule Name|Default rule for all AWS Nat Gateways| |Identifier(s)|NAT Gateway ID| ## Attributes No associated attributes for this configuration item type. # Available Territory Slots (POST) Contains the error codes and error code messages related with Salesforce Scheduler API for the `available-territory-slots` (POST) resource. This table lists HTTP response code descriptions that are unique to this resource. |HTTP Response Code|Error Code|Description| |------------------|----------|-----------| |400|`MISSING_ARGUMENT`|Specify a `serviceTerritoryId` with either a `workTypeGroupId` or `WorkTypeId`.| |400|`INTERNAL_ERROR`|You can't specify both `requiredResourceIds` and `filterByResources` in the request body. Specify one or the other and try again.| |400|`INVALID_INPUT`|Specify either a `workTypeGroupId` or a `WorkTypeId`.| |400|`INVALID_INPUT`|This isn't a valid `workTypeGroupId` value. Specify a valid ID for the `workTypeGroupId` parameter.| |400|`INVALID_INPUT`|This isn't a valid `workTypeId` value. Specify a valid ID for the `workTypeId` parameter.| |400|`INVALID_INPUT`|Specify either a workTypeId or a value for the durationInMinutes parameter.| |400|`INVALID_INPUT`|This isn't a valid `serviceTerritoryId` value. Specify a valid ID for the `serviceTerritoryId` parameter.| |400|`INVALID_INPUT`|This isn't a valid account ID. Specify a valid ID for the `accountId` parameter.| |400|`INTERNAL_ERROR`|`AppointmentSchedulingPolicy` provided: {id} does not belong to AppointmentSchedulingPolicy.| |400|`INTERNAL_ERROR`|Provide an end date that's after the start date, and try again.| |400|`INVALID_INPUT`|This isn't a valid service resource Id in the `filterByResources` parameter. Specify a valid service resource ID in the `filterByResources` parameter.| |400|`INTERNAL_ERROR`|Something went wrong. Ask your admin for help.| |400|`INSUFFICIENT_ACCESS`|Looks like you don’t have access to the `maxAppointments` or `workTypeGroup` field in the TimeSlot object. Your Salesforce admin can help with that.| |400|`INSUFFICIENT_ACCESS`|Looks like you don’t have access to the `{Service Resource}` object. Your Salesforce admin can help with that.| |400|`INTERNAL_ERROR`|Specify a `workTypeGroup` with a custom_workType associated with an appointment category with a Scheduled type, and try again.| |400|`INTERNAL_ERROR`|{id} `(AppointmentTopicTimeSlot)`, is not accessible for the current user.| |403|`API_DISABLED_FOR_ORG`|The Chatter Connect API is not enabled for this organization or user type.| # Avaya Gateway Represents an Avaya Gateway configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. ## Configuration Item Type Definition ||| |-|-| |Name|Avaya Gateway| |Developer Name|`SD_AvGa`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Network Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-network-device.md)| |Rule Name|Default rule for all HP-UX Servers| |Identifier(s)|MAC address Hostname| ## Attributes No associated attributes for this configuration item type. # AVC encoder Represents an AVC encoder configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. ## Configuration Item Type Definition ||| |-|-| |Name|AVC encoder| |Developer Name|`SD_AvEn`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Network Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-network-device.md)| |Rule Name|Default rule for all Azure Resource Groups| |Identifier(s)|Asset Name Subscription Id Resource Group| ## Attributes No associated attributes for this configuration item type. # AWS Represents an AWS configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Cloud Resource. ## Configuration Item Type Definition ||| |-|-| |Name|AWS| |Developer Name|`SD_Awsxx`| |Component|No| |End User Compute/Unmetered|NA| |Parent|[Cloud Resource](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-cloud-resource.md)| |Rule Name|No identification rule is defined for this CI type.| |Identifier(s)|NA| ## Attributes ### CIDR block - **Type**: text - **Developer Name**: `SD_CiBl` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The cidr block of the AWS. - **Required**: Optional ### Created Time - **Type**: date - **Developer Name**: `SD_CrTi` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The created time of the AWS. - **Required**: Optional ### Database Name - **Type**: text - **Developer Name**: `SD_DaNa` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The database name of the AWS. - **Required**: Optional ### Default - **Type**: boolean - **Developer Name**: `SD_De2` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: Indicates whether the configuration item is the default (true) or not (false). - **Required**: Optional ### Default - **Type**: boolean - **Developer Name**: `SD_De2` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: Indicates whether the configuration item is the default (true) or not (false). - **Required**: Optional ### Group Id - **Type**: text - **Developer Name**: `SD_GrId` - **Attribute Set**: [Security Group Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-security-group-details.md) - **Description**: The group id of the AWS. - **Required**: Optional ### Instance Type - **Type**: text - **Developer Name**: `SD_InTy` - **Attribute Set**: [Instance Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-instance-details.md) - **Description**: The instance type of the AWS. - **Required**: Optional ### Key Name - **Type**: text - **Developer Name**: `SD_KeNa` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The key name of the AWS. - **Required**: Optional ### RAM Disk ID - **Type**: text - **Developer Name**: `SD_RaDiId` - **Attribute Set**: [Storage Disk Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-storage-disk-details.md) - **Description**: The ram disk id of the AWS. - **Required**: Optional ### Region - **Type**: text - **Developer Name**: `SD_Re` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The region of the AWS. - **Required**: Optional ### State - **Type**: text - **Developer Name**: `SD_St1` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The state of the AWS. - **Required**: Optional ### Subnet ID - **Type**: text - **Developer Name**: `SD_SuId1` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The subnet id of the AWS. - **Required**: Optional ### VPC ID - **Type**: text - **Developer Name**: `SD_VpId` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The vpc id of the AWS. - **Required**: Optional # AWS AMI Represents an AWS AMI (Amazon Machine Image) configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of AWS. ## Configuration Item Type Definition ||| |-|-| |Name|AWS AMI| |Developer Name|`SD_AwAm`| |Component|No| |End User Compute/Unmetered|NA| |Parent|[Network Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-network-device.md)| |Rule Name|Default rule for all Access Concentrators| |Identifier(s)|MAC address| ## Attributes ### AMI Name - **Type**: text - **Developer Name**: `SD_AmNa` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The name of the Amazon Machine Image. - **Required**: Optional ### AMI State - **Type**: text - **Developer Name**: `SD_AmSt` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The current state of the AMI. For example, available, pending, and failed. - **Required**: Optional ### Image Id - **Type**: text - **Developer Name**: `SD_ImId` - **Attribute Set**: [Instance Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-instance-details.md) - **Description**: The unique identifier for the AMI. For example, ami-0abcdef1234567890. - **Required**: Optional ### Image Location - **Type**: text - **Developer Name**: `SD_ImLo` - **Attribute Set**: [Image Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-image-details.md) - **Description**: The location path of the AMI in S3. - **Required**: Optional ### Image Type - **Type**: text - **Developer Name**: `SD_ImTy` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The type of image. For example, machine, kernel, and ramdisk. - **Required**: Optional ### Is Public - **Type**: boolean - **Developer Name**: `SD_IsPu` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: Indicates whether the configuration item is public (true) or not (false). - **Required**: Optional ### Root Device Type - **Type**: text - **Developer Name**: `SD_RoDeTy` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The type of root device. For example, ebs and instance-store. - **Required**: Optional ### Virtualization type - **Type**: text - **Developer Name**: `SD_ViTy` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The virtualization type of the AMI. For example, hvm and paravirtual. - **Required**: Optional # AWS Auto Scaling Group Represents an AWS Auto Scaling Group configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of AWS. ## Configuration Item Type Definition ||| |-|-| |Name|AWS Auto Scaling Group| |Developer Name|`SD_AwAuScG`| |Component|No| |End User Compute/Unmetered|No| |Parent|[AWS](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-aws.md)| |Rule Name|Default rule for all Websites| |Identifier(s)|Website Url| ## Attributes ### Auto Scaling Group ARN - **Type**: text - **Developer Name**: `SD_AuScGrA` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The Amazon Resource Name (ARN) of the Auto Scaling Group. - **Required**: Optional ### Auto Scaling Group Name - **Type**: text - **Developer Name**: `SD_AuScGrN` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The name of the Auto Scaling Group. - **Required**: Optional ### Desired Capacity - **Type**: text - **Developer Name**: `SD_DeCa` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The desired number of instances in the Auto Scaling Group. - **Required**: Optional ### Target Group ARN - **Type**: text - **Developer Name**: `SD_TaGrAr` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The Amazon Resource Name (ARN) of the target group associated with the Auto Scaling Group. - **Required**: Optional # AWS Database Cluster Represents an AWS Database Cluster configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of AWS. ## Configuration Item Type Definition ||| |-|-| |Name|AWS Database Cluster| |Developer Name|`SD_AwDaCl`| |Component|No| |End User Compute/Unmetered|No| |Parent|[AWS](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-aws.md)| |Rule Name|Default rule for all NanoStation Terminals| |Identifier(s)|MAC address| ## Attributes No associated attributes for this configuration item type. # AWS DocumentDB Represents an AWS DocumentDB configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of AWS. ## Configuration Item Type Definition ||| |-|-| |Name|AWS DocumentDB| |Developer Name|`SD_AwDo`| |Component|No| |End User Compute/Unmetered|No| |Parent|[AWS](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-aws.md)| |Rule Name|Default rule for all Network Projectors| |Identifier(s)|MAC address| ## Attributes No associated attributes for this configuration item type. # AWS DynamoDB Represents an AWS DynamoDB configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of AWS. ## Configuration Item Type Definition ||| |-|-| |Name|AWS DynamoDB| |Developer Name|`SD_AwDy`| |Component|No| |End User Compute/Unmetered|No| |Parent|[AWS](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-aws.md)| |Rule Name|Default rule for all Power Distribution Units| |Identifier(s)|MAC address| ## Attributes No associated attributes for this configuration item type. # AWS EBS Represents an AWS EBS configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of AWS. ## Configuration Item Type Definition ||| |-|-| |Name|AWS EBS| |Developer Name|`SD_AwEb`| |Component|No| |End User Compute/Unmetered|No| |Parent|[AWS](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-aws.md)| |Rule Name|Default rule for all Cooling Systems| |Identifier(s)|MAC address| ## Attributes ### Instance Id - **Type**: text - **Developer Name**: `SD_InId1` - **Attribute Set**: [Instance Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-instance-details.md) - **Description**: The instance id of the AWS EBS. - **Required**: Optional ### Snapshot Id - **Type**: text - **Developer Name**: `SD_SnId` - **Attribute Set**: [Snapshot Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-snapshot-details.md) - **Description**: The snapshot id of the AWS EBS. - **Required**: Optional ### Volume Id - **Type**: text - **Developer Name**: `SD_VoId` - **Attribute Set**: [Volume Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-volume-details.md) - **Description**: The volume id of the AWS EBS. - **Required**: Optional ### Volume IOPs - **Type**: text - **Developer Name**: `SD_VoIo` - **Attribute Set**: [Volume Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-volume-details.md) - **Description**: The volume iops of the AWS EBS. - **Required**: Optional ### Volume Size - **Type**: text - **Developer Name**: `SD_VoSi` - **Attribute Set**: [Volume Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-volume-details.md) - **Description**: The volume size of the AWS EBS. - **Required**: Optional ### Volume Type - **Type**: text - **Developer Name**: `SD_VoTy` - **Attribute Set**: [Volume Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-volume-details.md) - **Description**: The volume type of the AWS EBS. - **Required**: Optional ### Zone Name - **Type**: text - **Developer Name**: `SD_ZoNa` - **Attribute Set**: [Hardware and Network](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-hardware-and-network.md) - **Description**: The zone name of the AWS EBS. - **Required**: Optional # AWS EC2 Instance Represents an AWS EC2 Instance configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Server. ## Configuration Item Type Definition ||| |-|-| |Name|AWS EC2 Instance| |Developer Name|`SD_AwEcIn`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Server](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-server.md)| |Rule Name|Default rule for all IOT Sensors| |Identifier(s)|MAC address| ## Attributes ### AMI Launch Index - **Type**: int - **Developer Name**: `SD_AmLaIn` - **Attribute Set**: [Instance Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-instance-details.md) - **Description**: The ami launch index of the AWS EC2 Instance. - **Required**: Optional ### EBS Optimized - **Type**: boolean - **Developer Name**: `SD_EbOp` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: Indicates whether the configuration item is EBS optimized (true) or not (false). - **Required**: Optional ### IAM Instance Profile Name - **Type**: text - **Developer Name**: `SD_IaInPrN` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The iam instance profile name of the AWS EC2 Instance. - **Required**: Optional ### Image Id - **Type**: text - **Developer Name**: `SD_ImId` - **Attribute Set**: [Instance Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-instance-details.md) - **Description**: The image id of the AWS EC2 Instance. - **Required**: Optional ### Instance Id - **Type**: text - **Developer Name**: `SD_InId1` - **Attribute Set**: [Instance Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-instance-details.md) - **Description**: The instance id of the AWS EC2 Instance. - **Required**: Optional ### Instance Owner - **Type**: text - **Developer Name**: `SD_InOw` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The instance owner of the AWS EC2 Instance. - **Required**: Optional ### Instance State - **Type**: text - **Developer Name**: `SD_InSt` - **Attribute Set**: [Instance Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-instance-details.md) - **Description**: The instance state of the AWS EC2 Instance. - **Required**: Optional ### Instance tenancy - **Type**: text - **Developer Name**: `SD_InTe` - **Attribute Set**: [Instance Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-instance-details.md) - **Description**: The instance tenancy of the AWS EC2 Instance. - **Required**: Optional ### Instance Type - **Type**: text - **Developer Name**: `SD_InTy` - **Attribute Set**: [Instance Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-instance-details.md) - **Description**: The instance type of the AWS EC2 Instance. - **Required**: Optional ### Key Name - **Type**: text - **Developer Name**: `SD_KeNa` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The key name of the AWS EC2 Instance. - **Required**: Optional ### Launch Time - **Type**: text - **Developer Name**: `SD_LaTi` - **Attribute Set**: [Instance Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-instance-details.md) - **Description**: The launch time of the AWS EC2 Instance. - **Required**: Optional ### OS Domain - **Type**: text - **Developer Name**: `SD_OsDo` - **Attribute Set**: [Operating System Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-operating-system-details.md) - **Description**: The os domain of the AWS EC2 Instance. - **Required**: Optional ### OS Serial Number - **Type**: text - **Developer Name**: `SD_OsSeNu` - **Attribute Set**: [Operating System Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-operating-system-details.md) - **Description**: The os serial number of the AWS EC2 Instance. - **Required**: Optional ### OS Type - **Type**: text - **Developer Name**: `SD_OsTy` - **Attribute Set**: [Operating System Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-operating-system-details.md) - **Description**: The os type of the AWS EC2 Instance. - **Required**: Optional ### OS Vendor - **Type**: text - **Developer Name**: `SD_OsVe` - **Attribute Set**: [Operating System Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-operating-system-details.md) - **Description**: The os vendor of the AWS EC2 Instance. - **Required**: Optional ### Platform - **Type**: text - **Developer Name**: `SD_Pl` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The platform of the AWS EC2 Instance. - **Required**: Optional ### Private DNS Name - **Type**: text - **Developer Name**: `SD_PrDnNa` - **Attribute Set**: [Instance Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-instance-details.md) - **Description**: The private dns name of the AWS EC2 Instance. - **Required**: Optional ### Private IP Address - **Type**: text - **Developer Name**: `SD_PrIpAd` - **Attribute Set**: [Instance Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-instance-details.md) - **Description**: The private ip address of the AWS EC2 Instance. - **Required**: Optional ### Public DNS Name - **Type**: text - **Developer Name**: `SD_PuDnNa` - **Attribute Set**: [Instance Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-instance-details.md) - **Description**: The public dns name of the AWS EC2 Instance. - **Required**: Optional ### Public IP Address - **Type**: text - **Developer Name**: `SD_PuIpAd` - **Attribute Set**: [Instance Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-instance-details.md) - **Description**: The public ip address of the AWS EC2 Instance. - **Required**: Optional ### Root Device Name - **Type**: text - **Developer Name**: `SD_RoDeNa` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The root device name of the AWS EC2 Instance. - **Required**: Optional ### Root Device Type - **Type**: text - **Developer Name**: `SD_RoDeTy` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The root device type of the AWS EC2 Instance. - **Required**: Optional ### Virtualization type - **Type**: text - **Developer Name**: `SD_ViTy` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The virtualization type of the AWS EC2 Instance. - **Required**: Optional ### Volume Id - **Type**: text - **Developer Name**: `SD_VoId` - **Attribute Set**: [Volume Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-volume-details.md) - **Description**: The volume id of the AWS EC2 Instance. - **Required**: Optional ### Zone Name - **Type**: text - **Developer Name**: `SD_ZoNa` - **Attribute Set**: [Hardware and Network](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-hardware-and-network.md) - **Description**: The zone name of the AWS EC2 Instance. - **Required**: Optional # AWS ECR Represents an AWS ECR configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of AWS. ## Configuration Item Type Definition ||| |-|-| |Name|AWS ECR| |Developer Name|`SD_AwEc`| |Component|No| |End User Compute/Unmetered|No| |Parent|[AWS](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-aws.md)| |Rule Name|Default rule for all Packet Brokers| |Identifier(s)|MAC address| ## Attributes ### Subscription Id - **Type**: text - **Developer Name**: `SD_SuId` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The subscription id of the AWS ECR. - **Required**: Optional # AWS Internet Gateway Represents an AWS Internet Gateway configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of AWS. ## Configuration Item Type Definition ||| |-|-| |Name|AWS Internet Gateway| |Developer Name|`SD_AwInGa`| |Component|No| |End User Compute/Unmetered|No| |Parent|[AWS](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-aws.md)| |Rule Name|Default rule for all Gateways| |Identifier(s)|MAC address| ## Attributes ### Internet Gateway Id - **Type**: text - **Developer Name**: `SD_InGaId` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The internet gateway id of the AWS Internet Gateway. - **Required**: Optional # AWS Launch Template Represents an AWS Launch Template configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of AWS. ## Configuration Item Type Definition ||| |-|-| |Name|AWS Launch Template| |Developer Name|`SD_AwLaTe`| |Component|No| |End User Compute/Unmetered|No| |Parent|[AWS](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-aws.md)| |Rule Name|Default rule for all Audio Devices| |Identifier(s)|MAC address| ## Attributes ### Launch Template ARN - **Type**: text - **Developer Name**: `SD_LaTeAr` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The launch template arn of the AWS Launch Template. - **Required**: Optional ### Launch Template Name - **Type**: text - **Developer Name**: `SD_LaTeNa` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The launch template name of the AWS Launch Template. - **Required**: Optional # AWS Load Balancer Represents an AWS Load Balancer configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of AWS. ## Configuration Item Type Definition ||| |-|-| |Name|AWS Load Balancer| |Developer Name|`SD_AwLoBa`| |Component|No| |End User Compute/Unmetered|No| |Parent|[AWS](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-aws.md)| |Rule Name|Default rule for all TelePresences| |Identifier(s)|MAC address| ## Attributes ### AWS Load Balancer Name - **Type**: text - **Developer Name**: `SD_AwLoBaN` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The aws load balancer name of the AWS Load Balancer. - **Required**: Optional ### Canonical Hosted Zone Name - **Type**: text - **Developer Name**: `SD_CaHoZoN` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The canonical hosted zone name of the AWS Load Balancer. - **Required**: Optional ### Canonical Hosted Zone Name ID - **Type**: text - **Developer Name**: `SD_CaHoZo1` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The canonical hosted zone name id of the AWS Load Balancer. - **Required**: Optional ### DNS Host Name - **Type**: text - **Developer Name**: `SD_DnHoNa` - **Attribute Set**: [Network Adapter Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-network-adapter-details.md) - **Description**: The dns host name of the AWS Load Balancer. - **Required**: Optional ### Load Balancer ARN - **Type**: text - **Developer Name**: `SD_LoBaAr` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The load balancer arn of the AWS Load Balancer. - **Required**: Optional ### Public DNS Name - **Type**: text - **Developer Name**: `SD_PuDnNa` - **Attribute Set**: [Instance Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-instance-details.md) - **Description**: The public dns name of the AWS Load Balancer. - **Required**: Optional ### Scheme - **Type**: text - **Developer Name**: `SD_Sc` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The scheme of the AWS Load Balancer. - **Required**: Optional # AWS Nat Gateways Represents an AWS Nat Gateways configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of AWS. ## Configuration Item Type Definition ||| |-|-| |Name|AWS Nat Gateways| |Developer Name|`SD_AwNaGa`| |Component|No| |End User Compute/Unmetered|No| |Parent|[AWS](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-aws.md)| |Rule Name|Default rule for all UPS| |Identifier(s)|MAC address| ## Attributes ### NAT Gateway ID - **Type**: text - **Developer Name**: `SD_NaGaId` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The nat gateway id of the AWS Nat Gateways. - **Required**: Optional ### Network Interface Name - **Type**: text - **Developer Name**: `SD_NeInNa` - **Attribute Set**: [Network Interface Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-network-interface-details.md) - **Description**: The network interface name of the AWS Nat Gateways. - **Required**: Required ### Private IP Address - **Type**: text - **Developer Name**: `SD_PrIpAd` - **Attribute Set**: [Instance Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-instance-details.md) - **Description**: The private ip address of the AWS Nat Gateways. - **Required**: Optional # AWS Neptune Represents an AWS Neptune configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of AWS. ## Configuration Item Type Definition ||| |-|-| |Name|AWS Neptune| |Developer Name|`SD_AwNe`| |Component|No| |End User Compute/Unmetered|No| |Parent|[AWS](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-aws.md)| |Rule Name|Default rule for all Printers| |Identifier(s)|MAC address| ## Attributes No associated attributes for this configuration item type. # AWS Network ACLs Represents an AWS Network ACLs configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of AWS. ## Configuration Item Type Definition ||| |-|-| |Name|AWS Network ACLs| |Developer Name|`SD_AwNeAc`| |Component|No| |End User Compute/Unmetered|No| |Parent|[AWS](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-aws.md)| |Rule Name|Default rule for all Voice Gateways| |Identifier(s)|MAC address| ## Attributes ### Network ACL ID - **Type**: text - **Developer Name**: `SD_NeAcId` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The network acl id of the AWS Network ACLs. - **Required**: Optional # AWS RDS Represents an AWS RDS configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of AWS. ## Configuration Item Type Definition ||| |-|-| |Name|AWS RDS| |Developer Name|`SD_AwRd`| |Component|No| |End User Compute/Unmetered|No| |Parent|[AWS](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-aws.md)| |Rule Name|Default rule for all Routers| |Identifier(s)|MAC address| ## Attributes No associated attributes for this configuration item type. # AWS Route Table Represents an AWS Route Table configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of AWS. ## Configuration Item Type Definition ||| |-|-| |Name|AWS Route Table| |Developer Name|`SD_AwRoTa`| |Component|No| |End User Compute/Unmetered|No| |Parent|[AWS](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-aws.md)| |Rule Name|Default rule for all WAN Accelerators| |Identifier(s)|MAC address| ## Attributes ### Route Table Id - **Type**: text - **Developer Name**: `SD_RoTaId` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The route table id of the AWS Route Table. - **Required**: Optional # AWS S3 Represents an AWS S3 configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of AWS. ## Configuration Item Type Definition ||| |-|-| |Name|AWS S3| |Developer Name|`SD_AwS3`| |Component|No| |End User Compute/Unmetered|No| |Parent|[AWS](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-aws.md)| |Rule Name|Default rule for all Remote Access Controllers| |Identifier(s)|MAC address| ## Attributes ### Instance Owner - **Type**: text - **Developer Name**: `SD_InOw` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The instance owner of the AWS S3. - **Required**: Optional ### Owner Id - **Type**: text - **Developer Name**: `SD_OwId` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The owner id of the AWS S3. - **Required**: Optional # AWS Security Group Represents an AWS Security Group configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of AWS. ## Configuration Item Type Definition ||| |-|-| |Name|AWS Security Group| |Developer Name|`SD_AwSeGr`| |Component|No| |End User Compute/Unmetered|No| |Parent|[AWS](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-aws.md)| |Rule Name|Default rule for all Chassis Clusters| |Identifier(s)|MAC address| ## Attributes ### Group Name - **Type**: text - **Developer Name**: `SD_GrNa` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The group name of the AWS Security Group. - **Required**: Optional # AWS Snapshot Represents an AWS Snapshot configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of AWS. ## Configuration Item Type Definition ||| |-|-| |Name|AWS Snapshot| |Developer Name|`SD_AwSn`| |Component|No| |End User Compute/Unmetered|No| |Parent|[AWS](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-aws.md)| |Rule Name|Default rule for all Cisco Telepresences| |Identifier(s)|MAC address| ## Attributes ### Owner Id - **Type**: text - **Developer Name**: `SD_OwId` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The owner id of the AWS Snapshot. - **Required**: Optional ### Progress - **Type**: text - **Developer Name**: `SD_Pr` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The progress of the AWS Snapshot. - **Required**: Optional ### Snapshot Id - **Type**: text - **Developer Name**: `SD_SnId` - **Attribute Set**: [Snapshot Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-snapshot-details.md) - **Description**: The snapshot id of the AWS Snapshot. - **Required**: Optional ### Start Time - **Type**: date - **Developer Name**: `SD_StTi` - **Attribute Set**: [Snapshot Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-snapshot-details.md) - **Description**: The start time of the AWS Snapshot. - **Required**: Optional ### Volume Id - **Type**: text - **Developer Name**: `SD_VoId` - **Attribute Set**: [Volume Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-volume-details.md) - **Description**: The volume id of the AWS Snapshot. - **Required**: Optional ### Volume Size - **Type**: text - **Developer Name**: `SD_VoSi` - **Attribute Set**: [Volume Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-volume-details.md) - **Description**: The volume size of the AWS Snapshot. - **Required**: Optional # AWS Target Group Represents an AWS Target Group configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of AWS. ## Configuration Item Type Definition ||| |-|-| |Name|AWS Target Group| |Developer Name|`SD_AwTaGr`| |Component|No| |End User Compute/Unmetered|No| |Parent|[AWS](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-aws.md)| |Rule Name|Default rule for all IIS Websites| |Identifier(s)|Server IP Address Website Name Host Name| ## Attributes ### Listener ARN - **Type**: text - **Developer Name**: `SD_LiAr` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The listener arn of the AWS Target Group. - **Required**: Optional ### Load Balancer ARN - **Type**: text - **Developer Name**: `SD_LoBaAr` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The load balancer arn of the AWS Target Group. - **Required**: Optional ### Protocol - **Type**: text - **Developer Name**: `SD_Pr1` - **Attribute Set**: [IIS Website Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-iis-website-details.md) - **Description**: The protocol of the AWS Target Group. - **Required**: Optional ### Target Group ARN - **Type**: text - **Developer Name**: `SD_TaGrAr` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The target group arn of the AWS Target Group. - **Required**: Optional ### Target Group Name - **Type**: text - **Developer Name**: `SD_TaGrNa` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The target group name of the AWS Target Group. - **Required**: Optional # AWS VPC Represents an AWS VPC configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of AWS. ## Configuration Item Type Definition ||| |-|-| |Name|AWS VPC| |Developer Name|`SD_AwVp`| |Component|No| |End User Compute/Unmetered|No| |Parent|[AWS](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-aws.md)| |Rule Name|Default rule for all Firewalls| |Identifier(s)|MAC address| ## Attributes ### DHCP options ID - **Type**: text - **Developer Name**: `SD_DhOpId` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The dhcp options id of the AWS VPC. - **Required**: Optional ### Instance tenancy - **Type**: text - **Developer Name**: `SD_InTe` - **Attribute Set**: [Instance Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-instance-details.md) - **Description**: The instance tenancy of the AWS VPC. - **Required**: Optional ### Network ACL ID - **Type**: text - **Developer Name**: `SD_NeAcId` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The network acl id of the AWS VPC. - **Required**: Optional ### VPC State - **Type**: text - **Developer Name**: `SD_VpSt` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The vpc state of the AWS VPC. - **Required**: Optional # Azure Represents an Azure configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Cloud Resource. ## Configuration Item Type Definition ||| |-|-| |Name|Azure| |Developer Name|`SD_Azuxx`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Cloud Resource](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-cloud-resource.md)| |Rule Name|Default rule for all Application Services| |Identifier(s)|Server IP Address Application Name| ## Attributes ### Resource Group - **Type**: text - **Developer Name**: `SD_ReGr` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The resource group of the Azure. - **Required**: Optional ### Subscription Id - **Type**: text - **Developer Name**: `SD_SuId` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The subscription id of the Azure. - **Required**: Optional # Azure App Service Represents an Azure App Service configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Azure. ## Configuration Item Type Definition ||| |-|-| |Name|Azure App Service| |Developer Name|`SD_AzApSe`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Azure](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-azure.md)| |Rule Name|Default rule for all Switches| |Identifier(s)|MAC address| ## Attributes ### Virtual IP Address - **Type**: text - **Developer Name**: `SD_ViIpAd1` - **Attribute Set**: [Hardware and Network](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-hardware-and-network.md) - **Description**: The virtual ip address of the Azure App Service. - **Required**: Optional # Azure Application Gateway Represents an Azure Application Gateway configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Azure. ## Configuration Item Type Definition ||| |-|-| |Name|Azure Application Gateway| |Developer Name|`SD_AzApGa`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Azure](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-azure.md)| |Rule Name|Default rule for all Access Points| |Identifier(s)|MAC address| ## Attributes No associated attributes for this configuration item type. # Azure Network Security Group Represents an Azure Network Security Group configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Azure. ## Configuration Item Type Definition ||| |-|-| |Name|Azure Network Security Group| |Developer Name|`SD_AzNeSeG`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Azure](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-azure.md)| |Rule Name|Default rule for all Network Appliances| |Identifier(s)|MAC address| ## Attributes ### Device Location - **Type**: text - **Developer Name**: `SD_DeLo` - **Attribute Set**: [Device Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-device-details.md) - **Description**: The device location of the Azure Network Security Group. - **Required**: Optional # Azure Resource Group Represents an Azure Resource Group configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Azure. ## Configuration Item Type Definition ||| |-|-| |Name|Azure Resource Group| |Developer Name|`SD_AzReGr`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Azure](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-azure.md)| |Rule Name|Default rule for all Core Switches| |Identifier(s)|MAC address| ## Attributes No associated attributes for this configuration item type. # Azure SQL Managed Instance Represents an Azure SQL Managed Instance configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Azure. ## Configuration Item Type Definition ||| |-|-| |Name|Azure SQL Managed Instance| |Developer Name|`SD_AzSqMaI`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Azure](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-azure.md)| |Rule Name|Default rule for all Subnets| |Identifier(s)|MAC address| ## Attributes ### Network Interface Name - **Type**: text - **Developer Name**: `SD_NeInNa` - **Attribute Set**: [Network Interface Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-network-interface-details.md) - **Description**: The network interface name of the Azure SQL Managed Instance. - **Required**: Required # Azure SQL Server Represents an Azure SQL Server configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Azure. ## Configuration Item Type Definition ||| |-|-| |Name|Azure SQL Server| |Developer Name|`SD_AzSqSe`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Azure](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-azure.md)| |Rule Name|Default rule for all Netapp Clusters| |Identifier(s)|MAC address| ## Attributes ### Virtual IP Address - **Type**: text - **Developer Name**: `SD_ViIpAd1` - **Attribute Set**: [Hardware and Network](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-hardware-and-network.md) - **Description**: The virtual ip address of the Azure SQL Server. - **Required**: Optional # Azure Virtual Machine Represents an Azure Virtual Machine configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Server. ## Configuration Item Type Definition ||| |-|-| |Name|Azure Virtual Machine| |Developer Name|`SD_AzViMa`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Server](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-server.md)| |Rule Name|Default rule for all Serial Servers| |Identifier(s)|MAC address| ## Attributes ### Deployment Id - **Type**: text - **Developer Name**: `SD_DeId1` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The deployment id of the Azure Virtual Machine. - **Required**: Optional ### Deployment Label - **Type**: text - **Developer Name**: `SD_DeLa` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The deployment label of the Azure Virtual Machine. - **Required**: Optional ### Deployment Name - **Type**: text - **Developer Name**: `SD_DeNa1` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The deployment name of the Azure Virtual Machine. - **Required**: Optional ### Fully Qualified Domain Names - **Type**: text - **Developer Name**: `SD_FuQuDoN` - **Attribute Set**: [Hardware and Network](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-hardware-and-network.md) - **Description**: The fully qualified domain names of the Azure Virtual Machine. - **Required**: Optional ### Health State - **Type**: text - **Developer Name**: `SD_HeSt` - **Attribute Set**: [Virtual Machine Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-virtual-machine-details.md) - **Description**: The health state of the Azure Virtual Machine. - **Required**: Optional ### Public IP Address - **Type**: text - **Developer Name**: `SD_PuIpAd` - **Attribute Set**: [Instance Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-instance-details.md) - **Description**: The public ip address of the Azure Virtual Machine. - **Required**: Optional ### Resource Group - **Type**: text - **Developer Name**: `SD_ReGr` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The resource group of the Azure Virtual Machine. - **Required**: Optional ### Subscription Id - **Type**: text - **Developer Name**: `SD_SuId` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The subscription id of the Azure Virtual Machine. - **Required**: Optional ### VM Disk Name - **Type**: text - **Developer Name**: `SD_VmDiNa` - **Attribute Set**: [VM Disk Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-vm-disk-details.md) - **Description**: The vm disk name of the Azure Virtual Machine. - **Required**: Required ### VM Disk Size - **Type**: text - **Developer Name**: `SD_VmDiSi` - **Attribute Set**: [VM Disk Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-vm-disk-details.md) - **Description**: The vm disk size of the Azure Virtual Machine. - **Required**: Optional ### VM Guest Full Name - **Type**: text - **Developer Name**: `SD_VmGuFuN` - **Attribute Set**: [Virtual Machine Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-virtual-machine-details.md) - **Description**: The vm guest full name of the Azure Virtual Machine. - **Required**: Optional # Azure Virtual Network Represents an Azure Virtual Network configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Azure. ## Configuration Item Type Definition ||| |-|-| |Name|Azure Virtual Network| |Developer Name|`SD_AzViNe`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Azure](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-azure.md)| |Rule Name|Default rule for all SAN Switches| |Identifier(s)|MAC address| ## Attributes No associated attributes for this configuration item type. # Azure VMSS Represents an Azure VMSS configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Azure. ## Configuration Item Type Definition ||| |-|-| |Name|Azure VMSS| |Developer Name|`SD_AzVm`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Azure](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-azure.md)| |Rule Name|Default rule for all NetApp| |Identifier(s)|MAC address| ## Attributes ### Type - **Type**: text - **Developer Name**: `SD_Ty` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The type of the Azure VMSS. - **Required**: Optional # Backed Up By Represents the Backed Up By relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. ## Relationship Type Definition ||| |-|-| |Developer Name|`SD_BaUpBy`| |Description|Defines the Backed Up By relationship between configuration items in the CMDB.| |Master Label|Backed Up By| |Direct Relationship|Backed Up By| |Inverse Relationship|Backing For| |Line Stroke|Solid| |Color Code|`#3366CC`| # Backward Compatibility Salesforce strives to make backward compatibility easy when using the Salesforce Console Integration Toolkit. Each new Salesforce release consists of two components: - A new release of platform software that resides on Salesforce systems - A new version of the API The Salesforce Console Integration Toolkit matches the API version for any given release. For example, if the current version of SOAP API is 68.0, then there’s also a version 68.0 of Salesforce Console Integration Toolkit. We maintain support for each Salesforce Console Integration Toolkit version across releases of the platform. The Salesforce Console Integration Toolkit is backward compatible in that an application created to work with a given Salesforce Console Integration Toolkit version will continue to work with that same Salesforce Console Integration Toolkit version in future platform releases. Salesforce doesn't guarantee that an application written against one Salesforce Console Integration Toolkit version will work with future Salesforce Console Integration Toolkit versions: Changes in method signatures and data representations are often required as we continue to enhance the Salesforce Console Integration Toolkit. However, we strive to keep the Salesforce Console Integration Toolkit consistent from version to version with minimal changes required to port applications to newer Salesforce Console Integration Toolkit versions. For example, an application written using Salesforce Console Integration Toolkit version 37.0, which shipped with the Summer ’16 release, will continue to work with Salesforce Console Integration Toolkit version 37.0 on the Winter ’17 release and on future releases. However, that same application may not work with Salesforce Console Integration Toolkit version 38.0 without modifications to the application. # Backward Compatibility Salesforce strives to make backward compatibility easy when using Open CTI. **important:** Open CTI is in maintenance mode and is scheduled for retirement in February 2028. No new features or enhancements are being added to Open CTI. Effective immediately, Open CTI is deprecated and unavailable for newly created Agentforce Service orgs. To ensure long-term compatibility and access to the latest innovations, we recommend transitioning your development efforts to Salesforce Voice. For more information, see this [Knowledge Article](https://help.salesforce.com/s/articleView?id=005306437&type=1), [learning map](https://help.salesforce.com/s/articleView?id=service.cti_migrate_map.htm), and [developer migration guide](/docs/service/api-cti/guide/migrate-cti.html). Each new Salesforce release consists of two components: - A new release of platform software that resides on Salesforce systems - A new version of the API Open CTI matches the API version for any given release. For example, if the current version of SOAP API is 66.0, then there’s also a version 66.0 of Open CTI. We maintain support for each Open CTI version across releases of the platform. Open CTI is backward compatible in that an application created to work with a given Open CTI version will continue to work with that same Open CTI version in future platform releases. Salesforce doesn't guarantee that an application written against one Open CTI version will work with future Open CTI versions: Changes in method signatures and data representations are often required as we continue to enhance Open CTI. However, we strive to keep Open CTI consistent from version to version with minimal changes required to port applications to newer Open CTI versions. For example, an application written using Open CTI version 37.0, which shipped with the Summer ’16 release, will continue to work with Open CTI version 37.0 on the Winter ’17 release and on future releases. However, that same application might not work with Open CTI version 38.0 without modifications to the application. # Base Represents a Base configuration item in the Configuration Management Database (CMDB). ## Configuration Item Type Definition ||| |-|-| |Name|Base| |Developer Name|`SD_Basxx`| |Component|No| |Parent| | |Rule Name|No identification rule is defined for this CI type.| |End User Compute/Unmetered|No| ## Attributes ### Active - **Type**: boolean - **Developer Name**: `SD_Ac1` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: Indicates whether the configuration item is active (true) or not (false). - **Required**: Optional ### Approval State - **Type**: text - **Developer Name**: `SD_ApSt` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The approval state of the Base. Possible values are `Approved`, `Awaiting Approval`, or `Rejected`. - **Required**: Optional ### Asset ID - **Type**: text - **Developer Name**: `SD_AsId` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The asset id of the Base. - **Required**: Optional ### Asset Name - **Type**: text - **Developer Name**: `SD_AsNa` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The asset name of the Base. - **Required**: Required ### Build Version - **Type**: text - **Developer Name**: `SD_BuVe` - **Attribute Set**: [Software Instance Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-software-instance-details.md) - **Description**: The build version of the Base. - **Required**: Optional ### Business Criticality - **Type**: text - **Developer Name**: `SD_BuCr` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The business criticality of the Base. Possible values are `High`, `Low`, or `Medium`. - **Required**: Optional ### CI Location - **Type**: text - **Developer Name**: `SD_CiLo` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The ci location of the Base. - **Required**: Optional ### CI Owner - **Type**: text - **Developer Name**: `SD_CiOw` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The ci owner of the Base. - **Required**: Optional ### CI Owner Group - **Type**: text - **Developer Name**: `SD_CiOwGr` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The ci owner group of the Base. - **Required**: Optional ### Company - **Type**: text - **Developer Name**: `SD_Co` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The company of the Base. - **Required**: Optional ### Condition - **Type**: text - **Developer Name**: `SD_Co2` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The condition of the Base. Possible values are `At Risk`, `Critical`, or `Normal`. - **Required**: Optional ### Contracts - **Type**: text - **Developer Name**: `SD_Co1` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The contracts of the Base. - **Required**: Optional ### Description - **Type**: text - **Developer Name**: `SD_De` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The description of the Base. - **Required**: Optional ### Display Version - **Type**: text - **Developer Name**: `SD_DiVe` - **Attribute Set**: [Software Instance Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-software-instance-details.md) - **Description**: The display version of the Base. - **Required**: Optional ### Host Name - **Type**: text - **Developer Name**: `SD_HoNa` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The host name of the Base. - **Required**: Optional ### Intune Device Id - **Type**: text - **Developer Name**: `SD_InDeId` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The intune device id of the Base. - **Required**: Optional ### IP Address - **Type**: text - **Developer Name**: `SD_IpAd` - **Attribute Set**: [Hardware and Network](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-hardware-and-network.md) - **Description**: The ip address of the Base. - **Required**: Optional ### Lifetime In Months - **Type**: int - **Developer Name**: `SD_LiInMo` - **Attribute Set**: [Life Cycle Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-life-cycle-information.md) - **Description**: The lifetime in months of the Base. - **Required**: Optional ### Local FQDN - **Type**: text - **Developer Name**: `SD_LoFq` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The local fqdn of the Base. - **Required**: Optional ### MAC Address - **Type**: text - **Developer Name**: `SD_MaAd` - **Attribute Set**: [Network Adapter Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-network-adapter-details.md) - **Description**: The mac address of the Base. - **Required**: Optional ### Recycle Date - **Type**: date - **Developer Name**: `SD_ReDa` - **Attribute Set**: [Life Cycle Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-life-cycle-information.md) - **Description**: The recycle date of the Base. - **Required**: Optional ### Serial Number - **Type**: text - **Developer Name**: `SD_SeNu` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The serial number of the Base. - **Required**: Optional ### Server Port - **Type**: text - **Developer Name**: `SD_SePo` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The server port of the Base. - **Required**: Optional ### Status - **Type**: text - **Developer Name**: `SD_St` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The status of the Base. Possible values are: - `Decommissioned` - `In Build` - `In Stock` - `In Test` - `In Use` - `Missing` - `New` - `Production` - `Retired` - **Required**: Optional ### Type - **Type**: text - **Developer Name**: `SD_Ty` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The type of the Base. - **Required**: Optional ### Uptime - **Type**: text - **Developer Name**: `SD_Up` - **Attribute Set**: [Hardware and Network](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-hardware-and-network.md) - **Description**: The uptime of the Base. - **Required**: Optional ### UsedBy (User Group) - **Type**: text - **Developer Name**: `SD_UsuGr` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The usedby (user group) of the Base. - **Required**: Optional ### UsedBy (User) - **Type**: text - **Developer Name**: `SD_Usu` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The usedby (user) of the Base. - **Required**: Optional ### UUID - **Type**: text - **Developer Name**: `SD_Uu` - **Attribute Set**: [Virtual Machine Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-virtual-machine-details.md) - **Description**: The uuid of the Base. - **Required**: Optional # Before You Begin Before you start using the SDK, learn about the latest features, supported languages, third-party dependencies, and our data collection policy. Refer to the [Messaging Glossary](https://help.salesforce.com/s/articleView?id=service.miaw_glossary.htm) to familiarize yourself with the messaging terms we use at Salesforce. ## Release Notes To learn about new features, API changes, fixes, and known issues, refer to the release notes. - [Release Notes for iOS](https://github.com/Salesforce-Async-Messaging/messaging-in-app-ios/releases) - [Release Notes for Android](https://github.com/Salesforce-Async-Messaging/messaging-in-app-android/releases) ## Shared App Data - The iOS SDK stores information in the app’s **keychain data**. If you explicitly delete this content, the SDK won’t be able to access essential information and may fail to work properly. - The Android SDK stores information in the app’s **shared preferences** and **key store**. If you explicitly delete this content, the SDK won’t be able to access essential information and may fail to work properly. ## Language Support The Enhanced In-App Chat mobile SDKs support the following languages: - Arabic: `ar` - Chinese (Simplified): `zh-Hans` (iOS), `zh` (Android) - Chinese (Traditional): `zh-Hant-TW` (iOS), `zh-rTW` (Android) - Czech: `cs` - Danish: `da` - Dutch: `nl` - English: `en` - Finnish: `fi` - French: `fr` - German: `de` - Greek: `el` - Hebrew: `he` (iOS), `iw` (Android) - Hungarian: `hu` - Indonesian: `id` (iOS), `in` (Android) - Italian: `it` - Japanese: `ja` - Korean: `ko` - Norwegian: `nb` (iOS), `no` (Android) - Polish: `pl` - Portuguese: `pt-BR` (iOS), `pt-rBR` (Android) - Romanian: `ro` - Russian: `ru` - Spanish: `es` - Swedish: `sv` - Thai: `th` - Turkish: `tr` - Ukrainian: `uk` To learn more about customizing strings in the SDK, see [Customize Strings for iOS](https://developer.salesforce.com/docs/service/messaging-in-app/guide/ios-strings.md) and [Customize Strings for Android](https://developer.salesforce.com/docs/service/messaging-in-app/guide/android-strings.md). Your Salesforce org can support the languages specified in the [Supported Languages](https://help.salesforce.com/s/articleView?id=xcloud.faq_getstart_what_languages_does.htm) document. ## Third-Party Dependencies The Enhanced In-App Chat SDKs use the following third-party libraries. ### iOS Dependencies - [Encrypted Core Data SQLite Store](https://github.com/project-imas/encrypted-core-data) - [Simple Keychain](https://github.com/auth0/SimpleKeychain) - [SQLCipher](https://github.com/sqlcipher/sqlcipher) ### Android Dependencies - [Android Material Components](https://github.com/material-components/material-components-android/releases) (`com.google.android.material:material`) - [Bumptech Glide](https://github.com/bumptech/glide) (`com.github.bumptech.glide:glide`) - [Jetbrains Kotlin Libraries](https://blog.jetbrains.com/kotlin/category/libraries/) (`org.jetbrains.kotlinx:kotlinx-coroutines-android`, `org.jetbrains.kotlin:kotlin-reflect`, `org.jetbrains.kotlin:kotlin-script-runtime`, `org.jetbrains.kotlin:kotlin-stdlib-jdk8`) - [JSON Web Token Libraries](https://github.com/jwtk/jjwt) (`io.jsonwebtoken:jjwt-api`, `io.jsonwebtoken:jjwt-impl`, `io.jsonwebtoken:jjwt-orgjson`) - [Moshi JSON Libraries](https://github.com/square/moshi) (`com.squareup.moshi:moshi-adapters`, `com.squareup.moshi:moshi-kotlin`, `com.squareup.moshi:moshi-kotlin-codegen`) - [OkHttp Libraries](https://square.github.io/okhttp/) (`com.squareup.okhttp3:logging-interceptor`, `com.squareup.okhttp3:okhttp-sse`) - [Retrofit Libraries](https://github.com/square/retrofit) (`com.squareup.retrofit2:retrofit`, `com.squareup.retrofit2:converter-moshi`, `com.squareup.retrofit2:converter-scalars`) - [Salesforce Mobile SDK Encryption](https://developer.salesforce.com/docs/atlas.en-us.mobile_sdk.meta/mobile_sdk/android_native_classes_encryptor.htm) (`com.salesforce.android:encryption`) - [Zetetic SQLCipher](https://www.zetetic.net/sqlcipher/sqlcipher-for-android/) (`net.zetetic:android-database-sqlcipher`) ## Data Collection Policy The software development kits (“SDKs”) provide access to software tools, that when embedded into a mobile application, help enable the collection and transmission of data to perform basic operations required for the service. Data collected through Enhanced Chat falls into three categories: pre-chat data, messaging data, and logging data. For more detailed information about each category, refer to these sections. ### Pre-Chat Data - **Data types collected**: - _Personal info_ such as name and email. Most pre-chat forms contain some personal info. - _Other info_. Other data collected depends on how you design your pre-chat form. - **Details**: All data specified in the pre-chat form is securely transmitted to Salesforce using HTTPS communication (TLS 1.3). Depending on how you handle pre-chat data, this data is stored in Salesforce during your service subscription, or until you take action to delete it. You can change this behavior from Salesforce. You can even remove the pre-chat form altogether. ### Message Data - **Data types collected**: - _In-app messages_. User messages get sent to reps through Salesforce. - _Photos_. Users can send photos to reps. - _Other info_. Any content a user types into a message is sent to a rep or chatbot. - **Details**: All user messages are securely transmitted to Salesforce using HTTPS communication (TLS 1.3). This data is stored in Salesforce during your service subscription, or until you take action to delete it. ### Logging Data - **Data types collected**: - _App interactions_ - _Other actions_ - **Details**: For logging purposes, we send anonymized information to Splunk servers using HTTPS communication (TLS 1.3). This data doesn't contain any customer-identifiable or hardware-identifiable information. We log info about how users interact with the SDK, and we log some basic system information while they use the SDK, such as battery stats. # Belongs To Represents the Belongs To relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. ## Relationship Type Definition ||| |-|-| |Developer Name|`SD_BeTo`| |Description|Defines the Belongs To relationship between configuration items in the CMDB.| |Master Label|Belongs To| |Direct Relationship|Belongs To| |Inverse Relationship|Belongs| |Line Stroke|Solid| |Color Code|`#32c7b5`| # Best Practices When working with Open CTI, keep the following best practices in mind. - Since many of the methods in Open CTI are asynchronous and return their results using a callback method, Salesforce recommends that you refer to the documentation for each method to understand the information for each response. - Errors generated by Open CTI are typically emitted in a way that doesn't halt JavaScript processing. We recommend that you use browser built-in developer tools to monitor the JavaScript console and to help you debug your code. - If you plan on customizing, extending, or integrating the sidebars of the Salesforce console using Visualforce, review the online help for information about console components. # blinkCustomConsoleComponentButtonText() Blinks a button’s text on an application-level custom console component that’s on a page. This method is only available in API version 25.0 or later. This method isn’t supported in Lightning Console. ## Syntax ```javascript sforce.console.blinkCustomConsoleComponentButtonText(alternateText:String, interval:number, (optional)callback:Function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`alternateText`|string|The alternate text to display when the button text blinks.| |`interval`|number|Controls how often the text blinks in milliseconds.| |`callback`|function|JavaScript method that’s called upon completion of the method.| ## Sample Code–Visualforce ```apex_page Click here to blink the button text on a custom console component ``` ## Response This method is asynchronous, so it returns its response in an object in a callback method. The response object contains the following field: |Name|Type|Description| |----|----|-----------| |`success`|boolean|`true` if blinking, the button text was successful; `false` if blinking the button text wasn't successful.| # Book Concurrent Appointments with Dummy Resource Use the concurrent scheduling feature of Salesforce Scheduler to easily schedule multiple service appointments in the same time slot. An event is created for each service appointment. Create concurrent appointments by using the dummy resource for the various time slots available for the day. **note:** A concurrent time slot can have 2 to 1,000 appointments. Here’s a high-level overview of how to build a concurrent scheduling app. ![A representation of the create concurrent scheduling flow.](https://developer.salesforce.com/media/salesforce-scheduler-dev-guide/flow_create_concurrent_scheduling.png) - **[Get Work Type Groups](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc11-get-work-type-groups.md)** A work type group represents a general appointment category or topic, such as a home loan or investment. Show your users your work type groupson the landing page of your app by retrieving the list of work type groups from your Salesforce instance. Your users can select a work type group from the list while booking appointments. - **[Get Service Territories](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc11-get-service-territories.md)** A service territory represents a branch or office location where your service resources (appointment attendees) operate from or meet customers. Show your users your available service territorieson the next page on your website by retrieving a list of active service territories from your Salesforce instance. Your users can search for service territories based on user-entered name, city, postal code, or state. Users can also view the distance between two locations, such as between a service territory and the user's current location. - **[Get Dummy Service Resource](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc11-get-appointment-candidates.md)** Show your users the dummy resource and its availability based on the selected work type group and service territory. - **[Create Service Appointments](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc11-create-service-appointment.md)** Show your users the details of a service appointment—an appointment booked through Salesforce Scheduler—so that users can review and create the appointment. # Book Service Appointments A service appointment is an appointment booked through Salesforce Scheduler. Use the `service-appointments` API to create an appointment. 1. On your website, create a page with a Create button on which you can show the appointment details for the user to review and book the appointment. 2. Link the Create button to a POST request on the [`service-appointments`](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_resources_service_appointments.htm) Connect API. **Resource URI** ```nolang https://YOUR_INSTANCE.salesforce.com/services/data/vXX.X/connect/scheduling/service-appointments ``` Where `YOUR_INSTANCE` is a variable. **For an Account User** **Sample Request** This sample calls the `service-appointments` API to create the appointment record for an account user. **note:** The `parentRecordId` field is required. Pass the account ID as `parentRecordId` in the input request body. ```nolang { "serviceAppointment": { "serviceTerritoryId": "0Hhx00000002LzGCAU", "parentRecordId": "001x0000005SEqZAAW", "schedStartTime": "2022-06-29T11:30:00.000+0000", "schedEndTime": "2022-06-29T12:30:00.000+0000", "additionalInformation": "Sharing availability use case using APIs.", "appointmentType": "Book Test Appointment1", "extendedFields": [ { "name": "status", "value": "Scheduled" } ] }, "assignedResources": [ { "serviceResourceId": "0Hnx000000007d7CAA", "isRequiredResource": "true" } ] } ``` **Sample Response** The API returns the service appointment ID and the assigned service resources. ```nolang { "result": { "assignedResourceIds": [ "03rx0000000252jAAA" ], "serviceAppointmentId": "08px000000023bdAAA" } } ``` **For a Guest User** **Sample Request** This sample calls the `service-appointments` API to create the appointment record for a guest user. **note:** The `lead` field is required. Pass the guest user details, including the first name, last name, email address, and phone number as `lead` in the input request body. ```nolang { "serviceAppointment": { "serviceTerritoryId": "0Hhx00000002LzGCAU", "schedStartTime": "2022-06-29T11:30:00.000+0000", "schedEndTime": "2022-06-29T12:30:00.000+0000", "additionalInformation": "Sharing availability use case using APIs.", "appointmentType": "Book Test Appointment1", "extendedFields": [ { "name": "status", "value": "Scheduled" } ] }, "assignedResources": [ { "serviceResourceId": "0Hnx000000007d7CAA", "isRequiredResource": "true" } ], "lead": { "email": "Test@company.com", "firstName": "FirstName", "lastName": "LastName", "company": "CompanyName" } } ``` **Sample Response** The API returns the service appointment ID and the assigned service resources. ```nolang { "result": { "assignedResourceIds": [ "03rx0000000252oAAA" ], "parentRecordId": "00Qx0000001cLwwEAE", "serviceAppointmentId": "08px000000023biAAA" } } ``` 3. If the service appointment creation is successful, then show the user a confirmation message. Here’s a sample confirmation page. ![A representation of the confirmation screen.](https://developer.salesforce.com/media/salesforce-scheduler-dev-guide/screen_appointment_creation.png) # Bring Your Own Bot for Messaging Release Notes This section describes recent changes that have been made to this guide. To see the latest feature updates for Bring Your Own Bot (BYOB), visit [Bring Your Own Bot release notes](https://help.salesforce.com/s/articleView?id=release-notes.rn_messaging_byob.htm). ## Updates for Summer ’26 - Published the Bring Your Own Bot for Messaging guide with the initial integration workflow. See [Get Started](https://developer.salesforce.com/docs/service/messaging-byob/guide/get-started.md) and [Integrate Your Bot with Service Cloud](https://developer.salesforce.com/docs/service/messaging-byob/guide/integrate-your-bot.md). - Added [Bring Your Own Bot Setup Entities](/docs/service/interaction-service-api/references/interaction-service-reference/byob-setup-entities.html) documentation, including `ExtConvParticipantIntegDef` and `ExternalConversationBotDef`. - Added BYOB sample payloads to the following Interaction Service APIs: - [Send a Message Through a Chatbot](/docs/service/interaction-service-api/references/interaction-service-reference/api-conversationEntry-post.html), including typing started and typing stopped indicators. - [Retrieve Conversation Entries](/docs/service/interaction-service-api/references/interaction-service-reference/api-conversationEntry-get.html). - [Update an AgentWork Record](/docs/service/interaction-service-api/references/interaction-service-reference/api-agentWork-patch.html) for bot Accept, Decline, and Close actions. - [Route a Conversation](/docs/service/interaction-service-api/references/interaction-service-reference/api-route.html) for BYOB Initial routing with flow and Transfer to queue scenarios. - [Register Capabilities](/docs/service/interaction-service-api/references/interaction-service-reference/api-capabilities.html) for `StaticContentMessage`, `ChoicesResponseMessage`, and `FormResponseMessage`. # Bring Your Own Bot Setup Entities The Bring Your Own Bot (BYOB) feature introduces two setup entities to integrate external bots with the Salesforce Conversation Platform. ## ExtConvParticipantIntegDef This entity describes an integration that an Independent Software Vendor (ISV) or organization provides, that allows an external system to provide conversation participants. The integration also defines an organization's access to this ISV integration, including how the ISV authenticates with Salesforce and receives events sent from Salesforce along with metadata about the ISV and the external system. | Field Label | Developer Name | Type | Description | Required | | :------------------------- | :---------------------- | :---------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------- | | Master Label | MasterLabel | text | The human-readable name to show in the UI (Inherited from the Setup Entity Template). | Yes | | Developer Name | DeveloperName | text | The developer name to use internally/in the code (Inherited from the Setup Entity Template). | Yes | | Connected App Oauth Link | ConnectedAppOauthLink | text | The OAuth link for the `ExternalClientApp` associated with the record. The ExternalClient will be used to call the Interaction Service APIs. | Yes | | Conversation Vendor Info | ConversationVendorInfo | foreignkey (ConversationVendorInfo) | Represents the vendor/partner associated with this entity. If a partner is providing a package solution, this field contains the partner's information. | No | | Custom Platform Event | CustomPlatformEvent | foreignkey (CustomEntityDefinition) | Represents the custom platform event against which the outbound events are published on the Salesforce event bus. | Yes | | Custom Event Payload Field | CustomEventPayloadField | foreignkey (CustomFieldDefinition) | Refers to the specific field within the custom platform event to be used to set the event payload. It is used to publish the payload corresponding to each event type. | Yes | | Custom Event Type Field | CustomEventTypeField | foreignkey (CustomFieldDefinition) | This refers to the specific field within the custom platform event to be used to define the event type. It serves to differentiate between various published events, such as Interaction, `RoutingRequested`, and so on. | Yes | ## ExternalConversationBotDef This entity describes a specific chatbot participant within the integration provided by `ConversationParticipantDef`. It holds details about the chatbot, such as its identifier in the external system and its display name. This chatbot can join a `Conversation` as a participant when it is requested to do so, and then it can send and receive messages or events related to that Conversation. | Field Label | Developer Name | Type | Description | Required | | :------------------------------------------------------- | :------------------------- | :-------------------------------------- | :----------------------------------------------------------------------------------------------------------------------- | :------- | | External Conversation Participant Integration Definition | ExtConvParticipantIntegDef | foreignkey (ExtConvParticipantIntegDef) | Represents the ExtConvParticipantIntegDef associated with this entity. | Yes | | External Id | ExternalId | text | Identifier to uniquely identify this bot in an external system. | Yes | | Is Active | IsActive | boolean | Identify if the bot is available to use in a conversation. If not, the conversation would be routed to a fallback queue. | Yes | | Display Name | DisplayName | text | Name of the bot to show in the agent experience UI and web client. | Yes | | Type | Type | staticenum | Type of the external bot. **Valid value**: `Chatbot`. | No | # Bring Your Own Channel for CCaaS Outbound Event Reference Partner integrations use the [Pub/Sub API](https://developer.salesforce.com/docs/platform/pub-sub-api/guide/intro.html) to subscribe to the custom platform event. There, they receive outbound messages from the rep in Salesforce and forward them to the customer. Outbound events include diverse message entries and provide supplementary information related to the conversation entry. This event reference includes essential outbound events for partners to integrate, but a full event reference is available in GitHub: [Outbound Custom Event Payloads](https://github.com/salesforce-misc/interaction-service-apis/blob/main/outbound-custom-event-payload.yaml). ## Outbound Message Event The outbound event with `"entryType": "Message"` provides outbound message content entered by the rep in Salesforce. To show outbound messages to the messaging end user, supporting this event type is required. ### Outbound Message Event Sample Payloads Salesforce supports a wide variety of payloads for format types and message types. Here are a few examples. ```json { "recipient": { "appType": "custom", "subject": "meu776", "role": "EndUser" }, "conversationIdentifier": "12831257-d663-4cdf-93f3-c92d0c80cd95", "channelAddressIdentifier": "ffb90fa9-b541-4f18-82f6-3e6d7372ffd6", "payload": { "senderDisplayName": "OrgFarm E", "identifier": "979fb89d-18f1-44b9-9cfd-384964172ab8", "entryType": "Message", "entryPayload": { "entryType": "Message", "id": "979fb89d-18f1-44b9-9cfd-384964172ab8", "abstractMessage": { "messageType": "StaticContentMessage", "inReplyToMessageId": null, "customHandlingType": null, "id": "979fb89d-18f1-44b9-9cfd-384964172ab8", "references": [], "contentCategory": null, "staticContent": { "formatType": "Text", "text": "hi" } }, "messageReason": null }, "modality": "Messaging", "sender": { "appType": "agent", "subject": "005fi700000hS5x", "role": "Agent" }, "recipients": { "secondary": null, "hidden": null, "primary": null }, "transcriptedTimestamp": 1772485941236, "clientTimestamp": 1772485940994, "clientDuration": 0 } } ``` Payloads differ based on which [capabilities you register for your integration](https://developer.salesforce.com/docs/service/interaction-service-api/references/interaction-service-reference/api-capabilities.html). ```json { "recipient": { "appType": "custom", "subject": "dena2", "role": "EndUser" }, "conversationIdentifier": "20477fe8-02f9-4422-864b-e74d870be2b3", "channelAddressIdentifier": "ffb90fa9-b541-4f18-82f6-3e6d7372ffd6", "payload": { "senderDisplayName": "OrgFarm E", "identifier": "ae136cc3-346f-495d-9bd4-33e97d853345", "entryType": "Message", "entryPayload": { "entryType": "Message", "id": "ae136cc3-346f-495d-9bd4-33e97d853345", "abstractMessage": { "messageType": "StaticContentMessage", "inReplyToMessageId": null, "customHandlingType": null, "id": "ae136cc3-346f-495d-9bd4-33e97d853345", "references": null, "contentCategory": null, "staticContent": { "formatType": "Text", "text": "dfsdf\nhttps://orgfarm-4e487d01c2.demo.test1.file.pc-rnd.force.com/sfc/dist/version/download/?oid=00Dfi700000tWsD&ids=068fi700000DRNN&d=%2Fa%2Ffi70000002BV%2FN5a6eXqKi2kIXvRkHzAaAKsIKQPHzcZR_dadj_VSDDE&asPdf=false\n" } }, "messageReason": null }, "modality": "Messaging", "sender": { "appType": "agent", "subject": "005fi700000hS5x", "role": "Agent" }, "recipients": { "secondary": null, "hidden": null, "primary": [ { "identifier": "b858ec9c-382b-347f-a3ff-b5a361042698", "displayName": "Guest", "contact": "dena2" } ] }, "transcriptedTimestamp": 1773084057462, "clientTimestamp": 1773084057163, "clientDuration": 0 } } ``` ```json { "eventType": "Interaction", "messageType": "StaticContentMessage", "channelAddressIdFieldVal": "ffb90fa9-b541-4f18-82f6-3e6d7372ffd6", "replyMessageText": null, "attachmentName": "sample_curl.txt", "attachmentUrl": "https://orgfarm-4e487d01c2.demo.test1.file.pc-rnd.force.com/sfc/dist/version/download/?oid=00Dfi700000tWsD&ids=068fi7000008RW5&d=%2Fa%2Ffi70000002Mn%2FS9k05R70uqprYFnkFH1AqHT9vNPS352MOx8zc8h157c&asPdf=false", "recipientUserName": "dena26", "payloadField": { "string": { "recipient": { "appType": "custom", "subject": "dena26", "role": "EndUser" }, "conversationIdentifier": "13806bb4-acfb-4d81-a5c2-94717212e86d", "channelAddressIdentifier": "ffb90fa9-b541-4f18-82f6-3e6d7372ffd6", "payload": { "senderDisplayName": "OrgFarm E", "identifier": "85847482-43b4-40ff-84ad-188c7f3576f7", "entryType": "Message", "entryPayload": { "entryType": "Message", "id": "85847482-43b4-40ff-84ad-188c7f3576f7", "abstractMessage": { "messageType": "StaticContentMessage", "inReplyToMessageId": null, "customHandlingType": null, "id": "85847482-43b4-40ff-84ad-188c7f3576f7", "references": [ { "recordId": "068fi7000008RW5", "id": "751aa812-63ca-4ded-9bca-7883d2e1ddae" } ], "contentCategory": null, "staticContent": { "formatType": "Attachments", "text": null, "attachments": [ { "name": "sample_curl.txt", "attachmentUploadResult": null, "id": "a586bc75-97a1-4f75-8ba7-72fd49013861", "mimeType": "text/plain", "url": "https://orgfarm-4e487d01c2.demo.test1.file.pc-rnd.force.com/sfc/dist/version/download/?oid=00Dfi700000tWsD&ids=068fi7000008RW5&d=%2Fa%2Ffi70000002Mn%2FS9k05R70uqprYFnkFH1AqHT9vNPS352MOx8zc8h157c&asPdf=false", "referenceId": "751aa812-63ca-4ded-9bca-7883d2e1ddae" } ] } }, "messageReason": null }, "modality": "Messaging", "sender": { "appType": "agent", "subject": "005fi700000hS5x", "role": "Agent" }, "recipients": { "secondary": null, "hidden": null, "primary": [ { "identifier": "15cf6a6b-fe9d-343b-afdd-776dfed3f225", "displayName": "Guest", "contact": "dena26" } ] }, "transcriptedTimestamp": 1773088413656, "clientTimestamp": 1773088413129, "clientDuration": 0 } } }, "previewImageUrl": null, "url": null, "title": null } ``` To support showing a Messaging end user when a rep starts and stops typing, see Configure Inbound Acknowledgments and Outbound Typing Indicators [for Bring Your Own Channel for CCaaS](/docs/service/messaging-byoc-ccaas/guide/inbound-acknowledgements-typing-indicators.html) or [for Bring Your Own Channel for Messaging](/docs/service/messaging-partner/guide/inbound-acknowledgements-typing-indicators.html). ```json { "eventType": "Interaction", "payload": { "recipient": { "appType": "custom", "subject": "meu776", "role": "EndUser" }, "conversationIdentifier": "12831257-d663-4cdf-93f3-c92d0c80cd95", "channelAddressIdentifier": "ffb90fa9-b541-4f18-82f6-3e6d7372ffd6", "payload": { "senderDisplayName": "OrgFarm E", "identifier": "4ae9c868-8af6-46d9-bcfa-470ce0b3d31d", "entryType": "TypingStartedIndicator", "entryPayload": { "entryType": "TypingStartedIndicator", "id": "4ae9c868-8af6-46d9-bcfa-470ce0b3d31d", "timestamp": 1772486272384 }, "modality": "Messaging", "sender": { "appType": "agent", "subject": "005fi700000hS5x", "role": "Agent" }, "recipients": { "secondary": null, "hidden": null, "primary": null }, "transcriptedTimestamp": 1772486272610, "clientTimestamp": 1772486272384, "clientDuration": 0 } } } ``` ```json { "eventType": "Interaction", "payload": { "recipient": { "appType": "custom", "subject": "meu776", "role": "EndUser" }, "conversationIdentifier": "12831257-d663-4cdf-93f3-c92d0c80cd95", "channelAddressIdentifier": "ffb90fa9-b541-4f18-82f6-3e6d7372ffd6", "payload": { "senderDisplayName": "OrgFarm E", "identifier": "a58816e7-7f9c-4cb0-bd93-fd9854826bf4", "entryType": "TypingStoppedIndicator", "entryPayload": { "entryType": "TypingStoppedIndicator", "id": "a58816e7-7f9c-4cb0-bd93-fd9854826bf4", "timestamp": 1772486274361 }, "modality": "Messaging", "sender": { "appType": "agent", "subject": "005fi700000hS5x", "role": "Agent" }, "recipients": { "secondary": null, "hidden": null, "primary": null }, "transcriptedTimestamp": 1772486274440, "clientTimestamp": 1772486274361, "clientDuration": 0 } } } ``` To support showing citations in an Agentforce Service Agent message, see Add Citations in Agent Responses for [Bring Your Own Channel for CCaaS](/docs/service/messaging-byoc-ccaas/guide/citations.html) or for [Bring Your Own Channel for Messaging](/docs/service/messaging-partner/guide/citations.html). ```json { "recipient": { "appType": "custom", "subject": "testing-asa-citation-0001", "role": "EndUser" }, "conversationIdentifier": "b2a89043-0850-4b02-b7d1-f6222b3eb963", "channelAddressIdentifier": "82f67da0-bacc-4748-8cd9-e3a2727f7202", "payload": { "senderDisplayName": "Agentforce Service Agent", "identifier": "1772659199329-REQ-1", "entryType": "Message", "entryPayload": { "entryType": "Message", "id": "1772659199329-REQ-1", "abstractMessage": { "messageType": "StaticContentMessage", "inReplyToMessageId": null, "customHandlingType": null, "id": "1772659199329-REQ-1", "references": null, "contentCategory": null, "staticContent": { "formatType": "Text", "text": "To replace your iPhone battery, you can follow step-by-step instructions available on various platforms. Here are some options: 1. DIY Replacement: You can replace the battery yourself using DIY kits. Detailed instructions and comparisons of costs, savings, and time for different models can be found on here. 2. Professional Repair Shop: You can take your iPhone to a reputable repair shop.", "citationContent": { "citations": [ { "citedReference": { "citedReferenceType": "Link", "link": { "url": "https://www.example.com/Wiki/iPhone_Battery_Replacement" }, "recordId": null, "label": "https://www.example.com/Wiki/iPhone_Battery_Replacement" }, "citedDetails": { "citedDetailsType": "InlineMetadata", "inlineMetadata": [ { "claim": { "claimStartOffset": 0, "claimEndOffset": 309 }, "citedLocationOffset": 309 } ] } }, { "citedReference": { "citedReferenceType": "Link", "link": { "url": "https://www.example.com/News/11220/3-ways-replace-iphone-battery" }, "recordId": null, "label": "https://www.example.com/News/11220/3-ways-replace-iphone-battery" }, "citedDetails": { "citedDetailsType": "InlineMetadata", "inlineMetadata": [ { "claim": { "claimStartOffset": 309, "claimEndOffset": 391 }, "citedLocationOffset": 391 } ] } } ] } } }, "messageReason": null }, "modality": "Messaging", "sender": { "appType": "chatbot", "subject": "0XxSG000000W0kr", "role": "Chatbot" }, "recipients": { "secondary": null, "hidden": null, "primary": null }, "transcriptedTimestamp": 1772659207510, "clientTimestamp": 1772659207457, "clientDuration": 0 } } ``` ## MessageUpdated Event The MessageUpdated event signals whether an asynchronous file upload was successful or not in the `attachmentUploadResult` object. While not required, we recommend that partner integrations listen for and handle this event. ### MessageUpdated Event Sample Payloads ```json { "recipient": { "appType": "custom", "subject": "dena5", "role": "EndUser" }, "conversationIdentifier": "3cbc496d-9dcd-487e-b0b2-f695db7c5b77", "channelAddressIdentifier": "ffb90fa9-b541-4f18-82f6-3e6d7372ffd6", "payload": { "senderDisplayName": "Automated Process", "identifier": "aa031a9d-f35c-4de0-bed6-417ed113ecf8", "entryType": "MessageUpdated", "entryPayload": { "entryType": "MessageUpdated", "id": "aa031a9d-f35c-4de0-bed6-417ed113ecf8", "updatedMessage": { "messageType": "StaticContentMessage", "inReplyToMessageId": "b121d04b-39c5-42c8-9f64-5ec44e1c9c43", "customHandlingType": null, "id": "b121d04b-39c5-42c8-9f64-5ec44e1c9c43", "references": [ { "recordId": "068fi700000DiMb", "id": "35f5ad29-399a-4316-b138-369714c8ce56" } ], "contentCategory": null, "staticContent": { "formatType": "Attachments", "text": "sdfsf", "attachments": [ { "name": "Screenshot 2026-02-04 at 4.06.15 PM.png", "attachmentUploadResult": { "resultType": "CompletedAttachmentUploadResult" }, "id": "b121d04b-39c5-42c8-9f64-5ec44e1c9c43", "mimeType": "image/png", "url": "/sfc/servlet.shepherd/version/renditionDownload?rendition=PNG&versionId=068fi700000DiMb&operationContext=DELIVERY&contentId=05Tfi700000XBzB&page=0", "referenceId": "35f5ad29-399a-4316-b138-369714c8ce56" } ] } } }, "modality": "Messaging", "sender": { "appType": "conversation", "subject": "005fi700000hYqX", "role": "System" }, "recipients": { "secondary": null, "hidden": null, "primary": null }, "transcriptedTimestamp": 1773161879434, "clientTimestamp": 1773161879434, "clientDuration": 0, "parentId": "" } } ``` ```json { "recipient": { "appType": "custom", "subject": "test1242311", "role": "EndUser" }, "conversationIdentifier": "045bcdd6-ede0-49f8-86bb-69878ec5ba11", "channelAddressIdentifier": "d336cedd-1c08-45ba-81bb-aed6c133a236", "payload": { "senderDisplayName": "Automated Process", "identifier": "3b6b843c-0fcd-446e-a70e-bddc20389d60", "entryType": "MessageUpdated", "entryPayload": { "entryType": "MessageUpdated", "id": "3b6b843c-0fcd-446e-a70e-bddc20389d60", "updatedMessage": { "messageType": "StaticContentMessage", "inReplyToMessageId": "76776ef1-1dc7-48e4-8e30-8ec84c85021e", "id": "76776ef1-1dc7-48e4-8e30-8ec84c85021e", "staticContent": { "formatType": "Attachments", "text": "test smaller content length ", "attachments": [ { "name": "Screenshot 2025-02-27 at 1.54.58 PM.png", "attachmentUploadResult": { "resultType": "ErrorAttachmentUploadResult", "errorMessage": "Error downloading file: 1790094797-341060 (818093790)", "errorType": "InternalServerError" }, "id": "76776ef1-1dc7-48e4-8e30-8ec84c85021e", "mimeType": "application/octet-stream", "url": "https://sdb6byo-dev-ed.develop.test1.my.pc-rnd.salesforce.com/img/conversation/spinner_120.png", "referenceId": null } ] } } }, "sender": { "appType": "conversation", "subject": "005SG000003Xsxa", "role": "System" }, "transcriptedTimestamp": 1741117720945, "clientTimestamp": 1741117720945, "clientDuration": 0 } } ``` ## ParticipantChanged Event Whenever a rep leaves or joins a conversation, a ParticipantChanged event fires. The event payload specifies whether it was a `remove` or `add` `operation`. Partners can build optional Messaging session clean up logic by consuming and handling these events. ### ParticipantChanged Event Sample Payloads ```json { "eventType": "Interaction", "payload": { "recipient": { "appType": "custom", "subject": "dena1", "role": "EndUser" }, "conversationIdentifier": "1ff84ce1-0d98-448f-8630-65eb91abae4a", "channelAddressIdentifier": "ffb90fa9-b541-4f18-82f6-3e6d7372ffd6", "payload": { "senderDisplayName": "Automated Process", "identifier": "6bd987a2-573a-442f-b62c-65adc437748f", "entryType": "ParticipantChanged", "entryPayload": { "entryType": "ParticipantChanged", "id": "6bd987a2-573a-442f-b62c-65adc437748f", "entries": [ { "operation": "remove", "menuMetadata": null, "supportedModalities": null, "participant": { "appType": "agent", "subject": "005fi700000hS5x", "role": "Agent" }, "displayName": "OrgFarm E" } ], "activeModalities": ["Messaging"] }, "modality": "Messaging", "sender": { "appType": "conversation", "subject": "005fi700000hYqX", "role": "System" }, "recipients": { "secondary": null, "hidden": null, "primary": null }, "transcriptedTimestamp": 1772491823140, "clientTimestamp": 1772491823140, "clientDuration": 0 } } } ``` ```json { "eventType": "Interaction", "payload": { "recipient": { "appType": "custom", "subject": "meu776", "role": "EndUser" }, "conversationIdentifier": "12831257-d663-4cdf-93f3-c92d0c80cd95", "channelAddressIdentifier": "ffb90fa9-b541-4f18-82f6-3e6d7372ffd6", "payload": { "senderDisplayName": "Automated Process", "identifier": "5aca071c-275d-4412-933c-2a4faf500d67", "entryType": "ParticipantChanged", "entryPayload": { "entryType": "ParticipantChanged", "id": "5aca071c-275d-4412-933c-2a4faf500d67", "entries": [ { "operation": "add", "menuMetadata": null, "supportedModalities": null, "participant": { "appType": "agent", "subject": "005fi700000hS5x", "role": "Agent" }, "displayName": "OrgFarm E" } ], "activeModalities": ["Messaging"] }, "modality": "Messaging", "sender": { "appType": "conversation", "subject": "005fi700000hYqX", "role": "System" }, "recipients": { "secondary": null, "hidden": null, "primary": null }, "transcriptedTimestamp": 1772485927971, "clientTimestamp": 1772485927971, "clientDuration": 0 } } } ``` ## RoutingRequested Event If the integration uses partner-controlled routing (`ConversationChannelDefinition.routingOwner` is `Partner`), the RoutingRequested event tracks information for transfer or conference functionality. If a rep indicates that they want to transfer a messaging session or add another rep (conference), a RoutingRequested event fires. The payload indicates whether the rep chooses to route to another rep, queue, flow, or external contact. To support transfer and conference for your integration, consuming the RoutingRequested event is required. ### RoutingRequested Event Sample Payloads ```json { "eventType": "RoutingRequested", "payload": { "channelAddressIdentifier": "ffb90fa9-b541-4f18-82f6-3e6d7372ffd6", "recipient": { "appType": "custom", "subject": "dena1", "role": "EndUser" }, "payload": { "conversationIdentifier": "1ff84ce1-0d98-448f-8630-65eb91abae4a", "routingParameters": { "queueId": null, "channelData": "{\"eventId\":\"5b909963-fca6-4597-8104-575d598d3e13\",\"routerParticipantSubject\":\"30a46511-5a5a-4b19-9320-a37a363fc43a\",\"routingType\":\"Transfer\",\"conversationId\":\"1ff84ce1-0d98-448f-8630-65eb91abae4a\"}", "isTransfer": true, "routingConfigId": null, "userId": "id2", "isFallbackOnPsrNotCreated": null, "serviceChannelId": null, "isEstimatedWaitTimeRequested": null, "skillsList": [], "botId": null, "flowId": null, "isScrt2": true, "isUserRequired": true }, "routingType": "Transfer", "workRecordId": null } } } ``` ```json { "eventType": "RoutingRequested", "payload": { "channelAddressIdentifier": "ffb90fa9-b541-4f18-82f6-3e6d7372ffd6", "recipient": { "appType": "custom", "subject": "dena1", "role": "EndUser" }, "payload": { "conversationIdentifier": "1ff84ce1-0d98-448f-8630-65eb91abae4a", "routingParameters": { "queueId": "id21", "channelData": "{\"eventId\":\"a5ab0ccf-4f3a-43b9-bc6c-e71c9a00b474\",\"routerParticipantSubject\":\"f94b9eab-1a1b-4516-97ba-dc25502c9b4a\",\"routingType\":\"Transfer\",\"conversationId\":\"1ff84ce1-0d98-448f-8630-65eb91abae4a\"}", "isTransfer": true, "routingConfigId": null, "userId": null, "isFallbackOnPsrNotCreated": null, "serviceChannelId": null, "isEstimatedWaitTimeRequested": null, "skillsList": [], "botId": null, "flowId": null, "isScrt2": true, "isUserRequired": null }, "routingType": "Transfer", "workRecordId": null } } } ``` ```json { "eventType": "RoutingRequested", "payload": { "channelAddressIdentifier": "ffb90fa9-b541-4f18-82f6-3e6d7372ffd6", "recipient": { "appType": "custom", "subject": "dena1", "role": "EndUser" }, "payload": { "conversationIdentifier": "1ff84ce1-0d98-448f-8630-65eb91abae4a", "routingParameters": { "queueId": null, "channelData": "{\"eventId\":\"057a82dd-46f6-4432-a77a-fc5558242ce6\",\"routerParticipantSubject\":\"a83b05ed-d0d3-4f9c-865e-6bd1bccc2281\",\"routingType\":\"Transfer\",\"conversationId\":\"1ff84ce1-0d98-448f-8630-65eb91abae4a\"}", "isTransfer": true, "routingConfigId": null, "userId": null, "isFallbackOnPsrNotCreated": null, "serviceChannelId": null, "isEstimatedWaitTimeRequested": null, "skillsList": [], "botId": null, "flowId": "300fi700004Y4VEAA0", "isScrt2": true, "isUserRequired": null }, "routingType": "Transfer", "workRecordId": null } } } ``` ```json { "eventType": "RoutingRequested", "payload": { "channelAddressIdentifier": "ffb90fa9-b541-4f18-82f6-3e6d7372ffd6", "recipient": { "appType": "custom", "subject": "dena1", "role": "EndUser" }, "payload": { "conversationIdentifier": "1ff84ce1-0d98-448f-8630-65eb91abae4a", "routingParameters": { "queueId": null, "channelData": "{\"eventId\":\"c0315254-ea15-44e2-9778-4b4e5b221f48\",\"routerParticipantSubject\":\"80577900-eb4c-4108-a545-74e7127fc65e\",\"routingType\":\"Transfer\",\"conversationId\":\"1ff84ce1-0d98-448f-8630-65eb91abae4a\"}", "isTransfer": true, "routingConfigId": null, "userId": "id41", "isFallbackOnPsrNotCreated": null, "serviceChannelId": null, "isEstimatedWaitTimeRequested": null, "skillsList": [], "botId": null, "flowId": null, "isScrt2": true, "isUserRequired": true }, "routingType": "Transfer", "workRecordId": null } } } ``` ## RoutingResult Event If the integration uses partner-controlled routing (`ConversationChannelDefinition.routingOwner` is `Partner`), the RoutingResult event tracks results of routing requests for transfer or conference. If a rep requests a transfer or conference, the partner system has 60 seconds to finish routing. If routing finishes within 60 seconds, partners call the [Track Routing Status of a Conversation API](/docs/service/interaction-service-api/references/interaction-service-reference/api-routingResult.html) (`POST /api/v1/routingResult`) with success or failure. If the partner system doesn‘t finish routing within 60 seconds, the routing request times out, and the RoutingResult event with error details fires. To support canceling in progress or incomplete routing for transfer and conference, consuming the RoutingResult event is required. ### Sample RoutingResult Event Payload ```json { "eventType": "Interaction", "payload": { "recipient": { "appType": "custom", "subject": "dena1", "role": "EndUser" }, "conversationIdentifier": "1ff84ce1-0d98-448f-8630-65eb91abae4a", "channelAddressIdentifier": "ffb90fa9-b541-4f18-82f6-3e6d7372ffd6", "payload": { "senderDisplayName": "Automated Process", "identifier": "9ffe8b4e-dfb7-40dd-9d4c-156d1b398d94", "entryType": "RoutingResult", "entryPayload": { "entryType": "RoutingResult", "id": "9ffe8b4e-dfb7-40dd-9d4c-156d1b398d94", "workOwnerId": null, "estimatedWaitTime": null, "initiator": null, "recordId": null, "errorMessages": ["Routing request timed out."], "pendingServiceRoutingId": null, "skipRouterCPRemovalIfNoRoutingFailures": false, "routingType": "Transfer", "failureReason": null, "failureType": "RoutingError", "isExternallyRouted": true, "cancelReason": null, "routingConfigurationDetails": null }, "modality": "Messaging", "sender": { "appType": "conversation", "subject": "005fi700000hYqX", "role": "System" }, "recipients": { "secondary": null, "hidden": null, "primary": null }, "transcriptedTimestamp": 1772490220184, "clientTimestamp": 1772490219768, "clientDuration": 0 } } } ``` ## See Also - _GitHub_: [Outbound Custom Event Payloads](https://github.com/salesforce-misc/interaction-service-apis/blob/main/outbound-custom-event-payload.yaml) # Bring Your Own Channel for CCaaS Release Notes This section describes recent changes that have been made to this guide. To see the latest feature updates for Bring Your Own Channel for CCaaS, visit [Bring Your Own Channel release notes](https://help.salesforce.com/s/articleView?id=release-notes.rn_messaging_byoc.htm). ## Updates for Winter ’27 - Updated transfer destination terminology from **Others** to **External contacts** and from **Agent** to **Rep**. - Added instructions to [Create Developer Hub and Namespace Orgs](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/namespace.md) as part of the process to create a managed package. ## Updates for Summer ’26 - Updated references to Salesforce Voice with Partner Telephony (formerly Service Cloud Voice with Partner Telephony) to align with the recent product name change. - Added content for [Citations in Agent Responses](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/citations.md). ## Updates for Spring ’26 - Updated `Create the Interaction Service Connected App` and renamed it to [Create the Interaction Service OAuth App](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/create-connected-app.md) to recommend creating an external client app instead of a connected app. - Added content for [Create a managed package](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/create-managed-package.md) to provide more information on second generation managed packages, which are now recommended. - Updated content to remove references to `IsInboundReceiptsEnabled`, `IsRoutingWorkResultEnabled`, and `IsTypingIndicatorDisabled` fields in ConversationChannelDefinition. These fields are removed in API version 66.0. ## Updates for Winter ’26 - Added [Send and Receive Richly Formatted Messages with Markdown](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/markdown.md). - Updated content to acknowledge deprecation of `IsInboundReceiptsEnabled`, `IsRoutingWorkResultEnabled`, and `IsTypingIndicatorDisabled` fields in ConversationChannelDefinition for API version 65.0. The fields will be removed in API version 66.0. - Updated [Add Support for Custom Parameters](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/add-custom-objects.md) to clarify the maximum length for the value of `routingAttributes` key/value pair. - Added instructions for [proactively starting a Messaging session with Agentforce Service Agent](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/create-agentforce-service-agent.md#proactively-start-a-messaging-session-with-agentforce-service-agent). - Added [Configure Agentforce Service Agent Progress Indicators](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/progress-indicators.md). ## Updates for Summer ’25 - Added content for [Adding Multiple Participants to a Messaging Conference](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/conference.md). - For [Dynamically Controlling Messaging Actions](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/control-messaging-actions.md), added the option to enable or disable conferencing. - Updated [Create the Interaction Service Connected App](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/create-connected-app.md) to clarify a new location in Setup for creating a connected app. - Updated [Test the Interaction Service APIs](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/test-apis.md) to point to the Interaction Service API guide for instructions and reference information. ## Updates for Spring ’25 - Added content for [Enabling Third-Party Bots](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/third-party-bots.md) to clarify how to identify the bot in transcripts and to note updates for how to call the Conversation History API. - Added topics in the [Transfer Messages](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/transfer-messages.md) section to provide more guidance for CCaaS partners. - For [Create the Interaction Service Connected App](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/create-connected-app.md), removed instruction to **Select Issue JSON Web Token (JWT)-based access tokens for named users**. Connected apps should not use this setting. - Added content for [Configuring Inbound Acknowledgements and Outbound Typing Indicators](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/inbound-acknowledgements-typing-indicators.md). - Added content for [Dynamically Controlling Messaging Actions](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/control-messaging-actions.md). - Added content for [Sending URLs with Link Previews](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/link-previews.md). ## Updates for Winter ’25 - Released the General Availability version of Bring Your Own Channel for CCaaS (BYOC for CCaaS). To learn more about Bring Your Own Channel for CCaaS, visit our [learning map](https://help.salesforce.com/s/articleView?id=service.byoc_byoccaas_intro.htm) in Salesforce Help. - Renamed the Bring Your Own Channel for CCaaS demo connector and made it publicly available. Access the demo connector code at [https://github.com/salesforce-misc/byo-demo-connector](https://github.com/salesforce-misc/byo-demo-connector). # Bring Your Own Channel For Messaging Outbound Event Reference Partner integrations use the [Pub/Sub API](https://developer.salesforce.com/docs/platform/pub-sub-api/guide/intro.html) to subscribe to the custom platform event. There, they receive outbound messages from the rep in Salesforce and forward them to the customer. Outbound events include diverse message entries and provide supplementary information related to the conversation entry. This event reference includes essential outbound events for partners to integrate, but a full event reference is available in GitHub: [Outbound Custom Event Payloads](https://github.com/salesforce-misc/interaction-service-apis/blob/main/outbound-custom-event-payload.yaml). ## Outbound Message Event The outbound event with `"entryType": "Message"` provides outbound message content entered by the rep in Salesforce. To show outbound messages to the messaging end user, supporting this event type is required. ### Outbound Message Event Sample Payloads Salesforce supports a wide variety of payloads for format types and message types. Here are a few examples. ```json { "recipient": { "appType": "custom", "subject": "meu776", "role": "EndUser" }, "conversationIdentifier": "12831257-d663-4cdf-93f3-c92d0c80cd95", "channelAddressIdentifier": "ffb90fa9-b541-4f18-82f6-3e6d7372ffd6", "payload": { "senderDisplayName": "OrgFarm E", "identifier": "979fb89d-18f1-44b9-9cfd-384964172ab8", "entryType": "Message", "entryPayload": { "entryType": "Message", "id": "979fb89d-18f1-44b9-9cfd-384964172ab8", "abstractMessage": { "messageType": "StaticContentMessage", "inReplyToMessageId": null, "customHandlingType": null, "id": "979fb89d-18f1-44b9-9cfd-384964172ab8", "references": [], "contentCategory": null, "staticContent": { "formatType": "Text", "text": "hi" } }, "messageReason": null }, "modality": "Messaging", "sender": { "appType": "agent", "subject": "005fi700000hS5x", "role": "Agent" }, "recipients": { "secondary": null, "hidden": null, "primary": null }, "transcriptedTimestamp": 1772485941236, "clientTimestamp": 1772485940994, "clientDuration": 0 } } ``` Payloads differ based on which [capabilities you register for your integration](https://developer.salesforce.com/docs/service/interaction-service-api/references/interaction-service-reference/api-capabilities.html). ```json { "recipient": { "appType": "custom", "subject": "dena2", "role": "EndUser" }, "conversationIdentifier": "20477fe8-02f9-4422-864b-e74d870be2b3", "channelAddressIdentifier": "ffb90fa9-b541-4f18-82f6-3e6d7372ffd6", "payload": { "senderDisplayName": "OrgFarm E", "identifier": "ae136cc3-346f-495d-9bd4-33e97d853345", "entryType": "Message", "entryPayload": { "entryType": "Message", "id": "ae136cc3-346f-495d-9bd4-33e97d853345", "abstractMessage": { "messageType": "StaticContentMessage", "inReplyToMessageId": null, "customHandlingType": null, "id": "ae136cc3-346f-495d-9bd4-33e97d853345", "references": null, "contentCategory": null, "staticContent": { "formatType": "Text", "text": "dfsdf\nhttps://orgfarm-4e487d01c2.demo.test1.file.pc-rnd.force.com/sfc/dist/version/download/?oid=00Dfi700000tWsD&ids=068fi700000DRNN&d=%2Fa%2Ffi70000002BV%2FN5a6eXqKi2kIXvRkHzAaAKsIKQPHzcZR_dadj_VSDDE&asPdf=false\n" } }, "messageReason": null }, "modality": "Messaging", "sender": { "appType": "agent", "subject": "005fi700000hS5x", "role": "Agent" }, "recipients": { "secondary": null, "hidden": null, "primary": [ { "identifier": "b858ec9c-382b-347f-a3ff-b5a361042698", "displayName": "Guest", "contact": "dena2" } ] }, "transcriptedTimestamp": 1773084057462, "clientTimestamp": 1773084057163, "clientDuration": 0 } } ``` ```json { "eventType": "Interaction", "messageType": "StaticContentMessage", "channelAddressIdFieldVal": "ffb90fa9-b541-4f18-82f6-3e6d7372ffd6", "replyMessageText": null, "attachmentName": "sample_curl.txt", "attachmentUrl": "https://orgfarm-4e487d01c2.demo.test1.file.pc-rnd.force.com/sfc/dist/version/download/?oid=00Dfi700000tWsD&ids=068fi7000008RW5&d=%2Fa%2Ffi70000002Mn%2FS9k05R70uqprYFnkFH1AqHT9vNPS352MOx8zc8h157c&asPdf=false", "recipientUserName": "dena26", "payloadField": { "string": { "recipient": { "appType": "custom", "subject": "dena26", "role": "EndUser" }, "conversationIdentifier": "13806bb4-acfb-4d81-a5c2-94717212e86d", "channelAddressIdentifier": "ffb90fa9-b541-4f18-82f6-3e6d7372ffd6", "payload": { "senderDisplayName": "OrgFarm E", "identifier": "85847482-43b4-40ff-84ad-188c7f3576f7", "entryType": "Message", "entryPayload": { "entryType": "Message", "id": "85847482-43b4-40ff-84ad-188c7f3576f7", "abstractMessage": { "messageType": "StaticContentMessage", "inReplyToMessageId": null, "customHandlingType": null, "id": "85847482-43b4-40ff-84ad-188c7f3576f7", "references": [ { "recordId": "068fi7000008RW5", "id": "751aa812-63ca-4ded-9bca-7883d2e1ddae" } ], "contentCategory": null, "staticContent": { "formatType": "Attachments", "text": null, "attachments": [ { "name": "sample_curl.txt", "attachmentUploadResult": null, "id": "a586bc75-97a1-4f75-8ba7-72fd49013861", "mimeType": "text/plain", "url": "https://orgfarm-4e487d01c2.demo.test1.file.pc-rnd.force.com/sfc/dist/version/download/?oid=00Dfi700000tWsD&ids=068fi7000008RW5&d=%2Fa%2Ffi70000002Mn%2FS9k05R70uqprYFnkFH1AqHT9vNPS352MOx8zc8h157c&asPdf=false", "referenceId": "751aa812-63ca-4ded-9bca-7883d2e1ddae" } ] } }, "messageReason": null }, "modality": "Messaging", "sender": { "appType": "agent", "subject": "005fi700000hS5x", "role": "Agent" }, "recipients": { "secondary": null, "hidden": null, "primary": [ { "identifier": "15cf6a6b-fe9d-343b-afdd-776dfed3f225", "displayName": "Guest", "contact": "dena26" } ] }, "transcriptedTimestamp": 1773088413656, "clientTimestamp": 1773088413129, "clientDuration": 0 } } }, "previewImageUrl": null, "url": null, "title": null } ``` To support showing a Messaging end user when a rep starts and stops typing, see Configure Inbound Acknowledgments and Outbound Typing Indicators [for Bring Your Own Channel for CCaaS](/docs/service/messaging-byoc-ccaas/guide/inbound-acknowledgements-typing-indicators.html) or [for Bring Your Own Channel for Messaging](/docs/service/messaging-partner/guide/inbound-acknowledgements-typing-indicators.html). ```json { "eventType": "Interaction", "payload": { "recipient": { "appType": "custom", "subject": "meu776", "role": "EndUser" }, "conversationIdentifier": "12831257-d663-4cdf-93f3-c92d0c80cd95", "channelAddressIdentifier": "ffb90fa9-b541-4f18-82f6-3e6d7372ffd6", "payload": { "senderDisplayName": "OrgFarm E", "identifier": "4ae9c868-8af6-46d9-bcfa-470ce0b3d31d", "entryType": "TypingStartedIndicator", "entryPayload": { "entryType": "TypingStartedIndicator", "id": "4ae9c868-8af6-46d9-bcfa-470ce0b3d31d", "timestamp": 1772486272384 }, "modality": "Messaging", "sender": { "appType": "agent", "subject": "005fi700000hS5x", "role": "Agent" }, "recipients": { "secondary": null, "hidden": null, "primary": null }, "transcriptedTimestamp": 1772486272610, "clientTimestamp": 1772486272384, "clientDuration": 0 } } } ``` ```json { "eventType": "Interaction", "payload": { "recipient": { "appType": "custom", "subject": "meu776", "role": "EndUser" }, "conversationIdentifier": "12831257-d663-4cdf-93f3-c92d0c80cd95", "channelAddressIdentifier": "ffb90fa9-b541-4f18-82f6-3e6d7372ffd6", "payload": { "senderDisplayName": "OrgFarm E", "identifier": "a58816e7-7f9c-4cb0-bd93-fd9854826bf4", "entryType": "TypingStoppedIndicator", "entryPayload": { "entryType": "TypingStoppedIndicator", "id": "a58816e7-7f9c-4cb0-bd93-fd9854826bf4", "timestamp": 1772486274361 }, "modality": "Messaging", "sender": { "appType": "agent", "subject": "005fi700000hS5x", "role": "Agent" }, "recipients": { "secondary": null, "hidden": null, "primary": null }, "transcriptedTimestamp": 1772486274440, "clientTimestamp": 1772486274361, "clientDuration": 0 } } } ``` To support showing citations in an Agentforce Service Agent message, see Add Citations in Agent Responses for [Bring Your Own Channel for CCaaS](/docs/service/messaging-byoc-ccaas/guide/citations.html) or for [Bring Your Own Channel for Messaging](/docs/service/messaging-partner/guide/citations.html). ```json { "recipient": { "appType": "custom", "subject": "testing-asa-citation-0001", "role": "EndUser" }, "conversationIdentifier": "b2a89043-0850-4b02-b7d1-f6222b3eb963", "channelAddressIdentifier": "82f67da0-bacc-4748-8cd9-e3a2727f7202", "payload": { "senderDisplayName": "Agentforce Service Agent", "identifier": "1772659199329-REQ-1", "entryType": "Message", "entryPayload": { "entryType": "Message", "id": "1772659199329-REQ-1", "abstractMessage": { "messageType": "StaticContentMessage", "inReplyToMessageId": null, "customHandlingType": null, "id": "1772659199329-REQ-1", "references": null, "contentCategory": null, "staticContent": { "formatType": "Text", "text": "To replace your iPhone battery, you can follow step-by-step instructions available on various platforms. Here are some options: 1. DIY Replacement: You can replace the battery yourself using DIY kits. Detailed instructions and comparisons of costs, savings, and time for different models can be found on here. 2. Professional Repair Shop: You can take your iPhone to a reputable repair shop.", "citationContent": { "citations": [ { "citedReference": { "citedReferenceType": "Link", "link": { "url": "https://www.example.com/Wiki/iPhone_Battery_Replacement" }, "recordId": null, "label": "https://www.example.com/Wiki/iPhone_Battery_Replacement" }, "citedDetails": { "citedDetailsType": "InlineMetadata", "inlineMetadata": [ { "claim": { "claimStartOffset": 0, "claimEndOffset": 309 }, "citedLocationOffset": 309 } ] } }, { "citedReference": { "citedReferenceType": "Link", "link": { "url": "https://www.example.com/News/11220/3-ways-replace-iphone-battery" }, "recordId": null, "label": "https://www.example.com/News/11220/3-ways-replace-iphone-battery" }, "citedDetails": { "citedDetailsType": "InlineMetadata", "inlineMetadata": [ { "claim": { "claimStartOffset": 309, "claimEndOffset": 391 }, "citedLocationOffset": 391 } ] } } ] } } }, "messageReason": null }, "modality": "Messaging", "sender": { "appType": "chatbot", "subject": "0XxSG000000W0kr", "role": "Chatbot" }, "recipients": { "secondary": null, "hidden": null, "primary": null }, "transcriptedTimestamp": 1772659207510, "clientTimestamp": 1772659207457, "clientDuration": 0 } } ``` ## MessageUpdated Event The MessageUpdated event signals whether an asynchronous file upload was successful or not in the `attachmentUploadResult` object. While not required, we recommend that partner integrations listen for and handle this event. ### MessageUpdated Event Sample Payloads ```json { "recipient": { "appType": "custom", "subject": "dena5", "role": "EndUser" }, "conversationIdentifier": "3cbc496d-9dcd-487e-b0b2-f695db7c5b77", "channelAddressIdentifier": "ffb90fa9-b541-4f18-82f6-3e6d7372ffd6", "payload": { "senderDisplayName": "Automated Process", "identifier": "aa031a9d-f35c-4de0-bed6-417ed113ecf8", "entryType": "MessageUpdated", "entryPayload": { "entryType": "MessageUpdated", "id": "aa031a9d-f35c-4de0-bed6-417ed113ecf8", "updatedMessage": { "messageType": "StaticContentMessage", "inReplyToMessageId": "b121d04b-39c5-42c8-9f64-5ec44e1c9c43", "customHandlingType": null, "id": "b121d04b-39c5-42c8-9f64-5ec44e1c9c43", "references": [ { "recordId": "068fi700000DiMb", "id": "35f5ad29-399a-4316-b138-369714c8ce56" } ], "contentCategory": null, "staticContent": { "formatType": "Attachments", "text": "sdfsf", "attachments": [ { "name": "Screenshot 2026-02-04 at 4.06.15 PM.png", "attachmentUploadResult": { "resultType": "CompletedAttachmentUploadResult" }, "id": "b121d04b-39c5-42c8-9f64-5ec44e1c9c43", "mimeType": "image/png", "url": "/sfc/servlet.shepherd/version/renditionDownload?rendition=PNG&versionId=068fi700000DiMb&operationContext=DELIVERY&contentId=05Tfi700000XBzB&page=0", "referenceId": "35f5ad29-399a-4316-b138-369714c8ce56" } ] } } }, "modality": "Messaging", "sender": { "appType": "conversation", "subject": "005fi700000hYqX", "role": "System" }, "recipients": { "secondary": null, "hidden": null, "primary": null }, "transcriptedTimestamp": 1773161879434, "clientTimestamp": 1773161879434, "clientDuration": 0, "parentId": "" } } ``` ```json { "recipient": { "appType": "custom", "subject": "test1242311", "role": "EndUser" }, "conversationIdentifier": "045bcdd6-ede0-49f8-86bb-69878ec5ba11", "channelAddressIdentifier": "d336cedd-1c08-45ba-81bb-aed6c133a236", "payload": { "senderDisplayName": "Automated Process", "identifier": "3b6b843c-0fcd-446e-a70e-bddc20389d60", "entryType": "MessageUpdated", "entryPayload": { "entryType": "MessageUpdated", "id": "3b6b843c-0fcd-446e-a70e-bddc20389d60", "updatedMessage": { "messageType": "StaticContentMessage", "inReplyToMessageId": "76776ef1-1dc7-48e4-8e30-8ec84c85021e", "id": "76776ef1-1dc7-48e4-8e30-8ec84c85021e", "staticContent": { "formatType": "Attachments", "text": "test smaller content length ", "attachments": [ { "name": "Screenshot 2025-02-27 at 1.54.58 PM.png", "attachmentUploadResult": { "resultType": "ErrorAttachmentUploadResult", "errorMessage": "Error downloading file: 1790094797-341060 (818093790)", "errorType": "InternalServerError" }, "id": "76776ef1-1dc7-48e4-8e30-8ec84c85021e", "mimeType": "application/octet-stream", "url": "https://sdb6byo-dev-ed.develop.test1.my.pc-rnd.salesforce.com/img/conversation/spinner_120.png", "referenceId": null } ] } } }, "sender": { "appType": "conversation", "subject": "005SG000003Xsxa", "role": "System" }, "transcriptedTimestamp": 1741117720945, "clientTimestamp": 1741117720945, "clientDuration": 0 } } ``` ## ParticipantChanged Event Whenever a rep leaves or joins a conversation, a ParticipantChanged event fires. The event payload specifies whether it was a `remove` or `add` `operation`. Partners can build optional Messaging session clean up logic by consuming and handling these events. ### ParticipantChanged Event Sample Payloads ```json { "eventType": "Interaction", "payload": { "recipient": { "appType": "custom", "subject": "dena1", "role": "EndUser" }, "conversationIdentifier": "1ff84ce1-0d98-448f-8630-65eb91abae4a", "channelAddressIdentifier": "ffb90fa9-b541-4f18-82f6-3e6d7372ffd6", "payload": { "senderDisplayName": "Automated Process", "identifier": "6bd987a2-573a-442f-b62c-65adc437748f", "entryType": "ParticipantChanged", "entryPayload": { "entryType": "ParticipantChanged", "id": "6bd987a2-573a-442f-b62c-65adc437748f", "entries": [ { "operation": "remove", "menuMetadata": null, "supportedModalities": null, "participant": { "appType": "agent", "subject": "005fi700000hS5x", "role": "Agent" }, "displayName": "OrgFarm E" } ], "activeModalities": ["Messaging"] }, "modality": "Messaging", "sender": { "appType": "conversation", "subject": "005fi700000hYqX", "role": "System" }, "recipients": { "secondary": null, "hidden": null, "primary": null }, "transcriptedTimestamp": 1772491823140, "clientTimestamp": 1772491823140, "clientDuration": 0 } } } ``` ```json { "eventType": "Interaction", "payload": { "recipient": { "appType": "custom", "subject": "meu776", "role": "EndUser" }, "conversationIdentifier": "12831257-d663-4cdf-93f3-c92d0c80cd95", "channelAddressIdentifier": "ffb90fa9-b541-4f18-82f6-3e6d7372ffd6", "payload": { "senderDisplayName": "Automated Process", "identifier": "5aca071c-275d-4412-933c-2a4faf500d67", "entryType": "ParticipantChanged", "entryPayload": { "entryType": "ParticipantChanged", "id": "5aca071c-275d-4412-933c-2a4faf500d67", "entries": [ { "operation": "add", "menuMetadata": null, "supportedModalities": null, "participant": { "appType": "agent", "subject": "005fi700000hS5x", "role": "Agent" }, "displayName": "OrgFarm E" } ], "activeModalities": ["Messaging"] }, "modality": "Messaging", "sender": { "appType": "conversation", "subject": "005fi700000hYqX", "role": "System" }, "recipients": { "secondary": null, "hidden": null, "primary": null }, "transcriptedTimestamp": 1772485927971, "clientTimestamp": 1772485927971, "clientDuration": 0 } } } ``` ## See Also _GitHub_: [Outbound Custom Event Payloads](https://github.com/salesforce-misc/interaction-service-apis/blob/main/outbound-custom-event-payload.yaml) # Bring Your Own Channel for Messaging Release Notes This section describes recent changes that have been made to this guide. To see the latest feature updates for Bring Your Own Channel for Messaging, visit [Bring Your Own Channel release notes](https://help.salesforce.com/s/articleView?id=release-notes.rn_messaging_byoc.htm). ## Updates for Winter ’27 - Added instructions to [Create Developer Hub and Namespace Orgs](/docs/service/messaging-partner/guide/namespace.html) as part of the process to create a managed package. ## Updates for Summer ’26 - Added content for [Citations in Agent Responses](/docs/service/messaging-partner/guide/citations.html). ## Updates for Spring ’26 - Updated `Create the Interaction Service Connected App` and renamed it to [Create the Interaction Service OAuth App](https://developer.salesforce.com/docs/service/messaging-partner/guide/create-connected-app.md) to recommend creating an external client app instead of a connected app. - Added content for [Create a managed package](https://developer.salesforce.com/docs/service/messaging-partner/guide/create-managed-package.md) to provide more information on second generation managed packages, which are now recommended. - Updated content to remove references to `IsInboundReceiptsEnabled`, `IsRoutingWorkResultEnabled`, and `IsTypingIndicatorDisabled` fields in ConversationChannelDefinition. These fields are removed in API version 66.0. ## Updates for Winter ’26 - Added [Send and Receive Richly Formatted Messages with Markdown](https://developer.salesforce.com/docs/service/messaging-partner/guide/markdown.md). - Updated content to acknowledge deprecation of `IsInboundReceiptsEnabled`, `IsRoutingWorkResultEnabled`, and `IsTypingIndicatorDisabled` fields in ConversationChannelDefinition for API version 65.0. The fields will be removed in API version 66.0. - Updated [Add Support for Custom Parameters](https://developer.salesforce.com/docs/service/messaging-partner/guide/add-custom-objects.md) to clarify the maximum length for the value of `routingAttributes` key/value pair. - Added instructions for [proactively starting a Messaging session with Agentforce Service Agent](https://developer.salesforce.com/docs/service/messaging-partner/guide/create-agentforce-service-agent.md#proactively-start-a-messaging-session-with-agentforce-service-agent). - Added [Configure Agentforce Service Agent Progress Indicators](https://developer.salesforce.com/docs/service/messaging-partner/guide/progress-indicators.md). ## Updates for Summer ’25 - Added content for [Adding Multiple Participants to a Messaging Conference](https://developer.salesforce.com/docs/service/messaging-partner/guide/conference.md). - Updated [Create the Interaction Service Connected App](https://developer.salesforce.com/docs/service/messaging-partner/guide/create-connected-app.md) to clarify a new location in Setup for creating a connected app. - Updated [Test the Interaction Service APIs](https://developer.salesforce.com/docs/service/messaging-partner/guide/test-apis.md) to point to the Interaction Service API guide for instructions and reference information. ## Updates for Spring ’25 - Moved the Bring Your Own Channel for Messaging demo connector from the [https://github.com/salesforce-misc/byoc-ott-demo-app](https://github.com/salesforce-misc/byoc-ott-demo-app) repository to the [https://github.com/salesforce-misc/byo-demo-connector](https://github.com/salesforce-misc/byo-demo-connector) repository. - For [Create the Interaction Service Connected App](https://developer.salesforce.com/docs/service/messaging-partner/guide/create-connected-app.md), removed instruction to **Select Issue JSON Web Token (JWT)-based access tokens for named users**. Connected apps should not use this setting. - Renamed Bring Your Own Channel to Bring Your Own Channel for Messaging to help distinguish it from Bring Your Own Channel for CCaaS. - Added content for [Configuring Inbound Acknowledgements and Outbound Typing Indicators](https://developer.salesforce.com/docs/service/messaging-partner/guide/inbound-acknowledgements-typing-indicators.md). - Added content for [Sending URLs with Link Previews](https://developer.salesforce.com/docs/service/messaging-partner/guide/link-previews.md). ## Updates for Winter ’25 - Added format types to support for more messaging component formats, such as quick replies, buttons, list selectors, forms, time selectors, and carousels. - Added the `/acknowledgement` API to track the status of outbound messages in Messaging channels that use delivery acknowledgments and read receipts. - Added the ability for Salesforce admins to create and manage their own custom OAuth connected apps for Bring Your Own Channel Messaging channels. By default, the Messaging partner creates and manages the connected app for the Interaction Service integration and includes it in a managed package. If your partner messaging system architecture requires admins to create and manage the connected app during the Bring Your Own Channel for Messaging setup, follow the instructions in [Salesforce Help](https://help.salesforce.com/s/articleView?id=service.partner_messaging_install.htm). ## Updates for Summer ’24 - Released the General Availability version of Bring Your Own Channel (BYOC). To learn more about Bring Your Own Channel, visit our [learning map](https://help.salesforce.com/s/articleView?id=service.byoc_byoccaas_intro.htm) in Salesforce Help. # Bring Your Own UI Define your own unique UI while still leveraging the preconfigured chat feed business logic that you get with the UI SDK. To make simple changes to the existing default UI, see [Customize the Default UI](https://developer.salesforce.com/docs/service/messaging-in-app/guide/android-customize.md). To use your own UI and business logic, see [Build a Core SDK App For Android](https://developer.salesforce.com/docs/service/messaging-in-app/guide/android-core-sdk.md). This article applies to the following implementations: | UI SDK | Core SDK | | :----: | :------: | | ✅ | | **important:** This feature requires version 1.7.0 or later of the Enhanced In-App Chat SDK. # Bring Your Own UI Use your own unique UI while still leveraging the preconfigured chat feed business logic that you get with the UI SDK. To make simple changes to the existing default UI, see [Customize the Default UI](https://developer.salesforce.com/docs/service/messaging-in-app/guide/ios-customize.md). To use your own UI and business logic, see [Build a Core SDK App For iOS](https://developer.salesforce.com/docs/service/messaging-in-app/guide/ios-core-sdk.md). This article applies to the following implementations: | UI SDK | Core SDK | | :----: | :------: | | ✅ | | **important:** This feature requires version 1.7.0 or later of the Enhanced In-App Chat SDK. # Build a Core SDK App for Android The Core SDK allows you to call all the necessary In-App Messaging APIs directly from your app. With the Core SDK, you’re in full control over the entire user experience—you tell the API when to send a message and the API tells you when a message is received. This article applies to the following implementations: | UI SDK | Core SDK | | :----: | :------: | | | ✅ | If you want to use our ready-made user interface and user experience, use the [UI SDK](https://developer.salesforce.com/docs/service/messaging-in-app/guide/android-ui-sdk.md) instead. **important:** Use the Core SDK with the Kotlin programming language since this SDK was designed to use [Kotlin flows](https://developer.android.com/kotlin/flow). We don't recommend that you access the Core SDK using Java code. ## Create a Configuration Create a [`CoreConfiguration`](https://salesforce-async-messaging.github.io/messaging-in-app-android/sdk/core/com.salesforce.android.smi.core/-core-configuration/index.html) object using the config file that you previously downloaded from your org, or you can manually add the values from within this config file. ### OPTION 1: Configure Using the Config File Once you've added the `config.json` file to your project, you can reference it from the code. ```kotlin val config = CoreConfiguration.fromFile(myContext,"configFile.json") ``` **note:** To learn how to download the config file from your org, see [Configure an Enhanced In-App Chat Deployment](https://help.salesforce.com/s/articleView?id=service.miaw_deployment_mobile.htm) in Salesforce Help. This file contains the Service API URL, the org ID, and the API name for the deployment. For example: ``` { "OrganizationId": "00ZZZ0000000Zzz", "DeveloperName": "MyMessagingForInAppDeployment", "Url": "https://zzzz.my.api.url.salesforce-scrt.com" } ``` ### OPTION 2: Configure Manually with Config Info If you don't want to use the `config.json` file in your project, you can configure the SDK manually using the Service API URL, the org ID, and the API name for the deployment. ```kotlin val url = URL("URL_TO_MY_SERVICE_API") val config = CoreConfiguration(url, "ORG_ID", "API_NAME_OF_DEPLOYMENT") ``` ## Get the Core Client Object Get the [`CoreClient`](https://salesforce-async-messaging.github.io/messaging-in-app-android/sdk/core/com.salesforce.android.smi.core/-core-client/index.html) from the [`CoreClientFactory`](https://salesforce-async-messaging.github.io/messaging-in-app-android/sdk/core/com.salesforce.android.smi.core/-core-client-factory/index.html?query=interface%20CoreClientFactory) using the configuration object. ```kotlin ​​val coreClient = CoreClient.Factory.create(myContext, config) ``` ## Start the Core Instance Start the core instance using the correct scope. To learn more about scopes, see [Coroutines](https://developer.android.com/kotlin/coroutines) and [Kotlin flows](https://developer.android.com/kotlin/flow) in the Android documentation. ```kotlin // Example of some coroutine code to get the scope. // See Android documentation for more info. private val supervisorJob = SupervisorJob() private val scope = CoroutineScope(Dispatchers.Main + supervisorJob) // Start listening for events using the correct scope coreClient.start(scope) ``` ## Create a Conversation Client Create a [`ConversationClient`](https://salesforce-async-messaging.github.io/messaging-in-app-android/sdk/core/com.salesforce.android.smi.core/-conversation-client/index.html) from the [`CoreClient`](https://salesforce-async-messaging.github.io/messaging-in-app-android/sdk/core/com.salesforce.android.smi.core/-core-client/index.html) object. **tip:** This example creates a random UUID for the conversation ID. However, if you want this conversation to persist even after the app is restarted, be sure to use the same conversation ID. Also, if you want to see this same conversation across multiple devices, in addition to using the same conversation ID, turn on user verification, which is described in the _Enhance the Experience_ section. **note:** Don't use user IDs or other IDs as the `ConversationID`. Conversation IDs establish a permanent link with a user and are only available to the user who created it. Using a different existing ID instead of a unique ID can result in access issues or errors while developing or testing your Enhanced Chat integration. To pass existing IDs required for your flow, [use the Pre-chat feature](https://help.salesforce.com/s/articleView?id=service.miaw_custom_prechat_2.htm). ```kotlin val uuid = UUID.randomUUID() val conversationClient = coreClient.conversationClient(uuid) ``` ## Handle a Pre-Chat Form In order to get the pre-chat fields before a conversation, call the `retrieveRemoteConfiguration` method from your [`CoreClient`](https://salesforce-async-messaging.github.io/messaging-in-app-android/sdk/core/com.salesforce.android.smi.core/-core-client/index.html) object. The returned remote configuration object contains a form with an array of fields. Each pre-chat field has the properties necessary for you to build your pre-chat form. After you present the pre-chat form to the user, fill in the `userInput` field for each pre-chat field object. Then submit the pre-chat fields from the `submitRemoteConfiguration` method on the [`ConversationClient`](https://salesforce-async-messaging.github.io/messaging-in-app-android/sdk/core/com.salesforce.android.smi.core/-conversation-client/index.html) object. **important:** IMPORTANT: The `submitPreChatData` method is deprecated in SDK version 1.4. If you want to use new features in version 1.4 and later, submit pre-chat fields using the `submitRemoteConfiguration` method. ```kotlin // Get the remote config object, which contains the pre-chat form val remoteConfig = coreClient.retrieveRemoteConfiguration() (remoteConfig as? Result.Success)?.data?.forms?.get(0)?.let { form -> val field = form.formFields[0] // Use the PreChatField attributes to render the form in your UI val label = field.labels.display val type: PreChatFieldType = field.type // ... val isRequired: Boolean = field.required // Set the userInput value to what the end user entered in your form field.userInput = "Sample User Input" // Validate user input if (field.validate() != PreChatErrorType.None) { // Display error to end user } else { // Pass the completed form to the conversation client val conversationClient = coreClient.conversationClient(uuid) conversationClient.submitRemoteConfiguration(form.formFields) // Start new conversation to submit the prechat form conversationClient.sendMessage("Hello, I submitted my form and need some assistance…") } } ``` To learn about hidden pre-chat fields, see [Hidden Pre-Chat for Android](https://developer.salesforce.com/docs/service/messaging-in-app/guide/android-pre-chat.md). ## Send Messages Send a message with the `sendMessage` method on the [`ConversationClient`](https://salesforce-async-messaging.github.io/messaging-in-app-android/sdk/core/com.salesforce.android.smi.core/-conversation-client/index.html) object. ```kotlin conversationClient.sendMessage("It worked!") ``` **note:** If you see the `Exception Failed (417)` error on sending a message, it’s because you set the **Pre-Chat Display Frequency** to **Every Session** in the [Pre-Chat Settings](https://help.salesforce.com/s/articleView?id=service.miaw_custom_prechat_2.htm) and a new session is being created. To fix this, call the [`submitRemoteConfiguration` method on the `ConversationClient` object](https://salesforce-async-messaging.github.io/messaging-in-app-android/sdk/core/com.salesforce.android.smi.core/-conversation-client/index.html) with your pre-chat values. ## Listen for Conversation Activity You can listen for conversation activity with the [`ConversationClient`](https://salesforce-async-messaging.github.io/messaging-in-app-android/sdk/core/com.salesforce.android.smi.core/-conversation-client/index.html) object and by using Android's Paging library. To learn about paged data, see [Load and display paged data](https://developer.android.com/topic/libraries/architecture/paging/v3-paged-data) in the Android documentation. For example, to listen for conversation entries, use the `conversationEntriesPaged` method. ```kotlin val conversationEntries = conversationClient.conversationEntriesPaged() .filterIsInstance>>().map { it.data } ``` Use your `PagingDataAdapter` class to listen to the latest events. ```kotlin conversationEntries.collectLatest { myPagingAdapter.submitData(it) } ``` Your `ViewHolder` class can extract information from the conversation entry. ```kotlin // Extract the text from a conversation entry private fun getText(item: ConversationEntry?): String = when (val payload = item?.payload) { is EntryPayload.MessagePayload -> when (val content = payload.abstractMessage.content) { is StaticContentFormat.TextFormat -> content.text // Handle other message formats (e.g. QuickRepliesFormat, RichLinkFormat) else -> content.formatType.toString() } // Handle other entry types (e.g. ParticipantChangedPayload, AcknowledgeReadPayload) else -> payload?.entryType.toString() } ``` **tip:** When you receive conversation entries from various flows, they’re delivered as [`ConversationEntry`](https://salesforce-async-messaging.github.io/messaging-in-app-android/sdk/data/com.salesforce.android.smi.network.data.domain.conversationEntry/-conversation-entry/index.html) objects. In addition to the `payload`, you can inspect the [`entryType`](https://salesforce-async-messaging.github.io/messaging-in-app-android/sdk/data/com.salesforce.android.smi.network.data.domain.conversationEntry/-conversation-entry/entry-type.html?query=abstract%20val%20entryType:%20ConversationEntryType) (for example, `Message`) when deciding how to process the message. The `payload` is an instance of the [`EntryPayload`](https://salesforce-async-messaging.github.io/messaging-in-app-android/sdk/data/com.salesforce.android.smi.network.data.domain.conversationEntry.entryPayload/-entry-payload/index.html) class and it contains, in addition to the payload itself, a `content` field that describes the message format. ## Listen for Transient Events To listen for transient events that come from the network, such as typing indicator feedback and network connectivity info, use [Kotlin flows](https://developer.android.com/kotlin/flow) on [`ConversationClient`](https://salesforce-async-messaging.github.io/messaging-in-app-android/sdk/core/com.salesforce.android.smi.core/-conversation-client/index.html) and [`CoreClient`](https://salesforce-async-messaging.github.io/messaging-in-app-android/sdk/core/com.salesforce.android.smi.core/-core-client/index.html). To monitor conversation events on the [`ConversationClient`](https://salesforce-async-messaging.github.io/messaging-in-app-android/sdk/core/com.salesforce.android.smi.core/-conversation-client/index.html) instance, use the following properties: - `conversation`: To observe the current conversation. - `events`: To listen for events specific to this conversation. To monitor general events on the [`CoreClient`](https://salesforce-async-messaging.github.io/messaging-in-app-android/sdk/core/com.salesforce.android.smi.core/-core-client/index.html) instance, use the following properties: - `networkConnectivityState`: To determine the network state. - `events`: To listen for general events (including events from all conversations). For example, to listen for typing events in a particular conversation, filter on the `events` property. ```kotlin // Listen for progress/typing indicator events val events = conversationClient.events.filterIsInstance() ``` When you receive events, you can extract information from the contents and pass it to the UI. ```kotlin events.collectLatest { // Grab the status text of the event val text = "Typing Event: ${it. conversationEntry.entryType}" // Display the text Toast.makeText(requireContext(), text, Toast.LENGTH_SHORT).show() } ``` ## Handle Participant Roles The [`Participant`](https://salesforce-async-messaging.github.io/messaging-in-app-android/sdk/data/com.salesforce.android.smi.network.data.domain.participant/-participant/index.html) interface has a `role` field of type string that maps to a participant role type. `Participant` maps to the `sender` field of the [`ConversationEntry`](https://salesforce-async-messaging.github.io/messaging-in-app-android/sdk/data/com.salesforce.android.smi.network.data.domain.conversationEntry/-conversation-entry/index.html) object. | Participant Role Type | Description | | --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `system` | Set for all [`ParticipantChangedOperation`](https://salesforce-async-messaging.github.io/messaging-in-app-android/sdk/data/com.salesforce.android.smi.network.data.domain.conversationEntry.entryPayload.event/-participant-changed-operation/index.html?query=enum%20ParticipantChangedOperation%20:%20Enum%3CParticipantChangedOperation%3E). | | `user` | Set for all conversation entries sent by a user. | | `agent` | Set for all conversation entries sent by a rep. | | `chatbot` | Set for all conversation entries sent by a chatbot. | ## Enhance the Experience You can enhance your users' experience by adding push notifications, passing information to Salesforce about a verified user, sending hidden pre-chat fields, adjusting chat button visibility based on business hours, and more. For enhanced features, see [Enhance the Experience for Android](https://developer.salesforce.com/docs/service/messaging-in-app/guide/android-enhance.md). For more details about the Core SDK, see the [Android Reference Documentation](https://salesforce-async-messaging.github.io/messaging-in-app-android/). # Build a Core SDK App for iOS The Core SDK allows you to call all the necessary In-App Messaging APIs directly from your app. With the Core SDK, you’re in full control over the entire user experience—you tell the API when to send a message and the API tells you when a message is received. This article applies to the following implementations: | UI SDK | Core SDK | | :----: | :------: | | | ✅ | If you want to use our ready-made user interface and user experience, use the [UI SDK](https://developer.salesforce.com/docs/service/messaging-in-app/guide/ios-ui-sdk.md) instead. ## Import the Framework Import the framework wherever you’re using the SDK. ``` import SMIClientCore ``` ## Create a Configuration Create a [`Configuration`](https://salesforce-async-messaging.github.io/messaging-in-app-ios/documentation/smiclientcore/configuration/) instance. To create a configuration instance, you can point to the config file you previously downloaded from your org, or you can manually add the values from within this config file. ### OPTION 1: Configure Using the Config File Once you've added the `config.json` file to your project, you can reference it from the code. ``` guard let configPath = Bundle.main.path(forResource: "configFile", ofType: "json") else { // TO DO: Handle error return } let configURL = URL(fileURLWithPath: configPath) let config = Configuration(url: configURL) ``` **note:** To learn how to download the config file from your org, see [Configure an Enhanced In-App Chat Deployment](https://help.salesforce.com/s/articleView?id=service.miaw_deployment_mobile.htm) in Salesforce Help. This file contains the Service API URL, the org ID, and the API name for the deployment. For example: ``` { "OrganizationId": "00ZZZ0000000Zzz", "DeveloperName": "MyMessagingForInAppDeployment", "Url": "https://zzzz.my.api.url.salesforce-scrt.com" } ``` ### OPTION 2: Configure Manually with Config Info If you don't want to use the `config.json` file in your project, you can configure the SDK manually using the Service API URL, the org ID, and the API name for the deployment. ``` guard let serviceAPIURL = URL(string: "URL_TO_MY_SERVICE_API") else { // TO DO: Handle error return } let config = Configuration(serviceAPI: serviceAPIURL, organizationId: "ORG_ID", developerName: "API_NAME_OF_DEPLOYMENT") ``` ## Get the Core Client Object The [`CoreFactory`](https://salesforce-async-messaging.github.io/messaging-in-app-ios/documentation/smiclientcore/corefactory) class lets you create a [`CoreClient`](https://salesforce-async-messaging.github.io/messaging-in-app-ios/documentation/smiclientcore/coreclient) object. ``` // Create core client let coreClient = CoreFactory.create(withConfig: config) ``` ## Start the Core Instance To receive messages and events, call `CoreClient.start()`. ``` // Start listening for events coreClient.start() ``` ## Create a Conversation Client The [`CoreClient`](https://salesforce-async-messaging.github.io/messaging-in-app-ios/documentation/smiclientcore/coreclient) object lets you create a [`ConversationClient`](https://salesforce-async-messaging.github.io/messaging-in-app-ios/documentation/smiclientcore/conversationclient) object to start a conversation. **tip:** This example creates a random UUID for the conversation ID. However, if you want this conversation to persist even after the app is restarted, be sure to use the same conversation ID. Also, if you want to see this same conversation across multiple devices, in addition to using the same conversation ID, turn on user verification, which is described in the _Enhance the Experience_ section. **note:** Don't use user IDs or other IDs as the `ConversationID`. Conversation IDs establish a permanent link with a user and are only available to the user who created it. Using a different existing ID instead of a unique ID can result in access issues or errors while developing or testing your Enhanced Chat integration. To pass existing IDs required for your flow, [use the Pre-chat feature](https://help.salesforce.com/s/articleView?id=service.miaw_custom_prechat_2.htm). ``` let conversationID = UUID() let conversationClient = coreClient.conversationClient(with: conversationID) ``` ## Handle a Pre-Chat Form In order to get the pre-chat fields before a conversation, call the `retrieveRemoteConfiguration` method from your [`CoreClient`](https://salesforce-async-messaging.github.io/messaging-in-app-ios/documentation/smiclientcore/coreclient) object. This method passes back an `SMIRemoteConfigurationCompletion` completion block that contains the array of pre-chat fields. ``` ​​var preChatFields: [PreChatField]? coreClient.retrieveRemoteConfiguration(completion: { remoteConfig, error in preChatFields = remoteConfig?.preChatFields }) ``` Each pre-chat field has the properties necessary for you to build your pre-chat form. After you present a pre-chat form to the user, fill in the `value` field for each pre-chat object. Then submit the pre-chat fields using the `submit(remoteConfig: )` method on the [`ConversationClient`](https://salesforce-async-messaging.github.io/messaging-in-app-ios/documentation/smiclientcore/conversationclient) object. **important:** IMPORTANT: The `submit(preChatFields: )` method is deprecated in SDK version 1.4. If you want to use new features added in version 1.4 and later, submit pre-chat fields using the `submit(remoteConfig: )` method. ``` coreClient.retrieveRemoteConfiguration(completion: { remoteConfig, error in // Get the pre-chat fields from the remote config. if let preChatFields = remoteConfig?.preChatConfiguration?.first?.preChatFields { // Set the pre-chat values. for field in preChatFields { field.value = "Some value from user" } // You can choose to create the conversation when submitting // pre-chat values, otherwise the conversation will be started // after sending the first message. self.conversationClient?.submit(remoteConfig: remoteConfig, createConversationOnSubmit: true) } }) ``` To learn about hidden pre-chat fields, see [Hidden Pre-Chat for iOS](https://developer.salesforce.com/docs/service/messaging-in-app/guide/ios-pre-chat.md). ## Send Messages Send a message with the [`ConversationClient`](https://salesforce-async-messaging.github.io/messaging-in-app-ios/documentation/smiclientcore/conversationclient) instance. ``` conversationClient.send(message: "It worked!") ``` **note:** If you see the `Exception Failed (417)` error on sending a message, it’s because you set the **Pre-Chat Display Frequency** to **Every Session** in the [Pre-Chat Settings](https://help.salesforce.com/s/articleView?id=service.miaw_custom_prechat_2.htm) and a new session is being created. To fix this, call the `submitRemoteConfiguration` method on the [`ConversationClient object`](https://salesforce-async-messaging.github.io/messaging-in-app-ios/documentation/smiclientcore/conversationclient) with your pre-chat values. ## Listen for Events To listen for events (such as new incoming messages), implement a delegate. Implement the [`CoreDelegate`](https://salesforce-async-messaging.github.io/messaging-in-app-ios/documentation/smiclientcore/coredelegate) protocol to listen for general messaging events or implement the [`ConversationClientDelegate`](https://salesforce-async-messaging.github.io/messaging-in-app-ios/documentation/smiclientcore/conversationclientdelegate) protocol to listen for messaging events related to a particular conversation. The conversation delegate (`ConversationClientDelegate`) gets all events for a specific conversation. The core delegate (`CoreDelegate`) gets events for every conversation. The core delegate also returns network connectivity events (`didChangeNetworkStatus`) and general error messages (`didError`). **tip:** When you receive conversation entries from various event methods, they’re delivered as [`ConversationEntry`](https://salesforce-async-messaging.github.io/messaging-in-app-ios/documentation/smiclientcore/conversationentry) objects. In addition to the `payload`, you can inspect the [`format`](https://salesforce-async-messaging.github.io/messaging-in-app-ios/documentation/smiclientcore/conversationformattypes) (for example, `RichLink`) and the [`type`](https://salesforce-async-messaging.github.io/messaging-in-app-ios/documentation/smiclientcore/conversationentrytypes) (for example, `Message`) when deciding how to process the message. ``` /* Implement this delegate to listen to ALL messaging events… */ class MyCoreDelegate : NSObject, CoreDelegate { // Received incoming conversation entries func core(_ core: CoreClient!, conversation: Conversation!, didReceiveEntries entries: [ConversationEntry]!, paged: Bool) { // TO DO: Handle event } // Message status has changed func core(_ core: CoreClient!, conversation: Conversation!, didUpdateEntries entries: [ConversationEntry]!) { // TO DO: Handle event } // Conversation was created func core(_ core: CoreClient!, didCreateConversation conversation: Conversation!) { // TO DO: Handle event } // Received a started typing event func core(_ core: CoreClient!, didReceiveTypingStartedEvent event: ConversationEntry!) { // TO DO: Handle event } // Received a stopped typing event func core(_ core: CoreClient!, didReceiveTypingStoppedEvent event: ConversationEntry!) { // TO DO: Handle event } // Network status has changed func core(_ core: CoreClient!, didChangeNetworkState state: NetworkConnectivityState!) { // TO DO: Handle event } // Received an error message func core(_ core: CoreClient!, didError error: Error!) { // TO DO: Handle an error condition! } } ``` ``` /* Implement this delegate to listen to events related to a specific conversation… */ class MyConversationDelegate: NSObject, ConversationClientDelegate { // Received conversation entries func client(_ client: ConversationClient!, didReceiveEntries entries: [ConversationEntry]!, paged: Bool) { // TO DO: Handle event } // Entries changed status func client(_ client: ConversationClient!, didUpdateEntries entries: [ConversationEntry]!) { // TO DO: Handle event } // Created a conversation func client(_ client: ConversationClient!, didCreateConversation conversation: Conversation!) { // TO DO: Handle event } // Received a started typing event func client(_ client: ConversationClient!, didReceiveTypingStartedEvent event: ConversationEntry!) { // TO DO: Handle event } // Received a stopped typing event func client(_ client: ConversationClient!, didReceiveTypingStoppedEvent event: ConversationEntry!) { // TO DO: Handle event } // Conversation error func client(_ client: ConversationClient!, didError error: Error!) { // TO DO: Handle event } } ``` Use the `addDelegate` method on the [`CoreClient`](https://salesforce-async-messaging.github.io/messaging-in-app-ios/documentation/smiclientcore/coreclient) instance to add a core delegate. Use the `addDelegate` method on the [`ConversationClient`](https://salesforce-async-messaging.github.io/messaging-in-app-ios/documentation/smiclientcore/conversationclient) instance to add a conversation client delegate. ``` // Add a core delegate let myCoreDelegate = MyCoreDelegate() coreClient.addDelegate(delegate: myCoreDelegate) // Add a conversation delegate let myConversationDelegate = MyConversationDelegate() conversationClient.addDelegate(delegate: myConversationDelegate) ``` ## Handle Participant Roles The [`Participant`](https://salesforce-async-messaging.github.io/messaging-in-app-ios/documentation/smiclientcore/participant) protocol has a `role` field of type [`ParticipantRole`](https://salesforce-async-messaging.github.io/messaging-in-app-ios/documentation/smiclientcore/participantrole). `Participant` maps to the `sender` field of the [`ConversationEntry`](https://salesforce-async-messaging.github.io/messaging-in-app-ios/documentation/smiclientcore/conversationentry) protocol. | Participant Role Type | Description | | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `ParticipantRoleSystem` | Set for [`ParticipantChangedOperation`](https://salesforce-async-messaging.github.io/messaging-in-app-ios/documentation/smiclientcore/participantchangedoperation). The `participant` field on the [`ParticipantChangedOperation`](https://salesforce-async-messaging.github.io/messaging-in-app-ios/documentation/smiclientcore/participantchangedoperation) protocol represents the participant whose role is being updated. | | `ParticipantRoleUser` | Set for all conversation entries sent by a user. | | `ParticipantRoleAgent` | Set for all conversation entries sent by a rep. | | `ParticipantRoleChatbot` | Set for all conversation entries sent by a chatbot. | | `ParticipantRoleRouter` | Set for [`ParticipantChangedOperation`](https://salesforce-async-messaging.github.io/messaging-in-app-ios/documentation/smiclientcore/participantchangedoperation). This role is ignored by the SDK UI experience. | | `ParticipantRoleSupervisor` | Set for [`ParticipantChangedOperation`](https://salesforce-async-messaging.github.io/messaging-in-app-ios/documentation/smiclientcore/participantchangedoperation) after a supervisor on a Salesforce org joins a conversation after the rep raises a flag seeking their input. This role is ignored by the SDK UI experience. | ## Enhance the Experience You can enhance your users' experience by adding push notifications, passing information to Salesforce about a verified user, sending hidden pre-chat fields, adjusting chat button visibility based on business hours, and more. For enhanced features, see [Enhance the Experience for iOS](https://developer.salesforce.com/docs/service/messaging-in-app/guide/ios-enhance.md). For more details about the Core SDK, see the [iOS Reference Documentation](https://salesforce-async-messaging.github.io/messaging-in-app-ios/). ## Sample App For an example app, see the [Core SDK example in GitHub](https://github.com/Salesforce-Async-Messaging/messaging-in-app-ios/tree/master/examples/MessagingCoreExample). # Build a UI SDK App for Android The UI SDK allows you to add Enhanced In-App Chat into your Android app with a ready-to-go user experience. Open a conversation with the `UIClient` class. You can customize the colors and strings so that the Messaging user interface looks natural in your app. Enhance the experience with push notifications, hidden pre-chat data, user verification, and other features. This article applies to the following implementations: | UI SDK | Core SDK | | :----: | :------: | | ✅ | | ## Step 1. Import the Classes Most of the SDK classes are from these two packages: ``` import com.salesforce.android.smi.core.* // For the core classes import com.salesforce.android.smi.ui.* // For the UI-related classes ``` ## Step 2. Configure the UI Session Create a `UIConfiguration` object using the config file that you previously downloaded from your org, or you can manually add the values from within this config file. **tip:** This example creates a random UUID for the conversation ID. However, if you want this conversation to persist even after the app is restarted, be sure to use the same conversation ID. Also, if you want to see this same conversation across multiple devices, in addition to using the same conversation ID, turn on user verification, which is described in the _Enhance the Experience_ section. **note:** Don't use user IDs or other IDs as the `ConversationID`. Conversation IDs establish a permanent link with a user and are only available to the user who created it. Using a different existing ID instead of a unique ID can result in access issues or errors while developing or testing your Enhanced Chat integration. To pass existing IDs required for your flow, [use the Pre-chat feature](https://help.salesforce.com/s/articleView?id=service.miaw_custom_prechat_2.htm). ### OPTION 1: Configure Using the Config File Once you've added the `config.json` file to your project, you can reference it from the code. ``` // Create a Core configuration object val coreConfig = CoreConfiguration.fromFile(myContext, "configFile.json") // Generate a random conversation ID // (But be sure to use the SAME conversation ID if you want // to continue this conversation across app restarts or // across devices!) val conversationID = UUID.randomUUID() // Create a UI configuration object val config = UIConfiguration(coreConfig, conversationID) ``` **note:** To learn how to download the config file from your org, see [Configure an Enhanced In-App Chat Deployment](https://help.salesforce.com/s/articleView?id=service.miaw_deployment_mobile.htm) in Salesforce Help. This file contains the Service API URL, the org ID, and the API name for the deployment. For example: ``` { "OrganizationId": "00ZZZ0000000Zzz", "DeveloperName": "MyMessagingForInAppDeployment", "Url": "https://zzzz.my.api.url.salesforce-scrt.com" } ``` ### OPTION 2: Configure Manually with Config Info If you don't want to use the `config.json` file in your project, you can configure the SDK manually using the Service API URL, the org ID, and the API name for the deployment. ``` // Get a URL for the service API path val url = URL("URL_TO_MY_SERVICE_API") // Create a Core configuration object val coreConfig = CoreConfiguration(url, "ORG_ID", "API_NAME_OF_DEPLOYMENT") // Generate a random conversation ID // (But be sure to use the SAME conversation ID if you want // to continue this conversation across app restarts or // across devices!) val conversationID = UUID.randomUUID() // Create a UI configuration object val config = UIConfiguration(coreConfig, conversationID) ``` ## Step 3. Add the View to Your App Create a `UIClient` object. Open a conversation to show the UI. ```kotlin val uiClient = UIClient.Factory.create(config) uiClient.openConversationActivity(myContext) ``` **note:** Without any additional code, the UI SDK automatically provides your customers with Messaging features such as pre-chat forms, bot support, file attachments, and estimated wait time. To learn how to configure these features in your org, visit our [Enhanced Chat learning map](https://help.salesforce.com/s/articleView?id=service.miaw_intro_landing.htm). ## Step 4. Customize the UI **note:** This step is optional. The UI SDK automatically brands the app with a default color scheme, provides icons for all UI elements, and uses default text for all UI labels. However, you can customize these elements with the UI SDK. - To customize the color scheme in your app, create a color resource file in your app using the SDK's token names. To learn more, see [Customize Colors for Android](https://developer.salesforce.com/docs/service/messaging-in-app/guide/android-colors.md). - To customize any UI text, create a `strings.xml` resource file in your app using the SDK's resource names. To learn more, see [Customize Strings for Android](https://developer.salesforce.com/docs/service/messaging-in-app/guide/android-strings.md). - To customize the icons and images used throughout the SDK, add a drawable asset to your project using the associated keyword. To learn more, see [Customize Icons for Android](https://developer.salesforce.com/docs/service/messaging-in-app/guide/android-icons.md). ## Step 5. Enhance the Experience **note:** This step is optional. You can enhance your users' experience by adding push notifications, passing information to Salesforce about a verified user, sending hidden pre-chat fields, adjusting chat button visibility based on business hours, and more. For enhanced features, see [Enhance the Experience for Android](https://developer.salesforce.com/docs/service/messaging-in-app/guide/android-enhance.md). ## Sample App For an example app, see the [UI SDK example in GitHub](https://github.com/Salesforce-Async-Messaging/messaging-in-app-android/tree/main/sample-app). # Build a UI SDK App for iOS The UI SDK allows you to add Enhanced In-App Chat into your iOS app with a ready-to-go user experience. Just add the `Interface` view to your app. You can customize the colors and strings so that the Messaging user interface looks natural in your app. Enhance the experience with push notifications, hidden pre-chat data, user verification, and other features. This article applies to the following implementations: | UI SDK | Core SDK | | :----: | :------: | | ✅ | | ## Step 1. Import the Framework Import the frameworks from wherever you’re using the SDK. ``` import SMIClientCore // For the core classes import SMIClientUI // For the UI-related classes ``` ## Step 2. Configure the UI Session Create a `UIConfiguration` instance. To create a configuration instance, you can point to the config file you previously downloaded from your org, or you can manually add the values from within this config file. **tip:** This example creates a random UUID for the conversation ID. However, if you want this conversation to persist even after the app is restarted, be sure to use the same conversation ID. Also, if you want to see this same conversation across multiple devices, in addition to using the same conversation ID, turn on user verification, which is described in the _Enhance the Experience_ section. **note:** Don't use user IDs or other IDs as the `ConversationID`. Conversation IDs establish a permanent link with a user and are only available to the user who created it. Using a different existing ID instead of a unique ID can result in access issues or errors while developing or testing your Enhanced Chat integration. To pass existing IDs required for your flow, [use the Pre-chat feature](https://help.salesforce.com/s/articleView?id=service.miaw_custom_prechat_2.htm). ### OPTION 1: Configure Using the Config File Once you've added the `config.json` file to your project, you can reference it from the code. ``` // Get the path for the config file guard let configPath = Bundle.main.path(forResource: "configFile", ofType: "json") else { // TO DO: Handle error return } // Get a URL for the config file let configURL = URL(fileURLWithPath: configPath) // Generate a random conversation ID // (But be sure to use the SAME conversation ID if you want // to continue this conversation across app restarts or // across devices!) let conversationID = UUID() // Create a configuration object let config = UIConfiguration(url: configURL, conversationId: conversationID) ``` **note:** To learn how to download the config file from your org, see [Configure an Enhanced In-App Chat Deployment](https://help.salesforce.com/s/articleView?id=service.miaw_deployment_mobile.htm) in Salesforce Help. This file contains the Service API URL, the org ID, and the API name for the deployment. For example: ``` { "OrganizationId": "00ZZZ0000000Zzz", "DeveloperName": "MyMessagingForInAppDeployment", "Url": "https://zzzz.my.api.url.salesforce-scrt.com" } ``` ### OPTION 2: Configure Manually with Config Info If you don't want to use the `config.json` file in your project, you can configure the SDK manually using the Service API URL, the org ID, and the API name for the deployment. ``` // Get a URL for the service API path guard let serviceAPIURL = URL(string: "URL_TO_MY_SERVICE_API") else { // TO DO: Handle error return } // Generate a random conversation ID // (But be sure to use the SAME conversation ID if you want // to continue this conversation across app restarts or // across devices!) let conversationID = UUID() // Create a configuration object let config = UIConfiguration(serviceAPI: serviceAPIURL, organizationId: "ORG_ID", developerName: "API_NAME_OF_DEPLOYMENT", conversationId: conversationID) ``` ## Step 3. Add the View to Your App If you're using SwiftUI, add the `Interface` view to your view, using the `UIConfiguration` instance to initialize and display the chat feed. ``` struct ContentView: View { @State var config: UIConfiguration var body: some View { Interface(config) } } ``` If you're using Swift or Objective-C, add the `InterfaceViewController` or the `ModalInterfaceViewController` view controller to your app, using the `UIConfiguration` instance to initialize the view controller. The `ModalInterfaceViewController` lets you present your chat to users modally. ``` let chatVC = InterfaceViewController(config) self.present(chatVC, animated: true, completion: nil) ``` ``` // Create a modalInterfaceViewController if you want to present your chat to the user modally let chatVC = ModalInterfaceViewController(config) //Set your presentation style chatVC.modalPresentationStyle = .popover self.present(chatVC, animated: true, completion: nil) ``` **note:** Without any additional code, the UI SDK automatically provides your customers with Messaging features such as pre-chat forms, bot support, file attachments, and estimated wait time. To learn how to configure these features in your org, visit our [Enhanced Chat learning map](https://help.salesforce.com/s/articleView?id=service.miaw_intro_landing.htm). In your mobile app, make a call into the SDK with device token information during registration. To learn more, see [Set Up Messaging Notifications for iOS](https://developer.salesforce.com/docs/service/messaging-in-app/guide/ios-notifications.md). ## Step 4. Customize the UI **note:** This step is optional. The UI SDK automatically brands the app with a default color scheme, provides icons for all UI elements, and uses default text for all UI labels. However, you can customize these elements with the UI SDK. - To customize the color scheme in your app, create color sets in your Assets catalog using the SDK's token names. To learn more, see [Customize Colors for iOS](https://developer.salesforce.com/docs/service/messaging-in-app/guide/ios-colors.md). - To customize any UI text, create a localizable resource file in your app and override the string values. To learn more, see [Customize Strings for iOS](https://developer.salesforce.com/docs/service/messaging-in-app/guide/ios-strings.md). - To customize the icons and images used throughout the SDK, add an asset to your project's Assets catalog using the associated keyword. To learn more, see [Customize Icons for iOS](https://developer.salesforce.com/docs/service/messaging-in-app/guide/ios-icons.md). ## Step 5. Enhance the Experience **note:** This step is optional. You can enhance your users' experience by adding push notifications, passing information to Salesforce about a verified user, sending hidden pre-chat fields, adjusting chat button visibility based on business hours, and more. For enhanced features, see [Enhance the Experience for iOS](https://developer.salesforce.com/docs/service/messaging-in-app/guide/ios-enhance.md). ## Sample App For an example app, see the [UI SDK example in GitHub](https://github.com/Salesforce-Async-Messaging/messaging-in-app-ios/tree/master/examples/MessagingUIExample). # Build Custom Appointment Booking Experiences Using Salesforce Scheduler APIs This section demonstrates how to build a seamless appointment booking experience using our Salesforce Scheduler APIs. With these use cases, developers can learn how to build custom scheduling apps with the Salesforce Scheduler APIs. The sample application currently shows an example implementation for simple appointment booking, automatic resource assignment, and anonymous appointment booking. It also shows an example of an appointment booking modification. These implementations help development teams understand how to use the APIs and begin their own journey of building amazing appointment booking experiences. - **[Schedule an Anonymous Appointment](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/usecase2-create-anonymous-appointment.md)** Build a scheduling application using Salesforce Scheduler APIs to book an anonymous appointment by assigning service resources automatically. Account users and guest users don’t always know the name of the service resource, and sometimes they don’t care which resource they’re assigned to. You can automatically assign a service resource based on the time slot that a user selects. To protect users’ privacy, you can also hide their names on the review appointment page. - **[Schedule Anonymous Appointments with Appointment Distribution](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/usecase8-create-appointment-with-apptdistribution.md)** Build a scheduling app by using Salesforce Scheduler APIs to book anonymous service appointments via phone calls and video conferences within a large, virtual service territory. For territories with too many associated resources, use Appointment Distribution to show only the least consumed resources. - **[Schedule Appointments by Selecting Location First](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/usecase9-show-nearest-available-service-territories.md)** This use case explains how you can build a scheduling app to have the service location selection first in your appointment scheduling experience using Salesforce Scheduler APIs. - **[Modify an Anonymous Appointment](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/usecase5-modify-anonymous-booking.md)** This use case explains how to change the service resource of an existing anonymous service appointment by using Salesforce Scheduler APIs. - **[Create a Single-Resource Appointment](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/usecase1-create-single-resource-appointment.md)** This use case explains how you can build a scheduling website to allow users to book service appointments with a single resource using Salesforce Scheduler APIs. - **[Modify a Service Appointment](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/usecase4-modify-an-appointment.md)** Use Salesforce Scheduler APIs to modify a service appointment. This use case explains how you can change the engagement channel, service resource, time slot, or status of an existing appointment. However, you can also modify other details of the appointment in a similar fashion. For example, to change the service territory, use the `service-territories` Connect API. - **[Create a Multi-Resource Appointment](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/usecase3-create-multi-resource-appointment.md)** Build a scheduling application using Salesforce Scheduler APIs to book a multi-resource service appointment. Multi-resource scheduling lets users create appointments that include more than one required service resource. - **[Modify a Multi-Resource Service Appointment](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/usecase7-modify-multiresource-appointment.md)** Use Salesforce Scheduler APIs to modify a multi-resource service appointment. This use case explains how you can change the secondary service resources or the time slot of an existing multi-resource appointment. - **[Create a Concurrent Appointment](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/usecase6-create-concurrent-scheduling.md)** This use case explains how to build a concurrent appointment scheduling application using Salesforce Scheduler APIs. - **[Schedule Appointments by Using Sharing Availability](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/usecase10-create-appointments-using-sharing-availability.md)** This use case describes how to create an external website by using the Salesforce Scheduler APIs that your users can use to book appointments using the invitation URL. - **[Schedule Appointments with a Dummy Resource and Reassign to Actual Resources](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/build-custom-apps/usecase11/uc11-schedule-appt-with-dummy-resource-and-reassign-to-actual-resource.md)** Learn how to create concurrent appointments by using a dummy resource and to reassign the appointments to actual resources later in scenarios where appointments are scheduled before actual resources can be assigned. For example, a wealth management advisory desk that accepts 50 or more appointments for various time slots between 10:00 AM and 5:00 PM. The desk can reassign these appointments to the actual resources only two days before the appointment date. Or, a call center whose resources are assigned randomly in real time, but can schedule 50 appointments for various time slots in a day. # Build Your Connector Starting from the demo connector, replace Open CTI adapter logic with Salesforce Voice with Partner Telephony connector methods and events. ## Start From the Demo Connector In the cloned demo connector location, open `src/main/connector.js`. This file already has `VendorConnector` and `TelephonyConnector` fully scaffolded. Your migration task is to replace the mock backend calls in each method with calls to your real telephony system. | Direction | What It Means | Examples | | ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------ | | Your connector calls Salesforce | Your connector publishes an event; Salesforce reacts. | `publishEvent(CALL_STARTED)`, `publishEvent(HANGUP)` | | Salesforce calls your connector | Your connector implements a method and returns a promise; Salesforce invokes it when an in-org event occurs. Return a promise with the result; do not call `publishEvent()` yourself from inside the method. | `acceptCall()`, `endCall()`, `setAgentStatus()`, `superviseCall()` | ## Use AI Assistants to Accelerate the Rewrite After cloning the demo connector, consider using AI coding assistants for the mechanical translation of your Open CTI adapter logic into Salesforce Voice with Partner Telephony connector methods. Because patterns are systematic and each `opencti.*` call maps to a specific connector method or event, AI agents are helpful for this migration. Although you can use an AI assistant for certain straightforward tasks, such as translating `opencti` calls to connector methods, writing unit tests, or generating SOQL for reporting, other tasks require manual insight. Make sure that you check or implement these items yourself: - Whether to use `enqueueNextState` correctly. The timing is subtle. - Multiparty event sequencing: AI can generate the call paths, but you should validate each pattern (blind transfer, warm transfer, consult, add caller) manually. - Deciding which custom fields belong on VoiceCall vs. a child object: This is a domain decision, not a coding decision. - Final Flow construction: The AI gives you the spec; Flow Builder is where you implement. - Auth / SSO into your backend: This should be reviewed by a human; AI-generated auth code is a common source of security issues. Here are sample prompts to start migrating your adapter. 1. Feed the assistant your Open CTI adapter and related information. ```plaintext I'm migrating an Open CTI adapter to a Salesforce Voice with Partner Telephony connector. Here is my current Open CTI adapter: [paste or attach] SDK: https://github.com/salesforce/scv-connector-base Demo connector (my starting point): https://github.com/salesforce-misc/byo-demo-connector Developer guide: https://developer.salesforce.com/docs/atlas.en-us.voice_pt_developer_guide.meta/voice_pt_developer_guide/voice_pt_intro.htm For each opencti.* API call in my adapter, tell me: 1. The Salesforce Voice connector equivalent method or event 2. Where in byo-demo-connector it's already stubbed 3. What I need to replace ``` **tip:** If your AI tool isn't able to parse the [Salesforce Voice with Partner Telephony Developer Guide](https://developer.salesforce.com/docs/atlas.en-us.voice_pt_developer_guide.meta/voice_pt_developer_guide/voice_pt_intro.htm), point it to the latest PDF version (available from the guide overview page). 2. Generate connector methods one at a time. Don't ask for the whole file at once. Migrate method by method, in priority order. ```plaintext In my Open CTI adapter, call acceptance looks like this: [paste your existing code] Generate the Salesforce Voice TelephonyConnector.acceptCall() implementation that calls my backend at [your endpoint], using the PhoneCall and CallResult types from scv-connector-base. Return a Promise — do not call publishEvent() from inside acceptCall(). ``` 3. Repeat for `endCall()`, `dial()`, `hold()`, `mute()`, `setAgentStatus()`, `wrapUpCall()`, etc. 4. Generate unit tests against the SDK's test fixtures. ```plaintext Generate Jest unit tests for my acceptCall() implementation using the test patterns in byo-demo-connector/src/main/__tests__/. Mock the backend with the same vendor-sdk.js mock pattern the demo uses. ``` 5. Validate with the CCaaS.html simulator. After generating code, test against the demo connector's mock backend before connecting your real backend. The simulator catches event-ordering bugs early, such as `CALL_CONNECTED` before `CALL_STARTED`, missing `voiceCallId`, and other rejections the base connector enforces. ```bash cd byo-demo-connector npm run serve # Open the printed CCaaS.html URL in a browser tab. # Simulate inbound/outbound calls, hangups, and transfers without a real PBX. ``` 6. Generate Omni-Channel Flow specifications (build in Flow Builder). For Flows (screen pop, post-call automation), AI tools generate Flow specifications and step-by-step build instructions, not deployable Flow XML. Use the AI output as a buildable spec. Build the actual Flow in Flow Builder. ## Methods to Replace, in Priority Order Priority 1 (required for basic calls): ```javascript acceptCall(); // replace mock with your accept API → Promise declineCall(); // replace mock with your decline API → Promise endCall(); // replace mock with your hangup API → Promise dial(); // replace mock with your outbound dial → Promise getActiveCalls(); // replace mock with your call state query → Promise ``` Priority 2 (required for complete experience): ```javascript hold() / resume(); mute() / unmute(); setAgentStatus() / getAgentStatus(); wrapUpCall(); ``` Priority 3 (advanced features): ```javascript addParticipant(); // transfers and consults superviseCall(); // supervisor listen-in supervisorBargeIn(); getVoiceCapabilities() / getSharedCapabilities(); ``` ## Publish Call Events When your telephony system fires events, translate them using the pattern that’s already in the demo connector’s event publisher: ```javascript // Inbound call ringing → publish to Salesforce Voice publishEvent({ eventType: Constants.VOICE_EVENT_TYPE.CALL_STARTED, payload: { call: new PhoneCall({ callId: vendorCallId, callType: Constants.CALL_TYPE.INBOUND, state: Constants.CALL_STATE.RINGING, phoneNumber: callerNumber, callAttributes: new PhoneCallAttributes({ voiceCallId: sfVoiceCallId, // ← 0LQ... Salesforce VoiceCall record ID participantType: Constants.PARTICIPANT_TYPE.INITIAL_CALLER, }), callInfo: new CallInfo({ isOnHold: false, acceptEnabled: true, declineEnabled: true }), }), }, }); ``` **important:** `voiceCallId` in `callAttributes` must be the Salesforce VoiceCall record ID (`0LQ…`). This is the binding between your call and everything Salesforce does (AgentWork creation, supervisor view, reporting). # Build Your Own UI with the Chat Core API With the Chat Core API, you can access the functionality of Chat without a UI. This API is useful if you want to build your own UI and not use the default. ## Before You Begin **important:** 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](https://help.salesforce.com/s/articleView?id=service.miaw_intro_landing.htm&type=5) before that date. Messaging offers many of the [chat features](https://help.salesforce.com/s/articleView?id=service.miaw_chat_vs_messaging.htm&type=5) that you love plus asynchronous conversations that can be picked back up at any time. Learn about chat retirement in [Help](https://help.salesforce.com/s/articleView?id=001790618&type=1). - Set up Service Cloud to work with Chat. See [Org Setup for Chat in Lightning Experience with a Guided Flow](https://developer.salesforce.com/docs/service/service-sdk-android/guide/shared/live-agent-cloud-setup.md). - Installed the SDK. See [Install the Service SDK for Android](https://developer.salesforce.com/docs/service/service-sdk-android/guide/android-install-sdk.md). These steps describe how to use the Chat Core API. To use the default UI, see [Quick Setup: Chat in the Service Chat SDK](https://developer.salesforce.com/docs/service/service-sdk-android/guide/android-chat-basic-setup.md). 1. To listen for agent activity, create an [`AgentListener`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/AgentListener.html) implementation. From the agent listener, you can: - Detect when an agent has joined using `onAgentJoined(AgentInformation agentInformation)`. - Detect when an agent is typing a message using `onAgentIsTyping(boolean isAgentTyping)`. - Receive an incoming message from an agent using `onChatMessageReceived(ChatMessage chatMessage)`. 2. To listen for session state changes, create a [`SessionStateListener`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/SessionStateListener.html). From a session state listener, you can: - Detect when the session state changes using `onSessionStateChange(ChatSessionState state)`. For example, this method is useful for when the session disconnects (`ChatSessionState.Disconnected`). - Detect when the session ends using `onSessionEnded(ChatEndReason endReason)`. This method is useful to know why a session ends and report the information to the user. For example, `ChatEndReason.EndedByAgent` is passed when the agent ends the session. To learn more about using this listener, see [Listen for State Changes and Events](https://developer.salesforce.com/docs/service/service-sdk-android/guide/android-chat-state-changes.md). 3. To listen for changes related to a user's position or estimated wait time in the agent queue, create a [`QueueListener`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/QueueListener.html). When a user is trying to connect to an agent, you can monitor where the user is in the queue. The estimated wait time is returned in minutes and the queue position is an integer value related to the overall agent capacity. When using the queue position number, the queue position is 0 if the agent capacity is greater than or equal to the number of customer requests. Otherwise, the position value represents how far the customer is from getting served by an agent. ```java q = max(n - c, 0) ``` Where: - q is the queue position - n is the position of the customer compared to all waiting customers - c is the total capacity of all agents For example, if the total capacity is 10, the first 10 waiting visitors have a position of 0, the 11th has a position of 1, the 12th has a position of 2, and so on. 4. To listen for Einstein bot activity, create a `ChatBotListener`. From a bot listener, you can: - Detect when you receive a persistent footer menu from the Einstein bot with `onChatFooterMenuReceived`. A footer menu is always accessible to the user and typically handles options that are not context-specific, such as "Transfer to agent." - Detect when you receive menu options from the Einstein bot with `onChatMenuReceived`. - Detect when you receive choice button options from the Einstein bot with `onChatButtonMenuReceived`. 5. Build a [`ChatConfiguration`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/ChatConfiguration.html) object as described in [Quick Setup: Chat in the Service Chat SDK](https://developer.salesforce.com/docs/service/service-sdk-android/guide/android-chat-basic-setup.md). In Java: ```java // Create a core configuration instance ChatConfiguration chatConfiguration = new ChatConfiguration.Builder(ORG_ID, BUTTON_ID, DEPLOYMENT_ID, LIVE_AGENT_POD) .build(); ``` In Kotlin: ```java // Create a core configuration instance val chatConfiguration = ChatConfiguration.Builder(ORG_ID, BUTTON_ID, DEPLOYMENT_ID, LIVE_AGENT_POD) .build() ``` 6. Create a [`ChatCore`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/ChatCore.html) object with your chat configuration object. In Java: ```java ChatCore core = ChatCore.configure(chatConfiguration); ``` In Kotlin: ```java val core = ChatCore.configure(chatConfiguration) ``` 7. Create a [`ChatClient`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/ChatClient.html), adding your listener objects. Define [`ChatClient`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/ChatClient.html) at the `Application` scope to ensure that the session is trackable throughout the application's lifetime rather than just within an `Activity`, for example. In Java: ```java private @Nullable ChatClient mChatClient; // ... core.createClient(this) .onResult(new Async.ResultHandler() { @Override public void handleResult (Async operation, @NonNull ChatClient chatClient) { mChatClient = chatClient .addSessionStateListener(myStateListener) .addAgentListener(myAgentListener) .addQueueListener(myQueueListener) .addChatBotListener(myEinsteinBotListener); } }); ``` In Kotlin: ```java var mChatClient: ChatClient? = null // ... core.createClient(this) .onResult { operation, chatClient -> mChatClient = chatClient .addSessionStateListener(myStateListener) .addAgentListener(myAgentListener) .addQueueListener(myQueueListener) .addChatBotListener(myEinsteinBotListener) } ``` When you receive a chat client instance, a session has successfully started. 8. Perform session actions with the [`ChatClient`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/ChatClient.html) object. From the chat client object, you can perform the following functions: - Tell the agent when the user is typing a message using `setIsUserTyping(boolean isUserTyping)`. - Send a message to the agent using `sendChatMessage(String message)`. - Handle file transfer activity using `addFileTransferRequestListener(FileTransferRequestListener fileTransferRequestListener)`. See [Transfer File to Agent](https://developer.salesforce.com/docs/service/service-sdk-android/guide/android-chat-file-transfer.md). - Handle Einstein bot responses with `sendFooterMenuSelection`, `sendMenuSelection`, and `sendButtonSelection`. - End the chat session using `endChatSession()`. # Build Your Own UI with the Chat Core API With the Chat Core API, you can access the functionality of Chat without a UI. This API is useful if you want to build your own UI and not use the default. ## Before You Begin **important:** 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](https://help.salesforce.com/s/articleView?id=service.miaw_intro_landing.htm&type=5) before that date. Messaging offers many of the [chat features](https://help.salesforce.com/s/articleView?id=service.miaw_chat_vs_messaging.htm&type=5) that you love plus asynchronous conversations that can be picked back up at any time. Learn about chat retirement in [Help](https://help.salesforce.com/s/articleView?id=001790618&type=1). Before running through these steps, be sure you’ve already: - Set up Service Cloud to work with Chat. To learn more, see [Org Setup for Chat in Lightning Experience with a Guided Flow](https://developer.salesforce.com/docs/service/service-sdk-android/guides/shared/live-agent-cloud-setup.md). - Installed the SDK. To learn more, see [Install the Service Chat SDK for iOS](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/ios-sdk-install-overview.md). Once you’ve reviewed these prerequisites, you’re ready to begin. These steps describe how to use the Chat Core API with your own custom UI. To use the default UI, see [Quick Setup: Chat in the Service Chat SDK](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/live-agent-basic-setup.md). 1. Import the SDK. Wherever you intend to use the Chat SDK, be sure to import the ServiceCore framework and the ServiceChat framework. In Swift: ```java import ServiceCore import ServiceChat ``` In Objective-C: ```java @import ServiceCore; @import ServiceChat; ``` 2. Create an [`SCSChatConfiguration`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSChatConfiguration.html) object. In Swift: ```java let config = SCSChatConfiguration(liveAgentPod: "TO_DO_POD_NAME", // e.g. "d.gla5.gus.salesforce.com" orgId: "TO_DO_ORG_ID", // e.g. "00DB00000003Rxz" deploymentId: "TO_DO_DEPLOYMENT_ID", // e.g. "573B00000005KXz" buttonId: "TO_DO_BUTTON_ID") // e.g. "575C00000004h3m" ``` In Objective-C: ```java SCSChatConfiguration *config = [[SCSChatConfiguration alloc] initWithLiveAgentPod:@"TO_DO_POD_NAME" // e.g. "d.gla5.gus.salesforce.com" orgId:@"TO_DO_ORG_ID" // e.g. "00DB00000003Rxz" deploymentId:@"TO_DO_DEPLOYMENT_ID" // e.g. "573B00000005KXz" buttonId:@"TO_DO_BUTTON_ID"]; // e.g. "575C00000004h3m" ``` See [Configure a Chat Session](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/configure-lac-session.md) on how to configure a chat session. 3. Implement [`SCSChatSessionDelegate`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSChatSessionDelegate.html) and handle the relevant session-related methods. Using this delegate, you can: - Detect state transitions with [`session(didTransitionFrom:to:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSChatSessionDelegate.html#/c:objc(pl)SCSChatSessionDelegate(im)session:didTransitionFromState:toState:>). - Detect the end of the session with [`session(didEnd:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSChatSessionDelegate.html#/c:objc(pl)SCSChatSessionDelegate(im)session:didEnd:>). - Detect error conditions with [`session(didError:fatal:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSChatSessionDelegate.html#/c:objc(pl)SCSChatSessionDelegate(im)session:didError:fatal:>). - Detect queue state changes with [`session(didUpdateQueuePosition:estimatedWaitTime:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSChatSessionDelegate.html#/c:objc(pl)SCSChatSessionDelegate(im)session:didUpdateQueuePosition:estimatedWaitTime:>). Pass your implementation to the [`SCSChat`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSChat.html) instance. In Swift: ```java ServiceCloud.shared().chatCore.add(delegate: mySessionDelegate) ``` In Objective-C: ```java [[SCServiceCloud sharedInstance].chatCore addDelegate:mySessionDelegate]; ``` To learn more, see [Listen for State Changes and Events](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/live-agent-listen-to-events.md). 4. Implement [`SCSChatEventDelegate`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSChatEventDelegate.html) and handle the relevant event-related methods. Using this delegate, you can: - Detect when an agent joins with [`session(agentJoined:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSChatEventDelegate.html#/c:objc(pl)SCSChatEventDelegate(im)session:agentJoined:>). - Detect when an agent leaves with [`session(agentLeftConference:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSChatEventDelegate.html#/c:objc(pl)SCSChatEventDelegate(im)session:agentLeftConference:>). - Detect when an outgoing message is sent with [`session(processedOutgoingMessage:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSChatEventDelegate.html#/c:objc(pl)SCSChatEventDelegate(im)session:processedOutgoingMessage:>). - Detect when the delivery status of a message has been updated with [`session(didUpdateOutgoingMessageDeliveryStatus:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSChatEventDelegate.html#/c:objc(pl)SCSChatEventDelegate(im)session:didUpdateOutgoingMessageDeliveryStatus:>). - Detect when an incoming message arrives with [`session(didReceiveMessage:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSChatEventDelegate.html#/c:objc(pl)SCSChatEventDelegate(im)session:didReceiveMessage:>). - Detects when a URL is found in an message with [`session(didReceiveURL:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSChatEventDelegate.html#/c:objc(pl)SCSChatEventDelegate(im)session:didReceiveURL:>). - Detect when a chat bot menu arrives with [`session(didReceiveChatBotMenu:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSChatEventDelegate.html#/c:objc(pl)SCSChatEventDelegate(im)session:didReceiveChatBotMenu:>). - Detect when a chat bot menu item is selected with [`session(didSelectMenuItem:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSChatEventDelegate.html#/c:objc(pl)SCSChatEventDelegate(im)session:didSelectMenuItem:>). - Detect when the agent starts and finishes typing. - Detect events related to the file transfer process. - Detects when the user is transferred to an agent from a chat bot. Pass your implementation to the [`SCSChat`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSChat.html) instance. In Swift: ```java ServiceCloud.shared().chatCore.addEvent(delegate: myEventDelegate) ``` In Objective-C: ```java [[SCServiceCloud sharedInstance].chatCore addEventDelegate:myEventDelegate]; ``` 5. Start the session using `startSession(with:)` on [`SCSChat`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSChat.html). In Swift: ```java ServiceCloud.shared().chatCore.startSession(config) ``` In Objective-C: ```java [[SCServiceCloud sharedInstance].chatCore startSessionWithConfiguration:config]; ``` 6. Send activity to the [`SCSChatSession`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSChatSession.html) object found in [`SCSChat`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSChat.html). You can access the session object either from the `SCSChat.session` property, or from any of your delegate event methods that the SDK calls. With this session object, you can: - Send sneak peek data about the user's message to the agent with `sendSneakPeek`. - Send a message to the agent with `sendMessage`. - Get or set the user's typing status with `userTyping`. - Get information about the actors in the chat session with `actors`. - Get the history of all events from the chat session with `allEvents`. - Get the current queue position when the user is waiting for an agent with `queuePosition`. # Business Continuity Appliance Represents a Business Continuity Appliance configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Device. ## Configuration Item Type Definition ||| |-|-| |Name|Business Continuity Appliance| |Developer Name|`SD_BuCoAp`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-device.md)| |Rule Name|Default rule for all AWS Target Groups| |Identifier(s)|Target Group ARN| ## Attributes No associated attributes for this configuration item type. # Business Hours for Android If you've set up business hours in Salesforce, use the `retrieveBusinessHours` method to check for business hours and handle things accordingly. For instance, you can hide the chat button outside of business hours. When using the UI SDK, customers see a banner in the chat window when it's outside of business hours. To configure business hours for your deployment, see [Set Business Hours in Enhanced Chat](https://help.salesforce.com/s/articleView?id=service.miaw_business_hours.htm). **important:** This feature requires version 1.3.0 or later of the Enhanced In-App Chat SDK. This article applies to the following implementations: | UI SDK | Core SDK | | :----: | :------: | | ✅ | ✅ | Retrieve the business hours from the core client object using the `retrieveBusinessHours` method, and then determine how to proceed based on that information. This method returns the business hours over the next 24 hours. You can use the helper method `isWithinBusinessHours` to determine whether a time is within business hours; specifying no argument uses the current time. **note:** This sample requires the configuration object that you created when setting up the UI SDK or the Core SDK. See [Build a UI SDK App](https://developer.salesforce.com/docs/service/messaging-in-app/guide/android-ui-sdk.md) or [Build a Core SDK App](https://developer.salesforce.com/docs/service/messaging-in-app/guide/android-core-sdk.md) for more information. ```kotlin private val scope = CoroutineScope(Dispatchers.Main + supervisorJob) fun handleBusinessHours() { // Handle business hours suspend function within a scope scope.launch { // Create a core client from a config val coreClient = CoreClient.Factory.create(myContext, config) // Get business hours info val result = coreClient.retrieveBusinessHours() val businessHoursInfo: BusinessHoursInfo? = (result as? Result.Success)?.data // Determine whether we're currently within business hours if (businessHoursInfo?.isWithinBusinessHours() != false) { // TO DO: Handle when we're within business hours } else { // TO DO: Handle when we're outside of business hours } // Alternatively, you can inspect the business hours info. // For instance, get specific business hours time periods // using the businessHoursInfo.businessHours list. } } ``` # Business Hours for iOS If you've set up business hours in Salesforce, use the `retrieveBusinessHours` method to check for business hours and handle things accordingly. For instance, you can hide the chat button outside of business hours. When using the UI SDK, customers see a banner in the chat window when it's outside of business hours. To configure business hours for your deployment, see [Set Business Hours in Enhanced Chat](https://help.salesforce.com/s/articleView?id=service.miaw_business_hours.htm). **important:** This feature requires version 1.3.0 or later of the Enhanced In-App Chat SDK. This article applies to the following implementations: | UI SDK | Core SDK | | :----: | :------: | | ✅ | ✅ | Retrieve the business hours from the core client object using the `retrieveBusinessHours` method, and then determine how to proceed based on that information. This method returns the business hours over the next 24 hours. You can use the helper method `isWithinBusinessHours` to determine whether a time is within business hours; specify `nil` for the `comparisonTime` to use the current time. **note:** This sample requires the configuration object that you created when setting up the UI SDK or the Core SDK. See [Build a UI SDK App](https://developer.salesforce.com/docs/service/messaging-in-app/guide/ios-ui-sdk.md) or [Build a Core SDK App](https://developer.salesforce.com/docs/service/messaging-in-app/guide/ios-core-sdk.md) for more information. ```swift // Create a core client from a config let coreClient = CoreFactory.create(withConfig: config) // Get business hours info coreClient.retrieveBusinessHours { (businessHoursInfo, error) in // Determine whether we're currently within business hours if businessHoursInfo?.isWithinBusinessHours(comparisonTime: nil) ?? true { // TO DO: Handle when we're within business hours } else { // TO DO: Handle when we're outside of business hours } // Alternatively, you can inspect the business hours info. // For instance, get specific business hours time periods // using the businessHoursInfo.businessHours list. } ``` # Call Center Definition File Format A call center definition file consists of three XML elements: `callCenter`, `section`, and `item`. This list provides details about the properties and attributes of each element: - `callCenter` This element represents a definition for a single call center phone system. At least one `` element must be included in every call center definition file. A `` element consists of one or more `
` elements. - `section` This element represents a grouping of related data fields, such as server information or dialing prefixes. When a call center is edited in Salesforce, fields are organized by the section to which they are assigned. A `
` element belongs to a single `` element, and consists of one or more `` elements. Attributes: |Name|Type|Required?|Description| |------|------|-----------|-------------| |`sortOrder`|Positive Integer|Required|The order in which the section appears when the call center is edited in Salesforce. For example, a section with `sortOrder="1"` comes just before a section with `sortOrder="2"`. The values for `sortOrder` must be non-negative integers, and no numbers can be skipped within a single call center definition. For example, if there are three section elements in a call center definition file, one `
` element must have `sortOrder="0"`, one `
` element must have `sortOrder="1"`, and one `
` element must have `sortOrder="2"`.| |`name`|String|Required|The internal name of the section as defined in the Salesforce database. You can use this value to refer to the section when writing custom adapter or SoftPhone code.Names must be composed of only alphanumeric characters with no white space or other punctuation. They are limited to 40 characters each.Names beginning with `req` are reserved for required Salesforce sections only. Other reserved words that cannot be used for the `name` attribute include `label`, `sortOrder`, `internalNameLabel`, and `displayNameLabel`.| |`label`|String|Optional|The name of the section when viewed in Salesforce. Labels can be composed of any string of UTF-8 characters. They are limited to 1000 characters each.| - `item` This element represents a single field in a call center definition, such as the IP address of a primary server or the dialing prefix for international calls. When call centers are edited in Salesforce, each `` element is listed under the section to which it belongs. You can have multiple `` elements in a `
` element. Attributes: |Name|Type|Required?|Description| |------|------|-----------|-------------| |`sortOrder`|Positive Integer|Required|The order in which the item appears when the call center is edited in Salesforce. For example, an item with `sortOrder="1"` comes just before an item with `sortOrder="2"`. The values for `sortOrder` must be non-negative integers, and no numbers can be skipped within a single call center definition. For example, if there are three item elements in a call center definition file, one `` element must have `sortOrder="0"`, one `` element must have `sortOrder="1"`, and one `` element must have `sortOrder="2"`.| |`name`|String|Required|The internal name of the item as defined in the Salesforce database. You can use this value to refer to the item when writing a custom adapter or SoftPhone code.Names must be composed of only alphanumeric characters with no white space or other punctuation. They are limited to 40 characters each.Names beginning with `req` are reserved for required Salesforce sections only. Other reserved words that cannot be used for the `name` attribute include `label`, `sortOrder`, `internalNameLabel`, and `displayNameLabel`.| |`label`|String|Optional|The name of the item when viewed in Salesforce. Labels can be composed of any string of UTF-8 characters. They are limited to 1,000 characters each.| # Call Center Definition Files A call center definition file specifies a set of fields and values that are used to define a call center in Salesforce for a particular softphone. Salesforce uses call center definition files to support the integration of Salesforce CRM Call Center with multiple CTI system vendors. **important:** Open CTI is in maintenance mode and is scheduled for retirement in February 2028. No new features or enhancements are being added to Open CTI. Effective immediately, Open CTI is deprecated and unavailable for newly created Agentforce Service orgs. To ensure long-term compatibility and access to the latest innovations, we recommend transitioning your development efforts to Salesforce Voice. For more information, see this [Knowledge Article](https://help.salesforce.com/s/articleView?id=005306437&type=1), [learning map](https://help.salesforce.com/s/articleView?id=service.cti_migrate_map.htm), and [developer migration guide](/docs/service/api-cti/guide/migrate-cti.html). A call center in Salesforce CRM Call Center must have a call center definition file that works specifically with a softphone. If you build a custom softphone with Open CTI, you must write a call center definition file to support it. The first instance of a call center for a particular softphone must be defined by importing the adapter's call center definition file into Salesforce. Subsequent call centers can be created by cloning the original call center that was created with the import. If your organization modifies a softphone or builds a new one, you must customize the softphone’s call center definition file so that it includes any additional call center information that is required. For example, if you are building a softphone for a system that supports a backup server, your call center definition file should include fields for the backup server's IP address and port number. Softphones for systems that don’t have a backup server, don’t need those fields in their associated call center definition files. Use a text or XML editor to define a call center definition file. **important:** The way you implement Open CTI depends on your org’s user interface. There are separate Open CTI APIs for Salesforce Classic and Lightning Experience. The `reqSalesforceCompatibilityMode` item in your call center definition file identifies the user interface you plan to use—Salesforce Classic, Lightning Experience, or both. If no value is specified, the default is `Classic`. This item is optional, but to make calls in Lightning Experience you must specify `Lightning` or `Classic_and_Lightning`. - **[Call Center Definition File Format](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-call-def-file-xml.md)** A call center definition file consists of three XML elements: `callCenter`, `section`, and `item`. - **[Required Call Center Elements and Attributes](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-call-def-file-required.md)** The call center definition file must include the required `` elements in the `
` element. - **[Optional Call Center Elements and Attributes](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-call-def-file-optional.md)** The call center definition file can include optional `` elements in the `
` element. - **[Specify Values for \ Elements](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-call-def-file-item.md)** With the exception of the `reqInternalName` ``, whose value must always be specified in a call center definition file, you can specify `` values either in the call center definition file or in Salesforce once the definition file has been imported. - **[Sample Call Center Definition File](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-call-def-file-sample.md)** Each call center definition file looks different. This example shows you what a call center definition file looks like for an org using Salesforce Classic and Lightning Experience. # cancelFileTransferByAgent() Indicates that a file transfer request has been canceled by an agent. Available in API version 31.0 or later. ## Syntax ```javascript sforce.console.chat.cancelFileTransferByAgent(chatKey:String, (optional)callback:Function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`chatKey`|String|The chat key for the chat for which the agent canceled the file transfer request.| |`callback`|function|JavaScript method that is called when the method is completed.| ## Sample Code–Visualforce ```apex_page Cancel file transfer ``` ## Response This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following properties: |Name|Type|Description| |----|----|-----------| |`success`|Boolean|`true` if canceling the file transfer request was successful; `false` if canceling the file transfer request wasn’t successful.| # Case Employee Concierge uses the standard object Case to store and manage employee support ticket data. The Employee Concierge managed package also installs a custom field for the Case object. ## Custom Fields | Field | Type | Properties | Description | | --------------------------- | -------- | --------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | wkdw\_\_TicketCategory\_\_c | picklist | Create, Filter, Group, Nillable, Sort, Update | Specifies the API name of the type of support ticket created by an employee or IT Agent. Available on the new ticket form if more than one category exists. By default, Employee Concierge includes one ticket category, `IT`. Available in API version 51.0 and later. The API name value in this field must match the value in the wkdw_Name\_\_c field on the related wkdw_TicketCategoryDefinition\_\_mdt record. | ## Usage To create more ticket categories, use the custom metadata type wkdw\_\_TicketCategoryDefinition\_\_mdt. If you add ticket categories, use the Ticket Category field (wkdw\_\_TicketCategory\_\_c) to give users the ability to choose from a list of available categories when creating a ticket. Ticket categories can be based on any business need or classification, such as electrical, mechanical, or HR. **See Also** - [wkdw\_\_TicketCategoryDefinition\_\_mdt](https://developer.salesforce.com/docs/service/workdotcom-dev/guide/wkdw-sforce-api-objects-ticketcategorydefinition__mdt.md) # CertDisposalOrderLineItem Links an individual asset to a certificate of disposal for audit traceability. This object is available in API version 67.0 and later. ## Supported Calls `create()`, `delete()`, `describeLayout()`, `describeSObjects()`, `getDeleted()`, `getUpdated()`, `query()`, `retrieve()`, `undelete()`, `update()`, `upsert()` ## Fields ### CertificateOfDisposalId - **Type**: reference - **Properties**: Create, Filter, Group, Sort - **Description**: The certificate of disposal associated with the disposal order line item. This field is a relationship field. - **Relationship Name**: CertificateOfDisposal - **Relationship Type**: Master-detail - **Refers To**: CertificateOfDisposal (the master object) ### DisposalOrderId - **Type**: reference - **Properties**: Filter, Group, Nillable, Sort - **Description**: The unique identifier of the disposal order line item. This field is a relationship field. - **Relationship Name**: DisposalOrder - **Refers To**: DisposalOrder ### DisposalOrderLineItemId - **Type**: reference - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The unique identifier of the disposal order line item. This field is a relationship field. - **Relationship Name**: DisposalOrderLineItem - **Refers To**: DisposalOrderLineItem ### LastReferencedDate - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: The date and time when the disposal order line item was last referenced. ### LastViewedDate - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: The date and time when the disposal order line item was last viewed. ### Name - **Type**: string - **Properties**: Autonumber, Defaulted on create, Filter, idLookup, Sort - **Description**: An auto-assigned number that identifies the disposal order line item. # CertificateOfDisposal Stores the proof of disposal for compliance and audit purposes. This object is available in API version 67.0 and later. ## Supported Calls `create()`, `delete()`, `describeLayout()`, `describeSObjects()`, `getDeleted()`, `getUpdated()`, `query()`, `retrieve()`, `search()`, `undelete()`, `update()`, `upsert()` ## Fields ### CertificateName - **Type**: string - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The user-defined name of the certificate of disposal, used to identify and search for the record. ### DisposalAddress - **Type**: address - **Properties**: Filter, Nillable - **Description**: The physical address where the assets were disposed of. ### DisposalCity - **Type**: string - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The city of the disposal site. ### DisposalCountry - **Type**: string - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The country of the disposal site. ### DisposalGeocodeAccuracy - **Type**: picklist - **Properties**: Create, Filter, Group, Nillable, Restricted picklist, Sort, Update - **Description**: The geocode accuracy of the disposal site. - **Possible values**: - `Address` - `Block` - `City` - `County` - `ExtendedZip` - `NearAddress` - `Neighborhood` - `State` - `Street` - `Unknown` - `Zip` ### DisposalLatitude - **Type**: double - **Properties**: Create, Filter, Nillable, Sort, Update - **Description**: The latitude of the disposal site. ### DisposalLongitude - **Type**: double - **Properties**: Create, Filter, Nillable, Sort, Update - **Description**: The longitude of the disposal site. ### DisposalMethod - **Type**: picklist - **Properties**: Create, Filter, Group, Nillable, Restricted picklist, Sort, Update - **Description**: The method used to dispose of the assets. - **Possible values**: - `DESTRUCTION` - `DONATION` - `MIXED` - `RECYCLE` - `RESALE` - `RETURN_TO_VENDOR` - `TO_BE_DETERMINED` ### DisposalPostalCode - **Type**: string - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The postal or zip code of the disposal site. ### DisposalState - **Type**: string - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The state or province of the disposal site. ### DisposalStreet - **Type**: textarea - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The street address of the disposal site. ### DisposalType - **Type**: picklist - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The category of the disposal process. ### FileReviewStatus - **Type**: picklist - **Properties**: Create, Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort, Update - **Description**: Determines the specific stage of the asset disposal process that this certificate verifies. - **Default value**: `DRAFT` - **Possible values**: - `DRAFT` - `VERIFIED` ### IsFinalCertificate - **Type**: boolean - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: Indicates whether to finalize the disposal process (`true`) or not (`false`). This confirms that all necessary certificates are attached and permanently locks the parent Disposal Order. ### IssuedDate - **Type**: date - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The date when the certificate was issued. ### LastReferencedDate - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: The date and time when the certificate of disposal was last referenced. ### LastViewedDate - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: The date and time when the certificate of disposal was last viewed. ### Name - **Type**: string - **Properties**: Autonumber, Defaulted on create, Filter, idLookup, Sort - **Description**: An auto-assigned number that identifies the certificate of disposal. ### OwnerId - **Type**: reference - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: The user who owns the certificate of disposal. This field is a polymorphic relationship field. - **Relationship Name**: Owner - **Refers To**: Group, User ### VerificationDate - **Type**: date - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The date and time when the disposal was verified. ### VerifiedById - **Type**: reference - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The user who verified the disposal. This field is a relationship field. - **Relationship Name**: VerifiedBy - **Refers To**: User # CertificateOfDisposalHistory Represents the history of changes made to a certificate of disposal. This object is available in API version 67.0 and later. ## Supported Calls `describeSObjects()`, `getDeleted()`, `getUpdated()`, `query()`, `retrieve()` ## Fields ### CertificateOfDisposalId - **Type**: reference - **Properties**: Filter, Group, Sort - **Description**: The certificate of disposal associated with the history entry. This field is a relationship field. - **Relationship Name**: CertificateOfDisposal - **Refers To**: CertificateOfDisposal ### DataType - **Type**: picklist - **Properties**: Filter, Group, Nillable, Restricted picklist, Sort - **Description**: The data type of the changed field. - **Possible values**: - `Address` - `AnyType` - `AutoNumber` - `Base64` - `BitVector` - `Boolean` - `Content` - `Currency` - `DataCategoryGroupReference` - `DateOnly` - `DateTime` - `Division` - `Double` - `DynamicEnum` - `Email` - `EncryptedBase64` - `EncryptedText` - `EntityId` - `EnumOrId` - `ExternalId` - `Fax` - `File` - `HtmlMultiLineText` - `HtmlStringPlusClob` - `InetAddress` - `Json` - `Location` - `MultiEnum` - `MultiLineText` - `Namespace` - `Percent` - `PersonName` - `Phone` - `Raw` - `RecordType` - `SfdcEncryptedText` - `SimpleNamespace` - `StringPlusClob` - `Switchable_PersonName` - `Text` - `TimeOnly` - `Url` - `YearQuarter` ### Field - **Type**: picklist - **Properties**: Filter, Group, Restricted picklist, Sort - **Description**: The field that was changed. - **Possible values**: - `CertificateName`—Certificate Name - `DisposalAddress`—Disposal Address - `DisposalCity`—City - `DisposalCountry`—Country - `DisposalGeocodeAccuracy`—Geocode Accuracy - `DisposalLatitude`—Latitude - `DisposalLongitude`—Longitude - `DisposalMethod`—Disposal Method - `DisposalPostalCode`—Zip/Postal Code - `DisposalState`—State/Province - `DisposalStreet`—Address - `DisposalType`—Disposal Type - `FileReviewStatus`—File Review Status - `IsFinalCertificate`—Final Certificate - `IssuedDate`—Issued Date - `Owner`—Owner Name - `VerificationDate`—Verification Date - `VerifiedBy`—Verified By - `created`—Created. - `customPersonMerged`—Custom Person Merged - `feedEvent`—Feed event - `individualMerged`—Individual Merged - `locked`—Record locked. - `ownerAccepted`—Owner (Accepted) - `ownerAssignment`—Owner (Assignment) - `unlocked`—Record unlocked. ### NewValue - **Type**: anyType - **Properties**: Nillable, Sort - **Description**: The new value of the changed field. ### OldValue - **Type**: anyType - **Properties**: Nillable, Sort - **Description**: The previous value of the changed field. # CertificateOfDisposalShare Represents a sharing entry on a certificate of disposal. This object is available in API version 67.0 and later. ## Supported Calls `create()`, `delete()`, `describeSObjects()`, `query()`, `retrieve()`, `update()`, `upsert()` ## Fields ### AccessLevel - **Type**: picklist - **Properties**: Create, Filter, Group, Restricted picklist, Sort, Update - **Description**: The level of access that the user or group has to the certificate of disposal. - **Possible values**: - `All`—Owner - `Edit`—Read/Write - `Read`—Read Only ### ParentId - **Type**: reference - **Properties**: Create, Filter, Group, Sort - **Description**: The certificate of disposal associated with the sharing entry. This field is a relationship field. - **Relationship Name**: Parent - **Refers To**: CertificateOfDisposal ### RowCause - **Type**: picklist - **Properties**: Create, Filter, Group, Nillable, Restricted picklist, Sort - **Description**: The reason why the user or group is granted access to the certificate of disposal. - **Possible values**: - `ALMAssignmentSharing`—Actionable List Member Sharing Rule - `CompliantDataSharing`—Compliant Data Sharing - `GuestParentImplicit`—Associated guest user sharing - `GuestPersonImplicit`—Associated Guest User Sharing - `GuestRule`—Guest User Sharing Rule - `ImplicitChild`—Account Sharing - `ImplicitParent`—Associated record owner or sharing - `ImplicitPerson`—Person Contact - `LSC4CEAutoShare`—Lifesciences Commercial Auto Share - `LearningAssignment`—Learning Assignment Share - `LearningAssignmentImplicit`—Learning Assignment Implicit Share - `LearningItemAssignment`—Learning Item Assignment Share - `Manual`—Manual Sharing - `MfgTargetShare`—Manufacturing Target Sharing Rule - `ObligationAssigneeShare`—Obligation Assignee Share - `Owner` - `Rule`—Sharing Rule - `SharingRecordCollection`—Record Collection - `SurveyShare`—Survey Sharing Rule - `Team`—Sales Team - `Territory`—Territory Assignment Rule - `Territory2AssociationManual`—Territory Manual - `Territory2Forecast`—Territory assignment for forecasting and reporting - `Territory2SplitsForecast`—Territory Splits Share - `TerritoryManual`—Territory Manual - `TerritoryRule`—Territory Sharing Rule ### UserOrGroupId - **Type**: reference - **Properties**: Create, Filter, Group, Sort - **Description**: The user or group associated with the sharing entry. This field is a polymorphic relationship field. - **Relationship Name**: UserOrGroup - **Refers To**: Group, User # Change a Visualforce Page by Using the Salesforce Console Integration Toolkit Each implementation of Salesforce Console Integration Toolkit can look different. This example shows how to change the Salesforce console user interface using the Salesforce Console Integration Toolkit. **note:** Due to third-party cookie restrictions in modern web browsers, Visualforce pages can’t load in Salesforce Classic console apps when third-party cookies are disabled. See [Visualforce Limitations in Salesforce Classic When Third-Party Cookies are Blocked](https://help.salesforce.com/s/articleView?id=003786014&type=1). 1. Create a Visualforce page. 2. Cut and paste the following sample code into your Visualforce page. This code demonstrates various functions of the Salesforce Console Integration Toolkit: ```apex_page Open A Primary Tab

Open A Subtab

Set Title to Example

Close This Tab ``` 3. Create a custom link for cases that use your Visualforce page. 4. Edit the page layout for cases and add your custom link. 5. Add any domains to the console’s allowlist. **note:** To see this example in action, click the custom link on a case. For more information, see [Define Custom Buttons and Links](https://help.salesforce.com/s/articleView?id=defining_custom_links.htm) in Salesforce Help. Here’s the sample Visualforce page loaded in the console. ![output of sample visualforce page with various functions of the service cloud console integration toolkit](https://developer.salesforce.com/media/api-console/sample_console_vf_page.png) **See Also** - [*Visualforce Developer Guide*](https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/) - [*Salesforce Help*: Create and Edit Page Layouts](https://help.salesforce.com/apex/HTViewHelpDoc?id=customize_layoutcreate.htm) - [*Salesforce Help*: Allow Domains for a Salesforce Console in Salesforce](https://help.salesforce.com/apex/HTViewHelpDoc?id=console2_allowed_domains.htm) # Change Appointment Candidates If the assigned resources mark themselves absent, use the `query` request on the `ServiceTerritoryMember` object to show the list of alternative resources. Create a page in your app where you can show the available service resources based on the service territory. This sample REST API call uses the `query` request to retrieve the alternate resources. **Resource URI** ```nolang https://YOUR_INSTANCE.salesforce.com/services/data/vXX.X/query/?q=SELECT+EffectiveStartDate,EffectiveEndDate,ServiceResourceId,ServiceTerritoryId+FROM+ServiceTerritoryMember ``` Where `YOUR_INSTANCE` is a variable. **Sample Response** The API returns the available time slots and service resources. ```nolang { "totalSize" : 55, "done" : true, "records" : [ { "attributes" : { "type" : "ServiceTerritoryMember", "url" : "/services/data/v53.0/sobjects/ServiceTerritoryMember/0HuB0000000TalUKAS" }, "EffectiveStartDate" : "2021-10-22T15:00:00.000+0000", "EffectiveEndDate" : null, "ServiceResourceId" : "0HnB0000000TbgFKAS", "ServiceTerritoryId" : "0HhB0000000TakhKACC" }, { "attributes" : { "type" : "ServiceTerritoryMember", "url" : "/services/data/v53.0/sobjects/ServiceTerritoryMember/0HuB0000000TaleKAC" }, "EffectiveStartDate" : "2021-10-22T15:00:00.000+0000", "EffectiveEndDate" : null, "ServiceResourceId" : "0HnB0000000TbgDKAS", "ServiceTerritoryId" : "0HhB0000000TakhKAC" }, { "attributes" : { "type" : "ServiceTerritoryMember", "url" : "/services/data/v53.0/sobjects/ServiceTerritoryMember/0HuB0000000TaloKAC" }, "EffectiveStartDate" : "2021-10-22T15:00:00.000+0000", "EffectiveEndDate" : null, "ServiceResourceId" : "0HnB0000000TbgjKAC", "ServiceTerritoryId" : "0HhB0000000TakhKAC" } ] } ``` Parse the JSON response, and show the available service resources on the page so that the user can select a primary service resource. Here’s how a **Select Service Resource** page can look. ![A representation of the Select Service Resource screen.](https://developer.salesforce.com/media/salesforce-scheduler-dev-guide/screen_primary_resource.png) Here’s how a page can look when the user selects a primary service resource. ![A representation of the Select Service Resource screen with the primary resource selected.](https://developer.salesforce.com/media/salesforce-scheduler-dev-guide/screen_select_primary_resource.png) On the next page in your app, show the selected primary resource. You can also show the other service resources, including assets, so that users can add them as required resources. Then, show the consolidated time slots for all the selected resources. # Change Appointment Details This section explains how you can show either the engagement channel types, service resources, or time slots page based on what the user chooses to change for the appointment. - **[Change Engagement Channel Type](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/build-custom-apps/usecase4/uc4-get-work-types-engagement-channels.md)** An engagement channel is a medium, such as Phone, Video, and In Person that service resources use to meet customers. - **[Change Service Resource](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc4-get-appointment-candidates.md)** A service resource represents an employee from your organization, such as a loan officer, investment advisor, doctor, nurse practitioner, or retail store specialist, who attends appointments with clients. - **[Change Appointment Time](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc4-get-appointment-slots.md)** A time slot represents a period in a day when an appointment can be scheduled. # Change Appointment Details This section explains how you can show either the service resources or time slots page based on what the user chooses to change for the appointment. Depending on the requirement, you can choose one of the two options. - **[Change Appointment Candidates](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc7-change-appointment-candidates.md)** If the assigned resources mark themselves absent, use the `query` request on the `ServiceTerritoryMember` object to show the list of alternative resources. - **[Change Appointment Time Slots](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc7-get-appointment-slots.md)** A time slot represents a period in a day when an appointment takes place. a multi-resource service appointment can be modified. To show the alternative tome slots for the assigned resources, use the `getAppointmentSlots` REST API. # Change Appointment Time A time slot represents a period in a day when an appointment can be scheduled. 1. Create a page to show the available time slots for the resource associated with the appointment. 2. Make a POST request on the [`getAppointmentSlots`](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/requests_ls_getappointmentslots.htm) REST API by passing the required `workTypeGroupId` or `workTypeId` parameter along with the .`territoryId` parameter. **Resource URI** ```nolang https://yourInstance.salesforce.com/services/data/v68.0/scheduling/getAppointmentSlots ``` **Sample Request** Using the `WorkTypeId` parameter. ```nolang { "workType": { "id": "08qS70000004DQsIAM" }, "territoryIds": [ "0HhS700000001DYKAY" ], "requiredResourceIds": [ "0HnS700000002jAKAQ" ], "accountId": "001S7000001pFlJIAU", "schedulingPolicyId": "2F0VrRM0000004CUV", "engagementChannelTypeIds": [ "0eFS70000004CGFMA2" ] } ``` Using the `WorkTypeGroupId` parameter. ```nolang { "workTypeGroupId": "0VS2x0000008ZotGAE", "accountId": "001S7000001pFlJIAU", "schedulingPolicyId": "2F0VrRM0000004CUV", "territoryIds": [ "0HhS700000001DYKAY" ], "requiredResourceIds": [ "0HnS700000002jAKAQ" ], "engagementChannelTypeIds": [ "0eFS70000004CGFMA2" ] } ``` **Sample Response** The API returns the available time slots for a resource. ```nolang { "timeSlots" : [ { "endTime" : "2023-03-26T17:55:00.000+0000", "remainingAppointments" : 1, "startTime" : "2023-03-26T17:30:00.000+0000", "territoryId" : "0HhS700000001DYKAY" }, { "endTime" : "2023-03-30T16:55:00.000+0000", "remainingAppointments" : 1, "startTime" : "2023-03-30T16:30:00.000+0000", "territoryId" : "0HhS700000001DYKAY" }, { "endTime" : "2023-04-02T16:55:00.000+0000", "remainingAppointments" : 1, "startTime" : "2023-04-02T16:30:00.000+0000", "territoryId" : "0HhS700000001DYKAY" }, { "endTime" : "2023-04-04T18:25:00.000+0000", "remainingAppointments" : 1, "startTime" : "2023-04-04T18:00:00.000+0000", "territoryId" : "0HhS700000001DYKAY" } ] } ``` 3. Parse the JSON response, and show the available time slots on the page. Your users can select a time slot for the appointment from the page. # Change Appointment Time Slots A time slot represents a period in a day when an appointment takes place. a multi-resource service appointment can be modified. To show the alternative tome slots for the assigned resources, use the `getAppointmentSlots` REST API. Create a page in your app to show the selected primary resource, other required resources, including assets, and the consolidated time slots for the primary service resource and required resources that users select. Here’s how a page can look. ![A representation of the manage multiple service resource screen.](https://developer.salesforce.com/media/salesforce-scheduler-dev-guide/screen_manage_multi_resources.png) When the user selects one or more required resources, refresh the available time slots by making a POST request to the [getAppointmentSlots](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/requests_ls_getappointmentslots.htm) REST API and passing the selected required resources along with the `workTypeGroupId` and `territoryId` parameters. **Resource URI** ```nolang https://YOUR_INSTANCE.salesforce.com/services/data/vXX.X/scheduling/getAppointmentSlots ``` Where `YOUR_INSTANCE` is a variable. **Sample Request** ```nolang { "startTime" : "2021-10-04T17:00:00.000+0000", "endTime" : "2021-10-04T18:00:00.000+0000", "workTypeId" : { "08qB0000000Tf1FIAS" }, "accountId" : "001B000001McLhMIAV", "territoryIds" : ["0HhB0000000TaHOKA0"], "primaryResourceId" : "0HnB0000000TavDKAS", "requiredResourceIds" : ["0HnB0000000DynTKAS", "0HnB0000000Tav3KAC"] } ``` **Sample Response** The API returns the time slots where the selected primary resource and required resources are available for the multi-resource service appointment. ```nolang { "timeSlots" : [ { "endTime" : "2021-10-04T18:00:00.000+0000", "startTime" : "2021-10-04T17:00:00.000+0000", "territoryId" : "0HhB0000000TaHOKA0" }, { "endTime" : "2021-10-04T19:00:00.000+0000", "startTime" : "2021-10-04T17:00:00.000+0000", "territoryId" : "0HhB0000000TaHOKA0" }, { "endTime" : "2021-10-04T20:00:00.000+0000", "startTime" : "2021-10-04T17:30:00.000+0000", "territoryId" : "0HhB0000000TaHOKA0" }, { "endTime" : "2021-10-04T18:00:00.000+0000", "startTime" : "2021-10-04T17:00:00.000+0000", "territoryId" : "0HhB0000000TaHOKA0" }, { "endTime" : "2021-10-04T18:30:00.000+0000", "startTime" : "2021-10-04T17:30:00.000+0000", "territoryId" : "0HhB0000000TaHOKA0" }, { "endTime" : "2021-10-04T18:00:00.000+0000", "startTime" : "2021-10-04T17:00:00.000+0000", "territoryId" : "0HhB0000000TaHOKA0" } ] } ``` Parse the JSON response, and show the available time slots for the selected resources. Here’s how a Select Service Appointment Time page can look. **note:** A multi-resource appointment can have a maximum of five required service resources: one primary required service resource plus four required service resources, including asset resources. ![A representation of the selected required resources screen.](https://developer.salesforce.com/media/salesforce-scheduler-dev-guide/screen_selected_requied_resources.png) On the next page in your app, you can show the appointment details for the user to review and create the appointment. # Change Engagement Channel Type An engagement channel is a medium, such as Phone, Video, and In Person that service resources use to meet customers. Before using engagement channels for scheduling appointments: - Enable engagement channels in the Salesforce Scheduler Settings of your instance. See [ Enable the Scheduling Appointments Using Engagement Channels Setting](https://help.salesforce.com/s/articleView?id=platform.ls_enable_schedule_appnt_using_engage_channels_setting.htm&type=5). - Set up engagement channels, including setting the required access and creating engagement channels. See [Engagement Channels](https://help.salesforce.com/s/articleView?id=platform.ls_engagement_channels.htm&type=5). - Create the Shift Engagement Channel and Engagement Channel Work Type records for the applicable shifts. - Define Shift Rules in the scheduling policy. See [Define Shift Rules in Scheduling Policy](https://help.salesforce.com/s/articleView?id=platform.ls_use_shifts_to_determine_time_slots.htm&type=5). 1. Make a `GET` request to the [`engagement-channel-types`](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_resources_engagement_channel_types.htm) API by passing the required `workTypeId` or `workTypeGroupId` parameter. **Sample Request** This sample API call uses the work type record representing the service territory to filter the engagement channel types. ```nolang https://yourInstance.salesforce.com/services/data/v68.0/​connect/scheduling/engagement-channel-types?workTypeIds=08qS70000004DQsIAM ``` **Sample Response** The request returns the engagement channel types. ```nolang { "result" : { "engagementChannelTypes" : [ { "contactPointType" : "InPerson", "id" : "0eFS70000004CG5MAM", "name" : "EngagementChannel1", "workTypeGroupIds" : [ ], "workTypeIds" : [ "08qS70000004DQsIAM" ] }, { "contactPointType" : "Video", "id" : "0eFS70000004CGFMA2", "name" : "EngagementChannel3", "workTypeGroupIds" : [ ], "workTypeIds" : [ "08qS70000004DQsIAM" ] } ] } } ``` 2. Parse the JSON response, and show the engagement channel types on the page. Your users can select a engagement channel type for the appointment from the page. 3. Make a GET request to the [`getAppointmentSlots`](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/requests_ls_getappointmentslots.htm) REST API to see if the appointment's original time slot is still available for the changed engagement channel type. Otherwise, show the available time slots for the selected engagement channel and allow your users to select a time slot. See [Change Appointment Time](https://developer.salesforce.com/docs/service/uc4-get-appointment-slots.md). # Change Service Resource A service resource represents an employee from your organization, such as a loan officer, investment advisor, doctor, nurse practitioner, or retail store specialist, who attends appointments with clients. 1. Create a page to show the available service resources. 2. Make a `POST` request on the [`getAppointmentCandidates`](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/requests_ls_getappointmentcandidates.htm) REST API by passing the required `workTypeId` and `territoryIds` parameters. **Resource URI** ```nolang https://yourInstance.salesforce.com/services/data/v68.0/scheduling/getAppointmentCandidates ``` **Sample Request** To consider an existing user’s preferred visiting hours, pass `accountId` in the input request body. The preference is enforced when the Include Only Required Service Resources and Ignore Excluded Service Resources policy rules are enabled. For more information, see [Add Service Resource Preferences to Accounts for Salesforce Scheduler](https://help.salesforce.com/s/articleView?id=platform.ls_add_service_resource_preferences_to_accounts.htm&type=5). ```nolang { "startTime": "2023-03-24T09:00:00.000+0000", "endTime": "2023-03-24T19:00:00.000+0000", "accountId": "001S7000001pFlJIAU", "workType": { "id": "08qS70000004DQsIAM" }, "territoryIds": [ "0HhS700000001DYKAY" ], "schedulingPolicyId": "2F0VrRM0000004CUV", "engagementChannelTypeIds": [ "0eFS70000004CGFMA2" ] } ``` **Sample Response** The API returns the available time slots and service resources. ```nolang { "candidates" : [ { "endTime" : "2023-03-24T17:00:00.000+0000", "engagementChannelTypeIds" : [ "0eFS70000004CGFMA2" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-03-24T16:00:00.000+0000", "territoryId" : "0HhS700000001DYKAY" }, { "endTime" : "2023-03-24T17:15:00.000+0000", "engagementChannelTypeIds" : [ "0eFS70000004CGFMA2" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-03-24T16:15:00.000+0000", "territoryId" : "0HhS700000001DYKAY" }, { "endTime" : "2023-03-24T17:30:00.000+0000", "engagementChannelTypeIds" : [ "0eFS70000004CGFMA2" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-03-24T16:30:00.000+0000", "territoryId" : "0HhS700000001DYKAY" }, { "endTime" : "2023-03-24T17:45:00.000+0000", "engagementChannelTypeIds" : [ "0eFS70000004CGFMA2" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-03-24T16:45:00.000+0000", "territoryId" : "0HhS700000001DYKAY" }, { "endTime" : "2023-03-24T18:00:00.000+0000", "engagementChannelTypeIds" : [ "0eFS70000004CGFMA2" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-03-24T17:00:00.000+0000", "territoryId" : "0HhS700000001DYKAY" }, { "endTime" : "2023-03-24T18:15:00.000+0000", "engagementChannelTypeIds" : [ "0eFS70000004CGFMA2" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-03-24T17:15:00.000+0000", "territoryId" : "0HhS700000001DYKAY" }, { "endTime" : "2023-03-24T18:30:00.000+0000", "engagementChannelTypeIds" : [ "0eFS70000004CGFMA2" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-03-24T17:30:00.000+0000", "territoryId" : "0HhS700000001DYKAY" }, { "endTime" : "2023-03-24T18:45:00.000+0000", "engagementChannelTypeIds" : [ "0eFS70000004CGFMA2" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-03-24T17:45:00.000+0000", "territoryId" : "0HhS700000001DYKAY" }, { "endTime" : "2023-03-24T19:00:00.000+0000", "engagementChannelTypeIds" : [ "0eFS70000004CGFMA2" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-03-24T18:00:00.000+0000", "territoryId" : "0HhS700000001DYKAY" } ] } ``` 3. Parse the JSON response, and show the available resources on the page. Your users can select a service resource for the appointment from the page. 4. Retrieve the available time slots for the selected engagement channel type and service resource. See [Change Appointment Time](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc4-get-appointment-slots.md). Your users can select a resource and a time slot for the appointment from the page. # ChangeRequest Standard fields extend the ChangeRequest object for use in Agentforce IT Service to represent the fix implemented for an issue. This object is available in API version 65.0 and later. ## Supported Calls `create()`, `delete()`, `describeLayout()`, `describeSObjects()`, `getDeleted()`, `getUpdated()`, `query()`, `retrieve()`, `search()`, `undelete()`, `update()`, `upsert()` ## Fields ### ActualStartDate - **Type**: dateTime - **Properties**: Create, Filter, Nillable, Sort, Update - **Description**: The date and time on which a change request is actually started. ### AssignedGroupId - **Type**: reference - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The group or queue to which the change request is assigned. This field is a relationship field. - **Relationship Name**: AssignedGroup - **Refers To**: Group ### AssignedUserId - **Type**: reference - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The primary user to whom the change request is assigned. This field is a relationship field. - **Relationship Name**: AssignedUser - **Refers To**: User ### BusinessHoursId - **Type**: reference - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The ID of the business hours related to the entitlement process for a change request. This field is a relationship field. - **Relationship Name**: BusinessHours - **Refers To**: BusinessHours ### CalculatedRiskScore - **Type**: int - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The score calculated by automated processes to determine how likely is the proposed change to cause risk. ### ClosedStatusCode - **Type**: picklist - **Properties**: Create, Filter, Group, Nillable, Restricted picklist, Sort, Update - **Description**: Specifies the status code for the change request when it's closed, such as Successful, Partially Successful, or Failed. - **Possible values**: - `Failed` - `PartiallySuccessful`—Partially Successful - `Successful` ### ClosedStatusComments - **Type**: textarea - **Properties**: Create, Nillable, Update - **Description**: The comments related to the change request when the status is Closed. ### CompletionDate - **Type**: dateTime - **Properties**: Create, Filter, Nillable, Sort, Update - **Description**: The date and time on which a change request is closed. ### EntitlementId - **Type**: reference - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The ID of the entitlement related to the change request. This field is a relationship field. - **Relationship Name**: Entitlement - **Refers To**: Entitlement ### ImplementationPlan - **Type**: textarea - **Properties**: Create, Nillable, Update - **Description**: The implementation plan related to a change request. ### IsClosed - **Type**: boolean - **Properties**: Defaulted on create, Filter, Group, Sort - **Description**: Indicates whether a change request is closed (true) or not (false). - **Default value**: `false` ### IsStopped - **Type**: boolean - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: Indicates whether a change request is paused for further processing (true) or not (false). - **Default value**: `false` ### MilestoneStatus - **Type**: string - **Properties**: Group, Nillable, Sort - **Description**: The milestone status related to the entitlement process for a change request. ### RequestedById - **Type**: reference - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The user who requests the change request. This field is a relationship field. - **Relationship Name**: RequestedBy - **Refers To**: User ### SlaExitDate - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: The date and time when the entitlement process ends for a change request. ### SlaStartDate - **Type**: dateTime - **Properties**: Create, Filter, Nillable, Sort, Update - **Description**: The date and time when the entitlement process starts for a change request. ### StopStartDate - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: The date and time when the change request is paused. ### SubCategory - **Type**: picklist - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: Specifies the subcategory of a change request. ### TestPlan - **Type**: textarea - **Properties**: Create, Nillable, Update - **Description**: The test plan related to a change request. ### Type - **Type**: picklist - **Properties**: Create, Defaulted on create, Filter, Group, Nillable, Sort, Update - **Description**: Specifies the type of a change request, such as standard, normal, or emergency. The Type and Change Type fields are mutually exclusive and only one should be used at a time. - **Default value**: `Standard` - **Possible values**: - `Emergency` - `Normal` - `Standard` ### Urgency - **Type**: picklist - **Properties**: Create, Defaulted on create, Filter, Group, Nillable, Sort, Update - **Description**: Specifies the urgency of the change request. - **Default value**: `High` - **Possible values**: - `High` - `Low` - `Medium` For other fields on this object, see [*Object Reference for the Salesforce Platform*: ChangeRequest](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_changerequest.htm) # ChangeRequestCnfgItem Represents the relationship between a change request and a configuration item reference. This object is available in API version 65.0 and later. ## Supported Calls `create()`, `delete()`, `describeLayout()`, `describeSObjects()`, `getDeleted()`, `getUpdated()`, `query()`, `retrieve()`, `undelete()`, `update()`, `upsert()` ## Fields ### ChangeRequestId - **Type**: reference - **Properties**: Create, Filter, Group, Sort - **Description**: The change request with which a configuration item is related. This field is a relationship field. - **Relationship Name**: ChangeRequest - **Relationship Type**: Master-detail - **Refers To**: ChangeRequest (the master object) ### ConfigurationItemId - **Type**: reference - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The configuration item that represents the external configuration item record that's related to a change request. This field is a relationship field. - **Relationship Name**: ConfigurationItem - **Refers To**: ConfigurationItem ### LastReferencedDate - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: The timestamp when the current user last accessed this record, a record related to this record, or a list view. ### LastViewedDate - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: The timestamp when the current user last viewed this record or list view. ### Name - **Type**: string - **Properties**: Autonumber, Defaulted on create, Filter, idLookup, Sort - **Description**: Name of the record. ### RelationshipType - **Type**: picklist - **Properties**: Create, Filter, Group, Restricted picklist, Sort - **Description**: Specifies the type of relationship between a configuration item and the change request. - **Possible values**: - `Affected` - `Impacted` # ChangeRequestConflict Represents the details related to a conflict between a change request and other scheduled activities, such as scheduled events or other change requests that are planned for deployment in the same period. This object is available in API version 66.0 and later. ## Supported Calls `create()`, `delete()`, `describeLayout()`, `describeSObjects()`, `getDeleted()`, `getUpdated()`, `query()`, `retrieve()`, `search()`, `undelete()`, `update()`, `upsert()` ## Special Access Rules This object is available if Change Request Conflict Detection in enabled in your org. In the Change Management settings in Salesforce Go, turn on Change Request Conflict Detection. ## Fields ### ClosedDateTime - **Type**: dateTime - **Properties**: Create, Filter, Nillable, Sort, Update - **Description**: The date and time when the conflict is closed, by either marking it as resolved or ignored. ### CnflctDetectionRuleIdentifier - **Type**: string - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The flow-based rule or any other business logic that identified a conflict and created the change conflict record. ### CnflctPeriodEndDateTime - **Type**: dateTime - **Properties**: Create, Filter, Sort, Update - **Description**: The end date and time of the conflict period for a change request. ### CnflctPeriodStartDateTime - **Type**: dateTime - **Properties**: Create, Filter, Sort, Update - **Description**: The start date and time of the conflict period for a change request. ### Comments - **Type**: textarea - **Properties**: Create, Nillable, Update - **Description**: The comments related to the status of the change request conflict that stores business justifications, collaboration notes, and other information when the status is modified. ### ConflictNumber - **Type**: string - **Properties**: Autonumber, Defaulted on create, Filter, idLookup, Sort - **Description**: The autogenerated record number for a change request conflict. ### ConflictSourceConfigItemId - **Type**: reference - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The configuration item that is the source of the conflict for two or more change requests. This field is a relationship field. - **Relationship Name**: ConflictSourceConfigItem - **Refers To**: ConfigurationItem ### ConflictSourceRecordId - **Type**: reference - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The source record such as an event or another change request that causes the conflict. This field is a polymorphic relationship field. - **Relationship Name**: ConflictSourceRecord - **Refers To**: ChangeRequest, SrvcMgmntRecEvntAsgnt ### ConflictSourceUserId - **Type**: reference - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The user who is the source of the conflict for two or more change requests. This field is a relationship field. - **Relationship Name**: ConflictSourceUser - **Refers To**: User ### Description - **Type**: textarea - **Properties**: Create, Nillable, Update - **Description**: The description of a change request conflict. ### DetectedDateTime - **Type**: dateTime - **Properties**: Create, Filter, Sort, Update - **Description**: The most current date and time when the conflict is detected for a change request. ### Impact - **Type**: picklist - **Properties**: Create, Filter, Group, Sort, Update - **Description**: Specifies the business impact of the conflict if the conflict isn't resolved, such as critical, low, or medium. - **Possible values**: - `Critical` - `High` - `Low` - `Medium` ### ImpactedChangeRequestId - **Type**: reference - **Properties**: Create, Filter, Group, Sort - **Description**: The primary change request ID being analyzed. This field is a relationship field. - **Relationship Name**: ImpactedChangeRequest - **Relationship Type**: Master-detail - **Refers To**: ChangeRequest (the master object) ### LastReferencedDate - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: The timestamp when the current user last accessed this record, a record related to this record, or a list view. ### LastViewedDate - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: The timestamp when the current user last viewed this record or list view. ### ResolutionMethod - **Type**: picklist - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: Specifies the resolution method for a change request conflict, such as marking it as ignored or resolved. - **Possible values**: - `Change Canceled` - `Change Rescheduled` - `Marked Ignored` - `Marked Resolved` ### ResolvedById - **Type**: reference - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The user who resolves a change request conflict. This field is a relationship field. - **Relationship Name**: ResolvedBy - **Refers To**: User ### Status - **Type**: picklist - **Properties**: Create, Filter, Group, Sort, Update - **Description**: Specifies the status of a change request conflict, such as new, under review, or resolved. - **Possible values**: - `Awaiting Action` - `Closed` - `Ignored` - `New` - `Resolved` - `System Ignored` - `Under Review` ### Type - **Type**: picklist - **Properties**: Create, Filter, Group, Sort, Update - **Description**: Specifies the type of a change request conflict such as owner-based conflict or configuration item-based conflict. - **Possible values**: - `Change Owner Conflict` - `Configuration Item Conflict` - `Maintenance Window Conflict` - `Moratorium Window Conflict` ## Associated Objects This object has the following associated objects. If the API version isn't specified, they're available in the same API versions as this object. Otherwise, they're available in the specified API version and later. [ChangeRequestConflictFeed](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_associated_objects_feed.htm): Feed tracking is available for the object. [ChangeRequestConflictHistory](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_associated_objects_history.htm): History is available for tracked fields of the object. # chasitor.addCustomEventListener() Registers a function to call when a custom event is received in the chat window. Available in API version 29.0 or later. ## Syntax ```javascript liveagent.chasitor.addCustomEventListener(type:String, callback:Function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`type`|string|The type of custom event you want to listen for.| |`callback`|function|JavaScript method called upon completion of the method.| ## Sample Code–Visualforce ```apex_page ``` ## Response This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following methods: |Name|Type|Description| |----|----|-----------| |`getType`|method|Accesses the type of the custom event that was sent to this chat window. Returns the `type` argument of the `sforce.console.chat.sendCustomEvent()` method used to send this event.| |`getData`|method|Accesses the data of the custom event that was sent to this chat window. Returns the `data` argument of the `sforce.console.chat.sendCustomEvent()` method used to send this event.| |`getSource`|method|Accesses the source of the custom event that was sent to this chat window—for example, agent or chat visitor.| |`getDate`|method|Accesses the date of the custom event that was sent to this chat window. Returns the date and time the event was received.| # chasitor.getCustomEvents() Retrieves a list of custom events that have been received in this chat window during this chat session. Available in API version 29.0 or later. ## Syntax ```javascript liveagent.chasitor.getCustomEvents() ``` ## Sample Code–Visualforce ```apex_page Get Custom Events ``` ## Response This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following methods and properties: |Name|Type|Description| |----|----|-----------| |`events`|Array of `event` objects|An array of `event` objects. Each object represents a custom event that has occurred in this chat. Data on each message object can be accessed by the following methods:

  • `getType()`
  • `getData()`
  • `getSource()`
  • `getDate()`
| |`getType`|method|Accesses the type of the custom event that was sent to this chat window. Returns the `type` argument of the `sforce.console.chat.sendCustomEvent()` method used to send this event.| |`getData`|method|Accesses the data of the custom event that was sent to this chat window. Returns the `data` argument of the `sforce.console.chat.sendCustomEvent()` method used to send this event.| |`getSource`|method|Accesses the source of the custom event that was sent to this chat window—for example, agent or chat visitor.| |`getDate`|method|Accesses the date of the custom event that was sent to this chat window. Returns the date and time the event was received.| # chasitor.sendCustomEvent() Sends a custom event to the agent console of the agent who is currently chatting with a customer. Available in API version 29.0 or later. ## Syntax ```javascript liveagent.chasitor.sendCustomEvent(type:String, data:String) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`type`|string|The name of the custom event to send to the agent console.| |`data`|string|Additional data you want to send to the agent console along with the custom event.| ## Sample Code–Visualforce ```apex_page Send Custom Event ``` ## Response This method returns no responses. # Chassis Cluster Represents a Chassis Cluster configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. ## Configuration Item Type Definition ||| |-|-| |Name|Chassis Cluster| |Developer Name|`SD_ChCl`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Network Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-network-device.md)| |Rule Name|Default rule for all Business Continuity Appliances| |Identifier(s)|MAC address| ## Attributes ### Software Revision - **Type**: text - **Developer Name**: `SD_SoRe` - **Attribute Set**: [Device Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-device-details.md) - **Description**: The software revision of the Chassis Cluster. - **Required**: Optional # Chat in the Service Chat SDK for Android Using Chat within the Service Chat SDK, you can provide real-time chat sessions from within your native app. **important:** 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](https://help.salesforce.com/s/articleView?id=service.miaw_intro_landing.htm&type=5) before that date. Messaging offers many of the [chat features](https://help.salesforce.com/s/articleView?id=service.miaw_chat_vs_messaging.htm&type=5) that you love plus asynchronous conversations that can be picked back up at any time. Learn about chat retirement in [Help](https://help.salesforce.com/s/articleView?id=001790618&type=1). Once you’ve [set up chat for Service Cloud](https://developer.salesforce.com/docs/service/service-sdk-android/guide/shared/live-agent-cloud-setup.md), it takes [just a few calls to the SDK](https://developer.salesforce.com/docs/service/service-sdk-android/guide/android-chat-basic-setup.md) to have your app ready to handle agent chat sessions. When a chat session initiates, it is minimized by default so the user can keep using the app. ![Chat session minimized](https://developer.salesforce.com/docs/media/service-sdk/android_lac_chat_minimized.png '{"class": "image-sm"}') When the user taps the chat thumbnail, the app goes full screen. ![Chat session full screen](https://developer.salesforce.com/docs/media/service-sdk/android_lac_chat_normal.png '{"class": "image-sm"}') If you've implemented Einstein Bots, the user first [speaks with a chat bot](https://developer.salesforce.com/docs/service/service-sdk-android/guide/android-chat-einstein-bots.md) before optionally getting transferred to an agent. If the user isn't using the app during a chat session, they receive a new message notification when an agent sends a message. When an agent sends links to your users, they see link previews right from within the chat session. The SDK tries to use Open Graph meta tags (`og:title`, `og:description`, `og:image`) to extract relevant information for the preview. ![Chat session hyperlinks](https://developer.salesforce.com/docs/media/service-sdk/android_lac_chat_hyperlinks.png '{"class": "image-sm"}') You can also [customize the look and feel](https://developer.salesforce.com/docs/service/service-sdk-android/guide/android-customization.md) of the interface so that it fits naturally within your app. # Chat in the Service Chat SDK for iOS Using Chat within the Service Chat SDK, you can provide real-time chat sessions from within your native app. **important:** 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](https://help.salesforce.com/s/articleView?id=service.miaw_intro_landing.htm&type=5) before that date. Messaging offers many of the [chat features](https://help.salesforce.com/s/articleView?id=service.miaw_chat_vs_messaging.htm&type=5) that you love plus asynchronous conversations that can be picked back up at any time. Learn about chat retirement in [Help](https://help.salesforce.com/s/articleView?id=001790618&type=1). Once you’ve [set up chat for Service Cloud](https://developer.salesforce.com/docs/service/service-sdk-android/guides/shared/live-agent-cloud-setup.md), it takes [just a few calls to the SDK](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/live-agent-basic-setup.md) to have your app ready to handle agent chat sessions. ![Chat session](https://developer.salesforce.com/docs/media/service-sdk/lac-chat-publisher-ios.png '{"class": "image-sm"}') This chat session can be minimized so that the user can continue to navigate from within the app while speaking with an agent. And if you've implemented Einstein Bots, the user first [speaks with a chat bot](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/live-agent-einstein-bots.md) before optionally getting transferred to an agent. When an agent sends links to your users, they see link previews right from within the chat session. The SDK tries to use Open Graph meta tags (`og:title`, `og:description`, `og:image`) to extract relevant information for the preview. ![Chat hyperlinks](https://developer.salesforce.com/docs/media/service-sdk/lac-chat-hyperlinks-ios.png '{"class": "image-sm"}') You can also [customize the look and feel](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/servicesdk-ui-customization.md) of the interface so that it fits naturally within your app. These customizations include the ability to fine-tune the colors, the fonts, the images, and the strings used throughout the interface. # Check Agent Availability Before starting a session, you can check the availability of your chat agents and then provide your users with more accurate expectations. For instance, when no agents are available, you can hide or disable the button to contact an agent **important:** 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](https://help.salesforce.com/s/articleView?id=service.miaw_intro_landing.htm&type=5) before that date. Messaging offers many of the [chat features](https://help.salesforce.com/s/articleView?id=service.miaw_chat_vs_messaging.htm&type=5) that you love plus asynchronous conversations that can be picked back up at any time. Learn about chat retirement in [Help](https://help.salesforce.com/s/articleView?id=001790618&type=1). To check whether agents are available, create an [`AgentAvailabilityClient`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/AgentAvailabilityClient.html) object and asynchronously check the [`AvailabilityState`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/model/AvailabilityState.html) status. In Java: ```java // Build a configuration object ChatConfiguration chatConfiguration = new ChatConfiguration.Builder(ORG_ID, BUTTON_ID, DEPLOYMENT_ID, LIVE_AGENT_POD) .build(); // Create an agent availability client Boolean requestEstimatedWaitTime = false; // Don’t request if we don’t plan to use it AgentAvailabilityClient client = ChatCore.configureAgentAvailability(chatConfiguration, requestEstimatedWaitTime); // Check agent availability client.check().onResult(new Async.ResultHandler() { @Override public void handleResult (Async async, @NonNull AvailabilityState state) { switch (state.getStatus()) { case AgentsAvailable: { // TO DO: Handle the case where agents are available // Optionally, use the estimatedWaitTime to // show an estimated wait time until an agent // is available. This value is only valid // if you request it from the // configureAgentAvailability call above. // Estimate is returned in seconds. Integer ewt = state.getEstimatedWaitTime(); break; } case NoAgentsAvailable: { // TO DO: Handle the case where no agents are available break; } case Unknown: { break; } } }); ``` In Kotlin: ```java // Build a configuration object val chatConfiguration = ChatConfiguration.Builder(ORG_ID, BUTTON_ID, DEPLOYMENT_ID, LIVE_AGENT_POD).build() // Create an agent availability client val requestEstimatedWaitTime = false // Don’t request if we don’t plan to use it val client = ChatCore.configureAgentAvailability(chatConfiguration, requestEstimatedWaitTime) // Check agent availability client.check().onResult(object: Async.ResultHandler { override fun handleResult(operation: Async<*>?, result: AvailabilityState) { when (result.getStatus()) { AvailabilityState.Status.AgentsAvailable -> { // TO DO: Handle the case where agents are available // Optionally, use the estimatedWaitTime to // show an estimated wait time until an agent // is available. This value is only valid // if you request it from the // configureAgentAvailability call above. // Estimate is returned in seconds. val ewt = result.getEstimatedWaitTime() } AvailabilityState.Status.NoAgentsAvailable -> { // TO DO: Handle the case where no agents are available } } } }) ``` To understand the algorithm used for the estimated wait time, see the estimated wait time documentation in the [Chat REST API Developer Guide](https://developer.salesforce.com/docs/atlas.en-us.live_agent_rest.meta/live_agent_rest/live_agent_rest_estimated_wait_time.htm). You can also use this API to get an updated Chat server before starting a session to determine whether a server has changed for your pod. Call the `getLiveAgentPod` method from the [`AvailabilityState`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/model/AvailabilityState.html) object you get back from the [`AgentAvailabilityClient`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/AgentAvailabilityClient.html). If the server has changed, update this configuration value in the future to prevent an unnecessary round-trip request. # Check Agent Availability Before starting a session, you can check the availability of your chat agents and then provide your users with more accurate expectations. **important:** 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](https://help.salesforce.com/s/articleView?id=service.miaw_intro_landing.htm&type=5) before that date. Messaging offers many of the [chat features](https://help.salesforce.com/s/articleView?id=service.miaw_chat_vs_messaging.htm&type=5) that you love plus asynchronous conversations that can be picked back up at any time. Learn about chat retirement in [Help](https://help.salesforce.com/s/articleView?id=001790618&type=1). **note:** If you use the [Permitted Domains setting in your Chat deployment](https://help.salesforce.com/articleView?id=live_agent_deployment_settings.htm&type=0), you’ll get unreliable information from the chat availability check in the SDK. For instance, the agent availability status may always return `false`. If you want to use Permitted Domains for your web chat deployment, we strongly advise that you create a separate deployment for the Service SDK. To check whether agents are available, call the [`determineAvailabilityWithConfiguration`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSChat.html#/c:objc(cs)SCSChat(im)determineAvailabilityWithConfiguration:completion:>) method on the [`chatCore`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCServiceCloud.html#/c:objc(cs)SCServiceCloud(py)chatCore>) property, similar to how you [start a chat session](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/live-agent-basic-setup.md). In Swift: ```java let config = SCSChatConfiguration(liveAgentPod: "YOUR-POD-NAME", orgId: "YOUR-ORG-ID", deploymentId: "YOUR-DEPLOYMENT-ID", buttonId: "YOUR-BUTTON-ID") ServiceCloud.shared().chatCore.determineAvailability(with: config, completion: { (error: Error?, available: Bool, estimatedWaitTime: TimeInterval) in if (error != nil) { // TO DO: Handle error } else if (available) { // TO DO: Enable chat button... // Optionally, use the estimatedWaitTime to // show an estimated wait time until an agent // is available. This value is only valid if // SCSChatConfiguration.queueStyle is set to // EstimatedWaitTime. Estimate is returned // in seconds. } else { // TO DO: Disable button or warn user that no agents are available } }) ``` In Objective-C: ```java SCSChatConfiguration *config = [[SCSChatConfiguration alloc] initWithLiveAgentPod:@"YOUR-POD-NAME" orgId:@"YOUR-ORG-ID" deploymentId:@"YOUR-DEPLOYMENT-ID" buttonId:@"YOUR-BUTTON-ID"]; [[SCServiceCloud sharedInstance].chatCore determineAvailabilityWithConfiguration:config completion:^(NSError *error, BOOL available, NSTimeInterval estimatedWaitTime) { if (error != nil) { // TO DO: Handle error } else if (available) { // TO DO: Enable chat button... // Optionally, use the estimatedWaitTime to // show an estimated wait time until an agent // is available. This value is only valid if // SCSChatConfiguration.queueStyle is set to // EstimatedWaitTime. Estimate is returned // in seconds. } else { // TO DO: Disable button or warn user that no agents are available } }); ``` To understand the algorithm used for the estimated wait time, see the estimated wait time documentation in the [Chat REST API Developer Guide](https://developer.salesforce.com/docs/atlas.en-us.live_agent_rest.meta/live_agent_rest/live_agent_rest_estimated_wait_time.htm). # ChoicesMessage The ChoicesMessage message type supports multiple format types, including Buttons, QuickReplies, and Carousel. See [Format Types](https://developer.salesforce.com/docs/service/messaging-api/references/about/message-types-format-types.md#format-types) for a list of supported message types and the format types they support. ## Buttons ```json { "entryType": "Message", "id": "5392c0d8-1009-4f02-8b5e-3d8caa9a2789", "abstractMessage": { "messageType": "ChoicesMessage", "inReplyToMessageId": null, "id": "5392c0d8-1009-4f02-8b5e-3d8caa9a2789", "references": null, "choices": { "formatType": "Buttons", "text": "Hi, I'm MIAWAURA, a digital assistant.", "optionItems": [ { "itemType": "TitleOptionItem", "titleItem": { "itemType": "TitleItem", "secondarySubTitle": null, "title": "Order", "subTitle": null, "tertiarySubTitle": null, "referenceId": null }, "optionIdentifier": "94934018-2864-4140-966c-8b13ef2d81c5", "optionId": null }, { "itemType": "TitleOptionItem", "titleItem": { "itemType": "TitleItem", "secondarySubTitle": null, "title": "Problem", "subTitle": null, "tertiarySubTitle": null, "referenceId": null }, "optionIdentifier": "bdaa48eb-afc9-4632-8e74-ad02c8b1e246", "optionId": null }, { "itemType": "TitleOptionItem", "titleItem": { "itemType": "TitleItem", "secondarySubTitle": null, "title": "Product", "subTitle": null, "tertiarySubTitle": null, "referenceId": null }, "optionIdentifier": "d895739c-750b-4ec8-8e6c-b793da2a2855", "optionId": null } ] } }, "messageReason": null } ``` ## QuickReplies ```json { "entryType": "Message", "id": "3bc957a5-e9e5-4ae9-a429-37b3779f2735", "abstractMessage": { "messageType": "ChoicesMessage", "inReplyToMessageId": null, "id": "3bc957a5-e9e5-4ae9-a429-37b3779f2735", "references": null, "choices": { "formatType": "QuickReplies", "images": [], "text": "Select a product", "optionItems": [ { "itemType": "TitleOptionItem", "titleItem": { "itemType": "TitleItem", "secondarySubTitle": null, "title": "Good Choice", "subTitle": null, "tertiarySubTitle": null, "referenceId": null }, "optionIdentifier": "d354dd81-4823-4cfb-a3e2-b28d0de1c19b", "optionId": null }, { "itemType": "TitleOptionItem", "titleItem": { "itemType": "TitleItem", "secondarySubTitle": null, "title": "Great Choice", "subTitle": null, "tertiarySubTitle": null, "referenceId": null }, "optionIdentifier": "fe5554ff-12cf-472d-811b-88d887000f9b", "optionId": null } ] } }, "messageReason": null } ``` ## Carousel ```json { "entryType": "Message", "id": "0d31b1fd-8a22-453a-a37b-a3af7d95e586", "abstractMessage": { "messageType": "ChoicesMessage", "inReplyToMessageId": null, "id": "0d31b1fd-8a22-453a-a37b-a3af7d95e586", "references": [ { "recordId": "03SS70000004VbZ", "id": "7e193224-041d-4c62-95a0-f0349733c613" }, { "recordId": "03SS70000004Vbe", "id": "366f479f-58fa-432e-8103-44a7a7af3764" }, { "recordId": "03SS70000004VbP", "id": "972014c0-552a-4127-a109-ee28f86efaab" }, { "recordId": "03SS70000004VbA", "id": "bede8005-233e-41eb-a47f-ca09bf487f72" } ], "choices": { "formatType": "Carousel", "items": [ { "titleItem": { "itemType": "TitleImageItem", "secondarySubTitle": null, "title": "skiing", "subTitle": "skiing subtitle", "tertiarySubTitle": null, "referenceId": null, "imageSubTitle": null, "imageId": "fc66a099-bf05-4687-95e8-f91008c249c3" }, "interactionItems": [ { "itemType": "TitleOptionItem", "titleItem": { "itemType": "TitleItem", "secondarySubTitle": null, "title": "Make a reservaton", "subTitle": null, "tertiarySubTitle": null, "referenceId": null }, "optionIdentifier": "656a7079-8848-4940-484a-e9fa988dff01", "optionId": null } ] }, { "titleItem": { "itemType": "TitleImageItem", "secondarySubTitle": null, "title": "Snowboarding", "subTitle": "Snowboarding Subtitle", "tertiarySubTitle": null, "referenceId": null, "imageSubTitle": null, "imageId": "571e3425-58d0-44ea-9964-61ce5b6da7ef" }, "interactionItems": [ { "itemType": "TitleOptionItem", "titleItem": { "itemType": "TitleItem", "secondarySubTitle": null, "title": "Make a reservaton", "subTitle": null, "tertiarySubTitle": null, "referenceId": null }, "optionIdentifier": "c6990ede-9df5-b135-ce65-4c8e126a0145", "optionId": null } ] }, { "titleItem": { "itemType": "TitleImageItem", "secondarySubTitle": null, "title": "Hiking", "subTitle": "Hiking Subtitle", "tertiarySubTitle": null, "referenceId": null, "imageSubTitle": null, "imageId": "bd8f4890-2640-4d94-8ac0-915155b672e8" }, "interactionItems": [ { "itemType": "TitleOptionItem", "titleItem": { "itemType": "TitleItem", "secondarySubTitle": null, "title": "Make a reservaton", "subTitle": null, "tertiarySubTitle": null, "referenceId": null }, "optionIdentifier": "4c384ce6-e856-1f16-76a6-2b7bf894fa1b", "optionId": null } ] }, { "titleItem": { "itemType": "TitleImageItem", "secondarySubTitle": null, "title": "Camping", "subTitle": "Camping Subtitle", "tertiarySubTitle": null, "referenceId": null, "imageSubTitle": null, "imageId": "8ffb4ca0-534d-4e52-ba8f-e4c7fec0ab16" }, "interactionItems": [ { "itemType": "TitleOptionItem", "titleItem": { "itemType": "TitleItem", "secondarySubTitle": null, "title": "Make a reservaton", "subTitle": null, "tertiarySubTitle": null, "referenceId": null }, "optionIdentifier": "607eea44-baa5-401a-3229-9162a6bd2fda", "optionId": null } ] } ], "images": [ { "assetType": "ImageAsset", "description": null, "id": "8ffb4ca0-534d-4e52-ba8f-e4c7fec0ab16", "mimeType": "image/jpeg", "assetUrl": "https://de1.stmfb.file.stm.force.com/file-asset-public/Campingsjpg?oid=00DS70000000Ty5&v=1", "referenceId": "bede8005-233e-41eb-a47f-ca09bf487f72" }, { "assetType": "ImageAsset", "description": null, "id": "fc66a099-bf05-4687-95e8-f91008c249c3", "mimeType": "image/jpeg", "assetUrl": "https://de1.stmfb.file.stm.force.com/file-asset-public/Skiingsjpg?oid=00DS70000000Ty5&v=1", "referenceId": "7e193224-041d-4c62-95a0-f0349733c613" }, { "assetType": "ImageAsset", "description": null, "id": "571e3425-58d0-44ea-9964-61ce5b6da7ef", "mimeType": "image/jpeg", "assetUrl": "https://de1.stmfb.file.stm.force.com/file-asset-public/Snowboardingsjpg?oid=00DS70000000Ty5&v=1", "referenceId": "366f479f-58fa-432e-8103-44a7a7af3764" }, { "assetType": "ImageAsset", "description": null, "id": "bd8f4890-2640-4d94-8ac0-915155b672e8", "mimeType": "image/jpeg", "assetUrl": "https://de1.stmfb.file.stm.force.com/file-asset-public/Hikingsjpg?oid=00DS70000000Ty5&v=1", "referenceId": "972014c0-552a-4127-a109-ee28f86efaab" } ] } }, "messageReason": null } ``` # ChoicesResponseMessage The ChoicesResponseMessage message type supports the Selections format type. See [Format Types](https://developer.salesforce.com/docs/service/messaging-api/references/about/message-types-format-types.md#format-types) for a list of supported message types and the format types they support. ## Selections ```json { "entryType": "Message", "id": "7d09f726-4a11-4f80-b9a1-c00d9848d463", "abstractMessage": { "messageType": "ChoicesResponseMessage", "inReplyToMessageId": "3bc957a5-e9e5-4ae9-a429-37b3779f2735", "id": "7d09f726-4a11-4f80-b9a1-c00d9848d463", "references": null, "choicesResponse": { "formatType": "Selections", "selectedOptions": [ { "optionTitle": null, "optionIdentifier": "fe5554ff-12cf-472d-811b-88d887000f9b", "optionId": null } ] } }, "messageReason": null } ``` # Cisco Network Transport Receiver Represents a Cisco Network Transport Receiver configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. ## Configuration Item Type Definition ||| |-|-| |Name|Cisco Network Transport Receiver| |Developer Name|`SD_CiNeTrR`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Network Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-network-device.md)| |Rule Name|Default rule for all Azure| |Identifier(s)|Asset Name Subscription Id Resource Group| ## Attributes No associated attributes for this configuration item type. # Cisco Satellite Receiver Represents a Cisco Satellite Receiver configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. ## Configuration Item Type Definition ||| |-|-| |Name|Cisco Satellite Receiver| |Developer Name|`SD_CiSaRe`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Network Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-network-device.md)| |Rule Name|Default rule for all AWS RDS| |Identifier(s)|Asset Name| ## Attributes No associated attributes for this configuration item type. # Cisco Systems Application Control Engine Represents a Cisco Systems Application Control Engine configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. ## Configuration Item Type Definition ||| |-|-| |Name|Cisco Systems Application Control Engine| |Developer Name|`SD_CiSyApC`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Network Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-network-device.md)| |Rule Name|Default rule for all Unix Servers| |Identifier(s)|MAC address Hostname| ## Attributes No associated attributes for this configuration item type. # Cisco Systems Content Engine Represents a Cisco Systems Content Engine configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. ## Configuration Item Type Definition ||| |-|-| |Name|Cisco Systems Content Engine| |Developer Name|`SD_CiSyCoE`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Network Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-network-device.md)| |Rule Name|Default rule for all Windows Servers| |Identifier(s)|MAC address Hostname| ## Attributes No associated attributes for this configuration item type. # Cisco Systems Global Site Selector Represents a Cisco Systems Global Site Selector configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. ## Configuration Item Type Definition ||| |-|-| |Name|Cisco Systems Global Site Selector| |Developer Name|`SD_CiSyGlS`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Network Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-network-device.md)| |Rule Name|Default rule for all Mobile Phones| |Identifier(s)|IMEI Number| ## Attributes No associated attributes for this configuration item type. # Cisco Systems Media Convergence Server Represents a Cisco Systems Media Convergence Server configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. ## Configuration Item Type Definition ||| |-|-| |Name|Cisco Systems Media Convergence Server| |Developer Name|`SD_CiSyMeC`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Network Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-network-device.md)| |Rule Name|Default rule for all Mobile Tablets| |Identifier(s)|IMEI Number| ## Attributes No associated attributes for this configuration item type. # Cisco Systems Mobility Services Engine Represents a Cisco Systems Mobility Services Engine configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. ## Configuration Item Type Definition ||| |-|-| |Name|Cisco Systems Mobility Services Engine| |Developer Name|`SD_CiSyMoS`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Network Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-network-device.md)| |Rule Name|Default rule for all Windows Desktops| |Identifier(s)|Serial Number| ## Attributes No associated attributes for this configuration item type. # Cisco Systems Network Analysis Module Represents a Cisco Systems Network Analysis Module configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. ## Configuration Item Type Definition ||| |-|-| |Name|Cisco Systems Network Analysis Module| |Developer Name|`SD_CiSyNeA`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Network Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-network-device.md)| |Rule Name|Default rule for all Mac Hosts| |Identifier(s)|Serial Number| ## Attributes No associated attributes for this configuration item type. # Cisco Systems UCS Represents a Cisco Systems UCS configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. ## Configuration Item Type Definition ||| |-|-| |Name|Cisco Systems UCS| |Developer Name|`SD_CiSyUc`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Network Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-network-device.md)| |Rule Name|Default rule for all MySQL Instances| |Identifier(s)|Asset Name Server Port IP Address| ## Attributes No associated attributes for this configuration item type. # Cisco Systems Unified Sip Proxy Represents a Cisco Systems Unified Sip Proxy configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. ## Configuration Item Type Definition ||| |-|-| |Name|Cisco Systems Unified Sip Proxy| |Developer Name|`SD_CiSyUnS`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Network Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-network-device.md)| |Rule Name|Default rule for all Oracle Clusters| |Identifier(s)|Asset Name Server Port IP Address| ## Attributes No associated attributes for this configuration item type. # Cisco Systems Wide Area Virtualization Engine Represents a Cisco Systems Wide Area Virtualization Engine configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. ## Configuration Item Type Definition ||| |-|-| |Name|Cisco Systems Wide Area Virtualization Engine| |Developer Name|`SD_CiSyWiA`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Network Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-network-device.md)| |Rule Name|Default rule for all Devices| |Identifier(s)|Serial Number| ## Attributes No associated attributes for this configuration item type. # Cisco Systems Wireless Mic Represents a Cisco Systems Wireless Mic configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. ## Configuration Item Type Definition ||| |-|-| |Name|Cisco Systems Wireless Mic| |Developer Name|`SD_CiSyWiM`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Network Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-network-device.md)| |Rule Name|Default rule for all Compute Devices| |Identifier(s)|Serial Number| ## Attributes No associated attributes for this configuration item type. # Cisco Systems Wireless Services Module Represents a Cisco Systems Wireless Services Module configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. ## Configuration Item Type Definition ||| |-|-| |Name|Cisco Systems Wireless Services Module| |Developer Name|`SD_CiSyWiS`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Network Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-network-device.md)| |Rule Name|Default rule for all Servers| |Identifier(s)|MAC address Hostname| ## Attributes No associated attributes for this configuration item type. # Cisco Telepresence Represents a Cisco Telepresence configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. ## Configuration Item Type Definition ||| |-|-| |Name|Cisco Telepresence| |Developer Name|`SD_CiTe`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Network Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-network-device.md)| |Rule Name|Default rule for all IO Modules| |Identifier(s)|MAC address| ## Attributes No associated attributes for this configuration item type. # Cisco UCS Represents a Cisco UCS configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Device. ## Configuration Item Type Definition ||| |-|-| |Name|Cisco UCS| |Developer Name|`SD_CiUc`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-device.md)| |Rule Name|Default rule for all Mobile Devices| |Identifier(s)|IMEI Number| ## Attributes No associated attributes for this configuration item type. # Citrix Netscaler Represents a Citrix Netscaler configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. ## Configuration Item Type Definition ||| |-|-| |Name|Citrix Netscaler| |Developer Name|`SD_CiNe`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Network Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-network-device.md)| |Rule Name|Default rule for all Network Convergence Systems| |Identifier(s)|MAC address| ## Attributes ### DNS Domain - **Type**: text - **Developer Name**: `SD_DnDo` - **Attribute Set**: [Hardware and Network](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-hardware-and-network.md) - **Description**: The dns domain of the Citrix Netscaler. - **Required**: Optional ### Hardware Version - **Type**: text - **Developer Name**: `SD_HaVe1` - **Attribute Set**: [Hardware and Network](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-hardware-and-network.md) - **Description**: The hardware version of the Citrix Netscaler. - **Required**: Optional ### IPv4 Netmask - **Type**: text - **Developer Name**: `SD_IpNe` - **Attribute Set**: [IPv4 Address Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-ipv4-address-details.md) - **Description**: The ipv4 netmask of the Citrix Netscaler. - **Required**: Optional ### Network Interface Name - **Type**: text - **Developer Name**: `SD_NeInNa` - **Attribute Set**: [Network Interface Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-network-interface-details.md) - **Description**: The network interface name of the Citrix Netscaler. - **Required**: Optional ### OS Local Date Time - **Type**: text - **Developer Name**: `SD_OsLoDaT` - **Attribute Set**: [Operating System Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-operating-system-details.md) - **Description**: The os local date time of the Citrix Netscaler. - **Required**: Optional ### Public DNS Name - **Type**: text - **Developer Name**: `SD_PuDnNa` - **Attribute Set**: [Instance Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-instance-details.md) - **Description**: The public dns name of the Citrix Netscaler. - **Required**: Optional ### Software Version - **Type**: text - **Developer Name**: `SD_SoVe` - **Attribute Set**: [Installed Software Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-installed-software-details.md) - **Description**: The software version of the Citrix Netscaler. - **Required**: Optional # Classic Console API Methods Supported in the Lightning Console API Visualforce pages and third-party web tabs that use some Salesforce Console Integration Toolkit methods work in Lightning Experience as-is. Just point to the latest version of the toolkit script in your Visualforce pages or third-party web tabs. Third-party content must be allowlisted with CSP directives via Trusted URLs. This table lists the Salesforce Console Integration Toolkit methods that you can use in Lightning Console JavaScript API starting with API version 42.0. Salesforce Console Integration Toolkit methods that aren’t supported in Lightning Experience result in a failure error message. **important:** Only API versions 42.0 and above of the Salesforce Console Integration Toolkit are supported in the Lightning Console JavaScript API. Only API versions 43.0 and above are supported in Open CTI. ## Methods for Primary Tabs and Subtabs **note:** Methods using `objectId` return 18-character, case-insensitive record IDs when invoked from within a Lightning console. When invoked from within a Salesforce Classic console, they return 15-character, case-sensitive record IDs. Workspace tab and subtab IDs in a Lightning console use a different format from Salesforce Classic console primary tab and subtab IDs. Any code that validates the format of tab IDs must be updated or removed to account for the change. A Salesforce Classic console tab ID can look like `scc-pt-1` or `scc-st-1`. A Lightning console tab ID looks like `ctab1` or `ctab1_3`. | Salesforce Classic Method | Supported in Lightning Console (Aura) | Supported in Lightning Console (LWC) | Notes About Use in Lightning Console | | ------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------: | -------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | [`closeTab()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-closetab.md) | ![Checkmark icon](https://developer.salesforce.com/media/api-console/checkmark_16x16.png) | ![Checkmark icon](https://developer.salesforce.com/media/api-console/checkmark_16x16.png) |   | | [`disableTabClose()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-disabletabclose.md) | ![Checkmark icon](https://developer.salesforce.com/media/api-console/checkmark_16x16.png) | ![Checkmark icon](https://developer.salesforce.com/media/api-console/checkmark_16x16.png) |   | | [`focusPrimaryTabById()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-focusprimarytabbyid.md) | ![Checkmark icon](https://developer.salesforce.com/media/api-console/checkmark_16x16.png) | ![Checkmark icon](https://developer.salesforce.com/media/api-console/checkmark_16x16.png) |   | | [`focusPrimaryTabByName()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-focusprimarytabbyname.md) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) |   | | [`focusSidebarComponent()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-focussidebarcomponent.md) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) |   | | [`focusSubtabById()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-focussubtabbyid.md) | ![Checkmark icon](https://developer.salesforce.com/media/api-console/checkmark_16x16.png) | ![Checkmark icon](https://developer.salesforce.com/media/api-console/checkmark_16x16.png) |   | | [`focusSubtabByNameAndPrimaryTabId()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-focussubtabbynameandprimarytabid.md) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) |   | | [`focusSubtabByNameAndPrimaryTabName()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-focussubtabbynameandprimarytabname.md) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) |   | | [`generateConsoleUrl()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-generateconsoleurl.md) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) |   | | [`getEnclosingPrimaryTabId()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-getenclosingprimarytabid.md) | ![Checkmark icon](https://developer.salesforce.com/media/api-console/checkmark_16x16.png) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) |   | | [`getEnclosingTabId()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-getenclosingtabid.md) | ![Checkmark icon](https://developer.salesforce.com/media/api-console/checkmark_16x16.png) | ![Checkmark icon](https://developer.salesforce.com/media/api-console/checkmark_16x16.png) |   | | [`getFocusedPrimaryTabId()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-getfocusedprimarytabid.md) | ![Checkmark icon](https://developer.salesforce.com/media/api-console/checkmark_16x16.png) | ![Checkmark icon](https://developer.salesforce.com/media/api-console/checkmark_16x16.png) |   | | [`getFocusedPrimaryTabObjectId()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-getfocusedprimarytabobjectid.md) | ![Checkmark icon](https://developer.salesforce.com/media/api-console/checkmark_16x16.png) | ![Checkmark icon](https://developer.salesforce.com/media/api-console/checkmark_16x16.png) |   | | [`getFocusedSubtabId()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-getfocusedsubtabid.md) | ![Checkmark icon](https://developer.salesforce.com/media/api-console/checkmark_16x16.png) | ![Checkmark icon](https://developer.salesforce.com/media/api-console/checkmark_16x16.png) |   | | [`getFocusedSubtabObjectId()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-getfocusedsubtabobjectid.md) | ![Checkmark icon](https://developer.salesforce.com/media/api-console/checkmark_16x16.png) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) |   | | [`getPageInfo()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-getpageinfo.md) | See notes | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) | These fields aren’t supported and aren’t returned in the response:
  • object
  • displayName
  • accountId
  • contactId
  • personAccount
| | [`getPrimaryTabIds()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-getprimarytabids.md) | ![Checkmark icon](https://developer.salesforce.com/media/api-console/checkmark_16x16.png) | ![Checkmark icon](https://developer.salesforce.com/media/api-console/checkmark_16x16.png) |   | | [`getSubtabIds()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-getsubtabids.md) | ![Checkmark icon](https://developer.salesforce.com/media/api-console/checkmark_16x16.png) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) |   | | [`getTabLink()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-gettablink.md) | See notes | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) | The level argument `sforce.console.TabLink.PARENT_AND_CHILDREN` isn’t supported. | | [`isInConsole()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-isinconsole.md) | ![Checkmark icon](https://developer.salesforce.com/media/api-console/checkmark_16x16.png) | ![Checkmark icon](https://developer.salesforce.com/media/api-console/checkmark_16x16.png) |   | | [`onEnclosingTabRefresh()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-onenclosingtabrefresh.md) | ![Checkmark icon](https://developer.salesforce.com/media/api-console/checkmark_16x16.png) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) |   | | [`onFocusedPrimaryTab()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-onfocusedprimarytab.md) | ![Checkmark icon](https://developer.salesforce.com/media/api-console/checkmark_16x16.png) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) |   | | [`onFocusedSubtab()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-onfocusedsubtab.md) | ![Checkmark icon](https://developer.salesforce.com/media/api-console/checkmark_16x16.png) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) | Utility items aren’t supported in the Lightning API. | | [`onTabSave()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-ontabsave.md) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) |   | | [`openConsoleUrl()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-openconsoleurl.md) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) |   | | [`openPrimaryTab()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-openprimarytab.md) | See notes | See notes | Make sure to add third-party domains to the [Trusted URLs](https://help.salesforce.com/articleView?id=trusted_urls_manage.htm) list. The following aren’t supported in the Lightning API:
  • `id` argument
  • `name` argument. As an alternative, save the `tabId` that’s returned and use it in your API calls.
| | [`openSubtab()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-opensubtab.md) | See notes | See notes | Make sure to add third-party domains to the [Trusted URLs](https://help.salesforce.com/articleView?id=trusted_urls_manage.htm) list. The following aren’t supported in the Lightning API:
  • `id` argument
  • `name` argument. As an alternative, save the `tabId` that’s returned and use it in your API calls.
| | [`openSubtabByPrimaryTabName()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-opensubtabbyprimarytabname.md) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) | ![Checkmark icon](https://developer.salesforce.com/media/api-console/checkmark_16x16.png) |   | | [`refreshPrimaryTabById()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-refreshprimarytabbyid.md) | See notes | See notes | The `fullRefresh` argument isn’t supported in the Lightning API. | | [`refreshPrimaryTabByName()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-refreshprimarytabbyname.md) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) | ![Checkmark icon](https://developer.salesforce.com/media/api-console/checkmark_16x16.png) |   | | [`refreshSubtabById()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-refreshsubtabbyid.md) | See notes | See notes | The `fullRefresh` argument isn’t supported in the Lightning API. | | [`refreshSubtabByNameAndPrimaryTabId()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-refreshsubtabbynameandprimarytabid.md) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) |   | | [`refreshSubtabByNameAndPrimaryTabName()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-refreshsubtabbynameandprimarytabname.md) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) |   | | [`reopenLastClosedTab()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-reopenlastclosedtab.md) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) |   | | [`resetSessionTimeOut()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-resetsessiontimeout.md) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) |   | | [`setTabUnsavedChanges()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-settabdirty.md) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) |   | | [`setTabIcon()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-settabicon.md) | See notes | See notes | Only [Salesforce Lightning Design System](https://www.lightningdesignsystem.com/icons/#utility) icons are supported for `iconUrl`. URLs and custom icons aren’t supported. Sample supported values:
  • `sforce.console.setTabIcon(“standard:email”)`
  • `sforce.console.setTabIcon(“action:new”)`
  • `sforce.console.setTabIcon(“custom:custom1”)`
| | [`setTabLink()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-settablink.md) | ![Checkmark icon](https://developer.salesforce.com/media/api-console/checkmark_16x16.png) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) |   | | [`setTabStyle()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-settabstyle.md) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) |   | | [`setTabTextStyle()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-settabtextstyle.md) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) |   | | [`setTabTitle()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-settabtitle.md) | ![Checkmark icon](https://developer.salesforce.com/media/api-console/checkmark_16x16.png) | ![Checkmark icon](https://developer.salesforce.com/media/api-console/checkmark_16x16.png) |   | ## Methods for Application-Level Custom Console Components **note:** LWC doesn’t currently support working with these methods. The following methods must be called from within a Lightning utility. | Salesforce Classic Method | Supported in Lightning Console | Notes About Use in Lightning Console | | --------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | [`addToBrowserTitleQueue()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/app-components/sforce-api-console-addtobrowsertitlequeue.md) | ![Checkmark icon](https://developer.salesforce.com/media/api-console/checkmark_16x16.png) |   | | [`blinkCustomConsoleComponentButtonText()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/app-components/sforce-api-console-blinkcustomconsolecomponentbuttontext.md) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) |   | | [`isCustomConsoleComponentPoppedOut()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/app-components/sforce-api-console-iscustomconsolecomponentpoppedout.md) | ![Checkmark icon](https://developer.salesforce.com/media/api-console/checkmark_16x16.png) |   | | [`isCustomConsoleComponentHidden()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/app-components/sforce-api-console-iscustomconsolecomponenthidden.md) | ![Checkmark icon](https://developer.salesforce.com/media/api-console/checkmark_16x16.png) |   | | [`isInCustomConsoleComponent()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/app-components/sforce-api-console-isincustomconsolecomponent.md) | ![Checkmark icon](https://developer.salesforce.com/media/api-console/checkmark_16x16.png) |   | | [`onCustomConsoleComponentButtonClicked()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/app-components/sforce-api-console-oncustomconsolecomponentbuttonclicked.md) | ![Checkmark icon](https://developer.salesforce.com/media/api-console/checkmark_16x16.png) |   | | [`removeFromBrowserTitleQueue()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/app-components/sforce-api-console-removefrombrowsertitlequeue.md) | ![Checkmark icon](https://developer.salesforce.com/media/api-console/checkmark_16x16.png) |   | | [`runSelectedMacro()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/app-components/sforce-api-console-runselectedmacro.md) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) |   | | [`scrollCustomConsoleComponentButtonText()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/app-components/sforce-api-console-scrollcustomconsolecomponentbuttontext.md) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) |   | | [`selectMacro()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/app-components/sforce-api-console-selectmacro.md) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) |   | | [`setCustomConsoleComponentButtonIconUrl()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/app-components/sforce-api-console-setcustomconsolecomponentbuttoniconurl.md) | See notes | In Lightning Console, URL values for icons aren’t supported in utility bar utilities. Only [Salesforce Lightning Design System](https://www.lightningdesignsystem.com/icons/#utility) are supported. Sample supported `iconUrl` values:
  • `setCustomConsoleComponentButtonIconUrl("clock");`
  • `setCustomConsoleComponentButtonIconUrl("utility:clock");`
| | [`setCustomConsoleComponentButtonStyle()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/app-components/sforce-api-console-setcustomconsolecomponentbuttonstyle.md) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) |   | | [`setCustomConsoleComponentButtonText()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/app-components/sforce-api-console-setcustomconsolecomponentbuttontext.md) | ![Checkmark icon](https://developer.salesforce.com/media/api-console/checkmark_16x16.png) |   | | [`setCustomConsoleComponentHeight()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/app-components/sforce-api-console-setcustomconsolecomponentheight.md) | ![Checkmark icon](https://developer.salesforce.com/media/api-console/checkmark_16x16.png) |   | | [`setCustomConsoleComponentVisible()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/app-components/sforce-api-console-setcustomconsolecomponentvisible.md) | ![Checkmark icon](https://developer.salesforce.com/media/api-console/checkmark_16x16.png) |   | | [`setCustomConsoleComponentWidth()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/app-components/sforce-api-console-setcustomconsolecomponentwidth.md) | ![Checkmark icon](https://developer.salesforce.com/media/api-console/checkmark_16x16.png) |   | | [`setCustomConsoleComponentPopoutable()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/app-components/sforce-api-console-setcustomconsolecomponentpopoutable.md) | ![Checkmark icon](https://developer.salesforce.com/media/api-console/checkmark_16x16.png) |   | | [`setCustomConsoleComponentWindowVisible()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/app-components/sforce-api-console-setcustomconsolecomponentwindowvisible.md) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) |   | | [`setSidebarVisible()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/app-components/sforce-api-console-setsidebarvisible.md) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) |   | ## Methods for Navigation Tabs **note:** LWC doesn’t currently support working with these methods. | Salesforce Classic Method | Supported in Lightning Console | Notes About Use in Lightning Console | | ---------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------: | ------------------------------------ | | [`focusNavigationTab()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/nav-tabs/sforce-api-console-focusnavigatortab.md) | ![Checkmark icon](https://developer.salesforce.com/media/api-console/checkmark_16x16.png) |   | | [`getNavigationTabs()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/nav-tabs/sforce-api-console-getnavigatortabs.md) | ![Checkmark icon](https://developer.salesforce.com/media/api-console/checkmark_16x16.png) |   | | [`getSelectedNavigationTab()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/nav-tabs/sforce-api-console-getselectednavigatortab.md) | ![Checkmark icon](https://developer.salesforce.com/media/api-console/checkmark_16x16.png) |   | | [`refreshNavigationTab()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/nav-tabs/sforce-api-console-refreshnavigatortab.md) | ![Checkmark icon](https://developer.salesforce.com/media/api-console/checkmark_16x16.png) |   | | [`setSelectedNavigationTab()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/nav-tabs/sforce-api-console-setselectednavigatortab.md) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) |   | ## Methods for Live Agent **note:** LWC doesn’t currently support working with these methods. | Salesforce Classic Method | Supported in Lightning Console | Notes About Use in Lightning Console | | --------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------: | ------------------------------------ | | [`acceptChat()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/chat/sforce-api-console-acceptchat.md) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) |   | | [`cancelFileTransferByAgent()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/chat/sforce-api-console-cancelfiletransferbyagent.md) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) |   | | [`declineChat()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/chat/sforce-api-console-declinechat.md) | ![Checkmark icon](https://developer.salesforce.com/media/api-console/checkmark_16x16.png) |   | | [`endChat()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/chat/sforce-api-console-endchat.md) | ![Checkmark icon](https://developer.salesforce.com/media/api-console/checkmark_16x16.png) |   | | [`getAgentInput()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/chat/sforce-api-console-getagentinput.md) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) |   | | [`getAgentState()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/chat/sforce-api-console-getagentstate.md) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) |   | | [`getChatLog()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/chat/sforce-api-console-getchatlog.md) | ![Checkmark icon](https://developer.salesforce.com/media/api-console/checkmark_16x16.png) |   | | [`getChatRequests()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/chat/sforce-api-console-getchatrequests.md) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) |   | | [`getDetailsByChatKey()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/chat/sforce-api-console-getdetailsbychatkey.md) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) |   | | [`getDetailsByPrimaryTabId()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/chat/sforce-api-console-getdetailsbyprimarytabid.md) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) |   | | [`getEngagedChats()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/chat/sforce-api-console-getengagedchats.md) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) |   | | [`getMaxCapacity()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/chat/sforce-api-console-getmaxcapacity.md) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) |   | | [`initFileTransfer()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/chat/sforce-api-console-initfiletransfer.md) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) |   | | [`onAgentSend()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/chat/sforce-api-console-onagentsend.md) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) |   | | [`onAgentStateChanged()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/chat/sforce-api-console-onagentstatechanged.md) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) |   | | [`onChatCanceled()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/chat/sforce-api-console-onchatcanceled.md) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) |   | | [`onChatCriticalWaitState()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/chat/sforce-api-console-onchatcriticalwaitstate.md) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) |   | | [`onChatDeclined()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/chat/sforce-api-console-onchatdeclined.md) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) |   | | [`onChatEnded()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/chat/sforce-api-console-onchatended.md) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) |   | | [`onChatRequested()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/chat/sforce-api-console-onchatrequested.md) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) |   | | [`onChatStarted()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/chat/sforce-api-console-onchatstarted.md) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) |   | | [`onChatTransferredOut()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/chat/sforce-api-console-onchattransferredout.md) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) |   | | [`onCurrentCapacityChanged()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/chat/sforce-api-console-oncurrentcapacitychanged.md) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) |   | | [`onCustomEvent()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/chat/sforce-api-console-oncustomevent.md) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) |   | | [`onFileTransferCompleted()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/chat/sforce-api-console-onfiletransfercompleted.md) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) |   | | [`onNewMessage()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/chat/sforce-api-console-onnewmessage.md) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) |   | | [`onTypingUpdate()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/chat/sforce-api-console-ontypingupdate.md) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) |   | | [`sendCustomEvent()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/chat/sforce-api-console-sendcustomevent.md) | ![Checkmark icon](https://developer.salesforce.com/media/api-console/checkmark_16x16.png) |   | | [`sendMessage()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/chat/sforce-api-console-sendmessage.md) | ![Checkmark icon](https://developer.salesforce.com/media/api-console/checkmark_16x16.png) |   | | [`setAgentInput()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/chat/sforce-api-console-setagentinput.md) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) |   | | [`setAgentState()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/chat/sforce-api-console-setagentstate.md) | ![Red x mark](https://developer.salesforce.com/media/api-console/redX.png) |   | ## Methods for Omni-Channel **note:** LWC doesn’t currently support working with these methods. | Salesforce Classic Method | Supported in Lightning Console | Notes About Use in Lightning Console | | ------------------------------------------------------------------------------------------------------------------------------ | :------------------------------------------------------------------: | ------------------------------------ | | [`acceptAgentWork()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/omnichannel/sforce-api-console-acceptagentwork.md) | ![Checkmark icon](https://developer.salesforce.com/media/api-console/checkmark_16x16.png) |   | | [`closeAgentWork()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/omnichannel/sforce-api-console-closeagentwork.md) | ![Checkmark icon](https://developer.salesforce.com/media/api-console/checkmark_16x16.png) |   | | [`declineAgentWork()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/omnichannel/sforce-api-console-declineagentwork.md) | ![Checkmark icon](https://developer.salesforce.com/media/api-console/checkmark_16x16.png) |   | | [`getAgentWorkload()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/omnichannel/sforce-api-console-getagentworkload.md) | ![Checkmark icon](https://developer.salesforce.com/media/api-console/checkmark_16x16.png) |   | | [`getAgentWorks()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/omnichannel/sforce-api-console-getagentworks.md) | ![Checkmark icon](https://developer.salesforce.com/media/api-console/checkmark_16x16.png) |   | | [`getServicePresenceStatusChannels()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/omnichannel/sforce-api-console-getservicepresencestatuschannels.md) | ![Checkmark icon](https://developer.salesforce.com/media/api-console/checkmark_16x16.png) |   | | [`getServicePresenceStatusId()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/omnichannel/sforce-api-console-getservicepresencestatusid.md) | ![Checkmark icon](https://developer.salesforce.com/media/api-console/checkmark_16x16.png) |   | | [`login()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/omnichannel/sforce-api-console-login.md) | ![Checkmark icon](https://developer.salesforce.com/media/api-console/checkmark_16x16.png) |   | | [`logout()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/omnichannel/sforce-api-console-logout.md) | ![Checkmark icon](https://developer.salesforce.com/media/api-console/checkmark_16x16.png) |   | | [`setServicePresenceStatus()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/omnichannel/sforce-api-console-setservicepresencestatus.md) | ![Checkmark icon](https://developer.salesforce.com/media/api-console/checkmark_16x16.png) |   | ## Methods for Console Events **note:** LWC doesn’t currently support working with these methods. | Salesforce Classic Method | Supported in Lightning Console | Notes About Use in Lightning Console | | ----------------------------------------------------------------------------------------------- | :------------------------------------------------------------------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | [`addEventListener()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/events/sforce-api-console-addeventlistener.md) | ![Checkmark icon](https://developer.salesforce.com/media/api-console/checkmark_16x16.png) | `sforce.console.ConsoleEvent.CONSOLE_LOGOUT` isn’t supported in the Lightning API. `sforce.console.ConsoleEvent.CLOSE_TAB` returns the ID of the closed tab only. The Lightning API doesn’t return the objectId or the tabObjectId. The Lightning API doesn’t return special message responses from custom keyboard shortcuts. However, if the response is from a console event, the message includes payload details. | | [`fireEvent()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/events/sforce-api-console-fireevent.md) | See notes | `fireEvent()` returns `success true` even when eventListeners for the given eventType are removed. | | [`removeEventListener()`](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/events/sforce-api-console-removeeventlistener.md) | ![Checkmark icon](https://developer.salesforce.com/media/api-console/checkmark_16x16.png) |   | # Clear Local Storage Clearing the local storage will delete the local database in the SDK and remove all conversations and entries associated with those conversations from the device. **important:** This feature requires version 1.5.1 or later of the Enhanced In-App Chat SDK. This article applies to the following implementations: | UI SDK | Core SDK | | :----: | :------: | | | ✅ | To delete the local storage call the `destroyStorage` method on the [`CoreClient`](https://salesforce-async-messaging.github.io/messaging-in-app-android/sdk/core/com.salesforce.android.smi.core/-core-client/index.html) object. ``` when(val result = CoreClient.clearStorage(context = applicationContext, clearAuthorization = true)) { is Result.Error -> println("error, ${result.exception}") else -> println("done") } ``` # Clear Local Storage Clearing the local storage will delete the local database in the SDK and remove all conversations and entries associated with those conversations from the device. **important:** This feature requires version 1.5.1 or later of the Enhanced In-App Chat SDK. This article applies to the following implementations: | UI SDK | Core SDK | | :----: | :------: | | | ✅ | To delete the local storage call the `destroyStorage` method on the [`CoreClient`](https://salesforce-async-messaging.github.io/messaging-in-app-ios/documentation/smiclientcore/coreclient) object. ``` coreClient.destoryStorage(andAuthorization: true) { error in If error != nil { // TO DO: Handle error return } } ``` # Clear Routing Deletes the Pending Service Routing (PSR) record for the specified conversation. This API doesn’t need to be called for most scenarios; the PSR record is automatically deleted when the call is no longer being routed. However, there are some scenarios, like for missed or abandoned messages when using partner telephony systems (excluding Amazon Connect), where you must explicitly call this API to clear the PSR record. This API applies to the following product: - Bring Your Own Channel for Contact Center as a Service This API is available in version 62.0 and later. ## URI `v1/route` ## HTTP Method DELETE ## Headers ### Authorization (User-Level Authentication) **Format:** `Bearer ` String. Standard header. Used to authenticate the user, where `` is the Salesforce access token used as the bearer token to make requests to the Interaction Service APIs. Required. ### Content-Type **Format:** `application/json` String. Standard header. Format of the request payload. Required for any request that includes a body. ### OrgId **Format:** `` String. Custom header. The Salesforce org. `` is the 15-character Org ID of the Salesforce org. Required. ### RequestId **Format:** `` String. Custom header. Universally Unique Identifier (``) that references and tracks this request. Required. ### AuthorizationContext **Format:** `` String. Custom header. Additional information for the request authorization used to authenticate and validate requests against the connected app scopes. - For Bring Your Own Channel for CCaaS, set `` to the developer name of the ConversationChannelDefinition record. For example, Partner1_ChannelDefinition1. Required. ### Sample Header ``` -H $'Authorization: Bearer 00DSG000009SWby!...LN8XxeRIxGe' \ -H "content-type: application/json" \ -H "OrgId: 00DSG000009SWby" \ -H "AuthorizationContext: Partner1_ChannelDefinition1" \ -H "RequestId: a1b23c45-c06a-4784-c96c-cb95d3321bda" \ ``` ## Parameters | Property Name | Type | Description | Required | | :--------------------- | :----- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------- | | cancelReason | enum | The reason why conversation routing was cancelled. Valid values include:
\- **UNKNOWN (0)** \- An unknown cancellation reason such as an error.
\- **UNAVAILABLE (1)** \- The rep was unavailable.
\- **DECLINE (2)** \- The rep declined.
\- **CANCEL (3)** \- Generic cancellation reason. | No | | conversationIdentifier | string | The unique ID for the conversation channel. | Yes | ## Example ```json { "conversationIdentifier": "1234a5bc-52b8-43ed-9608-7997f7b88dc1", "cancelReason": "Decline" } ``` ## See Also - _GitHub_: [Interaction Service APIs](https://github.com/salesforce-misc/interaction-service-apis) # Clone Before You Build The fastest migration path is not to build from scratch; it's to clone the demo connector and replace parts one at a time. The demo connector is a complete, deployable Salesforce Voice with Partner Telephony connector with all required methods stubbed out and working. The demo connector handles: - The full `VendorConnector` + `TelephonyConnector` scaffold - All required event types (`CALL_STARTED`, `CALL_CONNECTED`, `HANGUP`, etc.) - Rep status sync, ACW, recording toggle, mute, and hold - A mock telephony backend that you replace gradually - A built-in `CCaaS.html` call simulator for local end-to-end testing without a real backend To get started with the demo connector, take these steps. 1. Clone the demo connector as your migration starting point. ```bash git clone https://github.com/salesforce-misc/byo-demo-connector cd byo-demo-connector npm install ``` 2. Clone your Open CTI adapter for reference alongside it. ```bash git clone {your-open-cti-adapter-url} ``` 3. Open both repositories in your code editor or IDE side by side. 4. Deploy the Salesforce-side org metadata by cloning and using the quickstart. ```bash git clone https://github.com/salesforce/scv-partner-telephony-quickstart cd scv-partner-telephony-quickstart sf org create scratch -f config/project-scratch-def.json -a scv-migration sf project deploy start ``` # closeAgentWork Changes the status of a work item to “Closed” and removes it from the list of work items in the Omni-Channel widget. Available in API versions 32.0 and later. ## Syntax ```javascript sforce.console.presence.closeAgentWork(workId:String, (optional) callback:function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`workId`|String|The ID of the work item that’s closed.| |`callback`|function|JavaScript method to call when the work item associated with the `workId` is closed.| ## Sample Code–Visualforce ```apex_page Close Engaged Work Item ``` ## Response This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following properties: |Name|Type|Description| |----|----|-----------| |`success`|Boolean|`true` if closing the work item was successful; `false` if closing the work item wasn’t successful.| # closeAgentWork for Lightning Experience Changes the status of a work item to *Closed* and removes it from the list of work items in the Omni-Channel utility. ## Arguments |Name|Type|Description| |----|----|-----------| |`workId`|string|The ID of the work item that’s closed.| ## Sample Code Component code: ```html ``` Controller code: ```javascript ({ closeWork: function(cmp, evt, hlp) { var omniAPI = cmp.find("omniToolkit"); omniAPI.getAgentWorks().then(function(result) { var works = JSON.parse(result.works); var work = works[0]; omniAPI.closeAgentWork({workId: work.workId}).then(function(res) { if (res) { console.log("Closed work successfully"); } else { console.log("Close work failed"); } }).catch(function(error) { console.log(error); }); }); } }) ``` ## Response This method returns a promise that, upon success, resolves to `true` and is rejected on error. # closeTab() Closes a specified primary tab or subtab. Keep in mind that closing the first tab in a primary tab closes the primary tab itself. This method is only available in API version 20.0 or later. ## Syntax **note:** The user interface and API behave different for pinned primary tabs. In the UI, when a primary tab is pinned, you can close subtabs using your mouse. However, in the API, if the primary tab is pinned, you can't close its subtabs. ```javascript sforce.console.closeTab(id:String, (optional) callback:Function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`id`|string|ID of the primary tab or subtab to close.| |`callback`|function|For API version 35.0 or later, the JavaScript method that’s called upon completion of the method.| ## Sample Code API 20.0 or Later–Visualforce ```apex_page Click here to close this tab ``` **note:** To see this example in action, click the custom link on a case. For more information, see [Define Custom Buttons and Links](https://help.salesforce.com/s/articleView?id=defining_custom_links.htm) in Salesforce Help. ## Response None ## Sample Code API Version 35.0 or Later–Visualforce ```apex_page Click here to close this tab ``` **note:** To see this example in action, click the custom link on a case. For more information, see [Define Custom Buttons and Links](https://help.salesforce.com/s/articleView?id=defining_custom_links.htm) in Salesforce Help. ## Response This method is asynchronous, so it returns its response in an object in a callback method. The response object contains the following fields: |Name|Type|Description| |----|----|-----------| |`success`|boolean|`true` if the tab was re-opened, `false` otherwise.| |`error`|string|Error message if the tab couldn’t be closed.| **tip:** When using Firefox, we recommend that you don't call `closeTab()` on a tab with an active alert box because the browser may not load properly. # closeTab() for Lightning Experience Closes a workspace tab or subtab. This method works only in Lightning console apps. ## Arguments The method provides the same argument for both Aura Components and Lightning Web Components (LWC). |Name|Type|Description| |----|----|-----------| |`tabId`|string|ID of the workspace tab or subtab to close.| ## LWC Sample Code This component checks if it’s in a Lightning console app using the `isConsoleNavigation` wire adapter. When the [`getFocusedTabInfo()`](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-lightning-getfocusedtabinfo.md) resolves successfully, it returns the `tabInfo` object. The `const { tabId }` syntax destructures the `tabInfo` object and binds the `tabInfo.tabId` value on the `tabId` variable. `closeTab()` uses this `tabId` value to close the tab. ```javascript import { LightningElement, wire } from 'lwc'; import { IsConsoleNavigation, getFocusedTabInfo, closeTab } from 'lightning/platformWorkspaceApi'; export class WorkspaceAPICloseTab extends LightningElement { @wire(IsConsoleNavigation) isConsoleNavigation; async closeTab() { if (!this.isConsoleNavigation) { return; } const { tabId } = await getFocusedTabInfo(); await closeTab(tabId); } } ``` This example shows the [workspaceAPICloseTab](https://github.com/trailheadapps/lwc-recipes/tree/main/force-app/main/default/lwc/workspaceAPICloseTab) component in the [lwc-recipes repo](https://github.com/trailheadapps/lwc-recipes/tree/main/force-app/main/default/lwc). To make your component available for use in a Lightning console app, specify the `lightning__AppPage` target in the [component’s configuration file](https://developer.salesforce.com/docs/platform/lwc/guide/use-config-for-console-app.html). ## Aura Components Sample Code This component has a button that, when pressed, closes the currently focused tab. Component code: ```html ``` Controller code: ```javascript ({ closeFocusedTab : function(component, event, helper) { var workspaceAPI = component.find("workspace"); workspaceAPI.getFocusedTabInfo().then(function(response) { var focusedTabId = response.tabId; workspaceAPI.closeTab({tabId: focusedTabId}); }) .catch(function(error) { console.log(error); }); } }) ``` ## Response This method returns a promise that resolves to `true` if successful. The promise is rejected on error. # Cloud Resource Represents a Cloud Resource configuration item in the Configuration Management Database (CMDB). ## Configuration Item Type Definition ||| |-|-| |Name|Cloud Resource| |Developer Name|`SD_ClRe`| |Component|No| |Parent|[Base](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-base.md)| |End User Compute/Unmetered|No| |Rule Name|No identification rule is defined for this CI type.| ## Attributes ### Availability Zone - **Type**: text - **Developer Name**: `SD_AvZo` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The availability zone of the Cloud Resource. - **Required**: Optional ### Host Name - **Type**: text - **Developer Name**: `SD_HoNa` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The host name of the Cloud Resource. - **Required**: Optional ### Local FQDN - **Type**: text - **Developer Name**: `SD_LoFq` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The local fqdn of the Cloud Resource. - **Required**: Optional # Cluster Node Details Represents the Cluster Node Details attribute set in the Configuration Management Database (CMDB). This attribute set groups related attributes for configuration items. ## Configuration Item Attribute Set Definition ||| |-|-| |Display Name|Cluster Node Details| |Developer Name|`SD_ClNoDe`| |Master Label|Cluster_Node_Details| ## Attributes ### Cluster FQDN - **Type**: text - **Developer Name**: `SD_ClFq` - **Description**: Describes the Cluster FQDN for configuration items. - **Required**: Optional ### Cluster IP Address - **Type**: text - **Developer Name**: `SD_ClIpAd` - **Description**: Describes the Cluster IP Address for configuration items. - **Required**: Optional ### Cluster Name - **Type**: text - **Developer Name**: `SD_ClNa` - **Description**: Describes the Cluster Name for configuration items. - **Required**: Optional # Cluster Of Represents the Cluster Of relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. ## Relationship Type Definition ||| |-|-| |Developer Name|`SD_ClOf`| |Description|Defines the Cluster Of relationship between configuration items in the CMDB.| |Master Label|Cluster Of| |Direct Relationship|Cluster Of| |Inverse Relationship|Cluster| |Line Stroke|Solid| |Color Code|`#80b3ff`| # Cluster Resource Details Represents the Cluster Resource Details attribute set in the Configuration Management Database (CMDB). This attribute set groups related attributes for configuration items. ## Configuration Item Attribute Set Definition ||| |-|-| |Display Name|Cluster Resource Details| |Developer Name|`SD_ClReDe`| |Master Label|Cluster_Resource_Details| ## Attributes ### Cluster Resource Name - **Type**: text - **Developer Name**: `SD_ClReNa` - **Description**: Describes the Cluster Resource Name for configuration items. - **Required**: Optional ### Cluster Resource Status - **Type**: text - **Developer Name**: `SD_ClReSt` - **Description**: Describes the Cluster Resource Status for configuration items. - **Required**: Optional ### Cluster Resource Type - **Type**: text - **Developer Name**: `SD_ClReTy` - **Description**: Describes the Cluster Resource Type for configuration items. - **Required**: Optional # CMDB Configuration Item Types Lists the configuration item types in the Configuration Management Database (CMDB). |Required Editions| |-----------------| |Available in: Lightning Experience| |Available in: **Enterprise**, and **Unlimited** Editions| - **[Access Concentrator](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-access-concentrator.md)** Represents an Access Concentrator configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[Access Control Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-access-control-device.md)** Represents an Access Control Device configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Device. - **[Access Point](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-access-point.md)** Represents an Access Point configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Switch. - **[AIX Server](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-aix-server.md)** Represents an AIX Server configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Server. - **[Apache Tomcat Server](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-apache-tomcat-server.md)** Represents an Apache Tomcat Server configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Application Service. - **[Apache Web Server](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-apache-web-server.md)** Represents an Apache Web Server configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Application Service. - **[Appliance](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-appliance.md)** Represents an Appliance configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[Application](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-application.md)** Represents an Application configuration item in the Configuration Management Database (CMDB). - **[Application Server](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-application-server.md)** Represents an Application Server configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Server. - **[Application Service](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-application-service.md)** Represents an Application Service configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Application. - **[Audio Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-audio-device.md)** Represents an Audio Device configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[Automation Relay Display](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-automation-relay-display.md)** Represents an Automation Relay Display configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[AV Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-av-device.md)** Represents an AV Device configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Communication Infra. - **[Avaya Gateway](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-avaya-gateway.md)** Represents an Avaya Gateway configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[AVC encoder](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-avc-encoder.md)** Represents an AVC encoder configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[AWS](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-aws.md)** Represents an AWS configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Cloud Resource. - **[AWS AMI](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-aws-ami.md)** Represents an AWS AMI (Amazon Machine Image) configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of AWS. - **[AWS Auto Scaling Group](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-aws-auto-scaling-group.md)** Represents an AWS Auto Scaling Group configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of AWS. - **[AWS Database Cluster](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-aws-database-cluster.md)** Represents an AWS Database Cluster configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of AWS. - **[AWS DocumentDB](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-aws-documentdb.md)** Represents an AWS DocumentDB configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of AWS. - **[AWS DynamoDB](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-aws-dynamodb.md)** Represents an AWS DynamoDB configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of AWS. - **[AWS EBS](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-aws-ebs.md)** Represents an AWS EBS configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of AWS. - **[AWS EC2 Instance](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-aws-ec2-instance.md)** Represents an AWS EC2 Instance configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Server. - **[AWS ECR](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-aws-ecr.md)** Represents an AWS ECR configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of AWS. - **[AWS Internet Gateway](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-aws-internet-gateway.md)** Represents an AWS Internet Gateway configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of AWS. - **[AWS Launch Template](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-aws-launch-template.md)** Represents an AWS Launch Template configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of AWS. - **[AWS Load Balancer](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-aws-load-balancer.md)** Represents an AWS Load Balancer configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of AWS. - **[AWS Nat Gateways](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-aws-nat-gateways.md)** Represents an AWS Nat Gateways configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of AWS. - **[AWS Neptune](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-aws-neptune.md)** Represents an AWS Neptune configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of AWS. - **[AWS Network ACLs](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-aws-network-acls.md)** Represents an AWS Network ACLs configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of AWS. - **[AWS RDS](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-aws-rds.md)** Represents an AWS RDS configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of AWS. - **[AWS Route Table](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-aws-route-table.md)** Represents an AWS Route Table configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of AWS. - **[AWS S3](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-aws-s3.md)** Represents an AWS S3 configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of AWS. - **[AWS Security Group](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-aws-security-group.md)** Represents an AWS Security Group configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of AWS. - **[AWS Snapshot](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-aws-snapshot.md)** Represents an AWS Snapshot configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of AWS. - **[AWS Target Group](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-aws-target-group.md)** Represents an AWS Target Group configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of AWS. - **[AWS VPC](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-aws-vpc.md)** Represents an AWS VPC configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of AWS. - **[Azure](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-azure.md)** Represents an Azure configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Cloud Resource. - **[Azure App Service](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-azure-app-service.md)** Represents an Azure App Service configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Azure. - **[Azure Application Gateway](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-azure-application-gateway.md)** Represents an Azure Application Gateway configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Azure. - **[Azure Network Security Group](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-azure-network-security-group.md)** Represents an Azure Network Security Group configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Azure. - **[Azure Resource Group](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-azure-resource-group.md)** Represents an Azure Resource Group configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Azure. - **[Azure SQL Managed Instance](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-azure-sql-managed-instance.md)** Represents an Azure SQL Managed Instance configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Azure. - **[Azure SQL Server](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-azure-sql-server.md)** Represents an Azure SQL Server configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Azure. - **[Azure Virtual Machine](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-azure-virtual-machine.md)** Represents an Azure Virtual Machine configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Server. - **[Azure Virtual Network](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-azure-virtual-network.md)** Represents an Azure Virtual Network configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Azure. - **[Azure VMSS](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-azure-vmss.md)** Represents an Azure VMSS configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Azure. - **[Base](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-base.md)** Represents a Base configuration item in the Configuration Management Database (CMDB). - **[Business Continuity Appliance](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-business-continuity-appliance.md)** Represents a Business Continuity Appliance configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Device. - **[Chassis Cluster](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-chassis-cluster.md)** Represents a Chassis Cluster configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[Cisco Network Transport Receiver](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-cisco-network-transport-receiver.md)** Represents a Cisco Network Transport Receiver configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[Cisco Satellite Receiver](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-cisco-satellite-receiver.md)** Represents a Cisco Satellite Receiver configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[Cisco Systems Application Control Engine](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-cisco-systems-application-control-engine.md)** Represents a Cisco Systems Application Control Engine configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[Cisco Systems Content Engine](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-cisco-systems-content-engine.md)** Represents a Cisco Systems Content Engine configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[Cisco Systems Global Site Selector](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-cisco-systems-global-site-selector.md)** Represents a Cisco Systems Global Site Selector configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[Cisco Systems Media Convergence Server](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-cisco-systems-media-convergence-server.md)** Represents a Cisco Systems Media Convergence Server configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[Cisco Systems Mobility Services Engine](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-cisco-systems-mobility-services-engine.md)** Represents a Cisco Systems Mobility Services Engine configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[Cisco Systems Network Analysis Module](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-cisco-systems-network-analysis-module.md)** Represents a Cisco Systems Network Analysis Module configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[Cisco Systems UCS](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-cisco-systems-ucs.md)** Represents a Cisco Systems UCS configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[Cisco Systems Unified Sip Proxy](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-cisco-systems-unified-sip-proxy.md)** Represents a Cisco Systems Unified Sip Proxy configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[Cisco Systems Wide Area Virtualization Engine](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-cisco-systems-wide-area-virtualization-engine.md)** Represents a Cisco Systems Wide Area Virtualization Engine configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[Cisco Systems Wireless Mic](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-cisco-systems-wireless-mic.md)** Represents a Cisco Systems Wireless Mic configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[Cisco Systems Wireless Services Module](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-cisco-systems-wireless-services-module.md)** Represents a Cisco Systems Wireless Services Module configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[Cisco Telepresence](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-cisco-telepresence.md)** Represents a Cisco Telepresence configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[Cisco UCS](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-cisco-ucs.md)** Represents a Cisco UCS configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Device. - **[Citrix Netscaler](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-citrix-netscaler.md)** Represents a Citrix Netscaler configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[Cloud Resource](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-cloud-resource.md)** Represents a Cloud Resource configuration item in the Configuration Management Database (CMDB). - **[Communication Infra](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-communication-infra.md)** Represents a Communication Infra configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[Component](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-component.md)** Represents a Component configuration item in the Configuration Management Database (CMDB). - **[Compute](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-compute.md)** Represents a Compute configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Device. - **[Console Switch](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-console-switch.md)** Represents a Console Switch configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[ContentEngine](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-contentengine.md)** Represents a ContentEngine configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[Cooling System](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-cooling-system.md)** Represents a Cooling System configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[Core Switch](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-core-switch.md)** Represents a Core Switch configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Switch. - **[Database Server](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-database-server.md)** Represents a Database Server configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Server. - **[Database Systems](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-database-systems.md)** Represents a Database Systems configuration item in the Configuration Management Database (CMDB). - **[Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-device.md)** Represents a Device configuration item in the Configuration Management Database (CMDB). - **[DSL Modem](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-dsl-modem.md)** Represents a DSL Modem configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[Environment Control](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-environment-control.md)** Represents an Environment Control configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of IOT Sensor. - **[Environmental Climate Monitor](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-environmental-climate-monitor.md)** Represents an Environmental Climate Monitor configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of IOT Sensor. - **[Firewall](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-firewall.md)** Represents a Firewall configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[Gateway](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-gateway.md)** Represents a Gateway configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[Hard Disk](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-hard-disk.md)** Represents a Hard Disk configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[HP-UX Server](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-hp-ux-server.md)** Represents a HP-UX Server configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Unix Server. - **[Hub](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-hub.md)** Represents a Hub configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[IBM Tape Library](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-ibm-tape-library.md)** Represents an IBM Tape Library configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[IO Device Server](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-io-device-server.md)** Represents an IO Device Server configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[IO Module](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-io-module.md)** Represents an IO Module configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Device. - **[IOT Sensor](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-iot-sensor.md)** Represents an IOT Sensor configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Device. - **[IP Camera](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-ip-camera.md)** Represents an IP Camera configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[IP Phone](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-ip-phone.md)** Represents an IP Phone configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Device. - **[IP Speaker](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-ip-speaker.md)** Represents an IP Speaker configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Device. - **[Linux Server](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-linux-server.md)** Represents a Linux Server configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Server. - **[Mac Host](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-mac-host.md)** Represents a Mac Host configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Compute. - **[Management Controller](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-management-controller.md)** Represents a Management Controller configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[Media Gateway](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-media-gateway.md)** Represents a Media Gateway configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Communication Infra. - **[Mobile Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-mobile-device.md)** Represents a Mobile Device configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Compute. - **[Mobile Phone](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-mobile-phone.md)** Represents a Mobile Phone configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Mobile Device. - **[MSSQL Instance](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-mssql-instance.md)** Represents a MSSQL Instance configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Database Systems. - **[MySQL Instance](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-mysql-instance.md)** Represents a MySQL Instance configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Database Systems. - **[NanoStation Terminal](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-nanostation-terminal.md)** Represents a NanoStation Terminal configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[NetApp](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-netapp.md)** Represents a NetApp configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[Netapp Cluster](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-netapp-cluster.md)** Represents a Netapp Cluster configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of NetApp. - **[Netapp Clustered Filer](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-netapp-clustered-filer.md)** Represents a Netapp Clustered Filer configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of NetApp. - **[Netapp Filer](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-netapp-filer.md)** Represents a Netapp Filer configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of NetApp. - **[Network Appliance](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-network-appliance.md)** Represents a Network Appliance configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Switch. - **[Network Convergence System](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-network-convergence-system.md)** Represents a Network Convergence System configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[Network Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-network-device.md)** Represents a Network Device configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Device. - **[Network Load Balancer](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-network-load-balancer.md)** Represents a Network Load Balancer configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[Network Projector](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-network-projector.md)** Represents a Network Projector configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[Network Receiver](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-network-receiver.md)** Represents a Network Receiver configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[Network Server](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-network-server.md)** Represents a Network Server configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[NTP Server](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-ntp-server.md)** Represents a NTP Server configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[Oracle Cluster](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-oracle-cluster.md)** Represents an Oracle Cluster configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Database Systems. - **[Packet Broker](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-packet-broker.md)** Represents a Packet Broker configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[Port Server](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-port-server.md)** Represents a Port Server configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[Power Distribution Unit](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-power-distribution-unit.md)** Represents a Power Distribution Unit configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[Print Server](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-print-server.md)** Represents a Print Server configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[Printer](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-printer.md)** Represents a Printer configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[Remote Access Controller](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-remote-access-controller.md)** Represents a Remote Access Controller configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[RFID Reader](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-rfid-reader.md)** Represents a RFID Reader configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of IOT Sensor. - **[Route Processor Module](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-route-processor-module.md)** Represents a Route Processor Module configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[Router](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-router.md)** Represents a Router configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[SAN Switch](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-san-switch.md)** Represents a SAN Switch configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[Serial Console Server](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-serial-console-server.md)** Represents a Serial Console Server configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[Serial Server](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-serial-server.md)** Represents a Serial Server configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[Server](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-server.md)** Represents a Server configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Compute. - **[ShareLink File Server](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-sharelink-file-server.md)** Represents a ShareLink File Server configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[SmartUPS](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-smartups.md)** Represents a SmartUPS configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[Software](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-software.md)** Represents a Software configuration item in the Configuration Management Database (CMDB). - **[Standard ATS](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-standard-ats.md)** Represents a Standard ATS configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Device. - **[Standard UPS](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-standard-ups.md)** Represents a Standard UPS configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Device. - **[Subnet](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-subnet.md)** Represents a Subnet configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[Switch](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-switch.md)** Represents a Switch configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[Switch Controller](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-switch-controller.md)** Represents a Switch Controller configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[TelePresence](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-telepresence.md)** Represents a TelePresence configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[Temperature Sensor](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-temperature-sensor.md)** Represents a Temperature Sensor configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of IOT Sensor. - **[Terminal Server](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-terminal-server.md)** Represents a Terminal Server configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[Unix Server](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-unix-server.md)** Represents an Unix Server configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Server. - **[Unknown Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-unknown-device.md)** Represents an Unknown Device configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Device. - **[UPS](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-ups.md)** Represents an UPS configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[VLAN](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-vlan.md)** Represents a VLAN configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Component. - **[VMWare ESXi Host](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-vmware-esxi-host.md)** Represents a VMWare ESXi Host configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of VMWare VCenter. - **[VMWare VCenter](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-vmware-vcenter.md)** Represents a VMWare VCenter configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Cloud Resource. - **[VMware VCenter Cluster](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-vmware-vcenter-cluster.md)** Represents a VMware VCenter Cluster configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of VMWare VCenter. - **[VMWare VCenter Datacenter](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-vmware-vcenter-datacenter.md)** Represents a VMWare VCenter Datacenter configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of VMWare VCenter. - **[VMWare VCenter Folder](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-vmware-vcenter-folder.md)** Represents a VMWare VCenter Folder configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of VMWare VCenter. - **[VMWare VCenter VM Disk](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-vmware-vcenter-vm-disk.md)** Represents a VMWare VCenter VM Disk configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Component. - **[Voice Gateway](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-voice-gateway.md)** Represents a Voice Gateway configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[Voice Interface Card](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-voice-interface-card.md)** Represents a Voice Interface Card configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[Voice Server](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-voice-server.md)** Represents a Voice Server configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Server. - **[VoWiFi Handset](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-vowifi-handset.md)** Represents a VoWiFi Handset configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[WAN Accelerator](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-wan-accelerator.md)** Represents a WAN Accelerator configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[WebFarm](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-webfarm.md)** Represents a WebFarm configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Component. - **[Windows Cluster](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-windows-cluster.md)** Represents a Windows Cluster configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Device. - **[Windows Cluster Node](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-windows-cluster-node.md)** Represents a Windows Cluster Node configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Windows Cluster. - **[Windows Desktop](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-windows-desktop.md)** Represents a Windows Desktop configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Compute. - **[Windows Host](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-windows-host.md)** Represents a Windows Host configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Compute. - **[Windows Server](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-windows-server.md)** Represents a Windows Server configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Server. - **[Windows Update](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-windows-update.md)** Represents a Windows Update configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Component. - **[Wireless Bridge](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-wireless-bridge.md)** Represents a Wireless Bridge configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. - **[Wireless Controller](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-wireless-controller.md)** Represents a Wireless Controller configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of IOT Sensor. # CMDB Configuration Item Types Attributes Set Lists the attributes set in the Configuration Management Database (CMDB). |Required Editions| |-----------------| |Available in: Lightning Experience| |Available in: **Enterprise**, and **Unlimited** Editions| - **[Application Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attribute-set-application-details.md)** Represents the Application Details attribute set in the Configuration Management Database (CMDB). This attribute set groups related attributes for configuration items. - **[Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attribute-set-asset-primary-information.md)** Represents the Asset Primary Information attribute set in the Configuration Management Database (CMDB). This attribute set groups related attributes for configuration items. - **[Cluster Node Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attribute-set-cluster-node-details.md)** Represents the Cluster Node Details attribute set in the Configuration Management Database (CMDB). This attribute set groups related attributes for configuration items. - **[Cluster Resource Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attribute-set-cluster-resource-details.md)** Represents the Cluster Resource Details attribute set in the Configuration Management Database (CMDB). This attribute set groups related attributes for configuration items. - **[Device Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attribute-set-device-details.md)** Represents the Device Details attribute set in the Configuration Management Database (CMDB). This attribute set groups related attributes for configuration items. - **[Docker Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attribute-set-docker-details.md)** Represents the Docker Details attribute set in the Configuration Management Database (CMDB). This attribute set groups related attributes for configuration items. - **[ESXi Host Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attribute-set-esxi-host-details.md)** Represents the ESXi Host Details attribute set in the Configuration Management Database (CMDB). This attribute set groups related attributes for configuration items. - **[File System Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attribute-set-file-system-details.md)** Represents the File System Details attribute set in the Configuration Management Database (CMDB). This attribute set groups related attributes for configuration items. - **[Hardware and Network](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attribute-set-hardware-and-network.md)** Represents the Hardware and Network attribute set in the Configuration Management Database (CMDB). This attribute set groups related attributes for configuration items. - **[IIS Website Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attribute-set-iis-website-details.md)** Represents the IIS Website Details attribute set in the Configuration Management Database (CMDB). This attribute set groups related attributes for configuration items. - **[Image Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attribute-set-image-details.md)** Represents the Image Details attribute set in the Configuration Management Database (CMDB). This attribute set groups related attributes for configuration items. - **[Installed Software Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attribute-set-installed-software-details.md)** Represents the Installed Software Details attribute set in the Configuration Management Database (CMDB). This attribute set groups related attributes for configuration items. - **[Instance Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attribute-set-instance-details.md)** Represents the Instance Details attribute set in the Configuration Management Database (CMDB). This attribute set groups related attributes for configuration items. - **[IPv4 Address Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attribute-set-ipv4-address-details.md)** Represents the IPv4 Address Details attribute set in the Configuration Management Database (CMDB). This attribute set groups related attributes for configuration items. - **[Last Logged In Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attribute-set-last-logged-in-information.md)** Represents the Last Logged In Information attribute set in the Configuration Management Database (CMDB). This attribute set groups related attributes for configuration items. - **[License Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attribute-set-license-details.md)** Represents the License Details attribute set in the Configuration Management Database (CMDB). This attribute set groups related attributes for configuration items. - **[Life Cycle Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attribute-set-life-cycle-information.md)** Represents the Life Cycle Information attribute set in the Configuration Management Database (CMDB). This attribute set groups related attributes for configuration items. - **[Maintenance And BackUp Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attribute-set-maintenance-and-backup-information.md)** Represents the Maintenance And BackUp Information attribute set in the Configuration Management Database (CMDB). This attribute set groups related attributes for configuration items. - **[Memory Module Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attribute-set-memory-module-details.md)** Represents the Memory Module Details attribute set in the Configuration Management Database (CMDB). This attribute set groups related attributes for configuration items. - **[Network Adapter Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attribute-set-network-adapter-details.md)** Represents the Network Adapter Details attribute set in the Configuration Management Database (CMDB). This attribute set groups related attributes for configuration items. - **[Network Interface Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attribute-set-network-interface-details.md)** Represents the Network Interface Details attribute set in the Configuration Management Database (CMDB). This attribute set groups related attributes for configuration items. - **[Operating System Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attribute-set-operating-system-details.md)** Represents the Operating System Details attribute set in the Configuration Management Database (CMDB). This attribute set groups related attributes for configuration items. - **[Package Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attribute-set-package-details.md)** Represents the Package Details attribute set in the Configuration Management Database (CMDB). This attribute set groups related attributes for configuration items. - **[Process Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attribute-set-process-details.md)** Represents the Process Details attribute set in the Configuration Management Database (CMDB). This attribute set groups related attributes for configuration items. - **[Processor Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attribute-set-processor-details.md)** Represents the Processor Details attribute set in the Configuration Management Database (CMDB). This attribute set groups related attributes for configuration items. - **[Security Group Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attribute-set-security-group-details.md)** Represents the Security Group Details attribute set in the Configuration Management Database (CMDB). This attribute set groups related attributes for configuration items. - **[Service Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attribute-set-service-details.md)** Represents the Service Details attribute set in the Configuration Management Database (CMDB). This attribute set groups related attributes for configuration items. - **[Snapshot Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attribute-set-snapshot-details.md)** Represents the Snapshot Details attribute set in the Configuration Management Database (CMDB). This attribute set groups related attributes for configuration items. - **[Software Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attribute-set-software-details.md)** Represents the Software Details attribute set in the Configuration Management Database (CMDB). This attribute set groups related attributes for configuration items. - **[Software Instance Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attribute-set-software-instance-details.md)** Represents the Software Instance Details attribute set in the Configuration Management Database (CMDB). This attribute set groups related attributes for configuration items. - **[Software License Key Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attribute-set-software-license-key-details.md)** Represents the Software License Key Details attribute set in the Configuration Management Database (CMDB). This attribute set groups related attributes for configuration items. - **[Storage Disk Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attribute-set-storage-disk-details.md)** Represents the Storage Disk Details attribute set in the Configuration Management Database (CMDB). This attribute set groups related attributes for configuration items. - **[Storage Pool Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attribute-set-storage-pool-details.md)** Represents the Storage Pool Details attribute set in the Configuration Management Database (CMDB). This attribute set groups related attributes for configuration items. - **[System Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attribute-set-system-information.md)** Represents the System Information attribute set in the Configuration Management Database (CMDB). This attribute set groups related attributes for configuration items. - **[Virtual Machine Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attribute-set-virtual-machine-details.md)** Represents the Virtual Machine Details attribute set in the Configuration Management Database (CMDB). This attribute set groups related attributes for configuration items. - **[VM Disk Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attribute-set-vm-disk-details.md)** Represents the VM Disk Details attribute set in the Configuration Management Database (CMDB). This attribute set groups related attributes for configuration items. - **[Volume Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attribute-set-volume-details.md)** Represents the Volume Details attribute set in the Configuration Management Database (CMDB). This attribute set groups related attributes for configuration items. - **[Website Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attribute-set-website-details.md)** Represents the Website Details attribute set in the Configuration Management Database (CMDB). This attribute set groups related attributes for configuration items. - **[Windows Cluster Node Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attribute-set-windows-cluster-node-details.md)** Represents the Windows Cluster Node Details attribute set in the Configuration Management Database (CMDB). This attribute set groups related attributes for configuration items. # CMDB Relationship Types Lists the standard relationship types in the Configuration Management Database (CMDB). |Required Editions| |-----------------| |Available in: Lightning Experience| |Available in: **Enterprise**, and **Unlimited** Editions| - **[Allocated From](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-allocated-from.md)** Represents the Allocated From relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Allocated To](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-allocated-to.md)** Represents the Allocated To relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[App Owner](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-app-owner.md)** Represents the App Owner relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Assigned To](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-assigned-to.md)** Represents the Assigned To relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Assignee Of](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-assignee-of.md)** Represents the Assignee Of relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Attached To](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-attached-to.md)** Represents the Attached To relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Attaches](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-attaches.md)** Represents the Attaches relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Backed Up By](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-backed-up-by.md)** Represents the Backed Up By relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Belongs To](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-belongs-to.md)** Represents the Belongs To relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Cluster Of](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-cluster-of.md)** Represents the Cluster Of relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Communicated With](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-communicated-with.md)** Represents the Communicated With relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Communicates With](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-communicates-with.md)** Represents the Communicates With relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Component Of](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-component-of.md)** Represents the Component Of relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Configured By](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-configured-by.md)** Represents the Configured By relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Configured On](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-configured-on.md)** Represents the Configured On relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Connected By](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-connected-by.md)** Represents the Connected By relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Connected To](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-connected-to.md)** Represents the Connected To relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Consumed By](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-consumed-by.md)** Represents the Consumed By relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Contained By](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-contained-by.md)** Represents the Contained By relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Contains](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-contains.md)** Represents the Contains relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Cools](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-cools.md)** Represents the Cools relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Created By](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-created-by.md)** Represents the Created By relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Created Using](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-created-using.md)** Represents the Created Using relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Defines Resources For](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-defines-resources-for.md)** Represents the Defines Resources For relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Depends On](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-depends-on.md)** Represents the Depends On relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Deployed On](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-deployed-on.md)** Represents the Deployed On relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Deploys](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-deploys.md)** Represents the Deploys relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[DR Provided By](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-dr-provided-by.md)** Represents the DR Provided By relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Esxi virtualises host](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-esxi-virtualises-host.md)** Represents the Esxi virtualises host relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Exchanges Data With](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-exchanges-data-with.md)** Represents the Exchanges Data With relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Feeds](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-feeds.md)** Represents the Feeds relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[From Template](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-from-template.md)** Represents the From Template relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Hosted On](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-hosted-on.md)** Represents the Hosted On relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Hosts](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-hosts.md)** Represents the Hosts relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[In Rack](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-in-rack.md)** Represents the In Rack relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Installed On](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-installed-on.md)** Represents the Installed On relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Instantiated By](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-instantiated-by.md)** Represents the Instantiated By relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Instantiates](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-instantiates.md)** Represents the Instantiates relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Load Balancer For](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-load-balancer-for.md)** Represents the Load Balancer For relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Load Balances](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-load-balances.md)** Represents the Load Balances relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Located At](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-located-at.md)** Represents the Located At relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Located In](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-located-in.md)** Represents the Located In relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Located in Zone](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-located-in-zone.md)** Represents the Located in Zone relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Managed By](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-managed-by.md)** Represents the Managed By relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Manages](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-manages.md)** Represents the Manages relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Members](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-members.md)** Represents the Members relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Owned By](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-owned-by.md)** Represents the Owned By relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Owns](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-owns.md)** Represents the Owns relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Parent-Child CI Type](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-parentchild-ci-type.md)** Represents the Parent-Child CI Type relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Part Of](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-part-of.md)** Represents the Part Of relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Physically Connected To](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-physically-connected-to.md)** Represents the Physically Connected To relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Powers](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-powers.md)** Represents the Powers relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Provided By](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-provided-by.md)** Represents the Provided By relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Provides](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-provides.md)** Represents the Provides relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Provides Storage For](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-provides-storage-for.md)** Represents the Provides Storage For relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Reads Data From](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-reads-data-from.md)** Represents the Reads Data From relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Receives Data From](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-receives-data-from.md)** Represents the Receives Data From relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Registered On](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-registered-on.md)** Represents the Registered On relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Runs](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-runs.md)** Represents the Runs relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Runs On](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-runs-on.md)** Represents the Runs On relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Secured By](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-secured-by.md)** Represents the Secured By relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Secures](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-secures.md)** Represents the Secures relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Served By](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-served-by.md)** Represents the Served By relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Serves](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-serves.md)** Represents the Serves relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Storage Provided By](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-storage-provided-by.md)** Represents the Storage Provided By relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Tester](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-tester.md)** Represents the Tester relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Used By](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-used-by.md)** Represents the Used By relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Uses](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-uses.md)** Represents the Uses relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Virtualized On](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-virtualized-on.md)** Represents the Virtualized On relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Virtualizes](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-virtualizes.md)** Represents the Virtualizes relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. - **[Writes/Reads Data From](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type-writesreads-data-from.md)** Represents the Writes/Reads Data From relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. # CnfgItemAttrDef Represents the definition of an attribute or a property for a configuration item. Each attribute of a configuration item can be defined with characterists such as whether the attribute is hidden, mandatory, what's the data type, status, and so on. For example, CI name, CI owner, Status, and so on. This object is available in API version 65.0 and later. ## Supported SOAP API Calls `create()`, `describeSObjects()`, `query()`, `retrieve()`, `update()`, `upsert()` ## Supported REST API Methods `GET, HEAD, PATCH, POST, Query` ## Fields ### CnfgItemAttrPicklistDefId - **Type**: reference - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The attribute picklist definition related to this attribute when the attribute supports multiple possible values. This field is a relationship field. - **Relationship Name**: CnfgItemAttrPicklistDef - **Refers To**: CnfgItemAttrPicklistDef ### DataType - **Type**: picklist - **Properties**: Create, Filter, Group, Restricted picklist, Sort, Update - **Description**: The data type of a configuration item attribute, such as integer, text, boolean, or picklist. - **Possible values**: - `Boolean` - `Date` - `Double` - `Integer` - `Text` ### DeveloperName - **Type**: string - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The unique name of the object in the API. This name can contain only underscores and alphanumeric characters, and must be unique in your org. It must begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores. In managed packages, this field prevents naming conflicts on package installations. With this field, a developer can change the object's name in a managed package and the changes are reflected in a subscriber's organization. This field is automatically generated, but you can supply your own value if you create the record using the API. When creating large sets of data, always specify a unique DeveloperName for each record. If no DeveloperName is specified, performance may slow while Salesforce generates one for each record. ### DisplayOrder - **Type**: string - **Properties**: Autonumber, Defaulted on create, Filter, Sort - **Description**: The display order of an attribute that determines the sequence in which the attribute is shown to a user. ### IsActive - **Type**: boolean - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: Specifies whether an attribute is active or not. - **Default value**: `false` ### IsCustom - **Type**: boolean - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: Specifies whether it's a custom attribute (true) or a predefined attribute that's shipped out of the box (false). - **Default value**: `false` ### IsDataValidationRequired - **Type**: boolean - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: Specifies whether the attribute requires data validation at field-level (true) or not (false). ### IsHidden - **Type**: boolean - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: Specifies whether this attribute is hidden from display or not. - **Default value**: `false` ### IsMain - **Type**: boolean - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: Indicates whether the attribute displays on the configuration item details page when the Show Main Properties toggle is on (true) or not (false). - **Default value**: `false` ### IsRequired - **Type**: boolean - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: Specifies whether an attribute is required as mandatory or not. - **Default value**: `false` ### IsSearchable - **Type**: boolean - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: Indicates whether this attribute is included in configuration item search queries (true) or not (false). - **Default value**: `false` ### IsUsedForCorrelation - **Type**: boolean - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: Specifies whether this attribute is used to correlate two configuration item records or not. - **Default value**: `false` ### Language - **Type**: picklist - **Properties**: Create, Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort, Update - **Description**: The combined language and locale ISO code, which controls the language of the CnfgItemAttrDef. ### MasterLabel - **Type**: string - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The label for this CnfgItemAttrDef value. This display value is the internal label that doesn't get translated. ### MatchingType - **Type**: picklist - **Properties**: Create, Filter, Group, Nillable, Restricted picklist, Sort, Update - **Description**: Indicates how configuration item search filters compare values for this attribute. Applies only to text and picklist attributes. Exact requires an exact match. Fuzzy matches approximate values. - **Possible values**: - `Exact` - `Fuzzy` ### Name - **Type**: string - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The name of a configuration item attribute. ### ReferenceObject - **Type**: string - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: Name of the platform object referenced by this lookup-relationship attribute. For example, account, lead, and user. # CnfgItemAttrPcklstValDef Represents a specific value for a configuration item attribute. For example, high, medium, and low are picklist values of the attribute Business Criticality. This object is available in API version 65.0 and later. ## Supported SOAP API Calls `create()`, `delete()`, `describeSObjects()`, `query()`, `retrieve()`, `update()`, `upsert()` ## Supported REST API Methods `DELETE, GET, HEAD, PATCH, POST, Query` ## Fields ### CnfgItemAttrPicklistDefId - **Type**: reference - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The configuration item attribute picklist definition to which this value is mapped. This field is a relationship field. - **Relationship Name**: CnfgItemAttrPicklistDef - **Refers To**: CnfgItemAttrPicklistDef ### DeveloperName - **Type**: string - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The unique name of the object in the API. This name can contain only underscores and alphanumeric characters, and must be unique in your org. It must begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores. In managed packages, this field prevents naming conflicts on package installations. With this field, a developer can change the object's name in a managed package and the changes are reflected in a subscriber's organization. This field is automatically generated, but you can supply your own value if you create the record using the API. When creating large sets of data, always specify a unique DeveloperName for each record. If no DeveloperName is specified, performance may slow while Salesforce generates one for each record. ### IsCustom - **Type**: boolean - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: Indicates whether the configuration item attribute picklist value definition was created specifically in your org. - **Default value**: `false` ### Language - **Type**: picklist - **Properties**: Create, Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort, Update - **Description**: The combined language and locale ISO code, which controls the language of the configuration item attribute picklist value definition. ### MasterLabel - **Type**: string - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The label for this configuration item attribute picklist value definition value. This display value is the internal label that doesn't get translated. ### Name - **Type**: string - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The name of a value for a configuration item attribute of data type picklist. # CnfgItemAttrPicklistDef Represents a definition for a configuration item attribute that allows multiple possible values. For example, the attribute Business Criticality can have multiple values. This object is available in API version 65.0 and later. ## Supported SOAP API Calls `create()`, `delete()`, `describeSObjects()`, `query()`, `retrieve()`, `update()`, `upsert()` ## Supported REST API Methods `DELETE, GET, HEAD, PATCH, POST, Query` ## Fields ### DeveloperName - **Type**: string - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The unique name of the object in the API. This name can contain only underscores and alphanumeric characters, and must be unique in your org. It must begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores. In managed packages, this field prevents naming conflicts on package installations. With this field, a developer can change the object's name in a managed package and the changes are reflected in a subscriber's organization. This field is automatically generated, but you can supply your own value if you create the record using the API. When creating large sets of data, always specify a unique DeveloperName for each record. If no DeveloperName is specified, performance may slow while Salesforce generates one for each record. ### IsCustom - **Type**: boolean - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: Indicates whether the configuration item attribute picklist definition was created specifically in your org. - **Default value**: `false` ### Language - **Type**: picklist - **Properties**: Create, Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort, Update - **Description**: The combined language and locale ISO code, which controls the language of the configuration item attribute picklist definition. ### MasterLabel - **Type**: string - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The label for this configuration item attribute picklist definition value. This display value is the internal label that doesn't get translated. ### Name - **Type**: string - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The name of a configuration item attribute picklist definition. # CnfgItemAttrSetAttr Specifies the attribute set to which an attribute belongs. For example, Stakeholders attribute set definition contains the attribute Owner. This object is available in API version 65.0 and later. ## Supported SOAP API Calls `create()`, `delete()`, `describeSObjects()`, `query()`, `retrieve()`, `update()`, `upsert()` ## Supported REST API Methods `DELETE, GET, HEAD, PATCH, POST, Query` ## Fields ### CnfgItemAttrDefId - **Type**: reference - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The attribute of a configuration item. This field is a relationship field. - **Relationship Name**: CnfgItemAttrDef - **Refers To**: CnfgItemAttrDef ### CnfgItemAttrDplyGrpId - **Type**: reference - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The display group to which a configuration item attribute belongs. This field is a relationship field. - **Relationship Name**: CnfgItemAttrDplyGrp - **Refers To**: CnfgItemAttrSetDef ### DeveloperName - **Type**: string - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The unique name of the object in the API. This name can contain only underscores and alphanumeric characters, and must be unique in your org. It must begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores. In managed packages, this field prevents naming conflicts on package installations. With this field, a developer can change the object's name in a managed package and the changes are reflected in a subscriber's organization. This field is automatically generated, but you can supply your own value if you create the record using the API. When creating large sets of data, always specify a unique DeveloperName for each record. If no DeveloperName is specified, performance may slow while Salesforce generates one for each record. ### Language - **Type**: picklist - **Properties**: Create, Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort, Update - **Description**: The combined language and locale ISO code, which controls the language of the configuration item attribute set attribute. ### MasterLabel - **Type**: string - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The label for this configuration item attribute set attribute value. This display value is the internal label that doesn't get translated. # CnfgItemAttrSetDef Represents the definition of a logical grouping of configuration item attributes that's used to display similar attributes together. For example, Stakeholder attribute set has the attributes owner, business owner, escalation group, and support group This object is available in API version 65.0 and later. ## Supported SOAP API Calls `create()`, `describeSObjects()`, `query()`, `retrieve()`, `update()`, `upsert()` ## Supported REST API Methods `GET, HEAD, PATCH, POST, Query` ## Fields ### DeveloperName - **Type**: string - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The unique name of the object in the API. This name can contain only underscores and alphanumeric characters, and must be unique in your org. It must begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores. In managed packages, this field prevents naming conflicts on package installations. With this field, a developer can change the object's name in a managed package and the changes are reflected in a subscriber's organization. This field is automatically generated, but you can supply your own value if you create the record using the API. When creating large sets of data, always specify a unique DeveloperName for each record. If no DeveloperName is specified, performance may slow while Salesforce generates one for each record. ### IsActive - **Type**: boolean - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: Indicates whether the configuration item attribute display group is active (true) or not (false). - **Default value**: `false` ### IsCustom - **Type**: boolean - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: Indicates whether the configuration item attribute set definition was created specifically in your org. - **Default value**: `false` ### Language - **Type**: picklist - **Properties**: Create, Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort, Update - **Description**: The combined language and locale ISO code, which controls the language of the configuration item attribute set definition. ### MasterLabel - **Type**: string - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The label for this configuration item attribute set definition value. This display value is the internal label that doesn't get translated. ### Name - **Type**: string - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The name of the configuration item attribute display group. ### SequenceNumber - **Type**: string - **Properties**: Autonumber, Defaulted on create, Filter, Sort - **Description**: The sequence in which an attribute group is displayed for a configuration item. # CnfgItemChangeEvent Stores Configuration Item (CI) change events when a CI is created or updated in CMDB and matches a CI Type that's enabled for asset tracking. This object is available in API version 66.0 and later. ## Supported Calls `create()`, `describeSObjects()` ## Fields ### ChangeSource - **Type**: string - **Properties**: Create, Nillable - **Description**: Specifies whether the change originated from a configuration item or an asset. ### CnfgItmAttributes - **Type**: textarea - **Properties**: Create - **Description**: Stores unstructured name-value pairs (attributes) related to the Configuration Item record. ### CnfgItmRecord - **Type**: string - **Properties**: Create - **Description**: Stores the unique identifier (ID) for the associated Configuration Item record. ### CnfgItmRecordName - **Type**: string - **Properties**: Create, Nillable - **Description**: Stores the name of the associated Configuration Item record. ### CnfgItmTypeDef - **Type**: string - **Properties**: Create - **Description**: Stores the unique identifier (ID) of the Configuration Item Type Definition record. ### EventDateTime - **Type**: dateTime - **Properties**: Create - **Description**: Stores the date and time when the corresponding change event was recorded. ### EventUuid - **Type**: string - **Properties**: Nillable - **Description**: A universally unique identifier (UUID) that identifies the platform event message. ### ReplayId - **Type**: string - **Properties**: Nillable - **Description**: An opaque ID value that is populated by the system and refers to the position of the event in the event stream. # CnfgItemTypeAttrRelDef Represents the definition of a relationship between a configuration item type and an attribute that's applicable for the item type. For example, a server configuration item type has the attributes manufacturer, name, and IP address. This object is available in API version 65.0 and later. ## Supported SOAP API Calls `create()`, `delete()`, `describeSObjects()`, `query()`, `retrieve()`, `update()`, `upsert()` ## Supported REST API Methods `DELETE, GET, HEAD, PATCH, POST, Query` ## Fields ### CnfgItemAttrDefId - **Type**: reference - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The configuration item attribute definition that's applied to an item type. This field is a relationship field. - **Relationship Name**: CnfgItemAttrDef - **Refers To**: CnfgItemAttrDef ### CnfgItemTypeDefId - **Type**: reference - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The configuration item type definition to which an attribute applies. This field is a relationship field. - **Relationship Name**: CnfgItemTypeDef - **Refers To**: CnfgItemTypeDef ### DeveloperName - **Type**: string - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The unique name of the object in the API. This name can contain only underscores and alphanumeric characters, and must be unique in your org. It must begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores. In managed packages, this field prevents naming conflicts on package installations. With this field, a developer can change the object's name in a managed package and the changes are reflected in a subscriber's organization. This field is automatically generated, but you can supply your own value if you create the record using the API. When creating large sets of data, always specify a unique DeveloperName for each record. If no DeveloperName is specified, performance may slow while Salesforce generates one for each record. ### IsActive - **Type**: boolean - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: Specifies if the relationship between an attribute and a configuration type is active or not. - **Default value**: `false` ### IsCustom - **Type**: boolean - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: Specifies whether it's a custom attribute (true) or a predefined attribute that's shipped out of the box (false). - **Default value**: `false` ### IsHidden - **Type**: boolean - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: Specifies if an attribute is public or hidden for access for a specific configuration item type or not. - **Default value**: `false` ### IsPrimary - **Type**: boolean - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: Specifies whether an attribute is a primary attribute for a specific configuration item type or not. - **Default value**: `false` ### IsReadOnly - **Type**: boolean - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: Specifies whether it's a ReadOnly attribute (true) or can be edited by Customer (false). - **Default value**: `false` ### IsRequired - **Type**: boolean - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: Specifies whether an attribute is a required attribute for a specific configuration item type or not. - **Default value**: `false` ### IsUsedInRelMap - **Type**: boolean - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: Specifies whether an attribute is used to determine relationships between two configuration items or not. While some attributes when related to an item type can be used in determining relationship mappings, other attributes are not used for this purpose. - **Default value**: `false` ### Language - **Type**: picklist - **Properties**: Create, Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort, Update - **Description**: The combined language and locale ISO code, which controls the language of the configuration Item type attribute definition. ### MasterLabel - **Type**: string - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The label for this configuration Item type attribute definition value. This display value is the internal label that doesn't get translated. # CnfgItemTypeDef Represents the definition of a configuration item type. A configuration item type represents a category that is used to classify configuration items. The components share common characteristics. For example, server, application, and network device. This object is available in API version 65.0 and later. ## Supported SOAP API Calls `create()`, `describeSObjects()`, `query()`, `retrieve()`, `update()`, `upsert()` ## Supported REST API Methods `GET, HEAD, PATCH, POST, Query` ## Fields ### Description - **Type**: string - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The description of a configuration item type definition. ### DeveloperName - **Type**: string - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The unique name of the object in the API. This name can contain only underscores and alphanumeric characters, and must be unique in your org. It must begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores. In managed packages, this field prevents naming conflicts on package installations. With this field, a developer can change the object's name in a managed package and the changes are reflected in a subscriber's organization. This field is automatically generated, but you can supply your own value if you create the record using the API. When creating large sets of data, always specify a unique DeveloperName for each record. If no DeveloperName is specified, performance may slow while Salesforce generates one for each record. ### IsComponent - **Type**: boolean - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: Indicates whether a configuration item type is a component (true) or not. A component item type cannot exist as a standalone item. - **Default value**: `false` ### IsCustom - **Type**: boolean - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: Indicates whether a configuration item type is shipped out of the box (false) or is custom (true). - **Default value**: `false` ### IsUsedForTransientCnfgItm - **Type**: boolean - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: Specifies whether the configuration items associated with this type are transient or not. - **Default value**: `false` ### Language - **Type**: picklist - **Properties**: Create, Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort, Update - **Description**: The combined language and locale ISO code, which controls the language of the configuration item type definition. ### MasterLabel - **Type**: string - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The label for this configuration item type definition value. This display value is the internal label that doesn't get translated. ### Name - **Type**: string - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The name of a configuration item type definition. ### Status - **Type**: picklist - **Properties**: Create, Filter, Group, Nillable, Restricted picklist, Sort, Update - **Description**: Specifies the status of a configuration item type definition in relation to other records where it's referenced. This field is used internally to identify configuration item types which may be active or inactive but no actual configuration items were created using that type and are still in use. Values are `Unused` or `Used`. # CnfgItemTypeIdentFieldMap Represents the mapping of configuration item attributes used in an identification rule to evaluate whether a discovered item already exists in CMDB. For example, an identification rule for a Linux Server may use host name and MAC address as identification field mappings. This object is available in API version 66.0 and later. ## Supported SOAP API Calls `create()`, `delete()`, `describeSObjects()`, `query()`, `retrieve()`, `update()`, `upsert()` ## Supported REST API Methods `DELETE, GET, HEAD, PATCH, POST, Query` ## Fields ### AttributePurpose - **Type**: picklist - **Properties**: Create, Filter, Group, Restricted picklist, Sort, Update - **Description**: Specifies how the attribute is used within the identification rule. Identification refers to using the attribute to match and identify existing configuration items during discovery. Expression refers to using the attribute in logical conditions to determine whether an identification rule should be applied. - **Possible values**: - `Identification` - `Expression` ### CnfgItemTypeAttrRelDefId - **Type**: reference - **Properties**: Create, Filter, Group, Sort, Update - **Description**: Reference of the configuration item attribute associated with this mapping. ### CnfgItemTypeIdentRuleId - **Type**: reference - **Properties**: Create, Filter, Group, Sort, Update - **Description**: ID of the identification rule to which the field mapping belongs. ### DeveloperName - **Type**: string - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The unique name of the object in the API. This name can contain only underscores and alphanumeric characters, and must be unique in your org. It must begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores. In managed packages, this field prevents naming conflicts on package installations. With this field, a developer can change the object's name in a managed package and the changes are reflected in a subscriber's organization. This field is automatically generated, but you can supply your own value if you create the record using the API. When creating large sets of data, always specify a unique DeveloperName for each record. If no DeveloperName is specified, performance may slow while Salesforce generates one for each record. ### MasterLabel - **Type**: string - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The label for this configuration item type identification field mapping value. This display value is the internal label that doesn't get translated. # CnfgItemTypeIdentRule Represents the definition of a rule used to identify whether a configuration item (CI) already exists in the CMDB or needs to be created as a new record. For example, an identification rule can check if an application server with the same host name and IP address already exists in CMDB. This object is available in API version 66.0 and later. ## Supported SOAP API Calls `create()`, `delete()`, `describeSObjects()`, `query()`, `retrieve()`, `search()`, `update()`, `upsert()` ## Supported REST API Methods `DELETE, GET, HEAD, PATCH, POST, Query` ## Fields ### AttributePurpose - **Type**: picklist - **Properties**: Create, Filter, Group, Sort, Update - **Description**: Purpose of the attributes used by the identification rule. ### ConfigurationItemTypeId - **Type**: reference - **Properties**: Create, Filter, Group, Sort, Update - **Description**: Configuration item type associated with the identification rule. ### Description - **Type**: string - **Properties**: Create, Filter, Group, Sort, Update - **Description**: Description of the identification rule. ### DeveloperName - **Type**: string - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The unique name of the object in the API. This name can contain only underscores and alphanumeric characters, and must be unique in your org. It must begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores. In managed packages, this field prevents naming conflicts on package installations. With this field, a developer can change the object's name in a managed package and the changes are reflected in a subscriber's organization. This field is automatically generated, but you can supply your own value if you create the record using the API. When creating large sets of data, always specify a unique DeveloperName for each record. If no DeveloperName is specified, performance may slow while Salesforce generates one for each record. ### IsActive - **Type**: boolean - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: Indicates whether the identification rule is active. ### MasterLabel - **Type**: string - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The label for this configuration item type identification rule value. This display value is the internal label that doesn't get translated. ### RuleName - **Type**: string - **Properties**: Create, Filter, Group, idLookup, Sort, Update - **Description**: Unique name of the identification rule. # CnfgItemTypeRelationDef Represents how the configuration items are related to each other within a CMDB. For example, Payroll Application RUNS ON App1 WebServer. This object is available in API version 65.0 and later. ## Supported SOAP API Calls `create()`, `describeSObjects()`, `query()`, `retrieve()`, `update()`, `upsert()` ## Supported REST API Methods `GET, HEAD, PATCH, POST, Query` ## Fields ### CnfgMgmtRelationTypeDefId - **Type**: reference - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The predefined configuration management relationship type that's used to map a source and a target configuration item type. This field is a relationship field. - **Relationship Name**: CnfgMgmtRelationTypeDef - **Refers To**: CnfgMgmtRelationTypeDef ### DeveloperName - **Type**: string - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The unique name of the object in the API. This name can contain only underscores and alphanumeric characters, and must be unique in your org. It must begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores. In managed packages, this field prevents naming conflicts on package installations. With this field, a developer can change the object's name in a managed package and the changes are reflected in a subscriber's organization. This field is automatically generated, but you can supply your own value if you create the record using the API. When creating large sets of data, always specify a unique DeveloperName for each record. If no DeveloperName is specified, performance may slow while Salesforce generates one for each record. ### Language - **Type**: picklist - **Properties**: Create, Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort, Update - **Description**: The combined language and locale ISO code, which controls the language of the configuration item type relation definition. ### MasterLabel - **Type**: string - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The label for this configuration item type relation definition value. This display value is the internal label that doesn't get translated. ### SourceConfigurationItemTypeId - **Type**: reference - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The source configuration item type that's related to a target configuration item type via a predefined configuration management relationship type. This field is a relationship field. - **Relationship Name**: SourceConfigurationItemType - **Refers To**: CnfgItemTypeDef ### TargetConfigurationItemTypeId - **Type**: reference - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The target configuration item type that's related to a source configuration item type via a predefined configuration management relationship type. This field is a relationship field. - **Relationship Name**: TargetConfigurationItemType - **Refers To**: CnfgItemTypeDef # CnfgMgmtCiSourceDef Represents the definition of a configuration item source from which data can be added to Configuration Management Database (CMDB). Sources include automated discovery, file import, and manual entry. This object is available in API version 67.0 and later. ## Supported SOAP API Calls `create()`, `describeSObjects()`, `query()`, `retrieve()`, `update()`, `upsert()` ## Supported REST API Methods `GET, HEAD, PATCH, POST, Query` ## Fields ### Description - **Type**: string - **Properties**: Create, Filter, Group, Sort, Update - **Description**: Stores the description of the configuration item source definition. ### DeveloperName - **Type**: string - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The unique name of the object in the API. This name can contain only underscores and alphanumeric characters, and must be unique in your org. It must begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores. In managed packages, this field prevents naming conflicts on package installations. With this field, a developer can change the object's name in a managed package and the changes are reflected in a subscriber's organization. This field is automatically generated, but you can supply your own value if you create the record using the API. When creating large sets of data, always specify a unique DeveloperName for each record. If no DeveloperName is specified, performance may slow while Salesforce generates one for each record. ### IsActive - **Type**: boolean - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: Indicates whether the configuration item source definition is active (true) or not (false). ### IsCustom - **Type**: boolean - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: Indicates whether the configuration item source definition is custom (true) or system-defined (false). ### IsEnabled - **Type**: boolean - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: Indicates whether the configuration item source definition is available for selection when creating or updating configuration items (true) or not. ### IsIcpltCnfgItmAllowed - **Type**: boolean - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: Indicates whether items with missing configuration item details can be tracked for review and completion before configuration items are created (true) or not (false). - **Default value**: `false` ### MasterLabel - **Type**: string - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The label for this configuration management configuration item source definition value. This display value is the internal label that doesn't get translated. ### SourceApiName - **Type**: string - **Properties**: Create, Filter, Group, Sort, Update - **Description**: Stores the unique API name of the configuration item source definition. ### SourceName - **Type**: string - **Properties**: Create, Filter, Group, Sort, Update - **Description**: Stores the name of the configuration item source definition. # CnfgMgmtCredential Represents authentication information needed to access and interact with various IT devices and systems during the discovery processes. For example, SSH key. This object is available in API version 65.0 and later. ## Supported Calls `create()`, `delete()`, `describeLayout()`, `describeSObjects()`, `getDeleted()`, `getUpdated()`, `query()`, `retrieve()`, `search()`, `undelete()`, `update()`, `upsert()` ## Fields ### CredentialType - **Type**: picklist - **Properties**: Create, Defaulted on create, Filter, Group, Restricted picklist, Sort, Update - **Description**: The type of credentials that are used to connect to the configuration management database. - **Default value**: `SSH` - **Possible values**: - `AWS_ACCOUNT`—AWS Account - `AZURE_ACCOUNT`—Azure Account - `EMC_VNX`—EMC VNX - `KUBERNETES`—Kubernetes - `MERAKI`—Meraki - `MICROSOFT_INTUNE`—Microsoft Intune - `SCCM_HOST`—SCCM Host - `SNMP` - `SNMP_V3`—SNMP V3 - `SQL_SERVER`—SQL Server - `SSH` - `SSH_PRIVATE_KEY`—SSH Private Key - `VMWARE`—VMware - `V_CENTER`—V Center - `WINDOWS`—Windows - `WINDOWS_AD_DOMAIN_CONTROLLER`—Windows AD Domain Controller - `XTREM_IO`—Xtrem IO ### LastReferencedDate - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: The timestamp when the current user last accessed this record, a record related to this record, or a list view. ### LastViewedDate - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: The timestamp when the current user last viewed this record or list view. ### Name - **Type**: string - **Properties**: Create, Filter, Group, idLookup, Sort, Update - **Description**: The name of credentials that are used to connect to the configuration management database. ### NamedCredentialId - **Type**: reference - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The named credential mapped to the credentials used to connect with a configuration management database. This field is a relationship field. - **Relationship Name**: NamedCredential - **Refers To**: NamedCredential ### OwnerId - **Type**: reference - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: ID of the user who owns the record. This field is a polymorphic relationship field. - **Relationship Name**: Owner - **Refers To**: Group, User ### Status - **Type**: picklist - **Properties**: Create, Defaulted on create, Filter, Group, Restricted picklist, Sort, Update - **Description**: Specifies the status of the credential that determines whether the credentials are used during asset discovery scans or not. - **Default value**: `ACTIVE` - **Possible values**: - `ACTIVE`—Active - `EXPIRED`—Expired - `INACTIVE`—Inactive # CnfgMgmtDiscoveryAgent Represents an installed discovery agent on a system. Serves as a child object of Discovery Agent and tracks individual agent instances across the environment. This object is available in API version 65.0 and later. ## Supported Calls `describeSObjects()`, `getDeleted()`, `getUpdated()`, `query()`, `retrieve()` ## Fields ### AgentIdentifier - **Type**: string - **Properties**: Filter, Group, Sort - **Description**: Specifies the unique identifier (UUID) for the discovery agent instance. ### CnfgMgmtDiscoveryAgentDefId - **Type**: reference - **Properties**: Filter, Group, Nillable, Sort - **Description**: Specifies the unique identifier (UUID) for the discovery agent. This field is a relationship field. - **Relationship Name**: CnfgMgmtDiscoveryAgentDef - **Refers To**: CnfgMgmtDiscoveryAgentDef ### CnfgMgmtDiscoveryAppId - **Type**: reference - **Properties**: Filter, Group, Nillable, Sort - **Description**: Specifies the unique identifier (UUID) for the discovery application instance. This field is a relationship field. - **Relationship Name**: CnfgMgmtDiscoveryApp - **Refers To**: CnfgMgmtDiscoveryApp ### HostIpAddress - **Type**: string - **Properties**: Filter, Group, Sort - **Description**: Specifies the IP address of the host running the discovery agent. ### HostName - **Type**: string - **Properties**: Filter, Group, Sort - **Description**: Specifies the hostname of the server where the discovery agent instance is installed. ### InstalledVersionNumber - **Type**: string - **Properties**: Filter, Group, Sort - **Description**: Specifies the version number of the installed discovery agent. ### Name - **Type**: string - **Properties**: Filter, Group, idLookup, Sort - **Description**: Name of the discovery agent. ### OwnerId - **Type**: reference - **Properties**: Filter, Group, Sort - **Description**: Refers to a unique identifier that designates the user. This field is a polymorphic relationship field. - **Relationship Name**: Owner - **Refers To**: Group, User # CnfgMgmtDiscoveryAgentDef Represents discovery agents installed on various operating systems. Acts as a parent object that groups agent instances by type and operating system. Captures metadata such as version and upgrade preferences. This object is available in API version 65.0 and later. ## Supported Calls `describeSObjects()`, `getDeleted()`, `getUpdated()`, `query()`, `retrieve()` ## Fields ### IsAutoUpgradeEnabled - **Type**: boolean - **Properties**: Defaulted on create, Filter, Group, Sort - **Description**: Indiciates whether the discovery agent gets upgraded automatically (true) or not (false). - **Default value**: `false` ### Name - **Type**: string - **Properties**: Filter, Group, idLookup, Sort - **Description**: The name of the configuration management discovery agent definition. ### OperatingSystem - **Type**: picklist - **Properties**: Filter, Group, Restricted picklist, Sort - **Description**: Specifies the operating system on which the discovery agent is installed. - **Possible values**: - `LINUX`—Linux - `MAC_OS`—Mac os - `WINDOWS`—Windows ### OwnerId - **Type**: reference - **Properties**: Filter, Group, Sort - **Description**: Refers to a unique identifier that designates the user. This field is a polymorphic relationship field. - **Relationship Name**: Owner - **Refers To**: Group, User ### Schedule - **Type**: string - **Properties**: Filter, Group, Sort - **Description**: Specifies the date and time when the scan gets executed by the discovery agent. # CnfgMgmtDiscoveryApp Represents the definition of a discovery application used for agentless discovery. These applications are installed on customer network hosts and are used to scan other devices in the environment. This object is available in API version 65.0 and later. ## Supported Calls `describeSObjects()`, `getDeleted()`, `getUpdated()`, `query()`, `retrieve()`, `update()` ## Fields ### ApplicationIdentifier - **Type**: string - **Properties**: Filter, Group, Sort - **Description**: Unique identifier (UUID) for the discovery application instance. ### ApplicationPublicCert - **Type**: textarea - **Properties**: Nillable, Update - **Description**: Refers to the public key component of a digital certificate used to establish secure communication and authenticate the identity of an application or client interacting with an API. ### ApplicationPublicKey - **Type**: string - **Properties**: Filter, Sort - **Description**: Public key used to encrypt credentials during scans. The related private key is held by the application. ### ClientSecretPath - **Type**: string - **Properties**: Filter, Group, Sort - **Description**: Path where the client secret is stored. Client secret is a random, auto-generated token used by the discovery application to request an access token. ### HostIpAddress - **Type**: string - **Properties**: Filter, Group, Sort - **Description**: IP address of the host running this discovery application ### HostName - **Type**: string - **Properties**: Filter, Group, Sort - **Description**: Hostname of the server where the discovery application instance is installed. ### InstalledVersionNumber - **Type**: string - **Properties**: Filter, Group, Sort - **Description**: Version number of the installed discovery application. ### IsAutoUpgradeEnabled - **Type**: boolean - **Properties**: Defaulted on create, Filter, Group, Sort, Update - **Description**: Indicates whether the discovery application must be auto-upgraded (true) or not (false). - **Default value**: `false` ### IsEnabled - **Type**: boolean - **Properties**: Defaulted on create, Filter, Group, Sort, Update - **Description**: Indicates whether an active discovery application instance is enabled (true) or not (false). - **Default value**: `false` ### Name - **Type**: string - **Properties**: Filter, Group, idLookup, Sort, Update - **Description**: Name of the discovery application instance. ### OwnerId - **Type**: reference - **Properties**: Filter, Group, Sort, Update - **Description**: Refers to a unique identifier that designates the user. This field is a polymorphic relationship field. - **Relationship Name**: Owner - **Refers To**: Group, User # CnfgMgmtDiscoveryProbe Represents the definition of probe types that determine which commands or scripts are executed during a discovery scan. For example, deep host scan, basic host scan, or vcenter scan. This object is available in API version 65.0 and later. ## Supported Calls `describeSObjects()`, `getDeleted()`, `getUpdated()`, `query()`, `retrieve()` ## Fields ### Category - **Type**: picklist - **Properties**: Filter, Group, Restricted picklist, Sort - **Description**: Category to which this group probe belongs. For example, network scans or cloud scans. - **Possible values**: - `CLOUD_VIRTUALISATION_AND_INFRA`—Cloud virtualisation and infra - `NETWORK_SCAN`—Network scan - `PRESCAN_AND_UTILITIES`—Prescan and utilities ### Description - **Type**: textarea - **Properties**: Filter, Group, Nillable, Sort - **Description**: Description of the group probe. ### Name - **Type**: string - **Properties**: Filter, Group, idLookup, Nillable, Sort - **Description**: Name of the group probe. ### OwnerId - **Type**: reference - **Properties**: Filter, Group, Sort - **Description**: Refers to a unique identifier that designates the user. This field is a polymorphic relationship field. - **Relationship Name**: Owner - **Refers To**: Group, User ### ProbeType - **Type**: picklist - **Properties**: Filter, Group, Restricted picklist, Sort - **Description**: Stores the type of the group probe. - **Possible values**: - `awsCloudDiscovery`—Aws Cloud Discovery - `azureCloudDiscovery`—Azure Cloud Discovery - `basicDataScanWithCredential`—Basic Data Scan With Credential - `basicHostScan`—Basic Host Scan - `basicScan`—Basic Scan - `deepHostScanSshSnmpWindowsPowershell`—Deep Host Scan (SSH, SNMP, PowerShell) - `deepHostScanWmicSshSnmp`—Deep Host Scan (WMIC, SSH, SNMP) - `hostPingScan`—Host Ping Scan - `hostTypeScan`—Host Type Scan - `internalDebugWorkflow`—Internal Debug Workflow - `paexecCleanup`—Paexec Cleanup - `portScan`—Port Scan - `vcenterScan`—Vcenter Scan # CnfgMgmtDiscoverySchd Represents the definition of a schedule that controls when a discovery scan should run. For example, a daily or weekly cron-based schedule for scanning cloud infrastructure. This object is available in API version 65.0 and later. ## Supported Calls `describeSObjects()`, `getDeleted()`, `getUpdated()`, `query()`, `retrieve()`, `search()` ## Fields ### CronExpression - **Type**: string - **Properties**: Filter, Group, Sort - **Description**: Full cron expression representing the scan schedule. ### Days - **Type**: string - **Properties**: Filter, Group, Sort - **Description**: Specifies the day-of-month component of the cron schedule. ### Hours - **Type**: string - **Properties**: Filter, Group, Sort - **Description**: Specifies the hours component of the cron schedule. ### LastReferencedDate - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: Specifies the date an object was last referenced. ### LastScanSchedule - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: Date and time when the last discovery scan was initiated. ### LastViewedDate - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: Specifies the date an object was last viewed. ### Minutes - **Type**: string - **Properties**: Filter, Group, Sort - **Description**: Specifies the minutes component of the cron schedule. ### Months - **Type**: string - **Properties**: Filter, Group, Sort - **Description**: Specifies the months component of the cron schedule. ### Name - **Type**: string - **Properties**: Filter, Group, idLookup, Nillable, Sort - **Description**: Name of the cron schedule. ### NextScanSchedule - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: Date and time when the next discovery scan is scheduled to run. ### OwnerId - **Type**: reference - **Properties**: Filter, Group, Sort - **Description**: Refers to a unique identifier that designates the user. This field is a polymorphic relationship field. - **Relationship Name**: Owner - **Refers To**: Group, User ### Seconds - **Type**: string - **Properties**: Filter, Group, Sort - **Description**: Specifies the seconds component of the cron schedule. ### TimeZone - **Type**: string - **Properties**: Filter, Group, Sort - **Description**: Time zone in which the cron schedule is evaluated. ### Weeks - **Type**: string - **Properties**: Filter, Group, Sort - **Description**: Specifies the day-of-week component of the cron schedule. ### Years - **Type**: string - **Properties**: Filter, Group, Sort - **Description**: Specifies the years component of the cron schedule. # CnfgMgmtDiscoveryTarget Represents the definition of a logical grouping of endpoints or environments to be scanned during IT infrastructure or asset discovery. For example, New York datacenter, Washington office ground floor, or AWS Staging. This object is available in API version 65.0 and later. ## Supported Calls `create()`, `delete()`, `describeSObjects()`, `getDeleted()`, `getUpdated()`, `query()`, `retrieve()`, `undelete()`, `update()`, `upsert()` ## Fields ### ApiName - **Type**: string - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The API name for the discovery target. ### CnfgMgmtDiscoveryAppId - **Type**: reference - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The reference to the discovery application used to run scans on the target. This field is a relationship field. - **Relationship Name**: CnfgMgmtDiscoveryApp - **Refers To**: CnfgMgmtDiscoveryApp ### CnfgMgmtDiscoveryProbeId - **Type**: reference - **Properties**: Create, Filter, Group, Sort - **Description**: Reference to the probe type or category associated with the target. This field is a relationship field. - **Relationship Name**: CnfgMgmtDiscoveryProbe - **Refers To**: CnfgMgmtDiscoveryProbe ### CnfgMgmtDiscoverySchdId - **Type**: reference - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The reference to the schedule that determines when scans run for the target. This field is a relationship field. - **Relationship Name**: CnfgMgmtDiscoverySchd - **Refers To**: CnfgMgmtDiscoverySchd ### Description - **Type**: textarea - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: Description of the discovery target. ### IsActive - **Type**: boolean - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: Indicates whether the target is active and eligible for scans (true) or not (false). - **Default value**: `false` ### IsScheduled - **Type**: boolean - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: Indicates whether the target is linked to a scheduled scan (true) or not (false). - **Default value**: `false` ### Label - **Type**: string - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The name of the discovery target. ### LastReferencedDate - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: Specifies the date an object was last referenced. ### LastViewedDate - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: Specifies the date an object was last viewed. ### Name - **Type**: string - **Properties**: Create, Filter, Group, idLookup, Sort, Update - **Description**: Name of the discovery target. ### OwnerId - **Type**: reference - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: Refers to a unique identifier that designates the user. This field is a polymorphic relationship field. - **Relationship Name**: Owner - **Refers To**: Group, User ### TargetLocationId - **Type**: reference - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: Specifies the identifier for the target location of an operation. This field is a relationship field. - **Relationship Name**: TargetLocation - **Refers To**: Location # CnfgMgmtDiscoveryTgtCrdl Represents the credentials associated with a specific discovery target. Credentials are used to authenticate and execute commands during the scan. This object is available in API version 65.0 and later. ## Supported Calls `create()`, `delete()`, `describeSObjects()`, `getDeleted()`, `getUpdated()`, `query()`, `retrieve()`, `search()`, `undelete()`, `update()`, `upsert()` ## Fields ### CnfgMgmtCredentialId - **Type**: reference - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: Reference to the credential used to authenticate against the associated discovery target. This field is a relationship field. - **Relationship Name**: CnfgMgmtCredential - **Refers To**: CnfgMgmtCredential ### CnfgMgmtDiscoveryTargetId - **Type**: reference - **Properties**: Create, Filter, Group, Sort - **Description**: Reference to the discovery target associated with this credential. This field is a relationship field. - **Relationship Name**: CnfgMgmtDiscoveryTarget - **Relationship Type**: Master-detail - **Refers To**: CnfgMgmtDiscoveryTarget (the master object) ### CredentialSequence - **Type**: int - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The sequence in which the credentials are applied while running discovery on discovery app. ### LastReferencedDate - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: Specifies the date an object was last referenced. ### LastViewedDate - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: Specifies the date an object was last viewed. ### Name - **Type**: string - **Properties**: Create, Filter, Group, idLookup, Sort, Update - **Description**: Name of the discovery target credential. # CnfgMgmtDiscoveryTgtParm Represents the definition of parameters used to control or refine cloud infrastructure scans. For example, imported items such as virtual machines, ports, or host names. This object is available in API version 65.0 and later. ## Supported Calls `create()`, `delete()`, `describeSObjects()`, `getDeleted()`, `getUpdated()`, `query()`, `retrieve()`, `search()`, `undelete()`, `update()`, `upsert()` ## Fields ### CnfgMgmtDiscoveryProbe - **Type**: string - **Properties**: Filter, Group, Nillable, Sort - **Description**: Name of the probe type linked to this import setting. ### CnfgMgmtDiscoveryTargetId - **Type**: reference - **Properties**: Create, Filter, Group, Sort - **Description**: Reference to the discovery target associated with this credential. This field is a relationship field. - **Relationship Name**: CnfgMgmtDiscoveryTarget - **Relationship Type**: Master-detail - **Refers To**: CnfgMgmtDiscoveryTarget (the master object) ### LastReferencedDate - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: The timestamp when the current user last accessed this record, a record related to this record, or a list view. ### LastViewedDate - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: The timestamp when the current user last viewed this record or list view. ### Name - **Type**: string - **Properties**: Create, Filter, Group, idLookup, Nillable, Sort, Update - **Description**: The name of the record. ### ParameterName - **Type**: picklist - **Properties**: Create, Filter, Group, Restricted picklist, Sort, Update - **Description**: Type of item to import during a scan. - **Possible values**: - `AWS_AMI`—AWS AMI - `AWS_AUTO_SCALING`—AWS Auto Scaling - `AWS_DATABASES_AND_CLUSTERS`—AWS Databases and Clusters - `AWS_DYNAMODB`—AWS DynamoDB - `AWS_EBS`—AWS EBS - `AWS_EC2_INSTANCE`—AWS EC2 Instance - `AWS_ECR`—AWS ECR - `AWS_LOAD_BALANCER`—AWS Load Balancer - `AWS_NAT_GATEWAYS`—AWS Nat Gateways - `AWS_NETWORK_ACLS`—AWS Network ACLs - `AWS_S3`—AWS S3 - `AWS_SECURITY_GROUP`—AWS Security Group - `AWS_SNAPSHOT`—AWS Snapshot - `AWS_VPC`—AWS VPC - `AZURE_APPLICATION_GATEWAY`—Application Gateway - `AZURE_APP_SERVICES`—App Services - `AZURE_NETWORK_SECURITY_GROUP`—Network Security Group - `AZURE_SQL_MANAGED_INSTANCE`—SQL Managed Instance - `AZURE_SQL_SERVERS`—SQL Servers - `AZURE_VIRTUAL_MACHINE`—Virtual Machine - `AZURE_VIRTUAL_MACHINE_SCALESETS`—Virtual Machine ScaleSets - `AZURE_VIRTUAL_NETWORK`—Virtual Network - `EXCLUDED_IP_RANGES`—Excluded IP Ranges - `HOSTS`—Hosts - `IP_RANGES`—IP Ranges - `PORT`—Por ### ParameterValue - **Type**: textarea - **Properties**: Create, Nillable, Update - **Description**: List of values for the selected parameter. For example, 192.168.0.0/24. # CnfgMgmtRelationTypeDef Represents the relationship between configuration item types or configuration items as defined in the CMDB. For example, Depends on or Connected to. This object is available in API version 65.0 and later. ## Supported SOAP API Calls `create()`, `delete()`, `describeSObjects()`, `query()`, `retrieve()`, `update()`, `upsert()` ## Supported REST API Methods `DELETE, GET, HEAD, PATCH, POST, Query` ## Fields ### ColorCode - **Type**: string - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: A specific color value such as hex, RGB, or named assigned to visually represent the relationship type for easier identification and categorization. ### DeveloperName - **Type**: string - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The unique name of the object in the API. This name can contain only underscores and alphanumeric characters, and must be unique in your org. It must begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores. In managed packages, this field prevents naming conflicts on package installations. With this field, a developer can change the object's name in a managed package and the changes are reflected in a subscriber's organization. This field is automatically generated, but you can supply your own value if you create the record using the API. When creating large sets of data, always specify a unique DeveloperName for each record. If no DeveloperName is specified, performance may slow while Salesforce generates one for each record. ### DirectRelationshipName - **Type**: string - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The main name assigned to the relationship type for consistent labeling and referencing. ### InverseRelationshipName - **Type**: string - **Properties**: Create, Filter, Group, Sort, Update - **Description**: An alternative or mirrored name of the relationship type, used for reverse lookup, searching, or display purposes. For example, the inverse of Runs on is Hosts. ### IsActive - **Type**: boolean - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: Indicates whether the relationship type is archived (true) or active (false). Archived relationship types are retained for reference but not actively used or updated. - **Default value**: `false` ### IsCustom - **Type**: boolean - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: Specifies if the relationship type is a custom relationship type as defined by the user (true) or a ready-to-use relationship type that's predefined and shipped out of the box (false). - **Default value**: `false` ### Language - **Type**: picklist - **Properties**: Create, Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort, Update - **Description**: The combined language and locale ISO code, which controls the language of the configuration management relationship type definition. ### LineStrokeSpecification - **Type**: string - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: Specifies the width, style, or color of a line element for consistent visual rendering. ### MasterLabel - **Type**: string - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The label for this configuration management relationship type definition value. This display value is the internal label that doesn't get translated. ### Status - **Type**: picklist - **Properties**: Create, Filter, Group, Nillable, Restricted picklist, Sort, Update - **Description**: Indicates the current usage status of the relationship type, specifying whether it is actively referenced by CI relationships. Values are `Unused` or `Used`. # CnfgMgmtSvcMapLyot Represents the business specific layout in a service map. A layout specifies which configuration item types and relationship types are included or excluded. The layout also specifies whether IP-level connections are shown. Use map layouts to create different service map perspectives. For example, infrastructure, communication, or outage impact. This object is available in API version 66.0 and later. ## Supported SOAP API Calls `create()`, `delete()`, `describeSObjects()`, `query()`, `retrieve()`, `update()`, `upsert()` ## Supported REST API Methods `DELETE, GET, HEAD, PATCH, POST, Query` ## Fields ### DeveloperName - **Type**: string - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The unique name of the object in the API. This name can contain only underscores and alphanumeric characters, and must be unique in your org. It must begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores. In managed packages, this field prevents naming conflicts on package installations. With this field, a developer can change the object's name in a managed package and the changes are reflected in a subscriber's organization. This field is automatically generated, but you can supply your own value if you create the record using the API. When creating large sets of data, always specify a unique DeveloperName for each record. If no DeveloperName is specified, performance may slow while Salesforce generates one for each record. ### IncludesExternalCnfgItms - **Type**: boolean - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: Indicates whether the service map layout includes discovered configuration items that aren't present in CMDB (true) or not (false). - **Default value**: `false` ### InternalName - **Type**: string - **Properties**: Create, Filter, Group, Sort, Update - **Description**: Unique system-generated name that identifies the service map layout for backend operations and integration references. ### IsActive - **Type**: boolean - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: Indicates whether the service map layout is currently active (true) or not (false). - **Default value**: `true` ### IsPredefinedSvcMapLyot - **Type**: boolean - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: Indicates whether the service map layout is a predefined layout (true) or not (false). - **Default value**: `true` ### MasterLabel - **Type**: string - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The label for this configuration management service map layout value. This display value is the internal label that doesn't get translated. ### Name - **Type**: string - **Properties**: Create, Filter, Group, Sort, Update - **Description**: Name of the service map layout. # CnfgMgmtSvcMapLyotItmTyp Represents the relationship between a service map layout and a configuration item type definition. Use this mapping to include specific configuration item types in a map. For example, an infrastructure map can include servers, databases, and load balancers. This object is available in API version 66.0 and later. ## Supported SOAP API Calls `create()`, `delete()`, `describeSObjects()`, `query()`, `retrieve()`, `update()`, `upsert()` ## Supported REST API Methods `DELETE, GET, HEAD, PATCH, POST, Query` ## Fields ### CnfgItemTypeDefId - **Type**: reference - **Properties**: Create, Filter, Group, Sort, Update - **Description**: Configuration item type included in the service map layout. ### CnfgMgmtSvcMapLyotId - **Type**: reference - **Properties**: Create, Filter, Group, Sort, Update - **Description**: Service map layout in which the configuration item type is included. ### DeveloperName - **Type**: string - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The unique name of the object in the API. This name can contain only underscores and alphanumeric characters, and must be unique in your org. It must begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores. In managed packages, this field prevents naming conflicts on package installations. With this field, a developer can change the object's name in a managed package and the changes are reflected in a subscriber's organization. This field is automatically generated, but you can supply your own value if you create the record using the API. When creating large sets of data, always specify a unique DeveloperName for each record. If no DeveloperName is specified, performance may slow while Salesforce generates one for each record. ### IsActive - **Type**: boolean - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: Indicates whether the relationship between a service map layout and a configuration item type is active (true) or not (false). ### MasterLabel - **Type**: string - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The label for this configuration management service map layout item type value. This display value is the internal label that doesn't get translated. # CnfgMgmtSvcMapLyotRelTyp Represents the relationship between a service map and a configuration item relationship type definition. Use this mapping to include specific relationship types in a map. For example, a service topology map can include runs on, hosted on, and served by. This object is available in API version 66.0 and later. ## Supported SOAP API Calls `create()`, `delete()`, `describeSObjects()`, `query()`, `retrieve()`, `update()`, `upsert()` ## Supported REST API Methods `DELETE, GET, HEAD, PATCH, POST, Query` ## Fields ### CnfgMgmtRelationTypeDefId - **Type**: reference - **Properties**: Create, Filter, Group, Sort, Update - **Description**: Relationship type included in the service map layout. ### CnfgMgmtSvcMapLyotId - **Type**: reference - **Properties**: Create, Filter, Group, Sort, Update - **Description**: Service map layout in which the relationship is included. ### DeveloperName - **Type**: string - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The unique name of the object in the API. This name can contain only underscores and alphanumeric characters, and must be unique in your org. It must begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores. In managed packages, this field prevents naming conflicts on package installations. With this field, a developer can change the object's name in a managed package and the changes are reflected in a subscriber's organization. This field is automatically generated, but you can supply your own value if you create the record using the API. When creating large sets of data, always specify a unique DeveloperName for each record. If no DeveloperName is specified, performance may slow while Salesforce generates one for each record. ### IsActive - **Type**: boolean - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: Indicates whether the relationship between a service map layout and a configuration item relationship type is active (true) or not (false). - **Default value**: `true` ### MasterLabel - **Type**: string - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The label for this configuration management service map layout relation type value. This display value is the internal label that doesn't get translated. # Code Examples: Dispatcher Console Custom Actions Learn how to configure Apex classes or Visualforce pages that you want to link to a custom action in the dispatcher console. Custom actions can either call an Apex class or open a Visualforce page, and can be run on records in several areas of the dispatcher console. To learn how to create custom actions, see [Create Custom Actions for the Dispatcher Console](https://help.salesforce.com/articleView?id=pfs_create_custom_actions.htm). **note:** All Apex classes implementing the quick action interfaces must be declared as Global to be accessible from the dispatcher console. ## Creating Apex Classes When you create an Apex class to link to a dispatcher console custom action, implement one of the following three interfaces in your class. | Interface | Description | | ------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `CustomGanttServiceResourceAction` | For actions on service resources. The parameters are the service resource record ID, the service territory member record ID reflected on the Gantt, and the start and end dates of the current Gantt view. No additional parameters are included. Use the following format: `String action(Id resourceId, Id stmId, Datetime strGanttStartDate, Datetime strGanttEndDate, Map additionalParameters)` | | `CustomGanttServiceAppointmentAction` | For actions on service appointments. The parameters are the service appointment record IDs—used for bulk actions—and the start and end dates of the current Gantt view. No additional parameters are included. The `Map additionalParameters` input parameter is reserved for future use but must be included to run the code. Use the following format: `String action(List serviceAppointmentsIds, Datetime strGanttStartDate, Datetime strGanttEndDate, Map additionalParameters)` When this action is implemented, multiple service appointments can be returned. In your method, we recommend creating an `if` statement to check how many IDs are returned. First, validate that at least one ID was returned: `serviceAppointmentsIds.size()>1`. Then, you can take different actions depending on whether 0, 1, or more appointment IDs were returned. | | `CustomGanttResourceAbsenceAction` | For actions on resource absences. The parameters are the resource absence record ID, the absence type (‘na’ or ‘break’), and the start and end dates of the current Gantt view. No additional parameters are included. The `Map additionalParameters` input parameter is reserved for future use but must be included to run the code. Use the following format: `String action(Id absenceId, String absenceType, Datetime strGanttStartDate, Datetime strGanttEndDate, Map additionalParameters)` | These functions must be global and require that a string be returned. If the string isn’t empty, it is used in the Gantt notification shown when a user clicks the related action. **note:** Use the [Datetime class](https://developer.salesforce.com/docs/atlas.en-us.248.0.apexref.meta/apexref/apex_methods_system_datetime.htm) for all date and time calculations. **Code Example: Service Resource Custom Action** This action creates a resource absence of type Non Availability for the selected service resource that spans the days visible on the Gantt. ```apex global class BlockResourceVisibleTime implements FSL.CustomGanttServiceResourceAction { global String action(Id resourceId, Id stmId, Datetime ganttStartDate, Datetime ganttEndDate, Map additionalParameters) { ResourceAbsence na = new ResourceAbsence(); // get Resource Absence record type - NA RecordType recordTypeNA = [ SELECT Id, SobjectType, Name FROM RecordType WHERE DeveloperName =: 'Non_Availability' AND SObjectType =: ResourceAbsence.getSobjectType().getDescribe().getName() ]; na.RecordTypeId = recordTypeNA.Id; na.ResourceId = resourceId; na.FSL__Approved__c = true; na.Start = ganttStartDate; na.End = ganttEndDate; insert na; ServiceResource resource = [SELECT Name FROM ServiceResource WHERE Id =: resourceId]; return 'Blocked availability to ' + resource.Name + ' from ' + ganttStartDate.format() + ' to ' + ganttEndDate.format(); } } ``` **Code Example: Service Appointment Custom Action** This action toggles the In Jeopardy field between True and False. ```apex global class toggleServiceAppointmentJeopardy implements FSL.CustomGanttServiceAppointmentAction { global String action(List serviceAppointmentsIds, Datetime ganttStartDate, Datetime ganttEndDate, Map additionalParameters) { List saList = [SELECT FSL__InJeopardy__c, AppointmentNumber FROM ServiceAppointment WHERE Id in : serviceAppointmentsIds]; String reply = ''; List saNames = new List(); for (ServiceAppointment s : saList) { s.FSL__InJeopardy__c = !s.FSL__InJeopardy__c; saNames.add(s.AppointmentNumber); } upsert saList; reply = String.join(saNames, ', '); return 'Service Appointments successfully processed: ' + reply; } } ``` **Code Example: Resource Absence Custom Action** For resource absences of type NA, this action creates a duplicate absence on the following day. ```apex global class copyAbsenceToNextDay implements FSL.CustomGanttResourceAbsenceAction { global String action(Id absenceId, String absenceType, Datetime ganttStartDate, Datetime ganttEndDate, Map additionalParameters) { ResourceAbsence resourceAbsence = [SELECT Id, AbsenceNumber, Start, End, ResourceId, RecordTypeId, FSL__Approved__c FROM ResourceAbsence WHERE Id =: absenceId LIMIT 1]; ResourceAbsence raClone = resourceAbsence.clone(false, true, false, false); raClone.Start = resourceAbsence.Start.addDays(1); raClone.End = resourceAbsence.End.addDays(1); raClone.ResourceId = resourceAbsence.ResourceId; raClone.RecordTypeId = resourceAbsence.RecordTypeId; raClone.FSL__Approved__c = true; insert raClone; return 'Resource Absence successfully copied.'; } } ``` ## Creating Visualforce Pages When you create a Visualforce page, use the following GET parameters. | For actions on... | Description | | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | Service appointments | Use the following format: `services [if multiple], id (comma delimited if multiple), start (current Gantt start date, string), end (current Gantt end date, string)` Example for a Visualforce page used to update a single service appointment: `?id=08p4E000000Kj5hQAC&​start=5-7-2018&end=5-8-2018` Example for a Visualforce page used to update multiple service appointments: `?services=08p4E000000Kj5hQAC,08p4E000430Kj5hAPP&​start=5-7-2018&end=5-8-2018` | | Service resources | Use the following format: `id, stm (ID of service resource’s current service territory member record), start (current Gantt start date, string), end (current Gantt end date, string)` Example: `?id=0Hn4E0000001OMQSA2&​stm=0Hu4E0000005cpPSAQ&start=5-7-2018&​end=5-8-2018` | | Resource absences | Use the following format: `id, type (’break’ or ‘na’), start (current Gantt start date, string), end (current Gantt end date, string)` Example: `?id=0Hw4E00000091HSSAY&​type=break&start=5-7-2018&​end=5-8-2018` | To close the Visualforce lightbox from your code, use: `parent.postMessage('closeLightbox','*');` **note:** Custom dispatcher console actions can’t open Visualforce pages that are part of a managed package. **See Also** - [Create Custom Actions for the Dispatcher Console](https://help.salesforce.com/articleView?id=pfs_create_custom_actions.htm) # Command Center Data Triggers Work.com installs and uses Command Center data triggers on Employee, Individual, User, and Location. Adding or modifying records for these objects can trigger changes in related objects. It’s also possible to disable the triggers for data loads. When the Work.com managed package is installed into an org, triggers on Employee, Individual, User, and Location are added, along with a `wkcc__TriggerSettings__c` custom object with records that control whether these triggers are enabled or disabled. ## Command Center Employee Trigger The Employee trigger executes on both insert and update. If the employee has no IndividualId set, a new Individual record is inserted and associated with the employee, populating the new record with the relevant field data from the Employee, using the following Employee-to-Individual field mapping: - OwnerId => OwnerId - FirstName => FirstName - LastName => LastName - DateOfBirth => Birthdate - JobProfile => Occupation If the IndividualId is already set, the trigger still populates the same standard fields in the Individual, to ensure the two records match. The Employee is the source of truth; Individual is based on Employee. This does _not_ include any other fields that other packages or customers add to an org. Adding fields to Individual is not recommended. After initially inserting an employee, individuals are by default not kept in sync with later employee updates. To keep them in sync, set the custom setting value wkcc\_\_Settings\_\_c.wkcc\_\_EmployeeIndividualSyncDisabled\_\_c to false. Once this setting is set to false, all changes to the synched Employee fields are pushed to the related Individual. In addition to updating Individual, the Employee trigger also helps to link the Employee to a User. This reconciliation is done using the Employee Number field. When an Employee is inserted or updated, the trigger queries Users for any records that don't already have an associated Individual and where User.EmployeeNumber uniquely matches Employee.EmployeeNumber. Importantly, if duplicate User records are found matching the Employee Number, _neither_ User record is updated. The trigger does not attempt to guess which user should be linked to the employee. The IndividualId on User remains blank until the customer either explicitly sets it, or removes the duplicate Employee Number in Users. ## Command Center User Trigger The User trigger runs on insert and update. If a user record does not already have an IndividualId set, and it does have an Employee Number value, then the Employee entity is queried for employees matching that Employee Number. If a unique match is found, the User is linked to the same Individual as the matching Employee. As with the Employee trigger, the User trigger does not decide between users if duplicates are found. However, the User trigger does not query the database itself to find possible duplicate users outside of the users passed to the trigger itself. Thus if a User is inserted or updated with the same Employee Number as another User that was not inserted or updated in the same transaction, that User is linked to the matching Employee’s Individual. Regardless, in all cases, if the customer decides to populate Employee Number, then Employee Number should be treated as a unique identifier. No other data is synchronized out of the box with Command Center. Other packages still require more, such as Person Account with Health Cloud, or Service Resource with Field Service Lightning. Regardless of the implementation choice, the Individual should be used to link these entities together. ## Command Center Location Trigger The Location trigger is responsible for recreating fields or records that are materialized from Locations. This includes the wkcc\_\_LocationPath\_\_c field values, and the pre-aggregated Location Wellness Facts used to display hierarchical summaries in the Command Center. **note:** Populate the location hierarchy and recalculate wellness data anytime you disable or re-enable `b2w_LocationTrigger`. Run these batch jobs from the Command Center Settings tab, following Salesforce Help [Populate the Location Hierarchy](https://help.salesforce.com/articleView?id=wcc_setup_populate_location.htm&type=5). ## Enable and Disable Triggers Use the wkcc\_\_TargetSettings\_\_c object to enable and disable Work.com data triggers. This is useful if you’re doing a large data upload or modifying several records at once that already have related field values set up properly. The Work.com package adds a record in wkcc\_\_TargetSettings\_\_c for each trigger. The record Name field uses the following format: `b2w_{Object Name}Trigger`. For example, the record that corresponds to the Employee trigger has a Name value of “b2w_EmployeeTrigger”. ## Bulk Limitations With Triggers Enabled When Work.com triggers are enabled, bulk operations on affected Work.com objects may incur additional limits. For EmployeeCrisisAssessment, batch sizes should be limited to 3000 records. For Location, batch sizes should be limited to 4000 records. **See Also** - [wkcc\_\_TriggerSettings\_\_c](https://developer.salesforce.com/docs/service/workdotcom-dev/guide/wdc-cc-sforce-api-objects-wkcc__triggersettings__c.md) # Common Error Messages for Lightning Experience Methods An error object is returned as an array for all Lightning Experience methods. The following fields are contained as part of the error object. - `code: {string}` - : A constant string denoting an error code. - `description: {string}` - : A description of the error code. - `details: {object}` - : Typically undefined. This constant can contain details about the error object for the `saveLog` method. Sample error object: ```javascript [{ code: code1 description: description1 details: details1 },{ code: code2 description: description2 details: details2 }] ``` Sample error object for the INVALID_PARAM error code: ```javascript [{ code: "INVALID_PARAM", description: "An invalid value was passed to the parameter PARAMETERNAME. A numeric value was expected, but UNDEFINED was found instead." }] ``` Sample error object for the GENERIC_PARAM error code: ```javascript [{ code: "GENERIC_ERROR", description: "An error occurred while calling the API method." }] ``` Sample error object for the SERVER_ERROR code: ```javascript [{ code: "SERVER_ERROR", description: "A problem was encountered on the server." }] ``` Sample error object for the SOFTPHONE_CONTAINER_ERROR code: ```javascript [{ code: "SOFTPHONE_CONTAINER_ERROR", description: "Unable to execute sendPostMessage because the softphone container hasn’t initialized yet." }] ``` For the `runApex` method, if there is a server error, the `description` field provides `"Could not load Apex class: apexClassName."` For the `saveLog` method, the `details` field provides information based on the type of error. For example: ```javascript [{ code:"GENERIC_ERROR", description:"An error occurred while calling the saveLog() API method. Review the Details field in the error section.", details:[{ message:"An error occurred while trying to update the record. Please try again.", pageErrors:[], fieldErrors:{ Name:[{ statusCode:"REQUIRED_FIELD_MISSING", message:"Required fields are missing: [Name]", fieldLabel:"Account Name", columnApiName:"Name" }] }, potentialDuplicates:[] }] }] ``` # Communicated With Represents the Communicated With relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. ## Relationship Type Definition ||| |-|-| |Developer Name|`SD_CoWi1`| |Description|Defines the Communicated With relationship between configuration items in the CMDB.| |Master Label|Communicated With| |Direct Relationship|Communicated With| |Inverse Relationship|Communicated With| |Line Stroke|Solid| |Color Code|`#FBBBD0`| # Communicates With Represents the Communicates With relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. ## Relationship Type Definition ||| |-|-| |Developer Name|`SD_CoWi`| |Description|Defines the Communicates With relationship between configuration items in the CMDB.| |Master Label|Communicates With| |Direct Relationship|Communicates With| |Inverse Relationship|Communicates With| |Line Stroke|Solid| |Color Code|`#7F7F7F`| # Communication Infra Represents a Communication Infra configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. ## Configuration Item Type Definition ||| |-|-| |Name|Communication Infra| |Developer Name|`SD_CoIn`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Network Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-network-device.md)| |Rule Name|Default rule for all AWS Launch Templates| |Identifier(s)|Launch Template ARN| ## Attributes No associated attributes for this configuration item type. # Compare the Conceptual Models of Open CTI and Salesforce Voice with Partner Telephony Open CTI is a thin bridge: your CTI adapter runs in an iframe and calls `opencti` JavaScript APIs to invoke the Salesforce UI. All business logic lives in your adapter. Salesforce Voice with Partner Telephony inverts this: Salesforce owns the rep lifecycle through Omni-Channel, and your connector plays two distinct roles simultaneously. ## Role 1: Event Publisher (Connector to Salesforce) Your connector calls `publishEvent()` to push telephony events into Salesforce. When your telephony system fires a "call ringing" event, you translate it into `CALL_STARTED`; when the call ends, you publish `HANGUP`. These events drive everything downstream: VoiceCall record creation, AgentWork routing, screen pop, and presence sync. ## Role 2: Method Implementation Target (Salesforce to Connector) Connector API methods are what you implement to be notified when telephony actions are initiated from within Salesforce. When a rep clicks Accept in the softphone panel, Salesforce calls your `acceptCall()`. When they click End Call, Salesforce calls your `endCall()`. When a supervisor initiates listen-in from Command Center for Service (formerly Omni Supervisor), Salesforce calls your `superviseCall()`. **important:** Return a promise with the result; don't publish the event yourself. When Salesforce invokes one of your connector methods such as `acceptCall()`, `endCall()`, or `mute()`, return a promise that resolves with the appropriate result object (`CallResult`, `MuteToggleResult`). The framework publishes the corresponding event automatically based on your return value. Do not call `publishEvent()` yourself from inside these methods. That causes duplicate events and breaks the softphone state machine. Reserve `publishEvent()` for truly asynchronous backend-initiated events such as an inbound call arriving from the carrier. In Open CTI, the adapter pushes everything from the iframe. With Salesforce Voice with Partner Telephony, there's a bidirectional contract via the SDK. This bidirectionality is the core architectural shift. Your connector must implement both directions correctly or the integration is incomplete. ## Data Model Shift: From Task to VoiceCall The single biggest data model shift for migration is moving from Task records to VoiceCall records. ### Task: The Open CTI Model In Open CTI, your adapter typically: - Pre-creates a Task record at call start (via `opencti.saveLog` or custom Apex). - Updates that Task at wrap-up with duration, disposition, and notes. The Task is the canonical "call happened" record. Reports run on Activity and Task. #### Limitations - Task is generic. It's used for emails, meetings, and all activities. Voice fields are bolted on (`CallDurationInSeconds`, `CallType`, etc.) but the schema isn't voice-native. - The adapter is responsible for record creation. If the adapter crashes mid-call or has a bug, you may have no record. - Single record per call. There's no clean way to model multiparty, consults, or transfers. - No native recording link. You need a custom field or a parallel ContentDocument. ### VoiceCall: The Salesforce Voice with Partner Telephony Model For outbound calls, the Salesforce platform creates a VoiceCall record automatically when `CALL_STARTED` is published. For inbound and transfer calls, the telephony partner creates a VoiceCall record by calling the [Create a Voice Call Record](https://developer.salesforce.com/docs/atlas.en-us.voice_developer_guide.meta/voice_developer_guide/voice_rest_voicecalls_create.htm) Telephony Integration API. VoiceCall is the de facto record for the call going forward, including voice-native fields, multiparty support, recording linkage, and supervisor view. | VoiceCall Field | Populated By | Replaces in Task Model | | ---------------------------------------- | ----------------------------------------------- | --------------------------------------------------------------- | | `CallerId` | `CALL_STARTED phoneNumber` | Custom field on Task | | `CallDurationInSeconds` | Platform (computed at HANGUP) | Same field on Task, but populated automatically | | `Status` | Platform (Inbound/Outbound/Missed/Declined) | Custom field on Task | | `StartTime` / `EndTime` | Platform | Activity dates | | `OwnerId` | Platform (assigned rep) | `Task.OwnerId`, but auto-populated from Omni-Channel assignment | | `RelatedRecordId` | Your Omni-Channel flow (Contact/Case routed to) | `Task.WhatId` | | `CallDisposition` | Connector or rep ACW input | Custom field | | `VoiceCallRecordingId` | Platform (if recording enabled) | None — required custom field in Open CTI | | `AdditionalFields` | Connector (`callInfo.additionalFields` JSON) | Custom fields | | Multiparty linkage (`parentVoiceCallId`) | Connector at leg creation | None — not modeled in Open CTI | #### How VoiceCall Enhances the Experience - Recording is first-class. A linked VoiceCallRecording is automatically created and surfaced on the record page. No custom field, no signed URL configuration. - Multiparty is modeled. Each leg gets its own VoiceCall, linked via `parentVoiceCallId`. Reports across legs are simple SOQL. - Supervisor view runs on VoiceCall records. With Open CTI, you had to build your own supervisor dashboard. - AI features (transcription, conversation summary, sentiment) attach to VoiceCall natively. - Auditability and durability. The platform creates the record, not your code. If your connector crashes, the call is still logged. #### New Behavior for VoiceCall as the De Facto Record Don't call `saveLog`. The log already exists as VoiceCall. The question is no longer "how do I log this call?" The question is "what other records do I want to relate to this call?" Salesforce admins can choose to relate or create any record on top of VoiceCall, not just Tasks. Common customer patterns include: - **Case**: Customer support orgs typically relate the VoiceCall to a Case (new or existing). The VoiceCall ↔ Case relationship surfaces calls on the case timeline. - **Opportunity**: Sales orgs relate VoiceCall to an Opportunity for activity tracking and pipeline reports. - **Lead**: Inbound prospecting relates VoiceCall to a Lead. - **Account or Contact**: VoiceCall already exposes related Contact/Account via `RelatedRecordId`. - **Custom object**: For industry-specific use cases (Service Order, Patient Visit, Loan Application). - **Task**: Only when the customer specifically wants Task-based reporting (legacy reports, mobile activity feed, etc.). Not the default recommendation. This is built declaratively as a record-triggered flow on VoiceCall: same pattern, different target object. #### After Conversation Work Salesforce Voice with Partner Telephony has built-in after conversation work (ACW). When the rep clicks End Wrap-Up, `WRAP_UP_ENDED` is sent to your connector: ```javascript async wrapUpCall(call) { await myBackend.endAfterCallWork(call.callId); // Return a Promise; framework will publish WRAP_UP_ENDED from your return value. } ``` To configure ACW duration as a Salesforce admin, see Salesforce Help: [Configure After Conversation Work Time](https://help.salesforce.com/s/articleView?id=service.omnichannel_configure_after_conversation_work_time.htm&type=5). ## Compare Open CTI Capabilities with Salesforce Voice with Partner Telephony Replacements This matrix maps every meaningful Open CTI capability to its Salesforce Voice with Partner Telephony equivalent. | Open CTI Capability | Salesforce Voice with Partner Telephony Replacement | Migration Action | | -------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------- | | `opencti.screenPop()` | Omni-Channel Flow → Screen Pop action | Eliminate. Rebuild in Flow Builder. | | `opencti.saveLog()` | VoiceCall (auto-created) + record-triggered Flow on whichever object the customer chooses | Eliminate. VoiceCall is the de facto record. | | `sforce.opencti.searchAndScreenPop()` | Omni-Channel Flow (Get Records + Screen Pop action) or LWC + Navigation API | Migrate or rebuild in Flow Builder. | | Custom presence via `runApex()` or Presence REST API | `setAgentStatus()` connector method | Eliminate. Omni-Channel owns presence. | | Other `runApex()` invocations | LWC `@wire` / imperative Apex + Toolkit API | Replace | | Custom status list fetch via Apex | Omni-Channel presence status configurations in Setup | Eliminate | | `opencti.setSoftphonePanelHeight/Width()` | Configure in Contact Center setup | Eliminate | | Custom adapter softphone panel (iframe contents) | Voice Extension LWC + VoiceExtension FlexiPage | Migrate to Voice Extension. | | Custom call-lifecycle event listeners in adapter | `lightning-service-cloud-voice-toolkit-api` events | Migrate to Voice Toolkit. | | Custom iframe ↔ page postMessage / DOM events | LMS via `ServiceCloudVoiceMessageChannel__c` | Migrate to LMS. | | `opencti.refreshView()` | `notifyRecordUpdateAvailable()` from LDS, or Flow that updates the record | Migrate | | `opencti.enableClickToDial()` and `disableClickToDial()` | Automatic. Handled by Salesforce Voice with Partner Telephony. | Eliminate | | Adapter pushes data to a Visualforce page | LMS channel; Visualforce subscribes via LightningMessageService JS library | Migrate | | `opencti.getPhoneContacts()` for contact search | Custom LWC with `@wire` on `getRecord` or SOSL via Apex | Migrate | | Custom IVR / routing logic | Omni-Channel Flows or Apex Actions in flows | Migrate | | External system webhooks | Trigger from VoiceCall record-triggered Flow | Migrate | | Custom analytics queries | VoiceCall SOQL / CRM Analytics Salesforce Voice with Partner Telephony template | Migrate | | Auth / SSO with your backend | Move into connector `init()` | Keep | | Custom supervisor dashboard | Command Center for Service (native) | Eliminate. Command Center for Service uses VoiceCall. | | Custom transfer / consult logic | `addParticipant()`, `dial(isConsultCall)`, `conference()`, `swap()` | Migrate to multiparty connector. | # Component Represents a Component configuration item in the Configuration Management Database (CMDB). ## Configuration Item Type Definition ||| |-|-| |Name|Component| |Developer Name|`SD_Comxx`| |Component|Yes| |Parent|[Base](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-base.md)| |End User Compute/Unmetered|All components are unmetered| |Rule Name|No identification rule is defined for this CI type.| ## Attributes No associated attributes for this configuration item type. # Component Of Represents the Component Of relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. ## Relationship Type Definition ||| |-|-| |Developer Name|`SD_CoOf`| |Description|Defines the Component Of relationship between configuration items in the CMDB.| |Master Label|Component Of| |Direct Relationship|Component Of| |Inverse Relationship|Componentizes| |Line Stroke|Solid| |Color Code|`#000099`| # Compute Represents a Compute configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Device. ## Configuration Item Type Definition ||| |-|-| |Name|Compute| |Developer Name|`SD_Comxx1`| |Component|No| |End User Compute/Unmetered|Yes| |Parent|[Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-device.md)| |Rule Name|Default rule for all HyperV| |Identifier(s)|Virtual IP Address| ## Attributes ### Available Memory(GB) - **Type**: double - **Developer Name**: `SD_AvMe` - **Attribute Set**: [Hardware and Network](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-hardware-and-network.md) - **Description**: The available memory(gb) of the Compute. - **Required**: Optional ### BIOS Build Number - **Type**: text - **Developer Name**: `SD_BiBuNu` - **Attribute Set**: [Hardware and Network](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-hardware-and-network.md) - **Description**: The bios build number of the Compute. - **Required**: Optional ### BIOS Manufacturer - **Type**: text - **Developer Name**: `SD_BiMa` - **Attribute Set**: [Hardware and Network](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-hardware-and-network.md) - **Description**: The bios manufacturer of the Compute. - **Required**: Optional ### BIOS Serial Number - **Type**: text - **Developer Name**: `SD_BiSeNu` - **Attribute Set**: [Hardware and Network](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-hardware-and-network.md) - **Description**: The bios serial number of the Compute. - **Required**: Optional ### Cores per Processor - **Type**: int - **Developer Name**: `SD_CoPePr` - **Attribute Set**: [Processor Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-processor-details.md) - **Description**: The cores per processor of the Compute. - **Required**: Optional ### CPU Manufacturer - **Type**: text - **Developer Name**: `SD_CpMa` - **Attribute Set**: [System Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-system-information.md) - **Description**: The cpu manufacturer of the Compute. - **Required**: Optional ### DNS Host Name - **Type**: text - **Developer Name**: `SD_DnHoNa` - **Attribute Set**: [Network Adapter Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-network-adapter-details.md) - **Description**: The dns host name of the Compute. - **Required**: Optional ### Domain - **Type**: text - **Developer Name**: `SD_Do` - **Attribute Set**: [Hardware and Network](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-hardware-and-network.md) - **Description**: The domain of the Compute. - **Required**: Optional ### FPU Type - **Type**: text - **Developer Name**: `SD_FpTy` - **Attribute Set**: [Processor Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-processor-details.md) - **Description**: The fpu type of the Compute. - **Required**: Optional ### Hardware Model - **Type**: text - **Developer Name**: `SD_HaMo` - **Attribute Set**: [Hardware and Network](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-hardware-and-network.md) - **Description**: The hardware model of the Compute. - **Required**: Optional ### Hardware Vendor - **Type**: text - **Developer Name**: `SD_HaVe` - **Attribute Set**: [Hardware and Network](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-hardware-and-network.md) - **Description**: The hardware vendor of the Compute. - **Required**: Optional ### Host Id - **Type**: text - **Developer Name**: `SD_HoId` - **Attribute Set**: [Hardware and Network](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-hardware-and-network.md) - **Description**: The host id of the Compute. - **Required**: Optional ### Logged In At - **Type**: date - **Developer Name**: `SD_LoInAt` - **Attribute Set**: [Last Logged In Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-last-logged-in-information.md) - **Description**: The logged in at of the Compute. - **Required**: Optional ### Logged In By - **Type**: text - **Developer Name**: `SD_LoInBy` - **Attribute Set**: [Last Logged In Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-last-logged-in-information.md) - **Description**: The logged in by of the Compute. - **Required**: Optional ### Memory(GB) - **Type**: double - **Developer Name**: `SD_Me` - **Attribute Set**: [Hardware and Network](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-hardware-and-network.md) - **Description**: The memory(gb) of the Compute. - **Required**: Optional ### Number of Processors - **Type**: int - **Developer Name**: `SD_NuOfPr` - **Attribute Set**: [Processor Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-processor-details.md) - **Description**: The number of processors of the Compute. - **Required**: Optional ### OS Caption - **Type**: text - **Developer Name**: `SD_OsCa` - **Attribute Set**: [Operating System Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-operating-system-details.md) - **Description**: The os caption of the Compute. - **Required**: Optional ### OS Current Time Zone - **Type**: text - **Developer Name**: `SD_OsCuTiZ` - **Attribute Set**: [Operating System Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-operating-system-details.md) - **Description**: The os current time zone of the Compute. - **Required**: Optional ### OS Description - **Type**: text - **Developer Name**: `SD_OsDe` - **Attribute Set**: [Operating System Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-operating-system-details.md) - **Description**: The os description of the Compute. - **Required**: Optional ### OS Domain - **Type**: text - **Developer Name**: `SD_OsDo` - **Attribute Set**: [Operating System Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-operating-system-details.md) - **Description**: The os domain of the Compute. - **Required**: Optional ### OS Edition - **Type**: text - **Developer Name**: `SD_OsEd` - **Attribute Set**: [Operating System Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-operating-system-details.md) - **Description**: The os edition of the Compute. - **Required**: Optional ### OS Install Date - **Type**: text - **Developer Name**: `SD_OsInDa` - **Attribute Set**: [Operating System Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-operating-system-details.md) - **Description**: The os install date of the Compute. - **Required**: Optional ### OS Local Date Time - **Type**: text - **Developer Name**: `SD_OsLoDaT` - **Attribute Set**: [Operating System Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-operating-system-details.md) - **Description**: The os local date time of the Compute. - **Required**: Optional ### OS Major Version - **Type**: text - **Developer Name**: `SD_OsMaVe` - **Attribute Set**: [Operating System Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-operating-system-details.md) - **Description**: The os major version of the Compute. - **Required**: Optional ### OS Minor Version - **Type**: text - **Developer Name**: `SD_OsMiVe` - **Attribute Set**: [Operating System Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-operating-system-details.md) - **Description**: The os minor version of the Compute. - **Required**: Optional ### OS Number Of Licensed Users - **Type**: text - **Developer Name**: `SD_OsNuOfL` - **Attribute Set**: [Operating System Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-operating-system-details.md) - **Description**: The os number of licensed users of the Compute. - **Required**: Optional ### OS Platform ID - **Type**: text - **Developer Name**: `SD_OsPlId` - **Attribute Set**: [Operating System Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-operating-system-details.md) - **Description**: The os platform id of the Compute. - **Required**: Optional ### OS Product Key - **Type**: text - **Developer Name**: `SD_OsPrKe` - **Attribute Set**: [Operating System Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-operating-system-details.md) - **Description**: The os product key of the Compute. - **Required**: Optional ### OS Serial Number - **Type**: text - **Developer Name**: `SD_OsSeNu` - **Attribute Set**: [Operating System Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-operating-system-details.md) - **Description**: The os serial number of the Compute. - **Required**: Optional ### OS Service Pack Major Version - **Type**: text - **Developer Name**: `SD_OsSePaM` - **Attribute Set**: [Operating System Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-operating-system-details.md) - **Description**: The os service pack major version of the Compute. - **Required**: Optional ### OS Service Pack Minor Version - **Type**: text - **Developer Name**: `SD_OsSePa1` - **Attribute Set**: [Operating System Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-operating-system-details.md) - **Description**: The os service pack minor version of the Compute. - **Required**: Optional ### OS Signature - **Type**: text - **Developer Name**: `SD_OsSi` - **Attribute Set**: [Operating System Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-operating-system-details.md) - **Description**: The os signature of the Compute. - **Required**: Optional ### OS System Directory - **Type**: text - **Developer Name**: `SD_OsSyDi` - **Attribute Set**: [Operating System Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-operating-system-details.md) - **Description**: The os system directory of the Compute. - **Required**: Optional ### OS Type - **Type**: text - **Developer Name**: `SD_OsTy` - **Attribute Set**: [Operating System Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-operating-system-details.md) - **Description**: The os type of the Compute. - **Required**: Optional ### OS Vendor - **Type**: text - **Developer Name**: `SD_OsVe` - **Attribute Set**: [Operating System Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-operating-system-details.md) - **Description**: The os vendor of the Compute. - **Required**: Optional ### Platform - **Type**: text - **Developer Name**: `SD_Pl` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The platform of the Compute. - **Required**: Optional ### Processor Architecture - **Type**: text - **Developer Name**: `SD_PrAr` - **Attribute Set**: [Processor Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-processor-details.md) - **Description**: The processor architecture of the Compute. - **Required**: Optional ### Processor Device ID - **Type**: text - **Developer Name**: `SD_PrDeId` - **Attribute Set**: [Processor Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-processor-details.md) - **Description**: The processor device id of the Compute. - **Required**: Optional ### Processor ID - **Type**: text - **Developer Name**: `SD_PrId` - **Attribute Set**: [Processor Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-processor-details.md) - **Description**: The processor id of the Compute. - **Required**: Optional ### Processor Type - **Type**: text - **Developer Name**: `SD_PrTy` - **Attribute Set**: [Processor Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-processor-details.md) - **Description**: The processor type of the Compute. - **Required**: Optional ### Threads per Processor Core - **Type**: int - **Developer Name**: `SD_ThPePrC` - **Attribute Set**: [Processor Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-processor-details.md) - **Description**: The threads per processor core of the Compute. - **Required**: Optional ### Virtual IP Addresses - **Type**: text - **Developer Name**: `SD_ViIpAd` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The virtual ip addresses of the Compute. - **Required**: Optional ### Win Server OS UserName - **Type**: text - **Developer Name**: `SD_WiSeOsU` - **Attribute Set**: [Operating System Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-operating-system-details.md) - **Description**: The win server os username of the Compute. - **Required**: Optional # Configuration Management Database Configuration Types The Configuration Management Databse (CMDB) configuration types include configuration items, attribute sets, and their relationship types. |Required Editions| |-----------------| |Available in: Lightning Experience| |Available in: **Enterprise**, and **Unlimited** Editions| - **[CMDB Configuration Item Types](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-config-item-types.md)** Lists the configuration item types in the Configuration Management Database (CMDB). - **[CMDB Configuration Item Types Attributes Set](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attributes-set.md)** Lists the attributes set in the Configuration Management Database (CMDB). - **[CMDB Relationship Types](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-relationship-type/cmdb-relationship-types.md)** Lists the standard relationship types in the Configuration Management Database (CMDB). # Configuration Management Database GraphQL APIs You can access Agentforce IT Service Canonical GraphQL API using standard GraphQL endpoint that connects to the Configuration Management Database (CMDB). This API provides a single endpoint that returns exactly what you request. GraphQL API is a new paradigm of sending and receiving data, offering developers a single endpoint to call for all data needed in one request. This API allows developers to interact with the Salesforce Platform through GraphQL, a standard query language for APIs and a runtime for fulfilling those queries with your data. - **[Authorization: Integration User](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/graphql-api-authentication.md)** To access the Agentforce IT Service Configuration Management Database (CMDB) GraphQL API, you must authenticate using an Integration User via a standard OAuth 2.0 flow. - **[Authorization: User Sign-In](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/graphql-api-authentication-user-interactive-oauth.md)** To access the Agentforce IT Service Configuration Management Database (CMDB) GraphQL API, you must authenticate using an OAuth 2.0 Authorization Code flow with user sign-in, so that API calls run under the signed-in user's identity. - **[Configuration Management Database GraphQL V1 API (POST)](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/graphql-api-agentic-it-service-canonical.md)** Access and manage configuration items (CI) in the Agentforce IT Service Configuration Management Database (CMDB). Execute operations Create, Read, and Update on IT assets. Use this API to query, search, and manage Configuration Items (CIs). - **[Configuration Management Database GraphQL V2 API (POST)](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-v2/graphql-api-cmdb-it-service-canonical-v2.md)** Access and manage configuration items (CI) in the Agentforce IT Service Configuration Management Database (CMDB). Execute operations Create, Read, and Update on IT assets. Use this API to query, search, and manage Configuration Items (CIs). **See Also** - [GraphQL API Developer Guide](https://developer.salesforce.com/docs/platform/graphql/references/graphql?meta=Summary) - [Get Started with GraphQL API](https://developer.salesforce.com/docs/platform/graphql/guide/graphql-about.html) - [Agentforce IT Service Help](https://help.salesforce.com/s/articleView?id=service.it_srvcs_parent.htm) # Configuration Management Database GraphQL V1 API (POST) Access and manage configuration items (CI) in the Agentforce IT Service Configuration Management Database (CMDB). Execute operations Create, Read, and Update on IT assets. Use this API to query, search, and manage Configuration Items (CIs). - Fetch only the specific fields you need (for example, just the Operating System of a server), reducing payload size and improving response latency. - Perform queries, searches, and mutations (updates) through a unified interface, eliminating the need to manage multiple endpoints. - Programmatically discover the types, fields, and operations available in your specific CMDB instance, enabling dynamic query construction and better tooling support. ## Authorization Authenticate to the CMDB GraphQL API using one of the following methods: - [Authorization: Integration User](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/graphql-api-authentication.md) — Set up an Integration User and Connected App, then exchange your client credentials for a Bearer token. - [Authorization: User Sign-In](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/graphql-api-authentication-user-interactive-oauth.md) — Use the Authorization Code flow as a signed-in user to receive an authorization code, then exchange it for a Bearer token. ## GraphQL CMDB Endpoint All requests to the Agentforce IT Service CMDB GraphQL API must be sent as POST requests to the following endpoint: ```nolang https://api.salesforce.com/service/itsm/v1/cmdb/graphql ``` Example cURL request: ```nolang curl --location 'https://api.salesforce.com/service/itsm/v1/cmdb/graphql' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer ' \ --data '{ "query": "query CiById { ciById(id: \"100\") { SD_Ac SD_IpAd SD_OpSy SD_SeNu SD_St createdOn id lastModifiedOn } }" }' ``` **Available version:** 66.0 **note:** GraphQL API V2 is available in API version 67.0 and later. V2 includes the latest enhancements. We recommend using V2 for new integrations and migrating existing integrations to take advantage of the latest capabilities. See [Configuration Management Database GraphQL V1 API (POST)](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-v2/graphql-api-cmdb-it-service-canonical-v2.md). **HTTP method:** POST ## CI Types and Attributes Learn more about the developer names of out-of-the-box (OOTB) Configuration Item (CI) types and attributes that are available in the Salesforce CMDB. To retrieve the developer names for both default and custom types and attributes programmatically, you can query the standard Salesforce objects: - Configuration Item Types: Query the [CnfgItemTypeDef](https://developer.salesforce.com/docs/service/agentforce-it-service/tooling-apis/tooling-api-objects-cnfgitemtypedef.md) object to retrieve developer names for CI types. - Configuration Item Attributes: Query the [CnfgItemAttrDef](https://developer.salesforce.com/docs/service/agentforce-it-service/tooling-apis/tooling-api-objects-cnfgitemattrdef.md) object to retrieve developer names for CI attributes. - Configuration Item Relationship Types: Query the [CnfgMgmtRelationTypeDef](https://developer.salesforce.com/docs/service/agentforce-it-service/tooling-apis/tooling-api-objects-cnfgmgmtrelationtypedef.md) object to retrieve developer names for CI relationship types. ## Operation types Query, Mutation **Query: `ciById`** Fetches detailed information for a single configuration item using its unique identifier. See [Query Configuration Item](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/operations/query-cibyid.md#query-configuration-item) for request and response details. **Query: `searchCI`** Performs a paginated search across configuration items with filtering and sorting options. See [Search Configuration Items](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/operations/query-searchci.md#search-configuration-items) for request and response details. **Mutation: `upsertCI`** Submits a bulk operation to create or update one or more configuration items as an asynchronous job. See [Upsert Configuration Items](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/operations/mutation-upsertci.md#upsert-configuration-items) for request and response details. **Mutation: `updateCIById`** Updates either partial or all attributes of an existing configuration item specified by its unique identifier. See [Update Configuration Item](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/operations/mutation-updatecibyid.md#update-configuration-item) for request and response details. **Mutation: `deleteCI`** Deletes a configuration item by its unique identifier. See [Delete Configuration Item](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/operations/mutation-deleteci.md#delete-configuration-item) for request and response details. **Query: `getCIRelationship`** Retrieves detailed information about all configuration item (CI) relationships by using the unique identifier of a CI record. See [Get Configuration Item Relationship](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/operations/query-getcirelationship.md) for request and response details. **Mutation: `upsertCIRelationship`** Submits a bulk operation to create or update one or more relationships between configuration items as an asynchronous job. See [Upsert Configuration Item Relationship](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/operations/mutation-upsertcirelationship.md#upsert-configuration-item-relationship) for request and response details. **Mutation: `deleteCIRelationship`** Submit an operation to delete relationships between configuration items (CIs). This is a synchronous request. See [Delete Configuration Item Relationship](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/operations/mutation-deletecirelationship.md) for request and response details. **Query: `getComponentsByCiId`** Retrieves a paginated list of child components of a specific type for a configuration item by its unique identifier. See [Get Components for Configuration Item](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/operations/query-getcomponentsbyciid.md#get-components-for-configuration-item) for request and response details. **Query: `getCIHistory`** Perform a paginated retrieval of the audit trail for a specific configuration item. Returns a list of changes, including field-level modifications, timestamps, and user information. See [Get Configuration Item History](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/operations/query-getcihistory.md) for request and response details. **Query: `getStatus`** Retrieves the status of a previously submitted asynchronous job. See [Get Status of Operation](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/operations/query-getstatus.md#get-status-of-operation) for request and response details. **Query: `searchComponentCI`** Performs a paginated search across components for configuration items with filtering and sorting options. See [Search Components for Configuration Item](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/operations/query-searchcomponentci.md#search-components-for-configuration-item) for request and response details. **Query: `getAllTags`** Perform a paginated retrieval of configuration item (CI) tags. See [Get Configuration Item Tags](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/operations/query-getalltags.md) for request and response details. - **[Operation Types](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/graphql-types.md)** Learn more about the various Agentforce IT Service Configuration Management Database (CMDB) GraphQL API operations. **See Also** - [GraphQL API Developer Guide](https://developer.salesforce.com/docs/platform/graphql/references/graphql?meta=Summary) - [Get Started with GraphQL API](https://developer.salesforce.com/docs/platform/graphql/guide/graphql-about.html) - [Agentforce IT Service Help](https://help.salesforce.com/s/articleView?id=service.it_srvcs_parent.htm) # Configuration Management Database GraphQL V2 API (POST) Access and manage configuration items (CI) in the Agentforce IT Service Configuration Management Database (CMDB). Execute operations Create, Read, and Update on IT assets. Use this API to query, search, and manage Configuration Items (CIs). - Fetch only the specific fields you need (for example, just the Operating System of a server), reducing payload size and improving response latency. - Perform queries, searches, and mutations (updates) through a unified interface, eliminating the need to manage multiple endpoints. - Programmatically discover the types, fields, and operations available in your specific CMDB instance, enabling dynamic query construction and better tooling support. ## Authorization Authenticate to the CMDB GraphQL API using one of the following methods: - [Authorization: Integration User](https://developer.salesforce.com/docs/service/agentforce-it-service/graphql-api-authentication.md) — Set up an Integration User and Connected App, then exchange your client credentials for a Bearer token. - [Authorization: User Sign-In](https://developer.salesforce.com/docs/service/agentforce-it-service/graphql-api-authentication-user-interactive-oauth.md) — Use the Authorization Code flow as a signed-in user to receive an authorization code, then exchange it for a Bearer token. ## GraphQL CMDB Endpoint All requests to the Agentforce IT Service CMDB GraphQL API must be sent as POST requests to the following endpoint: ```nolang https://api.salesforce.com/service/itsm/v2/cmdb/graphql ``` Example cURL request: ```nolang curl --location 'https://api.salesforce.com/service/itsm/v2/cmdb/graphql' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer ' \ --data '{ "query": "query GetConfigurationItemById { getConfigurationItemById(id: \"100\") { SD_Ac SD_IpAd SD_OpSy SD_SeNu SD_St createdOn id lastModifiedOn } }" }' ``` **Available version:** 67.0 **HTTP method:** POST ## Configuration Items Types and Attributes Learn more about the developer names of out-of-the-box (OOTB) Configuration Item (CI) types and attributes that are available in the Salesforce CMDB. To retrieve the developer names for both default and custom types and attributes programmatically, you can query the standard Salesforce objects: - Configuration Item Types: Query the [CnfgItemTypeDef](https://developer.salesforce.com/docs/service/tooling-apis/tooling-api-objects-cnfgitemtypedef.md) object to retrieve developer names for configuration item types. - Configuration Item Attributes: Query the [CnfgItemAttrDef](https://developer.salesforce.com/docs/service/tooling-apis/tooling-api-objects-cnfgitemattrdef.md) object to retrieve developer names for configuration item attributes. - Configuration Item Relationship Types: Query the [CnfgMgmtRelationTypeDef](https://developer.salesforce.com/docs/service/tooling-apis/tooling-api-objects-cnfgmgmtrelationtypedef.md) object to retrieve developer names for configuration item relationship types. ## Operation types Query, Mutation **Query: `getConfigurationItemById`** Fetches detailed information for a single configuration item using its unique identifier. See [Get Configuration Item](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/operations-v2/query-cibyid-v2.md#get-configuration-item) for request and response details. **Query: `getCnfgItemRelationships`** Retrieves detailed information about all configuration item (CI) relationships by using the unique identifier of a configuration item record. See [Get Configuration Item Relationship](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/operations-v2/query-getcirelationship-v2.md) for request and response details. **Query: `searchConfigurationItems`** Performs a paginated search across configuration items with filtering and sorting options. See [Search Configuration Items](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/operations-v2/query-searchci-v2.md#search-configuration-items) for request and response details. **Query: `searchComponentCnfgItems`** Performs a paginated search across components for configuration items with filtering and sorting options. See [Search Component Configuration Items](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/operations-v2/query-searchcomponentci-v2.md#search-component-configuration-items) for request and response details. **Query: `getComponentsByCnfgItemId`** Retrieves a paginated list of child components of a specific type for a configuration item by its unique identifier. See [Get Components for Configuration Item](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/operations-v2/query-getcomponentsbyciid-v2.md#get-components-for-configuration-item) for request and response details. **Query: `getConfigurationItemHistory`** Perform a paginated retrieval of the audit trail for a specific configuration item. Returns a list of changes, including field-level modifications, timestamps, and user information. See [Get Configuration Item History](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/operations-v2/query-getcihistory-v2.md) for request and response details. **Query: `getOperationStatus`** Retrieves the status of a previously submitted asynchronous job. See [Get Operation Status](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/operations-v2/query-getstatus-v2.md#get-operation-status) for request and response details. **Query: `getAllConfigurationItemTags`** Perform a paginated retrieval of configuration item (CI) tags. See [Get Configuration Item Tags](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/operations-v2/query-getalltags-v2.md) for request and response details. **Mutation: `updateConfigurationItemById`** Updates either partial or all attributes of an existing configuration item specified by its unique identifier. See [Update Configuration Item](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/operations-v2/mutation-updatecibyid-v2.md#update-configuration-item) for request and response details. **Mutation: `upsertConfigurationItems`** Submits a bulk operation to create or update one or more configuration items as an asynchronous job. See [Upsert Configuration Items](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/operations-v2/mutation-upsertci-v2.md#upsert-configuration-items) for request and response details. **Mutation: `upsertCnfgItemRelationships`** Submits a bulk operation to create or update one or more relationships between configuration items as an asynchronous job. See [Upsert Configuration Item Relationship](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/operations-v2/mutation-upsertcirelationship-v2.md#upsert-configuration-item-relationship) for request and response details. **Mutation: `deleteConfigurationItem`** Deletes a configuration item by its unique identifier. See [Delete Configuration Item](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/operations-v2/mutation-deleteci-v2.md#delete-configuration-item) for request and response details. **Mutation: `deleteCnfgItemRelationship`** Submit an operation to delete relationships between configuration items (CIs). This is a synchronous request. See [Delete Configuration Item Relationship](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/operations-v2/mutation-deletecirelationship-v2.md) for request and response details. - **[Operation Types](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-graphql-types-v2.md)** Learn more about the various Agentforce IT Service Configuration Management Database (CMDB) GraphQL API operations. # ConfigurationItem Represents a record in the core Salesforce system that refers to a configuration item record stored in an external system. This object is available in API version 65.0 and later. ## Supported Calls `create()`, `delete()`, `describeLayout()`, `describeSObjects()`, `getDeleted()`, `getUpdated()`, `query()`, `retrieve()`, `search()`, `undelete()`, `update()`, `upsert()` ## Fields ### AssetId - **Type**: reference - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The asset related to a configuration item. This field is a relationship field. - **Relationship Name**: Asset - **Refers To**: Asset ### ConfigurationItem - **Type**: string - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The reference to an external configuration item stored in an external system. ### LastReferencedDate - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: The timestamp when the current user last accessed this record, a record related to this record, or a list view. ### LastViewedDate - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: The timestamp when the current user last viewed this record or list view. ### Name - **Type**: string - **Properties**: Create, Filter, Group, idLookup, Nillable, Sort, Update - **Description**: Name of the record. ### OwnerId - **Type**: reference - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: ID of the owner of this object. This field is a polymorphic relationship field. - **Relationship Name**: Owner - **Refers To**: Group, User # Configure a Chat Session Before starting a chat session, you have several ways to configure the session using the `SCSChatConfiguration` object. These configuration settings allow you to specify pre-chat fields, determine whether a session starts minimized or full screen, and get updates about the user's queue position. **important:** 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](https://help.salesforce.com/s/articleView?id=service.miaw_intro_landing.htm&type=5) before that date. Messaging offers many of the [chat features](https://help.salesforce.com/s/articleView?id=service.miaw_chat_vs_messaging.htm&type=5) that you love plus asynchronous conversations that can be picked back up at any time. Learn about chat retirement in [Help](https://help.salesforce.com/s/articleView?id=001790618&type=1). When you start a chat session, you specify an [`SCSChatConfiguration`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSChatConfiguration.html) object as one of the arguments. This object contains all the configuration settings necessary for Chat to start a session. To create an [`SCSChatConfiguration`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSChatConfiguration.html) object, you specify information about your org and deployment. In Swift: ```java let config = SCSChatConfiguration(liveAgentPod: "TO_DO_POD_NAME", // e.g. "d.gla5.gus.salesforce.com" orgId: "TO_DO_ORG_ID", // e.g. "00DB00000003Rxz" deploymentId: "TO_DO_DEPLOYMENT_ID", // e.g. "573B00000005KXz" buttonId: "TO_DO_BUTTON_ID") // e.g. "575C00000004h3m" ``` In Objective-C: ```java SCSChatConfiguration *config = [[SCSChatConfiguration alloc] initWithLiveAgentPod:@"TO_DO_POD_NAME" // e.g. "d.gla5.gus.salesforce.com" orgId:@"TO_DO_ORG_ID" // e.g. "00DB00000003Rxz" deploymentId:@"TO_DO_DEPLOYMENT_ID" // e.g. "573B00000005KXz" buttonId:@"TO_DO_BUTTON_ID"]; // e.g. "575C00000004h3m" ``` **note:** You can get the required parameters for this method from your Salesforce org. See [Get Chat Settings from Your Org](https://developer.salesforce.com/docs/service/service-sdk-android/guides/shared/live-agent-cloud-setup-get-settings.md). If your Salesforce admin hasn't already set up Chat in Service Cloud or you need more guidance, see [Org Setup for Chat in Lightning Experience with a Guided Flow](https://developer.salesforce.com/docs/service/service-sdk-android/guides/shared/live-agent-cloud-setup.md). However, there are other options you can set using [`SCSChatConfiguration`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSChatConfiguration.html) at configuration time. The following features are available for configuration: | Property Name | Description | Type & Default Value | | -------------------- | --------------------------------------------------------------------------------------------- | -------------------- | | `allowMinimization` | Indicates whether the user is allowed to minimize the chat session view. | `Bool`: `true`/`YES` | | `allowURLPreview` | Indicates whether the user is shown URL previews when the agent types a URL in the chat feed. | `Bool`: `true`/`YES` | | `defaultToMinimized` | Indicates whether the chat session starts out as a minimized thumbnail view. | `Bool`: `true`/`YES` | **note:** When the minimized view is visible, it displays the number of unread messages. This value represents the total number of bot, agent, and system messages that are unread. | Property Name | Description | Type & Default Value | | ------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- | | `allowBackgroundExecution` | Indicates whether to allow extended background execution to support active chat sessions. When `true`, active chat sessions can remain in the background for more than three minutes. See `allowBackgroundNotifications` for related functionality. | `Bool`: `true`/`YES` | | `allowBackgroundNotifications` | Indicates whether the session posts local notifications based on chat activity. Requires that `allowBackgroundExecution` is also set to `true`. To learn more, see [Notifications for Chat Activity](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/live-agent-notifications.md). | `Bool`: `true`/`YES` | **note:** When turning on background execution, be sure that Idle Connection Timeout Duration is set in your org. To learn more, see [Chat Deployment Settings](https://help.salesforce.com/articleView?id=service.live_agent_deployment_settings.htm&type=5). | Property Name | Description | Type & Default Value | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | | [`prechatEntities`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSChatConfiguration.html#/c:objc(cs)SCSChatConfiguration(py)prechatEntities>) | Pre-chat fields are always sent to the agent at the start of the session. To fill in fields of a particular record, instantiate an [`SCSPrechatEntity`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSPrechatEntity.html) for each Salesforce object (for example, `Case` or `Contact`) and an [`SCSPrechatEntityField`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSPrechatEntityField.html) for each field (for example, `Subject` or `LastName`). To learn more, see [Create or Update Salesforce Records from a Chat Session](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/live-agent-send-custom-data.md). | [`SCSPrechatEntity`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSPrechatEntity.html) array: `nil` | | [`prechatFields`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSChatConfiguration.html#/c:objc(cs)SCSChatConfiguration(py)prechatFields>) | You can specify both optional and required fields shown to the user before a chat session starts. You can also directly pass data to an agent without requiring any user input. To create pre-chat fields, add [`SCSPrechatObject`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSPrechatObject.html) instances to the [`prechatFields`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSChatConfiguration.html#/c:objc(cs)SCSChatConfiguration(py)prechatFields>) property on the [`SCSChatConfiguration`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSChatConfiguration.html) object. To learn more, see [Show Pre-Chat Fields to User](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/live-agent-prechat-fields.md). | [`SCSPrechatObject`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSPrechatObject.html) array: `nil` | | Property Name | Description | Type & Default Value | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------- | | `eventList` | Adds a custom path that displays a custom tile and performs a custom action within your app. To learn more, see [Handle Custom URLs in Chat](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/chat-url-event.md). | `SCSAppEventList` | | [`queueStyle`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSChatConfiguration.html#/c:objc(cs)SCSChatConfiguration(py)queueStyle>) | Determines the style of the queue: queue position number (`.position`), estimated wait time (`.estimatedWaitTime`), or no queue information (`.none`). You can subscribe to queue position events using [`session(didUpdateQueuePosition:estimatedWaitTime:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSChatSessionDelegate.html#/c:objc(pl)SCSChatSessionDelegate(im)session:didUpdateQueuePosition:estimatedWaitTime:>) on [`SCSChatSessionDelegate`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSChatSessionDelegate.html). To understand the algorithm used for the estimated wait time, see the estimated wait time documentation in the [Chat REST API Developer Guide](https://developer.salesforce.com/docs/atlas.en-us.live_agent_rest.meta/live_agent_rest/live_agent_rest_estimated_wait_time.htm). | `SCSChatConfigurationQueueStyle`: `.position` | | `remoteLoggingEnabled` | Indicates whether session logs are sent for collection. (Logs sent remotely don't collect personal information. Unique IDs are created for tying logs to sessions and those IDs can't be correlated back to specific users.) | `Bool`: `true`/`YES` | | `visitorName` | Name of the chat visitor. This value is used by the Service Cloud console and displayed to the agent. | `String`: "`Visitor`" | When using the estimated wait time, the wait time is shown to the user in minutes. However, you can set the minimum ([`minimumEstimatedWaitTime`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSChatConfiguration.html#/c:objc(cs)SCSChatConfiguration(py)minimumEstimatedWaitTime>)) and maximum () wait time values. If the wait time exceeds the maximum value, a generic message appears, which [you can customize](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/localization.md) (using the customizable chat strings in the `ServiceCloud.Chat.Status.EstimatedWait` namespace). When using the queue position number, the queue position is 0 if the agent capacity is greater than or equal to the number of customer requests. Otherwise, the position value represents how far the customer is from getting served by an agent. ```java q = max(n - c, 0) ``` Where: - q is the queue position - n is the position of the customer compared to all waiting customers - c is the total capacity of all agents For example, if the total capacity is 10, the first 10 waiting visitors have a position of 0, the 11th has a position of 1, the 12th has a position of 2, and so on. Once you've fully configured the [`SCSChatConfiguration`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSChatConfiguration.html) object, you can start the session using the `startSession` method. ## Example The following example configures a session with one pre-chat field and a visitor name "Jane Doe". In Swift: ```java let config = SCSChatConfiguration(liveAgentPod: "YOUR_POD_NAME", orgId: "YOUR_ORG_ID", deploymentId: "YOUR_DEPLOYMENT_ID", buttonId: "YOUR_BUTTON_ID") // Set the visitor name config?.visitorName = "Jane Doe" // Change from queue position to estimated wait time config?.queueStyle = .estimatedWaitTime // Add a required email field (with an email keyboard and no auto-correction) let emailField = SCSPrechatTextInputObject(label: "Email") emailField?.isRequired = true emailField?.keyboardType = .emailAddress emailField?.autocorrectionType = .no config?.prechatFields.append(emailField!) ``` In Objective-C: ```java SCSChatConfiguration *config = [[SCSChatConfiguration alloc] initWithLiveAgentPod:@"YOUR_POD_NAME" orgId:@"YOUR_ORG_ID" deploymentId:@"YOUR_DEPLOYMENT_ID" buttonId:@"YOUR_BUTTON_ID"]; // Set the visitor name config.visitorName = @"Jane Doe"; // Change from queue position to estimated wait time config.queueStyle = SCSChatConfigurationQueueStyleEstimatedWaitTime; // Add a required email field (with an email keyboard and no auto-correction) SCSPrechatTextInputObject* emailField = [[SCSPrechatTextInputObject alloc] initWithLabel:@"Email"]; emailField.required = YES; emailField.keyboardType = UIKeyboardTypeEmailAddress; emailField.autocorrectionType = UITextAutocorrectionTypeNo; [config.prechatFields addObject:emailField]; ``` # Configure Agentforce Service Agent Progress Indicators To let messaging end users know that an AI agent is actively engaged in their conversation, set up your integration to support the Show Agentforce agent progress indicator setting. Admins can use the setting to turn on progress indicators with loading text and progress animations. These indicators communicate what actions an Agentforce Service agent is taking behind the scenes. Progress indicators rely on platform events for Bring Your Own Channel for CCaaS Messaging channels. Partners and admins can opt in to them or not, depending on how they plan to use platform event allotments. To make the **Show Agentforce agent progress indicator** setting visible to admins on a channel’s Messaging Settings page or to hide this setting, set the `EventCapabilitiesIsProgressIndicatorOptExposed` field on the ConversationChannelDefinition record. - Set this to `true` to permit the Salesforce admin to opt in to progress indicators for AI agents. - Set this to `false` to disable progress indicators and hide the setting from the Salesforce admin in the Messaging Settings. Default is `false`. In addition to setting the field value in the ConversationChannelDefinition record, call the Interaction Service Register Capabilities API (`PATCH /api/v1/capabilities`) to specify that your integration supports progress indicators. We recommend invoking the API only one time, on load of your middleware or connector. `messageTypeCapabilities` is a mandatory field and should be specified when registering progress indicators. Here’s an example payload. ```JSON { "capabilities": { "appType": "custom", "channelCapabilities": [ { "channelType": "custom", "customIntegration": { "customIntegrationType": "CustomChannelIntegration", "integrationNamespace": "testdot", "conversationChannelDefinitionDevName": "CCaaSDot_ChannelDefinition1" }, "messageTypeCapabilities": [ { "messageType": "StaticContentMessage", "formatTypeCapabilities": [ { "formatType": "Links" } ] } ], "progressIndicatorTypeCapabilities": [ { "progressIndicatorType": "ProgressUpdateIndicator", "formatTypeCapabilities": [ { "formatType": "Text" } ] } ] } ] } } ``` When a Salesforce admin selects **Show Agentforce agent progress indicator**, it takes up to an hour for these progress indicators to show up in a conversation between an AI agent and an end-user. **See Also** - [Create a Sample Outbound Flow for Agentforce Service Agents](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/create-agentforce-service-agent.md) - [Create the Conversation Channel Definition Record](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/create-conversationchanneldefinition-record.md) # Configure Agentforce Service Agent Progress Indicators To let messaging end users know that an AI agent is actively engaged in their conversation, set up your integration to support the Show Agentforce agent progress indicator setting. Admins can use the setting to turn on progress indicators with loading text and progress animations. These indicators communicate what actions an Agentforce Service agent is taking behind the scenes. Progress indicators rely on platform events for Bring Your Own Channel for Messaging channels. Partners and admins can opt in to them or not, depending on how they plan to use platform event allotments. To make the **Show Agentforce agent progress indicator** setting visible to admins on a channel’s Messaging Settings page or to hide this setting, set the `EventCapabilitiesIsProgressIndicatorOptExposed` field on the ConversationChannelDefinition record. - Set this to `true` to permit the Salesforce admin to opt in to progress indicators for AI agents. - Set this to `false` to disable progress indicators and hide the setting from the Salesforce admin in the Messaging Settings. Default is `false`. In addition to setting the field value in the ConversationChannelDefinition record, call the Interaction Service Register Capabilities API (`PATCH /api/v1/capabilities`) to specify that your integration supports progress indicators. We recommend invoking the API only one time, on load of your middleware or connector. `messageTypeCapabilities` is a mandatory field and should be specified when registering progress indicators. Here’s an example payload. ```JSON { "capabilities": { "appType": "custom", "channelCapabilities": [ { "channelType": "custom", "customIntegration": { "customIntegrationType": "CustomChannelIntegration", "integrationNamespace": "testdot", "conversationChannelDefinitionDevName": "CCaaSDot_ChannelDefinition1" }, "messageTypeCapabilities": [ { "messageType": "StaticContentMessage", "formatTypeCapabilities": [ { "formatType": "Links" } ] } ], "progressIndicatorTypeCapabilities": [ { "progressIndicatorType": "ProgressUpdateIndicator", "formatTypeCapabilities": [ { "formatType": "Text" } ] } ] } ] } } ``` When a Salesforce admin selects **Show Agentforce agent progress indicator**, it takes up to an hour for these progress indicators to show up in a conversation between an AI agent and an end-user. **See Also** - [Create a Sample Outbound Flow for Agentforce Service Agents](https://developer.salesforce.com/docs/service/messaging-partner/guide/create-agentforce-service-agent.md) - [Create the Conversation Channel Definition Record](https://developer.salesforce.com/docs/service/messaging-partner/guide/create-conversationchanneldefinition-record.md) # Configure Consent Levels to Customize the Messaging Opt-In and Opt-Out Experience Administrators can configure consent-level options to customize the opt-in and opt-out experience for Messaging channels. The ConversationChannelDefinition record includes fields that determine which consent-level options are exposed to the administrator. To determine the consent levels you want to expose to the administrators, when you create the ConversationChannelDefinition record, set the `capabilitiesSupportsImplicitConsent` and `capabilitiesSupportsExplicitConsent` fields, and optionally set the `capabilitiesSupportsDoubleOptInConsent` field. - `capabilitiesSupportsImplicitConsent`: Determines whether the Implicit Opt-In consent level is exposed to the administrator (`true`). This field is required and must be set to `true`. The default value is `false`. - `capabilitiesSupportsExplicitConsent`: Determines whether the Explicit Opt-In consent level is exposed to the administrator (`true`). The default value is `false`. This field is optional. - `capabilitiesSupportsDoubleOptInConsent`: Determines whether the Double Opt-In consent level is exposed to the administrator (`true`). The default value is `false`. This field is optional. If `capabilitiesSupportsDoubleOptInConsent` is set to `true`, then `capabilitiesSupportsExplicitConsent` must also be set to `true`. **note:** If consent is managed by the partner (`ConversationChannelDefinition.consentOwner` is `Partner`), use the Interaction Service Consent API (`PATCH /api/v1/consent`) to set the consent level for the user. See [Configure Partner-Owned Routing and Consent](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/configure-partner-routing-consent.md). To learn more about consent levels, see [_Salesforce Help_: Customize the Messaging Opt-In and Opt-Out Experience](https://help.salesforce.com/s/articleView?id=service.messaging_consent_status.htm). **See Also** - [Configure Partner-Owned Routing and Consent](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/configure-partner-routing-consent.md) - [_Salesforce Help_: Customize the Messaging Opt-In and Opt-Out Experience](https://help.salesforce.com/s/articleView?id=service.messaging_consent_status.htm) - [_Trailhead_: Use SOAP API](https://trailhead.salesforce.com/content/learn/modules/api_basics/api_basics_soap) # Configure Consent Levels to Customize the Messaging Opt-In and Opt-Out Experience Administrators can configure consent-level options to customize the opt-in and opt-out experience for Messaging channels. The ConversationChannelDefinition record includes fields that determine which consent-level options are exposed to the administrator. To determine the consent levels you want to expose to the administrators, when you create the ConversationChannelDefinition record, set the `capabilitiesSupportsImplicitConsent` and `capabilitiesSupportsExplicitConsent` fields. - `capabilitiesSupportsImplicitConsent`: Determines whether the Implicit Opt-In consent level is exposed to the administrator (true). This field is required and must be set to `true`. The default value is `false`. - `capabilitiesSupportsExplicitConsent`: Determines whether the Explicit Opt-In consent level is exposed to the administrator (true). The default value is `false`. This field is optional. The `capabilitiesSupportsDoubleOptInConsent` field, which exposes the Double Opt-In consent level option, isn’t supported for Bring Your Own Channel for Messaging. To learn more about consent levels, see [_Salesforce Help_: Customize the Messaging Opt-In and Opt-Out Experience](https://help.salesforce.com/s/articleView?id=service.messaging_consent_status.htm). **See Also** - [_Salesforce Help_: Customize the Messaging Opt-In and Opt-Out Experience](https://help.salesforce.com/s/articleView?id=service.messaging_consent_status.htm) - [_Trailhead_: Use SOAP API](https://trailhead.salesforce.com/content/learn/modules/api_basics/api_basics_soap) # Configure Estimated Wait Times for Queues Reps can see estimated wait times for a given queue before transferring a messaging session or requesting a conference. Estimated wait times for Bring Your Own Channel for CCaaS Messaging channels are calculated by the Contact Center as a Service (CCaaS) provider. To display estimated wait times using the partner provider’s calculations, set the `hasQueueWaitTime` field in the [`SharedCapabilitiesResult`](/docs/service/service-connector-api/references/connector-api/service-connector-objects-sharedcapabilitiesresult.html) object to `true`. Optionally include the `queueWaitTime` key in the `Contact` object that’s returned for [`getContacts`](/docs/service/service-connector-api/references/connector-api/service-connector-interface-getcontacts.html). The `queueWaitTime` field represents the partner provider’s queue wait time measured in seconds. For example: ``` new Contact ({ id: 'queueId1' type: Constants.CONTACT_TYPE.QUEUE, name: "Queue Name", queue: 'queueId1', queueWaitTime: 240 }) ``` # Configure Inbound Acknowledgements and Outbound Typing Indicators Certain acknowledgements and indicators are enabled by default in Bring Your Own Channel for CCaaS: typing indicators for reps (reps can see when an end user is typing) and outbound message read and delivery receipts. Other types require partner setup before admins can enable them: typing indicators for messaging end users (end users can see when a rep is typing) and inbound message acknowledgments. These rely on platform events for BYOC for CCaaS Messaging channels, so partners and admins can opt in to either, both, or neither based on how they plan to use their platform event allotments. To show or hide **Show messaging users read and delivered receipts** and **Show agent typing indicator** settings on a channel’s Messaging Settings page, set these fields on the ConversationChannelDefinition record. - `EventCapabilitiesIsInboundAcknwOptionExposed`: - Set this field to `true` to permit the Salesforce admin to opt in to read receipts and delivery receipts for inbound messages. - Set this field to `false` to turn off inbound acknowledgments and hide the setting from the Salesforce admin in the Messaging Settings. - Default is `false`. - `EventCapabilitiesIsTypingIndicatorOptionHidden`: - Set this field to `false` to permit the Salesforce admin to opt in to typing indicators for outbound messages (messaging end users can see when a rep is typing). - Set this field to `true` to turn off typing indicators for outbound messages and hide the setting from the Salesforce admin in the Messaging Settings. Messaging end users won’t be able to see when a rep is typing. - Default is `false`. When a Salesforce admin selects **Show agent typing indicator** or **Show messaging users read and delivered receipts**, it takes up to an hour for these typing indicators or read and delivery receipts to be active on a Messaging channel. **See Also** - _Object Reference for the Salesforce Platform_: [ConversationChannelDefinition](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_conversationchanneldefinition.htm) # Configure Inbound Acknowledgements and Outbound Typing Indicators Certain acknowledgements and indicators are enabled by default in Bring Your Own Channel for Messaging: typing indicators for reps (reps can see when an end user is typing) and outbound message read and delivery receipts. Other types require partner setup before admins can enable them: typing indicators for messaging end users (end users can see when a rep is typing) and inbound message acknowledgments. These rely on platform events for Bring Your Own Channel for Messaging channels, so partners and admins can opt in to either, both, or neither based on how they plan to use their platform event allotments. To show or hide **Show messaging users read and delivered receipts** and **Show agent typing indicator** settings on a channel’s Messaging Settings page, set these fields on the ConversationChannelDefinition record. - `EventCapabilitiesIsInboundAcknwOptionExposed`: - Set this field to `true` to permit the Salesforce admin to opt in to read receipts and delivery receipts for inbound messages. - Set this field to `false` to turn off inbound acknowledgments and hide the setting from the Salesforce admin in the Messaging Settings. - Default is `false`. - `EventCapabilitiesIsTypingIndicatorOptionHidden`: - Set this field to `false` to permit the Salesforce admin to opt in to typing indicators for outbound messages (messaging end users can see when a rep is typing). - Set this field to `true` to turn off typing indicators for outbound messages and hide the setting from the Salesforce admin in the Messaging Settings. Messaging end users won’t be able to see when a rep is typing. - Default is `false`. When a Salesforce admin selects **Show agent typing indicator** or **Show messaging users read and delivered receipts**, it takes up to an hour for these typing indicators or read and delivery receipts to be active on a Messaging channel. **See Also** - _Object Reference for the Salesforce Platform_: [ConversationChannelDefinition](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_conversationchanneldefinition.htm) # Configure Invitation URLs to Open on External Websites Admins can add a URL prefix to an invitation URL to directly open the invitation on an external website. 1. Set up your website in the Invitation URL Prefix flow attribute. For more information, see [Flow Screen Component: Select Service Appointment Time](https://help.salesforce.com/s/articleView?id=platform.ls_flowscreencmp_select_srvc_appt_time.htm&type=5). ![Invitation URL prefix attribute in flow](https://developer.salesforce.com/media/salesforce-scheduler-dev-guide/ls_invitation_URL_prefix_attribute.png) 2. Prefix the invitation URL with your website's domain address in the `https://YourSiteDomain/SiteURL` format. After you prefix the invitation URL in the flow, activate the flow and generate the appointment invitation URL. # Configure Partner-Owned Routing and Consent Routing and consent levels can be managed through the Salesforce system or the partner system. There are several possible scenarios. - Manage routing and consent levels through Salesforce. - Manage routing and consent levels through the partner system. - Manage routing through the partner system and consent levels through Salesforce. ## Manage Routing and Consent Levels through Salesforce To manage routing and consent levels through the Salesforce system: 1. Set `ConversationChannelDefinition.routingOwner` to `Salesforce`. 2. Set `ConversationChannelDefinition.consentOwner` to `Salesforce` and `ConversationChannelDefinition.supportsKeywords` to `true`. If `ConversationChannelDefinition.supportsKeywords` is `false`, only Implicit Opt-In consent is available for the Messaging channel. 3. After the admin installs the managed package and sets everything up, they can navigate to the Messaging Settings page in Salesforce Lightning to configure the routing and consent level details. ## Manage Routing and Consent Levels through the Partner System To manage routing and consent levels through the partner system: 1. Set `ConversationChannelDefinition.routingOwner` to `Partner`. 2. Set `ConversationChannelDefinition.consentOwner` to `Partner` and `ConversationChannelDefinition.supportsKeywords` to `false`. 3. Perform the API calls in the order listed when the end user initiates a conversation: - Call the Interaction API (`POST /api/v1/interactions`) to create a conversation messaging session and a messagingEndUser record. - Call the Consent API (`PATCH /api/v1/consent`) and set the consent level (`consentStatus`) for the user. For example, “consentStatus” : “ExplicityOptedIn”. - Call the Route API (`POST /api/v1/route`) to generate a Pending Service Routing (PSR) record in Salesforce. - Call the AgentWork API (`POST /api/v1/agentWork`) to create an AgentWork record when the system finds a potential rep to handle the work item. - Call the Route API (`DELETE /api/v1/route`) to delete the Pending Service Routing (PSR) record. Only call this API if the PSR isn’t automatically deleted. 4. Perform the API calls in the order listed when the rep clicks on the transfer target. The RoutingRequested event is received through the custom platform event. - Call the RoutingResult api (`POST /api/v1/routingResult`). If the event is being routed to an external target outside the Salesforce org, set `externallyRouted` to `true` and end the flow. If the event is being managed through Omni-Channel routing, move on to the next step. - Call the Route API (`POST /api/v1/route`) and set `RoutingType` to `Transfer`. - Call the AgentWork API (`POST /api/v1/agentWork`) and set `RoutingType` to `Transfer`. ## Manage Routing through the Partner System and Consent Levels through Salesforce To manage routing through the partner system and consent levels through Salesforce: 1. Set `ConversationChannelDefinition.routingOwner` to `Partner`. 2. Set `ConversationChannelDefinition.consentOwner` to `Salesforce` and `ConversationChannelDefinition.supportsKeywords` to `true`. If `ConversationChannelDefinition.supportsKeywords` is `false`, only Implicit Opt-In consent is available for the Messaging channel. 3. Perform the API calls in the order listed when the end user initiates a conversation: - Call the Interaction API (`POST /api/v1/interactions`) to create a conversation messaging session and a messagingEndUser record. - Call the Route API (`POST /api/v1/route`) to generate a Pending Service Routing (PSR) record in Salesforce. - Call the AgentWork API (`POST /api/v1/agentWork`) to create an AgentWork record when the system finds a potential rep to handle the work item. - Call the Route API (`DELETE /api/v1/route`) to delete the Pending Service Routing (PSR) record. Only call this API if the PSR isn’t automatically deleted. 4. Perform the API calls in the order listed when the rep clicks on the transfer target. The RoutingRequested event is received through the custom platform event. - Call the RoutingResult api (`POST /api/v1/routingResult`). If the event is being routed to an external target outside the Salesforce org, set `externallyRouted` to `true` and end the flow. If the event is being managed through Omni-Channel routing, move on to the next step. - Call the Route API (`POST /api/v1/route`) and set `RoutingType` to `Transfer`. - Call the AgentWork API (`POST /api/v1/agentWork`) and set `RoutingType` to `Transfer`. 5. After the admin installs the managed package and sets everything up, they can navigate to the Messaging Settings page in Salesforce Lightning to configure the consent level details. **See Also** - [Create the Conversation Channel Definition Record](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/create-conversationchanneldefinition-record.md) - [Configure Consent Levels to Customize the Messaging Opt-In and Opt-Out Experience](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/configure-consent-levels.md) - [Interaction Service API](https://developer.salesforce.com/docs/service/interaction-service-api/guide/get-started.html) - _GitHub_: [Interaction Service APIs](https://github.com/salesforce-misc/interaction-service-apis) - _Object Reference_: [messagingEndUser](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_messagingenduser.htm) - _Salesforce Help_: [Customize the Messaging Opt-In and Opt-Out Experience](https://help.salesforce.com/s/articleView?id=service.messaging_consent_status.htm) - _Salesforce Help_: [Understand the Details of the Routing Lifecycle](https://help.salesforce.com/s/articleView?id=service.omnichannel_psr_lifecycle.htm) # Configure Rep Status Syncing for Messaging Rep (agent) status syncing, also known as presence status syncing, automatically synchronizes your contact centers with your reps’ Omni-Channel presence statuses to help indicate their availability to receive work. Two-way status syncing allows Salesforce to notify the partners of the status change that happens on the Omni-Channel side, and allows partner contact centers to notify Salesforce about the status change on their side. Two-way status syncing is already supported for voice channels. Bring Your Own Channel for CCaaS adds two-way status syncing support for Messaging. To configure two-way status syncing for Bring Your Own Channel for CCaaS, use the Service Connector API. When the connector loads, Salesforce calls the `init()` API with the argument `callCenterConfig`. The argument contains a JSON field called `userPresenceStatuses`, which you can parse into a map of `statusId: statusInfo`. When the rep status changes through the Omni-Channel widget on the Salesforce side, the connector calls the `setAgentStatus()` API with the status information. Implement the `setAgentStatus()` API to receive the updated status and change the status on the contact center side. When the rep status changes on the contact center side, implement the `publishEvent()` API with the `SET_AGENT_STATUS` event to automatically update the rep statuses on the Salesforce side. **See Also** - _Service Connector API Reference_: [init](/docs/service/service-connector-api/references/connector-api/service-connector-interface-init.html) - _Service Connector API Reference_: [setAgentStatus](/docs/service/service-connector-api/references/connector-api/service-connector-interface-setagentstatus.html) - _Service Connector API Reference_: [publishEvent](/docs/service/service-connector-api/references/connector-api/service-connector-base-publishevent.html) - _Salesforce Voice with Partner Telephony Developer Guide_: [Two-Way Agent Status Syncing](https://developer.salesforce.com/docs/atlas.en-us.voice_pt_developer_guide.meta/voice_pt_developer_guide/voice_pt_agent_status_syncing.htm) - _Salesforce Help_: [Sync Rep Presence Statuses Automatically](https://help.salesforce.com/s/articleView?id=service.voice_pt_setup_sync_agent_presence_statuses.htm) - _Salesforce Help_: [Understand the Details of the Routing Lifecycle](https://help.salesforce.com/s/articleView?id=service.omnichannel_psr_lifecycle.htm) # Configure Scheduling Policy to Enforce Operating Hours Use a scheduling policy to enforce one or more rules to find the best service resources for appointments. Apply a scheduling policy to your scheduling process to ensure that an appointment meets the criteria that the policy rules define. Create a scheduling policy for the dummy resource who has set up operating hours. Ensure that the resource is present only when creating an appointment. For more information, see [Enfore Scheduling Policies in Salesforce Scheduler](https://help.salesforce.com/s/articleView?id=platform.ls_scheduling_policies_overview.htm&type=5). 1. From Setup, in the Quick Find box, enter `Scheduling Policies`, and then select **Scheduling Policies**. 2. Click **New**. 3. Enter a name for your custom scheduling policy, and then deselect the **Use service territory member's shift** rule. This rule considers service territory member’s operating hours when determining the availability of service resources for appointments. 4. Save your changes. # Configure Scheduling Policy to Enforce Shifts Use a scheduling policy to enforce one or more rules to find the best service resources for appointments. Apply a scheduling policy to your scheduling process to ensure that an appointment meets the criteria that the policy rules define. Create a scheduling policy for the actual resources who have created working hours by using shifts. Ensure that the resources are present only during appointment reassignment. For more information, see [Enfore Scheduling Policies in Salesforce Scheduler](https://help.salesforce.com/s/articleView?id=platform.ls_scheduling_policies_overview.htm&type=5). 1. From Setup, in the Quick Find box, enter `Scheduling Policies`, and then select **Scheduling Policies**. 2. Click **New**. 3. Enter a name for your custom scheduling policy, and then select the **Use service territory member's shift** rule. This rule considers service territory members' shifts when determining the availability of service resources for appointments. 4. Save your changes. # Configure the AgentWork Connector API Bring Your Own Channel for CCaaS introduces the AgentWork Connector API class object and the onAgentWork Connector API method. AgentWork is a Salesforce object that automatically gets created when the routing system finds a potential rep to handle the work item. It contains information about the work item and the routing status. AgentWork goes through different routing lifecycle stages in Salesforce. Whenever a work item routing status changes, such as when the work item is accepted, assigned, declined, closed, or completed, the partner system is notified of these changes via the onAgentWorkEvent(agentWork) method. AgentWork displays information about the agentWork object that’s passed in to the onAgentWork API. ```json onAgentWorkEvent(agentWork) { return this.executeAsync("onAgentWorkEvent", agentWork); ``` See the [vendor-sdk.js](https://github.com/salesforce-misc/byo-demo-connector/blob/main/src/main/vendor-sdk.js) file in GitHub for a sample implementation of the AgentWork Connector API. The agentWork payload contains the following values: - `workEvent` - The type of AgentWork event. Possible event type values from WORK_EVENT include: ACCEPTED, ASSIGNED, DECLINED, CLOSED, COMPLETED, PAUSED, and UNPAUSED. - `workId` - The unique ID of the AgentWork record. - `workItemId` - The unique ID of the associated `MessagingSession` record. The AgentWork Connector API is only available for Bring Your Own Channel for CCaaS. To configure voice-related agent work events, use the Connector API to configure the Voice Connector API methods, such as acceptCall, declineCall, decline. **See Also** - _Service Connector API Reference_: [AgentWork](/docs/service/service-connector-api/references/connector-api/service-connector-objects-agentwork.html) # Configure Your Deployment to Ingest Third-Party Bot Conversation History The [Conversation History API](https://developer.salesforce.com/docs/service/interaction-service-api/references/interaction-service-reference/api-conversationHistory.html) ingests the conversation history between an end user and a third-party bot into the service console. This is useful when you have third-party bots helping customers with their queries before escalating the conversation to a service rep. For sessions that get escalated, service reps can see the conversation history and resolve queries faster. For sessions that are resolved by the bots and aren’t escalated, this information can be used for data collection and usage metrics purposes. You can use the same API to ingest attachment history by uploading the attachment to [Salesforce Files](https://help.salesforce.com/s/articleView?id=experience.collab_salesforce_files_parent.htm) and generating a shareable link. This API is available in version 63.0 and later. **See Also** - _Interaction Service API_: [Send Historical Conversation Entries](https://developer.salesforce.com/docs/service/interaction-service-api/references/interaction-service-reference/api-conversationHistory.html) - _GitHub_: [Interaction Service APIs](https://github.com/salesforce-misc/interaction-service-apis) # Configured By Represents the Configured By relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. ## Relationship Type Definition ||| |-|-| |Developer Name|`SD_CoBy2`| |Description|Defines the Configured By relationship between configuration items in the CMDB.| |Master Label|Configured By| |Direct Relationship|Configured By| |Inverse Relationship|Configured On| |Line Stroke|Solid| |Color Code|`#C9AD53`| # Configured On Represents the Configured On relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. ## Relationship Type Definition ||| |-|-| |Developer Name|`SD_CoOn`| |Description|Defines the Configured On relationship between configuration items in the CMDB.| |Master Label|Configured On| |Direct Relationship|Configured On| |Inverse Relationship|Configured By| |Line Stroke|Solid| |Color Code|`#35C9A6`| # Connect APIs Use Salesforce Scheduler Connect REST APIs to get service territories, get consolidated availability of each service resource within specified territories, and create service appointments. Salesforce Scheduler is built on the Salesforce platform (also known as Lighting Experience). The Salesforce platform specific API rate limits apply to the Salesforce Scheduler Connect APIs. The rate limit for the Connect APIs is per user, per application, per hour limit. Salesforce Scheduler Connect APIs are better equipped to handle a large number of requests and can support the rate limit of 10000 per user, per application, per hour. For more information on Lightning platform common limits and allocations, see [Connect REST API Limits](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/intro_rate_limits.htm). The following is a list of Connect APIs available within the Salesforce Scheduler platform. ## Resources Use Salesforce Scheduler Connect REST APIs to get service territories and create service appointments. - [Available Territory Slots](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_resources_available_territory_slots.htm) - [Engagement Channel Types](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_resources_engagement_channel_types.htm) - [Estimated Wait Time](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_resources_scheduling_estimated_wait_time.htm) - [Group Appointments (POST)](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_resources_group_appointments_post.htm) - [Service Appointments](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_resources_service_appointments.htm) - [Service Territories](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_resources_service_territories.htm) - [Waitlists](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_resources_scheduling_waitlists.htm) - [Waitlist Check Ins](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_resources_scheduling_waitlist_checkin.htm) - [Waitlist Participants](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_resources_scheduling_waitlist_participants.htm) ## Connect REST API Request Bodies To perform a POST, PATCH, or PUT request, pass query parameters or create a request body formatted in either XML or JSON. - [Available Territory Slots Input](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_requests_available_territory_slots_input.htm) - [Assigned Resource Input](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_requests_assigned_resource_input.htm) - [Estimated Wait Time Input](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_requests_estimated_wait_time_input.htm) - [Extended Fields Input](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_requests_extended_fields_input.htm) - [Group Appointments Input](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_requests_get_group_appointments_input.htm) - [Lead Input](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_requests_lead_input.htm) - [Service Appointments Create Input](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_requests_service_appointments_input.htm) - [Service Appointment Update Input](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_requests_update_service_appointment_input.htm) - [Service Appointment Input](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_requests_service_appointment_input.htm) - [Skill Requirement Input](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_requests_skill_requirement_input.htm) - [Waitlist Check In Input](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_requests_waitlist_check_in_input.htm) - [Waitlist Participants Input](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_requests_update_waitlist_participant_input.htm) - [Work Type Input](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_requests_work_type_input.htm) ## Connect REST API Response Bodies Successful execution of a request to a Salesforce Scheduler Connect REST API resource can return a response body either in JSON or XML format. - [Available Territory Slots](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_responses_available_territory_slots.htm) - [Available Territory Slots List](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_responses_available_territory_slots_list.htm) - [Available Territory Slots Output](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_responses_available_territory_slots_output.htm) - [Estimated Wait Time](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_responses_estimated_wait_time_output.htm) - [Engagement Channel Type List Result](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_responses_get_engagement_channel_type_list_resul.htm) - [Engagement Channel Type Result](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_responses_get_engagement_channel_type_resul.htm) - [Engagement Channel Type Output](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_responses_get_engagement_channel_type_output.htm) - [Extended Fields](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_responses_scheduler_extended_fields_output.htm) - [Group Appointments](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_responses_get_group_appointments_output.htm) - [Group Appointments List Result](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_responses_get_group_appointments_list_resul.htm) - [Group Appointment Result](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_responses_group_appointment_resul.htm) - [Service Appointment Output](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_responses_service_appointment_output.htm) - [Service Appointment Result](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_responses_service_appointment_result.htm) - [Service Territories Output](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_responses_service_territories_output.htm) - [Service Territories List Result](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_responses_service_territories_list_result.htm) - [Service Territories Result](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_responses_service_territories_result.htm) - [Waitlist Analytics](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_responses_waitlist_analytics.htm) - [Waitlist Check In](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_responses_waitlist_check_in_output.htm) - [Waitlist Check In Result](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_responses_waitlist_check_in_result.htm) - [Waitlist Details](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_responses_waitlist_details.htm) - [Waitlist List Result](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_responses_waitlist_list_result.htm) - [Waitlist Participant Details](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_responses_waitlist_participant_participant.htm) - [Waitlist Participant Result](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_responses_waitlist_participant_result.htm) - [Waitlist Participants Update](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_responses_waitlist_participant_update_output.htm) - [Waitlist Result](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_responses_waitlist_output.htm) - [Waitlist Service Resource](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_responses_waitlist_service_resource.htm) - [Waitlist Work Type Group](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_responses_waitlist_work_type_group.htm) - [Work Type Group Estimated Wait Time Info](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_responses_work_type_group_est_wait_time_info.htm) **See Also** - [Connect REST API Developer Guide: Connect REST API Introduction](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/intro_what_is_chatter_connect.htm) - [Salesforce Developer Limits and Allocations Quick Reference: About This Quick Reference](https://developer.salesforce.com/docs/atlas.en-us.salesforce_app_limits_cheatsheet.meta/salesforce_app_limits_cheatsheet/salesforce_app_limits_overview.htm) # Connect REST API Request Bodies To perform a POST, PATCH, or PUT request, pass query parameters or create a request body formatted in either XML or JSON. This chapter lists the request bodies. The query parameters are listed with each resource. To create a JSON request body, specify the properties of the request body in JSON format. This is an example of a Comment request body. ```nolang { "body" : "Let's look for a new solution." } ``` If a request body is top-level, it has a root XML tag listed. To create an XML request body, nest the properties as XML tags inside the root XML tag. This is the same Connect request body in XML format: ```nolang Let's look for a new solution. ``` - **[Survey Description Input](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/connect-requests-survey-description-input.md)** Input representation of the details of the survey recipient and their engagement context, and the language, related records, and invitation settings of the survey. - **[Survey Email Input](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/connect-requests-survey-email-input.md)** Survey email. - **[Survey Integer Question Response Input](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/connect-requests-survey-integer-question-response-input.md)** Input representation of the details of the response to an NPS question on the survey page. - **[Survey Invitation Settings Input](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/connect-requests-survey-invitation-settings-input.md)** Input representation of the settings of the survey invitation that define the participants who can respond to the survey, its expiration, and other related configurations. - **[Survey Page Response Input](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/connect-requests-survey-page-response-input.md)** Input representation of the details of the response to a survey page. - **[Survey Question Response Input](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/connect-requests-survey-question-response-input.md)** Input representation of the details of the response to a question on the survey page. - **[Survey Recipient Engagement Context Input](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/connect-requests-survey-recipient-engagement-context-input.md)** Context based on which the survey invitation is sent to a participant. - **[Survey Recipient Survey Subjects Input](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/connect-requests-survey-recipient-survey-subjects-input.md)** Records associated with the survey invitation. - **[Survey Response Input](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/connect-requests-survey-response-input.md)** Input representation of the details of a survey response. - **[Survey Selection Question Choice Input](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/connect-requests-survey-selection-question-choice-input.md)** The details of a boolean, rating, single selection, or a multiple selection question’s choice on the survey page. - **[Survey Selection Question Response Input](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/connect-requests-survey-selection-question-response-input.md)** Input representation of the details of the response to a boolean, rating, single selection, or a multiple selection question on the survey page. - **[Survey Text Question Response Input](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/connect-requests-survey-text-question-response-input.md)** The details of the response to a short-text or a long-text question on the survey page. # Connect REST API Response Bodies The successful execution of a request to a Connect REST API resource can return a response body in either JSON or XML format. A request to a Connect REST API resource always returns an HTTP response code, whether the request was successful or not. - **[Survey Description Output](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/connect-responses-survey-description-output.md)** Output representation of the response to the Start Survey request. - **[Survey Detail Output](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/connect-responses-survey-detail-output.md)** Output representation of the details of the survey. - **[Survey Email](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/connect-responses-survey-email.md)** Survey invitation email response. - **[Survey NPS Question Output](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/connect-responses-survey-nps-question-output.md)** Output representation of the details of the NPS question on the survey page. - **[Survey Question Output](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/connect-responses-survey-question-output.md)** Output representation of the details of the question on the survey page. - **[Survey Question Page Output](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/connect-responses-survey-question-page-output.md)** The details of the question page in the survey. - **[Survey Response Output](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/connect-responses-survey-response-output.md)** Output representation of the response to the Submit Survey request. The response includes the status of the survey response API and the Thank You page details in the survey. - **[Survey Selection Question Choice Output](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/connect-responses-survey-selection-question-choice-output.md)** The details of a boolean, rating, single selection, or a multiple selection question’s choice on the survey page. - **[Survey Selection Question Output](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/connect-responses-survey-selection-question-output.md)** Output representation of the details of the boolean, rating, single-selection, or multiple-selection question on the survey page. - **[Survey Short-Text Question Output](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/connect-responses-survey-short-text-question-output.md)** Output representation of the details of the short-text question on the survey page. - **[Survey Text Question Output](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/connect-responses-survey-text-question-output.md)** Output representation of the details of the text question on the survey page. - **[Survey Thank You Page Output](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/connect-responses-survey-thank-you-page-output.md)** Output representation of the details of the Thank You page in the survey. - **[Survey URL Buttons Output](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/connect-responses-survey-u-r-l-buttons-output.md)** Output representation of the details of the URL buttons on the Thank You page in the survey. # Connect to Open CTI The first portion of any JavaScript code that uses the Open CTI must make the toolkit available to the JavaScript code. The syntax for this is different depending on whether you are embedding JavaScript in a Visualforce page or a page developed using any web technologies and served from a third-party domain. **tip:** The version of Open CTI is in the URL. ## For Visualforce Pages For Visualforce pages or any source other than a custom `onclick` JavaScript button, specify a ` ...
``` - In Lightning Experience: - : ```visualforce ... ``` For Visualforce, we recommend using a relative path to include `interaction.js` or `opencti_min.js`. ## For a Third-Party Domain For third-party domains, specify an absolute URL to `interaction.js` or `opencti_min.js` to use the toolkit. - In Salesforce Classic: - : ```html ``` - In Lightning Experience: - : ```html ``` # Connect to the Toolkit The first portion of any JavaScript code that uses the Salesforce Console Integration Toolkit must make the toolkit available to the JavaScript code. The syntax for this is different depending on whether you are embedding JavaScript in a Visualforce page or in a third-party domain. **note:** Due to third-party cookie restrictions in modern web browsers, Visualforce pages can’t load in Salesforce Classic console apps when third-party cookies are disabled. See [Visualforce Limitations in Salesforce Classic When Third-Party Cookies are Blocked](https://help.salesforce.com/s/articleView?id=003786014&type=1). The version of the Salesforce Console Integration Toolkit is in the URL. - For Visualforce pages or any source other than a custom `onclick` JavaScript button, specify a ` ... ``` For Visualforce, a relative path is sufficient to include `integration.js`, and is recommended. - For a third-party domain, insert this ` ``` Where `MY_DOMAIN_NAME` and `PACKAGE_NAME` are variables. **See Also** - [*Salesforce Help*: My Domain URL Formats](https://help.salesforce.com/s/articleView?language=en_US&id=sf.domain_name_app_url_changes.htm) # ConnectApi Namespace The `ConnectApi` namespace (also called Connect in Apex) provides classes for creating surveys. The following are the classes and the interface in the `ConnectApi` namespace. - **[Surveys Class](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/apex-connectapi-survey-static-methods.md#surveys-class)** Send survey invitations by email. - **[ConnectApi Input Classes](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/input-classes/apex-connectapi-input.md)** Some `ConnectApi` methods take arguments that are instances of `ConnectApi` input classes. - **[ConnectApi Output Classes](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/output-classes/apex-connectapi-output.md)** Most `ConnectApi` methods return instances of `ConnectApi` output classes. # ConnectApi Namespace The `ConnectApi` namespace (also called Connect in Apex) provides classes creating and updating service appointments. The following are the classes and the interface in the `ConnectApi` namespace. ## Class - [LightningScheduler Class](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_ConnectAPI_LightningScheduler_static_methods.htm) — Create and update service appointments. ## Input Classes - [ConnectApi.CreateServiceAppointmentInput](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_input_create_service_appointment.htm) — Contains information to create a service appointment. - [ConnectApi.ExtendedFieldInput](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_input_extended_field.htm) — Contains information about the extended field. - [ConnectApi.LeadInput](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_input_lead.htm) — Contains information about a lead or guest user. - [ConnectApi.ServiceAppointmentInput](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_input_service_appointment.htm) — Contains information about the service appointment. ## Output Classes - [ConnectApi.ServiceAppointmentOutput](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_output_service_appointment_output.htm) — Output of the create service appointment request. - [ConnectApi.ServiceAppointmentResult](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_output_service_appointment_result.htm) — Contains result of the service appointment. # Connected By Represents the Connected By relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. ## Relationship Type Definition ||| |-|-| |Developer Name|`SD_CoBy`| |Description|Defines the Connected By relationship between configuration items in the CMDB.| |Master Label|Connected By| |Direct Relationship|Connected By| |Inverse Relationship|Connected To| |Line Stroke|Solid| |Color Code|`#006666`| # Connected To Represents the Connected To relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. ## Relationship Type Definition ||| |-|-| |Developer Name|`SD_CoTo`| |Description|Defines the Connected To relationship between configuration items in the CMDB.| |Master Label|Connected To| |Direct Relationship|Connected To| |Inverse Relationship|Connected By| |Line Stroke|Solid| |Color Code|`#0099CC`| # Considerations for Multi-Resource Scheduling In multi-resource scheduling, a primary service resource anchors the appointment and must be marked required. Primary service resources are the only required resources whose skills are matched to the skill requirements for an appointment. Other required service resources are matched to appointments based on their availability and the primary resource’s service territory. Here’s how matching is done for different types of service resources when multi-resource scheduling is enabled. |Matches On|Primary Service Resource|Required Service Resource| |----------|------------------------|-------------------------| |Skill Requirements|Yes|No| |Service Territory|Yes|Yes| |Availability in Time Slots|Yes|Yes| # Console API Method Parity—What’s Different Between Lightning Experience and Salesforce Classic? The Lightning Console JavaScript API provides methods similar to those methods in the Salesforce Console Integration Toolkit. This table shows which Salesforce Console Integration Toolkit (Salesforce Classic) methods map to Lightning Console JavaScript API (Lightning Experience) methods and events. Not every Salesforce Console Integration Toolkit has a Lightning analog. You can replicate some Classic methods using Lightning events, combining Lightning Experience methods, or using iterative and conditional logic with methods and events. **important:** Only Salesforce Console Integration Toolkit methods with a Lightning Console JavaScript API or workaround appear in this table. Methods without alternatives or workarounds are not listed. For Lightning Experience, you can build your apps using Lightning Web Components (LWC) and Aura components. Both can interoperate on the same page. ## Methods for Primary Tabs and Subtabs Work with workspace tabs and subtabs using these methods. |Salesforce Console Integration Toolkit (Salesforce Classic)|Lightning Console JavaScript API Method (Aura Components for Lightning Experience)|LWC Support| |-----------------------------------------------------------|----------------------------------------------------------------------------------|-----------| |[closeTab()](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-closetab.md)|[closeTab()](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/workspaceapi/sforce-api-console-lightning-closetab.md#closetab-for-lightning-experience)|Same as Aura Components.| |[focusPrimaryTabById()](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-focusprimarytabbyid.md)|[focusTab()](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/workspaceapi/sforce-api-console-lightning-focustab.md#focustab-for-lightning-experience)|Same as Aura Components.| |[focusSubtabById()](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-focussubtabbyid.md)|[focusTab()](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/workspaceapi/sforce-api-console-lightning-focustab.md#focustab-for-lightning-experience)|Same as Aura Components.| |[getEnclosingPrimaryTabId()](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-getenclosingprimarytabid.md)|Use the Lightning method `getEnclosingTabId()`. If the calling component is within a subtab, then the subtab ID is returned. If the calling component is within a workspace tab, then the workspace ID is returned.|Use the [`EnclosingTabId`](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/workspaceapi/sforce-api-console-lwc-enclosingtabid.md) wire adapter.| |[getEnclosingPrimaryTabObjectId()](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-getenclosingprimarytabobjectid.md)|Use `getEnclosingTabId()` to get the tab ID. Then, use the tab ID to call getTabInfo(tabId), which includes the object ID in the response payload (if applicable).|Use the [`EnclosingTabId`](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/workspaceapi/sforce-api-console-lwc-enclosingtabid.md) wire adapter.| |[getEnclosingTabId()](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-getenclosingtabid.md)|Use the Lightning method `getEnclosingTabId()`. If the calling component is within a subtab, then the subtab ID is returned. If the calling component is within a workspace tab, then the workspace ID is returned.|Use the [`EnclosingTabId`](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/workspaceapi/sforce-api-console-lwc-enclosingtabid.md) wire adapter.| |[getFocusedPrimaryTabId()](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-getfocusedprimarytabid.md)|[getFocusedTabInfo()](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/workspaceapi/sforce-api-console-lightning-getfocusedtabinfo.md)|Same as Aura Components.| |[getFocusedPrimaryTabObjectId()](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-getfocusedprimarytabobjectid.md)|[getFocusedTabInfo()](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/workspaceapi/sforce-api-console-lightning-getfocusedtabinfo.md)|Same as Aura Components.| |[getFocusedSubtabId()](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-getfocusedsubtabid.md)|[getFocusedTabInfo()](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/workspaceapi/sforce-api-console-lightning-getfocusedtabinfo.md)|Same as Aura Components.| |[getPageInfo()](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-getpageinfo.md)|[getTabInfo()](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/workspaceapi/sforce-api-console-lightning-gettabinfo.md)|Same as Aura Components.| |[getPrimaryTabIds()](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-getprimarytabids.md)|Not supported. **Workaround:** Call `getAllTabInfo()`.|Same as Aura Components.| |[getSubtabIds()](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-getsubtabids.md)|Not supported. **Workaround:** Call [`getAllTabInfo()`](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/workspaceapi/sforce-api-console-lightning-getalltabinfo.md) to get a list of all workspace tab objects. Iterate through each workspace tab object, collecting subtab IDs where applicable|Same as Aura Components.| |[getTabLink()](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-gettablink.md)|[getTabURL()](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/workspaceapi/sforce-api-console-lightning-gettaburl.md)|Use [getTabInfo()](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/workspaceapi/sforce-api-console-lightning-gettabinfo.md).| |[onEnclosingTabRefresh()](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-onenclosingtabrefresh.md)|Use [lightning:tabRefreshed](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/events/sforce-api-console-events-tabrefreshed.md) with [`getEnclosingTabId()`](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/workspaceapi/sforce-api-console-lightning-getenclosingtabid.md#getenclosingtabid-for-lightning-experience).|Use the `lightning__tabRefreshed` Lightning message channel.| |[onFocusedPrimaryTab()](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-onfocusedprimarytab.md)|[lightning:tabFocused](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/events/sforce-api-console-events-tabfocused.md)|Use the `lightning__tabFocused` Lightning message channel.| |[onFocusedSubtab()](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-onfocusedsubtab.md)|[lightning:tabFocused](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/events/sforce-api-console-events-tabfocused.md)|Use the `lightning__tabFocused` Lightning message channel.| |[onTabSave()](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-ontabsave.md)|Not supported.|Not supported.| |[openConsoleUrl()](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-openconsoleurl.md)|[openConsoleUrl()](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/workspaceapi/sforce-api-console-lightning-openconsoleurl.md)|Not supported.| |[openPrimaryTab()](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-openprimarytab.md)|[openTab()](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/workspaceapi/sforce-api-console-lightning-opentab.md)|Same as Aura Components.| |[openSubtab()](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-opensubtab.md)|[openSubtab()](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/workspaceapi/sforce-api-console-lightning-opensubtab.md)|Same as Aura Components.| |[refreshPrimaryTabById()](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-refreshprimarytabbyid.md)|Use [refreshTab()](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/workspaceapi/sforce-api-console-lightning-refreshtab.md) and specify a workspace tab ID. The `activate` argument isn’t supported in the Lightning API. Use `refreshTab()` with [focusTab().](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/workspaceapi/sforce-api-console-lightning-focustab.md) instead.|Same as Aura Components.| |[refreshSubtabById()](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-refreshsubtabbyid.md)|Use [refreshTab()](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/workspaceapi/sforce-api-console-lightning-refreshtab.md) and specify a subtab ID. The `activate` argument isn’t supported in the Lightning API. Use `refreshTab()` with [focusTab().](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/workspaceapi/sforce-api-console-lightning-focustab.md) instead.|Same as Aura Components.| |[setTabIcon()](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-settabicon.md)|[setTabIcon()](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/workspaceapi/sforce-api-console-lightning-settabicon.md)|Same as Aura Components.| |[setTabTitle()](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-settabtitle.md)|[setTabLabel()](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/workspaceapi/sforce-api-console-lightning-settablabel.md)|Same as Aura Components.| |[setTabUnsavedChanges()](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/tabs/sforce-api-console-settabdirty.md)|Use the [lightning:unsavedChanges](https://developer.salesforce.com/docs/component-library/bundle/lightning:unsavedChanges/documentation) component.|Not supported.| ## Methods for Navigation Tabs Work with items in the navigation menu using these methods. |Salesforce Console Integration Toolkit (Salesforce Classic)|Lightning Console JavaScript API Method (Aura Components for Lightning Experience)|LWC Support| |-----------------------------------------------------------|----------------------------------------------------------------------------------|-----------| |[focusNavigationTab()](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/nav-tabs/sforce-api-console-focusnavigatortab.md)|[focusNavigationItem()](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/navigationitemapi/sforce-api-console-lightning-focusnavigationitem.md)|Same as Aura Components.| |[getNavigationTabs()](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/nav-tabs/sforce-api-console-getnavigatortabs.md)|[getNavigationItems()](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/navigationitemapi/sforce-api-console-lightning-getnavigationitems.md)|Same as Aura Components.| |[getSelectedNavigationTab()](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/nav-tabs/sforce-api-console-getselectednavigatortab.md)|[getSelectedNavigationItem()](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/navigationitemapi/sforce-api-console-lightning-getselectednavigationitem.md)|Same as Aura Components.| |[refreshNavigationTab()](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/nav-tabs/sforce-api-console-refreshnavigatortab.md)|[refreshNavigationItem()](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/navigationitemapi/sforce-api-console-lightning-refreshnavigationitem.md)|Same as Aura Components.| |[setSelectedNavigationTab()](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/nav-tabs/sforce-api-console-setselectednavigatortab.md)|[setSelectedNavigationItem()](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/navigationitemapi/sforce-api-console-lightning-setselectednavigationitem.md)|Same as Aura Components.| ## Methods for Application-Level Custom Console Components Customize the footer, sidebars, highlights panels, and interaction logs of a console app using these methods. |Salesforce Console Integration Toolkit (Salesforce Classic)|Lightning Console JavaScript API Method (Aura Components for Lightning Experience)|LWC Support| |-----------------------------------------------------------|----------------------------------------------------------------------------------|-----------| |[blinkCustomConsoleComponentButtonText()](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/app-components/sforce-api-console-blinkcustomconsolecomponentbuttontext.md)|Not supported. **Workaround:** Use [setUtilityLabel](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/utilitybarapi/sforce-api-console-lightning-setutilitylabel.md).|[updateUtility()](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/utilitybarapi/sforce-api-console-lwc-updateutility.md)| |[isCustomConsoleComponentWindowHidden()](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/app-components/sforce-api-console-iscustomconsolecomponentwindowhidden.md)|[getUtilityInfo()](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/utilitybarapi/sforce-api-console-lightning-getutilityinfo.md)|[getInfo()](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/utilitybarapi/sforce-api-console-lwc-getinfo.md)| |[onCustomConsoleComponentButtonClicked()](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/app-components/sforce-api-console-oncustomconsolecomponentbuttonclicked.md)|[onUtilityClick()](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/utilitybarapi/sforce-api-console-lightning-onutilityclick.md)|Same as Aura Components.| |[setCustomConsoleComponentButtonIconUrl()](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/app-components/sforce-api-console-setcustomconsolecomponentbuttoniconurl.md)|[setUtilityIcon()](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/utilitybarapi/sforce-api-console-lightning-setutilityicon.md) [setPanelHeaderIcon()](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/utilitybarapi/sforce-api-console-lightning-setpanelheadericon.md)|[updateUtility()](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/utilitybarapi/sforce-api-console-lwc-updateutility.md)| |[setCustomConsoleComponentButtonStyle()](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/app-components/sforce-api-console-setcustomconsolecomponentbuttonstyle.md)|[setUtilityHighlighted](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/utilitybarapi/sforce-api-console-lightning-setutilityhighlighted.md)|[updateUtility()](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/utilitybarapi/sforce-api-console-lwc-updateutility.md)| |[setCustomConsoleComponentButtonText()](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/app-components/sforce-api-console-setcustomconsolecomponentbuttontext.md)|[setUtilityLabel](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/utilitybarapi/sforce-api-console-lightning-setutilitylabel.md)|[updateUtility()](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/utilitybarapi/sforce-api-console-lwc-updateutility.md)| |[setCustomConsoleComponentHeight()](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/app-components/sforce-api-console-setcustomconsolecomponentheight.md)|[setPanelHeight()](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/utilitybarapi/sforce-api-console-lightning-setpanelheight.md)|[updatePanel()](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/utilitybarapi/sforce-api-console-lwc-updatepanel.md)| |[setCustomConsoleComponentVisible()](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/app-components/sforce-api-console-setcustomconsolecomponentvisible.md)|[openUtility()](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/utilitybarapi/sforce-api-console-lightning-openutility.md) [minimizeUtility()](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/utilitybarapi/sforce-api-console-lightning-minimizeitem.md)|[minimize()](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/utilitybarapi/sforce-api-console-lwc-minimize.md)| |[setCustomConsoleComponentWidth()](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/app-components/sforce-api-console-setcustomconsolecomponentwidth.md)|[setPanelWidth()](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/utilitybarapi/sforce-api-console-lightning-setpanelwidth.md)|[updatePanel()](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/utilitybarapi/sforce-api-console-lwc-updatepanel.md)| ## Methods for Live Agent Customize how customers chat with your agents on your web page using these methods. **note:** LWC doesn’t currently support working with Live Agent. |Salesforce Console Integration Toolkit (Salesforce Classic)|Lightning Console JavaScript API Method (Lightning Experience)| |-----------------------------------------------------------|--------------------------------------------------------------| |[endChat()](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/chat/sforce-api-console-endchat.md)|[endChat()](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/conversationtoolkitapi/sforce-api-console-lightning-endchat.md)| |[getChatLog()](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/chat/sforce-api-console-getchatlog.md)|[getChatLog()](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/conversationtoolkitapi/sforce-api-console-lightning-getchatlog.md)| |[sendCustomEvent()](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/chat/sforce-api-console-sendcustomevent.md)|[sendCustomEvent()](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/conversationtoolkitapi/sforce-api-console-lightning-sendcustomevent.md#sendcustomevent-for-lightning-experience)| |[sendMessage()](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/chat/sforce-api-console-sendmessage.md)|[sendMessage()](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/conversationtoolkitapi/sforce-api-console-lightning-sendmessage.md#sendmessage-for-lightning-experience)| ## Methods for Omni-Channel Route any type of incoming work item to available agents using these methods. **note:** LWC doesn’t currently support working with Omni-Channel. |Salesforce Console Integration Toolkit (Salesforce Classic)|Lightning Console JavaScript API Method (Lightning Experience)| |-----------------------------------------------------------|--------------------------------------------------------------| |[acceptAgentWork()](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/omnichannel/sforce-api-console-acceptagentwork.md#acceptagentwork)|[acceptAgentWork()](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/omnitoolkitapi/sforce-api-console-lightning-acceptagentwork.md#acceptagentwork-for-lightning-experience)| |[closeAgentWork()](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/omnichannel/sforce-api-console-closeagentwork.md#closeagentwork)|[closeAgentWork()](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/omnitoolkitapi/sforce-api-console-lightning-closeagentwork.md#closeagentwork-for-lightning-experience)| |[declineAgentWork()](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/omnichannel/sforce-api-console-declineagentwork.md#declineagentwork)|[declineAgentWork()](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/omnitoolkitapi/sforce-api-console-lightning-declineagentwork.md#declineagentwork-for-lightning-experience)| |[getAgentWorkload()](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/omnichannel/sforce-api-console-getagentworkload.md#getagentworkload)|[getAgentWorkload()](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/omnitoolkitapi/sforce-api-console-lightning-getagentworkload.md#getagentworkload-for-lightning-experience)| |[getAgentWorks()](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/omnichannel/sforce-api-console-getagentworks.md#getagentworks)|[getAgentWorks()](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/omnitoolkitapi/sforce-api-console-lightning-getagentworks.md#getagentworks-for-lightning-experience)| |[getServicePresenceStatusChannels()](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/omnichannel/sforce-api-console-getservicepresencestatuschannels.md#getservicepresencestatuschannels)|[getServicePresenceStatusChannels()](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/omnitoolkitapi/sforce-api-console-lightning-getservicepresencestatuschannels.md#getservicepresencestatuschannels-for-lightning-experience)| |[getServicePresenceStatusId()](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/omnichannel/sforce-api-console-getservicepresencestatusid.md#getservicepresencestatusid)|[getServicePresenceStatusId](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/omnitoolkitapi/sforce-api-console-lightning-getservicepresencestatusid.md#getservicepresencestatusid-for-lightning-experience)| |[login()](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/omnichannel/sforce-api-console-login.md#login)|[login()](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/omnitoolkitapi/sforce-api-console-lightning-login.md#login-for-lightning-experience)| |[logout()](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/omnichannel/sforce-api-console-logout.md#logout)|[logout()](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/omnitoolkitapi/sforce-api-console-lightning-logout.md#logout-for-lightning-experience)| |[sertServicePresenceStatus()](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/omnichannel/sforce-api-console-setservicepresencestatus.md#setservicepresencestatus)|[setServicePresenceStatus()](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/omnitoolkitapi/sforce-api-console-lightning-setservicepresencestatus.md#setservicepresencestatus-for-lightning-experience)| ## Methods for Computer-Telephony Integration (CTI) Customize your CTI system using these methods. **note:** LWC doesn’t currently support working with CTI. |Salesforce Console Integration Toolkit (Salesforce Classic)|Lightning Console JavaScript API Method (Lightning Experience)| |-----------------------------------------------------------|--------------------------------------------------------------| |[onCallBegin()](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/cti/sforce-api-console-oncallbegin.md)|Not supported for both Aura and LWC.| |[onCallEnd()](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/cti/sforce-api-console-oncallend.md)|Not supported for both Aura and LWC.| |[onCallLogSaved()](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/methods/cti/sforce-api-console-oncalllogsaved.md)|Not supported for both Aura and LWC..| # Console API Typographical Conventions Typographical conventions are used in our code examples. Learn what Courier font, italics, and brackets mean. | Convention | Description | | ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `Courier font` | In descriptions of syntax, a monospace font indicates items that you should type as shown, except for brackets. For example: `Public class HelloWorld` | | _Italics_ | In descriptions of syntax, italics represent variables. You supply the actual value. In the following example, three values must be supplied: _datatype_ _variable_name_ [ = *value*]; If the syntax is bold and italic, the text represents a code element that needs a value supplied by you, such as a class name or variable value: `public static class YourClassHere { ... }` | | `Bold Courier font` | In code samples and syntax descriptions, a bold courier font emphasizes a portion of the code or syntax. | | \< > | In descriptions of syntax, less-than and greater-than symbols (\< >) are typed exactly as shown. | | { } | In descriptions of syntax, braces ({ }) are typed exactly as shown. | | [ ] | In descriptions of syntax, anything included in brackets is optional. In the following example, specifying `value` is optional. | | \| | In descriptions of syntax, the pipe sign means “or”. You can do one of the following (not all). In the following example, you can create a new unpopulated set in one of two ways, or you can populate the set. | # Console Switch Represents a Console Switch configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. ## Configuration Item Type Definition ||| |-|-| |Name|Console Switch| |Developer Name|`SD_CoSw`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Network Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-network-device.md)| |Rule Name|Default rule for all Azure SQL Servers| |Identifier(s)|Asset Name Subscription Id Resource Group| ## Attributes No associated attributes for this configuration item type. # Consumed By Represents the Consumed By relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. ## Relationship Type Definition ||| |-|-| |Developer Name|`SD_CoBy1`| |Description|Defines the Consumed By relationship between configuration items in the CMDB.| |Master Label|Consumed By| |Direct Relationship|Consumed By| |Inverse Relationship|Consumes| |Line Stroke|Solid| |Color Code|`#BBCCFF`| # Contained By Represents the Contained By relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. ## Relationship Type Definition ||| |-|-| |Developer Name|`SD_CoBy3`| |Description|Defines the Contained By relationship between configuration items in the CMDB.| |Master Label|Contained By| |Direct Relationship|Contained By| |Inverse Relationship|Contains| |Line Stroke|Solid| |Color Code|`#DC143C`| # Contains Represents the Contains relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. ## Relationship Type Definition ||| |-|-| |Developer Name|`SD_Conxx`| |Description|Defines the Contains relationship between configuration items in the CMDB.| |Master Label|Contains| |Direct Relationship|Contains| |Inverse Relationship|Contained By| |Line Stroke|Solid| |Color Code|`#666699`| # ContentEngine Represents a ContentEngine configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. ## Configuration Item Type Definition ||| |-|-| |Name|ContentEngine| |Developer Name|`SD_Conxx`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Network Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-network-device.md)| |Rule Name|Default rule for all Azure Virtual Machines| |Identifier(s)|Asset Name Subscription Id Resource Group| ## Attributes No associated attributes for this configuration item type. # Context Events in Enhanced Web Chat v2 **important:** This method of passing context events is only available in Enhanced Web Chat v2. For more information, see [Enhanced Chat](https://help.salesforce.com/s/articleView?id=ai.agent_enhanced_chat_channel.htm) in Salesforce Help. The optional utilAPI method enables you to pass information like the current page or a recent search to the agent. See the reference for [setSessionContext](/docs/service/messaging-web/references/m4w-reference/utilAPI.html#setsessioncontext). **note:** Context events aren't processed for the agent welcome message. The agent processes context events with each user prompt. To pass information that the agent can use in the welcome message, use pre-chat variables instead. See [Create a Custom Pre-Chat Form Using LWC](/docs/service/messaging-web/guides/create-custom-pre-chat-form.html). ## Set Context Variables The input parameter to `setSessionContext` is an array of context variables. Each context variable has a `name` and a typed `value`. The reserved variable `_AgentContext` holds page and search information under the `StructuredValue` type; custom context variables use their Agent Builder API name and can be any of the [supported types](#custom-context-variable-types). ```javascript // Basic example with current page context embeddedservice_bootstrap.utilAPI.setSessionContext([ { name: "_AgentContext", value: { valueType: "StructuredValue", value: { currentPage: "https://example.com/products/laptops", }, }, }, ]); // Complete example with search context and event handlers embeddedservice_bootstrap.utilAPI .setSessionContext([ { name: "_AgentContext", value: { valueType: "StructuredValue", value: { currentPage: "https://example.com/search-results", search: { result: "MacBook Pro 16-inch", filters: ["Brand: Apple", "Price: $2000-$3000", "Memory: 16GB"], facets: ["Laptops", "Computers", "Electronics"], }, }, }, }, ]) .then(() => { console.log("Successfully set context."); }) .catch((error) => { console.log("Error setting context: " + error); }); ``` **note:** Call `embeddedservice_bootstrap.utilAPI.setSessionContext` only after `onEmbeddedMessagingReady` fires; don't call it in `initEmbeddedMessaging`. ## Custom Context Variable Types In addition to the `_AgentContext` structured object, you can pass any custom context variable that you've defined in Agentforce Builder. ECv2 supports all eight Agentforce Builder variable types. Each type maps to a specific `valueType` on the wire, with the value stored under a type-specific key. | Agentforce Builder Type | `valueType` | Value Key | | :---------------------- | :------------------------------ | :---------------------------------------- | | String | `TextValue` | `textValue` | | Boolean | `BooleanValue` | `booleanValue` | | Number | `IntegerValue` or `DoubleValue` | `integerValue` or `doubleValue` | | Currency | `TextValue` | `textValue` (`" "`) | | Date | `DateValue` | `dateValue` (`YYYY-MM-DD`) | | Timestamp | `DateTimeValue` | `dateTimeValue` (ISO-8601) | | List | `ListValue` | `listValue` (array of typed values) | | Object | `StructuredValue` | `value` (nested object) | Each context variable's `name` must match its API name in Agentforce Builder, and **API write access** must be enabled for the variable. **warning:** Non-conforming context variable payloads can be silently dropped by the server. See [Handle Rejected Context Variables](#handle-rejected-context-variables) for how to detect drops and the two rejection modes. ### String ```javascript embeddedservice_bootstrap.utilAPI.setSessionContext([ { name: "OrderType", value: { valueType: "TextValue", textValue: "Shoes", }, }, ]); ``` ### Boolean Accepts the boolean literals `true` and `false`. ```javascript embeddedservice_bootstrap.utilAPI.setSessionContext([ { name: "IsVIP", value: { valueType: "BooleanValue", booleanValue: true, }, }, ]); ``` ### Number Use `IntegerValue` for whole numbers and `DoubleValue` for decimals. The numeric value must be a JSON number, not a string. ```javascript // Integer embeddedservice_bootstrap.utilAPI.setSessionContext([ { name: "OpenCases", value: { valueType: "IntegerValue", integerValue: 7, }, }, ]); // Double embeddedservice_bootstrap.utilAPI.setSessionContext([ { name: "AverageOrderValue", value: { valueType: "DoubleValue", doubleValue: 1499.99, }, }, ]); ``` ### Currency Currency values use `TextValue` with a string in the format `" "`, for example `"USD 1499.99"`. Sending a bare number, an amount without a currency code, or an amount with a currency symbol causes the server to drop the variable. ```javascript embeddedservice_bootstrap.utilAPI.setSessionContext([ { name: "OrderTotal", value: { valueType: "TextValue", textValue: "USD 1499.99", }, }, ]); ``` ### Date Date-only value in `YYYY-MM-DD` format. ```javascript embeddedservice_bootstrap.utilAPI.setSessionContext([ { name: "RenewalDate", value: { valueType: "DateValue", dateValue: "2026-08-15", }, }, ]); ``` ### Timestamp ISO-8601 date and time. Both `YYYY-MM-DDTHH:MM:SS` and `YYYY-MM-DDTHH:MM:SSZ` are accepted. ```javascript embeddedservice_bootstrap.utilAPI.setSessionContext([ { name: "LastLogin", value: { valueType: "DateTimeValue", dateTimeValue: "2026-05-22T14:30:00Z", }, }, ]); ``` ### List `ListValue` wraps an array of typed values under `listValue`. Each item is itself a value with its own `valueType`, and all items must share the same `valueType` — the type must also match what's configured for the variable in Agentforce Builder. ```javascript embeddedservice_bootstrap.utilAPI.setSessionContext([ { name: "search_facets", value: { valueType: "ListValue", listValue: [ { valueType: "TextValue", textValue: "billing" }, { valueType: "TextValue", textValue: "refund" }, ], }, }, ]); ``` ### Object Object variables use the `StructuredValue` shape with an arbitrary nested object under `value`. This is the same shape used by the reserved `_AgentContext` variable shown in [Set Context Variables](#set-context-variables). ```javascript embeddedservice_bootstrap.utilAPI.setSessionContext([ { name: "ObjectVar", value: { valueType: "StructuredValue", value: { prop1: "TestPage", prop2: { prop2_1: "Branded Shoes", prop2_2: ["Red Shoes"], prop2_3: ["Expensive"], }, }, }, }, ]); ``` ### Handle Rejected Context Variables The server validates each context variable payload against its declared `valueType`. There are two rejection modes. | Rejection Mode | Trigger | Client Behavior | | :------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Hard rejection | Schema violation. For example, a `valueType` of `IntegerValue` with a string in `integerValue`, or an unquoted string literal in `textValue`. | The entire request is rejected. | | Soft rejection | Type or format mismatch. For example, a Currency variable sent as `DoubleValue`, a `DateValue` in the wrong format, or a `ListValue` with mixed item types. | The individual variable is silently dropped. The request otherwise proceeds. Dropped variable names are listed in a warning message in the next send-message or create-conversation response. | **warning:** `setSessionContext` resolves successfully even when a variable is soft-rejected — the promise resolution only indicates that the call was queued on the client. To confirm that a variable was accepted by the server, inspect the response to the next send-message or create-conversation call for a warning naming the dropped variable. By default, context variables set through `setSessionContext` are held on the client and included with the next end-user message. To pass context variables when a new conversation is created — before the end user sends their first message — pass an `options` object as the second argument with `sendWithNewConversation` set to `true`. | Field Name | Type | Description | | :------------------------ | :------ | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `sendWithNewConversation` | Boolean | Optional. Defaults to `false`. When `true`, the context variables are sent as part of creating a new conversation instead of being deferred to the next end-user message turn. | ```javascript embeddedservice_bootstrap.utilAPI.setSessionContext( [ { name: "AccountName", value: { valueType: "TextValue", textValue: "Acme Corporation", }, }, ], { sendWithNewConversation: true }, ); ``` ## Set Context Variables and Send a Message You can set context variables and send a user utterance in a single call with `sendTextMessage`. Setting variables and sending a message in a single call makes sure that the context is immediately available for the agent. ```javascript embeddedservice_bootstrap.utilAPI .sendTextMessage("I need help with this product", [ { name: "_AgentContext", value: { valueType: "StructuredValue", value: { currentPage: "https://example.com/products/laptops", search: { result: "MacBook Pro 16-inch", filters: ["Brand: Apple", "Price: $2000-$3000"], facets: ["Laptops", "Computers", "Electronics"], }, }, }, }, ]) .then(() => { console.log("Successfully sent message with context."); }) .catch((error) => { console.log("Error sending message with context: " + error); }); ``` ## Create Context Variables in Agentforce Builder Before you can access context variables in new agents, manually create them in Agentforce Builder. See [Create Variables In Agentforce Builder](https://help.salesforce.com/s/articleView?id=ai.agent_builder_variables_create.htm&type=5). For the `currentPage` and `search` variables supported by ECv2, create four variables with these settings. **note:** Enable **API write access** for each variable. | Name | API Name | Data Type | List Item Type | | ---------------- | ---------------- | --------- | -------------- | | `currentPage` | `currentPage` | String | N/A | | `search_result` | `search_result` | String | N/A | | `search_filters` | `search_filters` | List | String | | `search_facets` | `search_facets` | List | String | ### Access Context Variables You can access the context variables in Agent Script using `${!@variables.}`. For example, use `{!@variables.currentPage}` to reference the current page in an action input. For more information on agent variables, see [Agent Script Reference: Variables](https://developer.salesforce.com/docs/ai/agentforce/guide/ascript-ref-variables.html). ## Event Handlers You can use event handlers in both `setSessionContext()` and `sendTextMessage()` methods to perform actions after the operation completes. - `then` event handler— If the context is set successfully, you can use this handler to, for example, update the UI or record analytics. - `catch` event handler— If there's an error setting the context, you can use this handler to, for example, try again or show an error message. - `finally` event handler— This handler runs after the attempt to set context completes, whether it succeeds or fails. Use this handler to run any clean-up actions. Conversation Data API Endpoints # Conversation Data API Endpoints The Conversation Data API provides a comprehensive set of tools for interacting with your organization's conversation data, including the ability to delete and fetch conversation records. **Version:** v1.0.0 ## Servers * `https://api.salesforce.com/platform/engagement/v1.0` Default security: ScrtAuth. ## Security * `ScrtAuth` (http) Authenticated by the JWT tokens generated by the service for individual clients. * HTTP scheme: bearer (JSON Web Tokens) ## Tags ### ConversationParticipant API operations related to conversation participants. ## Operations ### GET Fetch conversation entries. `GET /conversation-entries` Operation ID: `getConversationEntries`. Tags: ConversationEntries. Retrieves the conversation entries for a given Conversation ID. The conversation entry (transcript) for a voice call isn’t available until after the voice call record is created. An error occurs if you try to fetch the transcript before the record is created. #### Parameters * `conversationIdentifier` (query, string, required) Unique ID of the conversation associated with the conversation entries. _Example_ ``` 17628be7-1cff-4878-b9f9-fa50433b0905 ``` * `startTimestamp` (query, integer (int64)) Start timestamp for the window of time being requested. The results will include all conversation entries created after this time. _Example_ ``` 1752175937852 ``` * `endTimestamp` (query, integer (int64)) End timestamp for the window of time being requested. The results will include all conversation entries created before this time. _Example_ ``` 1752262337852 ``` * `limit` (query, integer (int64)) Maximum number of entries to return. The maximum value can be up to 1000. If a value is not specified, the default value is 1000. * `direction` (query, string) Chronological direction to use when getting entries. If a value is not specified, the default value is 'fromEnd'. Allowed values: `FROMSTART–Query conversation entries in chronological ascending order, starting with the earliest entry.`, `FROMEND–Query conversation entries in chronological descending order, starting with the most recent entry.`. * `entryIdentifiersFilter` (query, array of string) Filters conversation entries by their unique identifiers. Provide a comma-separated list of string IDs to retrieve only the entries for those IDs. This is a powerful way to fetch a small, targeted set of entries. Example: `41c33058-2d80-4780-982a-6567049749bz`. * `entryTypeFilter` (query, array of string) Filters conversation entries by entry type. Provide a comma-separated list of entry types to retrieve only the entries that match one of the specified entry types. For a full list of entry types, refer to the [ConversationEntry Schema](/messaging-object-model/references/messaging-object-model-conversationEntry) page. _Example_ ``` MESSAGE, PARTICIPANT_CHANGED, MESSAGE_DELIVERY_FAILED, ROUTING_RESULT, ROUTING_WORK_RESULT, NOTE, FLAG_RAISE, FLAG_LOWER, CLIENT_MENU, END_USER_CONSENT_UPDATED, SESSION_STATUS_CHANGED, CONSULT_CONVERSATION_INFO, SESSION_CONTEXT, SESSION_OWNER_CHANGED ``` #### Responses * **200** The operation was successful. The example shows a sample ConversationEntry payload. Note that the payload's structure varies based on the ConversationEntry type specified. For complete details on all possible variations, refer to the [ConversationEntry Schema](/messaging-object-model/references/messaging-object-model-conversationEntry) page. Media type: `application/json`. Schema: `object`. * `conversationIdentifier` (_string_) Unique ID of the conversation. * `conversationEntries` (_array of object_) _Example: Sample Success Response_ Sample Success Response ``` { "conversationIdentifier": "17628be7-1cff-4878-b9f9-fa50433b0905", "conversationEntries": [ { "identifier": "41c33058-2d80-4780-982a-6567049749bz", "entryType": "Message", "entryPayload": { "entryType": "Message", "id": "41c33058-2d80-4780-982a-6567049749bz", "abstractMessage": { "inReplytoMessageId": null, "customHandlingType": null, "id": "41c33058-2d80-4780-982a-6567049749bz", "messageType": "StaticContentMessage", "staticContent": { "formatType": "Text", "text": "Hello! Can you please provide your order number?", "citationContent": null } }, "messageReason": null, "wasRevised": false }, "sender": { "role": "Agent", "appType": "messaging", "subject": "005x00000000001", "clientIdentifier": null }, "transcriptedTimestamp": 1752175937852, "relatedRecords": [], "clientTimestamp": 1752175937852, "clientDuration": 0 } ] } ``` * **400** Bad Request. Validation failed. One or more invalid query parameters were specified. Refer to the error message to identify the exact issue that caused this error. Media type: `application/json`. Schema: `ErrorResponse`. _Example: Conversation Does Not Exist_ Conversation does not exist ``` { "code": null, "errorCode": "BAD_ARGUMENT", "messageCode": "PERMISSION_DENIED", "message": "Conversation does not exist", "targets": [], "parameters": [], "errorDetails": [] } ``` _Example: Invalid Data Type_ Invalid Data Type ``` { "code": null, "errorCode": "BAD_ARGUMENT", "messageCode": "VALIDATION_FAILED", "message": "Invalid value 'cat' for parameter 'limit'.", "targets": [], "parameters": [], "errorDetails": [] } ``` _Example: Negative Limit_ Limit is a negative number ``` { "code": null, "errorCode": "BAD_ARGUMENT", "messageCode": "VALIDATION_FAILED", "message": "Limit cannot be negative.", "targets": [], "parameters": [], "errorDetails": [] } ``` _Example: Limit Exceeded_ Limit exceeds maximum allowed ``` { "code": null, "errorCode": "BAD_ARGUMENT", "messageCode": "CONVERSATION_ENTRIES_LIMIT_EXCEEDED", "message": "Limit exceeded the configured maximum of 1000.", "targets": [], "parameters": [], "errorDetails": [] } ``` _Example: Invalid Timestamp Range_ Start timestamp is after End timestamp ``` { "code": null, "errorCode": "BAD_ARGUMENT", "messageCode": "INVALID_TIMESTAMP_RANGE", "message": "Start timestamp must be less than or equal to end timestamp.", "targets": [], "parameters": [], "errorDetails": [] } ``` _Example: Invalid Direction_ Invalid direction value is provided ``` { "code": null, "errorCode": "BAD_ARGUMENT", "messageCode": "VALIDATION_FAILED", "message": "Invalid value 'adf' for parameter 'direction'.", "targets": [], "parameters": [], "errorDetails": [] } ``` _Example: Invalid Entry Type_ Entry type filter value is invalid ``` { "code": null, "errorCode": "BAD_ARGUMENT", "messageCode": "VALIDATION_FAILED", "message": "Entry type filter value is invalid.", "targets": [], "parameters": [], "errorDetails": [] } ``` * **403** User does not have permission to fetch the resources. * **404** Conversation ID not found. * **500** Internal server error. ### PATCH Update conversation entries. `PATCH /conversation-entries` Operation ID: `updateConversationEntries`. Tags: ConversationEntries. Updates the content of one or more existing conversation entries of Message type within a conversation. Each entry in the request is processed independently — a failure on one entry does not block the others. The overall HTTP response is always `200` when the request itself is valid; per-entry outcomes are reported in the `results` array. Only conversation entries of Message type can be updated. Entries of other types (for example, `PARTICIPANT_CHANGED`) return `success: false` in the results. The field used to update an entry depends on the entry's `formatType`: * Use `messageText` for entries with `formatType: Text`. * Use `abstractMessagePayload` for entries with other format types (for example, `Attachments`). `messageText` and `abstractMessagePayload` are mutually exclusive — providing both on the same entry returns a `VALIDATION_FAILED` error. For more information about the conversation entry schema and supported entry types, see the [ConversationEntry Schema](/messaging-object-model/references/messaging-object-model-conversationEntry) page. This endpoint shares a rate limit bucket with `GET /conversation-entries`: **90 requests per Execution User per minute**. #### Parameters * `conversationIdentifier` (query, string, required) Unique ID of the conversation containing the entries to update. _Example_ ``` 17628be7-1cff-4878-b9f9-fa50433b0905 ``` #### Request body (required) Media type: `application/json`. Schema: `object`. * `entries` (_array of object_, required) List of entry updates. Must contain between 1 and 1,000 items. Minimum items: 1. Maximum items: 1000. * `id` (_string_, required) The identifier of the entry to update. * `messageText` (_string_) New plain-text content for the entry. Only valid for entries with `formatType: Text`. Mutually exclusive with `abstractMessagePayload`. * `abstractMessagePayload` (_object_) Updated message payload for entries with non-text format types (for example, `Attachments`). Mutually exclusive with `messageText`. * `relatedRecords` (_array of string_) Updated list of related record IDs to associate with the entry. _Example: Update messageText_ Update the text of a single Message entry ``` { "entries": [ { "id": "41c33058-2d80-4780-982a-6567049749bz", "messageText": "Updated message text" } ] } ``` _Example: Bulk update_ Update multiple Message entries in one request ``` { "entries": [ { "id": "41c33058-2d80-4780-982a-6567049749bz", "messageText": "Text 1 - updated" }, { "id": "b1e2d3c4-5f6a-7b8c-9d0e-1f2a3b4c5d6e", "messageText": "Text 2 - updated" } ] } ``` _Example: Update relatedRecords only_ Update the related records of an entry without changing its text ``` { "entries": [ { "id": "41c33058-2d80-4780-982a-6567049749bz", "relatedRecords": [ "5003000000D8cuIAAR" ] } ] } ``` _Example: Update attachment entry_ Update an entry with formatType Attachments using abstractMessagePayload ``` { "entries": [ { "id": "c2f3e4d5-6a7b-8c9d-0e1f-2a3b4c5d6e7f", "abstractMessagePayload": { "messageType": "StaticContentMessage", "staticContent": { "formatType": "Attachments", "attachments": [ { "name": "updated-filename.pdf", "referenceId": "" } ] } } } ] } ``` #### Responses * **200** The request was valid and processed. The top-level `isSuccess` field is `true` only when all entries were updated successfully. Check each entry's `success` field for individual outcomes — a `200` response does not guarantee all entries were updated successfully. Entries that are not of Message type, or that have non-existent IDs, return `success: false` with a `failureReason`. Media type: `application/json`. Schema: `object`. * `conversationIdentifier` (_string_) The conversation identifier echoed from the request query parameter. * `isSuccess` (_boolean_) The overall result of the request. `true` only when every entry was updated successfully; `false` if any entry failed. * `results` (_array of object_) Per-entry update outcomes, in the same order as the request entries. * `id` (_string_) The entry identifier from the request. * `success` (_boolean_) `true` if the entry was updated successfully, `false` otherwise. * `failureReason` (_string_, nullable) A description of why the update failed, or `null` on success. _Example: Successful update_ Single entry updated successfully ``` { "conversationIdentifier": "17628be7-1cff-4878-b9f9-fa50433b0905", "isSuccess": true, "results": [ { "success": true, "id": "41c33058-2d80-4780-982a-6567049749bz", "failureReason": null } ] } ``` _Example: Mixed results_ One entry succeeded, one failed (for example, non-existent entry ID) ``` { "conversationIdentifier": "17628be7-1cff-4878-b9f9-fa50433b0905", "isSuccess": false, "results": [ { "success": false, "id": "99a5130a-1b9c-48a4-8f30-b1afe18604ef", "failureReason": "Conversation entry not found" }, { "success": true, "id": "41c33058-2d80-4780-982a-6567049749bz", "failureReason": null } ] } ``` _Example: Non-existent conversation_ Valid request but conversation ID does not exist — returns 200 with all entries failed ``` { "conversationIdentifier": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "isSuccess": false, "results": [ { "success": false, "id": "41c33058-2d80-4780-982a-6567049749bz", "failureReason": "Conversation entry not found" } ] } ``` * **400** Bad request. The request failed validation before any entries were processed. Media type: `application/json`. Schema: `ErrorResponse`. _Example Entries limit exceeded: same as GET /conversation-entries 400 response._ More than 1,000 entries in the request _Example: Empty entries array_ The entries array is empty ``` { "code": null, "errorCode": "BAD_ARGUMENT", "messageCode": "VALIDATION_FAILED", "message": "entries: size must be between 1 and 2147483647", "targets": [ { "type": "BODY", "reference": "entries" } ], "parameters": [], "errorDetails": [] } ``` _Example: Entries limit exceeded_ More than 1,000 entries in the request _Example: Entry missing id_ An entry is missing its id or has an empty id ``` { "code": null, "errorCode": "BAD_ARGUMENT", "messageCode": "VALIDATION_FAILED", "message": "Each entry must include a non-empty id.", "targets": [ { "type": "BODY", "reference": "entries" } ], "parameters": [], "errorDetails": [] } ``` _Example: Entry has no update fields_ An entry includes only id with no fields to update ``` { "code": null, "errorCode": "BAD_ARGUMENT", "messageCode": "VALIDATION_FAILED", "message": "At least one of messageText, abstractMessagePayload, or relatedRecords must be provided.", "targets": [ { "type": "BODY", "reference": "entries[0]" } ], "parameters": [], "errorDetails": [] } ``` _Example: Both messageText and abstractMessagePayload_ An entry specifies both messageText and abstractMessagePayload ``` { "code": null, "errorCode": "BAD_ARGUMENT", "messageCode": "VALIDATION_FAILED", "message": "messageText and abstractMessagePayload are mutually exclusive.", "targets": [ { "type": "BODY", "reference": "entries[0]" } ], "parameters": [], "errorDetails": [] } ``` _Example: Payload size exceeded_ An entry's payload exceeds 100 KB ``` { "code": null, "errorCode": "BAD_ARGUMENT", "messageCode": "VALIDATION_FAILED", "message": "Entry payload exceeds maximum allowed size of 100 KB.", "targets": [ { "type": "BODY", "reference": "entries[0]" } ], "parameters": [], "errorDetails": [] } ``` _Example: Invalid relatedRecords IDs_ A relatedRecords array contains an invalid Salesforce record ID ``` { "code": null, "errorCode": "BAD_ARGUMENT", "messageCode": "VALIDATION_FAILED", "message": "Invalid related record ID: not-a-valid-id", "targets": [ { "type": "BODY", "reference": "entries[0].relatedRecords" } ], "parameters": [], "errorDetails": [] } ``` * **403** Forbidden. The authenticated user does not have permission to update entries in this conversation. * **500** Internal server error. ### DELETE Deletes the conversation data of one or more messaging end users. `DELETE /conversation-participants` Operation ID: `deleteConversationParticipantData`. Tags: ConversationParticipant. Deletes the conversation data associated with the Conversation Participant identified by the ParticipantEntityID values passed to the API. The conversation data includes Messaging End User, Messaging Session, Conversation, Conversation Entry, Conversation Participant, Intelligence Signals, Intelligence Signal Targets, Related Records, Participant, Context Param Maps, and VoiceCall data. #### Parameters * `participantEntityId` (query, array of string, required, explode: false) Comma-separated IDs of Participant Entities whose data needs to be deleted. The ParticipantEntityID represents the record linked to a ConversationParticipant, such as a Contact, Messaging End User, or User. Currently, this API only supports the deletion of Messaging End User entity types, so only valid Messaging End User IDs should be passed as this query parameter. You can pass up to 50 IDs in a single request. _Example_ ``` 0PAJS000001Y5Ud4AK,0PAJS000001YD2S4AW,0PAJS000001Y4744AC ``` * `cascadeLevel` (query, string, required) Cascade level for the delete operation. Allowed values: `FULL_CASCADE–Deletes all conversation data, including any associated data, related to the Participant object.`. Example: `FULL_CASCADE`. * `errorDetailsVerbose` (query, boolean) When `true`, the error response includes a detailed `errorDetails` array that lists all messaging end users blocking deletion and their associated open session IDs or restricted child objects. When `false` or omitted, only the first blocking entity is identified in the error message and `errorDetails` is empty. This parameter is available for orgs on Spring '26 and later. Passing this parameter on an org running an earlier release returns a 400 error. _Example_ ``` true ``` * `forceCloseSessions` (query, boolean) When `true`, any open messaging sessions associated with the specified messaging end users are automatically closed before deletion proceeds. This allows deletions to succeed without requiring you to manually close sessions beforehand. If one or more of the specified messaging end users has open sessions, `forceCloseSessions=true` requires `errorDetailsVerbose=true` to also be set in the same request. If `forceCloseSessions=true` is passed without `errorDetailsVerbose=true` and open sessions are present, the request returns a 400 error. If no open sessions are present, the parameter is accepted without `errorDetailsVerbose`. This parameter is available for orgs on Spring '26 and later. Passing this parameter on an org running an earlier release returns a 400 error. _Example_ ``` true ``` #### Responses * **200** Success. Media type: `application/json`. Schema: `SuccessfulDeleteResponse`. _Example: Standard Deletion_ Success response for a standard deletion request ``` { "conversationApiLogs": { "0PASG0000090wDJ": { "requestedEntityId": "0PASG0000090wDJ", "action": "DELETE", "id": "1NcSG0000008afp", "status": "ENQUEUED" } } } ``` _Example: Deletion With forceCloseSessions_ Success response when forceCloseSessions=true is used — includes openConversationIdentifiers listing any conversations that were open and force-closed ``` { "conversationApiLogs": { "0PASG0000090wDJ": { "requestedEntityId": "0PASG0000090wDJ", "action": "DELETE", "id": "1NcSG0000008afp", "openConversationIdentifiers": [ "9c798944-08f3-445a-8a5f-36c9449a57f6" ], "status": "ENQUEUED" } } } ``` * **400** Invalid API request. This error occurs if no IDs, too many IDs, or invalid IDs were provided in the request, or if query parameters were used incorrectly. Media type: `application/json`. Schema: `ErrorResponse`. _Example: Invalid IDs Provided_ Example for invalid participant IDs ``` { "code": null, "errorCode": "BAD_ARGUMENT", "messageCode": "INVALID_ENTITY_IDS", "message": "Invalid ids found in request", "targets": [ { "type": "QUERY_PARAMETER", "reference": "participantEntityId" } ], "parameters": [ { "name": "participantEntityId", "value": "0ASG000009mbJR4AY" } ], "errorDetails": [] } ``` _Example: Missing Participant IDs_ Error when no participant IDs are provided ``` { "code": null, "errorCode": "BAD_ARGUMENT", "messageCode": "MISSING_ENTITY_IDS", "message": "No ids found in request", "targets": [ { "type": "QUERY_PARAMETER", "reference": "participantEntityId" } ], "parameters": [], "errorDetails": [] } ``` _Example: forceCloseSessions Without errorDetailsVerbose_ forceCloseSessions=true used without errorDetailsVerbose=true ``` { "code": null, "errorCode": "BAD_ARGUMENT", "messageCode": "VALIDATION_FAILED", "message": "Query parameter 'forceCloseSessions' requires 'errorDetailsVerbose=true'.", "targets": [ { "type": "QUERY_PARAMETER", "reference": "forceCloseSessions" } ], "parameters": [], "errorDetails": [] } ``` _Example: errorDetailsVerbose Not Supported for Core Version_ errorDetailsVerbose used on an org running Core version below 262 ``` { "code": null, "errorCode": "BAD_ARGUMENT", "messageCode": "VALIDATION_FAILED", "message": "Query parameter 'errorDetailsVerbose' is not supported for core release versions below 262.", "targets": [ { "type": "QUERY_PARAMETER", "reference": "errorDetailsVerbose" } ], "parameters": [], "errorDetails": [] } ``` _Example: forceCloseSessions Not Supported for Core Version_ forceCloseSessions used on an org running Core version below 262 ``` { "code": null, "errorCode": "BAD_ARGUMENT", "messageCode": "VALIDATION_FAILED", "message": "Query parameter 'forceCloseSessions' is not supported for core release versions below 262.", "targets": [ { "type": "QUERY_PARAMETER", "reference": "forceCloseSessions" } ], "parameters": [], "errorDetails": [] } ``` * **412** Precondition failed. This error occurs when the request is valid, but the messaging end user data cannot be deleted in its current state. Media type: `application/json`. Schema: `ErrorResponse`. _Example: Messaging End User Does Not Exist_ Messaging end user not found ``` { "code": null, "errorCode": "PRECONDITION_FAILED", "messageCode": "CORE_PARTICIPANT_ENTITY_NOT_FOUND", "message": "Failed to find participant entity ids in Core", "targets": [ { "type": "QUERY_PARAMETER", "reference": "participantEntityId" } ], "parameters": [], "errorDetails": [] } ``` _Example: Messaging End User Has Open Sessions (Default)_ One or more messaging end users have open sessions — default error without errorDetailsVerbose ``` { "code": null, "errorCode": "PRECONDITION_FAILED", "messageCode": "CORE_PARTICIPANT_ENTITY_IN_OPEN_SESSIONS", "message": "Requested participant entity 0PALT000004IQjd is still in active MessagingSessions.", "targets": [ { "type": "QUERY_PARAMETER", "reference": "participantEntityId" } ], "parameters": [], "errorDetails": [] } ``` _Example: Messaging End User Has Open Sessions (Verbose)_ One or more messaging end users have open sessions — verbose error with errorDetailsVerbose=true ``` { "code": null, "errorCode": "PRECONDITION_FAILED", "messageCode": "CORE_PARTICIPANT_ENTITY_IN_OPEN_SESSIONS", "message": "One or more participant entities are still in active MessagingSessions. To proceed, either close these sessions manually or use the 'forceCloseSessions=true' query parameter to close them automatically.", "targets": [ { "type": "QUERY_PARAMETER", "reference": "participantEntityId" } ], "parameters": [], "errorDetails": [ { "type": "PARTICIPANT_ENTITY_IN_OPEN_SESSIONS", "participantEntityId": "0PALT000004IQji", "coreParticipantEntityInOpenSessions": [ { "sessionId": "0MwLT000005TBQd" } ] }, { "type": "PARTICIPANT_ENTITY_IN_OPEN_SESSIONS", "participantEntityId": "0PALT000004IQjd", "coreParticipantEntityInOpenSessions": [ { "sessionId": "0MwLT000005TBQY" } ] } ] } ``` _Example: Restricted Child Objects (Verbose)_ One or more messaging end users have restricted child objects — verbose error with errorDetailsVerbose=true ``` { "code": null, "errorCode": "PRECONDITION_FAILED", "messageCode": "CORE_PARTICIPANT_RESTRICTED_CHILD_OBJECTS", "message": "Requested participant entities have restricted child objects both or any of (EngagementAttendee, EngagementTopic) that blocked deletion.", "targets": [ { "type": "QUERY_PARAMETER", "reference": "participantEntityId" } ], "parameters": [], "errorDetails": [ { "type": "PARTICIPANT_RESTRICTED_CHILD_OBJECTS", "participantEntityId": "0PALT000004IQjs", "coreParticipantRestrictedChildObjects": [ { "entityName": "EngagementTopic" } ] } ] } ``` ### DELETE Deletes the conversation data associated with one or more conversations `DELETE /conversations` Operation ID: `deleteConversationsById`. Tags: Conversation. Deletes the conversation data associated with the Conversation identified by the ID values passed to the API. The conversation data includes Conversation, Messaging Session, Conversation Entry, Conversation Participant, Intelligence Signals, Intelligence Signal Targets, Related Records, Participant, Context Param Maps, and VoiceCall data. Note that Participant is only deleted if it is not associated with other Conversations. #### Parameters * `conversationEntityId` (query, array of string, required, explode: false) Comma-separated IDs of Conversation Entities whose data needs to be deleted. You can pass up to 50 IDs in a single request. _Example_ ``` 0dw9R000000ZXYmQAO, 0dw9R000000ZXYrQAO, 0dw9R000000ZXYwQAO ``` #### Responses * **200** Successful operation Media type: `application/json`. Schema: `SuccessfulDeleteResponse`. _Example: Example_ Success log for Participant deletion ``` { "conversationApiLogs": { "id": "1NcSG0000008afp", "requestedEntityId": "0dw9R000000ZXYmQAO", "action": "DELETE", "status": "ENQUEUED" } } ``` * **400** Invalid API request. This error may occur if no IDs, too many IDs, or invalid IDs were provided in the request. Media type: `application/json`. Schema: `ErrorResponse`. _Example: Invalid Conversation ID Provided_ Example for an invalid Conversation ID ``` { "code": null, "errorCode": "BAD_ARGUMENT", "messageCode": "INVALID_ENTITY_IDS", "message": "Invalid ids found in request", "targets": [ { "type": "QUERY_PARAMETER", "reference": "conversationEntityId" } ], "parameters": [ { "name": "conversationEntityId", "value": "0123fi7000002HeHAAU" } ], "errorDetails": [] } ``` _Example: Partial Conversations Not Found_ Certain Conversations Were Not Found Returned when some provided IDs are valid but do not exist in the system. ``` { "code": null, "errorCode": "BAD_ARGUMENT", "messageCode": "PARTIAL_CONVERSATIONS_NOT_FOUND", "message": "Requested conversations not exist: [0dwfi70000020VN]", "targets": [ { "type": "QUERY_PARAMETER", "reference": "conversationEntityId" } ], "parameters": [], "errorDetails": [] } ``` * **412** Precondition failed. This error may occur when your request is valid, but the conversation you are trying to delete either doesn't exist or isn't eligible for deletion. Media type: `application/json`. Schema: `ErrorResponse`. _Example: Conversation Does Not Exist_ Conversation does not exist ``` { "code": null, "errorCode": "PRECONDITION_FAILED", "messageCode": "CORE_CONVERSATION_ENTITY_NOT_FOUND", "message": "All requested conversations not exist", "targets": [ { "type": "QUERY_PARAMETER", "reference": "conversationEntityId" } ], "parameters": [], "errorDetails": [] } ``` _Example: Conversation Has an Active Session_ Error when conversation has an active session ``` { "code": null, "errorCode": "PRECONDITION_FAILED", "messageCode": "CORE_CONVERSATION_ENTITY_IN_OPEN_SESSIONS", "message": "Requested conversation 0dwfz7000002R0v is still has an active session.", "targets": [ { "type": "QUERY_PARAMETER", "reference": "conversationEntityId" } ], "parameters": [], "errorDetails": [] } ``` ## Schemas ### ErrorResponse * `code` (_integer_) A reserved field that currently only returns null. This field should be ignored for standard implementations. * `errorCode` (_string_) Non-HTTP status code of the error. * `messageCode` (_string_) Error message code. * `message` (_string_) Descriptive detail of the error. * `targets` (_array of object_) Identifies the specific location or component of the request that triggered the error. * `type` (_string_) * `reference` (_string_) * `parameters` (_array of object_) A collection of key-value pairs that provides the specific input values involved in the error. * `errorDetails` (_array of object_) Additional details about the error. ### SuccessfulDeleteResponse * `conversationApiLogs` (_object_) * `id` (_string_) ID of the ConversationApiLog entity. Example: `1NcSG0000008afp`. * `requestedEntityId` (_string_) Entity record ID of the object the API operation was performed against. * `action` (_string_) Action Type of the API Operation. Allowed values: `DELETE`. Example: `DELETE`. * `status` (_string_) Status of the API Operation. Allowed values: `REQUESTED`, `ENQUEUED`, `IN_PROGRESS`, `COMPLETED`, `FAILED`. Example: `ENQUEUED`. * `openConversationIdentifiers` (_array of string_) List of conversation UUIDs that were open and automatically closed when `forceCloseSessions=true` was used. Present only when `forceCloseSessions=true` is included in the request; empty array if no conversations required closing. _Example_ ``` [ "9c798944-08f3-445a-8a5f-36c9449a57f6" ] ``` # Conversation Data API Rate Limits This guide provides detailed information regarding the rate limits for the Conversation Data API and explains how the "Execution User" model impacts your organization's throughput. ## Rate Limits Overview Rate limits are enforced to ensure platform stability and are calculated **per Execution User per hour.** The following table details the rate limits for each of the Conversation Data APIs: | API Operation | Endpoint | Rate Limit | | ----------------------- | ----------------------------------- | -------------------------------------------------------------- | | **Fetch Entries** | `GET /conversation-entries` | **90** requests per user / minute (shared with Update Entries) | | **Update Entries** | `PATCH /conversation-entries` | **90** requests per user / minute (shared with Fetch Entries) | | **Delete Participant** | `DELETE /conversation-participants` | **10** requests per user / hour | | **Delete Conversation** | `DELETE /conversations` | **10** requests per user / hour | **Note:** There are plans to increase these rate limits in future releases. Until then, if your organization requires higher throughput, please refer to the [Scaling API Throughput](#scaling-api-throughput) section below. ## The Execution User Model When configuring your External Client App to interact with this API, you must select an Execution User. This process is detailed in the [Get Started with Conversation Data API guide](https://developer.salesforce.com/docs/service/conversation-data-api/guide/get-started-conversation-data-api.md). This identity serves as the security context that Salesforce uses to run the API flow and return access tokens. To allow Salesforce to return access tokens, you must select an execution user for the flow. This user must have the API Only User permission enabled in their profile. It is recommended to create a user specifically for this integration rather than using an existing administrative or employee account. During setup, you will set the Run As field to select the user that you want to assign to the client credentials flow. ## Scaling API Throughput Because the hourly limits are tied directly to the Execution User assigned to the credentials, the limit is governed by the specific identity rather than a hard cap on the entire organization. If your business requirements exceed the standard 90 GET requests per minute or 10 DELETE requests per hour, you can scale your total capacity by creating additional execution users. By provisioning a second user in Salesforce with the required "API Only" permissions and configuring a separate External Client App assigned to that user, you generate a separate set of credentials. Using multiple sets of credentials allows you to distribute your API traffic across different identities. Each Execution User receives their own independent bucket of requests per hour, effectively multiplying your total organizational capacity based on the number of users you configure. # Conversation Lists for Android The conversation list API allows you to structure your user interface around multiple distinct conversations. Using this API, you can access an ordered list of existing conversations and decide how you want to display that information to your users. This behavior is useful when you expect users to have more than one conversation ongoing with reps or bots. **important:** This feature requires version 1.3.0 or later of the Enhanced In-App Chat SDK. This article applies to the following implementations: | UI SDK | Core SDK | | :----: | :------: | | ✅ | ✅ | Regardless of whether you're using the UI SDK or the Core SDK, this feature requires that you create your own user interface to display the list of conversations. From there, UI SDK implementations can drop into the built-in user interface provided by the SDK. To access the list of conversations, use one of the `conversations()` or `conversationsPaged()` methods on your [`CoreClient`](https://salesforce-async-messaging.github.io/messaging-in-app-android/sdk/core/com.salesforce.android.smi.core/-core-client/index.html) object to get the list of conversations. ```kotlin // Call CoreClient.conversations(limit: Int, olderThanConversation: Conversation? = null) coreClient.conversations(10, null).collect { result -> when (result) { is Result.Success -> result.data.forEach { conversation -> // TO DO: Display each conversation println(conversation.identifier) } is Result.Error -> println("Error: ${result.exception.message}") else -> println("No data yet") } } ``` **tip:** The `conversations` method that uses the `olderThanConversation` parameter (as shown above) queries the server to ensure that you have the latest information about the conversation list. The method that uses the `sortedByActivity` parameter only queries your local cached data for a list of conversations and may not reflect the latest conversation data. Cached data is updated after calling the `conversations` method that uses the `olderThanConversation` parameter. See the reference documentation for [`CoreClient`](https://salesforce-async-messaging.github.io/messaging-in-app-android/sdk/core/com.salesforce.android.smi.core/-core-client/index.html) to learn more. # Conversation Lists for iOS The conversation list API allows you to structure your user interface around multiple distinct conversations. Using this API, you can access an ordered list of existing conversations and decide how you want to display that information to your users. This behavior is useful when you expect users to have more than one conversation ongoing with reps or bots. **important:** This feature requires version 1.3.0 or later of the Enhanced In-App Chat SDK. This article applies to the following implementations: | UI SDK | Core SDK | | :----: | :------: | | ✅ | ✅ | Regardless of whether you're using the UI SDK or the Core SDK, this feature requires that you create your own user interface to display the list of conversations. From there, UI SDK implementations can drop into the built-in user interface provided by the SDK. To access the list of conversations, use one of the `conversations()` methods on the [`CoreClient`](https://salesforce-async-messaging.github.io/messaging-in-app-ios/documentation/smiclientcore/coreclient) object. ```swift coreClient.conversations(withLimit: 10, olderThanConversation: nil) { (conversations, error) in if error != nil { // TO DO: Handle error return } for conversation in conversations { // TO DO: Display each conversation } } ``` **tip:** The `conversations` method that uses the `olderThanConversation` parameter (as shown above) queries the server to ensure that you have the latest information about the conversation list. The method that uses the `sortedByActivity` parameter only queries your local cached data for a list of conversations and may not reflect the latest conversation data. Cached data is updated after calling the `conversations` method that uses the `olderThanConversation` parameter. See the reference documentation for [`CoreClient`](https://salesforce-async-messaging.github.io/messaging-in-app-ios/documentation/smiclientcore/coreclient) to learn more. # ConversationEntry Represents a message or an event in the messaging history between an agent or bot and an end user. ## Fields | Field | Details | | :--------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | identifier | **Type**
Reference

**Description**
The ID of the entry, replicated from entryPayload.

**Relationship Type**
Lookup

**Refer To**
ConversationEntry | | conversation_identifer | **Type**
Reference

**Description**
The ID of the conversation that's associated with the conversation entries.

**Relationship Type**
Lookup

**Refer To**
Conversation | | entry_type | **Type**
Text

**Description**
The type of conversation entry, replicated from entryPayload. | | entry_payload | **Type**
Text

**Description**
The JSON serialized entry payload defined by the AbstractEntry schema. See [ConversationEntry Payload Schema](#conversationentry-payload-schema) for the schema file that defines the structure of this field. Possible values are:
- MESSAGE
- PARTICIPANT_CHANGED
- MESSAGE_DELIVERY_FAILED
- ROUTING_RESULT
- ROUTING_WORK_RESULT
- NOTE
- FLAG_RAISE
- FLAG_LOWER
- CLIENT_MENU
- END_USER_CONSENT_UPDATED
- SESSION_STATUS_CHANGED
- CONSULT_CONVERSATION_INFO
- SESSION_CONTEXT
- SESSION_OWNER_CHANGED. | | sender | **Type**
Text

**Description**
The JSON serialized payload with data that contains the participant that sent the message. | | transcripted_timestamp | **Type**
DateTime

**Description**
The date and time when the message was received by the server. | | related_records | **Type**
List

**Description**
The list of Salesforce record IDs which are related to this entry. | | client_timestamp | **Type**
DateTime

**Description**
The date and time when the message was sent by the client. | | client_duration | **Type**
Integer

**Description**
The duration (in milliseconds) measured on the client side for a conversation entry. | ## ConversationEntry Payload Schema Each ConversationEntry record includes a payload field. This field contains structured data representing a single event or message in a conversation, such as a user message, a participant change, or a routing result. The contents of the payload field vary depending on the type of entry, which is indicated by the entry type field. Each ConversationEntry record includes: - Entry type (`entryType`): A string that identifies the type of event or message. - Entry payload (`entryPayload`): A JSON payload whose structure depends on the entry type. This setup allows different types of conversation events to be represented flexibly within the same object. Examples of supported entry types include Message, ParticpantChanged, and RoutingResult. - Message: Uses the Message schema - ParticipantChanged: Uses the ParticipantChanged schema - RoutingResult: Uses the RoutingResult schema Some entry types may contain subtypes. For example, the Message schema may contain different message formats, such as StaticContentMessage and FormResponseMessage, depending on the content. Refer to the [conversation-public-components.yaml schema file](https://github.com/salesforce-misc/conversation-public-schemas/blob/main/conversation-public-components.yaml) on GitHub for a list of supported entry types and their descriptions and for guidance on how to interpret the entry payload based on its entry type. Please note, this file may update over time, so if you are noticing payload types that aren’t referenced in your version of the file, make sure to come back to this page and download the new version. Key details about the schema include: - All payload types extend from the shared base type AbstractEntry. - Each entry type has its own defined schema with required and optional fields. ## See Also - [Off-Platform Messaging Objects](https://developer.salesforce.com/docs/service/messaging-object-model/references/messaging-object-model-conversationEntry/messaging-object-model-off-platform-schemas.md) - [ConversationEntry Schema (Off Platform)](/messaging-object-model/references/messaging-object-model-conversationEntry) - _Object Reference for the Salesforce Platform_: [VoiceCall](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_voicecall.htm) - _Object Reference for the Salesforce Platform_: [MessagingSession](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_messagingsession.htm) # Convert Time Zone Converts the time from the current time zone to the requested time zone. If the time doesn’t contain a time zone, the value defined in Input Time Zone is used instead. This action is available in API version 62.0 and later. ## Supported REST HTTP Methods **URI:** `/services/data/vXX.X/actions/standard/convertTimeZone` Where `XX.X` is the latest API version. **Formats:** JSON, XML **HTTP Methods:** POST **Authentication:** `Authorization: Bearer TOKEN` Where `TOKEN` is a variable. ## Inputs |Input|Type|Description| |-----|----|-----------| |`time`|string|Required. The time that requires conversion. It can be with or without a time zone. The format for times that include a time zone is `yyyy-MM-dd'T'HH:mm:ss.SSSXXX`. For example, `2025-02-24T14:30:15.123-05:00`. The format for times that don’t include a time zone is `yyyy-MM-dd'T'HH:mm:ss.SSS`. For example, `2025-02-24T14:30:15.123`.| |`outputTimeZone`|string|Required. The requested time zone. For example `UTC`.| |`inputTimeZone`|string|Optional. The time zone to use if the time doesn’t include a time zone. For example, `America/Los_Angeles`.| ## Outputs |Output|Type|Description| |------|----|-----------| |`dateTime`|string|The time after it's converted to the required time zone, in the format `yyyy-MM-dd'T'HH:mm:ss.SSSXXX`. For example, `2025-02-24T14:30:15.123Z`.| ## Example Sample request body: ```nolang { "inputs" : [{ "time" : "2025-02-24T14:30:15.123", "outputTimeZone" : "UTC", "inputTimeZone" : "America/Los_Angeles" }] } ``` Sample response body: ```nolang { "actionName" : "convertTimeZone", "errors" : null, "isSuccess" : true, "outputValues" : { "dateTime" : "2025-02-24T22:30:15.123Z" } } ``` # Cooling System Represents a Cooling System configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. ## Configuration Item Type Definition ||| |-|-| |Name|Cooling System| |Developer Name|`SD_CoSy`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Network Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-network-device.md)| |Rule Name|Default rule for all Communication Infra| |Identifier(s)|MAC address| ## Attributes No associated attributes for this configuration item type. # Cools Represents the Cools relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. ## Relationship Type Definition ||| |-|-| |Developer Name|`SD_Cooxx`| |Description|Defines the Cools relationship between configuration items in the CMDB.| |Master Label|Cools| |Direct Relationship|Cools| |Inverse Relationship|Cooled By| |Line Stroke|Solid| |Color Code|`#339966`| # Core Switch Represents a Core Switch configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Switch. ## Configuration Item Type Definition ||| |-|-| |Name|Core Switch| |Developer Name|`SD_CoSw1`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Switch](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-switch.md)| |Rule Name|Default rule for all Hard Disks| |Identifier(s)|MAC address| ## Attributes No associated attributes for this configuration item type. # Create a Concurrent Appointment This use case explains how to build a concurrent appointment scheduling application using Salesforce Scheduler APIs. Let’s think of a situation where you need to schedule multiple appointments within the same time slot. For example, a doctor’s office can let several patients book a Monday 1:00 PM to 3:00 PM appointment. So what can you do in this “case”? Salesforce Scheduler can help you in this “case”. Let’s drill down on what all we need to accomplish this. Salesforce Scheduler provides you with the concurrent scheduling feature that makes it easy to schedule multiple service appointments in the same time slot. An event is created for each service appointment. **note:** A concurrent time slot can have a minimum of 2 and a maximum of 1000 appointments. These steps provide a high-level overview of how you can build a concurrent scheduling app, which is explained in detail in the following sections. ![A representation of the create concurrent scheduling flow.](https://developer.salesforce.com/media/salesforce-scheduler-dev-guide/flow_create_concurrent_scheduling.png) Before you can use the scheduler developer resources to build the concurrent scheduling app, set up Salesforce Scheduler for your organization. For more information, see [Set Up Salesforce Scheduler](https://help.salesforce.com/articleView?id=platform.ls_set_up.htm&type=5). - **[Enable and Configure Concurrent Scheduling](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc6-considerations-for-concurrent-appointment.md)** You must enable concurrent scheduling to let users schedule multiple service appointments in the same time slot. Also, there are some things to keep in mind when you implement concurrent scheduling. - **[Assign Concurrent Operating Hours to Service Territory Members](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc6-assign-operating-hours-to-stm.md)** Concurrent time slots are applicable only to service territory members. Assign operating hours to a service territory member using the Operating Hours field on the respective record page. - **[Authenticate with a Connected App](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc6-scheduler-api-auth.md)** The first step in an API-based integration is to connect to Salesforce and get an access token using OAuth. OAuth access token authentication is the most secure way to authenticate SOAP and REST API calls. - **[Get Work Type Groups](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc6-get-work-type-groups.md)** After authentication, you need to show the work type groups for the user to select. A work type group represents a general appointment category or topic, such as a home loan or investment. - **[Get Service Territories](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc6-get-service-territories.md)** Get a service territory based on the work type group that is selected in the previous step. A service territory represents a branch or office location where your service resources (appointment attendees) operate from or meet customers. - **[Get Work Types](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc6-get-work-types.md)** Get the correct work type record that represents the work type group and service territory that are selected in the previous step. - **[Get Appointment Candidates](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc6-get-appointment-candidates.md)** Get a list of service resources based on the work type group or work type, and service territory that are selected in the previous step. A service resource represents an employee from your organization, such as a loan officer, investment advisor, doctor, nurse practitioner, or retail store specialist, who attends appointments with clients. - **[Create Service Appointments](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc6-create-single-resource-appointment.md)** The last step in the concurrent scheduling application is to show the service appointment details for the user to review and create the appointment. A service appointment represents an appointment booked through Salesforce Scheduler. # Create a Custom Pre-Chat Form Using LWC **note:** In Spring ’24 and earlier, Enhanced Web Chat doesn't have [Lightning Locker](https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/security_code.htm) turned on, but we recommend you build Lightning Locker compatible code for custom-built Lightning Web Components (LWC). By using a custom pre-chat component, you can customize the user interface for the pre-chat form. These steps show you how to create a custom pre-chat form using LWC. The pre-chat form we use in the example shows the pre-chat fields configured in **Embedded Service Deployments** in Setup. See [Customize Pre-Chat for Enhanced Chat](https://help.salesforce.com/s/articleView?id=service.miaw_custom_prechat_2.htm). 1. Create an LWC bundle. See [_Salesforce Trailhead_: Build Lightning Web Components](https://trailhead.salesforce.com/content/learn/trails/build-lightning-web-components). Let's call our example bundle customPreChatForm. 2. In the customPreChatForm.js-meta.xml configuration file of your LWC, specify the `lightningSnapin__MessagingPreChat` target. You add this target to the configuration file so you can see the LWC in your Enhanced Web Chat experience. In other words, adding this target makes the LWC available for selection in **Custom UI Components** in **Embedded Service Deployments** in Setup. See [Customize your UI with Lightning Web Components](https://help.salesforce.com/s/articleView?id=service.messaging_lightning_web_components.htm). ```xml 59.0 true lightningSnapin__MessagingPreChat ``` 3. In the customPreChatForm.html file, iterate over the `fields` object to render the pre-chat fields in the UI. The `fields` object is configured in the customPreChatForm.js file. This HTML code creates a custom pre-chat component similar to the default one. ```html ``` 4. In the customPreChatForm.js file, specify the `dispatchEvent` function. This function takes a `CustomEvent` object with two fields. The first field is the event name `preChatSubmit`, and the second one is a JSON payload with the form field values. The `prechatsubmit` event sends the pre-chat fields configured in **Embedded Service Deployments** in Setup to the chat request. ```javascript import { track, api, LightningElement } from "lwc"; export default class CustomPreChatForm extends LightningElement { /** * Deployment configuration data. * @type {Object} */ @api configuration = {}; startConversationLabel; isSubmitButtonDisabled = false; get prechatForm() { const forms = this.configuration.forms || []; return forms.find(form => form.formType === "PreChat") || {}; } get prechatFormFields() { return this.prechatForm.formFields || []; } /** * Returns pre-chat form fields sorted by their display order. * @type {Object[]} */ get fields() { let fields = JSON.parse(JSON.stringify(this.prechatFormFields)); this.addChoiceListValues(fields); return fields.sort((fieldA, fieldB) => fieldA.order - fieldB.order); } connectedCallback() { this.startConversationLabel = "Start Conversation"; } /** * Adds values to choiceList (dropdown) fields. */ addChoiceListValues(fields) { for (let field of fields) { if (field.type === "ChoiceList") { const valueList = this.configuration.choiceListConfig.choiceList.find(list => list.choiceListId === field.choiceListId) || {}; field.choiceListValues = valueList.choiceListValues || []; } } } /** * Iterates over and validates each form field. Returns true if all the fields are valid. * @type {boolean} */ isValid() { let isFormValid = true; this.template.querySelectorAll("c-custom-pre-chat-form-field").forEach(formField => { if (!formField.reportValidity()) { isFormValid = false; } }); return isFormValid; } /** * Gathers and submits pre-chat data to the app on start-conversation-button click. * @type {boolean} */ onStartConversationClick() { const prechatData = {}; if (this.isValid()) { this.template.querySelectorAll("c-custom-pre-chat-form-field").forEach(formField => { prechatData[formField.name] = String(formField.value); }); this.isSubmitButtonDisabled = true; this.dispatchEvent(new CustomEvent( "prechatsubmit", { detail: { value: prechatData } } )); } } } ``` If you want to use the standard pre-chat fields, here's what the `dispatch` function looks like. ```javascript this.dispatchEvent( new CustomEvent("prechatsubmit", { detail: { value: { _firstName: "bob", _lastname: "jones", _email: "bob.jones@gmail.com", }, }, }), ); ``` 5. In the customPreChatForm.css file, customize the UI style. The UI style in this code is similar to the default experience. ```css :host { display: flex; flex-direction: column; flex: 1 1 auto; overflow: hidden; background: #FFFFFF; padding: 2em; } lightning-button { padding-top: 2em; text-align: center; } ``` 6. Create another LWC bundle called customPreChatFormField to define the fields. 7. In the customPreChatFormField.html file, specify how to render the fields in the UI. This example uses the `lightning-combobox` component to render `choiceList` (dropdown) fields and the `lightning-input` component to render other field types. ```html ``` 8. In the customPreChatFormField.js file, define the fields, including dropdown fields. ```javascript import { track, api, LightningElement } from "lwc"; export default class CustomPreChatFormField extends LightningElement { choiceListDefaultValue; /** * Form field data. * @type {Object} */ @api fieldInfo = {}; @api get name() { return this.fieldInfo.name; } @api get value() { const lightningCmp = this.isTypeChoiceList ? this.template.querySelector("lightning-combobox") : this.template.querySelector("lightning-input"); return this.isTypeCheckbox ? lightningCmp.checked : lightningCmp.value; } @api reportValidity() { const lightningCmp = this.isTypeChoiceList ? this.template.querySelector("lightning-combobox") : this.template.querySelector("lightning-input"); return lightningCmp.reportValidity(); } get type() { switch (this.fieldInfo.type) { case "Phone": return "tel"; case "Text": case "Email": case "Number": case "Checkbox": case "ChoiceList": return this.fieldInfo.type.toLowerCase(); default: return "text"; } } get isTypeCheckbox() { return this.type === "Checkbox".toLowerCase(); } get isTypeChoiceList() { return this.type === "ChoiceList".toLowerCase(); } /** * Formats choiceList options and sets the default value. * @type {Array} */ get choiceListOptions() { let choiceListOptions = []; const choiceListValues = [...this.fieldInfo.choiceListValues]; choiceListValues.sort((valueA, valueB) => valueA.order - valueB.order); for (const listValue of choiceListValues) { if (listValue.isDefaultValue) { this.choiceListDefaultValue = listValue.choiceListValueName; } choiceListOptions.push({ label: listValue.label, value: listValue.choiceListValueName }); } return choiceListOptions; } } ``` 9. The customPreChatFormField LWC bundle requires a customPreChatFormField.js-meta.xml configuration file but without a target. ```xml 59.0 true ``` 10. Deploy the LWC to your org. See [_Salesforce Developer Guide_: Introducing Lightning Web Components](https://developer.salesforce.com/docs/component-library/documentation/en/lwc). 11. Add the LWC to your Embedded Service Deployment. See [_Salesforce Help_: Customize Your UI with Lightning Web Components](https://help.salesforce.com/s/articleView?id=service.messaging_lightning_web_components.htm). To get custom LWC configuration details, see [_Salesforce Developer Guide_: Get Custom Lightning Web Components Configuration Details](https://developer.salesforce.com/docs/service/messaging-web/references/m4w-reference/customComponents.html) # Create a Multi-Resource Appointment Build a scheduling application using Salesforce Scheduler APIs to book a multi-resource service appointment. Multi-resource scheduling lets users create appointments that include more than one required service resource. **note:** A multi-resource appointment can have a maximum of five required service resources: one primary required service resource plus four required service resources, including asset resources. Before you can use the scheduler developer resources to build the app, set up Salesforce Scheduler for your organization. For more information, see [Set Up Salesforce Scheduler](https://help.salesforce.com/articleView?id=platform.ls_set_up.htm&type=5). These steps provide a high-level overview of how you can build a multi-resource scheduling app, which is explained in detail in the following sections. ![A representation of the create multi-resource appointment flow.](https://developer.salesforce.com/media/salesforce-scheduler-dev-guide/flow_create_multi_resource_appointment.png) 1. [Considerations for Multi-Resource Scheduling](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc3-considerations-for-multi-resource-appointment.md) In multi-resource scheduling, a primary service resource anchors the appointment and must be marked required. Primary service resources are the only required resources whose skills are matched to the skill requirements for an appointment. Other required service resources are matched to appointments based on their availability and the primary resource’s service territory. 2. [Enable Multi-Resource Scheduling](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc3-enable-multi-resource.md) Enable the Multi-Resource Scheduling setting to let users schedule groups of resources for customer appointments. 3. [Update Field Level Security for Multi-Resource Scheduling](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc3-update-field-level-security.md) Update the field-level security settings for the Primary Resource field on the Assigned Resource object for user profiles that need to access multi-resource scheduling. 4. [Authenticate with a Connected App](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc3-scheduler-api-auth.md) The first step in an API-based integration is to connect to Salesforce and get an access token using OAuth. OAuth access token authentication is the most secure way to authenticate SOAP and REST API calls. 5. [Get Work Type Groups](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc3-get-work-type-groups.md) A work type group represents a general appointment category or topic, such as a home loan or investment. Use the `Query()` method on the WorkTypeGroup object to retrieve a list of work type groups. 6. [Get Engagement Channels](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc3-get-engagement-channel-types.md) An engagement channel is a medium, such as Phone, Video, and In Person that service resources use to meet customers. 7. [Get Service Territories](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc3-get-service-territories.md) A service territory represents a branch or office location where your service resources (appointment attendees) operate from or meet customers. Use the `service-territories` Connect API to fetch a list of service territories based on a work type group or work type. 8. [Get Appointment Candidates](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc3-get-appointment-candidates.md) A service resource represents an employee from your organization, such as a loan officer, investment advisor, doctor, nurse practitioner, or retail store specialist, who attends appointments with clients. Use the `getAppointmentCandidates` REST API to fetch the available service resources based on work type group and service territory. 9. [Get Appointment Time Slots](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc3-get-appointment-slots.md) A time slot represents a period in a day when an appointment can be scheduled. Use the `getAppointmentSlots` REST API to fetch the available time slots for a resource. 10. [Create Service Appointments](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc3-create-multi-resource-appointment.md) A service appointment represents an appointment booked through Salesforce Scheduler. Make a POST request on the `service-appointments` Connect API to create the appointment. # Create a Sample Einstein Bot To help your customers efficiently set up an Einstein Bot with Bring Your Own Channel for CCaaS, create a sample Einstein Bot and associated Omni-Channel Flows and include them in your managed package. In this example, we create an outbound Omni-Channnel Flow that routes from a bot to a rep. We then set up a sample Einstein Bot that uses this outbound flow and automatically generates a corresponding inbound flow that sends conversations to the bot. For your package, we recommend creating a flow and bot configuration that reflects the expected business logic of your customers. ## Create a Flow Follow steps in Salesforce Help to create an Omni-Channel flow to [Route Work Items to a Specific Agent](https://help.salesforce.com/s/articleView?id=service.omnichannel_route_to_specific_agent.htm). This sample outbound flow transfers the Messaging end user from an Einstein Bot to a rep. You need this flow to select it as the **Outbound Omni-Channel Flow** during Einstein Bot setup. ## Create an Einstein Bot 1. From Setup, in the Quick Find box, enter `Einstein Bots`, and then select **Einstein Bots**. 2. Enable Einstein Bots if it’s not already enabled. 3. Launch the guided setup from the Einstein Bots main page. For your first bot, click **Create a New Bot**. Otherwise, click **New**. 4. Select **Enhanced Bot**, and then click **Next**. 5. To create an Einstein bot from scratch, select **Start from Scratch**, and then click **Next**. 6. Personalize your sample bot. - Enter a bot name, select a primary language, and then click **Next**. - Modify the welcome message, but don’t customize the menu items. Your customers adjust them when they clone your sample Einstein Bot. When you’re done, click **Next**. 7. On the Link to deployment page of the guided setup, select **Create an inbound Omni-Channel flow for my bot**, and then from **Outbound Omni-Channel Flow** dropdown, select the flow that you created. 8. Click **Proceed** to start the bot creation process, and then click **Finish** to confirm when it’s done. When the system has finished creating the bot, Einstein Bot Builder opens. ### Configure the Bot Configure the Einstein Bot to trigger the sample flow that transfers a Messaging session from the bot to a rep. 1. If you aren’t already in Einstein Bot Builder, from Setup, enter `Einstein Bots` in the Quick Find box, and then select **Einstein Bots**. In the My Bots section, select the name of the bot that you created. 2. In Einstein Bot Builder, from the Bot Builder menu, click **Dialogs**. 3. In the Dialogs panel, click **New**. 4. Give the dialog a name, such as `Get help from a representative`. Enter an API name and optional description, and save. 5. In the Dialogs panel, select the newly created dialog. 6. Click **Next Step**. From the Step Properties panel, select **Transfer to an agent**. ![Dialog with Transfer to an agent selected as Next Step](https://developer.salesforce.com/docs/media/messaging-byoc-ccaas/byoc-ccaas-einstein-bot-get-help-from-agent-dialog.png '{"class": "image-lg"}') 7. Save the dialog. 8. In the Dialogs panel, select **Main Menu**. 9. Click **Next Step**. From the Step Properties panel, select **Show a menu** and add the `Get help from an agent` dialog you created previously as one of the menu items. ![Main Menu Dialog with Get help from an agent included as a menu item](https://developer.salesforce.com/docs/media/messaging-byoc-ccaas/byoc-ccaas-einstein-bot-main-menu-dialog.png '{"class": "image-lg"}') 10. Save your work. ## Include the Sample Einstein Bot and Flows in Your Managed Package When you [create the managed package](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/create-managed-package.md) for your integration, add these components to the managed package. - The sample Einstein Bot that you created - The sample Omni-Channel outbound flow that you created - The inbound Omni-Channel flow that the system automatically created ## Handle Partner-Owned Routing If `routingOwner` is `Partner` in the Conversation Channel Definition record, partners handle routing for the messaging session to and from the Einstein Bot. If `routingOwner` is `Salesforce`, partners don’t need to handle routing to or from the Einsten Bot. Salesforce handles this automatically. ### Handle Partner Routing to an Einstein Bot Perform the API calls in the order listed to handle routing for the inbound Omni-Channel flow that connects a messaging end user to an Einstein Bot. - Call the Interaction API (`POST /api/v1/interactions`) to create a conversation messaging session and a messagingEndUser record. This API execution returns a `conversationIdentifier` value used in the next step. - Call the Route API (`POST /api/v1/route`) with `routingType` set to `initial` and `conversationIdentifier` set to the `conversationIdentifier` value returned from the previous step. This executes the inbound Omni-Channel flow that’s associated with the messaging channel. - In the Route API payload, pass in the ID of `flowDefinitionView`for the `flowId` field. For the `queueId` field, pass in the ID of `fallbackQueue`. The customer provides these values. - The Route API response includes the `salesforceBotId` and `psrId`. The Einstein Bot is added to the conversation and sends a welcome message to the end user. ### Handle Partner Routing to Escalate from an Einstein Bot to a Rep Perform the API calls in the order listed to handle routing for the outbound Omni-Channel flow that transfers a messaging end user from an Einstein Bot to a rep. - A routing request event provides the flow ID of the outbound Omni-Channel flow. The flow can be customer-configured. - Call the Route API (`POST /api/v1/route`) with `routingType` set to `transfer` to execute the flow ID provided by the routing request event. Alternatively, transfer to the `fallbackQueueId` if the transfer to the outbound Omni-Channel flow fails. - The Omni-Channel flow uses the logic in the flow to route the conversation to a rep or queue. The flow returns the `psrId` with the `userId` (agent) or `queueId` (queue). - Call the agentWork API (`POST /api/v1/agentWork`) to create an AgentWork record when the system finds a potential rep or queue to handle the work item. - After routing completes, call the routingResult API (`POST /api/v1/routingResult`) to notify Salesforce whether the conversation succeeded or failed. **See Also** - _Salesforce Help_: [Set Up an Einstein Bot for Bring Your Own Channel](https://help.salesforce.com/s/articleView?id=service.byoc_ccaas_einstein_bot.htm) - _Salesforce Help_: [Route Conversations to and from Your Enhanced Bot](https://help.salesforce.com/s/articleView?id=service.bots_service_enhanced_route.htm) - _Salesforce Help_: [Add a Dialog](https://help.salesforce.com/s/articleView?id=service.bots_service_new_dialog.htm) - _Salesforce Help_: [Set Up a Dialog](https://help.salesforce.com/s/articleView?id=service.bots_service_new_dialog.htm) - [Interaction Service API](https://developer.salesforce.com/docs/service/interaction-service-api/guide/get-started.html) - _GitHub_: [Interaction Service APIs](https://github.com/salesforce-misc/interaction-service-apis) # Create a Sample Einstein Bot To help your customers efficiently set up an Einstein Bot with Bring Your Own Channel for Messaging, create a sample Einstein Bot and associated Omni-Channel Flows and include them in your managed package. In this example, we create an outbound Omni-Channnel Flow that routes from a bot to a rep. We then set up a sample Einstein Bot that uses this outbound flow and automatically generates a corresponding inbound flow that sends conversations to the bot. For your package, we recommend creating a flow and bot configuration that reflects the expected business logic of your customers. ## Create a Flow Follow steps in Salesforce Help to create an Omni-Channel flow to [Route Work Items to a Specific Agent](https://help.salesforce.com/s/articleView?id=service.omnichannel_route_to_specific_agent.htm). This sample outbound flow transfers the Messaging end user from an Einstein Bot to a rep. You need this flow to select it as the **Outbound Omni-Channel Flow** during Einstein Bot setup. ## Create an Einstein Bot 1. From Setup, in the Quick Find box, enter `Einstein Bots`, and then select **Einstein Bots**. 2. Enable Einstein Bots if it’s not already enabled. 3. Launch the guided setup from the Einstein Bots main page. For your first bot, click **Create a New Bot**. Otherwise, click **New**. 4. Select **Enhanced Bot**, and then click **Next**. 5. To create an Einstein bot from scratch, select **Start from Scratch**, and then click **Next**. 6. Personalize your sample bot. - Enter a bot name, select a primary language, and then click **Next**. - Modify the welcome message, but don’t customize the menu items. Your customers adjust them when they clone your sample Einstein Bot. When you’re done, click **Next**. 7. On the Link to deployment page of the guided setup, select **Create an inbound Omni-Channel flow for my bot**, and then from **Outbound Omni-Channel Flow** dropdown, select the flow that you created. 8. Click **Proceed** to start the bot creation process, and then click **Finish** to confirm when it’s done. When the system has finished creating the bot, Einstein Bot Builder opens. ### Configure the Einstein Bot Configure the Einstein Bot to trigger the sample flow that transfers a Messaging session from the bot to a rep. 1. If you aren’t already in Einstein Bot Builder, from Setup, enter `Einstein Bots` in the Quick Find box, and then select **Einstein Bots**. In the My Bots section, select the name of the bot that you created. 2. In Einstein Bot Builder, from the Bot Builder menu, click **Dialogs**. 3. In the Dialogs panel, click **New**. 4. Give the dialog a name, such as `Get help from a representative`. Enter an API name and optional description, and save. 5. In the Dialogs panel, select the newly created dialog. 6. Click **Next Step**. From the Step Properties panel, select **Transfer to an agent**. ![Dialog with Transfer to an agent selected as Next Step](https://developer.salesforce.com/docs/media/messaging-byoc-ccaas/byoc-ccaas-einstein-bot-get-help-from-agent-dialog.png '{"class": "image-lg"}') 7. Save the dialog. 8. In the Dialogs panel, select **Main Menu**. 9. Click **Next Step**. From the Step Properties panel, select **Show a menu** and add the `Get help from a representative` dialog you created previously as one of the menu items. ![Main Menu Dialog with Get help from a representative included as a menu item](https://developer.salesforce.com/docs/media/messaging-byoc-ccaas/byoc-ccaas-einstein-bot-main-menu-dialog.png '{"class": "image-lg"}') 10. Save your work. ## Include the Sample Einstein Bot and Flows in Your Managed Package When you [create the managed package](https://developer.salesforce.com/docs/service/messaging-partner/guide/create-managed-package.md) for your integration, add these components to the managed package. - The sample Einstein Bot that you created - The sample Omni-Channel outbound flow that you created - The inbound Omni-Channel flow that the system automatically created **See Also** - _Salesforce Help_: [Set Up an Einstein Bot for Bring Your Own Channel](https://help.salesforce.com/s/articleView?id=service.byoc_ccaas_einstein_bot.htm) - _Salesforce Help_: [Route Conversations to and from Your Enhanced Bot](https://help.salesforce.com/s/articleView?id=service.bots_service_enhanced_route.htm) - _Salesforce Help_: [Add a Dialog](https://help.salesforce.com/s/articleView?id=service.bots_service_new_dialog.htm) - _Salesforce Help_: [Set Up a Dialog](https://help.salesforce.com/s/articleView?id=service.bots_service_new_dialog.htm) # Create a Service Report with Apex The Create Service Report action on work orders, work order line items, and service appointments can also be called using Apex code. The code example shown creates a service report with two signatures by making an Apex callout to the `createServiceReport` action REST API resource. Each service report contains data from its parent record and signatures from customers, technicians, or others who must sign off on the work. In your API call, you can define one or more signatures to be used in the report. The number and type of signatures must match the service report template's signature settings. **note:** - This code example applies to API version 41.0 and later. Service reports generated with API version 40.0 can contain only one signature. - This code example assumes that you have remote site settings enabled to make REST callouts. For more information, see [Adding Remote Site Settings](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_callouts_remote_site_settings.htm). - The mock record ID in the code example is `0WOxx000000001E`. The mock service report template ID is `0SLR00000004DBFOA2`. **API Endpoint (v41.0):** `/services/data/v41.0/actions/standard/createServiceReport` ```apex String salesforceHost = System.Url.getSalesforceBaseURL().toExternalForm(); String url = salesforceHost + '/services/data/v41.0/actions/standard/createServiceReport'; // Create HTTP request HttpRequest request = new HttpRequest(); request.setEndpoint(url); request.setMethod('POST'); request.setHeader('Content-Type', 'application/json'); request.setHeader('Authorization', 'OAuth ' + UserInfo.getSessionId()); // Set the body as a JSON object request.setBody('{"inputs" : [ {"entityId" : "0WOxx000000001E","signatures" : [{"data":"BASE64_CODE_FOR_THE_CAPTURED_SIGNATURE_IMAGE","contentType":"image/png","name":"Customer Signature","signatureType":"Default","place":"San Francisco","signedBy":"John Doe","signedDate":"2019-06-05 12:00:00"}],"templateId" : "0SLR00000004DBFOA2"} ]}'); Http http = new Http(); HttpResponse response = http.send(request); // Parse the JSON response if (response.getStatusCode() != 201) { System.debug('The status code returned was not expected: ' + response.getStatusCode() + ' ' + response.getStatus()); } else { System.debug(response.getBody()); } ``` Where `BASE64_CODE_FOR_THE_CAPTURED_SIGNATURE_IMAGE` is a variable. This code example creates a payload with two signatures. ```nolang { "inputs":[ { "entityId":"0WOxx000000001E", "signatures":[ { "data":"Base64 code for the captured signature image", "contentType":"image/png", "name":"Customer Signature", "signatureType":"Customer", "place":"San Francisco", "signedBy":"John Doe", "signedDate":"Thu Jul 13 22:34:43 GMT 2017" }, { "data":"Base64 code for the captured signature image", "contentType":"image/png", "name":"Technician Signature", "signatureType":"Technician" } ], "templateId":"0SLR00000004DBFOA2" } ] } ``` ## Field Descriptions - entityId: The ID of the work order, work order line item, or service report that you want to create the service report for. - signatures: A list of JSON definitions for a digital signature. - data: (Required) The base64 code for an image. - contentType: (Required)The file type of the signature. - signatureType: (Required) The role of the person signing such as Customer. Signature Type picklist values are defined by the Salesforce admin ahead of time. Each signature block must use a different signature type, and the signature types that you define in your call must match the service report template’s signature types. - name: The signature block title. This value appears on the generated service report. - place: The place of signing. This value appears on the generated service report. - signedBy: The name of the person signing. This value appears on the generated service report. - signedDate: The date of signing. This value appears on the generated service report. - templateId: The ID of the service report template used for the report. To find the ID, run a SOQL query on the ServiceReportLayout object. ## Limitations If you’re a guest user and are using `Future` annotation, the ContentDocument object can’t be created and you can’t create the Service Document. **See Also** - [Salesforce Actions Developer Guide: Create Service Report Actions](https://developer.salesforce.com/docs/atlas.en-us.api_action.meta/api_action/actions_obj_create_service_report.htm) # Create a Service Territory Create a large, virtual service territory using Salesforce Scheduler and add service resources. Set the new territory as the secondary territory for service resources. You can assign a relatively large number of service resources to the territory. Use the territory exclusively for virtual appointments via phone calls and video conferences. For information on creating a service territory, see [Set Up Service Territories in Salesforce Scheduler](https://help.salesforce.com/s/articleView?id=platform.ls_set_up_st.htm&type=5). # Create a Single-Resource Appointment This use case explains how you can build a scheduling website to allow users to book service appointments with a single resource using Salesforce Scheduler APIs. Before you can use the scheduler developer resources to build the app, set up Salesforce Scheduler for your organization. For more information, see [Set Up Salesforce Scheduler](https://help.salesforce.com/articleView?id=platform.ls_set_up.htm&type=5). Here are the high level steps building an external web site by using the Salesforce Scheduler APIs, which are outlined in detail later. ![A representation of the create service appointment flow.](https://developer.salesforce.com/media/salesforce-scheduler-dev-guide/flow_create_service_appointment.png) 1. [Authenticate with a Connected App](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc1-scheduler-api-auth.md) The OAuth access token authentication is the most secure way to authenticate SOAP and REST API calls. Before you use Salesforce Scheduler for API-based integration, authenticate the API calls using OAuth. 2. [Get Work Type Groups](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc1-get-work-type-group.md) A work type group represents a general appointment category or topic, such as a home loan or investment. Show your users your work type groups on the landing page by retrieving the list of work type groups from your Salesforce instance. Your users can select a work type group from the list while booking appointments. 3. [Get Engagement Channels](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/build-custom-apps/usecase1/uc1-get-channel-types.md) An engagement channel is a medium, such as Phone, Video, and In Person that service resources use to meet customers. 4. [Get Service Territories](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc1-get-service-territory.md) A service territory represents a branch or office location where your service resources (appointment attendees) operate from or meet customers. Show your users your available service territories on the next page on your website by retrieving a list of active service territories from your Salesforce instance. Your users can search for service territories based on user-entered name, city, postal code, or state. Users can also view the distance between two locations, such as between a service territory and the user's current location. 5. [Get Service Resources](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc1-get-appointment-candidates.md) A service resource represents an employee from your organization, such as a loan officer, investment advisor, doctor, nurse practitioner, or retail store specialist, who attends appointments with clients. 6. [Create Service Appointments](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc1-create-single-resource-appointment.md) Show your users the details of a service appointment—an appointment booked through Salesforce Scheduler—so that users can review and create the appointment. # Create a Workplace Command Center Compatible Lightning Component Use Workplace Command Center compatible components in your custom solution. Since the Command Center is developed as a Lightning Home page, it supports dragging and dropping in standard components such as reports and list views. However, because standard components don’t subscribe to the message channel used to communicate when the Location global filter changes, they won’t change when the user filters by Location. This can create a confusing user experience. For this reason, to display Location-aware data, we recommend developing custom Lightning components. A custom component that can be added to Command Center must support Lightning app pages. This means that custom Lightning Web Components must allow the `lightning__AppPage` target in its config file, and custom Aura components must implement `flexipage:availableForAllPageTypes`. **See Also** - [*Lightning Web Components Dev Guide*: Introducing Lightning Web Components](https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.get_started_introduction) # Create Actions to Show Create the actions and recommendations that you want to users to start from the Actions & Recommendations component. You can show flows, quick actions, and recommendations that result from Next Best Action strategies. 1. [Create a flow](https://help.salesforce.com/articleView?id=flow_build.htm). 1. To create flows that interactively guide your users, use Flow Builder, a point-and-click tool that lets you automate business processes. The component can show screen flows, field service mobile flows, and autolaunched flows. You can also define the flow to include stages so that users can see where they are in a series of steps. **note:** If you want to pass the parent record ID into a flow when it’s launched from the component, create a flow text input variable named _recordId_. The name is case-sensitive. When an agent launches the flow from the component, the parent record ID is passed into the flow variable. Your flow can then use the parent record ID to update a field in the record, for example. 2. [Test your flow](https://help.salesforce.com/articleView?id=flow_test.htm) Before you activate your flow, test it and make sure that it’s working as expected. 3. [Activate your flow.](https://help.salesforce.com/articleView?id=flow_distribute_activate.htm) To appear in the Actions & Recommendations component, your flow must be active. 2. Create a quick action. You can create a global or object-specific quick action and show it in the component. For the quick action to appear in the component, [add it to the record page layout](https://help.salesforce.com/articleView?id=adding_actions_using_ple.htm). 3. Create offers or actions to recommend to users using Next Best Action strategies. 1. [Create recommendations.](https://help.salesforce.com/articleView?id=nba_recommendations_app.htm) Recommendations are customized actions and offers that you want to present to users. When you create a recommendation, specify a screen flow that starts when the user accepts the recommendation. 2. [Create an action strategy.](https://help.salesforce.com/articleView?id=nba_strategy_builder_creating.htm) To determine which recommendations show in the component, create an action strategy. Action strategies use business rules, predictive models, and other data sources to filter recommendations. **See Also** - [Associate Actions with Records](https://developer.salesforce.com/docs/service/salesforce-guided-engagement/guide/guided-engagement-setup-associate.md) - [*Aura Components Developer Guide*: Use Aura Components with Flows](https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/components_using_flow.htm) - [*Salesforce Help*: Show Users Progress Through a Flow with Stages](https://help.salesforce.com/articleView?id=flow_build_stages.htm) - [*Salesforce Help*: Create Global Quick Actions](https://help.salesforce.com/articleView?id=creating_global_actions.htm) - [*Salesforce Help*: Create Object-Specific Quick Actions](https://help.salesforce.com/articleView?id=creating_object_specific_actions.htm) - [*Salesforce Help*: Einstein Next Best Action](https://help.salesforce.com/articleView?id=einstein_next_best_action.htm) # Create an AgentWork Record Creates an AgentWork record when the partner-owned routing system finds a rep to handle the work item. Only use this API if routing is partner-owned (when `ConversationChannelDefinition.routingOwner` is set to `Partner`). AgentWork is a Salesforce object that’s created when the partner-owned routing system finds a potential rep to handle the work item. The AgentWork record contains information about the work item and its routing status. By default, a Pending Service Routing (PSR) record is created at the start of routing (`POST /route`). If a PSR record is automatically created when the `POST /route` API is called, only set the required parameters. The PSR has all of the other important details, so if you set any of the other unnecessary parameters, they'll be ignored. If a PSR isn’t automatically created, in addition to the necessary parameters, also set the capacity weight or capacity percentage field, which the partner-owned system can use to make routing decisions. Salesforce service channels that respect the Status-Based Capacity Model, such as Messaging channels, can also leverage the capacity values to determine rep capacity. When the AgentWork record is created, rep actions for the record are enabled or disabled by setting the `agentActionVisibilities` parameters. This API applies to the following product: - Bring Your Own Channel for Contact Center as a Service. This API is available in version 62.0 and later. ## URI `v1/agentWork` ## HTTP Method POST ## Headers ### Authorization (User-Level Authentication) **Format:** `Bearer ` String. Standard header. Used to authenticate the user, where `` is the Salesforce access token used as the bearer token to make requests to the Interaction Service APIs. Required. ### Content-Type **Format:** `application/json` String. Standard header. Format of the request payload. Required for any request that includes a body. ### OrgId **Format:** `` String. Custom header. The Salesforce org. `` is the 15-character Org ID of the Salesforce org. Required. ### RequestId **Format:** `` String. Custom header. Universally Unique Identifier (``) that references and tracks this request. Required. ### AuthorizationContext **Format:** `` String. Custom header. Additional information for the request authorization used to authenticate and validate requests against the connected app scopes. - For Bring Your Own Channel for CCaaS, set `` to the developer name of the ConversationChannelDefinition record. For example, Partner1_ChannelDefinition1. Required. ### AuthorizationContextType **Format:** `` String. Custom header. Specifies the type of context for the request. - For Bring Your Own Channel for CCaaS, set `` to **ConversationChannelDefinition**. ### Sample Header ``` -H $'Authorization: Bearer 00DSG000009SWby!...LN8XxeRIxGe' \ -H "content-type: application/json" \ -H "OrgId: 00DSG000009SWby" \ -H "AuthorizationContext: Partner1_ChannelDefinition1" \ -H "AuthorizationContextType: ConversationChannelDefinition" \ -H "RequestId: a1b23c45-c06a-4784-c96c-cb95d3321bda" \ ``` ## Parameters | Property Name | Type | Description | Required | | :------------------------------------ | :------ | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------- | | userId | string | The 15-character ID of the Salesforce user or the `CallCenterRoutingMap.ExternalId`. | Yes | | workItemId | string | The 15-character ID of the associated messaging session (`MessagingSession`) record. | Yes | | capacityPercentage | string | The percentage of a rep’s capacity for work items that’s consumed by a specific type of work item from this service channel. After the AgentWork record is created, the partner-owned routing system can use this value to make routing decisions. Only set this parameter if the PSR isn’t automatically created. If the `POST /route` API is called, the values from this payload are ignored and this API uses the payload details from the PSR that was created from the `POST /route` API. Don’t set this parameter if `capacityWeight` is set. | No | | capacityWeight | string | The amount of a rep’s capacity for work items that’s consumed by a work item from this service channel. After the AgentWork record is created, the partner-owned routing system can use this value to make routing decisions. Only set this parameter if the PSR isn’t automatically created. If the `POST /route` API is called, the values from this payload are ignored and this API uses the payload details from the PSR that was created from the `POST /route` API. Don’t set this parameter if `capacityPercentage` is set. | No | | routingContext | object | An object representing the routing details for the agentWork record. Only set this parameter if the PSR isn’t automatically created. If the `POST /route` API is called, the values from this payload are ignored and this API uses the payload details from the PSR that was created from the `POST /route` API. | No | | routingContext.conversationIdentifier | string | A unique ID for the conversation. The conversationIdentifier value is generated the first time you call the `/interactions` API. This value is required if `routingContext` is required. | No | | routingContext.routingType | string | Determines whether the conversation that’s being routed is a new conversation, one that’s being transferred, or one that’s bringing in more participants through conferencing. Valid values include:
\- **Initial** \- A newly-established conversation.
\- **Transfer** \- An existing conversation that’s being transferred.
\- **Conference** \- An existing conversation that’s bringing in more participants through conferencing. This value is required if `routingContext` is required. | No | | routingContext.routingCorrelationId | string | The unique ID for the routing attempt used to trace the conversation as it’s routed from system to system. If the route API is called, this value is the unique ID of the associated record. Otherwise, this value is any unique ID from the partner system. This value is required if `routingContext` is required. | No | | agentActionVisibilities | object | Determines whether an action, such as the “Transfer” or "Conference" action, for the messaging session is enabled for reps to perform. Available in API version 63.0 and later. | Yes | | agentActionVisibilities.agentAction | enum | Specifies which Messaging action is dynamically controlled to be enabled or disabled. Set this value to `Transfer` to control the transfer action for the messaging session, or set it to `Conference` to control the conferencing action for the Messaging session. Available in API version 63.0 and later. | Yes | | agentActionVisibilities.visible | boolean | Indicates whether the action being controlled is enabled (`true`) or disabled (`false`). For transfers and conferencing, if the action (`agentAction`) is disabled, the button is still visible but not functional. Available in API version 63.0 and later. | Yes | ## Example ### Capacity Percentage Request to create an AgentWork record when a PSR doesn’t exist, setting the rep’s capacity for work items by percentage and enabling the “Transfer” action capability: ```json { "userId": "D05xx000001x7tN", "workItemId": "0Mxxx0000004DBK", "capacityPercentage": 100, "routingContext": { "conversationIdentifier": "1234a5bc-52b8-43ed-9608-7997f7b88dc1", "routingType": "Initial", "routingCorrelationId": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d" }, "agentActionVisibilities": [{ "agentAction": "Transfer", "visible": false }] } ``` ### Capacity Weight Request to create an AgentWork record when a PSR doesn’t exist, setting the rep’s capacity for work items by weight and disabling the “Conference” action capability: ```json { "userId": "D05xx000001x7tN", "workItemId": "0Mxxx0000004DBK", "capacityWeight": 10, "routingContext": { "conversationIdentifier": "1234a5bc-52b8-43ed-9608-7997f7b88dc1", "routingType": "Initial", "routingCorrelationId": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d" }, "agentActionVisibilities": [{ "agentAction": "Conference", "visible": false }] } ``` ### Pending Service Routing Record Exists Request to create an AgentWork record for an existing Pending Service Routing (PSR) record with the “Transfer” action capability enabled for reps: ```json { "userId": "D05xx000001x7tN", "workItemId": "0Mxxx0000004DBK" "agentActionVisibilities": [{ "agentAction": "Transfer", "visible": true }] } ``` ## See Also - _GitHub_: [Interaction Service APIs](https://github.com/salesforce-misc/interaction-service-apis) - _GitHub:_ [Interaction Service API Error Codes](https://github.com/salesforce-misc/interaction-service-apis/blob/main/ERRORCODES.md) - _Bring Your Own Channel for CCaaS:_ [Configure Partner-Owned Routing and Consent](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/configure-partner-routing-consent.html) - _Bring Your Own Channel for CCaaS:_ [Dynamically Control Messaging Actions](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/control-messaging-actions.html) - _Salesforce Help:_ [Understand Capacity Models](https://help.salesforce.com/s/articleView?id=service.service_presence_capacity_model.htm) # Create an Interface Object Create an object that inherits from the [`ViewComponent`](https://salesforce-async-messaging.github.io/messaging-in-app-android/sdk/ui/com.salesforce.android.smi.ui/-view-components/index.html) interface. Pass this to the UI client to define how to treat each [`ChatFeedEntry`](https://salesforce-async-messaging.github.io/messaging-in-app-android/sdk/ui/com.salesforce.android.smi.ui/-chat-feed-entry/index.html) type using the `EntryRenderMode`. ``` val entryRenderMode: ((entry: ChatFeedEntry) -> EntryRenderMode) = { entry -> when (entry.contentType) { // Display participant changed events using the existing UI ConversationEntryType.ParticipantChanged.name -> EntryRenderMode.Existing // Replace the UI for any Message type entry with the UI you provide ConversationEntryType.Message.name -> EntryRenderMode.None // Ignore RoutingWorkResult type entries ConversationEntryType.RoutingWorkResult.name -> EntryRenderMode.Ignore else -> EntryRenderMode.Existing } } uiClient.viewComponents = object : ViewComponents { @Composable override fun ChatFeedEntry(entry: ChatFeedEntry, content: @Composable () -> Unit) { when (entryRenderMode(entry)) { EntryRenderMode.None -> Unit // Display default content EntryRenderMode.Existing -> content() EntryRenderMode.Replace -> ReplacementEntry(entry, uiClient.conversationClient(appContext)) } } } ``` **note:** All entries of a type are affected by the EntryRenderMode you set for that type. Use this feature with caution! For example, if you choose to hide `RoutingWorkResult` entries, it affects transfer events and estimated wait time. # Create an Object That Contains Label Translations JSON File for a Static Resource Create a JSON file that includes label translations. Upload this JSON file in [Static Resources](https://developer.salesforce.com/docs/platform/lwc/guide/create-resources.html) in Salesforce Setup. Alternatively, create the object directly in the LWC Javascript file. ```javascript { "ChatHeaderTitle": { "en": "Chat", "es" : "Charlar", "fr" : "Chatte" }, "ChatHeaderRequestTranscript": { "en": "Request Transcript", "es" : "Solicitar transcripción", "fr" : "Demander une transcription" }, "ChatHeaderEndConversation" : { "en": "End conversation", "es" : "Terminar la conversacion", "fr" : "Mettre fin a la conversation" } } ``` Here’s an example of our static resource in the code snippet for an LWC component. The function `getCustomLabels` creates an object of labels for the snippet language. ```javascript import { LightningElement, api, track } from "lwc"; import customLabel from "@salesforce/resourceUrl/customLabels"; export default class CustomChatHeader extends LightningElement { ... @track labels = {}; ... connectedCallback() { this.getCustomLabels(); } ... getCustomLabels() { try { const language = this.configuration.language; let allLabels; let request = new XMLHttpRequest(); request.open("GET", customLabel, false); request.send(null); allLabels = JSON.parse(request.responseText); // Get label translations by language for (let labelName in allLabels) { this.labels[labelName] = allLabels[labelName][language]; } } catch { console.log("Error getting label translations"); } } } ``` # Create and Configure the Custom Platform Event Create a custom platform event to send and receive messages between Salesforce and the partner messaging system. Define fields to customize the platform event data, and assign permissions to the platform event. ## Task 1: Create the Custom Platform Event 1. From Setup, in the Quick Find box, enter `Platform Events`, and then select **Platform Events**. 2. Click **New Platform Event**. 3. In the Label field, enter a name for the platform event. For example, “Test Event”. 4. In the Plural Label field, enter the plural form of the platform event label name. For example, enter `Test Events`. 5. Verify that the Event Type field is set to **High Volume**. 6. Verify that the Publish Behavior field is set to **Publish After Commit**. 7. Verify that the Deployment Status field is set to **Deployed**. 8. Click **Save**. ## Task 2: Add Custom Fields to the Platform Event 1. From Setup, in the Quick Find box, enter `Platform Events`, and then select **Platform Events**. 2. Click the name of the custom platform event you created in the previous task. 3. In the Custom Field & Relationships section, click **New** and create two fields with these data types and field labels. - Data Type: **Text** and Field Label: **EventType**. In the Length field, set the number of characters to a value between 36 and 255. - Data Type: **Text Area (Long)** and Field Label: **Payload**. ## Task 3: Assign Permissions to the Platform Event 1. From Setup, in the Quick Find box, enter `Permission Sets`, and then select **Permission Sets**. 2. Click **SCRT2 Integration User**. 3. Click **Object Settings**. 4. Click the name of the custom platform event you just created. 5. Click **Edit**, and select **Read** and **Create**. 6. Save your changes. **See Also** - _Salesforce Help_: [Define and Manage Platform Events](https://help.salesforce.com/s/articleView?id=platform.platform_events.htm) - _Salesforce Help_: [Create Custom Fields](https://help.salesforce.com/s/articleView?id=platform.adding_fields.htm) - _Salesforce Help_: [Managed Profile Lists](https://help.salesforce.com/s/articleView?id=platform.users_custom_profile_lists.htm) ## See Also - [Bring Your Own Channel For CCaaS Outbound Event Reference](/docs/service/messaging-byoc-ccaas/references/byoc-ccaas-outbound-event-reference/outbound-event-reference.html) # Create and Configure the Custom Platform Event Create a custom platform event to send and receive messages between Salesforce and the partner messaging system. Define fields to customize the platform event data, and assign permissions to the platform event. ## Task 1: Create the Custom Platform Event 1. From Setup, in the Quick Find box, enter `Platform Events`, and then select **Platform Events**. 2. Click **New Platform Event**. 3. In the Label field, enter a name for the platform event. For example, “Test Event”. 4. In the Plural Label field, enter the plural form of the platform event label name. For example, enter `Test Events`. 5. Verify that the Event Type field is set to **High Volume**. 6. Verify that the Publish Behavior field is set to **Publish After Commit**. 7. Verify that the Deployment Status field is set to **Deployed**. 8. Click **Save**. ## Task 2: Add Custom Fields to the Platform Event 1. From Setup, in the Quick Find box, enter `Platform Events`, and then select **Platform Events**. 2. Click the name of the custom platform event you created in the previous task. 3. In the Custom Field & Relationships section, click **New** and create two fields with these data types and field labels. - Data Type: **Text** and Field Label: **EventType**. In the Length field, set the number of characters to a value between 36 and 255. - Data Type: **Text Area (Long)** and Field Label: **Payload**. ## Task 3: Assign Permissions to the Platform Event 1. From Setup, in the Quick Find box, enter `Permission Sets`, and then select **Permission Sets**. 2. Click **SCRT2 Integration User**. 3. Click **Object Settings**. 4. Click the name of the custom platform event you just created. 5. Click **Edit**, and select **Read** and **Create**. 6. Save your changes. **See Also** - _Salesforce Help_: [Define and Manage Platform Events](https://help.salesforce.com/s/articleView?id=platform.platform_events.htm) - _Salesforce Help_: [Create Custom Fields](https://help.salesforce.com/s/articleView?id=platform.adding_fields.htm) - _Salesforce Help_: [Managed Profile Lists](https://help.salesforce.com/s/articleView?id=platform.users_custom_profile_lists.htm) ## See Also - [Bring Your Own Channel For Messaging Outbound Event Reference](https://developer.salesforce.com/docs/service/messaging-partner/guide/docs/service/messaging-partner/references/outbound-event-reference/outbound-event-reference.html) # Create Bundle Creates a bundle of service appointments manually. This resource accepts service appointment IDs and a manual bundling policy ID. The manual bundling policy specifies the bundling rules and has to be marked for manual bundling. This resource returns the ID of the bundle service appointment. This API is not supported in Gov Cloud. This endpoint is available in version 54.0 and later of the Salesforce API. ## Add a Remote Site 1. From Setup, in the Quick Find box, enter `Security`, and then select **Remote Site Settings**. 2. Click **New Remote Site**. 3. Enter a name. 4. For Remote Site URL, enter `https://api.salesforce.com/` 5. Save your changes. ## Syntax **URI**: `HOST/bundleflow/api/v1.0/bundle` Where `HOST` is a variable. **Format**: JSON **HTTP Method**: POST **Authentication**: `Authorization: Bearer TOKEN` Where `TOKEN` is a variable. If the authentication token isn’t valid, a 401 HTTP status is returned. **Headers**: - `request.setHeader('x-sfdc-tenant-id', 'core/prod/ORG-ID_18_Characters');`—Field Service functional domain - `sf_api_version`—Salesforce API version. Minimum version is 53.0. - `Authorization`—Authorization token. - `Content-Type`—File format. Valid value is `JSON`. - `Referer`—Org domain URL. ## Request Body The request body contains these properties. | Field | Type | Description | | ---------------------- | ------ | -------------------------------------------------------------------------- | | `user` | String | Optional. User name of user sending the request. | | `initiate` | String | Type of bundle request. Valid value: `manual`. | | `bundlePolicyId` | String | ID of the related bundle policy containing the bundling rules. | | `saRequestPayloads` | Array | Details of service appointments that are bundled. | | `serviceAppointmentId` | String | ID of service appointments to be bundled. | | `action` | String | Bundling action performed on this service appointment. Valid value: `add`. | ## Example This example shows a manual bundle request of two service appointments. ```nolang { "user": "Misha1", "initiate": "manual", "bundlePolicyId": "7sTx00000000006EAA", "saRequestPayloads": [ { "serviceAppointmentId": "08px000000NzbmsAAB", "action": "add" }, { "serviceAppointmentId": "08pT300000006LLIAY", "action": "add" } ] } ``` ## Response Body The response body contains these properties. | Field | Type | Description | | ----------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------- | | `bundleId` | String | ID of the new bundle. If the bundle isn’t created, this field is `null`. | | `responsePayloads` | Array | Details of the bundled objects. | | `objectName` | String | Type of object. Output: `ServiceAppointment`. | | `objectId` | String | ID of the service appointment. | | `action` | String | Action performed on the object. | | `status` | String | Specifies if this object is bundled correctly. Output: `SUCCESS` or `FAIL`. | | `messageCode` | Number | Success or error code of bundling the service appointment. 0 means success. The error codes are listed in [Error Responses](#error-responses). | | `message` | String | Success or error message of bundling the object. | | `status` | String | Status of the request. Output: `SUCCESS` or `FAIL`. | | `messageCode` | Number | Success or error code of the request. 0 means success. The error codes are listed in [Error Responses](#error-responses). | | `message` | String | Success or error message of the request. | | `messageAdditionalInfo` | String | More information provided by Salesforce. | ## Example: Successful Response This example shows the output of two service appointments bundled successfully. ```nolang { "bundleId": "08px000000NzdH8AAJ", "responsePayloads": [ { "objectName": "ServiceAppointment", "objectId": "08px000000NzbmsAAB", "action": "add", "status": "SUCCESS", "messageCode": "NONE", "message": "Success", "messageParams": [ ] }, { "objectName": "ServiceAppointment", "objectId": "08pT300000006LLIAY", "action": "add", "status": "SUCCESS", "messageCode": "NONE", "message": "Success", "messageParams": [ ] } ], "status": "SUCCESS", "messageCode": "NONE", "message": "Success" } ``` ## Example: Fail Response This example shows the output of a request that’s trying to bundle a service appointment that’s already a bundle service appointment. A service appointment can’t be part of two bundles, so the response status is `FAIL`. ```nolang { "bundleId":null, "responsePayloads":[ { "objectName":"ServiceAppointment", "objectId":"08px000000NzdH8AAJ", "action":"add", "status":"FAIL", "messageCode":"SA_ALREADY_BUNDLED", "message":"Is already a bundle service appointment.", "messageParams":[ ] } ], "status":"FAIL", "messageCode":"ERROR_CREATING_BUNDLE", "message":"We couldn't bundle the service appointment.", "messageAdditionalInfo": "" } ``` ## Error Responses | Code | Name | Message | | ---- | ----------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | | 0 | NONE | \: Success. | | 1 | UNSUPPORTED_VERSION | Ask your admin to check the API version, then try again. | | 2 | SA_PAYLOAD_SHOULD_CONTAIN_ADD_ACTIONS_ONLY | Create bundles using add actions only. | | 3 | EMPTY_BUNDLE_POLICY | Enter an ID for the bundlePolicyId. | | 4 | EMPTY_BUNDLE_INITIATE | Specify manual or auto for the initiate entry. | | 5 | EMPTY_BUNDLE_SERVICE_APPOINTMENT | Add a bundle service appointment. | | 6 | SA_PAYLOAD_DUPLICATED_SAS | Remove duplicate service appointment IDs. | | 7 | SA_IS_BUNDLE | \: Is already a bundle service appointment. | | 8 | SA_ALREADY_BUNDLED | \: Is a bundle member service appointment in another bundle. | | 9 | STATUS_FORBIDDEN | \: Can’t be bundled in the current status. | | 10 | SA_PAYLOAD_SHOULD_NOT_CONTAIN_MIX_ACTIONS | Send separate requests for add and remove actions. | | 11 | SA_IS_NOT_BUNDLE | Select a bundle service appointment and try again. | | 12 | EXCEEDED_BUNDLE_MEMBERS_LIMIT | You reached the maximum number of service appointments for this bundle. Remove some of them and try again. | | 13 | SA_PAYLOAD_SHOULD_CONTAIN_ONLY_BUNDLE_MEMBERS | To remove bundle members from a bundle, include only service appointments that are bundle members. | | 14 | ERROR_IN_BASIC_VALIDATIONS | We couldn’t bundle the service appointments. | | 15 | ERROR_IN_LIMIT_VALIDATIONS | N/A | | 16 | ERROR_IN_CRITERIA_VALIDATIONS | N/A | | 17 | ERROR_IN_SERVICE_TERRITORY_VALIDATIONS | Confirm or revise the service territories of the selected service appointments. Or ask your admin for help. | | 18 | ERROR_IN_RESTRICTION_VALIDATIONS | Confirm or revise the selected service appointments. Or ask your admin to check the restriction policies. | | 19 | EXCEEDED_BUNDLE_DURATION_LIMIT | N/A | | 20 | EMPTY_BODY | Fill in the request. | | 21 | SA_IS_NOT_BUNDLED | \: Can’t remove a service appointment that isn’t in the bundle. | | 22 | ERROR_IN_AGGREGATION | Confirm or revise the selected service appointments. Or ask your admin to check the aggregation policies. | | 23 | ERROR_IN_PROPAGATION | Confirm or revise the selected service appointments. Or ask your admin to check the propagation policies. | | 24 | GET_POLICY_FAILURE | Ask your admin to check the bundle policies, then try again. | | 25 | GET_CONFIG_FAILURE | Ask your admin to check the bundle config, then try again. | | 26 | GET_BUNDLE_INFO_FAILURE | Try again later. | | 27 | ERROR_IN_LOGIC | We couldn’t bundle the service appointments. | | 28 | EMPTY_BUNDLE_MEMBERS | Add bundle member service appointments. | | 29 | EMPTY_BUNDLE_PARENT_WORK_ORDER_ID | Add the work order ID for the bundle service appointment. | | 30 | UNBUNDLE_REQUEST_ASSIGNED_RESOURCES_NOT_COMPATiBLE | To unbundle a scheduled bundle, send assigned resources for each service appointment. | | 31 | EMPTY_OLD_VALUES | To update a bundle, send the current values. | | 32 | EMPTY_NEW_VALUES | To update a bundle, send the new values. | | 33 | SA_PAYLOAD_SHOULD_CONTAIN_AT_LEAST_ONE_ADD_OR_REMOVE_ACTION | To update a bundle, send at least one add or remove action. | | 34 | FORBIDDEN_FIELDS_IN_POLICY_OBJECT | Confirm or revise the selected service appointments. Or ask your admin to check the field names selected in the related policies. | | 35 | EMPTY_SERVICE_TERRITORY | Add a Service Territory ID. | | 36 | EMPTY_START_TIME | Add the interval’s start time. | | 37 | EMPTY_END_TIME | Add the interval’s end time. | | 38 | ERROR_IN_BUNDLE_POLICY_RFC | Confirm or revise the selected service appointments. Or ask your admin to check the recordset filter criteria in the bundle policy. | | 39 | ERROR_IN_TIME_ZONE_VALIDATION | Select service appointments that are in the same time zone. Or ask your admin for help. | | 40 | ERROR_IN_LOGIC_UNBUNDLE | We couldn’t unbundle the service appointment. | | 41 | ERROR_CREATING_BUNDLE | We couldn’t bundle the service appointments. | | 42 | ERROR_ADDING_TO_BUNDLE | We couldn’t add the service appointment to the bundle. | | 43 | ERROR_REMOVING_FROM_BUNDLE | We couldn’t remove the service appointment from the bundle. | | 44 | ERROR_UNBUNDLING | We couldn’t unbundle the service appointment. | | 58 | ERROR_IN_MSW_VALIDATIONS | We can’t bundle service appointments with dependencies. Remove the dependencies and try again. | | -500 | http error | Hmm… Something went wrong. Try again. | ## Code Sample from Apex ```apex public static Map createSABundle() { String apiVersion = '54.0'; // Spring '22 String bundleApi = '/bundleflow/api/v1.0/bundle'; String host = {Namespace}.BundleLogic.getBundlerFalconEnvironment(); String ref = URL.getOrgDomainUrl().toExternalForm(); String bundleService = host + bundleApi; // Create HTTP request HttpRequest request = new HttpRequest(); request.setEndpoint(bundleService); request.setMethod('POST'); request.setHeader('sf_api_version', apiVersion); request.setHeader('Content-Type', 'application/json' ); // NOTE: This user must have 'Field Service Integration' permissions. request.setHeader('Authorization', 'Bearer ' + UserInfo.getSessionId()); request.setHeader('Referer', ref); request.setHeader('x-sfdc-tenant-id', 'core/prod/ORG-ID_18_Characters'); request.setTimeout(120000); // Create the body Map body = new Map(); body.put('initiate','manual'); body.put('bundlePolicyId','7sT9A0000004DX6UAM'); // NOTE: Use a real bundle policy ID. Map saList = new Map(); saList.put('serviceAppointmentId', '08p9A0000005LEGQA2'); // NOTE: Use a real Service Appointment ID. saList.put('action', 'add'); List objectsList = new List(); objectsList.add(saList); body.put('saRequestPayloads', objectsList); String reqBody = JSON.serialize(body); System.debug(body); request.setBody(reqBody); HttpResponse response = new Http().send(request); // Parse the JSON response // Handle a redirect message while (response.getStatusCode() == 302) { request.setEndpoint(response.getHeader('Location')); response = new Http().send(request); } Map returnValue = new Map(); returnValue.put('statusCode', String.valueOf(response.getStatusCode())); // Return value when we don't get a success response if (response.getStatusCode() != 200) { returnValue.put('message', 'The status code returned was not expected: ' + response.getStatusCode() + ' ' + response.getStatus()); System.debug(returnValue.get('message')); return (returnValue); // Return value when we do get a success response } else { returnValue.put('message', response.getBody()); System.debug(response.getBody()); return (returnValue); } } Map response = createSABundle(); System.debug(response); ``` # Create Developer Hub and Namespace Orgs Link a Developer Hub org to a namespace org to use the Salesforce Developer Experience to develop a second-generation package. ## Create an Org with Dev Hub Features Enabled Use this Dev Hub org to manage scratch orgs and build managed packages for distribution. 1. Create a Developer Edition org. 2. Turn on Dev Hub features. From Setup, enter `Dev Hub` in the Quick Find box and select **Dev Hub**. Then, click **Enable**. After you enable Dev Hub, you can’t disable it. 3. Select **Unlocked Packages and Second-Generation Managed Packages**. ## Create a Namespace Org Create a separate org just to manage the namespace. If you’re creating a managed package for distribution, a namespace is required. 1. Create a Developer Edition org. 2. [Create a namespace](https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/namespaces_creating.htm). 3. In the Dev Hub org, use Namespace Registry to register the namespace that you created. See [Link a Namespace to a Dev Hub Org](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_reg_namespace.htm) for more information. 4. In the [`sfdx-project.json` file](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_ws_config.htm), use the namespace attribute to specify your namespace. # Create Engagement Topic Creates an engagement topic record that connects a given topic ID. For example, a service appointment ID, to a messaging session ID. If an engagement topic for this connection already exists, no action is taken. This action is available in API version 63.0 and later. ## Supported REST HTTP Methods **URI:** `/services/data/vXX.X/actions/standard/createEngagementTopic` **Formats:** JSON, XML **HTTP Methods:** POST **Authentication:** `Authorization: Bearer TOKEN` Where `TOKEN` is a variable. ## Inputs |Input|Type|Description| |-----|----|-----------| |`topicId`|id|Required. The topic’s ID.| ## Outputs |Output|Type|Description| |------|----|-----------| |`completionStatus`|boolean|Defines whether the engagement topic was created successfully.| ## Example Sample request body: ```nolang { "inputs" : [{ "topicId" : "08p000000000001AAA" }] } ``` Sample response body: ```nolang { "actionName" : "createEngagementTopic", "errors" : null, "isSuccess" : true, "outputValues" : { "completionStatus" : true } } ``` # Create or Update Salesforce Records from a Chat Session When a chat session begins, you can create or find records within your org and pass this information to the agent. Using this technique, your agent can immediately have all the context they need for an effective chat session. **important:** 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](https://help.salesforce.com/s/articleView?id=service.miaw_intro_landing.htm&type=5) before that date. Messaging offers many of the [chat features](https://help.salesforce.com/s/articleView?id=service.miaw_chat_vs_messaging.htm&type=5) that you love plus asynchronous conversations that can be picked back up at any time. Learn about chat retirement in [Help](https://help.salesforce.com/s/articleView?id=001790618&type=1). ## Overview Before reading these instructions, review [Show Pre-Chat Fields to User](https://developer.salesforce.com/docs/service/service-sdk-android/guide/android-chat-prechat-fields.md) to understand how to create pre-chat fields. Pre-chat fields are always sent to the agent at the start of the session. But if you want to fill in fields of a particular record, instantiate a [`ChatEntity`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/model/ChatEntity.html) for each Salesforce object (for example, `Case` or `Contact`) and add a [`ChatEntityField`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/model/ChatEntityField.html) for each field association within that Salesforce object (for example, `Subject` or `LastName`). After you've built your [`ChatEntity`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/model/ChatEntity.html) objects, pass them to your [`ChatConfiguration`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/ChatConfiguration.html) builder using the [`chatEntities`](https://developer.salesforce.com/docs/service/service-sdk-android/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/ChatConfiguration.Builder.html#chatEntities(java.util.List%3Ccom.salesforce.android.chat.core.model.ChatEntity%3E)>) method. **note:** Case creation does not currently work for Omni-Channel routing without a setup change to your org. To resolve this problem, raise a ticket with Salesforce to ensure that Omni-Channel is enabled to create a Case in your org. ## Basic Flow This sample shows how to create the first and last name to a contact record in your org. This example doesn't involve user input, but you can use [`PreChatTextInputField`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/ui/model/PreChatTextInputField.html) instead of [`ChatUserData`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/model/ChatUserData.html) to allow user input. In Java: ```java // Create chat user data that doesn't require user interaction ChatUserData firstNameData = new ChatUserData("FirstName", "Jane", true); ChatUserData lastNameData = new ChatUserData("LastName", "Doe", true); ``` In Kotlin: ```java // Create chat user data that doesn't require user interacti val firstNameData = ChatUserData("FirstName", "Jane", true) val lastNameData = ChatUserData("LastName", "Doe", true) ``` The first argument is the field label that is displayed to the agent in the transcript. The second argument is the value. The third argument is whether this value is displayed to the agent. After you create your [`ChatUserData`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/model/ChatUserData.html) objects, create a [`ChatEntity`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/model/ChatEntity.html) for each Salesforce object that you want to associate these values with. The [`ChatEntity`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/model/ChatEntity.html) object contains a for each field association. When you build this [`ChatEntityField`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/model/ChatEntityField.html) object, pass in a reference to the associated object. In this example, we create two [`ChatEntityField`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/model/ChatEntityField.html) objects and one using those two objects. In Java: ```java // Build chat entity fields ChatEntityField firstNameField = new ChatEntityField.Builder().doFind(true) .isExactMatch(true) .doCreate(true) .build("FirstName", firstNameData); ChatEntityField lastNameField = new ChatEntityField.Builder().doFind(true) .isExactMatch(true) .doCreate(true) .build("LastName", lastNameData); // Build a chat entity object from those fields // (to map user data to fields in a Salesforce record) ChatEntity contactEntity = new ChatEntity.Builder() .showOnCreate(true) .addChatEntityField(firstNameField) .addChatEntityField(lastNameField) .build("Contact"); ``` In Kotlin: ```java // Build chat entity fields val firstNameField = ChatEntityField.Builder().doFind(true) .isExactMatch(true) .doCreate(true) .build("FirstName", firstNameData) val lastNameField = ChatEntityField.Builder().doFind(true) .isExactMatch(true) .doCreate(true) .build("LastName", lastNameData) // Build a chat entity object from those fields // (to map user data to fields in a Salesforce record) val contactEntity = ChatEntity.Builder() .showOnCreate(true) .addChatEntityField(firstNameField) .addChatEntityField(lastNameField) .build("Contact") ``` When creating the [`ChatEntityField`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/model/ChatEntityField.html) object, you can specify whether to search for that field (`doFind`), whether the match must be exact (`isExactMatch`), and whether to create a new record if not found (`doCreate`). When creating the [`ChatEntity`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/model/ChatEntity.html) object, along with the name of the Salesforce object and the list of fields, you can specify whether the contact should pop up for the agent upon creation (`showOnCreate`). See the reference documentation for [`ChatEntity`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/model/ChatEntity.html) and [`ChatEntityField`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/model/ChatEntityField.html). Also refer to [Chat REST API Data Types](https://developer.salesforce.com/docs/atlas.en-us.live_agent_rest.meta/live_agent_rest/live_agent_rest_data_types.htm) for the `Entity` and `EntityFieldsMaps` data types, which define the underlying functionality of these SDK objects. After you've built your [`ChatEntity`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/model/ChatEntity.html) objects, pass them to your [`ChatConfiguration`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/ChatConfiguration.html) builder using the [`chatEntities`](https://developer.salesforce.com/docs/service/service-sdk-android/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/ChatConfiguration.Builder.html#chatEntities(java.util.List%3Ccom.salesforce.android.chat.core.model.ChatEntity%3E)>) method. In Java: ```java // Create the chat configuration builder final ChatConfiguration.Builder chatConfigurationBuilder = new ChatConfiguration.Builder(ORG_ID, BUTTON_ID, DEPLOYMENT_ID, LIVE_AGENT_POD); // Add user data and entities chatConfigurationBuilder .chatUserData(firstNameData, lastNameData) .chatEntities(contactEntity); // Build the chat configuration object ChatConfiguration chatConfiguration = chatConfigurationBuilder.build(); ``` In Kotlin: ```java // Create the chat configuration builder val chatConfigurationBuilder = ChatConfiguration.Builder(ORG_ID, BUTTON_ID, DEPLOYMENT_ID, LIVE_AGENT_POD) // Add user data and entities chatConfigurationBuilder .chatUserData(firstNameData, lastNameData) .chatEntities(contactEntity) // Build the chat configuration object val chatConfiguration = chatConfigurationBuilder.build() ``` ## Example This code sample adds `FirstName`, `LastName`, `Email` to a `Contact` record and a `Subject` field to a `Case` record. In Java: ```java // Create some hidden fields with specific values ChatUserData firstNameData = new ChatUserData( "FirstName", "Jane", true); ChatUserData lastNameData = new ChatUserData( "LastName", "Doe", true); ChatUserData emailData = new ChatUserData( "Email", "jane.doe@salesforce.com", true); ChatUserData subjectData = new ChatUserData( "Subject", "Chat Session", true); // Map Subject to a field in a Case record ChatEntity caseEntity = new ChatEntity.Builder() .showOnCreate(true) .linkToTranscriptField("Case") .addChatEntityField( new ChatEntityField.Builder() .doFind(true) .isExactMatch(true) .doCreate(true) .build("Subject", subjectData)) .build("Case"); // Map FirstName, LastName, and Email to fields in a Contact record ChatEntity contactEntity = new ChatEntity.Builder() .showOnCreate(true) .linkToTranscriptField("Contact") .linkToAnotherSalesforceObject(caseEntity, "ContactId") .addChatEntityField( new ChatEntityField.Builder() .doFind(true) .isExactMatch(true) .doCreate(true) .build("FirstName", firstNameData)) .addChatEntityField( new ChatEntityField.Builder() .doFind(true) .isExactMatch(true) .doCreate(true) .build("LastName", lastNameData)) .addChatEntityField( new ChatEntityField.Builder() .doFind(true) .isExactMatch(true) .doCreate(true) .build("Email", emailData)) .build("Contact"); // Create the chat configuration builder final ChatConfiguration.Builder chatConfigurationBuilder = new ChatConfiguration.Builder(ORG_ID, BUTTON_ID, DEPLOYMENT_ID, LIVE_AGENT_POD); // Add user data and entities chatConfigurationBuilder .chatUserData(firstNameData, lastNameData, emailData, subjectData) .chatEntities(caseEntity, contactEntity); // Build the chat configuration object ChatConfiguration chatConfiguration = chatConfigurationBuilder.build(); ``` In Kotlin: ```java // Create chat user data that doesn't require user interaction val firstNameData = ChatUserData( "FirstName", "Jane", true) val lastNameData = ChatUserData( "LastName", "Doe", true) val emailData = ChatUserData( "Email", "jane.doe@salesforce.com", true) val subjectData = ChatUserData( "Subject", "Chat Session", true) // Map Subject to a field in a Case record val caseEntity = ChatEntity.Builder() .showOnCreate(true) .linkToTranscriptField("Case") .addChatEntityField( ChatEntityField.Builder() .doFind(true) .isExactMatch(true) .doCreate(true) .build("Subject", subjectData)) .build("Case") // Map FirstName, LastName, and Email to fields in a Contact record val contactEntity = ChatEntity.Builder() .showOnCreate(true) .linkToTranscriptField("Contact") .linkToAnotherSalesforceObject(caseEntity, "ContactId") .addChatEntityField( ChatEntityField.Builder() .doFind(true) .isExactMatch(true) .doCreate(true) .build("FirstName", firstNameData)) .addChatEntityField( ChatEntityField.Builder() .doFind(true) .isExactMatch(true) .doCreate(true) .build("LastName", lastNameData)) .addChatEntityField( ChatEntityField.Builder() .doFind(true) .isExactMatch(true) .doCreate(true) .build("Email", emailData)) .build("Contact") // Create the chat configuration builder val chatConfigurationBuilder = ChatConfiguration.Builder(ORG_ID, BUTTON_ID, DEPLOYMENT_ID, LIVE_AGENT_POD) // Add user data and entities chatConfigurationBuilder .chatUserData(firstNameData, lastNameData, emailData, subjectData) .chatEntities(caseEntity, contactEntity) // Build the chat configuration object val chatConfiguration = chatConfigurationBuilder.build() ``` # Create or Update Salesforce Records from a Chat Session When a chat session begins, you can create or find records within your org and pass this information to the agent. Using this technique, your agent can immediately have all the context they need for an effective chat session. **important:** 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](https://help.salesforce.com/s/articleView?id=service.miaw_intro_landing.htm&type=5) before that date. Messaging offers many of the [chat features](https://help.salesforce.com/s/articleView?id=service.miaw_chat_vs_messaging.htm&type=5) that you love plus asynchronous conversations that can be picked back up at any time. Learn about chat retirement in [Help](https://help.salesforce.com/s/articleView?id=001790618&type=1). ## Overview Before reading these instructions, review [Show Pre-Chat Fields to User](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/live-agent-prechat-fields.md) to understand how to create pre-chat fields. Pre-chat fields are always sent to the agent at the start of the session. But if you want to fill in fields of a particular record, instantiate an [`SCSPrechatEntity`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSPrechatEntity.html) for each Salesforce object (for example, `Case` or `Contact`) and instantiate an [`SCSPrechatEntityField`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSPrechatEntityField.html) for each field association within that Salesforce object (for example, `Subject` or `LastName`). Each pre-chat entity must map to a pre-chat object ([`SCSPrechatObject`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSPrechatObject.html), [`SCSPrechatTextInputObject`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSPrechatTextInputObject.html), or [`SCSPrechatPickerObject`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSPrechatPickerObject.html)). The label string in this pre-chat object must be identical to the label used in your [`SCSPrechatEntityField`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSPrechatEntityField.html) object. Use the config object's [`prechatFields`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSChatConfiguration.html#/c:objc(cs)SCSChatConfiguration(py)prechatFields>) property for the array of your pre-chat objects and the [`prechatEntities`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSChatConfiguration.html#/c:objc(cs)SCSChatConfiguration(py)prechatEntities>) property for the array of your entity objects. **note:** Case creation does not currently work for Omni-Channel routing without a setup change to your org. To resolve this problem, raise a ticket with Salesforce to ensure that Omni-Channel is enabled to create a Case in your org. ## Basic Flow This sample code shows how to pass the first and last name to a contact record in your org. This example doesn't involve user input, but you can use [`SCSPrechatTextInputObject`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSPrechatTextInputObject.html) instead of [`SCSPrechatObject`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSPrechatObject.html) to allow user input. In Swift: ```java // Create pre-chat fields let firstNameField = SCSPrechatObject(label: "First Name", value: "Jane") let lastNameField = SCSPrechatObject(label: "Last Name", value: "Doe") // Create entity fields let firstNameEntityField = SCSPrechatEntityField(fieldName: "FirstName", label: "First Name") firstNameEntityField.doFind = true firstNameEntityField.doCreate = true let lastNameEntityField = SCSPrechatEntityField(fieldName: "LastName", label: "Last Name") lastNameEntityField.doFind = true lastNameEntityField.doCreate = true // Create an entity object let contactEntity = SCSPrechatEntity(entityName: "Contact") contactEntity.showOnCreate = true // Add entity fields to entity object contactEntity.entityFieldsMaps.add(firstNameEntityField) contactEntity.entityFieldsMaps.add(lastNameEntityField) // Update config object with the pre-chat fields config!.prechatFields = [firstNameField, lastNameField] // Update config object with the entity mappings config!.prechatEntities = [contactEntity] ``` In Objective-C: ```java // Create pre-chat fields SCSPrechatObject* firstNameField = [[SCSPrechatObject alloc] initWithLabel:@"First Name" value:@"Banana"]; SCSPrechatObject* lastNameField = [[SCSPrechatObject alloc] initWithLabel:@"Last Name" value:@"Town"]; // Create entity fields SCSPrechatEntityField* firstNameEntityField = [[SCSPrechatEntityField alloc] initWithFieldName:@"FirstName" label:@"First Name"]; firstNameEntityField.doFind = YES; firstNameEntityField.doCreate = YES; SCSPrechatEntityField* lastNameEntityField = [[SCSPrechatEntityField alloc] initWithFieldName:@"LastName" label:@"Last Name"]; lastNameEntityField.doFind = YES; lastNameEntityField.doCreate = YES; // Create an entity object SCSPrechatEntity* contactEntity = [[SCSPrechatEntity alloc] initWithEntityName:@"Contact"]; contactEntity.showOnCreate = YES; // Add entity fields to entity object [contactEntity.entityFieldsMaps addObject:firstNameEntityField]; [contactEntity.entityFieldsMaps addObject:lastNameEntityField]; // Update config object with the pre-chat fields NSMutableArray *preChatFields = [NSMutableArray new]; [preChatFields addObject:firstNameField]; [preChatFields addObject:lastNameField]; config.prechatFields = preChatFields; // Update config object with the entity mappings NSMutableArray *prechatEntities = [NSMutableArray new]; [prechatEntities addObject:contactEntity]; config.prechatEntities = prechatEntities; ``` ## Entity Configuration Settings The [`SCSPrechatEntity`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSPrechatEntity.html) and [`SCSPrechatEntityField`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSPrechatEntityField.html) classes give you various configuration settings for mapping fields. For example, if a field doesn't exist, you can have the SDK create that field. The following code sample illustrates some basic building blocks when creating an [`SCSPrechatEntity`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSPrechatEntity.html) object. In Swift: ```java // Create an entity let entity = SCSPrechatEntity(entityName: "Contact") entity.saveToTranscript = "ContactId" // Save this entity to Transcript.ContactId entity.linkToEntityName = "Case" entity.linkToEntityField = "ContactId" // Link this entity to Case.ContactId // Add an entity field map to our entity let entityField = SCSPrechatEntityField(fieldName: "FirstName", label: "First Name") entityField.doFind = true // Attempt to search for that field entityField.isExactMatch = true // Must be an exact match entityField.doCreate = true // Create if not found entity.entityFieldsMaps.add(entityField) // Add field to entity map ``` In Objective-C: ```java // Create an entity SCSPrechatEntity* entity = [[SCSPrechatEntity alloc] initWithEntityName:@"Contact"]; entity.saveToTranscript = @"ContactId"; // Save this entity to Transcript.ContactId entity.linkToEntityName = @"Case"; entity.linkToEntityField = @"ContactId"; // Link this entity to Case.ContactId // Add an entity field map to our entity SCSPrechatEntityField* entityField = [[SCSPrechatEntityField alloc] initWithFieldName:@"FirstName" label:@"First Name"]; entityField.doFind = YES; // Attempt to search for that field entityField.isExactMatch = YES; // Must be an exact match entityField.doCreate = YES; // Create if not found [entity.entityFieldsMaps addObject:entityField]; // Add field to entity map ``` See the reference documentation for [`SCSPrechatEntity`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSPrechatEntity.html) and [`SCSPrechatEntityField`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSPrechatEntityField.html). Also refer to [Chat REST API Data Types](https://developer.salesforce.com/docs/atlas.en-us.live_agent_rest.meta/live_agent_rest/live_agent_rest_data_types.htm) for the `Entity` and `EntityFieldsMaps` data types, which define the underlying functionality of these SDK objects. ## Example This code sample adds `FirstName`, `LastName`, `Email` to a `Contact` record and a `Subject` field to a `Case` record. ```java let config = SCSChatConfiguration(liveAgentPod: "YOUR_POD_NAME", orgId: "YOUR_ORG_ID", deploymentId: "YOUR_DEPLOYMENT_ID", buttonId: "YOUR_BUTTON_ID") // Create some basic pre-chat fields (with user input) let firstNameField = SCSPrechatTextInputObject(label: "First Name") firstNameField!.isRequired = true let lastNameField = SCSPrechatTextInputObject(label: "Last Name") lastNameField!.isRequired = true let emailField = SCSPrechatTextInputObject(label: "Email") emailField!.isRequired = true emailField!.keyboardType = .emailAddress emailField!.autocorrectionType = .no // Create a pre-chat field without user input let subjectField = SCSPrechatObject(label: "Subject", value: "Chat Session") // Create an entity mapping for a Contact record type let contactEntity = SCSPrechatEntity(entityName: "Contact") contactEntity.saveToTranscript = "Contact" contactEntity.linkToEntityName = "Case" contactEntity.linkToEntityField = "ContactId" // Add some field mappings to our Contact entity let firstNameEntityField = SCSPrechatEntityField(fieldName: "FirstName", label: "First Name") firstNameEntityField.doFind = true firstNameEntityField.isExactMatch = true firstNameEntityField.doCreate = true contactEntity.entityFieldsMaps.add(firstNameEntityField) let lastNameEntityField = SCSPrechatEntityField(fieldName: "LastName", label: "Last Name") lastNameEntityField.doFind = true lastNameEntityField.isExactMatch = true lastNameEntityField.doCreate = true contactEntity.entityFieldsMaps.add(lastNameEntityField) let emailEntityField = SCSPrechatEntityField(fieldName: "Email", label: "Email") emailEntityField.doFind = true emailEntityField.isExactMatch = true emailEntityField.doCreate = true contactEntity.entityFieldsMaps.add(emailEntityField) // Create an entity mapping for a Case record type let caseEntity = SCSPrechatEntity(entityName: "Case") caseEntity.saveToTranscript = "Case" caseEntity.showOnCreate = true // Add one field mappings to our Case entity let subjectEntityField = SCSPrechatEntityField(fieldName: "Subject", label: "Subject") subjectEntityField.doCreate = true caseEntity.entityFieldsMaps.add(subjectEntityField) // Update config object with the pre-chat fields config!.prechatFields = [firstNameField, lastNameField, emailField, subjectField] as? [SCSPrechatObject] // Update config object with the entity mappings config!.prechatEntities = [contactEntity, caseEntity] // Start the session! ServiceCloud.shared().chatUI.showChat(with: config!, showPrechat: true) ``` # Create Service Appointment Lists in the Dispatcher Console You can create user-specific temporary appointment lists by adding the `Create Temporary Service Appointment List` custom permission in Field Service managed package. If the custom permission is enabled, the Field Service app creates a connection to the `CreateFilterEvent__e` platform event channel and subscribes to related messages. For information on allocation limits consumed by subscribing to the event channel, see [Change Data Capture Allocations](https://developer.salesforce.com/docs/atlas.en-us.change_data_capture.meta/change_data_capture/cdc_allocations.htm). The custom filters are created and accessible only by users who created the `CreateFilterEvent__e` platform event, and not for other users. Based on a custom filter, you can create temporary lists with identical names. Each list is created as a new instance and doesn’t override an existing one. Each list can include a maximum of 300 service appointments. After a temporary appointment list is loaded to the dispatch console, the list remains static. To auto-refresh the list, enable **Enhanced Live Updates** in the Field Service Admin app and make sure you have read access to all fields in the service appointment’s field sets. When the dispatch console is refreshed, the temporary list is no longer available. To delete a temporary list without refreshing, click **Delete Filter**. To create a custom filter for appointments, define and publish a new `CreateFilterEvent__e` platform event by adding these custom fields. - `FSL__ServiceApptIds__c`: JSON array of service appointment Ids. For example, `["08pO10000049k7lIAA","08pO10000049k7mIAA"]` - `FSL__FilterName__c`: Name of the temporary list based on the specified service appointment IDs. For example, `High Priority Appointments` - `FSL__Description__c` (optional): Description. For example, `This filter displays high priority appointments`. - `FSL__FilterCategory__c`: Value must be set to `GENERAL` - `FSL__LoadFilterImmediately__c`: When set to `true`, the dispatcher console switches to the new temporary list. This code sample creates a `FSL__CreateFilterEvent__e` platform event and loads a temporary list created from the queried list of service appointment IDs to the dispatcher console. ```nolang List ids = new List(); for (ServiceAppointment s :[select id from ServiceAppointment limit 10]) { ids.add(s.id); } FSL__CreateFilterEvent__e filterEvent = new FSL__CreateFilterEvent__e(); filterEvent.FSL__ServiceApptIds__c = JSON.serialize(ids); system.debug(filterEvent.FSL__ServiceApptIds__c); filterEvent.FSL__FilterName__c = 'My Temporary List'; filterEvent.FSL__Description__c = 'a temporary list that was created to demonstrate this feature'; filterEvent.FSL__FilterCategory__c = 'GENERAL'; filterEvent.FSL__LoadFilterImmediately__c = true; Database.SaveResult eventRunningResult = EventBus.publish(filterEvent); ``` **See Also** - [Salesforce Field Service: Set Custom Permissions for Field Service](https://help.salesforce.com/s/articleView?id=service.pfs_custom_permissions.htm) - [Salesforce Field Service: Create Custom Actions for the Field Service Dispatcher Console](https://help.salesforce.com/s/articleView?id=service.pfs_create_custom_actions.htm) # Create Service Appointments Show your users the details of a service appointment—an appointment booked through Salesforce Scheduler—so that users can review and create the appointment. 1. Create a page where the user can review the appointment details and create the appointment. 2. Make a `POST` request on the [`service-appointments`](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_resources_service_appointments.htm) Connect API to create the service appointment. **note:** Specify the operating hour scheduling policy ID to show only the dummy resource who’s defined with operating hours for concurrent scheduling. See [Configure Scheduling Policy to Enforce Operating Hours](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc11-assign-scheduling-policy-to-dummy-resource.md). **Resource URI** ```nolang https://YOUR_INSTANCE.salesforce.com/services/data/v68.0/connect/scheduling/service-appointments ``` Where `YOUR_INSTANCE` is a variable. **For an Existing User (Account)** **Sample Request** Pass the account ID as `parentRecordId` in the input request body. ```nolang { "schedulingPolicyId": "0VrS7000000004XKAQ", "serviceAppointment": { "serviceTerritoryId": "0HhS70000004F9zKAE", "parentRecordId": "001S7000002br8YIAQ", "schedStartTime": "2022-10-03T16:30:00.000+0000", "schedEndTime": "2022-10-03T17:00:00.000+0000", "additionalInformation": "Schedule concurrent appointment with a dummy resource", "appointmentType": "Use case purpose." }, "assignedResources": [ { "serviceResourceId": "0HnS70000004EFyKAM", "isRequiredResource": "true" } ] } ``` **Sample Response** The API returns the service appointment ID and the assigned service resources. ```nolang { "result": { "assignedResourceIds": [ "03rS700000003zrIAA" ], "serviceAppointmentId": "08pS70000000CxEIAU" } } ``` **For a Guest User (Lead)** **Sample Request** Pass the required lead details in the input request body. ```nolang { "schedulingPolicyId": "0VrS7000000004XKAQ", "serviceAppointment": { "serviceTerritoryId": "0HhS70000004F9zKAE", "schedStartTime": "2022-10-03T16:30:00.000+0000", "schedEndTime": "2022-10-03T17:00:00.000+0000", "additionalInformation": "Schedule concurrent appointment with a dummy resource", "appointmentType": "Use case purpose." }, "assignedResources": [ { "serviceResourceId": "0HnS70000004EFyKAM", "isRequiredResource": "true" } ], "lead": { "firstName": "Patient1", "lastName": "Test", "email": "test1@company.com", "company": "Test Club" } } ``` **Sample Response** The API returns the service appointment ID and the assigned service resources. ```nolang { "result": { "assignedResourceIds": [ "03rS700000003zrIAA" ], "parentRecordId": "00QRM000004seHz2AI", "serviceAppointmentId": "08pRM0000004vdvYAA" } } ``` Create a page to show confirmation when the service appointment is created successfully. Here’s how a sample confirmation page can look. ![A representation of the confirmation screen.](https://developer.salesforce.com/media/salesforce-scheduler-dev-guide/screen_appointment_creation.png) # Create Service Appointments Show your users the details of a service appointment—an appointment booked through Salesforce Scheduler—so that users can review and create the appointment. 1. Create a page where the user can review the appointment details and create the appointment. 2. Make a `POST` request on the [`service-appointments`](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_resources_service_appointments.htm) Connect API to create the service appointment. **Resource URI** ```nolang https://YOUR_INSTANCE.salesforce.com/services/data/v68.0/connect/scheduling/service-appointments ``` Where `YOUR_INSTANCE` is a variable. **For an Existing User (Account)** **Sample Request** Pass the account ID as `parentRecordId` in the input request body. To indicate that the appointment is scheduled, set `status` to `Scheduled`. ```nolang { "serviceAppointment": { "serviceTerritoryId": "0HhS700000001DYKAY", "parentRecordId": "001S7000001pFlJIAU", "engagementChannelTypeId": "0eFS70000004CG5MAM", "schedStartTime": "2023-02-15T17:00:00.000+0000", "schedEndTime": "2023-02-15T18:00:00.000+0000", "street": "121 Spear Street", "city": "Charlotte", "state": "VT", "postalCode": "05445", "country": "United States", "extendedFields": [ { "name": "status", "value": "Scheduled" } ] }, "assignedResources": [ { "serviceResourceId": "0HnS700000002jAKAQ", "isRequiredResource": true } ] } ``` **Sample Response** The API returns the service appointment ID and the assigned service resources. ```nolang { "result": { "assignedResourceIds": [ "03rS700000000hPIAQ" ], "serviceAppointmentId": "08pS7000000018wIAA" } } ``` **For a Guest User (Lead)** **Sample Request** Pass the required lead details in the input request body. To indicate that the appointment is scheduled, set `status` to `Scheduled`. ```nolang { "serviceAppointment": { "serviceTerritoryId": "0HhS700000001DYKAY", "engagementChannelTypeId": "0eFS70000004CG5MAM", "schedStartTime": "2023-02-15T17:00:00.000+0000", "schedEndTime": "2023-02-15T18:00:00.000+0000", "street": "121 Spear Street", "city": "Charlotte", "state": "VT", "postalCode": "05445", "country": "United States", "extendedFields": [ { "name": "status", "value": "Scheduled" } ] }, "assignedResources": [ { "serviceResourceId": "0HnS700000002jAKAQ", "isRequiredResource": true } ], "lead": { "firstName": "Mark", "lastName": "Taylor", "phone": "012-345-6789", "email": "mtaylor@company.com", "company": "Company1" } } ``` **Sample Response** The API returns the service appointment ID and the assigned service resources. ```nolang { "result": { "assignedResourceIds": [ "03rS700000000hUIAQ" ], "parentRecordId": "00QS7000000sfbOMAQ", "serviceAppointmentId": "08pS70000000191IAA" } } ``` Create a page to show confirmation when the service appointment is created successfully. Here’s how a sample confirmation page can look. ![A representation of the confirmation screen.](https://developer.salesforce.com/media/salesforce-scheduler-dev-guide/screen_appointment_creation.png) # Create Service Appointments A service appointment represents an appointment booked through Salesforce Scheduler. Make a POST request on the `service-appointments` Connect API to create the appointment. 1. Create a page where the user can review the appointment details and create the appointment. Here’s how a Review Service Appointment page can look. **note:** To keep the service resource private, hide the resource’s name on the review appointment page. ![A representation of the Review Service Appointment screen.](https://developer.salesforce.com/media/salesforce-scheduler-dev-guide/screen_review_anonymous_appointment.png) 2. Link the Next button to a POST request on the [`service-appointments`](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_resources_service_appointments.htm) Connect API to create the service appointment. **Resource URI** ```nolang https://yourInstance.salesforce.com/services/data/vXX.X/connect/scheduling/service-appointments ``` **For an Existing User (Account)** **Sample Request** Pass the account ID as `parentRecordId` in the input request body. Set `IsAnonymousBooking` to `true` to indicate that the appointment is anonymous. ```nolang { "serviceAppointment": { "serviceTerritoryId": "0HhS700000001DYKAY", "parentRecordId" : "001S7000001pFlJIAU", "schedStartTime" : "2023-11-29T20:00:00.000Z", "schedEndTime": "2023-11-29T21:00:00.000Z", "street": "121 Spear Street", "city": "Charlotte", "state": "VT", "postalCode": "05445", "country": "United States", "engagementChannelTypeId" : "0eFS70000004CG5MAM", "extendedFields" : [ { "name": "IsAnonymousBooking", "value": "true" } ] }, "assignedResources": [ { "serviceResourceId": "0HnS700000002jAKAQ", "isRequiredResource": true, "extendedFields" : [] } ] } ``` **Sample Response** The API returns the service appointment ID and the assigned service resources. ```nolang { "result" : { "assignedResourceIds" : [ "03rS700000000oMIAQ" ], "serviceAppointmentId" : "08pS700000001G3IAI" } } ``` **For a Guest User (Lead)** **Sample Request** Pass the required lead details in the input request body. Set `IsAnonymousBooking` to `true` to indicate that the appointment is anonymous. ```nolang { "serviceAppointment": { "serviceTerritoryId": "0HhS700000001DYKAY", "schedStartTime" : "2023-11-29T22:15:00.000Z", "schedEndTime": "2023-11-29T23:15:00.000Z", "street": "121 Spear Street", "city": "Charlotte", "state": "VT", "postalCode": "05445", "country": "United States", "engagementChannelTypeId" : "0eFS70000004CG5MAM", "extendedFields" : [ { "name": "IsAnonymousBooking", "value": "true" } ] }, "assignedResources": [ { "serviceResourceId": "0HnS700000002jGKAQ", "isRequiredResource": true, "extendedFields" : [] } ], "lead": { "firstName": "Tom", "lastName": "Smith", "phone": "(555) 555-1234", "email": "info@salesforce.com", "company": "MedLife, Inc.", "extendedFields" : [] } } ``` **Sample Response** The API returns the service appointment ID and the assigned service resources. ```nolang { "result" : { "assignedResourceIds" : [ "03rS700000000oRIAQ" ], "parentRecordId" : "00QS7000000sfcnMAA", "serviceAppointmentId" : "08pS700000001G8IAI" } } ``` Create a page to show confirmation when the service appointment is created successfully. Here’s how a sample confirmation page can look. ![A representation of the confirmation screen.](https://developer.salesforce.com/media/salesforce-scheduler-dev-guide/screen_appointment_creation.png) # Create Service Appointments A service appointment represents an appointment booked through Salesforce Scheduler. Make a POST request on the `service-appointments` Connect API to create the appointment. 1. Create a page where the user can review the appointment details and create the appointment. Here’s how a Review Service Appointment page can look. ![A representation of the Review Service Appointment screen.](https://developer.salesforce.com/media/salesforce-scheduler-dev-guide/screen_review_multi_resource_appointment.png) 2. Link the Next button to a POST request on the [`service-appointments`](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_resources_service_appointments.htm) Connect API to create the service appointment. **Resource URI** ```nolang https://yourInstance.salesforce.com/services/data/vXX.X/connect/scheduling/service-appointments ``` **For an Existing User (Account)** **Sample Request** Pass the account ID as `parentRecordId` in the input request body. Set `status` to `Scheduled` to indicate that the appointment is scheduled. ```nolang { "serviceAppointment": { "serviceTerritoryId": "0HhS700000001DYKAY", "parentRecordId" : "001S7000001pFlJIAU", "schedStartTime" : "2023-11-30T17:00:00.000+0000", "schedEndTime": "2023-11-30T18:00:00.000+0000", "street": "121 Spear Street", "city": "Charlotte", "state": "VT", "postalCode": "05445", "country": "United States", "engagementChannelTypeId" : "0eFS70000004CG5MAM", "extendedFields" : [{ "name": "status", "value": "Scheduled" }] }, "assignedResources": [ { "serviceResourceId": "0HnS700000002jAKAQ", "isRequiredResource": true, "isPrimaryResource": true, "extendedFields" : [] }, { "serviceResourceId": "0HnS700000002jKKAQ", "isRequiredResource": true, "isPrimaryResource": false, "extendedFields" : [] } ] } ``` **Sample Response** The API returns the service appointment ID and the assigned service resources. ```nolang { "result": { "assignedResourceIds": [ "03rS700000000ogIAA", "03rS700000000ohIAA" ], "serviceAppointmentId": "08pS700000001GIIAY" } } ``` **For a Guest User (Lead)** **Sample Request** Pass the required lead details in the input request body. Set `status` to `Scheduled` to indicate that the appointment is scheduled. ```nolang { "serviceAppointment": { "serviceTerritoryId": "0HhS700000001DYKAY", "schedStartTime" : "2023-11-30T17:00:00.000+0000", "schedEndTime": "2023-11-30T18:00:00.000+0000", "street": "121 Spear Street", "city": "Charlotte", "state": "VT", "postalCode": "05445", "country": "United States", "engagementChannelTypeId" : "0eFS70000004CG5MAM", "extendedFields" : [{ "name": "status", "value": "Scheduled" }] }, "assignedResources": [ { "serviceResourceId": "0HnS700000002jAKAQ", "isRequiredResource": true, "isPrimaryResource": true, "extendedFields" : [] }, { "serviceResourceId": "0HnS700000002jKKAQ", "isRequiredResource": true, "isPrimaryResource": false, "extendedFields" : [] } ] , "lead": { "firstName": "Philip", "lastName": "Taylor", "phone": "012-345-6789", "email": "pmtaylor@company.com", "company": "Philip&Taylor Company", "extendedFields" : [] } } ``` **Sample Response** The API returns the service appointment ID and the assigned service resources. ```nolang { "result": { "assignedResourceIds": [ "03rS700000000oqIAA", "03rS700000000orIAA" ], "parentRecordId": "00QS7000000sfcxMAA", "serviceAppointmentId": "08pS700000001GSIAY" } } ``` Create a page to show confirmation when the service appointment is created successfully. Here’s how a sample confirmation page can look. ![A representation of the confirmation screen.](https://developer.salesforce.com/media/salesforce-scheduler-dev-guide/screen_appointment_creation.png) # Create Service Appointments The last step in the concurrent scheduling application is to show the service appointment details for the user to review and create the appointment. A service appointment represents an appointment booked through Salesforce Scheduler. Create a page where the user can review the appointment details and create the appointment. Here’s how a Review Service Appointment page can look. ![A representation of the Review Service Appointment screen.](https://developer.salesforce.com/media/salesforce-scheduler-dev-guide/concurrent-reviewAppointmentScreen.png) Link the Next button to a POST request on the [`service-appointments`](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_resources_service_appointments.htm) Connect API to create the service appointment. **Resource URI** ```nolang https://yourInstance.salesforce.com/services/data/vXX.X/connect/scheduling/service-appointments ``` **For an Existing User (Account)** **Sample Request** Pass the account ID as `parentRecordId` in the input request body. Set `status` to `Scheduled` to indicate that the appointment is scheduled. ```nolang { "serviceAppointment": { "serviceTerritoryId": "0HhB00000001P0PKAU", "parentRecordId" : "001B0000018vs9fIAA", "workTypeId" : "08qB00000002ocgIAA", "schedStartTime" : "2021-10-29T16:00:00.000+0000", "schedEndTime": "2021-10-29T17:00:00.000+0000", "additionalInformation" : "Concurrent Booking", "appointmentType" : "Training Purpose", "extendedFields" : [ { "name": "status", "value": "Scheduled" } ] }, "assignedResources": [ { "serviceResourceId": "0HnB00000001SJxKAM", "isRequiredResource" : "true" } ] } ``` **Sample Response** The API returns the service appointment ID and the assigned service resources. ```nolang { "result" : { "assignedResourceIds" : [ "03rB0000000cBZ6IAM" ], "serviceAppointmentId" : "08pB0000000aKjMIAU" } } ``` **For a Guest User (Lead)** **Sample Request** Pass the required lead details in the input request body. Set `status` to `Scheduled` to indicate that the appointment is scheduled. ```nolang { "serviceAppointment": { "serviceTerritoryId": "0HhB00000001P0PKAU", "schedStartTime" : "2021-10-29T16:00:00.000+0000", "schedEndTime": "2021-10-29T17:00:00.000+0000", "workTypeId" : "08qB00000002ocgIAA", "additionalInformation" : "Concurrent Booking", "appointmentType" : "Training Purpose", "extendedFields" : [ { "name": "status", "value": "Scheduled" } ] }, "assignedResources": [ { "serviceResourceId": "0HnB00000001SJxKAM", "isRequiredResource" : "true" } ], "lead": { "email" : "name@company.com", "firstName" : "FName", "lastName" : "LName", "company" : "CompanyName" } } ``` **Sample Response** The API returns the service appointment ID and the assigned service resources. ```nolang { "result" : { "assignedResourceIds" : [ "03rB0000000cBAFIA2" ], "parentRecordId" : "00QB000000ASSt5MAH", "serviceAppointmentId" : "08pB0000000aKIgIAM" } } ``` Create a page to show confirmation when the service appointment is created successfully. Here’s how a sample confirmation page can look. ![A representation of the confirmation screen.](https://developer.salesforce.com/media/salesforce-scheduler-dev-guide/screen_appointment_creation.png) # Create Service Appointments A service appointment represents an appointment booked through Salesforce Scheduler. To create an appointment, make a POST request on the `service-appointments` Connect API. Create a page where the user can review the appointment details and create the appointment. Here’s how a Review Service Appointment page can look. **note:** To keep the service resource private, hide the resource’s name on the review appointment page. ![A representation of the Review Service Appointment screen.](https://developer.salesforce.com/media/salesforce-scheduler-dev-guide/screen_review_anonymous_appointment.png) Link the Next button to a POST request on the [`service-appointments`](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_resources_service_appointments.htm) Connect API to create the service appointment. **Resource URI** ```nolang https://yourInstance.salesforce.com/services/data/vXX.X/connect/scheduling/service-appointments ``` **For an Existing User (Account)** **Sample Request** Pass the account ID as `parentRecordId` in the input request body. Set `IsAnonymousBooking` to `true` to indicate that the appointment is anonymous. ```nolang { "serviceAppointment": { "serviceTerritoryId": "0Hh2w000000XmoXCAS", "parentRecordId" : "001B000001McLhMIAV", //accountId "schedStartTime" : "2021-05-24T15:30:00:00.000+0000", "schedEndTime": "2021-05-24T16:30:00.000+0000", "street": "1 Market Street", "city": "San Francisco", "state": "CA", "postalCode": "94105", "country": "USA", "extendedFields" : [ { "name": "IsAnonymousBooking", "value": "true" } ] }, "assignedResources": [ { "serviceResourceId": "0HnB0000000LVbfKAG", "extendedFields" : [] } ] } ``` **Sample Response** The API returns the service appointment ID and the assigned service resources. ```nolang { "result" : { "assignedResourceIds" : [ "0HnB0000000LVbfKAG" ], "serviceAppointmentId" : "08pB0000000hvR6IAI" } } ``` **For a Guest User (Lead)** **Sample Request** Pass the required lead details in the input request body. Set `IsAnonymousBooking` to `true` to indicate that the appointment is anonymous. ```nolang { "serviceAppointment": { "serviceTerritoryId": "0Hh2w000000XmoXCAS", "schedStartTime" : "2021-05-24T15:30:00:00.000+0000", "schedEndTime": "2021-05-24T16:30:00.000+0000", "street": "1 Market Street", "city": "San Francisco", "state": "CA", "postalCode": "94105", "country": "USA", "extendedFields" : [ { "name": "IsAnonymousBooking", "value": "true" } ] }, "assignedResources": [ { "serviceResourceId": "0HnB0000000LVbfKAG", "isRequiredResource": true, "isPrimaryResource": true, "extendedFields" : [] } ], "lead": { "firstName": "Mark", "lastName": "Taylor", "phone": "012-345-6789", "email": "mtaylor@company.com", "company": "Company1", "extendedFields" : [] } } ``` **Sample Response** The API returns the service appointment ID and the assigned service resources. ```nolang { "result" : { "assignedResourceIds" : [ "0HnB0000000LVbfKAG" ], "parentRecordId" : "00QB00000094lOZMAY", "serviceAppointmentId" : "08pB0000000hvR1IAI" } } ``` Create a page to show confirmation when the service appointment creation is completed. Here’s how a sample confirmation page can look. ![A representation of the confirmation screen.](https://developer.salesforce.com/media/salesforce-scheduler-dev-guide/screen_appointment_creation.png) # Create Service Appointments The last step in the scheduling application is to show the service appointment details for the user to review and create the appointment. A service appointment represents an appointment booked through Salesforce Scheduler. Create a page where the user can review the appointment details and create the appointment. Here’s how a Review Service Appointment page can look. ![A representation of the Review Service Appointment screen.](https://developer.salesforce.com/media/salesforce-scheduler-dev-guide/uc9_review_appointment_details.png) 1. Link the Next button to a POST request on the [`service-appointments`](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_resources_service_appointments.htm) Connect API to create the service appointment. **Resource URI** ```nolang https://yourInstance.salesforce.com/services/data/vXX.X/connect/scheduling/service-appointments ``` **For an Existing User (Account)** **Sample Request** Pass the account ID as `parentRecordId` in the input request body. Set `status` to `Scheduled` to indicate that the appointment is scheduled. ```nolang { "serviceAppointment": { "serviceTerritoryId": "0Hhx000000012oSCAQ", "parentRecordId": "001x0000005DLxpAAG", "workTypeId": "08qx000000014fnAAA", "schedStartTime": "2022-04-19T10:30:00.000+0000", "schedEndTime": "2022-04-19T10:40:00.000+0000", "additionalInformation": "Appointment Scheduling Custom App.", "appointmentType": "Testing Purpose", "extendedFields": [ { "name": "status", "value": "Scheduled" } ] }, "assignedResources": [ { "serviceResourceId": "0Hnx000000006GcCAI", "isRequiredResource": "true" } ] } ``` **Sample Response** The API returns the service appointment ID and the assigned service resources. ```nolang { "result": { "assignedResourceIds": [ "03rx00000001uxJAAQ" ], "serviceAppointmentId": "08px00000001toRAAQ" } } ``` **For a Guest User (Lead)** **Sample Request** Pass the required lead details in the input request body. Set `status` to `Scheduled` to indicate that the appointment is scheduled. ```nolang { "serviceAppointment": { "serviceTerritoryId": "0Hhx000000012oSCAQ", "workTypeId": "08qx000000014fnAAA", "schedStartTime": "2022-04-19T10:30:00.000+0000", "schedEndTime": "2022-04-19T10:40:00.000+0000", "additionalInformation": "Appointment Scheduling Custom App.", "appointmentType": "Testing Purpose", "extendedFields": [ { "name": "status", "value": "Scheduled" } ] }, "assignedResources": [ { "serviceResourceId": "0Hnx000000006H4CAI", "isRequiredResource": "true" } ], "lead": { "email": "name@company.com", "firstName": "FName", "lastName": "LName", "company": "CompanyName" } } ``` **Sample Response** The API returns the service appointment ID and the assigned service resources. ```nolang { "result": { "assignedResourceIds": [ "03rx00000001uxOAAQ" ], "parentRecordId": "00Qx0000001cKPoEAM", "serviceAppointmentId": "08px00000001toWAAQ" } } ``` Create a page to show confirmation when the service appointment is created successfully. Here’s how a sample confirmation page can look. ![A representation of the confirmation screen.](https://developer.salesforce.com/media/salesforce-scheduler-dev-guide/screen_appointment_creation.png) # Create Service Resources Create service resources—individual users who can attend customer appointments—so that you can assign appointments to users. You can create a dummy resource, such as DummyResource1, Agent1, or Agent2 that users can schedule appointments with, and then create actual resources to whom these appointments can be assigned later. For more information on setting up service resources, see [Set Up Service Resources in Salesforce Scheduler](https://help.salesforce.com/s/articleView?id=platform.ls_set_up_service_resources.htm&type=5). 1. From the App Launcher, find and open the Salesforce Scheduler Setup app. 2. On the Service Resources tab, click **New**. 3. Select a user and enter a resource name—typically, the user's name. 4. To enable assigning the resource to appointments, activate the resource. 5. For resource type, select **Technician**. 6. Save your changes. After a service resource is created, assign the resource to a service territory, and then add skills of the resource. # Create Service Territories Create service territories, such as branch locations, to represent your branch or call center, to organize your service resources, and to ensure that the service resources are assigned to appointments near the home branch. For more information on setting up service territories, see [Set Up Service Territories in Salesforce Scheduler](https://help.salesforce.com/s/articleView?id=platform.ls_create_service_territories.htm&type=5). 1. On the Service Territories tab, click **New**. 2. Enter a name, such as `ServiceTerritory1`, and a description for your territory. 3. To enable adding members to the territory or relating the territory to appointments, activate the new service territory. # Create the Conversation Channel Definition Record The Conversation Channel Definition (`ConversationChannelDefinition`) record contains metadata used for Bring Your Own Channel for CCaaS integration. ## Task 1: Gather the API Names of the Custom Platform Events Get the API names of the custom platform event that you created and its custom fields. In the next task, you need the API names to set several parameters. 1. From Setup, in the Quick Find box, enter `Platform Events`, and then select **Platform Events**. 2. Click the name of the custom platform event. 3. Copy the API Name of the platform event. The API Name is in the format `devorg__TestEvent__e`. 4. In the Custom Fields and Relationships section, find and copy the API Names for the EventType and Payload fields. For example, the API Name for the EventType field is in the format `devorg__EventType__c`. ## Task 2: Create the ConversationChannelDefinition Record Use your preferred method, such as Tooling API, Metadata API, SOAP API, or SoapUI, to create the record. If you use the SoapUI to create the ConversationChannelDefinition record, verify that you’ve generated the enterprise WSDL. Otherwise, use the sample SOAP API payload to create the record. 1. Use one of the [sample payloads](#sample-payloads) to create the ConversationChannelDefinition record. If you use Tooling API to create the record, send the POST request to this endpoint: `POST /services/data/v60.0/tooling/sobjects/ConversationChannelDefinition/` To configure the payload, follow these guidelines. - **DeveloperName**: Enter the ConversationChannelDefinition API name using the same prefix as specified in the external client app (ECA) or connected app developer name. Use the format `{prefix}_{ExternalClientAppName}` or `{prefix}_{ConnectedAppName}` that you generated in [Create the Interaction Service OAuth App](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/create-connected-app.md). For example, `Partner1_ChannelDefinition1` has the given name “ChannelDefinition1” with the prefix “Partner1,” which matches the prefix of the external client app or connected app. - **MasterLabel**: Set this value to the record’s label name in the UI. This name appears in several places in the UI, so include the messaging channel name for easy identification. - **ConnectedAppType**: Set this value to the owner of the external client app (ECA) or connected app used to manage authentication between Salesforce Interaction Service and the CCaaS partner system. Set to `Partner` to create the [ECA or connected app](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/create-connected-app.md) and include it in your managed package as a partner vendor. Set to `Customer` to require the admin to create an ECA or connected app when they set up Bring Your Own Channel for CCaaS. If not set, this value defaults to `Partner`. - **ConversationVendorInfo**: Set this value to the `ConversationVendorInfo.developerName` value. This field applies to Metadata API and Tooling API. - **ConversationVendorInfoId**: Set this value to the `ConversationChannelDefinition.ConversationVendorInfoId` value that's used to link this record to the ConversationVendorInfo record—for example, `0m8000000000000123`. This field applies to SOAP API. - **CustomPlatformEvent**: Set this value to the API Name of the custom platform event—for example, `devorg__TestEvent__e`. - **CustomEventTypeField**: Set this value to the API name of the custom EventType field in the custom platform event—for example, `devorg__EventType__c`. - **CustomEventPayloadField**: Set this value to the API name of the custom Payload field in the custom platform event—for example, `devorg__Payload__c`. - **CapabilitiesSupportsCustomChannelParameters**: Set this value to `true` to let administrators leverage custom parameters and parameter mappings. The default value is true. See [Add Support for Custom Objects](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/add-custom-objects.md). - **CapabilitiesSupportsIsoCountryCode**: Set this value to `true` to support ISO-3166 country codes. The default value is `false`. - **CapabilitiesSupportsKeywords**: Set this value to `true` to support keywords when Salesforce manages consent levels. - **CapabilitiesSupportsImplicitConsent**: Set this value to `true` to expose the Implicit Opt-In consent level to the administrator. This field is required and must be set to `true`. The default value is `false`. To learn more about consent levels, see [Configure Levels to Customize the Messaging Opt-In and Opt-Out Experience](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/configure-consent-levels.md). - **CapabilitiesSupportsExplicitConsent**: Set this value to `true` to expose the Explicit Opt-In consent level to the administrator. The default value is `false`. This field is optional. To learn more about consent levels, see [Configure Consent Levels to Customize the Messaging Opt-In and Opt-Out Experience](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/configure-consent-levels.md). - **CapabilitiesSupportsDoubleOptInConsent**: Set this value to `true` to expose the Double Opt-In consent level to the administrator. The default value is `false`. This field is optional. If `capabilitiesSupportsDoubleOptInConsent` is set to `true`, then `capabilitiesSupportsExplicitConsent` must also be set to `true`. To learn more about consent levels, see [Configure Consent Levels to Customize the Messaging Opt-In and Opt-Out Experience](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/configure-consent-levels.md). - **CustomIcon**: Set this value to the name of the static resource image you want to use to identify this channel integration, such as a channel logo. For the best results, set the image size to 50px x 50px and save the image in SVG file format. This field is optional. To learn more about custom icons, see [Add a Custom Icon](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/add-custom-icon.md). - **RoutingOwner**: Set this value to the system you use to manage routing. Set to `Salesforce` to let Salesforce Omni-Channel manage routing. Set to `Partner` to let the partner system manage routing. If not set, this value defaults to `Salesforce`. - **ConsentOwner**: Set this value to the system you use to manage consent levels. Set to `Salesforce` to let Salesforce manage consent levels. Set to `Partner` to let the partner system manage consent levels. If set to `Partner`, you must set `capabilitiesSupportsKeywords` to false. If not set, this value defaults to `Salesforce`. - **EventCapabilitiesIsInboundAcknwOptionExposed:** Set this value to `true` to permit the Salesforce admin to opt in to read receipts and delivery receipts for inbound messages. Set this value to `false` to disable inbound acknowledgements and hide the setting from the Salesforce admin in the Messaging Settings. The default is `false`. To learn more about inbound receipts, see [Configure Inbound Acknowledgements and Outbound Typing Indicators](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/inbound-acknowledgements-typing-indicators.html). - **EventCapabilitiesIsProgressIndicatorOptExposed**: Set this value to `true` to permit the Salesforce admin to opt in to progress indicators for AI agents. Set this value to `false` to disable progress indicators and hide the setting from the Salesforce admin in the Messaging Settings. The default is `false`. To learn more about inbound receipts, see [Configure Agentforce Service Agent Progress Indicators](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/progress-indicators.md). - **EventCapabilitiesIsRoutingWorkResultSupported**: Set this value to `true` to send the Routing Work Result event is as a Custom Platform event. The default value is `false`. - **EventCapabilitiesIsTypingIndicatorOptionHidden**: Set this value to `false` to support allowing the Salesforce admin to opt in to typing indicators for outbound messages. Set this value to `true` to disable typing indicators for outbound messages and hide the setting from the Salesforce admin in the Messaging Settings. The default is `false`. To learn more about typing indicators, see [Configure Inbound Acknowledgements and Outbound Typing Indicators](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/inbound-acknowledgements-typing-indicators.html). - **IsConferenceSupported**: Set this value to `true` to permit more than two participants in a messaging session. To learn more about Conferencing for Messaging, see [Add Multiple Participants to a Messaging Conference](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/conference.md). - **MaxParticipantsForCnfrOverride**: Set this value to a number limit for how many participants can be in a messaging conference. This field is needed only if you want to use a different limit instead of the platform limit. If this field isn’t set or is set to a value higher than the Messaging platform limit, the integration defaults to the Messaging platform limit of how many participants can be in a Messaging session conference at one time. If `maxParticipantsForCnfrOverride` is set, `isConferenceSupported` should be `true`. To learn more about Conferencing for Messaging, see [Add Multiple Participants to a Messaging Conference](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/conference.md). ## Sample Payloads Use these sample payloads as templates to create ConversationChannelDefinition records. ```json { "Metadata": { "developerName": "Partner1_ChannelDefinition1", "masterLabel": "Channel Definition 1", "consentOwner": "Salesforce", "conversationVendorInfo": "partnerName", "customPlatformEvent": "devorg**TestEvent**e", "customEventTypeField": "devorg**EventType**c", "customEventPayloadField": "devorg**Payload**c", "customIcon": "mylogo", "isInboundAcknwOptionExposed": true, "isTypingIndicatorOptionHidden": false, "routingOwner": "Salesforce", "supportsCustomChannelParameters": true, "supportsKeywords": true, "supportsIsoCountryCode": true, "supportsImplicitConsent": true, "supportsExplicitConsent": false, "supportsDoubleOptInConsent": false }, "FullName": "Partner1_ChannelDefinition1" } ``` ```json { "DeveloperName": "Partner1_ChannelDefinition1", "MasterLabel": "Channel Definition 1", "ConversationVendorInfoId": "0m8000000000000123", "CustomPlatformEvent": "devorg**TestEvent**e", "CustomEventTypeField": "devorg**EventType**c", "CustomEventPayloadField": "devorg**Payload**c", "CustomIconId": "mylogo", "CapabilitiesSupportsKeywords": true, "CapabilitiesSupportsIsoCountryCode": true, "CapabilitiesSupportsImplicitConsent": true, "CapabilitiesSupportsExplicitConsent": false, "ConsentOwner": "Salesforce", "EventCapabilitiesIsInboundAcknwOptionExposed": true, "EventCapabilitiesIsTypingIndicatorOptionHidden": false, "RoutingOwner": "Salesforce" } ``` ## Optional Configuration Consider these optional tasks when creating the ConversationChannelDefinition Record: - [Configure Consent Levels to Customize the Messaging Opt-In and Opt-Out Experience](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/configure-consent-levels.md) - [Configure Partner-Owned Routing and Consent](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/configure-partner-routing-consent.md) - [Add Custom Icon](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/add-custom-icon.md) - [Add Support for Custom Parameters](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/add-custom-objects.md) - [Configure Inbound Acknowledgements and Outbound Typing Indicators](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/inbound-acknowledgements-typing-indicators.md) - [Configure Agentforce Service Agent Progress Indicators](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/progress-indicators.md) - [Add Multiple Participants to a Messaging Conference](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/conference.md) **See Also** - _Tooling API Guide_: [ConversationChannelDefinition](https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_conversationchanneldefinition.htm) - _Metadata API Guide_: [ConversationChannelDefinition](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_conversationchanneldefinition.htm) - _Object Reference_: [ConversationChannelDefinition](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_conversationchanneldefinition.htm) # Create the Conversation Channel Definition Record The Conversation Channel Definition (`ConversationChannelDefinition`) record contains metadata used for Bring Your Own Channel for Messaging integration. ## Task 1: Gather the API Names of the Custom Platform Events Get the API names of the custom platform event that you created and its custom fields. In the next task, you need the API names to set several parameters. 1. From Setup, in the Quick Find box, enter `Platform Events`, and then select **Platform Events**. 2. Click the name of the custom platform event. 3. Copy the API Name of the platform event. The API Name is in the format `devorg__TestEvent__e`. 4. In the Custom Fields and Relationships section, find and copy the API Names for the EventType and Payload fields. For example, the API Name for the EventType field is in the format `devorg__EventType__c`. ## Task 2: Create the ConversationChannelDefinition Record Use your preferred method, such as Tooling API, Metadata API, SOAP API, or SoapUI, to create the record. If you use the SoapUI to create the ConversationChannelDefinition record, verify that you’ve generated the enterprise WSDL. Otherwise, use the sample SOAP API payload to create the record. 1. Use one of the [sample payloads](#sample-payloads) to create the ConversationChannelDefinition record. If you use Tooling API to create the record, send the POST request to this endpoint: `POST /services/data/v60.0/tooling/sobjects/ConversationChannelDefinition/` To configure the payload, follow these guidelines. - **DeveloperName**: Enter the ConversationChannelDefinition API name using the same prefix as specified in the external client app (ECA) or connected app developer name. Use the format `{prefix}_{ExternalClientAppName}` or `{prefix}_{ConnectedAppName}` that you generated in [Create the Interaction Service OAuth App](https://developer.salesforce.com/docs/service/messaging-partner/guide/create-connected-app.md). For example, `Partner1_ChannelDefinition1` has the given name “ChannelDefinition1” with the prefix “Partner1,” which matches the prefix of the ECA or connected app. - **MasterLabel**: Set this value to the record’s label name in the UI. This name appears in several places in the UI, so include the messaging channel name for easy identification. - **ConnectedAppType**: Set this value to the owner of the external client app (ECA) or connected app used to manage authentication between Salesforce Interaction Service and the partner messaging system. Set to `Partner` to create the [ECA or connected app](https://developer.salesforce.com/docs/service/messaging-partner/guide/create-connected-app.md) and include it in your managed package as a partner vendor. Set to `Customer` to require the admin to create an ECA or connected app when they set up Bring Your Own Channel. If not set, this value defaults to `Partner`. - **ConversationVendorInfo**: Set this value to the `ConversationVendorInfo.developerName` value. This field applies to Metadata API and Tooling API. - **ConversationVendorInfoId**: Set this value to the `ConversationChannelDefinition.ConversationVendorInfoId` value that's used to link this record to the ConversationVendorInfo record—for example, `0m8000000000000123`. This field applies to SOAP API. - **CustomPlatformEvent**: Set this value to the API Name of the custom platform event—for example, `devorg__TestEvent__e`. - **CustomEventTypeField**: Set this value to the API name of the custom EventType field in the custom platform event—for example, `devorg__EventType__c`. - **CustomEventPayloadField**: Set this value to the API name of the custom Payload field in the custom platform event—for example, `devorg__Payload__c`. - **CapabilitiesSupportsCustomChannelParameters**: Set this value to `true` to let administrators leverage custom parameters and parameter mappings. The default value is true. See [Add Support for Custom Objects](https://developer.salesforce.com/docs/service/messaging-partner/guide/add-custom-objects.md). - **CapabilitiesSupportsIsoCountryCode**: Set this value to `true` to support ISO-3166 country codes. The default value is `false`. - **CapabilitiesSupportsKeywords**: Set this value to `true` to support keywords when Salesforce manages consent levels. - **CapabilitiesSupportsImplicitConsent**: Set this value to `true` to expose the Implicit Opt-In consent level to the administrator. This field is required and must be set to `true`. The default value is `false`. To learn more about consent levels, see [Configure Levels to Customize the Messaging Opt-In and Opt-Out Experience](https://developer.salesforce.com/docs/service/messaging-partner/guide/configure-consent-levels.md). - **CapabilitiesSupportsExplicitConsent**: Set this value to `true` to expose the Explicit Opt-In consent level to the administrator. The default value is `false`. This field is optional. To learn more about consent levels, see [Configure Consent Levels to Customize the Messaging Opt-In and Opt-Out Experience](https://developer.salesforce.com/docs/service/messaging-partner/guide/configure-consent-levels.md). - **CustomIcon**: Set this value to the name of the static resource image you want to use to identify this channel integration, such as a channel logo. For the best results, set the image size to 50px x 50px and save the image in SVG file format. This field is optional. To learn more about custom icons, see [Add a Custom Icon](https://developer.salesforce.com/docs/service/messaging-partner/guide/add-custom-icon.md). - **RoutingOwner**: Set to `Salesforce` to let Salesforce Omni-Channel manage routing. For Bring Your Own Channel for Messaging, this is the only supported value. If not set, this value defaults to `Salesforce`. - **ConsentOwner**: Set to `Salesforce` to let Salesforce manage consent levels. For Bring Your Own Channel for Messaging, this is the only supported value. If not set, this value defaults to `Salesforce`. - **EventCapabilitiesIsInboundAcknwOptionExposed:** Set this value to `true` to permit the Salesforce admin to opt in to read receipts and delivery receipts for inbound messages. Set this value to `false` to disable inbound acknowledgements and hide the setting from the Salesforce admin in the Messaging Settings. The default is `false`. To learn more about inbound receipts, see [Configure Inbound Acknowledgements and Outbound Typing Indicators](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/inbound-acknowledgements-typing-indicators.html). - **EventCapabilitiesIsProgressIndicatorOptExposed**: Set this value to `true` to permit the Salesforce admin to opt in to progress indicators for AI agents. Set this value to `false` to disable progress indicators and hide the setting from the Salesforce admin in the Messaging Settings. The default is `false`. To learn more about inbound receipts, see [Configure Agentforce Service Agent Progress Indicators](https://developer.salesforce.com/docs/service/messaging-partner/guide/progress-indicators.md). - **EventCapabilitiesIsRoutingWorkResultSupported**: Set this value to `true` to send the Routing Work Result event is as a Custom Platform event. The default value is `false`. - **EventCapabilitiesIsTypingIndicatorOptionHidden**: Set this value to `false` to support allowing the Salesforce admin to opt in to typing indicators for outbound messages. Set this value to `true` to disable typing indicators for outbound messages and hide the setting from the Salesforce admin in the Messaging Settings. The default is `false`. To learn more about typing indicators, see [Configure Inbound Acknowledgements and Outbound Typing Indicators](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/inbound-acknowledgements-typing-indicators.html). - **IsConferenceSupported**: Set this value to true to permit more than two participants in a Messaging session. To learn more about Conferencing for Messaging, see [Add Multiple Participants to a Messaging Conference](https://developer.salesforce.com/docs/service/messaging-partner/guide/conference.md). - **MaxParticipantsForCnfrOverride**: Set this value to a number limit for how many participants can be in a messaging conference. This field is needed only if you want to use a different limit instead of the platform limit. If this field isn’t set or is set to a value higher than the Messaging platform limit, the integration defaults to the Messaging platform limit of how many participants can be in a messaging conference at one time. If `maxParticipantsForCnfrOverride` is set, `isConferenceSupported` should be `true`. To learn more about Conferencing for Messaging, see [Add Multiple Participants to a Messaging Conference](https://developer.salesforce.com/docs/service/messaging-partner/guide/conference.md). ## Sample Payloads Use these sample payloads as templates to create ConversationChannelDefinition records. ```json { "Metadata": { "developerName": "Partner1_ChannelDefinition1", "masterLabel": "Channel Definition 1", "consentOwner": "Salesforce", "conversationVendorInfo": "partnerName", "customPlatformEvent": "devorg**TestEvent**e", "customEventTypeField": "devorg**EventType**c", "customEventPayloadField": "devorg**Payload**c", "customIcon": "mylogo", "isInboundAcknwOptionExposed": true, "isTypingIndicatorOptionHidden": false, "routingOwner": "Salesforce", "supportsCustomChannelParameters": true, "supportsKeywords": true, "supportsIsoCountryCode": true, "supportsImplicitConsent": true, "supportsExplicitConsent": false, "supportsDoubleOptInConsent": false }, "FullName": "Partner1_ChannelDefinition1" } ``` ```json { "DeveloperName": "Partner1_ChannelDefinition1", "MasterLabel": "Channel Definition 1", "ConversationVendorInfoId": "0m8000000000000123", "CustomPlatformEvent": "devorg**TestEvent**e", "CustomEventTypeField": "devorg**EventType**c", "CustomEventPayloadField": "devorg**Payload**c", "CustomIconId": "mylogo", "CapabilitiesSupportsKeywords": true, "CapabilitiesSupportsIsoCountryCode": true, "CapabilitiesSupportsImplicitConsent": true, "CapabilitiesSupportsExplicitConsent": false, "ConsentOwner": "Salesforce", "EventCapabilitiesIsInboundAcknwOptionExposed": true, "EventCapabilitiesIsTypingIndicatorOptionHidden": false, "RoutingOwner": "Salesforce" } ``` ## Optional Configuration Consider these optional tasks when creating the ConversationChannelDefinition Record: - [Configure Consent Levels to Customize the Messaging Opt-In and Opt-Out Experience](https://developer.salesforce.com/docs/service/messaging-partner/guide/configure-consent-levels.md) - [Add Custom Icon](https://developer.salesforce.com/docs/service/messaging-partner/guide/add-custom-icon.md) - [Add Support for Custom Parameters](https://developer.salesforce.com/docs/service/messaging-partner/guide/add-custom-objects.md) - [Configure Inbound Acknowledgements and Outbound Typing Indicators](https://developer.salesforce.com/docs/service/messaging-partner/guide/inbound-acknowledgements-typing-indicators.md) - [Configure Agentforce Service Agent Progress Indicators](https://developer.salesforce.com/docs/service/messaging-partner/guide/progress-indicators.md) - [Add Multiple Participants to a Messaging Conference](https://developer.salesforce.com/docs/service/messaging-partner/guide/conference.md) **See Also** - _Tooling API Guide_: [ConversationChannelDefinition](https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_conversationchanneldefinition.htm) - _Metadata API Guide_: [ConversationChannelDefinition](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_conversationchanneldefinition.htm) - _Object Reference_: [ConversationChannelDefinition](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_conversationchanneldefinition.htm) # Create the Conversation Vendor Information Record The Conversaton Vendor Definition (`ConversationVendorInfo`) record contains metadata about the Bring Your Own Channel for CCaaS messaging vendor. Use your preferred method, such as Metadata API or Tooling API, and the sample payload to create the record. For example, if you use Metadata API to create the record, send the POST request to this endpoint. `POST /services/data/v61.0/tooling/sobjects/ConversationVendorInfo/` ## Sample Payload ```json { "Metadata": { "developerName": "partnerName", "masterLabel": "Partner Name", "vendorType": "BringYourOwnContactCenter", "connectorUrl": "{Vendor System Url}" }, "FullName":"partnerName" } ``` **See Also** - _Object Reference_: [ConversationVendorInfo](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_conversationvendorinfo.htm) - _Metadata API Developer Guide_: [ConversationVendorInfo](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_conversationvendorinfo.htm) - _Tooling API Developer Guide_: [ConversationVendorInfo](https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_conversationvendorinfo.htm) # Create the Conversation Vendor Information Record The Conversaton Vendor Definition (`ConversationVendorInfo`) record contains metadata about the Bring Your Own Channel messaging vendor. Use your preferred method, such as Metadata API or Tooling API, and the sample payload to create the record. For example, if you use Metadata API to create the record, send the POST request to this endpoint. `POST /services/data/v60.0/tooling/sobjects/ConversationVendorInfo/` ## Sample Payload ```json { "Metadata": { "developerName": "partnerName", "masterLabel": "Partner Name", "vendorType": "BringYourOwnChannelPartner" }, "FullName": "partnerName" } ``` **See Also** - _Object Reference_: [ConversationVendorInfo](https://developer.salesforce.com/docs/atlas.en-us.voice_pt_developer_guide.meta/voice_pt_developer_guide/sforce_api_objects_conversationvendorinfo.htm) # Create the Interaction Service OAuth App To integrate a third-party channel with Salesforce using the Salesforce Interaction Service API, create an OAuth-enabled Interaction Service external client app (ECA) or connected app. By default, the CCaaS partner creates and manages the ECA or connected app for the Interaction Service integration and includes it in a managed package. If your CCaaS system architecture requires admins to create and manage the ECA or connected app during Bring Your Own Channel for CCaaS setup instead, set the `connectedAppType` field in the [Conversation Channel Definition](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/create-conversationchanneldefinition-record.md) to `Customer`, don’t include an ECA or connected app in your managed package, and notify your customers to follow instructions in the _Configure an External Client App for OAuth Integration_ section of this [Salesforce help article](https://help.salesforce.com/s/articleView?id=service.byoc_ccaas_create_channel.htm). **note:** Salesforce recommends using an external client app for Interaction Service authentication instead of a connected app. Starting in Spring ’26, customers can’t create a connected app unless they request the ability to create connected apps from Salesforce Support. To migrate a preexisting connected app, see [Create an External Client App from a Connected App](https://help.salesforce.com/s/articleView?id=xcloud.migrate_connected_app_to_external_client_app.htm). While ECAs are recommended for improved security and ease of packaging, connected apps will continue to work in Spring ’26 and later. See this [Knowledge Article](https://help.salesforce.com/s/articleView?id=005228017&type=1) for more information. ## Create an External Client App for OAuth Set up an external client app (ECA) to provide authentication for the integration between your Messaging or CCaaS platform and Salesforce Interaction Service API. 1. If you don’t have a self-signed certificate, follow the steps to [Create a Private Key and Self-Signed Digital Certificate](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_auth_key_and_cert.htm). Make sure you have the certificate saved in your system. You upload the file when you create the ECA. 2. [Create an external client app](https://help.salesforce.com/s/articleView?id=xcloud.create_a_local_external_client_app.htm). 1. In the External Client App Name field, enter a unique name for the external client app in the format `{prefix} {externalClientAppName}`, for example, `Partner1 ExternalClientApp1`. The `{prefix}` can be a partner name. The `{externalClientAppName}` is the name you want to give the external client app. Remember the prefix because it's used for the `developerName` when you create the ConversationChannelDefinition record. The name you enter automatically appears in the API Name field in the format `{prefix}_{externalClientAppName}`. Don’t change the API Name. 2. In the Contact Email field, enter the email address of the person to notify about the external client app, such as when a Salesforce administrator views the consumer key for JWT generation. This can be your email address. 3. Determine the distribution state. 1. To develop an external client app for your local org, set the Distribution State to **Local**. 2. To develop an external client app for packaging and distribution, set the Distribution State to **Packaged**. 3. In the OAuth Settings area of the page, select **Enable OAuth**. The OAuth Settings area expands and the OAuth settings fields are visible. 4. Add a callback URL (endpoint), which is the same as the OAuth redirect URI. We recommend you use `https://login.salesforce.com` to start with. 5. Add the OAuth scope: **Access Interaction API resources (interaction_api)**. 6. In the Flow Enablement section, select **Enable JWT Bearer Flow**. 7. Upload your self-signed certificate. 8. To create the ECA, click **Create**. 9. In your external client app’s Policies tab, click **Edit**. 10. Under OAuth policies, from the **Permitted Users** dropdown, select **Admin approved users are pre-authorized**. If you see a warning message, click **OK**. 11. Under App Policies, add the **System Administrator** profile. 12. Save your changes. ## Create a Connected App for OAuth Starting in Spring ’26, we recommend [creating an external client app (ECA)](#create-an-external-client-app-for-oauth) to provide authentication for the integration between your platform and Salesforce instead of creating a connected app. If you choose to create a connected app, before you begin, contact Salesforce Support to request the ability to create connected apps. 1. Make sure you have the public key saved in your system. You must upload the file when you create the connected app. If you don’t have a self-signed certificate, see [Create a Private Key and Self-Signed Digital Certificate](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_auth_key_and_cert.htm). 2. From Setup, in the Quick Find box, enter `External Client Apps`, and then select **Settings**. 3. Under Connected Apps, click **New Connected App**. 4. In the Connected App Name field, enter a unique name for the connected app in the format `{prefix} {connectedAppName}`, for example, `Partner1 ConnectedApp1`. The `{prefix}` can be a partner name. The `{connectedAppName}` is the name you want to give the connected app. Remember the prefix because it's used for the `developerName` when you create the ConversationChannelDefinition record. The name you enter automatically appears in the API Name field in the format `{prefix}_{connectedAppName}`. Don’t change the API Name. 5. In the **Contact Email** field, enter the email address of the person to notify about the connected app, such as when a Salesforce administrator views the consumer key of the connected app. This can be your email address. 6. Select the **Enable OAuth Settings** checkbox, and configure these settings: 1. Add a callback URL (endpoint), which is the same as the OAuth redirect URI. We recommend you use `https://login.salesforce.com` to start with. 2. Select **Use digital signatures**, then click **Choose File** and select the public key file in your system to upload it. 3. Add the OAuth scopes: - **Access Interaction API resources** (`interaction_api`) - **Perform Requests at any time** (`refresh_token`, `offline_access`) 7. Save your changes, then click **Continue**. 8. From Setup, in the Quick Find box, enter `Manage Connected Apps`, and then select **Manage Connected Apps**. 9. Click the name of the connected app you created. 10. To open the Connected App Edit page, click **Edit Policies**. 11. In the OAuth Policies section, set **Permitted Users** to **Admin approved users are pre-authorized**. If you see a warning message, click **OK**. 12. Save your changes. 13. To open the Application Profile Assignment page, click **Manage Profiles**. 14. Select **System Administrator**. 15. Save your changes. **See Also** - _Salesforce Help:_ [Comparison of Connected Apps and External Client Apps Features](https://help.salesforce.com/s/articleView?id=xcloud.connected_apps_and_external_client_apps_features.htm) - _Salesforce Help:_ [Create a Local External Client App](https://help.salesforce.com/s/articleView?id=xcloud.create_a_local_external_client_app.htm) - _Salesforce Help:_ [Configure the External Client App OAuth Settings](https://help.salesforce.com/s/articleView?id=xcloud.configure_external_client_app_oauth_settings.htm) - _Salesforce Help_: [Configure Basic Connected App Settings](https://help.salesforce.com/s/articleView?id=xcloud.connected_app_create_basics.htm) - _Salesforce Help_: [Enable OAuth Settings for API Integration](https://help.salesforce.com/s/articleView?id=xcloud.connected_app_create_api_integration.htm) # Create the Interaction Service OAuth App To integrate a third-party channel with Salesforce using the Salesforce Interaction Service API, create an OAuth-enabled Interaction Service external client app (ECA) or connected app. **tip:** If you are self-implementing Bring Your Own Channel for Messaging based on [Create Your Own Integration](https://developer.salesforce.com/docs/service/messaging-partner/guide/create-your-own-integration.md) instructions, follow instructions in the _Configure an External Client App for OAuth Integration_ section of this [Salesforce help article](https://help.salesforce.com/s/articleView?id=service.partner_messaging_install.htm). Instructions on this page are for Messaging partners creating integrations to share on AgentExchange (formerly AppExchange). By default, the Messaging partner creates and manages the ECA or connected app for the Interaction Service integration and includes it in a managed package. If your Messaging system architecture requires admins to create and manage the ECA or connected app during Bring Your Own Channel for Messaging setup instead, set the `connectedAppType` field in the [Conversation Channel Definition](https://developer.salesforce.com/docs/service/messaging-partner/guide/create-conversationchanneldefinition-record.md) to `Customer`, don’t include an ECA or connected app in your managed package, and notify your customers to follow the _Configure an External Client App for OAuth Integration_ instructions in the [Salesforce Help](https://help.salesforce.com/s/articleView?id=service.partner_messaging_install.htm) instead. **note:** Salesforce recommends using an external client app for Interaction Service authentication instead of a connected app. Starting in Spring ’26, customers can’t create a connected app unless they request the ability to create connected apps from Salesforce Support. To migrate a preexisting connected app, see [Create an External Client App from a Connected App](https://help.salesforce.com/s/articleView?id=xcloud.migrate_connected_app_to_external_client_app.htm). While ECAs are recommended for improved security and ease of packaging, connected apps will continue to work in Spring ’26 and later. See this [Knowledge Article](https://help.salesforce.com/s/articleView?id=005228017&type=1) for more information. ## Create an External Client App for OAuth Set up an external client app (ECA) to provide authentication for the integration between your Messaging or CCaaS platform and Salesforce Interaction Service API. 1. If you don’t have a self-signed certificate, follow the steps to [Create a Private Key and Self-Signed Digital Certificate](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_auth_key_and_cert.htm). Make sure you have the certificate saved in your system. You upload the file when you create the ECA. 2. [Create an external client app](https://help.salesforce.com/s/articleView?id=xcloud.create_a_local_external_client_app.htm). 1. In the External Client App Name field, enter a unique name for the external client app in the format `{prefix} {externalClientAppName}`, for example, `Partner1 ExternalClientApp1`. The `{prefix}` can be a partner name. The `{externalClientAppName}` is the name you want to give the external client app. Remember the prefix because it's used for the `developerName` when you create the ConversationChannelDefinition record. The name you enter automatically appears in the API Name field in the format `{prefix}_{externalClientAppName}`. Don’t change the API Name. 2. In the Contact Email field, enter the email address of the person to notify about the external client app, such as when a Salesforce administrator views the consumer key for JWT generation. This can be your email address. 3. Determine the distribution state. 1. To develop an external client app for your local org, set the Distribution State to **Local**. 2. To develop an external client app for packaging and distribution, set the Distribution State to **Packaged**. 3. In the OAuth Settings area of the page, select **Enable OAuth**. The OAuth Settings area expands and the OAuth settings fields are visible. 4. Add a callback URL (endpoint), which is the same as the OAuth redirect URI. We recommend you use `https://login.salesforce.com` to start with. 5. Add the OAuth scope: **Access Interaction API resources (interaction_api)**. 6. In the Flow Enablement section, select **Enable JWT Bearer Flow**. 7. Upload your self-signed certificate. 8. To create the ECA, click **Create**. 9. In your external client app’s Policies tab, click **Edit**. 10. Under OAuth policies, from the **Permitted Users** dropdown, select **Admin approved users are pre-authorized**. If you see a warning message, click **OK**. 11. Under App Policies, add the **System Administrator** profile. 12. Save your changes. ## Create a Connected App for OAuth Starting in Spring ’26, we recommend [creating an external client app (ECA)](#create-an-external-client-app-for-oauth) to provide authentication for the integration between your platform and Salesforce instead of creating a connected app. If you choose to create a connected app, before you begin, contact Salesforce Support to request the ability to create connected apps. 1. Make sure you have the public key saved in your system. You must upload the file when you create the connected app. If you don’t have a self-signed certificate, see [Create a Private Key and Self-Signed Digital Certificate](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_auth_key_and_cert.htm). 2. From Setup, in the Quick Find box, enter `External Client Apps`, and then select **Settings**. 3. Under Connected Apps, click **New Connected App**. 4. In the Connected App Name field, enter a unique name for the connected app in the format `{prefix} {connectedAppName}`, for example, `Partner1 ConnectedApp1`. The `{prefix}` can be a partner name. The `{connectedAppName}` is the name you want to give the connected app. Remember the prefix because it's used for the `developerName` when you create the ConversationChannelDefinition record. The name you enter automatically appears in the API Name field in the format `{prefix}_{connectedAppName}`. Don’t change the API Name. 5. In the **Contact Email** field, enter the email address of the person to notify about the connected app, such as when a Salesforce administrator views the consumer key of the connected app. This can be your email address. 6. Select the **Enable OAuth Settings** checkbox, and configure these settings: 1. Add a callback URL (endpoint), which is the same as the OAuth redirect URI. We recommend you use `https://login.salesforce.com` to start with. 2. Select **Use digital signatures**, then click **Choose File** and select the public key file in your system to upload it. 3. Add the OAuth scopes: - **Access Interaction API resources** (`interaction_api`) - **Perform Requests at any time** (`refresh_token`, `offline_access`) 7. Save your changes, then click **Continue**. 8. From Setup, in the Quick Find box, enter `Manage Connected Apps`, and then select **Manage Connected Apps**. 9. Click the name of the connected app you created. 10. To open the Connected App Edit page, click **Edit Policies**. 11. In the OAuth Policies section, set **Permitted Users** to **Admin approved users are pre-authorized**. If you see a warning message, click **OK**. 12. Save your changes. 13. To open the Application Profile Assignment page, click **Manage Profiles**. 14. Select **System Administrator**. 15. Save your changes. **See Also** - _Salesforce Help:_ [Comparison of Connected Apps and External Client Apps Features](https://help.salesforce.com/s/articleView?id=xcloud.connected_apps_and_external_client_apps_features.htm) - _Salesforce Help:_ [Create a Local External Client App](https://help.salesforce.com/s/articleView?id=xcloud.create_a_local_external_client_app.htm) - _Salesforce Help:_ [Configure the External Client App OAuth Settings](https://help.salesforce.com/s/articleView?id=xcloud.configure_external_client_app_oauth_settings.htm) - _Salesforce Help_: [Configure Basic Connected App Settings](https://help.salesforce.com/s/articleView?id=xcloud.connected_app_create_basics.htm) - _Salesforce Help_: [Enable OAuth Settings for API Integration](https://help.salesforce.com/s/articleView?id=xcloud.connected_app_create_api_integration.htm) # Create the Managed Package Create the managed package for external distribution or internal testing. Distribute the managed package so that customers can download it to install and use Interaction Service APIs. Before you create the package for external distribution, you can create a beta test version first to internally test and validate the package. If you don’t have any managed packages in your org, if you’re using a scratch org to test the managed package, or if you’re using an external client app for authentication, create a second-generation Bring Your Own Channel for CCaaS managed package. If you’ve developed apps in the org using first-generation managed packages or you’re using a connected app for authentication, create a first-generation Bring Your Own Channel for CCaaS managed package. ## Create a Second-Generation Managed Package [Create a second-generation managed package](https://developer.salesforce.com/docs/atlas.en-us.pkg2_dev.meta/pkg2_dev/sfdx_dev_dev2gp.htm) if you don’t have any managed packages in your org, if you’re using a scratch org to test the managed package, or if you’re using an external client app for authentication. We recommend that all new packages are created using second-generation managed packaging (2GP). ### Project Structure and Bring Your Own Channel Examples A standard Salesforce project has the following structure. This structure is created by default when you use the Salesforce CLI to generate a new Salesforce project. ``` my-salesforce-project/ ├── force-app/ # Source code directory │ └── main/ │ └── default/ # Default metadata folder │ ├── classes/ # Apex classes │ ├── objects/ # Custom objects │ ├── triggers/ # Apex triggers │ └── ... # Other metadata types ├── sfdx-project.json # Project configuration file ├── config/ # Configuration files (optional) └── .gitignore # Git ignore rules ``` Key components: - `force-app/`: Contains all source code and metadata for your Salesforce org. - `sfdx-project.json`: Defines project settings, package directories, and namespace. - `config/`: Optional directory for scratch org definitions and other configuration files. - `.gitignore`: Specifies files and directories to exclude from version control. When working with Bring Your Own Channel packages, your project structure includes additional metadata types in the `force-app/main/default/` directory: - `conversationChannelDefinitions/`: Channel definitions for contact center integration. Always required. - `conversationVendorInformation/`: Vendor information metadata. Always required. - `objects/`: Platform event objects for real-time communication. Always required. - `externalClientApps/`: External client applications. Required when using an external client app for OAuth authentication, typically when `connectedAppType` is `Partner` in the Conversation Channel Definition. - `extlClntAppOauthSettings/`: OAuth settings for external client apps. Required together with `externalClientApps/` when using ECAs. ### Partner Controlled External Client App (ECA) When using an ECA for OAuth authentication with `connectedAppType` set to `Partner`, your folder structure looks like this. ``` scenario1/main/default/ ├── conversationChannelDefinitions/ │ └── Prefix1_ChannelDefinition3.ConversationChannelDefinition-meta.xml ├── conversationVendorInformation/ │ └── VendorInfo1.ConversationVendorInformation-meta.xml ├── externalClientApps/ │ └── Prefix1_ExternalClientApp.eca-meta.xml ├── extlClntAppOauthSettings/ │ └── Prefix1_ExternalClientApp_oauth.ecaOauth-meta.xml └── objects/ └── BYOEvent1__e/ ├── BYOEvent1__e.object-meta.xml └── fields/ ├── EventType__c.field-meta.xml └── Payload__c.field-meta.xml ``` Key components: - `externalClientApps/`: Contains the External Client App metadata file. Required when `connectedAppType` is `Partner`. - `extlClntAppOauthSettings/`: Contains the OAuth settings for the External Client App. Required together with `externalClientApps/`. - `conversationChannelDefinitions/`: Channel definition that references the External Client App. - `conversationVendorInformation/`: Vendor information configuration. - `objects/BYOEvent1__e/`: Platform event object with EventType and Payload fields. **note:** Include both `externalClientApps/` and `extlClntAppOauthSettings/` when using ECAs with `connectedAppType` set to `Partner`. The OAuth settings file name typically follows the pattern: `{ExternalClientAppName}_oauth.ecaOauth-meta.xml`. ### Customer Controlled External Client App (ECA) When using an ECA for OAuth authentication with `connectedAppType` set to `Customer`, your folder structure looks like this. ``` scenario2/main/default/ ├── conversationChannelDefinitions/ │ └── Prefix2_ChannelDefinition4.ConversationChannelDefinition-meta.xml ├── conversationVendorInformation/ │ └── VendorInfo4.ConversationVendorInformation-meta.xml └── objects/ └── BYOEvent2__e/ ├── BYOEvent2__e.object-meta.xml └── fields/ ├── EventType__c.field-meta.xml └── Payload__c.field-meta.xml ``` Key components: - `conversationChannelDefinitions/`: Channel definition with `connectedAppType` set to `Customer` (no External Client App reference). - `conversationVendorInformation/`: Vendor information configuration. - `objects/BYOEvent2__e/`: Platform event object with EventType and Payload fields. **note:** When `connectedAppType` is `Customer`, don’t include the `externalClientApps/` and `extlClntAppOauthSettings/` directories in the package. The customer provides their own ECA configuration outside the package. ## Create a First-Generation Managed Package Create a first-generation managed package if you’ve already used first-generation managed packages to develop apps in your org or if you’re using a connected app for authentication. Otherwise, create a second-generation managed package. 1. From Setup, in the Quick Find box, enter `Package Manager`, and then select **Package Manager**. 2. Click **New**. 3. Enter a package name for your managed package and then click **Save**. 4. In the package you created, click the **Components** tab. 5. In the Component Type picklist, select **Conversation Channel Definition**, and then click **Add to Package**. All foreign keys are also added to the package. 6. If you [created a sample outbound flow for AI agents](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/create-agentforce-service-agent.md), complete these steps. - In the Component Type picklist, select **Flow Definition**. Select the outbound flow that you created for escalating from an AI agent to a rep, and then click **Add to Package**. 7. If you [created a sample Einstein Bot and associated Omni-Channel flows](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/create-einstein-bot.md), complete these steps. - In the Component Type picklist, select **Bot**, select the sample Einstein Bot that you created, and then click **Add to Package**. - In the Component Type picklist, select **Flow Definition**. Select the outbound flow that you created for escalating from an Einstein Bot to a rep, select the automatically created inbound flow for routing to an Einstein Bot, and then click **Add to Package**. 8. In the Component Type picklist, select **Connected App**, select the interaction service connected app you created, and then click **Add to Package**. If you created multiple connected apps, select them all. If you require admins to set up and configure their own connected app instead, don’t include a connected app in the package. - To create the managed package for distribution to customers, select **Managed - Release**. - If you want to test and validate the package internally or with select customers before creating the formal “Managed - Release” version, select **Managed - Beta**. 9. Click **Upload**. 10. After the upload is complete, copy the installation URL and send it to your customer, who can install the package and set up the product in their orgs. # Create the Managed Package Create the managed package for external distribution or internal testing. Create and distribute the managed package so customers can download it to install and use Interaction Service APIs. Before you create the package for external distribution, you can create a beta test version first to internally test and validate the package. ## Create a Second-Generation Managed Package [Create a second-generation managed package](https://developer.salesforce.com/docs/atlas.en-us.pkg2_dev.meta/pkg2_dev/sfdx_dev_dev2gp.htm) if you don’t have any managed packages in your org, if you’re using a scratch org to test the managed package, or if you’re using an external client app for authentication. We recommend that all new packages are created using second-generation managed packaging (2GP). ### Project Structure and Bring Your Own Channel Examples A standard Salesforce project has the following structure. This structure is created by default when you use the Salesforce CLI to generate a new Salesforce project. ``` my-salesforce-project/ ├── force-app/ # Source code directory │ └── main/ │ └── default/ # Default metadata folder │ ├── classes/ # Apex classes │ ├── objects/ # Custom objects │ ├── triggers/ # Apex triggers │ └── ... # Other metadata types ├── sfdx-project.json # Project configuration file ├── config/ # Configuration files (optional) └── .gitignore # Git ignore rules ``` Key components: - `force-app/`: Contains all source code and metadata for your Salesforce org. - `sfdx-project.json`: Defines project settings, package directories, and namespace. - `config/`: Optional directory for scratch org definitions and other configuration files. - `.gitignore`: Specifies files and directories to exclude from version control. When working with Bring Your Own Channel packages, your project structure includes additional metadata types in the `force-app/main/default/` directory: - `conversationChannelDefinitions/`: Channel definitions for contact center integration. Always required. - `conversationVendorInformation/`: Vendor information metadata. Always required. - `objects/`: Platform event objects for real-time communication. Always required. - `externalClientApps/`: External client applications. Required when using an external client app for OAuth authentication, typically when `connectedAppType` is `Partner` in the Conversation Channel Definition. - `extlClntAppOauthSettings/`: OAuth settings for external client apps. Required together with `externalClientApps/` when using ECAs. ### Partner Controlled External Client App (ECA) When using an ECA for OAuth authentication with `connectedAppType` set to `Partner`, your folder structure looks like this. ``` scenario1/main/default/ ├── conversationChannelDefinitions/ │ └── Prefix1_ChannelDefinition3.ConversationChannelDefinition-meta.xml ├── conversationVendorInformation/ │ └── VendorInfo1.ConversationVendorInformation-meta.xml ├── externalClientApps/ │ └── Prefix1_ExternalClientApp.eca-meta.xml ├── extlClntAppOauthSettings/ │ └── Prefix1_ExternalClientApp_oauth.ecaOauth-meta.xml └── objects/ └── BYOEvent1__e/ ├── BYOEvent1__e.object-meta.xml └── fields/ ├── EventType__c.field-meta.xml └── Payload__c.field-meta.xml ``` Key components: - `externalClientApps/`: Contains the External Client App metadata file. Required when `connectedAppType` is `Partner`. - `extlClntAppOauthSettings/`: Contains the OAuth settings for the External Client App. Required together with `externalClientApps/`. - `conversationChannelDefinitions/`: Channel definition that references the External Client App. - `conversationVendorInformation/`: Vendor information configuration. - `objects/BYOEvent1__e/`: Platform event object with EventType and Payload fields. **note:** Include both `externalClientApps/` and `extlClntAppOauthSettings/` when using ECAs with `connectedAppType` set to `Partner`. The OAuth settings file name typically follows the pattern: `{ExternalClientAppName}_oauth.ecaOauth-meta.xml`. ### Customer Controlled External Client App (ECA) When using an ECA for OAuth authentication with `connectedAppType` set to `Customer`, your folder structure looks like this. ``` scenario2/main/default/ ├── conversationChannelDefinitions/ │ └── Prefix2_ChannelDefinition4.ConversationChannelDefinition-meta.xml ├── conversationVendorInformation/ │ └── VendorInfo4.ConversationVendorInformation-meta.xml └── objects/ └── BYOEvent2__e/ ├── BYOEvent2__e.object-meta.xml └── fields/ ├── EventType__c.field-meta.xml └── Payload__c.field-meta.xml ``` Key components: - `conversationChannelDefinitions/`: Channel definition with `connectedAppType` set to `Customer` (no External Client App reference). - `conversationVendorInformation/`: Vendor information configuration. - `objects/BYOEvent2__e/`: Platform event object with EventType and Payload fields. **note:** When `connectedAppType` is `Customer`, don’t include the `externalClientApps/` and `extlClntAppOauthSettings/` directories in the package. The customer provides their own ECA configuration outside the package. ## Create a First-Generation Managed Package Create a first-generation managed package if you’ve already used first-generation managed packages to develop apps in your org or if you’re using a connected app for authentication. Otherwise, create a second-generation managed package. 1. From Setup, in the Quick Find box, enter `Package Manager`, and then select **Package Manager**. 2. Click **New**. 3. Enter a package name for your managed package and then click **Save**. 4. In the package you created, click the **Components** tab. 5. In the Component Type picklist, select **Conversation Channel Definition**, and then click **Add to Package**. All foreign keys are also added to the package. 6. If you [created a sample outbound flow for AI agents](https://developer.salesforce.com/docs/service/messaging-partner/guide/create-agentforce-service-agent.md), complete these steps. - In the Component Type picklist, select **Flow Definition**. Select the outbound flow that you created for escalating from an AI agent to a rep, and then click **Add to Package**. 7. If you [created a sample Einstein Bot and associated Omni-Channel flows](https://developer.salesforce.com/docs/service/messaging-partner/guide/create-einstein-bot.md), complete these steps. - In the Component Type picklist, select **Bot**, select the sample Einstein Bot that you created, and then click **Add to Package**. - In the Component Type picklist, select **Flow Definition**. Select the outbound flow that you created for escalating from an Einstein Bot to a rep, select the automatically created inbound flow for routing to an Einstein Bot, and then click **Add to Package**. 8. In the Component Type picklist, select **Connected App**, select the interaction service connected app you created, and then click **Add to Package**. If you created multiple connected apps, select them all. If you require admins to set up and configure their own connected app instead, don’t include a connected app in the package. - To create the managed package for distribution to customers, select **Managed - Release**. - If you want to test and validate the package internally or with select customers before creating the formal “Managed - Release” version, select **Managed - Beta**. 9. Click **Upload**. 10. After the upload is complete, copy the installation URL and send it to your customer, who can install and set up [Bring Your Own Channel for Messaging](https://help.salesforce.com/s/articleView?id=service.partner_messaging_intro.htm) in their orgs. # Create the OAuth App To use the [Conversation History API](https://developer.salesforce.com/docs/service/messaging-api/guide/invoke-conversation-history-api.md), create an OAuth-enabled external client app (ECA) or connected app. Salesforce recommends using an external client app starting in Spring '26. ## Create an External Client App for OAuth Set up an external client app (ECA) to authenticate application calls to the Conversation History API. 1. If you don’t have a self-signed certificate, follow the steps to [Create a Private Key and Self-Signed Digital Certificate](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_auth_key_and_cert.htm). Make sure you have the certificate saved in your system. You upload the file when you create the ECA. 2. [Create an external client app](https://help.salesforce.com/s/articleView?id=xcloud.create_a_local_external_client_app.htm). 1. In the External Client App Name field, enter a unique name for the external client app in the format `{prefix} {externalClientAppName}`, for example, `Partner1 ExternalClientApp1`. The `{prefix}` can be a partner name, and `{externalClientAppName}` is the name you specify for the external client app. Make sure that you note the prefix because it's used for the `developerName` when you create the ConversationChannelDefinition record. The name you enter automatically appears in the API Name field in the format `{prefix}_{externalClientAppName}`. Don’t change the API Name. 2. In the Contact Email field, enter the email address of the person to notify about the external client app, such as when a Salesforce admin views the consumer key for JWT generation. You can specify your email address as the contact email. 3. Set the distribution state. 1. To develop an external client app for your local org, set the Distribution State to **Local**. 2. To develop an external client app for packaging and distribution, set the Distribution State to **Packaged**. 3. In the OAuth Settings section, select **Enable OAuth**. The OAuth Settings area expands and the OAuth settings fields are visible. 4. Add a callback URL (endpoint), which is the same as the OAuth redirect URI. We recommend you use `https://login.salesforce.com` to start with. 5. Add the OAuth scope: **Access Interaction API resources (interaction_api)**. 6. In the Flow Enablement section, select **Enable JWT Bearer Flow**. 7. Upload your self-signed certificate. 8. To create the ECA, click **Create**. 9. In your external client app’s Policies tab, click **Edit**. 10. Under OAuth policies, from the **Permitted Users** dropdown, select **Admin approved users are pre-authorized**. If you see a warning message, click **OK**. 11. Under App Policies, add the **System Administrator** profile. 12. Save your changes. ## Create a Connected App Starting in Spring ’26, we recommend [creating an external client app (ECA)](#create-an-external-client-app-for-oauth) to provide authentication for the integration between your platform and Salesforce instead of creating a connected app. If you choose to create a connected app, before you begin, contact Salesforce Support to request the ability to create connected apps. 1. Make sure you have the public key saved in your system. You must upload the file when you create the connected app. If you don’t have a self-signed certificate, see [Create a Private Key and Self-Signed Digital Certificate](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_auth_key_and_cert.htm). 2. From Setup, in the Quick Find box, enter `External Client Apps`, and then select **Settings**. 3. Under Connected Apps, turn on Allow creation of connected apps, and then click **New Connected App**. 4. In the Connected App Name field, enter a unique name for the connected app. The name you enter automatically appears in the API Name field. Remember the API name because it's used for the `developerName` when you [Invoke Conversation History API](https://developer.salesforce.com/docs/service/messaging-api/guide/invoke-conversation-history-api.md). 5. In the **Contact Email** field, enter the email address of the person to notify about the connected app, such as when a Salesforce admin views the consumer secret of the connected app. This entry can be your email address. 6. Select the **Enable OAuth Settings** checkbox, and configure these settings: 1. Add a callback URL (endpoint), which is the same as the OAuth redirect URI. We recommend you use `https://salesforce.com` to start with. 2. Select **Use digital signatures**, then click **Choose File** and select the public key file in your system to upload it. 3. Add the OAuth scopes: - **Access Interaction API resources** (`interaction_api`) - **Perform Requests at any time** (`refresh_token`, `offline_access`) 7. Save your changes, then click **Continue**. 8. From Setup, in the Quick Find box, enter `Manage Connected Apps`, and then select **Manage Connected Apps**. 9. Click the name of the connected app you created. 10. To open the Connected App Edit page, click **Edit Policies**. 11. In the OAuth Policies section, set **Permitted Users** to **Admin approved users are pre-authorized**. If you see a warning message, click **OK**. 12. Save your changes. 13. To open the Application Profile Assignment page, click **Manage Profiles**. 14. Select **System Administrator**. 15. Save your changes. **See Also** - _Salesforce Help:_ [Comparison of Connected Apps and External Client Apps Features](https://help.salesforce.com/s/articleView?id=xcloud.connected_apps_and_external_client_apps_features.htm) - _Salesforce Help:_ [Create a Local External Client App](https://help.salesforce.com/s/articleView?id=xcloud.create_a_local_external_client_app.htm) - _Salesforce Help:_ [Configure the External Client App OAuth Settings](https://help.salesforce.com/s/articleView?id=xcloud.configure_external_client_app_oauth_settings.htm) - _Salesforce Help_: [Configure Basic Connected App Settings](https://help.salesforce.com/s/articleView?id=xcloud.connected_app_create_basics.htm) - _Salesforce Help_: [Enable OAuth Settings for API Integration](https://help.salesforce.com/s/articleView?id=xcloud.connected_app_create_api_integration.htm) # Create Your Own Messaging Provider Integration for Bring Your Own Channel for Messaging As a Salesforce admin, one way to set up Bring Your Own Channel for Messaging is by installing a managed package from your preferred partner from AppExchange. You can also work with a developer to create your own Messaging provider integration instead. **important:** This topic is for developers who are creating an integration that is not meant for distribution on AppExchange. To create an integration packaged for AppExchange instead, see [Enable Bring Your Own Channel for Messaging](https://developer.salesforce.com/docs/service/messaging-partner/guide/messaging-partner-setup.md). To set up Bring Your Own Channel for Messaging as an admin, see the [Salesforce Help](https://help.salesforce.com/s/articleView?id=service.partner_messaging_intro.htm). To make your own integration for Bring Your Own Channel for Messaging work, get an access token, create a custom platform event, and add a Conversation Channel Definition record. Then set up a Bring Your Own Channel Messaging channel using those items. Create a connected app that connects your preferred Messaging provider to Salesforce Interaction Service using OAuth and associate it to your Messaging channel. 1. [Prepare your environment](https://developer.salesforce.com/docs/service/messaging-partner/guide/introduction.md) for self-implementing Bring Your Own Channel for Messaging. 2. [Generate an access token](https://developer.salesforce.com/docs/service/messaging-partner/guide/generate-token.md) for authenticating requests to Interaction Service API. 3. [Create and configure a custom platform event](https://developer.salesforce.com/docs/service/messaging-partner/guide/create-platform-event.md) to send and receive messages between Salesforce and the Messaging provider system. 4. [Create a Conversation Channel Definition](https://developer.salesforce.com/docs/service/messaging-partner/guide/create-conversationchanneldefinition-record.md) record to bundle the metadata used for your Bring Your Own Channel for Messaging integration. - Set `connectedAppType` to `Customer` to indicate that you’re creating the connected app instead of the Messaging partner. See step 7 for more details. - Don’t include the `conversationVendorInfo` field. It isn’t valid for this type of self-implementation. 5. Prepare [your reps](https://help.salesforce.com/s/articleView?id=service.partner_messaging_prepare_users.htm) and [your Salesforce org](https://help.salesforce.com/s/articleView?id=service.partner_messaging_prepare_org.htm) to use Bring Your Own Channel for Messaging. 6. Create a Bring Your Own Channel Messaging channel. 1. From **Setup**, in the Quick Find box, enter `Messaging Settings`, and then select **Messaging Settings**. 2. Click **New Channel**. 3. Select the Conversation Channel Definition tile that shows the Conversation Channel Definition that you made in step 4. Click **Next**. 4. Give your Bring Your Own Channel messaging channel a name. 5. Click anywhere to populate the Developer Name field. 6. Save your changes. 7. Under Omni-Channel Routing, click **Edit**. 8. Select **Omni-Flow** as the Routing Type. 9. In the Flow Definition field, select the name of the flow that you created previously. 10. Save your changes. 7. Set up and configure an OAuth app for integrating your preferred Messaging provider with Salesforce Interaction Service API. Follow the instructions in the _Configure an External Client App for OAuth Integration_ section of this [Salesforce help article](https://help.salesforce.com/s/articleView?id=service.partner_messaging_install.htm) to create an external client app (ECA) and associate it with your Conversation Channel Definition within the Messaging Settings. **tip:** Don’t edit the `ConnectedAppOauthLink` value within the Conversation Channel Definition object directly. The value is system-generated when you make a selection in the Messaging Settings. 8. Activate your Messaging channel. 1. From **Setup**, enter Messaging Settings, and then select **Messaging Settings**. 2. Select the channel that you created. 3. Click **Activate**. 9. After you complete these steps, ​​[set up the demo connector](https://developer.salesforce.com/docs/service/messaging-partner/guide/set-up-demo-connector.md) to see an example integration. The demo connector shows you how to send requests to the Interaction Service API for inbound messages to a rep. For outbound messages from a rep to an end user, it shows how you can implement server-side middleware for outbound events. **note:** The demo connector is intended as a reference example only. You must create your own connector for your integration. 10. For outbound integrations, see the [Pub/Sub API Developer Guide](https://developer.salesforce.com/docs/platform/pub-sub-api/guide/intro.html) for information about subscribing to custom platform events. See our [outbound events reference](https://developer.salesforce.com/docs/service/messaging-partner/guide/docs/service/messaging-partner/references/outbound-event-reference/outbound-event-reference.html) for information about important events to consume. 11. When you’re ready, [test Interaction Service APIs](https://developer.salesforce.com/docs/service/messaging-partner/guide/test-apis.md). # Created By Represents the Created By relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. ## Relationship Type Definition ||| |-|-| |Developer Name|`SD_CrBy`| |Description|Defines the Created By relationship between configuration items in the CMDB.| |Master Label|Created By| |Direct Relationship|Created By| |Inverse Relationship|Created From| |Line Stroke|Solid| |Color Code|`#c73289`| # Created File Represents a single file created during a fetch optimization files operation. ## JSON Example ```nolang { "contentVersionId": "string", "success": true } ``` ## Properties |Property Name|Type|Description|Filter Group and Version|Available Version| |-------------|----|-----------|------------------------|-----------------| |`contentVersionId`|String|ID of the Content Version record created in the org for this file.|Small, 66.0|66.0| |`success`|Boolean|Indicates whether the Content Version record was created successfully (`true`) or not (`false`).|Small, 66.0|66.0| # Created Using Represents the Created Using relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. ## Relationship Type Definition ||| |-|-| |Developer Name|`SD_CrUs`| |Description|Defines the Created Using relationship between configuration items in the CMDB.| |Master Label|Created Using| |Direct Relationship|Created Using| |Inverse Relationship|Creates| |Line Stroke|Solid| |Color Code|`#d1c324`| # Creation of Surveys by Using Salesforce Feedback Management Response APIs Learn how you can create surveys using the Salesforce Feedback Management Response APIs. Customer experience is the cornerstone of any company’s success. Understanding customer sentiment through feedback is critical to a company’s growth lifecycle. Get to know customer satisfaction levels and gain deeper insights about your products or services through Surveys. Surveys enable you to gather continuous feedback, and then to work towards meeting customer expectations. You can invest further to enhance customer experience in areas where you find positive feedback, or pivot by using alternate plans to address negative feedback. Use Salesforce Feedback Management (SFM) Response APIs to build in-app surveys. In-app surveys retain the application context as survey participants don’t have to switch to other applications to complete the survey. In-app surveys also provide a user-friendly and intuitive experience that can be customized to reflect your company’s theme and branding, thus, increasing survey response rates. Let’s look at a scenario that uses the capabilities of SFM Response APIs to build in-app surveys. Consider a scenario wherein a company, Dream House, wants to get employee feedback on their new hire onboarding process. **note:** The API endpoints mentioned later in this scenario apply to authenticated users only. # Crisis Represents a major crisis event that affects an Employee in an InternalOrganizationUnit. This object is available in API version 48.0 and later. In API version 49.0 and later, this object supports reports, criteria-based sharing rules, and history tracking, plus you can exclude individual fields from custom page layouts. Work.com uses this object to track and describe crisis situations. ## Supported Calls `create()`, `delete()`, `describeLayout()`, `describeSObjects()`, `getDeleted()`, `getUpdated()`, `query()`, `retrieve()`, `undelete()`, `update()`, `upsert()` ## Special Access Rules To access this object, you must be assigned a Workplace Command Center permission set license and the Provides access to Workplace Command Center features system permission. ## Fields |Field|Type|Properties|Description| |-----|----|----------|-----------| |CrisisType|picklist|Create, Filter, Group, Sort, Update|Required. The type or category of crisis.Possible values are:
  • `Economic Crisis`
  • `Natural Disaster`
  • `Pandemic`
  • `War`
| |Description|string|Create, Filter, Group, Nillable, Sort, Update|The crisis description.| |EndDate|date|Create, Filter, Group, Nillable, Sort, Update|The date the crisis ended.| |LastReferencedDate|dateTime|Filter, Nillable, Sort|The timestamp for when the current user last viewed a record related to this record.| |LastViewedDate|dateTime|Filter, Nillable, Sort|The timestamp for when the current user last viewed this record. If this value is null, this record might only have been referenced (LastReferencedDate) and not viewed.| |Name|string|Create, Filter, Group, idLookup, Sort, Update|Required. The crisis record name.| |OwnerId|reference|Create, Defaulted on create, Filter, Group, Sort, Update|The ID of the user who currently owns this record. Default value is the user logged in to the API to perform the create operation.| |StartDate|date|Create, Filter, Group, Sort, Update|Required. The date the crisis started.| ## Associated Objects This object has the following associated objects. Unless noted, they are available in the same API version as this object. - CrisisHistory (API version 49.0) - : History is available for tracked fields of the object. - CrisisOwnerSharingRule - : Sharing rules are available for the object. - CrisisShare (API version 49.0) - : Sharing is available for the object. # Custom Field Used by Employee Concierge The Employee Concierge package includes a custom field on the standard object Case. Employee Concierge requires Employee Workspace and builds on the Employee standard object and the person account record type. - **[Case](https://developer.salesforce.com/docs/service/workdotcom-dev/guide/wkdw-sforce-api-objects-case.md)** Employee Concierge uses the standard object Case to store and manage employee support ticket data. The Employee Concierge managed package also installs a custom field for the Case object. # Custom Lightning Type APIs for Enhanced Chat v2 Define these JavaScript APIs for your Custom Lightning Type to send a message or pass context events to the agent in Enhanced Chat v2. **note:** These APIs are only compatible with Enhanced Chat v2 deployments. See [Compare Enhanced Chat v1 to Enhanced Chat v2](https://help.salesforce.com/s/articleView?id=service.enhanced_chat_feature_comparison.htm&type=5). ## Prerequisites Ensure that you’re familiar with building Lightning Web Components (LWC) and deploying them to your org before you begin. See [Core Concepts of Custom Lightning Types](https://developer.salesforce.com/docs/platform/lightning-types/guide/lightning-types-core.html) and [Get Started With Lightning Web Components for Enhanced Web Chat](https://developer.salesforce.com/docs/service/messaging-web/guide/custom-ui-component.md). Review [Context Events in Enhanced Web Chat v2](https://developer.salesforce.com/docs/service/messaging-web/guide/context-events.md) for context events schema and reference. To use the `sendTextMessage` and `setSessionContext` APIs, your LWC must receive the configuration object that the Enhanced Chat v2 runtime injects. Declare a public property named `configuration` in your LWC JavaScript file so the platform can pass it in. ```javascript /** * Deployment configuration data. * @type {Object} */ @api configuration; ``` Use optional chaining (for example, `this.configuration?.util`) when calling the APIs so the component behaves safely if configuration isn’t present. ## Send a Message on Behalf of the User Use `configuration.util.sendTextMessage` to send a text message. You can optionally pass an array of context events as a second argument so that the agent receives context with that message. ```javascript this.configuration?.util?.sendTextMessage("I need help with this product", [ { name: "_AgentContext", value: { valueType: "StructuredValue", value: { currentPage: "https://example.com/products/laptops", search: { result: "MacBook Pro 16-inch", filters: ["Brand: Apple", "Price: $2000-$3000"], facets: ["Laptops", "Computers", "Electronics"], }, }, }, }, ]) .then(() => { console.log("Successfully sent message with context."); }) .catch((error) => { console.log("Error sending message with context: " + error); }); ``` ## Pass Context Events You can pass context to the agent in two ways: with a message (second parameter of `sendTextMessage`) or by setting session context without sending a message (`setSessionContext`). Use `setSessionContext` when you want to update the context the agent has for the conversation (for example, when the user navigates or changes filters) without sending a new message. ```javascript this.configuration?.util?.setSessionContext([ { name: "_AgentContext", value: { valueType: "StructuredValue", value: { currentPage: "https://example.com/search-results", search: { result: "MacBook Pro 16-inch", filters: ["Brand: Apple", "Price: $2000-$3000", "Memory: 16GB"], facets: ["Laptops", "Computers", "Electronics"], }, }, }, }, ]) .then(() => { console.log("Successfully set context."); }) .catch((error) => { console.log("Error setting context: " + error); }); ``` ## Dispatch an Event to the Host Page Use `dispatchEventToHostPage` to emit a custom browser event from your Custom Lightning Type (CLT) to the host website page. This pattern is useful when the CLT needs the host page to perform an action outside the chat window. For example, a product details carousel CLT includes an **Add to Cart** button. When the user clicks the button, the CLT dispatches an `onAddToCartClick` event with product details, and the host site listens for that event and adds the item to cart. This CLT JavaScript code dispatches the event to the host page. ```javascript handleAddToCart() { this.configuration?.util?.dispatchEventToHostPage("onAddToCartClick", { productId: "745-324" }) .then(() => { console.log("event dispatched successfully"); }) .catch((error) => { console.error("error dispatching event", error); }); } ``` This JavaScript code on the host page listens for the event. ```javascript window.addEventListener("onAddToCartClick", (event) => { console.log("Received the onAddToCartClick event..."); console.log("Event detail: ", event.detail); // { productId: "745-324" } }); ``` For information on host-page event listeners, see [Event Listeners](https://developer.salesforce.com/docs/service/messaging-web/guide/event-listeners.md). ## Event Handlers If there's an error setting the context or sending a message, you can use the `catch()` event handler to try again or show an error message. ## See Also - [Get Started with Enhanced Chat v2](https://developer.salesforce.com/docs/ai/agentforce/guide/get-started-enhanced-chat.html) - [Event Listeners](https://developer.salesforce.com/docs/service/messaging-web/guide/event-listeners.md) # Custom Metadata Types Used by Employee Concierge The Employee Concierge package includes custom metadata types. - **[wkdw\_\_EmployeeToPersonAccountFldMap\_\_mdt](https://developer.salesforce.com/docs/service/workdotcom-dev/guide/wkdw-sforce-api-objects-employeetopersonaccountfldmap__mdt.md)** Defines the field mapping when creating person account records from employee records in Employee Concierge. This custom metadata type is available in orgs that have Employee Concierge installed in API version 51.0 and later. - **[wkdw\_\_TicketCategoryDefinition\_\_mdt](https://developer.salesforce.com/docs/service/workdotcom-dev/guide/wkdw-sforce-api-objects-ticketcategorydefinition__mdt.md)** Defines the type of ticket category in Employee Concierge. This custom metadata type is available in orgs that have Employee Concierge installed in API version 51.0 and later. # Custom Metadata Types Used by Work.com The Work.com data model includes these custom metadata types. The Workplace Command Center package installs the following custom metadata types for Work.com. - **[wkcc\_\_CmdCtrLogSettings\_\_mdt](https://developer.salesforce.com/docs/service/workdotcom-dev/guide/wdc-cc-sforce-api-objects-cmdctrlogsettings__mdt.md)** Custom metadata type that contains a record named Default for configuring logging in Workplace Command Center and Wellness Check. You can enable or disable logging and configure whether, and for how long, Salesforce keeps old log messages. The wkcc\_\_CmdCtrLog\_\_c custom object stores the log messages. This custom metadata type is available in orgs that have Workplace Command Center installed. # Custom Objects and Fields Used by Work.com The Work.com data model includes several custom objects and fields. The Work.com package installs custom objects used for Workplace Command Center. Also, installing Work.com also adds custom fields to Location and Task. - **[Employee](https://developer.salesforce.com/docs/service/workdotcom-dev/guide/wdc-cc-sforce-api-objects-employee.md)** Work.com uses the Employee standard object to track information about users who are students, volunteers, and other roles in addition to employees. Some managed packages also install custom fields for the Employee standard object. - **[Location](https://developer.salesforce.com/docs/service/workdotcom-dev/guide/wdc-cc-sforce-api-objects-location.md)** Location is used by Work.com to represent a physical location, with a visitor address, with extra custom fields added by Work.com. If location search filtering for all levels is enabled in the org, a location can also be an abstraction. - **[Address](https://developer.salesforce.com/docs/service/workdotcom-dev/guide/wdc-cc-sforce-api-objects-address.md)** Work.com uses the Address standard object to store data about a workplace location address. The Workplace Command Center managed package installs custom fields for the Address standard object. - **[Task](https://developer.salesforce.com/docs/service/workdotcom-dev/guide/wdc-cc-sforce-api-objects-task.md)** Work.com uses the Task standard object and custom fields to list tasks in the Operations Feed for Command Center. Employee Service uses the Task standard object and custom fields to list tasks in a transition plan for HR Service Center. The managed packages for each product install the indicated fields for the Task standard object. - **[wkcc\_\_CmdCtrLog\_\_c](https://developer.salesforce.com/docs/service/workdotcom-dev/guide/wdc-cc-sforce-api-objects-cmdctrlog__c.md)** Stores log messages (errors and exceptions) from Workplace Command Center and Wellness Check. Each log message contains information about the error, such as the originating Apex class, affected objects, logging level, user who executed the operation, and more. This object is available in orgs that have Work.com installed. - **[wkdw\_\_ArticleToFlowLink\_\_c](https://developer.salesforce.com/docs/service/workdotcom-dev/guide/wdc-cc-sforce-api-objects-wkdw__articletoflowlink__c.md)** Create new custom object in order to let customer configure which flows will be invocable from Knowledge Article page in community. This object is available in API version 53.0 and later. - **[wkcc\_\_CmdCtrLogEvent\_\_e](https://developer.salesforce.com/docs/service/workdotcom-dev/guide/wdc-cc-sforce-api-objects-cmdctrlogevent__e.md)** Contains log messages (errors and exceptions) from Workplace Command Center and Wellness Check. On insert into this platform event, an Apex trigger (LogEventTrigger) adds a corresponding record into the wkcc\_\_CmdCtrLog\_\_c custom object with the same fields. This platform event is available in orgs that have Work.com installed. - **[wkcc\_\_CommandCenterMapping\_\_c](https://developer.salesforce.com/docs/service/workdotcom-dev/guide/wdc-cc-sforce-api-objects-commandcentermapping__c.md)** Stores the mappings for all tabs in the Command Center Settings app, which you access from App Launcher. This object is available in orgs that have Workplace Command Center installed. - **[wkdw\_\_HealthVerification\_\_c](https://developer.salesforce.com/docs/service/workdotcom-dev/guide/wdc-hr-sforce-api-objects-wkdw__healthverification__c.md)** Represents a request for verification of a user’s COVID-19 status. - **[wkcc\_\_LocationWellnessAggregation\_\_c](https://developer.salesforce.com/docs/service/workdotcom-dev/guide/wdc-cc-sforce-api-objects-wkcc__locationwellnessaggregation__c.md)** Aggregates wellness counts by location and status of employees directly linked to a location. This object is available in orgs that have Workplace Command Center version 4.2 and later installed. - **[wkcc\_\_LocationWellnessFact\_\_c](https://developer.salesforce.com/docs/service/workdotcom-dev/guide/wdc-cc-sforce-api-objects-wkcc__locationwellnessfact__c.md)** Aggregates wellness counts by location and status. This object rolls up the location hierarchy, aggregating status counts for all employees directly linked to a location or linked to any record in that location’s descendent hierarchy. This object is available in orgs that have Work.com installed. - **[wkcc\_\_LocationWellnessStaging\_\_c](https://developer.salesforce.com/docs/service/workdotcom-dev/guide/wdc-cc-sforce-api-objects-wkcc__locationwellnessstaging__c.md)** Deprecated. This object is a staging table for recalculating location wellness facts. Records are removed once the locations have been recalculated. This object is available in orgs that have version 4 or earlier of Work.com installed. This object was deprecated in version 4.2 of Workplace Command Center. In version 4.2 and later, the data in this object is no longer updated. - **[wkcc\_\_Settings\_\_c](https://developer.salesforce.com/docs/service/workdotcom-dev/guide/wdc-cc-sforce-api-objects-wkcc__settings__c.md)** Settings for the Workplace Command Center application. This object is available in orgs that have Work.com installed. - **[wkcc\_\_SurveyHistory\_\_c](https://developer.salesforce.com/docs/service/workdotcom-dev/guide/wdc-cc-sforce-api-objects-wkcc__surveyhistory__c.md)** Represents historical data from a specific sending of a survey. The data includes the name of the survey, when it started to be sent out, the schedule in force (if any), and the status of the sending operation. The history provides an audit trail that can be used for monitoring and troubleshooting survey issues. This object is available in API version 49.0 and later. - **[wkcc\_\_SurveySchedule\_\_c](https://developer.salesforce.com/docs/service/workdotcom-dev/guide/wdc-cc-sforce-api-objects-wkcc__surveyschedule__c.md)** Represents the details of a survey schedule in the org, including the selected survey, email template, and filter criteria. This object is available in API version 49.0 and later - **[wkcc\_\_SurveyScheduleRecipient\_\_c](https://developer.salesforce.com/docs/service/workdotcom-dev/guide/wdc-cc-sforce-api-objects-wkcc__surveyschedulerecipient__c.md)** Represents details about recipients of surveys sent out by a particular survey schedule. The recipients can be employees or locations. If you change the recipients for a scheduled survey, the updated recipients list is referenced the next time the scheduled survey goes out. This object is available in API version 49.0 and later. - **[wkcc\_\_TriggerSettings\_\_c](https://developer.salesforce.com/docs/service/workdotcom-dev/guide/wdc-cc-sforce-api-objects-wkcc__triggersettings__c.md)** Represents the current state of data triggers for Employee, Location, and other Work.com related objects. This object is available in orgs that have Work.com installed. - **[wkdw\_\_EmployeeWorkExperience\_\_c](https://developer.salesforce.com/docs/service/workdotcom-dev/guide/wdc-ew-sforce-api-objects-wkdw__employeeworkexperience__c.md)** Stores work experience of an employee in the Employee Workspace community. This object is available in orgs that have the Employee Workspace managed package installed. - **[wkdw\_\_OnboardingTask\_\_c](https://developer.salesforce.com/docs/service/workdotcom-dev/guide/wdc-hr-sforce-api-objects-wkdw__onboardingtask__c.md)** Custom object that represents a reusable task definition that defines the task assigned to an employee in a transition plan template. - **[wkdw\_\_OnboardingTemplate\_\_c](https://developer.salesforce.com/docs/service/workdotcom-dev/guide/wdc-hr-sforce-api-objects-wkdw__onboardingtemplate__c.md)** Represents a custom object that represents a reusable task definition that defines the task assigned to an employee in a transition plan template. - **[wkdw\_\_OnboardingTemplateTask\_\_c](https://developer.salesforce.com/docs/service/workdotcom-dev/guide/wdc-hr-sforce-api-objects-wkdw__onboardingtemplatetask__c.md)** Represents a custom object that is a junction object which serves to join a transition task to a transition plan. - **[wkdw\_\_TransitionPlan\_\_c](https://developer.salesforce.com/docs/service/workdotcom-dev/guide/wdc-hr-sforce-api-objects-wkdw__transitionplan__c.md)** Custom object for a transition plan that is associated with an employee user. This object is available in API version 56.0 and later. - **[wkcc\_\_WorkQueueItem\_\_c](https://developer.salesforce.com/docs/service/workdotcom-dev/guide/wdc-cc-sforce-api-objects-wkc__workqueueitem__c.md)** Coordinates Workplace Command Center background processing jobs, such as sending surveys or aggregating a location’s status. This object is available in orgs that have Workplace Command Center installed. # Custom Objects Used by Workplace Strategy Planner The Workplace Strategy Planner managed package installs several custom objects that are required in addition to the standard objects Employee, Location, Crisis, and Address. - **[wkplan\_\_CrisisMetric\_\_c](https://developer.salesforce.com/docs/service/workdotcom-dev/guide/wkplan-sforce-api-objects-wkplan__crisismetric__c.md)** Stores quantitative and qualitative data that can be used to measure an aspect of a crisis. Crisis metrics are used to better understand the severity of a crisis, such as the COVID-19 pandemic. Use them to help decide how to manage individual workplace locations during the crisis. This object is installed as a part of the Workplace Strategy Planner managed package. This object is available in API version 50.0 and later. - **[wkplan\_\_CrisisMetricThreshold\_\_c](https://developer.salesforce.com/docs/service/workdotcom-dev/guide/wkplan-sforce-api-objects-wkplan__crisismetricthreshold__c.md)** Defines your organization's threshold values for every crisis metric. By default, Workplace Strategy Planner allows location opening and closing thresholds. The metric data value for each location is evaluated by the threshold values to determine its risk level and whether the location can be considered for either opening or closing. This object is installed as a part of the Workplace Strategy Planner managed package. This object is available in API version 50.0 and later. - **[wkplan\_\_LocationAssessment\_\_c](https://developer.salesforce.com/docs/service/workdotcom-dev/guide/wkplan-sforce-api-objects-wkplan__locationassessment__c.md)** Stores data for metrics used to evaluate location risk during a crisis, such as the COVID-19 pandemic, including hospital capacity and public guidelines for operating safely. This object is installed as a part of the Workplace Strategy Planner managed package. This object is available in API version 50.0 and later. # Customize and Localize Strings with the Service Chat SDK You can change the text throughout the user interface. To customize text, create string resource XML files (named `strings.xml`) in your project's `values-[locale]` resource folder for the language(s) you want to update. **important:** 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](https://help.salesforce.com/s/articleView?id=service.miaw_intro_landing.htm&type=5) before that date. Messaging offers many of the [chat features](https://help.salesforce.com/s/articleView?id=service.miaw_chat_vs_messaging.htm&type=5) that you love plus asynchronous conversations that can be picked back up at any time. Learn about chat retirement in [Help](https://help.salesforce.com/s/articleView?id=001790618&type=1). To see the complete list of string resource values, refer to the string resources document for the feature you want to customize. - [Chat String Resources](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.1.1/api/reference/doc-files/resource_overrides.html#Strings) - [Common String Resources](https://forcedotcom.github.io/ServiceSDK-Android/releases/common/8.0.2/api/reference/doc-files/resource_overrides.html#Strings) SDK text is translated into more than 25 different languages. In order for your string customizations to take effect in all languages, provide a translation for each language. To add support for a language, create a resources subdirectory that includes a hyphen and the ISO language code at the end of the directory name. For example, `values-es/` is the directory containing string resources for Spanish. Android loads the appropriate resources according to the locale settings of the device at run time. The system falls back on the strings in the default `values/` directory if the appropriate locale directory isn't found. The following languages are currently supported: | Language Code | Language | | ------------- | -------------------- | | values-ar | Arabic | | values-cs | Czech | | values-da | Danish | | values-de | German | | values-el | Greek | | values-en | English | | values-es | Spanish | | values-fi | Finnish | | values-fr | French | | values-hu | Hungarian | | values-in | Indonesian | | values-it | Italian | | values-iw | Hebrew | | values-ja | Japanese | | values-ko | Korean | | values-nl | Dutch | | values-no | Norwegian | | values-pl | Polish | | values-pt-rBR | Brazilian Portuguese | | values-ro | Romanian | | values-ru | Russian | | values-sv | Swedish | | values-th | Thai | | values-tr | Turkish | | values-uk | Ukranian | | values-vi | Vietnamese | | values-zh | Chinese | | values-zh-rTW | Traditional Chinese | Check out [Supporting Different Languages](http://developer.android.com/training/basics/supporting-devices/languages.html) in the Android Developer documentation for more info about localization. ## Example To learn how you can change string values, let's go through an example. The image below shows the default connection prompt dialog text in English: ![Original string](https://developer.salesforce.com/docs/media/service-sdk/android_strings_dialog_start_session.png '{"class": "image-xs"}') You can change the title and body of this dialog by changing the `sos_title` and the `sos_connect_prompt` strings in the `strings.xml` file in the `values` folders for your locale (`values-en/` for English): ```java Live Help We can connect you with an agent who can troubleshoot your problems ``` Now, whenever you start a session you see the updated dialog text: ![Modified string](https://developer.salesforce.com/docs/media/service-sdk/android_strings_dialog_string_override.png '{"class": "image-xs"}') # Customize and Localize Strings with the Service Chat SDK You can change the text used throughout the user interface. To customize text, create string resource values in a `Localizable.strings` file in the Localization bundle for the languages you want to update. Create string tokens that match the tokens you intend to override. **important:** 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](https://help.salesforce.com/s/articleView?id=service.miaw_intro_landing.htm&type=5) before that date. Messaging offers many of the [chat features](https://help.salesforce.com/s/articleView?id=service.miaw_chat_vs_messaging.htm&type=5) that you love plus asynchronous conversations that can be picked back up at any time. Learn about chat retirement in [Help](https://help.salesforce.com/s/articleView?id=001790618&type=1). Service Chat SDK text is translated into more than 25 different languages. In order for your string customizations to take effect in a given language, provide a translation for that language. For any language you do not override manually in your app, the SDK uses its default values for that language. Refer to [Internationalization at developer.apple.com](https://developer.apple.com/internationalization/) for more info about localization. The following list of string tokens are available for customization: - [ServiceChat (Chat) String Resources](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/servicechatstringconstants.html) - [ServiceCore (Common) String Resources](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/servicecorestringconstants.html) The following languages are currently supported: | Language Code | Language | | ------------- | --------------------- | | ar | Arabic | | cs | Czech | | da | Danish | | de | German | | el | Greek | | en | English | | es | Spanish | | fi | Finnish | | fr | French | | hu | Hungarian | | id | Indonesian | | it | Italian | | iw | Hebrew | | ja | Japanese | | ko | Korean | | nb | Norwegian Bokmål | | nl | Dutch | | pl | Polish | | pt | Portuguese | | ro | Romanian | | ru | Russian | | sv | Swedish | | th | Thai | | tr | Turkish | | uk | Ukranian | | vi | Vietnamese | | zh_TW | Chinese (Taiwan) | | zh-Hans | Chinese (Simplified) | | zh-Hant | Chinese (Traditional) | | zh | Chinese | # Customize Chat Images with the Service Chat SDK Specify custom images used throughout the chat UI. **important:** 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](https://help.salesforce.com/s/articleView?id=service.miaw_intro_landing.htm&type=5) before that date. Messaging offers many of the [chat features](https://help.salesforce.com/s/articleView?id=service.miaw_chat_vs_messaging.htm&type=5) that you love plus asynchronous conversations that can be picked back up at any time. Learn about chat retirement in [Help](https://help.salesforce.com/s/articleView?id=001790618&type=1). The Service Chat SDK allows you to customize chat images in the UI. If you want to change an image, override the `Drawable` for the image you want to customize using the exact same file name. The following table contains a list of the most common overridable images. | Image File Name | Description | | ------------------------------------ | --------------------------------------------------------------------------------- | | chat_ic_footer_menu.xml | Hamburger menu on the bottom of the window, next to the chat input. (48dp x 48dp) | | chat_ic_minimized_connecting.xml | Connecting icon when the view is minimized. (32dp x 29dp) | | chat_minimized_message_indicator.xml | Chat bubble unread indicator when the view is minimized. (27dp x 24dp) | | common_ic_close.xml | Close button at the top left of the window. (24dp x 24dp) | | salesforce_agent_avatar.xml | Agent avatar used beside the agent’s chat bubble. (36dp x 36dp) | | salesforce_ic_message_send.xml | Send message button next to chat input. (24dp x 24dp) | | salesforce_ic_minimize.xml | Minimize button at the top right of the window. (18dp x 18dp) | **note:** To customize the chat bot avatar and the bot banner, see [Use Einstein Bots with Chat](https://developer.salesforce.com/docs/service/service-sdk-android/guide/android-chat-einstein-bots.md). For instance, if you’d like to override the agent avatar during a chat session, add a `Drawable` to your `res/drawables` folder with the name `salesforce_agent_avator.xml`. This value should contain image info about the agent avatar. The following list contains _all_ the customizable `Drawable`s used throughout the chat UI: chat_button.xml, chat_button_pressed.xml, chat_footer_menu_item.xml, chat_ic_bubble.xml, chat_ic_close.xml, chat_ic_collapse.xml, chat_ic_footer_menu.xml, chat_ic_last_photo.xml, chat_ic_minimized_connecting.xml, chat_ic_photo_gallery.xml, chat_menu_bottom_button.xml, chat_menu_button.xml, chat_menu_header.xml, chat_menu_solo_button.xml, chat_menu_speech_arrow.xml, chat_menu_top_button.xml, chat_minimized_message_indicator.xml, agent_initial_avatar.xml, link_preview_arrow.xml, progress_indeterminate_horizontal_material.xml, salesforce_agent_avatar.xml, salesforce_button.xml, salesforce_button_solid.xml, salesforce_horizontal_rule.xml, salesforce_ic_camera.xml, salesforce_ic_message_send.xml, salesforce_ic_minimize.xml, salesforce_loading_ball.xml, salesforce_message_bubble_overlay.xml, salesforce_message_bubble_received.xml, salesforce_message_bubble_received_speech_arrow.xml, salesforce_message_bubble_sent.xml, salesforce_minimized_view.xml, salesforce_minimized_view_toolbar.xml, vector_drawable_progress_indeterminate_horizontal.xml. # Customize Colors for Android The UI SDK automatically brands the app with a default color scheme. You can customize this color scheme in your app by creating a color resource file in your app and using the token names specified in this section. This article applies to the following implementations: | UI SDK | Core SDK | | :----: | :------: | | ✅ | | **tip:** Test any color customizations in light and dark mode. You can customize colors using generic branding tokens such as “primary color” or “secondary color.” Or you can customize each individual element in the UI using detailed branding tokens such as “sent bubble background color.” The generic tokens are better if you want to update the colors across the entire app with just a few changes. The detailed tokens are better if you want full control over the colors for each UI element. When you modify the detailed tokens, it overrides the generic branding token colors for the specific elements that you modify. # Customize Colors for iOS The UI SDK automatically brands the app with a default color scheme. You can customize this color scheme in your app by creating color sets in your Assets catalog using the SDK's token names. This article applies to the following implementations: | UI SDK | Core SDK | | :----: | :------: | | ✅ | | **tip:** Test any color customizations in light and dark mode. You can customize colors using generic branding tokens such as “primary color” or “secondary color.” Or you can customize each individual element in the UI using detailed branding tokens such as “sent bubble background color.” The generic tokens are better if you want to update the colors across the entire app with just a few changes. The detailed tokens are better if you want full control over the colors for each UI element. When you modify the detailed tokens, it overrides the generic branding token colors for the specific elements that you modify. # Customize Colors with the Service Chat SDK You can customize the look and feel of the interface by specifying the colors used throughout the UI. **important:** 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](https://help.salesforce.com/s/articleView?id=service.miaw_intro_landing.htm&type=5) before that date. Messaging offers many of the [chat features](https://help.salesforce.com/s/articleView?id=service.miaw_chat_vs_messaging.htm&type=5) that you love plus asynchronous conversations that can be picked back up at any time. Learn about chat retirement in [Help](https://help.salesforce.com/s/articleView?id=001790618&type=1). To customize the colors, create color resource values in your project's `colors.xml` file that correspond to the same resource names specified in this documentation. For example, the following resource file values customize some of the branding tokens: ```xml #50e3c2 #4a90e2 #ffffff #333333 #767676 #e74c3c ``` These screenshots illustrate how the branding tokens affect the UI. Chat UI Branding: ![Branding colors for Chat](https://developer.salesforce.com/docs/media/service-sdk/branding-chat-android.png '{"class": "image-md"}') The following branding tokens are available for customization. | Token Name | Default Value | Description / Sample Uses | | ------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Toolbar
`salesforce_toolbar` | #FAFAFA ![Toolbar](https://developer.salesforce.com/docs/media/service-sdk/branding_color_FAFAFA.png '{"class": "image-icon-lg"}') | The toolbar background color. | | Toolbar Inverted
`salesforce_toolbar_inverted` | #010101 ![Toolbar inverted](https://developer.salesforce.com/docs/media/service-sdk/branding_color_010101.png '{"class": "image-icon-lg"}') | Toolbar text and icon color. | | Brand Primary
`salesforce_brand_primary` | #007F7F ![Brand primary](https://developer.salesforce.com/docs/media/service-sdk/branding_color_007F7F.png '{"class": "image-icon-lg"}') | The banner background color. Chat: Line under the message you’re typing. | | Brand Secondary
`salesforce_brand_secondary` | #2872CC ![Brand secondary](https://developer.salesforce.com/docs/media/service-sdk/branding_color_2872CC.png '{"class": "image-icon-lg"}') | Chat: User text bubbles. | | Brand Contrast
`salesforce_brand_contrast` | #FCFCFC ![Secondary inverted](https://developer.salesforce.com/docs/media/service-sdk/branding_color_FCFCFC.png '{"class": "image-icon-lg"}') | Title text color. | | Contrast Primary
`salesforce_contrast_primary` | #000000 ![Contrast primary](https://developer.salesforce.com/docs/media/service-sdk/branding_color_000000.png '{"class": "image-icon-lg"}') | Primary body text color. | | Contrast Secondary
`salesforce_contrast_secondary` | #6D6D6D ![Contrast secondary](https://developer.salesforce.com/docs/media/service-sdk/branding_color_767676.png '{"class": "image-icon-lg"}') |   | | Contrast Tertiary
`salesforce_contrast_tertiary` | #BABABA ![Contrast tertiary](https://developer.salesforce.com/docs/media/service-sdk/branding_color_BABABA.png '{"class": "image-icon-lg"}') |   | | Contrast Quaternary
`salesforce_contrast_quaternary` | #F1F1F1 ![Contrast quaternary](https://developer.salesforce.com/docs/media/service-sdk/branding_color_F1F1F1.png '{"class": "image-icon-lg"}') | Chat: Background color for the chat feed screen. | | Contrast Inverted
`salesforce_contrast_inverted` | #FFFFFF ![Contrast inverted](https://developer.salesforce.com/docs/media/service-sdk/branding_color_FFFFFF.png '{"class": "image-icon-lg"}') | Page background, navigation bar, table cell background. Chat: Color of the close button on the minimized view. Client message text. Background color at the bottom of the input bar on the chat feed UI. | | Feedback Primary
`salesforce_feedback_primary` | #E74C3C ![Feedback primary](https://developer.salesforce.com/docs/media/service-sdk/branding_color_E74C3C.png '{"class": "image-icon-lg"}') | Text color for error messages. | | Feedback Secondary
`salesforce_feedback_secondary` | #2ECC71 ![Feedback secondary](https://developer.salesforce.com/docs/media/service-sdk/branding_color_2ECC71.png '{"class": "image-icon-lg"}') |   | | Feedback Tertiary
`salesforce_feedback_tertiary` | #F5A623 ![Feedback tertiary](https://developer.salesforce.com/docs/media/service-sdk/branding_color_F5A623.png '{"class": "image-icon-lg"}') |   | | Title Color
`salesforce_title_color` | #FBFBFB ![Primary inverted](https://developer.salesforce.com/docs/media/service-sdk/branding_color_FBFBFB.png '{"class": "image-icon-lg"}') | Text as it appears in titles throughout the UI. Text on areas where a brand color is used for the background. Chat: Agent text bubbles. | | Overlay
`salesforce_overlay` | #000000(40% alpha) |   | # Customize Colors with the Service Chat SDK Customize the colors by defining the branding token colors used throughout the interface. **important:** 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](https://help.salesforce.com/s/articleView?id=service.miaw_intro_landing.htm&type=5) before that date. Messaging offers many of the [chat features](https://help.salesforce.com/s/articleView?id=service.miaw_chat_vs_messaging.htm&type=5) that you love plus asynchronous conversations that can be picked back up at any time. Learn about chat retirement in [Help](https://help.salesforce.com/s/articleView?id=001790618&type=1). To customize colors, create an `SCAppearanceConfiguration` instance, specify values for each token you want to change, and store the instance in the [`appearanceConfiguration`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCServiceCloud.html#/c:objc(cs)SCServiceCloud(py)appearanceConfiguration>) property of the [`ServiceCloud`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCServiceCloud.html) [`sharedInstance`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCServiceCloud.html#/c:objc(cs)SCServiceCloud(cm)sharedInstance>). In Swift: ```java // Create appearance configuration instance let appearance = SCAppearanceConfiguration() // Customize color tokens appearance.setColor(COLOR_VALUE, forName: TOKEN_NAME) // Add other customizations here... // Save configuration instance ServiceCloud.shared().appearanceConfiguration = appearance ``` In Objective-C: ```java // Create appearance configuration instance SCAppearanceConfiguration *appearance = [SCAppearanceConfiguration new]; // Customize color tokens [appearance setColor:COLOR_VALUE forName:TOKEN_NAME]; // Add other customizations here... // Save configuration instance [SCServiceCloud sharedInstance].appearanceConfiguration = appearance; ``` To support dark mode in iOS 13 and later, [specify adaptive colors](https://github.com/forcedotcom/ServiceSDK-iOS/wiki/Handling-Dark-Mode-for-iOS-13-with-the-Service-SDK) for each branding token. The following branding tokens are available for customization. | Token Name / Swift Value / Objective-C Value | Default | Dark Mode Default | Description / Sample Uses | | ------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- | | Navigation Bar Background
`navbarBackground`
`SCSAppearanceColorTokenNavbarBackground` | #FAFAFA ![Navigation bar background](https://developer.salesforce.com/docs/media/service-sdk/branding_color_FAFAFA.png '{"class": "image-icon-lg"}') | #1A2129 ![Navigation bar background dark](https://developer.salesforce.com/docs/media/service-sdk/branding_color_1A2129.png '{"class": "image-icon-lg"}') | Background color for the navigation bar. | | Navigation Bar Inverted
`navbarInverted`
`SCSAppearanceColorTokenNavbarInverted` | #010101 ![Navigation bar inverted](https://developer.salesforce.com/docs/media/service-sdk/branding_color_010101.png '{"class": "image-icon-lg"}') | #C6CBCF ![Navigation bar inverted dark](https://developer.salesforce.com/docs/media/service-sdk/branding_color_C6CBCF.png '{"class": "image-icon-lg"}') | Navigation bar text and icon color. | | Brand Primary
`brandPrimary`
`SCSAppearanceColorTokenBrandPrimary` | #007F7F ![Brand primary](https://developer.salesforce.com/docs/media/service-sdk/branding_color_007F7F.png '{"class": "image-icon-lg"}') | #00B4B4 ![Brand primary dark](https://developer.salesforce.com/docs/media/service-sdk/branding_color_00B4B4.png '{"class": "image-icon-lg"}') |   | | Brand Secondary
`brandSecondary`
`SCSAppearanceColorTokenBrandSecondary` | #2872CC ![Brand secondary](https://developer.salesforce.com/docs/media/service-sdk/branding_color_2872CC.png '{"class": "image-icon-lg"}') | #0070D2 ![Brand secondary dark](https://developer.salesforce.com/docs/media/service-sdk/branding_color_0070D2.png '{"class": "image-icon-lg"}') | Used throughout the UI for button colors. Chat: Agent text bubbles. | | Primary Brand Inverted
`brandPrimaryInverted`
`SCSAppearanceColorTokenBrandPrimaryInverted` | #FBFBFB ![Primary inverted](https://developer.salesforce.com/docs/media/service-sdk/branding_color_FBFBFB.png '{"class": "image-icon-lg"}') | #FBFBFB ![Primary inverted dark](https://developer.salesforce.com/docs/media/service-sdk/branding_color_FBFBFB.png '{"class": "image-icon-lg"}') |   | | Secondary Brand Inverted
`brandSecondaryInverted`
`SCSAppearanceColorTokenBrandSecondaryInverted` | #FCFCFC ![Secondary inverted](https://developer.salesforce.com/docs/media/service-sdk/branding_color_FCFCFC.png '{"class": "image-icon-lg"}') | #F7F7F7 ![Secondary inverted dark](https://developer.salesforce.com/docs/media/service-sdk/branding_color_F7F7F7.png '{"class": "image-icon-lg"}') | Text on areas where a brand color is used for the background. | | Contrast Primary
`contrastPrimary`
`SCSAppearanceColorTokenContrastPrimary` | #000000 ![Contrast primary](https://developer.salesforce.com/docs/media/service-sdk/branding_color_000000.png '{"class": "image-icon-lg"}') | #E2E4E6 ![Contrast primary dark](https://developer.salesforce.com/docs/media/service-sdk/branding_color_E2E4E6.png '{"class": "image-icon-lg"}') | Primary body text color. | | Contrast Secondary
`contrastSecondary`
`SCSAppearanceColorTokenContrastSecondary` | #6D6D6D ![Contrast secondary](https://developer.salesforce.com/docs/media/service-sdk/branding_color_767676.png '{"class": "image-icon-lg"}') | #898D92 ![Contrast secondary dark](https://developer.salesforce.com/docs/media/service-sdk/branding_color_898D92.png '{"class": "image-icon-lg"}') |   | | Contrast Tertiary
`contrastTertiary`
`SCSAppearanceColorTokenContrastTertiary` | #BABABA ![Contrast tertiary](https://developer.salesforce.com/docs/media/service-sdk/branding_color_BABABA.png '{"class": "image-icon-lg"}') | #A0A6AD ![Contrast tertiary dark](https://developer.salesforce.com/docs/media/service-sdk/branding_color_A0A6AD.png '{"class": "image-icon-lg"}') |   | | Contrast Quaternary
`contrastQuaternary`
`SCSAppearanceColorTokenContrastQuaternary` | #F1F1F1 ![Contrast quaternary](https://developer.salesforce.com/docs/media/service-sdk/branding_color_F1F1F1.png '{"class": "image-icon-lg"}') | #09121B ![Contrast quaternary dark](https://developer.salesforce.com/docs/media/service-sdk/branding_color_09121B.png '{"class": "image-icon-lg"}') | Chat: Background color. | | Contrast Inverted
`contrastInverted`
`SCSAppearanceColorTokenContrastInverted` | #FFFFFF ![Contrast inverted](https://developer.salesforce.com/docs/media/service-sdk/branding_color_FFFFFF.png '{"class": "image-icon-lg"}') | #323232 ![Contrast inverted dark](https://developer.salesforce.com/docs/media/service-sdk/branding_color_323232.png '{"class": "image-icon-lg"}') | Page background, navigation bar, table cell background. | | Feedback Primary
`feedbackPrimary`
`SCSAppearanceColorTokenFeedbackPrimary` | #E74C3C ![Feedback primary](https://developer.salesforce.com/docs/media/service-sdk/branding_color_E74C3C.png '{"class": "image-icon-lg"}') | #E0A7A9 ![Feedback primary dark](https://developer.salesforce.com/docs/media/service-sdk/branding_color_E0A7A9.png '{"class": "image-icon-lg"}') | Text color for error messages. | | Feedback Secondary
`feedbackSecondary`
`SCSAppearanceColorTokenFeedbackSecondary` | #2ECC71 ![Feedback secondary](https://developer.salesforce.com/docs/media/service-sdk/branding_color_2ECC71.png '{"class": "image-icon-lg"}') | #9ACDB7 ![Feedback secondary dark](https://developer.salesforce.com/docs/media/service-sdk/branding_color_9ACDB7.png '{"class": "image-icon-lg"}') |   | | Feedback Tertiary
`feedbackTertiary`
`SCSAppearanceColorTokenFeedbackTertiary` | #F5A623 ![Feedback tertiary](https://developer.salesforce.com/docs/media/service-sdk/branding_color_F5A623.png '{"class": "image-icon-lg"}') | #FADBAE ![Feedback tertiary dark](https://developer.salesforce.com/docs/media/service-sdk/branding_color_FADBAE.png '{"class": "image-icon-lg"}') |   | | Overlay
`overlay`
`SCSAppearanceColorTokenOverlay` | Contrast Primary (at 40% alpha) | #323232 ![Contrast inverted dark](https://developer.salesforce.com/docs/media/service-sdk/branding_color_323232.png '{"class": "image-icon-lg"}') |   | These screenshots illustrate how the branding tokens affect the UI. Chat UI Branding: ![Chat color branding](https://developer.salesforce.com/docs/media/service-sdk/branding-chat-ios.png '{"class": "image-md"}') ## Example The following code sample changes three of the branding tokens. In Swift: ```java // Create appearance configuration instance let appearance = SCAppearanceConfiguration() // Customize color tokens appearance.setColor( UIColor(red: 80/255, green: 227/255, blue: 194/255, alpha: 1.0), forName: .brandPrimary) appearance.setColor( UIColor(red: 74/255, green: 144/255, blue: 226/255, alpha: 1.0), forName: .brandSecondary) appearance.setColor( UIColor(red: 252/255, green: 252/255, blue: 252/255, alpha: 1.0), forName: .brandSecondaryInverted) // Save configuration instance ServiceCloud.shared().appearanceConfiguration = appearance ``` In Objective-C: ```java // Create appearance configuration instance SCAppearanceConfiguration *appearance = [SCAppearanceConfiguration new]; // Customize color tokens [appearance setColor:[UIColor colorWithRed: 80/255 green: 227/255 blue: 194/255 alpha: 1.0] forName:SCSAppearanceColorTokenBrandPrimary]; [appearance setColor:[UIColor colorWithRed: 74/255 green: 144/255 blue: 226/255 alpha: 1.0] forName:SCSAppearanceColorTokenBrandSecondary]; [appearance setColor:[UIColor colorWithRed: 252/255 green: 252/255 blue: 252/255 alpha: 1.0] forName:SCSAppearanceColorTokenBrandSecondaryInverted]; // Save configuration instance [SCServiceCloud sharedInstance].appearanceConfiguration = appearance; ``` For an example of how to specify adaptive colors that work with the dark mode feature that was introduced in iOS 13, see [Handling Dark Mode for iOS 13 with the Service SDK](https://github.com/forcedotcom/ServiceSDK-iOS/wiki/Handling-Dark-Mode-for-iOS-13-with-the-Service-SDK). # Customize Fonts with the Service Chat SDK There are three customizable font settings used throughout the UI: `SCFontWeightLight`, `SCFontWeightRegular`, `SCFontWeightBold`. **important:** 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](https://help.salesforce.com/s/articleView?id=service.miaw_intro_landing.htm&type=5) before that date. Messaging offers many of the [chat features](https://help.salesforce.com/s/articleView?id=service.miaw_chat_vs_messaging.htm&type=5) that you love plus asynchronous conversations that can be picked back up at any time. Learn about chat retirement in [Help](https://help.salesforce.com/s/articleView?id=001790618&type=1). You can customize three font settings used throughout the Service Chat SDK interface: | Font Setting | Default Value | Samples Uses in the SDK | | --------------------- | ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | | `SCFontWeightLight` | Helvetica Neue - Light | Knowledge article cell summary, Case Management field text, Case Management submit success view, content of error messages | | `SCFontWeightRegular` | Helvetica Neue | Navigation bar, Chat text, Knowledge data category cell in detail view, Knowledge "show more" article footer, Knowledge "show more" button cell | | `SCFontWeightBold` | Helvetica Neue - Semibold | Knowledge category headers, Knowledge article cell title, Case Management field labels, Case Management submit button, title of error messages | To configure your app to use different fonts: 1. Add new fonts to your Xcode project. Any new fonts must be added as a resource to your Xcode project. When adding, be sure to select **Copy items if needed**. 2. Add new fonts to your project target. For each new font, add it to your project target under **Target Membership**. ![Target Membership for font](https://developer.salesforce.com/docs/media/service-sdk/ios-font-customization-1.png '{"class": "image-xs"}') 3. Add the font to your app's `Info.plist`. You'll need to add all new fonts into a string array. Each string element of the array must be the name of each font resource file. If you're viewing your `Info.plist` as a **Property List**, add an Array named **Fonts provided by application**. If you're viewing your `Info.plist` as **Source Code**, add an array named `UIAppFonts`. For example: ```xml UIAppFonts MyCustomFont1.ttf MyCustomFont2.ttf MyCustomFont3.ttf ``` 4. Customize any of the _Service Chat SDK_ font values using [`SCAppearanceConfiguration`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCAppearanceConfiguration.html). To customize the fonts, create an [`SCAppearanceConfiguration`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCAppearanceConfiguration.html) instance, set the font descriptor for each font setting you want to change, and store the `SCAppearanceConfiguration` instance in the [`appearanceConfiguration`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCServiceCloud.html#/c:objc(cs)SCServiceCloud(py)appearanceConfiguration>) property of the [`ServiceCloud`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCServiceCloud.html) shared instance. Swift Example: ```java // Create appearance configuration instance let config = SCAppearanceConfiguration() // Customize font let descriptor = UIFontDescriptor(fontAttributes: [UIFontDescriptor.AttributeName.family : "Proxima Nova"]) config.setFontDescriptor(descriptor, fontFileName: "ProximaNova-Light.otf", forWeight: SCFontWeightLight) // Add other customizations here... // Save configuration instance ServiceCloud.shared().appearanceConfiguration = config ``` Objective-C Example: ```java // Create appearance configuration instance SCAppearanceConfiguration *config = [SCAppearanceConfiguration new]; // Customize font UIFontDescriptor *descriptor = [UIFontDescriptor fontDescriptorWithFontAttributes:@{ UIFontDescriptorFamilyAttribute: @"Proxima Nova", UIFontDescriptorFaceAttribute: @"Light" }]; [config setFontDescriptor:descriptor fontFileName:@"ProximaNova-Light.otf" forWeight:SCFontWeightLight]; // Add other customizations here... // Save configuration instance [SCServiceCloud sharedInstance].appearanceConfiguration = config; ``` Be sure to use the exact font descriptor attribute name and font file name for your custom font. # Customize Icons for Android You can customize the icons and images used throughout the SDK. To customize an image, add a drawable asset to your project using the associated keyword. This article applies to the following implementations: | UI SDK | Core SDK | | :----: | :------: | | ✅ | | **tip:** Test any icon changes in light and dark mode. | Token | Image | Description | | --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------- | | smi_action_attach_file | ![smi_action_attach_file](https://developer.salesforce.com/docs/media/messaging-in-app/icons/smi_action_attach_file.png '{"class": "image-icon-md"}') | Icon for attaching a file. | | smi_action_attach_photo | ![smi_action_attach_photo](https://developer.salesforce.com/docs/media/messaging-in-app/icons/smi_action_attach_photo.png '{"class": "image-icon-md"}') | Icon for attaching a photo. | | smi_action_cancel | ![smi_action_cancel](https://developer.salesforce.com/docs/media/messaging-in-app/icons/smi_action_cancel.png '{"class": "image-icon-md"}') | Icon representing the cancel action. | | smi_action_delete | ![smi_action_delete](https://developer.salesforce.com/docs/media/messaging-in-app/icons/smi_action_delete.png '{"class": "image-icon-md"}') | Icon representing the delete action. | | smi_action_download | ![smi_action_download](https://developer.salesforce.com/docs/media/messaging-in-app/icons/smi_action_download.png '{"class": "image-icon-md"}') | Icon representing the download action. | | smi_action_jump_to | ![smi_action_jump_to](https://developer.salesforce.com/docs/media/messaging-in-app/icons/smi_action_jump_to.png '{"class": "image-icon-md"}') | Icon representing the jump-to action. | | smi_action_scroll_to_bottom | ![smi_action_scroll_to_bottom](https://developer.salesforce.com/docs/media/messaging-in-app/icons/smi_action_scroll_to_bottom.png '{"class": "image-icon-md"}') | Icon representing the scroll down action on the overlay badge in the feed. | | smi_action_search | ![smi_action_search](https://developer.salesforce.com/docs/media/messaging-in-app/icons/smi_action_search.png '{"class": "image-icon-md"}') | Icon representing the message search action. | | smi_action_send | ![smi_action_send](https://developer.salesforce.com/docs/media/messaging-in-app/icons/smi_action_send.png '{"class": "image-icon-md"}') | Icon representing the send button on the text input menu. | | smi_action_share | ![smi_action_share](https://developer.salesforce.com/docs/media/messaging-in-app/icons/smi_action_share.png '{"class": "image-icon-md"}') | Icon representing the share action. | | smi_action_take_photo | ![smi_action_take_photo](https://developer.salesforce.com/docs/media/messaging-in-app/icons/smi_action_take_photo.png '{"class": "image-icon-md"}') | Icon for taking a photo. | | smi_add | ![smi_add](https://developer.salesforce.com/docs/media/messaging-in-app/icons/smi_add.png '{"class": "image-icon-md"}') | Icon representing the menu button on the text input. | | smi_avatar_bot | ![smi_avatar_bot](https://developer.salesforce.com/docs/media/messaging-in-app/icons/smi_avatar_bot.png '{"class": "image-icon-md"}') | Default bot avatar shown in the chat feed. | | smi_avatar_user | ![smi_avatar_user](https://developer.salesforce.com/docs/media/messaging-in-app/icons/smi_avatar_user.png '{"class": "image-icon-md"}') | User avatar shown in search results. | | smi_chevron_right | ![smi_chevron_right](https://developer.salesforce.com/docs/media/messaging-in-app/icons/smi_chevron_right.png '{"class": "image-icon-md"}') | Icon representing a link to the preview that can be navigated. | | smi_icon_check | ![smi_icon_check](https://developer.salesforce.com/docs/media/messaging-in-app/icons/smi_icon_check.png '{"class": "image-icon-md"}') | Icon representing a confirmed action. | | smi_icon_clock | ![smi_icon_clock](https://developer.salesforce.com/docs/media/messaging-in-app/icons/smi_icon_clock.png '{"class": "image-icon-md"}') | Icon representing the image used for business hours banner. | | smi_icon_error | ![smi_icon_error](https://developer.salesforce.com/docs/media/messaging-in-app/icons/smi_icon_error.png '{"class": "image-icon-md"}') | Icon representing an error. | | smi_icon_failed | ![smi_icon_failed](https://developer.salesforce.com/docs/media/messaging-in-app/icons/smi_icon_failed.png '{"class": "image-icon-md"}') | Icon representing an error that occured while sending a message. | | smi_icon_file_csv | ![smi_icon_file_csv](https://developer.salesforce.com/docs/media/messaging-in-app/icons/smi_icon_file_csv.png '{"class": "image-icon-md"}') | Icon representing a CSV file with extension .csv. | | smi_icon_file_excel | ![smi_icon_file_excel](https://developer.salesforce.com/docs/media/messaging-in-app/icons/smi_icon_file_excel.png '{"class": "image-icon-md"}') | Icon representing an Excel file with extension .xls or .xlsx. | | smi_icon_file_txt | ![smi_icon_file_txt](https://developer.salesforce.com/docs/media/messaging-in-app/icons/smi_icon_file_txt.png '{"class": "image-icon-md"}') | Icon representing a text file with extension .txt. | | smi_icon_file_word | ![smi_icon_file_word](https://developer.salesforce.com/docs/media/messaging-in-app/icons/smi_icon_file_word.png '{"class": "image-icon-md"}') | Icon representing a word file with extension .doc or .docx. | | smi_icon_file_xml | ![smi_icon_file_xml](https://developer.salesforce.com/docs/media/messaging-in-app/icons/smi_icon_file_xml.png '{"class": "image-icon-md"}') | Icon representing a XML file with extension .xml. | | smi_icon_form | ![smi_icon_form](https://developer.salesforce.com/docs/media/messaging-in-app/icons/smi_icon_form.png '{"class": "image-icon-md"}') | Icon representing the form message shown in the feed. | | smi_icon_offline | ![smi_icon_offline](https://developer.salesforce.com/docs/media/messaging-in-app/icons/smi_icon_offline.png '{"class": "image-icon-md"}') | Icon representing an offline state. | | smi_icon_pre_chat_receipt | ![smi_icon_pre_chat_receipt](https://developer.salesforce.com/docs/media/messaging-in-app/icons/smi_icon_pre_chat_receipt.png '{"class": "image-icon-md"}') | Icon representing a checklist in the pre-chat receipt. | | smi_icon_read | ![smi_icon_read](https://developer.salesforce.com/docs/media/messaging-in-app/icons/smi_icon_read.png '{"class": "image-icon-md"}') | Icon representing a read state. | | smi_icon_sending | ![smi_icon_sending](https://developer.salesforce.com/docs/media/messaging-in-app/icons/smi_icon_sending.png '{"class": "image-icon-md"}') | Icon representing a message in transit. | | smi_icon_sent | ![smi_icon_sent](https://developer.salesforce.com/docs/media/messaging-in-app/icons/smi_icon_sent.png '{"class": "image-icon-md"}') | Icon representing a successfully sent message. | | smi_image_icon | ![smi_image_icon](https://developer.salesforce.com/docs/media/messaging-in-app/icons/smi_image_icon.png '{"class": "image-icon-md"}') | Icon representing an image placeholder in the feed. | | smi_no_search_results | ![smi_no_search_results](https://developer.salesforce.com/docs/media/messaging-in-app/icons/smi_no_search_results.png '{"class": "image-icon-md"}') | Icon shown when there are no search results. | | smi_options_menu_icon | ![smi_options_menu_icon](https://developer.salesforce.com/docs/media/messaging-in-app/icons/smi_options_menu_icon.png '{"class": "image-icon-md"}') | Icon representing the conversation options navigation action. | # Customize Icons for iOS You can customize the icons and images used throughout the SDK. To customize an image, add an asset to your project's Assets catalog using the associated keyword. This article applies to the following implementations: | UI SDK | Core SDK | | :----: | :------: | | ✅ | | **tip:** Test any icon changes in light and dark mode. | Token | Image | Keyword | Description | | :--------------------- | :-------------------------------------------------------------------------------------------------------------------- | :------------------------- | :---------------------------------------------------------------- | | actionCancel | ![action cancel](https://developer.salesforce.com/docs/media/messaging-in-app/icons/actionCancel.svg '{"class": "image-icon-md"}') | SMI.actionCancel | Icon representing the cancel action. | | actionDismiss | ![action dismiss](https://developer.salesforce.com/docs/media/messaging-in-app/icons/actionDismiss.svg '{"class": "image-icon-md"}') | SMI.actionDismiss | Icon representing the action to dismiss the current view. | | actionJumpTo | ![action jumpto](https://developer.salesforce.com/docs/media/messaging-in-app/icons/actionJumpTo.svg '{"class": "image-icon-md"}') | SMI.actionJumpTo | Icon representing the jump-to action. | | actionMenu | ![action menu](https://developer.salesforce.com/docs/media/messaging-in-app/icons/actionMenu.svg '{"class": "image-icon-md"}') | SMI.actionMenu | Icon representing the menu button on the text input. | | actionParticipantMenu | ![action participant menu](https://developer.salesforce.com/docs/media/messaging-in-app/icons/threedots_vertical.svg '{"class": "image-icon-md"}') | SMI.actionParticipantMenu | Icon representing the participant client menu action. | | actionSearch | ![action search](https://developer.salesforce.com/docs/media/messaging-in-app/icons/actionSearch.svg '{"class": "image-icon-md"}') | SMI.actionSearch | Icon representing the message search action. | | actionSend | ![action send](https://developer.salesforce.com/docs/media/messaging-in-app/icons/actionSend.svg '{"class": "image-icon-md"}') | SMI.actionSend | Icon representing the send button on the text input menu. | | actionShare | ![action share](https://developer.salesforce.com/docs/media/messaging-in-app/icons/square.and.arrow.up.svg '{"class": "image-icon-md"}') | SMI.actionShare | Icon representing the share action. | | avatarBot | ![bot avatar](https://developer.salesforce.com/docs/media/messaging-in-app/icons/botAvatar.svg '{"class": "image-icon-md"}') | SMI.avatarBot | Default bot avatar shown in the chat feed. | | avatarUser | ![avatar user](https://developer.salesforce.com/docs/media/messaging-in-app/icons/avatarUser.svg '{"class": "image-icon-md"}') | SMI.avatarUser | User avatar shown in search results. | | backButtonArrow | ![back button arrow](https://developer.salesforce.com/docs/media/messaging-in-app/icons/backButtonArrow.svg '{"class": "image-icon-md"}') | SMI.backButtonArrow | Arrow used for custom back button. | | chevronRight | ![cheveron right](https://developer.salesforce.com/docs/media/messaging-in-app/icons/chevronRight.svg '{"class": "image-icon-md"}') | SMI.chevronRight | Icon representing a link to the preview that can be navigated. | | iconCheckMark | ![check mark](https://developer.salesforce.com/docs/media/messaging-in-app/icons/checkmark.svg '{"class": "image-icon-md"}') | SMI.iconCheckMark | Icon representing a confirmed action. | | iconClock | ![clock](https://developer.salesforce.com/docs/media/messaging-in-app/icons/clock.svg '{"class": "image-icon-md"}') | SMI.iconClock | Icon representing the image used for business hours banner. | | iconCSV | ![CSV](https://developer.salesforce.com/docs/media/messaging-in-app/icons/iconCSV.svg '{"class": "image-icon-md"}') | SMI.iconCSV | Icon representing a CSV file with extension `.csv`. | | iconDelivered | ![delivered](https://developer.salesforce.com/docs/media/messaging-in-app/icons/delivered.svg '{"class": "image-icon-md"}') | SMI.iconDelivered | Icon representing a successfully delivered message. | | iconError | ![error](https://developer.salesforce.com/docs/media/messaging-in-app/icons/error.svg '{"class": "image-icon-md"}') | SMI.iconError | Icon representing an error. | | iconExcel | ![excel file](https://developer.salesforce.com/docs/media/messaging-in-app/icons/iconExcel.svg '{"class": "image-icon-md"}') | SMI.iconExcel | Icon representing an Excel file with extension `.xls` or `.xlsx`. | | iconFailed | ![failed](https://developer.salesforce.com/docs/media/messaging-in-app/icons/failed.svg '{"class": "image-icon-md"}') | SMI.iconFailed | Icon representing an error that occured while sending a message. | | iconForm | ![form](https://developer.salesforce.com/docs/media/messaging-in-app/icons/list.svg '{"class": "image-icon-md"}') | SMI.iconForm | Icon representing the form message shown in the feed. | | iconFormCalendar | ![form calendar](https://developer.salesforce.com/docs/media/messaging-in-app/icons/event.svg '{"class": "image-icon-md"}') | SMI.iconFormCalendar | Icon representing the date form type. | | iconFormFailed | ![form failed](https://developer.salesforce.com/docs/media/messaging-in-app/icons/error.svg '{"class": "image-icon-md"}') | SMI.iconFormFailed | Icon representing an error state for the submit form action. | | iconFormOptionSelected | ![form option selected](https://developer.salesforce.com/docs/media/messaging-in-app/icons/checkmark.svg '{"class": "image-icon-md"}') | SMI.iconFormOptionSelected | Icon representing the selected option in a form menu. | | iconImagePlaceholder | ![image placeholder](https://developer.salesforce.com/docs/media/messaging-in-app/icons/iconImagePlaceholder.svg '{"class": "image-icon-md"}') | SMI.iconImagePlaceholder | Icon representing an image placeholder in the feed. | | iconMessageBadge | ![message badge](https://developer.salesforce.com/docs/media/messaging-in-app/icons/arrowdown.svg '{"class": "image-icon-md"}') | SMI.iconMessageBadge | Icon representing the message overlay badge in the feed. | | iconOffline | ![offline](https://developer.salesforce.com/docs/media/messaging-in-app/icons/iconOffline.svg '{"class": "image-icon-md"}') | SMI.iconOffline | Icon representing an offline state. | | iconPreChatReceipt | ![prechat receipt](https://developer.salesforce.com/docs/media/messaging-in-app/icons/iconPrechatReceipt.png '{"class": "image-icon-md"}') | SMI.iconPreChatReceipt | Icon representing a checklist in the pre-chat receipt. | | iconRead | ![read](https://developer.salesforce.com/docs/media/messaging-in-app/icons/iconRead.svg '{"class": "image-icon-md"}') | SMI.iconRead | Icon representing a read state. | | iconSending | ![sending](https://developer.salesforce.com/docs/media/messaging-in-app/icons/iconSending.svg '{"class": "image-icon-md"}') | SMI.iconSending | Icon representing a message in transit. | | iconSent | ![sent](https://developer.salesforce.com/docs/media/messaging-in-app/icons/iconSent.svg '{"class": "image-icon-md"}') | SMI.iconSent | Icon representing a successfully sent message. | | iconTxt | ![text file](https://developer.salesforce.com/docs/media/messaging-in-app/icons/iconTxt.svg '{"class": "image-icon-md"}') | SMI.iconTxt | Icon representing a text file with extension `.txt`. | | iconWord | ![word file](https://developer.salesforce.com/docs/media/messaging-in-app/icons/iconWord.svg '{"class": "image-icon-md"}') | SMI.iconWord | Icon representing a word file with extension `.doc` or `.docx`. | | iconXML | ![xml file](https://developer.salesforce.com/docs/media/messaging-in-app/icons/iconXML.svg '{"class": "image-icon-md"}') | SMI.iconXML | Icon representing a XML file with extension `.xml`. | # Customize Images with the Service Chat SDK You can specify custom images used throughout the UI. **important:** 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](https://help.salesforce.com/s/articleView?id=service.miaw_intro_landing.htm&type=5) before that date. Messaging offers many of the [chat features](https://help.salesforce.com/s/articleView?id=service.miaw_chat_vs_messaging.htm&type=5) that you love plus asynchronous conversations that can be picked back up at any time. Learn about chat retirement in [Help](https://help.salesforce.com/s/articleView?id=001790618&type=1). Use the [`setImage`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCAppearanceConfiguration.html#/c:objc(cs)SCAppearanceConfiguration(im)setImage:compatibleWithTraitCollection:forName:>) method on the [`SCAppearanceConfiguration`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCAppearanceConfiguration.html) object to **replace a stock image** with your image. Use the enumeration value for the image you intend to replace. Supported image file formats include: tiff, tif, jpg, jpeg, gif, png, bmp, BMPF, ico, cur. For specific images, use the `SCSAppearanceImageToken` enumeration specified by the SDK and add it to the [`SCAppearanceConfiguration`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCAppearanceConfiguration.html) object with the [`setImage`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCAppearanceConfiguration.html#/c:objc(cs)SCAppearanceConfiguration(im)setImage:compatibleWithTraitCollection:forName:>) method. | Image Description | Enum Value | | ---------------------------------------------------------------------------------------------- | --------------------------- | | Close button | `close` | | Done button | `done` | | Small warning icon used when an error occurs | `error` | | Error image used in a view for timeouts, when no agents are available, or for an unknown error | `genericError` | | Minimize button (Knowledge and Chat) | `minimizeButton` | | No connection | `noConnection` | | Send button (Case Publisher and Chat) | `send` | | Next field button (Case Publisher and Chat) | `submitButtonNextArrow` | | Previous field button (Case Publisher and Chat) | `submitButtonPreviousArrow` | | Attachment button when the user can attach a file | `attachmentClipIcon` | | Avatar used for the agent (only the inscribed circle is visible in the chat feed) | `chatAgentAvatar` | | Avatar used for Einstein bot (only the inscribed circle is visible in the chat feed) | `chatBotAvatar` | | Icon used for Einstein bot persistent footer menu | `chatBotFooterMenu` | | Icon used in the pre-chat screen | `preChatIcon` | In Swift: ```java // Create appearance configuration instance let config = SCAppearanceConfiguration() // Specify images config.setImage(MY_CUSTOM_IMAGE, compatibleWithTraitCollection: MY_TRAITS, forName: ENUM_VALUE) // Add other customizations here... // Save configuration instance ServiceCloud.shared().appearanceConfiguration = config ``` In Objective-C: ```java // Create appearance configuration instance SCAppearanceConfiguration *config = [SCAppearanceConfiguration new]; // Specify images [config setImage:MY_CUSTOM_IMAGE compatibleWithTraitCollection: MY_TRAITS forName: ENUM_VALUE]; // Add other customizations here... // Save configuration instance [SCServiceCloud sharedInstance].appearanceConfiguration = config; ``` # Customize Open CTI Functionality Your organization may have complex business processes that are unsupported by Open CTI functionality. Not to worry. When this is the case, the Lightning platform offers advanced administrators and developers several ways to implement custom functionality. |Feature|Description| |---------|-------------| |SOAP API|Use standard SOAP API calls when you want to add functionality to a composite application that processes only one type of record at a time and does not require any transactional control (such as setting a Savepoint or rolling back changes). For more information, see the [SOAP API Developer Guide](https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/).| |Visualforce|Visualforce consists of a tag-based markup language that gives developers a more powerful way of building applications and customizing the Salesforce user interface. With Visualforce you can:
  • Build wizards and other multistep processes.
  • Create your own custom flow control through an application.
  • Define navigation patterns and data-specific rules for optimal, efficient application interaction.
For more information, see the [Visualforce Developer's Guide](https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/).| |Console API|The Salesforce Console Integration Toolkit and the Lightning Console JavaScript APIs let you implement custom functionality for the Salesforce console. For example, you can use the Console API to display Visualforce pages or third-party content as tabs in the Salesforce console.For more information, see the [Salesforce Console Developer Guide](https://developer.salesforce.com/docs/atlas.en-us.api_console.meta/api_console/).| |Apex|Use Apex if you want to:
  • Create Web services.
  • Create email services.
  • Perform complex validation over multiple objects.
  • Create complex business processes that aren’t supported by Flow Builder.
  • Create custom transactional logic (logic that occurs over the entire transaction, not just with a single record or object).
  • Attach custom logic to another operation, such as saving a record, so that it occurs whenever the operation is executed, regardless of whether it originates in the user interface, a Visualforce page, or from SOAP API.
For more information, see the [Apex Developer Guide](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/).| # Customize Strings for Android The UI SDK provides default text for all the messages that a user can encounter. You can customize the strings in your app using resource files. This article applies to the following implementations: | UI SDK | Core SDK | | :----: | :------: | | ✅ | | To customize these strings in your app, create a `strings.xml` resource file in your app using the exact same resource names. To learn about which languages the SDK supports, see [Language Support](https://developer.salesforce.com/docs/service/messaging-in-app/guide/before-you-begin.md). ## Action Menu | **Keyword** | **Default Value** | **Description** | | ---------------------------------- | ----------------- | --------------------------------------------------------------------------- | | smi_feed_action_menu_accessibility | Action Menu | The accessibility string for the Action Menu to the left of the text input. | | smi_feed_action_menu_photo_send | Send a Photo | Action Menu text for sending a photo. | | smi_feed_action_menu_photo_take | Take a Photo | Action Menu text for taking a photo. | | smi_feed_action_menu_file_send | Send a File | Action Menu text for sending a file. | ## Rep Transfer | **Keyword** | **Default Value** | **Description** | | --------------------------------- | ------------------------ | --------------------------------------------------------------------------- | | smi_transfer_requested_event_text | Transfer requested at %s | A system message informing the user that a rep transfer has been requested. | ## Alerts | **Keyword** | **Default Value** | **Description** | | ----------------------------------- | ------------------------------------------------------------------------ | ----------------------------------------------- | | smi_alert_action_retry | Retry | Retry action for the retry message alert. | | smi_alert_attachment_limit_reached | Attachment limit reached | Confirmation text for the retry message alert. | | smi_alert_message_failed | Message failed to send. Retry? | Confirmation text for the retry message alert. | | smi_alert_message_permission_camera | To use your camera, go to Settings and enable Camera access for this app | Explanation for how to allow camera permission. | | smi_alert_title_failed | Message Failed | Alert title text for the retry message alert. | | smi_alert_title_permission_camera | Allow Camera Access | Alert title text for requesting camera access. | ## Attachments | **Keyword** | **Default Value** | **Description** | | --------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | | smi_attachment_download_failed_message | Failed to save attachment | Shown in popup when the user clicks the download button and the attachment fails to save. | | smi_camera_capture_button_accessibility | Capture photo. | Accessibility text for the button to capture a photo. | | smi_camera_gallery_button_accessibility | Photo gallery. | Accessibility text for the button to open the photo gallery. | | smi_camera_switch_lens_button_accessibility | Switch lens direction. | Accessibility text for the button to switch the camera lens direction. | | smi_camera_view_capturing_accessibility | Camera capturing photo | Accessibility text for the view that displays the phone camera capturing a photo. | | smi_file_format_unsupported | Unsupported file format. | Message shown if the user sends an unsupported file. | | smi_file_size_exceeded | Attachment is too large. Maximum size is %s | Message shown if the user sends an attachment that exceeds the maximum size that can be sent. chat. | | smi_image_accessibility | Image message. | Accessibility text for an image message in the chat feed or attachment preview. | | smi_image_download_denied_body | To save photos, go to Settings and enable Photos access for this app. | Message shown in popup when the user tries to save a photo with denied permission. | | smi_image_download_denied_title | Allow Photo Access | Title shown in popup when the user tries to save a photo with denied permission. | | smi_image_preview_accessibility | Image preview. | Accessibility text for the image preview dialog. | | smi_image_preview_cancel_button_accessibility | Close image preview. | Accessibility text for the button to close the image preview dialog. | | smi_image_saved_message | Image saved | Shown in popup when the user clicks the download button and the attachment successfully saves. | | smi_image_viewer_download_photo_accessibility | Download photo | Accessibility text for the download button in the image viewer. | | smi_image_viewer_jump_to_photo_accessibility | Jump to photo | Accessibility text for the jump to photo button in the image viewer. | | smi_image_viewer_share_photo_accessibility | Share photo | Accessibility text for the share button in the image viewer. | | smi_multiple_attachment_counter | +%d | A counter that takes an integer representing the number of file attachments not shown. | | smi_remove_image_button_accessibility | Remove image message. | Accessibility text for the button to remove an image message from the input field. | ## Business Hours Banner | **Keyword** | **Default Value** | **Description** | | ---------------------------------------- | ----------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | | smi_business_hours_outside | New chats aren\'t available outside of business hours | The message that is shown in the chat feed banner when outside of business hours. | | smi_business_hours_outside_accessibility | New chats aren\'t currently available. Try again during business hours. | The accessibility announcement that informs the user that they are out of the set business hours and the contact center is closed. | ## Carousels | **Keyword** | **Default Value** | **Description** | | -------------------------------------------- | -------------------- | ------------------------------------------------------------------------------- | | smi_carousel_image_accessibility | Carousel image | The default image description for a carousel option if no description is given. | | smi_carousel_image_placeholder_accessibility | Empty carousel image | A placeholder icon to indicate there is no image for a carousel option. | | smi_carousel_selected_icon_accessibility | Option selected | An icon to indicate that an option has been selected for a carousel message. | ## Chat Feed | **Keyword** | **Default Value** | **Description** | | --------------------------------------------------------- | ----------------------------------------------------- | ------------------------------------------------------------------------------------------- | | smi_chat_feed_accessibility | Chat Feed | Accessibility label for the chat feed container view. | | smi_chat_add_button | Open option menu. | Content description for the add button in the chat view to open the options menu. | | smi_chat_feed_title | Chat | Title for the chat feed view. | | smi_chat_start_conversation | Start Conversation | Content description for a button that is used to resubmit pre-chat fields mid-conversation. | | smi_chat_start_conversation_feed_input_text_accessibility | Fill out a pre-chat form to continue the conversation | Accessibility announcement when the user needs to enter and resubmit pre-chat fields. | ## Chat Feed Input | **Keyword** | **Default Value** | **Description** | | ------------------------------------------ | --------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | | smi_feed_input_button | Send | Action text for the send message button. | | smi_feed_input_text | Type a message | Placeholder text inside chat input field. | | smi_feed_input_text_accessibility | message Input | Accessibility label for identifying the input control. | | smi_feed_new_messages | New messages | A notification that alerts the user that there are new unread messages in the chat feed. | | smi_feed_new_messages_accessibility | You have new messages. | An accessibility announcement that alerts the user that there are new unread messages in the chat feed. | | smi_feed_new_messages_button_accessibility | Scroll to bottom of chat feed. | The description for the notification badge button that alerts a user that they’ll be brought to the bottom of the feed. | | smi_unknown_entry_message | Agent sent an unsupported message type. | The message shown when displaying an unknown entry in the chat feed. | ## Copy Menu | **Keyword** | **Default Value** | **Description** | | --------------- | ----------------- | --------------------------------------------------------- | | smi_action_copy | Copy | Text displayed in the context menu for the copy behavior. | ## Delivery Status | **Keyword** | **Default Value** | **Description** | | --------------------------------------------------------- | ------------------------------------ | --------------------------------------------------------------------------------------------------------------------------- | | smi_delivery_status_delivered | Delivered | The message auxiliary view that displays the delivered message indicator. | | smi_delivery_status_error | Send failed. Tap to retry. | The message auxiliary view that displays a send failure. | | smi_delivery_status_error_accessibility | Failed | The concise failed status for accessibility. | | smi_delivery_status_error_additional_information_required | Provide additional info to proceed. | The error message that appears when receiving a 417 error. This message corresponds to needing to resubmit pre-chat fields. | | smi_delivery_status_error_hint_accessibility | Double tap to retry | Hint for the user to double-tap the message to retry. | | smi_delivery_status_error_unsupported_media_type | Chatbots can\'t receive attachments. | The error message appears when trying to send attachments that aren’t supported. | | smi_delivery_status_read | Read | The message auxiliary view that displays the read message indicator. | | smi_delivery_status_sending | Sending | The message auxiliary view that displays the sending message indicator. | | smi_delivery_status_sent | Sent | The message auxiliary view that displays the sent message indicator. | | smi_local_message_identifier_accessibility | Your message | The accessibility text for identifying messages sent from the local user. | | smi_message_received_event_accessibility | Message received from %s | The accessibility announcement text that informs the user when a message has been received. | | smi_message_sending_event_accessibility | Message sent | The accessibility announcement text that informs the user that their message is sending. | ## End Chat Session | **Keyword** | **Default Value** | **Description** | | --------------------------------- | --------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ | | smi_end_chat_menu_button | End Chat | The title of the end chat button in the participant client menu. | | smi_end_chat_title | End Chat? | The title label on the end chat confirmation page. | | smi_end_chat_subtitle | Are you sure you want to end the chat session? You will be disconnected from the agent. | The subtitle label on the end chat confirmation page. | | smi_end_chat_confirmation_button | End Chat | The end chat button label on the confirmation page. | | smi_end_chat_cancel | Cancel | The cancel button label on the confirmation page. | | smi_end_chat_error_message | Something went wrong. Please try again later. | Error message to display on the end chat confirmation page if ending the chat fails. | | smi_fallback_message_close_button | Close | The close button label on the fallback message page. | ## Form Message | **Keyword** | **Default Value** | **Description** | | -------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | | smi_form_message_back_button | Back | The back button for the secure form. | | smi_form_message_back_button_accessibility | Back to chat feed | The accessibility text for hitting the back button on form message submission screen. | | smi_form_message_exit_screen_subtitle | After leaving the form, you can open it again in the messaging window. However, your progress isn't saved. | The subtitle for the secure form exit confirmation screen. | | smi_form_message_exit_screen_title | Leave the form | The main title for the secure form exit confirmation screen. | | smi_form_message_footer_back | Back | The text displayed in the footer menu of the form message for the back button. | | smi_form_message_footer_next | Next | The text displayed in the footer menu of the form message for the next button. | | smi_form_message_footer_submit | Submit | The text displayed in the footer menu of the form message for the submit button. | | smi_form_message_divider | %1$d/%2$d | The divider for the form message text field character counter. | | smi_form_message_exit_screen_cancel | Cancel | The cancel button text for the secure form exit confirmation screen. | | smi_form_message_exit_screen_confirm | Leave Form | The leave form button for the secure form exit confirmation screen. | | smi_form_message_option_required_message | One or more options required | The string that is displayed below a form entry to indicate that the item is required. | | smi_form_message_required | %s \* | The string that is displayed to indicate that the form message field is required. | | smi_form_message_required_accessibility | %s is required | The accessibility string that is displayed to indicate that the form message field is required. | | smi_form_message_result_error | Error Submitting Form | The message shown in the chat bubble if a form fails to submit. | | smi_form_message_result_success | Form Submitted | The message shown in the chat bubble when a form has been successfully submitted. | | smi_form_message_result_submitting | Form Submitting | The message shown in the chat bubble when a form is submitting. | | smi_form_message_text_input_required_message | This field is required | The string that is displayed below a form entry that indicates that this item is required. | | smi_form_message_text_invalid_email | Not a valid email | The string that is displayed below a form entry to indicate that the email is invalid. | | smi_form_message_text_invalid_url | Not a valid url | The string that is displayed below a form entry to indicate that the url is invalid. | ## Link Preview | **Keyword** | **Default Value** | **Description** | | ------------------------------ | ----------------- | ----------------------------------------------------------------------- | | smi_link_preview_accessibility | Link preview | The screen reader reads out link preview and then the name of the link. | ## Loading Screen | **Keyword** | **Default Value** | **Description** | | -------------------------------- | --------------------- | --------------------------------------------------------------------------------------------------------- | | smi_loading_screen_accessibility | Active loading screen | A message that is read to the user when a loading screen is shown or when the loading screen is selected. | ## Message Search | **Keyword** | **Default Value** | **Description** | | -------------------------------------------------- | --------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | | smi_message_search_header | Message Search | Header for the message search page. | | smi_message_search_agent_avatar_accessibility | Rep avatar | Accessibility text for the rep avatar in message search search. | | smi_message_search_agent_bot_accessibility | Bot avatar | Accessibility text for the bot avatar in message search search. | | smi_message_search_back_button | Back | The back button for message search. | | smi_message_search_clear_search_text_accessibility | Clear search text | Accessibility text for clearing the search field in message search. | | smi_message_search_user_avatar_accessibility | User avatar | Accessibility text for the user avatar in message search search. | | smi_no_matching_results | We couldn’t find what you’re looking for. Try searching for something else. | Message displayed when nothing matches the user's search. | | smi_no_recent_searches | You haven\'t performed a recent search. Enter keywords in the search field. | Message displayed when there are no search results and no text is entered in the search field. | | smi_no_search_results | No search results | Message displayed when there are no search results. | | smi_nothing_entered_in_search | Nothing here yet | Message displayed when there’s nothing in the search bar and there are no recent searches. | | smi_recent_searches_header | Recent Searches | Header for the recent search list. | | smi_search_placeholder_text | Search | Placeholder text for the search bar. | | smi_today_timestamp_message_search | Today | Timestamp text for when the message was sent today. | | smi_users_name | You | The name shown for the user in the timestamp row. | | smi_yesterday_timestamp_message_search | Yesterday | Timestamp text for when the message was sent yesterday. | ## Miscellaneous | **Keyword** | **Default Value** | **Description** | | ------------------------- | ---------------------------------- | ----------------------------------------------------------------------------------------------------- | | smi_action_cancel | Cancel | Cancel action to be used for cancel button and menus throughout the SDK. | | smi_action_settings | Settings | Settings action for permission alerts. | | smi_file_size_megabyte | MB | Size of a file in megabytes. | | smi_misc_separator | • | Separator used when conjoining information together in a string. | | smi_misc_unknown | Unknown | This string is used when a value or result cannot be determined. | | smi_unknown_entry_message | This message type isn't supported. | The error message that appears when the message type of the message in the chat feed isn't supported. | ## Network Connectivity Banner | **Keyword** | **Default Value** | **Description** | | --------------------------------------------- | ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | | smi_network_status_connected | Connected | The network connectivity banner that will inform the user the network has connected after the network has lost connectivity. | | smi_network_status_connected_accessibility | Network connectivity established | The accessibility announcement that informs the user when the network is connected after having lost connectivity. | | smi_network_status_reconnecting | Waiting to reconnect | The network connectivity banner text that informs the user the network connection has been lost and is attempting to reconnect. | | smi_network_status_reconnecting_accessibility | Network connectivity is lost, attempting to reconnect | The accessibility announcement that informs the user when the network connection has been lost and is attempting to reconnect | ## Participant Client | **Keyword** | **Default Value** | **Description** | | ----------------------------------------------- | -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | | smi_participant_client_menu_title | Conversation Options | Text displayed in the header of the participant client menu. The participant client menu will contain actions a user can take in a chat feed. | | smi_participant_client_menu_title_accessibility | Conversation Options Menus | The accessibility message for the participant client menu. | ## Participants | **Keyword** | **Default Value** | **Description** | | -------------------------------------------- | ------------------------------ | ---------------------------------------------------------------------------------------------------- | | smi_participant_changed_joined | %s has joined | The accessibility announcement that informs the user that a participant has joined the conversation. | | smi_participant_changed_joined_accessibility | %s has joined the conversation | Notice that a participant has joined the conversation. | | smi_participant_changed_left | %s has left | Notice that a participant has joined the conversation. | | smi_participant_changed_left_accessibility | %s has left the conversation | The accessibility announcement that informs the user that a participant has left the conversation. | | smi_participant_name_default | Participant | Default string for a participant with no display name or subject configured. | ## Pre-Chat | **Keyword** | **Default Value** | **Description** | | --------------------------------------- | ------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | | smi_back_button_accessibility | Back to chat feed | Accessibility text for hitting the back button on pre-chat submission screen. | | smi_checkbox_selected_accessibility | Checkbox selected | Accessibility text for when the checkbox is selected. | | smi_checkbox_not_selected_accessibility | Checkbox not selected | Accessibility text for when the checkbox isn’t selected. | | smi_exit_button_accessibility | Exit to chat feed | Accessibility text for hitting the exit button on pre-chat submission screen. | | smi_pre_chat_back_button | Back | The back button for the pre-chat form. | | smi_pre_chat_choice_list_none | None | Label for the None option in a pre-chat choice list. | | smi_pre_chat_error_field_required | This field is required. | Error message shown when a required field fails pre-chat validation. | | smi_pre_chat_error_valid_email_format | Use a valid email format. | Error message shown when an email field fails pre-chat validation. | | smi_pre_chat_error_valid_number_format | Field can only contain numbers. | Error message shown when a number field fails pre-chat validation. | | smi_pre_chat_error_valid_phone_format | Use a valid phone number format. | Error message shown when a phone field fails pre-chat validation | | smi_pre_chat_required | %s \* | The string for a pre-chat field label if the field is required. | | smi_pre_chat_required_accessibility | %s is required | Accessibility text for the pre-chat field if the field is required. | | smi_pre_chat_submission_card_title | Form submitted Tap to review | Text for pre-chat cell that shows in chat after submitting form. | | smi_pre_chat_submission_review_title | Submitted Form Details | Header for pre-chat submitted form details. | | smi_pre_chat_submit_button | Chat with an Agent | The title of the pre-chat submit button. | | smi_pre_chat_title | Just a few things before we connect you with an expert… | The title of the pre-chat form. | | smi_unknown_entry_message | This message type isn’t supported. | The error message that appears when the message type of the message in the chat feed isn’t supported. | ## Progress Indicators | **Keyword** | **Default Value** | **Description** | | -------------------------------------------- | ----------------------------- | ------------------------------------------------------------------------------------------------------------------------- | | smi_progress_indicator_single_participant | %s is typing... | The default label for a single participant progress indicator. | | smi_progress_indicator_bot | %s is responding... | The default label for a bot progress indicator. | | smi_progress_indicator_two_participants | %1$s and %2$s are typing... | The default label displayed when two participants are typing. | | smi_progress_indicator_multiple_participants | Multiple people are typing... | The default label displayed when multiple participants are typing. | | smi_progress_indicator_message_accessibility | %1$s %2$s | The accesibility announcement for a bot progress indicator containing the bot display name and the progress message text. | ## Request Transcript | **Keyword** | **Default Value** | **Description** | | ----------------------------------------- | ---------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | | smi_transcript_request_button | Request Chat Transcript | The title of the request transcript button in the participant client menu. | | smi_transcript_title | Chat Transcript | The title of the request transcript screen. | | smi_transcript_leave_button | Leave | The leave button on the leave transcript screen. This screen warns the user that if they leave without saving, the transcript is lost. | | smi_transcript_cancel_button | Cancel | The cancel button on the leave transcript screen. This screen warns the user that if they leave without saving, the transcript is lost. | | smi_transcript_leave_title | Leave Transcript | Title of the leave transcript screen. This screen warns the user that if they leave without saving, the transcript is lost. | | smi_transcript_leave_subtitle | Be sure to save the transcript before leaving. | Subtitle of the leave transcript screen. This screen warns the user that if they leave without saving, the transcript is lost. | | smi_transcript_save_button_accessibility | Save Transcript | The accessibility string for the save transcript button. | | smi_transcript_share_button_accessibility | Share Transcript | The accessibility string for the share transcript button. | | smi_transcript_error_message | Something went wrong. Please try again later. | Error message to display on the error screen when the transcript fails to download from the server. | | smi_transcript_alert_save_failed | Save failed | Message to display when the request transcript fails to save on the device. | | smi_transcript_alert_save_succeed | Save was successful | Message to display when a request transcript successfully saves on the device. | ## Routing | **Keyword** | **Default Value** | **Description** | | --------------------------------- | ------------------------------------------------ | ------------------------------------------------------------------------------------------------ | | smi_routing_failure_event_text | Agents are not available. Try again later. | A default system message informing the user that routing to an agent has failed. | | smi_routing_initial_agent | An agent will be with you shortly. | Shown when an estimated wait time is available and the routing type is in the initial state. | | smi_routing_wait_resolved_minutes | Your expected wait time is %s minutes. | Shown when the estimated wait time is greater than 60 seconds. Rounded up to the nearest minute. | | smi_routing_wait_resolved_short | Your expected wait time is less than one minute. | Shown when the estimated wait time is less than or equal to 60 seconds. | ## Streaming Tokens | **Keyword** | **Default Value** | **Description** | | ----------------------------------- | --------------------- | -------------------------------------------------------- | | smi_streaming_text_cursor | ▏ | The cursor shown when a message is streaming. | | smi_streaming_message_accessibility | The bot is responding | The accessibility text used when a message is streaming. | ## Terms and Conditions | **Keyword** | **Default Value** | **Description** | | ------------------------------- | -------------------------------------------- | ------------------------------------------------------------------------------------ | | smi_terms_and_conditions_accept | Accept | Message displayed next to the checkbox to accept the Terms and Conditions. | | smi_terms_and_conditions_error | Accept the Terms and Conditions to continue. | Error message displayed when the Terms and Conditions are required but not accepted. | ## Typing | **Keyword** | **Default Value** | **Description** | | ---------------------------------------- | --------------------- | -------------------------------------------------------------------------------------- | | smi_typing_indicator_start_accessibility | %s has started typing | The accessibility announcement that informs the user when a participant starts typing. | | smi_typing_indicator_stop_accessibility | %s has stopped typing | The accessibility announcement that informs the user when a participant stops typing. | # Customize Strings for iOS The UI SDK provides default text for all the messages that a user can encounter. You can customize the strings in your app using resource files. This article applies to the following implementations: | UI SDK | Core SDK | | :----: | :------: | | ✅ | | To customize these strings in your app, create an `Localizable.strings` localizable resource file in your app and override the string keywords. For example: ```swift "SMI.Feed.Input.Text" = "My custom text..."; ``` To learn more, see the [Apple documentation on String Resources](https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/LoadingResources/Strings/Strings.html). To learn about which languages the SDK supports, see [Language Support](https://developer.salesforce.com/docs/service/messaging-in-app/guide/before-you-begin.md). ## Chat Feed Strings | **Keyword** | **Default Value** | **Description** | | --------------------------------------------------------- | ----------------------------------------------------- | ------------------------------------------------------------------------------------------- | | SMI.Chat.Feed.Title | Chat | Title for the chat feed view. | | SMI.Chat.Feed.Accessibility | Chat Feed | Accessibility label for the chat feed container view. | | SMI.Chat.Start.Conversation | Start Conversation | Content description for a button that is used to resubmit pre-chat fields mid-conversation. | | SMI.Chat.Start.Conversation.Feed.Input.Text.Accessibility | Fill out a pre-chat form to continue the conversation | Accessibility announcement when the user needs to enter and resubmit pre-chat fields. | | SMI.Chat.Badge.Overlay.Count | 9+ | The chat feed badge overlay unread message count for amounts equal to or over 10. | ## Chat Feed Input Strings | **Keyword** | **Default Value** | **Description** | | ------------------------------------------ | ------------------------------ | -------------------------------------------------------------------------------------------------------------------- | | SMI.Feed.Input.Text | Type a message | Placeholder text inside chat input field. | | SMI.Feed.Input.Text.Accessibility | Message Input | Accessibility label for identifying the input control. | | SMI.Feed.Input.Button | Send | Action text for the send message button. | | SMI.Feed.New.Messages | New Messages | A notification that alerts the user that there are new unread messages in the chat feed. | | SMI.Feed.New.Messages.Accessibility | You have new messages. | An accessibility announcement that alerts the user that there are new unread messages in the chat feed. | | SMI.Feed.New.Messages.Button.Accessibility | Scroll to bottom of chat feed. | The description for the notification badge button that alerts a user they will be brought to the bottom of the feed. | ## Action Menu Strings | **Keyword** | **Default Value** | **Description** | | ---------------------------------- | ------------------- | -------------------------------------------------------------------------- | | SMI.Feed.Action.Menu.Title | Send an attachment? | Action Menu text for sending a photo. | | SMI.Feed.Action.Menu.Photo.Send | Send a Photo | Action Menu text for sending a photo. | | SMI.Feed.Action.Menu.File.Send | Send a File | Action Menu text for sending a file. | | SMI.Feed.Action.Menu.Photo.Take | Take a Photo | Action Menu text for taking a photo. | | SMI.Feed.Action.Menu.Accessibility | Action Menu | The accessibility string for the Action Menu to the left of the text input | ## Delivery Status | **Keyword** | **Default Value** | **Description** | | --------------------------------------------------------- | ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | | SMI.Delivery.Timestamp.Yesterday | Yesterday • %@ | The message auxiliary view that will display the time information for the day yesterday with the timestamp. | | SMI.Delivery.Timestamp.Today | Today • %@ | The message auxiliary view that will display the time information for the day today with the timestamp. | | SMI.Delivery.Status.Sending | Sending | The message auxiliary view that will display the sending message indicator. | | SMI.Delivery.Status.Sent | Sent | The message auxiliary view that will display the sent message indicator. | | SMI.Delivery.Status.Read | Read | The message auxiliary view that will display the read message indicator. | | SMI.Delivery.Status.Delivered | Delivered | The message auxiliary view that will display the delivered message indicator. | | SMI.Delivery.Status.Error | Send failed. Tap to retry. | The message auxiliary view that will display the error message. | | SMI.Delivery.Status.Error.Additional.Information.Required | Provide additional info to proceed. | The error message that appears when receiving a 417 error. This message corresponds to needing to resubmit pre-chat fields. | | SMI.Delivery.Status.Error.Accessibility | Failed | The concise failed status for accessibility | | SMI.Delivery.Status.Error.Hint.Accessibility | Double tap to retry | Hint for the user to double tap the message to retry | | SMI.Local.Message.Identifier.Accessibility | Your Message %@ | The accessibility text for identifying messages sent from the local user | | SMI.Remote.Message.Identifier.Accessibility | %1$@ message %2$@ | The accessibility text for identifying messages sent from the remote user. %1$s is the name of the agent, %2$s will represent the message. | | SMI.System.Message.Identifier.Accessibility | System message %@ | The accessibility text for identifying messages sent from the system user | | SMI.Message.Received.Event.Accessibility | Message received from %@ | The accessibility announcement text that informs the user when a message has been received | | SMI.Message.Sending.Event.Accessibility | Message sent | The accessibility announcement text that informs the user that their message has been sent | ## Network Connectivity Banner | **Keyword** | **Default Value** | **Description** | | --------------------------------------------- | ----------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | | SMI.Network.Status.Reconnecting | Waiting to reconnect | The network connectivity banner text that will inform the user the network connection has been lost and is attempting to reconnect | | SMI.Network.Status.Reconnecting.Accessibility | Network connectivity is lost, attempting to reconnect | The accessibility announcement that informs the user when the network connection has been lost and is attempting to reconnect | | SMI.Network.Status.Connected | Connected | The network connectivity banner that will inform the user the network has connected after the network has lost connectivity | | SMI.Network.Status.Connected.Accessibility | Network connectivity established | The accessibility announcement that informs the user when the network is connected after having lost connectivity | ## Business Hours Banner | **Keyword** | **Default Value** | **Description** | | ---------------------------------------- | ----------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | | SMI.Business.Hours.Outside | New chats aren\'t available outside of business hours | The message that is shown in the chat feed banner when outside of business hours | | SMI.Business.Hours.Outside.Accessibility | New chats aren\'t currently available. Try again during business hours. | The accessibility announcement that informs the user that they are out of the set business hours and the contact center is closed | ## Typing | **Keyword** | **Default Value** | **Description** | | ---------------------------------------- | --------------------- | ------------------------------------------------------------------------------------- | | SMI.Typing.Indicator.Start.Accessibility | %@ has started typing | The accessibility announcement that informs the user when a participant starts typing | | SMI.Typing.Indicator.Stop.Accessibility | %@ has stopped typing | The accessibility announcement that informs the user when a participant stops typing | | SMI.Typing.Indicator.Accessibility | %@ is typing | The accessibility label for the agent typing indicator | ## Progress Indicators | **Keyword** | **Default Value** | **Description** | | -------------------------------------------- | ----------------------------- | -------------------------------------------------------------------------------------------------------------------------- | | SMI.Progress.Indicator.Single.Participant | %@ is typing... | The default label for a single participant progress indicator. | | SMI.Progress.Indicator.Bot | %@ is responding... | The default label for a bot progress indicator. | | SMI.Progress.Indicator.Two.Participants | %1$@ and %2$@ are typing... | The default label for two participants typing. | | SMI.Progress.Indicator.Multiple.Participants | Multiple people are typing... | The default label for multiple participants typing. | | SMI.Progress.Indicator.Message.Accessibility | %1$@ %2$@ | The accessibility announcement for a bot progress indicator containing the bot display name and the progress message text. | ## Misc | **Keyword** | **Default Value** | **Description** | | ------------------------- | ----------------------------------- | ----------------------------------------------------------------------------------------------------- | | SMI.Misc.Separator | • | separator used when conjoining information together in a string | | SMI.Misc.Unknown | Unknown | This is used when a value or result cannot be determined | | SMI.Action.Cancel | Cancel | Cancel action to be used for cancel button and menus throughout the SDK. | | SMI.Action.Settings | Settings | Settings action for permission alerts | | SMI.File.Size.Megabyte | MB | Size of a file in megabytes | | SMI.Unknown.Entry.Message | This message type isn\'t supported. | The error message that appears when the message type of the message in the chat feed isn't supported. | ## Alerts | **Keyword** | **Default Value** | **Description** | | ----------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------ | | SMI.Alert.Title.Failed | Message Failed | Alert title text for the retry message alert. | | SMI.Alert.Title.Permission.Camera | Allow Camera Access | Alert title text for requesting camera access. | | SMI.Alert.Message.Failed | Message failed to send. Retry? | Confirmation text for the retry message alert. | | SMI.Alert.Message.Permission.Camera | To use your camera, go to Settings and enable Camera access for this app. | Explanation that the user must allow camera permission | | SMI.Alert.Action.Retry | Retry | Retry action for the retry message alert. | | SMI.Alert.Attachment.Limit.Reached | Attachment limit reached | Alert when limit for number of attachments is reached. | ## Participant Changed | **Keyword** | **Default Value** | **Description** | | -------------------------------------------- | ------------------------------ | --------------------------------------------------------------------------------------------------- | | SMI.Participant.Name.Default | Participant | Default string for a participant with no displayName or subject configured. | | SMI.Participant.Changed.Joined | %@ has joined | Notice that a participant has joined the conversation | | SMI.Participant.Changed.Joined.Accessibility | %@ has joined the conversation | The accessibility announcement that informs the user that a participant has joined the conversation | | SMI.Participant.Changed.Left | %@ has left | Notice that a participant has left the conversation | | SMI.Participant.Changed.Left.Accessibility | %@ has left the conversation | The accessibility announcement that informs the user that a participant has left the conversation | ## PreChat | **Keyword** | **Default Value** | **Description** | | --------------------------------------------------- | ------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | | SMI.Pre.Chat.Required.Accessibility | %@ is required | The accessibility string for the PreChat field if the field is required | | SMI.Pre.Chat.Required | %@ \* | The string for a PreChat field label if the field is required | | SMI.Pre.Chat.Submit.Button | Chat with an Agent | The title of the PreChat submit button | | SMI.Pre.Chat.Title | Just a few things before we connect you with an expert… | The title of the PreChat forum | | SMI.Pre.Chat.Choice.List.None | None | Label for the None option in a pre-chat choice list | | SMI.Pre.Chat.Back.Button | Back | The back button for the prechat form | | SMI.Pre.Chat.Error.Field.Required | This field is required. | Error message shown when a required field fails PreChat validation | | SMI.Pre.Chat.Error.Valid.Email.Format | Use a valid email format. | Error message shown when an email PreChat field fails PreChat validation | | SMI.Pre.Chat.Error.Valid.Number.Format | Field can only contain numbers. | Error message shown when a number PreChat field fails PreChat validation | | SMI.Pre.Chat.Error.Valid.Phone.Format | Use a valid phone number format. | Error message shown when a phone PreChat field fails PreChat validation | | SMI.Pre.Chat.Submission.Review.Title | Submitted Form Details | Header for prechat submitted form details | | SMI.Pre.Chat.Submission.Card.Title | Form submitted Tap to review | Text for prechat cell that shows in chat after submitting prechat | | SMI.Back.Button.Accessibility | Back to chat feed | Accessibility text for hitting the back button on pre chat submission screen | | SMI.Exit.Button.Accessibility | Exit to chat feed | Accessibility text for hitting the exit button on pre chat submission screen | | SMI.Checkbox.Selected.Accessibility | Checkbox selected | Accessibility text for when the checkbox is selected | | SMI.Checkbox.Not.Selected.Accessibility | Checkbox not selected | Accessibility text for when the checkbox is not selected | | SMI.Terms.And.Conditions.Error | Accept the Terms and Conditions to continue. | Error message displayed when the Terms and Conditions are required but not accepted. | | SMI.Terms.And.Conditions.Accept | Accept | Message displayed next to the checkbox to accept the Terms and Conditions. | | SMI.Terms.And.Conditions.Accepted.Accessibility | Terms and conditions is accepted | Accessibility label for terms and conditions box when it is accepted. | | SMI.Terms.And.Conditions.Not.Accepted.Accessibility | Terms and conditions is not accepted | Accessibility label for terms and conditions box when it is accepted. | | SMI.Pre.Chat.Error.Accessibility | %1$@ input. Error %2$@. | Accessibility readout for prechat errors. The first parameter is the field name, the second field is the error on the field. | ## Attachments | **Keyword** | **Default Value** | **Description** | | --------------------------------------------- | --------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | | SMI.Image.Accessibility | Image message. | Accessibility text for an image message in the chat feed or attachment preview. | | SMI.Remove.Image.Button.Accessibility | Remove image message. | Accessibility text for the button to remove an image message from the input field. | | SMI.Multiple.Attachment.Counter | +%d | A counter that takes an integer representing the number of file attachments not shown. | | SMI.Image.Preview.Accessibility | Image preview. | Accessibility text for the image preview dialog. | | SMI.Image.Preview.Cancel.Button.Accessibility | Close image preview. | Accessibility text for the button to close the image preview dialog. | | SMI.Camera.Gallery.Button.Accessibility | Photo gallery. | Accessibility text for the button to open the photo gallery. | | SMI.Camera.Switch.Lens.Button.Accessibility | Switch lens direction. | Accessibility text for the button to switch the camera lens direction. | | SMI.Camera.Capture.Button.Accessibility | Capture photo. | Accessibility text for the button to capture a photo. | | SMI.Camera.View.Capturing.Accessibility | Camera capturing photo | Accessibility text for the view that is displaying the phones camera capturing a photo | | SMI.Image.Viewer.Jump.To.Photo.Accessibility | Jump to photo | Accessibility text for the jump to photo button in image viewer | | SMI.Image.Viewer.Share.Photo.Accessibility | Share photo | Accessibility text for the share button in image viewer | | SMI.Image.Viewer.Download.Photo.Accessibility | Download photo | Accessibility text for the download button in image viewer | | SMI.Header.Share.Image.Viewer | Image | Shown when user taps the share button while viewing an image in the attachment viewer screen | | SMI.Header.Share.Gif.Viewer | GIF | Shown when user taps the share button while viewing a GIF in the attachment viewer screen | | SMI.Header.Share.Pdf.Viewer | PDF | Shown when user taps the share button while viewing a PDF in the attachment viewer screen | | SMI.Image.Saved.Message | Attachment saved | Shown in popup when user taps the download button and the attachment successfully saves | | SMI.Attachment.Download.Failed.Message | Failed to save attachment | Shown in popup when user clicks on download button and the attachment fails to save | | SMI.Image.Download.Denied.Title | Allow Photo Access | Title shown in popup when user tries to save a photo with denied permission | | SMI.Image.Download.Denied.Body | To save photos, go to Settings and enable Photos access for this app. | Message shown in popup when user tries to save a photo with denied permission | | SMI.File.Format.Unsupported | Unsupported file format. | Message shown if user sends an unsupported file in chat | | SMI.File.Size.Exceeded | Attachment is too large. Maximum size is %@. | Message shown if the user sends an attachment that exceeds the max size that can be sent | ## Agent Transfer | **Keyword** | **Default Value** | **Description** | | --------------------------------- | ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | SMI.Transfer.Requested.Event.Text | Transfer requested at %@ | A system message informing the user that a transfer to a service agent has been requested, and a string template indicating the time of the request. | ## Routing Failure | **Keyword** | **Default Value** | **Description** | | ------------------------------ | ------------------------------------------ | ----------------------------------------------------------------------------------------------- | | SMI.Routing.Failure.Event.Text | Agents are not available. Try again later. | A default system message informing the user that routing to a service console agent has failed. | ## Routing Estimated Wait Time | **Keyword** | **Default Value** | **Description** | | --------------------------------- | ------------------------------------------------ | ----------------------------------------------------------------------------------------------- | | SMI.Routing.Initial.Agent | An agent will be with you shortly. | Shown when the routing type is initial. and EWT is available | | SMI.Routing.Wait.Resolved.Minutes | Your expected wait time is %@ minutes. | Shown when the estimated wait time is greater than 60 seconds. Rounded up to the nearest minute | | SMI.Routing.Wait.Resolved.Short | Your expected wait time is less than one minute. | Shown when the estimated wait time is less than or equal to 60 seconds | ## Loading Screen | **Keyword** | **Default Value** | **Description** | | -------------------------------- | --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | | SMI.Loading.Screen.Accessibility | Active loading screen | A message that will be read out to the user when a loading screen is shown, and read out to the user when the loading screen is selected. | ## Link Preview Strings | **Keyword** | **Default Value** | **Description** | | ------------------------------ | ----------------- | -------------------------------------------------------------------------- | | SMI.Link.Preview.Accessibility | Link preview | The screen reader will read out link preview and then the name of the link | ## Message Search | **Keyword** | **Default Value** | **Description** | | -------------------------------------------------- | ----------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | | SMI.Nothing.Entered.In.Search | Nothing here yet | Message displayed when there’s nothing in the search bar and there are no recent searches | | SMI.No.Search.Results | No search results | Message displayed when there are no search results | | SMI.No.Matching.Results | We couldn\'t find what you\'re looking for. Try searching for something else. | Message displayed when nothing matches the users search | | SMI.Message.Search.Header | Message Search | Header for the message search page | | SMI.Recent.Searches.Header | Recent Searches | Header for the recent search list | | SMI.Search.Placeholder.Text | Search | Placeholder text for the search bar | | SMI.Today.Timestamp.Message.Search | Today | Timestamp text for when the message was sent today | | SMI.Yesterday.Timestamp.Message.Search | Yesterday | Timestamp text for when the message was sent yesterday | | SMI.Users.Name | You | The name shown for the user in the time stamp row | | SMI.No.Recent.Searches | You haven\'t performed a recent search. Enter keywords in the search field. | Message displayed when there are no search results and no text is entered in the search field | | SMI.Message.Search.Back.Button | Back | The back button for message search | | SMI.Message.Search.Clear.Search.Text.Accessibility | Clear search text | Accessibility text for clearing the search field in message search | | SMI.Message.Search.Agent.Avatar.Accessibility | Agent avatar | Accessibility text for the agent avatar in message search | | SMI.Message.Search.User.Avatar.Accessibility | User avatar | Accessibility text for the user avatar in message search | | SMI.Message.Search.Agent.Bot.Accessibility | Bot avatar | Accessibility text for the bot avatar in message search | ## Copy Menu | **Keyword** | **Default Value** | **Description** | | -------------------------- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------ | | SMI.Action.Copy | Copy | Text displayed in the context menu for the copy behavior | | SMI.Action.Copy.Attachment | Copy Attachment | Text displayed in the context menu for copying an attachment when receiving part of a conversation entry with text and an attachment | | SMI.Action.Copy.Text | Copy Text | Text displayed in the context menu for copying text when receiving part of a conversation entry with text and an attachment | ## Participant Client Menu | **Keyword** | **Default Value** | **Description** | | ----------------------------------------------- | -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | SMI.Participant.Client.Menu.Title | Conversation Options | Text displayed in the header of the participant client menu. The participant client menu will contain actions a user can take in a chat feed. The header will display the name of the participant followed by Options. | | SMI.Participant.Client.Menu.Title.Accessibility | Conversation Options Menus | The accessibility message for the participant client menu | ## Form Message | **Keyword** | **Default Value** | **Description** | | -------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | | SMI.Form.Message.Footer.Submit | Submit | Text displayed in the footer menu of the Form Message for the submit button. | | SMI.Form.Message.Footer.Back | Back | Text displayed in the footer menu of the Form Message for the back button. | | SMI.Form.Message.Footer.Next | Next | Text displayed in the footer menu of the Form Message for the next button. | | SMI.Form.Message.Back.Button | Back | The back button for the secure form | | SMI.Form.Message.Back.Button.Accessibility | Back to chat feed | Accessibility text for hitting the back button on form message submission screen | | SMI.Form.Message.Exit.Screen.Title | Leave the form? | The main title for the secure form exit confirmation screen. | | SMI.Form.Message.Exit.Screen.Subtitle | After leaving the form, you can open it again in the messaging window. However, your progress isn\'t saved. | The subtitle for the secure form exit confirmation screen. | | SMI.Form.Message.Exit.Screen.Confirm | Leave Form | The leave form button for the secure form exit confirmation screen. | | SMI.Form.Message.Exit.Screen.Cancel | Cancel | The cancel button text for the secure form exit confirmation screen | | SMI.Form.Message.Result.Success | Form Submitted | The message shown in the chat bubble when a form has been successfully submitted. | | SMI.Form.Message.Result.Submitting | Form Submitting | The message shown in the chat bubble when a form is submitting. | | SMI.Form.Message.Result.Error | Error Submitting Form | The message shown in the chat bubble when a form fails to submit. | | SMI.Form.Message.Required.Accessibility | %@ is required | The accessibility string for the form message field if the field is required | | SMI.Form.Message.Required | %@ \* | The string for a form message field label if the field is required | | SMI.Form.Message.Text.Invalid.Email | Not a valid email | The string that is displayed below a form entry that indicates an invalid email has been entered. | | SMI.Form.Message.Text.Invalid.Url | Not a valid url | The string that is displayed below a form entry that indicates an invalid url has been entered. | | SMI.Form.Message.Text.Input.Required.Message | This field is required | The string that is displayed below a form entry that indicates this item is required. | | SMI.Form.Message.Option.Required.Message | One or more options required | The string that is displayed below a form entry that indicates this item is required. | | SMI.Form.Message.Divider | %1$d/%2$d | The divider for the form message text field character counter | | SMI.Form.Message.Text.Input.Accessibility | %@ double tap to edit | The accessibility message for the grouped form text input | | SMI.Form.Message.Text.Input.Required.Accessibility | %@ is required. Double tap to edit | The accessibility message for the group form text required input | | SMI.Form.Message.Screen.Accessibility | %@ Screen | The accessibility message is shown when a new screen is displayed in the form input | | SMI.Form.Message.Option.Selected.Accessibility | %@ option selected | The accessibility message for a selected option in the form options menu | | SMI.Form.Error.Accessibility | %1$@ input. Error %2$@. | Accessibility readout for form errors. The first parameter is the form field label. The second parameter is the error message on the field. | ## Carousel | **Keyword** | **Default Value** | **Description** | | -------------------------------------------- | ----------------------- | ---------------------------------------------------------------------------------------- | | SMI.Carousel.Image.Placeholder.Accessibility | Empty Carousel image | A placeholder icon to indicate there is no image for a carousel option. | | SMI.Carousel.Selected.Icon.Accessibility | Option selected | An icon to indicate that an option has been selected for a carousel message. | | SMI.Carousel.Image.Accessibility | Carousel image | The default image content description for a carousel option, if no description is given. | | SMI.Carousel.Indicator.Accessibility | Page %1$d of %2$d | Accessibility label for the carousel indicator | | SMI.Carousel.Indicator.Dot.Accessibility | Go to page %1$d of %2$d | Accessibility label for individual carousel indicator dots | ## Request Transcript | **Keyword** | **Default Value** | **Description** | | ----------------------------------------- | ---------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | | SMI.Transcript.Request.Button | Request Chat Transcript | The title of the request transcript button in the participant client menu. | | SMI.Transcript.Title | Chat Transcript | The title of the request transcript screen. | | SMI.Transcript.Leave.Button | Leave | The leave button on the leave transcript screen. This screen warns the user that if they leave without saving, the transcript is lost. | | SMI.Transcript.Cancel.Button | Cancel | The cancel button on the leave transcript screen. This screen warns the user that if they leave without saving, the transcript is lost. | | SMI.Transcript.Leave.Title | Leave Transcript | Title of the leave transcript screen. This screen warns the user that if they leave without saving, the transcript is lost. | | SMI.Transcript.Leave.Subtitle | Be sure to save the transcript before leaving. | Subtitle of the leave transcript screen. This screen warns the user that if they leave without saving, the transcript is lost. | | SMI.Transcript.Save.Button.Accessibility | Save Transcript | The accessibility string for the save transcript button. | | SMI.Transcript.Share.Button.Accessibility | Share Transcript | The accessibility string for the share transcript button. | | SMI.Transcript.Error.Message | Something went wrong. Please try again later. | Error message to display on the error screen when the transcript fails to download from the server. | | SMI.Transcript.Alert.Save.Failed | Save failed | Message to display when the request transcript fails to save on the device. | | SMI.Transcript.Alert.Save.Succeed | Save was successful | Message to display when a request transcript successfully saves on the device. | | SMI.Transcript.Alert.Title | Save | The title of the alert that is shown after an attempt to save a request transcript on the device. | | SMI.Transcript.Alert.Button.Title | Ok | The text for the confirm button in the alert shown after an attempt to save a request transcript on the device. | | SMI.Transcript.Back.Accessibility | Back to options menu | Accessibility text for the back button in request transcripts. | ## End Chat Session | **Keyword** | **Default Value** | **Description** | | --------------------------------- | --------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | | SMI.End.Chat.Menu.Button | End Chat | The title of the end chat button in the participant client menu. | | SMI.End.Chat.Title | End Chat? | The title label on the end chat confirmation page. | | SMI.End.Chat.Subtitle | Are you sure you want to end the chat session? You will be disconnected from the agent. | The subtitle label on the end chat confirmation page. | | SMI.End.Chat.Confirmation.Button | End Chat | The end chat button label on the confirmation page. | | SMI.End.Chat.Cancel | Cancel | The cancel button label on the confirmation page. | | SMI.End.Chat.Error.Message | Something went wrong. Please try again later. | Error message to display on the end chat confirmation page when there is an issue ending the chat | | SMI.Fallback.Message.Close.Button | Close | The close button label on the fallback message page. | ## Streaming Tokens | **Keyword** | **Default Value** | **Description** | | ----------------------------------- | --------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | | SMI.Streaming.Text.Cursor | ▏ | The cursor to display while text is streaming in. | | SMI.Streaming.Message.Accessibility | The bot is responding | Accessibility readout for when a message is being streamed in. | | SMI.Citation.Inline.Title | \\[%d\\] | A string template for inline citations. Takes an integer representing the citation number. | | SMI.Citation.Source.Button.Title | [%1$d] %2\$@ | A string template for citation source button. Takes an integer representing the citation number and a string representing the url title | # Customize Text Message Bubbles Customize the style of your message bubbles to match your brand’s unique look by using custom Lightning web components (LWC). This customization applies only to the message bubble. It won’t help you customize the avatar or any items around the bubble, such as read/delivery receipts, timestamps, or the resend function. 1. Create an LWC bundle. See [_Salesforce Trailhead_: Build Lightning Web Components](https://trailhead.salesforce.com/content/learn/trails/build-lightning-web-components). In the example, the bundle is called `customTextMessageBubble`. 2. In the configuration file, add `lightningSnapin__MessagingTextMessageBubble` as a target. Adding it as a target makes the LWC component available for selection in the Custom UI Components setting under Embedded Service Deployments in Setup. See [Customize your UI with Lightning Web Components](https://help.salesforce.com/s/articleView?id=service.messaging_lightning_web_components.htm). ```xml 59.0 true lightningSnapin__MessagingTextMessageBubble ``` 3. Edit the HTML file to add a Lightning formatted rich text tag with the value `textContent`. ```html ``` 4. Specify a function that returns the sender metadata and the text content of the conversation. ```javascript import { api, LightningElement } from "lwc"; const MESSAGE_CONTENT_CLASS = "embedded-messaging-message-content"; const ENDUSER = "EndUser"; const AGENT = "Agent"; const CHATBOT = "Chatbot"; const PARTICIPANT_TYPES = [ENDUSER, AGENT, CHATBOT]; export default class CustomTextMessageBubble extends LightningElement { /** * Deployment configuration data. * @type {Object} */ @api configuration; /** * Conversation entry data. * @type {Object} */ @api conversationEntry; /** * Returns the sender of this conversation entry. * @returns {string} */ get sender() { return this.conversationEntry.sender && this.conversationEntry.sender.role; } /** * Returns the text content of the conversation entry. * @returns {string} */ get textContent() { try { const entryPayload = JSON.parse(this.conversationEntry.entryPayload); if ( entryPayload.abstractMessage && entryPayload.abstractMessage.staticContent ) { const text = entryPayload.abstractMessage.staticContent.text; return text.replace( // innerText or textContent /(?:(?:ht|f)tp(?:s?)\:\/\/|~\/|\/)?(?:\w+:\w+@)?((?:(?:[-\w\d{1-3}]+\.)+(?:com|org|net|gov|mil|biz|info|mobi|name|aero|jobs|edu|co\.uk|ac\.uk|it|fr|tv|museum|asia|local|travel|[a-z]{2}))|((\b25[0-5]\b|\b[2][0-4][0-9]\b|\b[0-1]?[0-9]?[0-9]\b)(\.(\b25[0-5]\b|\b[2][0-4][0-9]\b|\b[0-1]?[0-9]?[0-9]\b)){3}))(?::[\d]{1,5})?(?:(?:(?:\/(?:[-\w~!$+|.,=]|%[a-f\d]{2})+)+|\/)+|\?|#)?(?:(?:\?(?:[-\w~!$+|.,*:]|%[a-f\d{2}])+=?(?:[-\w~!$+|.,*:=]|%[a-f\d]{2})*)(?:&(?:[-\w~!$+|.,*:]|%[a-f\d{2}])+=?(?:[-\w~!$+|.,*:=]|%[a-f\d]{2})*)*)*(?:#(?:[-\w~!$ |\/.,*:;=]|%[a-f\d]{2})*)?/g, function (imgUrl) { // Only switch out to specific shortened urls if the agent is the user. if (this.sender === AGENT) { // If the url is a specific link, then return a custom shortened link. if ( imgUrl === "https://www.test.com/specificLink" || imgUrl === "https://www.test.com/anotherSpecificLink" ) { return `View Link`; } // Otherwise just shorten to a generic link "View Article". return `View Article`; } return imgUrl; }.bind(this), ); } return ""; } catch (e) { console.error(e); } } /** * Returns the class name of the message bubble. * @returns {string} */ get generateMessageBubbleClassname() { if (this.isSupportedSender()) { return `${MESSAGE_CONTENT_CLASS} ${this.sender}`; } else { throw new Error(`Unsupported participant type passed in: ${this.sender}`); } } /** * True if the sender is a support participant type. * @returns {Boolean} */ isSupportedSender() { return PARTICIPANT_TYPES.some( (participantType) => this.sender === participantType, ); } } ``` 5. Specify the style of the message bubble in the CSS file. The code sample sets the font size to 0.875em and adds different styles to the rep and end-user message bubbles. ```css :host { display: block; } .Agent, .Chatbot { color: #FFFFFF; background-color: #066AFE; border-radius: 10px 10px 10px 0; float: left; padding: 0.5em; } .EndUser { background-color: #EEF4FF; color: black; margin-left: auto; padding: 0.5em; border-radius: 10px 10px 0 10px; } lightning-formatted-text { font-size: 0.875em; } ``` 6. Deploy the LWC to your org. See [_Salesforce Developer Guide_: Introducing Lightning Web Components](https://developer.salesforce.com/docs/component-library/documentation/en/lwc). 7. Add the LWC to your Embedded Service Deployment. See [_Salesforce Help_: Customize Your UI with Lightning Web Components](https://help.salesforce.com/s/articleView?id=service.messaging_lightning_web_components.htm). To get custom LWC configuration details, see [_Salesforce Developer Guide_: Get Custom Lightning Web Components Configuration Details](https://developer.salesforce.com/docs/service/messaging-web/references/m4w-reference/customComponents.html). # Customize the Default UI for Android The UI SDK automatically brands the app with a default color scheme, provides icons for all UI elements, and uses default text for all UI labels. However, you can customize these elements with the UI SDK. This article applies to the following implementations: | UI SDK | Core SDK | | :----: | :------: | | ✅ | | - To customize the color scheme in your app, create a color resource file in your app using the SDK's token names. To learn more, see [Customize Colors for Android](https://developer.salesforce.com/docs/service/messaging-in-app/guide/android-colors.md). - To customize any UI text, create a `strings.xml` resource file in your app using the SDK's resource names. To learn more, see [Customize Strings for Android](https://developer.salesforce.com/docs/service/messaging-in-app/guide/android-strings.md). - To customize the icons and images used throughout the SDK, add a drawable asset to your project using the associated keyword. To learn more, see [Customize Icons for Android](https://developer.salesforce.com/docs/service/messaging-in-app/guide/android-icons.md). To learn how to start using the UI SDK, see [Build a UI SDK App for Android](https://developer.salesforce.com/docs/service/messaging-in-app/guide/android-ui-sdk.md). # Customize the Default UI for iOS The UI SDK automatically brands the app with a default color scheme, provides icons for all UI elements, and uses default text for all UI labels. However, you can customize these elements with the UI SDK. This article applies to the following implementations: | UI SDK | Core SDK | | :----: | :------: | | ✅ | | - To customize the color scheme in your app, create color sets in your Assets catalog using the SDK's token names. To learn more, see [Customize Colors for iOS](https://developer.salesforce.com/docs/service/messaging-in-app/guide/ios-colors.md). - To customize any UI text, create a localizable resource file in your app and override the string values. To learn more, see [Customize Strings for iOS](https://developer.salesforce.com/docs/service/messaging-in-app/guide/ios-strings.md). - To customize the icons and images used throughout the SDK, add an asset to your project's Assets catalog using the associated keyword. To learn more, see [Customize Icons for iOS](https://developer.salesforce.com/docs/service/messaging-in-app/guide/ios-icons.md). To learn how to start using the UI SDK, see [Build a UI SDK App for iOS](https://developer.salesforce.com/docs/service/messaging-in-app/guide/ios-ui-sdk.md). # Customize the Destination List for Messaging Session Transfers Customize the list of transfer destinations to only show the destination types that apply when transferring Bring Your Own Channel for CCaaS Messaging sessions from the Conversation component. These instructions are for implementations with partner-owned routing (`ConversationChannelDefinition.routingOwner` is `Partner`). During an in-progress Messaging session, reps can transfer a Messaging end user to any of these transfer destination types: - Queue - Reps - Flow - External contacts ![Select a transfer destination type](https://developer.salesforce.com/docs/media/messaging-byoc-ccaas/byoc-ccaas-transfer-conversation-v2.png '{"class": "image-sm"}') By default, the widget displays all transfer destination types, giving reps the option to transfer a conversation to a specific rep, queue, flow, or external contact. To customize the list so that only certain transfer destination types appear, using the Service Connector API, set the value of [contactTypes in ContactsResult](/docs/service/service-connector-api/references/connector-api/service-connector-objects-contactsresult.html) to the list of transfer destination types you want to appear in the Omni-Channel widget. If `contactTypes` isn’t set, all transfer destination types are listed in the widget for reps to pick from. **See Also** - [Dynamically Control Messaging Actions](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/control-messaging-actions.md) - _Salesforce Help_: [Transfer a Messaging Session](https://help.salesforce.com/s/articleView?id=service.livemessage_agent_transfer_session.htm) - _Service Connector API Reference_: [ContactsResult](/docs/service/service-connector-api/references/connector-api/service-connector-objects-contactsresult.html) # Customize the Messaging Conversation Window Header Using LWC You can customize the messaging conversation window header using a custom conversation header Lightning Web Component (LWC). These steps show you how to create a messaging conversation window header using a custom LWC. The sample code creates a header, as shown in the screenshot. The code includes: - A header with a custom logo - A header menu with the configured bot options, plus an End Conversation option. See [Add a Bot Options Menu to the Chat Window](https://help.salesforce.com/s/articleView?id=service.bots_service_bot_options_menu.htm). - A minimize button We left these features out of this example to keep the sample code short, but you can add them later to your LWC with your own custom code. - Header announcements - Accessibility - Right-to-left language handling - A minimize button in the mobile version’s header—In the browser, you can minimize the window with the default floating action button, but the mobile version doesn’t have that. ![Custom messaging conversation window header](https://developer.salesforce.com/docs/media/messaging-web/custom-header-using-lwc.png '{"class": "image-sm image-framed"}') 1. Create an LWC bundle. See [_Salesforce Trailhead_: Build Lightning Web Components](https://trailhead.salesforce.com/content/learn/trails/build-lightning-web-components). Let's call our example bundle customHeader. 2. In the customHeader.js-meta.xml configuration file of your LWC, specify the `lightningSnapin__MessagingHeader` target. You add this target to the configuration file so you can see the LWC in your Enhanced Web Chat experience. In other words, adding this target makes the LWC available for selection in Custom UI Components in Embedded Service Deployments in Setup. See [Customize your UI with Lightning Web Components](https://help.salesforce.com/s/articleView?id=service.messaging_lightning_web_components.htm). ```xml 60.0 true lightningSnapin__MessagingHeader ``` 3. In the customHeader.js file, use these methods to customize the header. 1. To connect your custom component to Embedded Service, import the `dispatchMessagingEvent`, `assignMessagingEventHandler`, and `MESSAGING_EVENT` methods from the public event store `lightningsnapin/eventStore`. ```javascript import { dispatchMessagingEvent, assignMessagingEventHandler, MESSAGING_EVENT } from "lightningsnapin/eventStore"; ``` 2. To dispatch a Messaging event, use `dispatchMessagingEvent`. See [Messaging Conversation Window Header Events](https://developer.salesforce.com/docs/service/messaging-web/guide/customize-header-events.md) dfor all available Messaging header events. ```javascript /** * Dispatch all public event handlers with data for a given event. * @param {String} eventName - Name of event to dispatch. Can't be null. * @param {Object} eventData - Data to pass to each event handler. * Can't be null. Use empty object {} if you're passing no data. */ dispatchMessagingEvent(eventName, eventData); ``` 3. To listen to a Messaging event, use `assignMessagingEventHandler`. ```javascript /** * Assign a public event handler for an event. * @param {String} eventName - Name of the event to assign a handler. * @param {Function} eventHandler - Function to assign to the event. */ assignMessagingEventHandler(eventName, eventHandler); ``` ```javascript import { LightningElement, api } from "lwc"; import { dispatchMessagingEvent, assignMessagingEventHandler, MESSAGING_EVENT } from "lightningsnapin/eventStore"; const SLDS_MENU_SELECTOR = "slds-dropdown-trigger slds-dropdown-trigger_click"; export default class ChatHeader extends LightningElement { /** * Deployment configuration data. * @type {Object} */ @api configuration = {}; /** * The status of the conversation. Valid values: * - NOT_STARTED * - OPEN * - CLOSED * @type {ConversationStatus} */ @api conversationStatus; /** * Class name for header menu. * @type {String} */ menuClass = SLDS_MENU_SELECTOR; /** * Array to store bot options menu. * @type {Array} */ chatbotOptionsMenu = []; /** * Whether the use is authenticated. * AuthMode can have the following values: * - Auth: user is in verified, which corresponds to the authenticated user mode. * - UnAuth: user is in unverified, which corresponds to the guest user mode. */ get isAuthenticatedContext() { return this.configuration.embeddedServiceMessagingChannel.authMode === "Auth"; } /** * Whether to show the back button. * @type {Boolean} */ showBackButton = false; /** * Whether to show the header menu button. * @returns {Boolean} */ get showMenuButton() { return this.conversationStatus === "OPEN"; } /** * Whether to show the header menu. * @type {Boolean} */ _showMenu = false; get showMenu() { return this._showMenu; } set showMenu(shouldShow) { this.menuClass = SLDS_MENU_SELECTOR + (shouldShow ? " slds-is-open" : ""); this._showMenu = shouldShow; } /** * Whether to show the close button. * @returns {Boolean} */ get showCloseButton() { return this.conversationStatus !== "OPEN"; } /** * Handle back button click. */ onBackButtonClick() { dispatchMessagingEvent(MESSAGING_EVENT.BACK_BUTTON_CLICK, {}); } /** * Handle menu button click. */ onMenuButtonClick() { this.showMenu = !this.showMenu; } /** * Handle minimize button click. */ onMinimizeButtonClick() { dispatchMessagingEvent(MESSAGING_EVENT.MINIMIZE_BUTTON_CLICK, {}); } /** * Handle close button click. */ onCloseButtonClick() { dispatchMessagingEvent(MESSAGING_EVENT.CLOSE_CONTAINER, {}); } /** * Handle end conversation button click. */ onMenuOptionClick(event) { event.preventDefault(); dispatchMessagingEvent(MESSAGING_EVENT.MENU_ITEM_SELECTED, { selectedOption: this.chatbotOptionsMenu.find(option => option.optionIdentifier === event.target.getAttribute("value")) }); this.showMenu = false; } /** * Handle end chat button click. * * Ending a messaging session is only supported for verified users. * Ending a conversation is only supported for unverified users. */ onEndChatClick() { if (this.isAuthenticatedContext) { this.configuration.util.endSession(); } else { dispatchMessagingEvent(MESSAGING_EVENT.CLOSE_CONVERSATION, {}); } this.showMenu = false; } connectedCallback() { assignMessagingEventHandler(MESSAGING_EVENT.PARTICIPANT_JOINED, (data) => { console.log(`Participant joined`); if (data.options && Array.isArray(data.options)) { data.options.forEach((participantOption) => { this.chatbotOptionsMenu.push(participantOption); }); } }); assignMessagingEventHandler(MESSAGING_EVENT.PARTICIPANT_LEFT, (data) => { console.log(`Participant left`); this.chatbotOptionsMenu = []; }); assignMessagingEventHandler(MESSAGING_EVENT.UPDATE_HEADER_TEXT, (data) => { console.log(`Update header text: ${data.text}`); }); assignMessagingEventHandler(MESSAGING_EVENT.TOGGLE_BACK_BUTTON, (data) => { console.log(`Toggle back button visibility.`); this.showBackButton = data.showBackButton; }); } } ``` 4. In the customHeader.html file, add all the header components and buttons to render in the UI. ```html ``` 5. In the customHeader.css file, customize the UI style of the header components and buttons. ```css :host { width: 100%; max-width: 100%; min-height: 50px; display: flex; align-items: center; box-sizing: border-box; position: relative; padding: 0 14px; height: 50px; max-height: 50px; background-color: black; } img { margin-right: 4px; max-height: 40px; max-width: 40px; } h2 { margin: 0; text-align: initial; align-self: center; flex-grow: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: lighter; font-size: inherit; color: white; } .headerButton { background: none; border: none; display: inline-flex; height: 32px; min-height: 32px; width: 32px; min-width: 32px; align-items: center; justify-content: center; } .headerButton:hover:before { content: " "; position: absolute; top: 9px; width: 32px; height: 32px; background-color: #fff; opacity: .2; border-radius: 4px; box-sizing: border-box; pointer-events: none; } .headerButton.menuButton:hover:before { top: 0; } .headerButton.closeButton:hover:before { right: 14px; } lightning-icon { fill: white; } .optionsMenu { width: 100vw; left: -0.9rem; } .optionsMenu > .slds-dropdown__list { max-height: 20rem; overflow-y: auto; } .slds-nubbin_top-left:before, .slds-nubbin_top-left:after { left: 2rem; top: -0.5rem; } .slds-dropdown { max-width: 30rem; } .slds-dropdown__item > button { position: relative; z-index: 100; padding: 0.75rem 1rem; background-color: #ffffff; border: 0; display: flex; width: 100%; } .slds-dropdown__item > button:focus, .slds-dropdown__item > button:hover { outline: 0; text-decoration: none; background-color: #e5e5e5; } .slds-dropdown__list > .slds-dropdown__item:not(:first-child) { border-top: #e2e2e2 1px solid; } .slds-dropdown__item .slds-truncate:not(.closeConversation) { color: #005290; } ``` 6. Deploy the LWC to your org. See [_Salesforce Developer Guide_: Introducing Lightning Web Components](https://developer.salesforce.com/docs/component-library/documentation/en/lwc). 7. Add the LWC to your Embedded Service Deployment. See [_Salesforce Help_: Customize Your UI with Lightning Web Components](https://help.salesforce.com/s/articleView?id=service.messaging_lightning_web_components.htm). To get custom LWC configuration details, see [_Salesforce Developer Guide_: Get Custom Lightning Web Components Configuration Details](https://developer.salesforce.com/docs/service/messaging-web/references/m4w-reference/customComponents.html) # Customize Your Lightning Pages with the Actions & Recommendations Component The Actions & Recommendations component displays RecordActions associated to the parent record. Add the component to your Lightning pages so that users can see the actions that they can take. ## Before You Begin **note:** You can add the Actions & Recommendations component to Lightning console and standard navigation pages for most objects. To learn about supported objects, see [Supported Apps, Channels, and Objects](https://developer.salesforce.com/docs/service/salesforce-guided-engagement/guide/guided-engagement-support.md). First, plan out your user’s experience. When do you want users to see the component? What records will your users be on? What other information do you want your users to see on the page? After you identify a record page to edit, create a custom Lightning page for it using one of the pinned region templates available in the Lightning App Builder. The pinned region page allows you to display the Actions & Recommendations component while flows open in subtabs for console apps. ## Steps 1. Before you add the component to your record pages, [create an Actions & Recommendations deployment](https://help.salesforce.com/articleView?id=console_lex_guided_action_deployment.htm). 2. Add the component to your pages. In the Lightning App Builder, drag the Actions & Recommendations component to a pinned region on a page. For the Service Console app, we recommend adding the component to the left pinned sidebar. 3. Select the deployment in component properties. ![Add the component to your page and select the deployment in component properties.](https://developer.salesforce.com/docs/media/guided_action_deployment_lab.png) If you don’t select a deployment, no actions appear when the user clicks Add. In addition, the component is empty unless other RecordActions exist for the record. 4. Save your Lightning page. If needed, activate the page and assign it to your app. **See Also** - [_Salesforce Help_: Create and Configure Lightning Experience Record Pages](https://help.salesforce.com/articleView?id=lightning_app_builder_customize_lex_pages.htm) # Data Category Detail Gets data category details and the child categories by a given category. This resource can be used in API version 38.0 and later. Salesforce Knowledge must be enabled in your organization. Use the language code format used in [Which Languages Does Salesforce Support?](https://help.salesforce.com/apex/HTViewHelpDoc?id=faq_getstart_what_languages_does.htm). ## URI `/services/data/v{XX.X}/support/dataCategoryGroups/{group}/dataCategories/{category}` ## Method GET ## Formats JSON, XML ## Authentication `Authorization: Bearer {token}` ## HTTP Headers **Accept:** Optional. Can be either `application/json` or `application/xml`. **Accept-language:** Optional. Language to translate the categories. Any ISO-639 language abbreviation, and an ISO-3166 country code subtag in the HTTP Accept-Language header. Only one language accepted. If no language specified, the non-translated labels are returned. ## Input string `sObjectName`: Required. `KnowledgeArticleVersion` only. ## Output Details of the category and a list of child categories (name, label, etc.). **Data Category Detail** Used for situations where the hierarchical representation of data categories is important. The child property contains a list of child data categories. ```nolang { "name": String, // the unique name of the category "label": String, // returns the translated version if it is available "url": URL, "childCategories": [ Data Category Summary, ....], } ``` **note:** If the category isn't visible to the current user the return is empty. ## Example Request ```nolang curl https://MYDOMAINNAME.my.salesforce.com/services/data/v66.0/support/dataCategoryGroups/Doc/dataCategories/All?sObjectName=KnowledgeArticleVersion -H "Authorization: Bearer token" ``` ## Example Response Body ```nolang { "childCategories" : [ { "childCategories" : null, "label" : "Help", "name" : "Help", "url" : "/services/data/v66.0/support/dataCategoryGroups/Doc/dataCategories/Help?sObjectName=KnowledgeArticleVersion" }, { "childCategories" : null, "label" : "QA", "name" : "QA", "url" : "/services/data/v66.0/support/dataCategoryGroups/Doc/dataCategories/QA?sObjectName=KnowledgeArticleVersion" } ], "label" : "All", "name" : "All", "url" : "/services/data/v66.0/support/dataCategoryGroups/Doc/dataCategories/All?sObjectName=KnowledgeArticleVersion" } ``` # Data Category Groups Get data category groups that are visible to the current user. This resource is available in REST API version 38.0 and later. Salesforce Knowledge must be enabled in your organization. This resource can be used in API version 38.0 and later. Use the language code format used in [Which Languages Does Salesforce Support?](https://help.salesforce.com/apex/HTViewHelpDoc?id=faq_getstart_what_languages_does.htm). Only the user's visible data categories are returned. A user might be able to see several sub trees in the category group, therefore, the top categories that are visible to the user in each group are returned. ## URI `/services/data/v{XX.X}/support/dataCategoryGroups` ## Method GET ## Formats JSON, XML ## Authentication `Authorization: Bearer {token}` ## HTTP Headers **Accept:** Optional. Can be either `application/json` or `application/xml`. **Accept-language:** Optional. Language to translate the categories. Any ISO-639 language abbreviation, and an ISO-3166 country code subtag in the HTTP Accept-Language header. Only one language accepted. If no language specified, the non-translated labels are returned. ## Input string `sObjectName`: Required. `KnowledgeArticleVersion` only. boolean `topCategoriesOnly`: Optional. Defaults to true: - True returns only the top level categories. - False returns the entire tree. **note:** All the input parameters are case-sensitive. ## Output A list of the active data category groups that are visible to the current user in the site context. Returns id, name, label, and their top level categories or the entire data category group tree that are visible to the current user. The labels must be translated to the given language if they are available. **Data Category Group List** This payload lists the active root Data Category Groups that can be used in other requests to return the data categories and articles related to it. ```nolang { "categoryGroups": [ Data Category Group, ....], } ``` **note:** Returns only the active groups that are associated to the given entity (by `sObjectName`). Only `KnowledgeArticleVersion` is supported. **Data Category Group** This represents an individual data category group, and its root category. ```nolang { "name": String, // the unique name of the category group "label": String, // returns the translated version if it is available "objectUsage" : String, // currently only "KnowledgeArticleVersion" is available. "topCategories": [ Data Category Summary, ....] } ``` **Data Category Summary** This provides a summary of data category information. The Summary and Detail responses share common properties, with the goal of providing only as much information as is necessary from associated resources. ```nolang { "name": String, // the unique name of the category "label": String, // returns the translated version if it is available "url": URL, // the url points to the data category detail API "childCategories": [ Data Category Summary, ....] // null if topCategoriesOnly is true } ``` **note:** The URL property is a pre-calculated path to the unique resource representing this data category, in this case it is a [Data Category Detail](https://developer.salesforce.com/docs/service/salesforce-knowledge-dev-guide/guide/resources-knowledge-support-dcdetail.md) API. ## Example Request ```nolang curl https://MYDOMAINNAME.my.salesforce.com/services/data/v66.0/support/dataCategoryGroups?sObjectName=KnowledgeArticleVersion -H "Authorization: Bearer TOKEN" ``` ## Example Response Body ```nolang { "categoryGroups" : [ { "label" : "Doc", "name" : "Doc", "objectUsage" : "KnowledgeArticleVersion", "topCategories" : [ { "childCategories" : null, "label" : "All", "name" : "All", "url" : "/services/data/v66.0/support/dataCategoryGroups/Doc/dataCategories/All?sObjectName=KnowledgeArticleVersion" } ] }, { "label" : "Manual", "name" : "Manual", "objectUsage" : "KnowledgeArticleVersion", "topCategories" : [ { "childCategories" : null, "label" : "All", "name" : "All", "url" : "/services/data/v66.0/support/dataCategoryGroups/Manual/dataCategories/All?sObjectName=KnowledgeArticleVersion" } ] } ] } ``` # Data Protection and Security in the Service Chat SDK for Android The Service Chat SDK does not collect or store personal data from its users. We ensure that data is secure both locally and when in transit. **important:** 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](https://help.salesforce.com/s/articleView?id=service.miaw_intro_landing.htm&type=5) before that date. Messaging offers many of the [chat features](https://help.salesforce.com/s/articleView?id=service.miaw_chat_vs_messaging.htm&type=5) that you love plus asynchronous conversations that can be picked back up at any time. Learn about chat retirement in [Help](https://help.salesforce.com/s/articleView?id=001790618&type=1). - **Secure data at rest**. We don't store personal data about the user. We manage keys using the Android Keystore. All content fetched from Salesforce servers is stored locally using AES-256 encryption. - **Secure data in transit**. All network communication occurs over SSL using TLS 1.2. # Data Protection and Security in the Service Chat SDK for iOS The Service Chat SDK does not collect or store personal data from its users. We ensure that data is secure both locally and when in transit. **important:** 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](https://help.salesforce.com/s/articleView?id=service.miaw_intro_landing.htm&type=5) before that date. Messaging offers many of the [chat features](https://help.salesforce.com/s/articleView?id=service.miaw_chat_vs_messaging.htm&type=5) that you love plus asynchronous conversations that can be picked back up at any time. Learn about chat retirement in [Help](https://help.salesforce.com/s/articleView?id=001790618&type=1). - **Secure data at rest**. We don't store personal data about the user. We manage keys using iOS Keychain Services. All content fetched from Salesforce servers is stored locally using AES-128 encryption. When the user logs out, we remove all user-specific data from the device. - **Secure data in transit**. All network communication occurs over SSL using TLS 1.2. # Database Server Represents a Database Server configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Server. ## Configuration Item Type Definition ||| |-|-| |Name|Database Server| |Developer Name|`SD_DaSe`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Server](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-server.md)| |Rule Name|Default rule for all RFID Readers| |Identifier(s)|MAC address| ## Attributes No associated attributes for this configuration item type. # Database Systems Represents a Database Systems configuration item in the Configuration Management Database (CMDB). ## Configuration Item Type Definition ||| |-|-| |Name|Database Systems| |Developer Name|`SD_DaSy`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Base](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-base.md)| |Rule Name|Default rule for all Apache Web Servers| |Identifier(s)|IP Address Process Name Server Port| ## Attributes ### Host Name - **Type**: text - **Developer Name**: `SD_HoNa` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The host name of the Database Systems. - **Required**: Optional ### Local FQDN - **Type**: text - **Developer Name**: `SD_LoFq` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The local fqdn of the Database Systems. - **Required**: Optional ### Server Port - **Type**: text - **Developer Name**: `SD_SePo` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The server port of the Database Systems. - **Required**: Optional # dataCategorySelection The syntax of the data category selection in a `WITH DATA CATEGORY` clause in a SOQL query includes a category group name to use as a filter, the filter selector, and the name of the category to use for filtering. The _dataCategorySelection_ uses the following syntax: ```soql DATACATEGORYGROUPNAME FILTERINGSELECTOR DATACATEGORYNAME ``` | Syntax | Description | | ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | _dataCategoryGroupName_ | The name of the data category group to use as a filter. `Geography__c` is the data category group in the following example. You cannot use the same data category group more than once in a query. For example, the following command is incorrect: `WITH DATA CATEGORY Geography__c ABOVE usa__c AND Geography__c BELOW europe__c` | | _filteringSelector_ | The selector used to filter the data in the specified data category. See [Filtering Selectors](#filtering-selectors) for a list of valid selectors. | | _dataCategoryName_ | The name of the data category for filtering. You must have visibility on the category you specify. You can use parentheses to apply the filtering operator to more than one data category; each data category must be separated by a comma. For example: `WITH DATA CATEGORY Geography__c AT (usa__c,france__c,uk__c)`. You can't use the `AND` operator instead of parentheses to list multiple data categories. The following syntax does not work: `WITH DATA CATEGORY Geography__c AT usa__c AND france__c` | ## Filtering Selectors When specifying filters for a `WITH DATA CATEGORY` clause of a SOQL query, you can use `AT` to select the specified category, `ABOVE` to select the category and all its parent categories, `BELOW` to select the category and all its subcategories, and `ABOVE_OR_BELOW` to select the category, its parent categories, and its subcategories. The examples in this section are based on the following data category group: ```nolang Geography__c ww__c northAmerica__c usa__c canada__c mexico__c europe__c france__c uk__c asia__c ``` This table lists the _filteringSelector_ values that are used in the [_dataCategorySelection_](https://developer.salesforce.com/docs/service/salesforce-knowledge-dev-guide/guide/sforce-api-calls-soql-select-with-datacategory-catselection.md) syntax. | Selector | Description | | ---------------- | ----------------------------------------------------------------------------------------- | | `AT` | Select the specified data category. | | `ABOVE` | Select the specified data category and all its parent categories. | | `BELOW` | Select the specified data category and all its subcategories. | | `ABOVE_OR_BELOW` | Select the specified data category, all its parent categories, and all its subcategories. | Example for `AT` — selects `asia__c`: ```soql WITH DATA CATEGORY Geography__c AT asia__c ``` Example for `ABOVE` — selects `usa__c`, `northAmerica__c`, and `ww__c`: ```soql WITH DATA CATEGORY Geography__c ABOVE usa__c ``` Example for `BELOW` — selects `northAmerica__c`, `usa__c`, `canada__c`, and `mexico__c`: ```soql WITH DATA CATEGORY Geography__c BELOW northAmerica__c ``` Example for `ABOVE_OR_BELOW` — selects `ww__c`, `europe__c`, `france__c`, and `uk__c`: ```soql WITH DATA CATEGORY Geography__c ABOVE_OR_BELOW europe__c ``` Here are some more examples of WITH DATA CATEGORY clauses in a SELECT statement in a SOQL query. | Type of Search | Examples | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Select the title from all questions classified with the `mobile_phones__c` data category in the `Product__c` data category group | `SELECT Title FROM Question WHERE LastReplyDate < 2005-10-08T01:02:03Z WITH DATA CATEGORY Product__c AT mobile_phones__c` | | Select the title and summary from all published Knowledge articles classified above or below `europe__c` in the `Geography__c` data category group and below `allProducts__c` in the `Product__c` data category group | `SELECT Title, Summary FROM KnowledgeArticleVersion WHERE PublishStatus='Online' AND Language = 'en_US' WITH DATA CATEGORY Geography__c ABOVE_OR_BELOW europe__c AND Product__c BELOW All__c` | | Select the ID and title from draft articles of type "Offer\_\_kav" classified with the `france__c`or`usa__c`data category in the`Geography__c`data category group and above the`dsl__c`data category in the`Product__` data category group | `SELECT Id, Title FROM Offer__kav WHERE PublishStatus='Draft' AND Language = 'en_US' WITH DATA CATEGORY Geography__c AT (france__c,usa__c) AND Product__c ABOVE dsl__c` | # Debugging Use your browser’s console and JavaScript error messages to debug Lightning pages built with the Lightning Console JavaScript API. Here are several recommendations on debugging your Lightning Console API code. ## Enable Debug Mode Debug mode prevents the minification of your JavaScript code, making it readable and easier to debug in the browser. Disable debug mode for users after you've finished troubleshooting as running Salesforce in debug mode can impact performance. For more information, see [Enable Debug Mode in Salesforce](https://developer.salesforce.com/docs/platform/lwc/guide/debug-mode-enable.html). ## Disable Caching To ensure that you code changes are reflected immediately, disable caching in Salesforce Setup. For more information, see [Disable Caching During Debugging](https://developer.salesforce.com/docs/platform/lwc/guide/debug-disable-caching.html). ## Use Chrome DevTools Your browser's built-in developer tools offer a robust set of features for debugging. For example, Chrome's Sources panel enables you to set breakpoints and pause on exceptions. To find your Aura component code, go to the Page pane of the Sources panel and view the lightning/n/components folder. To find your LWC code, go to the Page pane of the Sources panel and view the lightning/n/modules folder, or lws is Lightning Web Security is enabled. For more information, see [Debug Using Chrome DevTools](https://developer.salesforce.com/docs/platform/lwc/guide/debug-dev-tools.html). ## Enable Custom Formatters You can find debug information for wire adapters in Chrome's [custom object formatter](https://developer.salesforce.com/docs/platform/lwc/guide/debug-dev-tools.html#enable-custom-formatters). When using `@wire` for properties like `EnclosingTabId`, remember that the wired property returns an object with `data` and `error` properties. Check for `data` to ensure the data has been provisioned. ## Follow Standard Debugging Practices The methods in the Lightning Console JavaScript APIs are asynchronous and return their results using promises. You can use a `try` and `catch` block to handle responses and potential errors. Just like any programming issues, simplify the problem by creating a test component that replicates the issue you're facing. Review the Lightning Console JavaScript API documentation to understand the expected arguments, responses, and behaviors of the methods and wire adapters you're using. To print messages to your browser’s console, use `console.log()` in your component controller code. Alternatively, you can use other `console` methods such as `console.warn()` or `console.error()` to help you highlight potential issues. # declineAgentWork Declines a work item that’s assigned to an agent. Available in API versions 32.0 and later. ## Syntax ```javascript sforce.console.presence.declineAgentWork(workId:String, (optional) declineReason:String, (optional) callback:function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`workId`|String|The ID of the work item that the agent declines.| |`declineReason`|String|The provided reason for why the agent declined the work request.| |`callback`|function|JavaScript method to call when an agent declines the work item associated with the `workId`.| ## Sample Code–Visualforce ```apex_page Decline Assigned Work Item ``` ## Response This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following properties: |Name|Type|Description| |----|----|-----------| |`success`|Boolean|`true` if declining the work item was successful; `false` if declining the work item wasn’t successful.| # declineAgentWork for Lightning Experience Declines a work item that’s assigned to an agent. ## Arguments |Name|Type|Description| |----|----|-----------| |`workId`|string|The ID of the work item that the agent declines.| |`declineReason`|string|The reason that the agent declined the work request.| ## Sample Code Component code: ```html ``` Controller code: ```javascript ({ declineWork: function(cmp, evt, hlp) { var omniAPI = cmp.find("omniToolkit"); omniAPI.getAgentWorks().then(function(result) { var works = JSON.parse(result.works); var work = works[0]; omniAPI.declineAgentWork({workId: work.workId}).then(function(res) { if (res) { console.log("Declined work successfully"); } else { console.log("Decline work failed"); } }).catch(function(error) { console.log(error); }); }); } }) ``` ## Response This method returns a promise that, upon success, resolves to `true` and is rejected on error. # declineChat() Declines a chat request. Available in API version 29.0 or later. This method isn't supported with Omni-Channel in API version 37.0 or later. ## Syntax ```javascript sforce.console.chat.declineChat(chatKey:String, (optional)callback:Function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`chatKey`|String|The chat key for the request you wish to decline.| |`callback`|function|JavaScript method called upon completion of the method.| ## Sample Code–Visualforce ```apex_page Decline Chat ``` ## Response This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following properties: |Name|Type|Description| |----|----|-----------| |`success`|Boolean|`true` if declining the event was successful; `false` if declining the event wasn’t successful.| # Decrease the Size of Your App Although the SDK doesn't have a large footprint, you can decrease the size of your app by splitting your APK or by using ProGuard. **important:** 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](https://help.salesforce.com/s/articleView?id=service.miaw_intro_landing.htm&type=5) before that date. Messaging offers many of the [chat features](https://help.salesforce.com/s/articleView?id=service.miaw_chat_vs_messaging.htm&type=5) that you love plus asynchronous conversations that can be picked back up at any time. Learn about chat retirement in [Help](https://help.salesforce.com/s/articleView?id=001790618&type=1). The SOS SDK contains native libraries for a variety of architectures, so it can benefit from APK splitting. See the [Android documentation on splitting your APK](https://developer.android.com/studio/build/configure-apk-splits.html). You can also use [ProGuard](https://sourceforge.net/projects/proguard/) to shrink and optimize your app. Use the following ProGuard rules as a starting point. ```xml ################# ALL ################# # ------------------ OkHttp -------------------------- -dontwarn okio.** -dontwarn okhttp3.** -dontwarn javax.annotation.** -dontwarn org.conscrypt.** -keepnames class okhttp3.internal.publicsuffix.PublicSuffixDatabase # ------------------ SQLCipher ------------------------ # If you're only using Chat, you can remove the sqlcipher rules -keep class net.sqlcipher.** { *; } -dontwarn net.sqlcipher.** # ------------------ Gson ---------------------------- -keepclassmembers,allowobfuscation class * { @com.google.gson.annotations.SerializedName ; } ``` # Define How To Render Each Element Use the `ChatFeedViewBuilder` protocol to define how to render each chat feed element. 1. `none` renders an empty view. 2. `existing` renders our default view. 3. `replace` renders the view you provide. For the elements that you set to `replace`, you must provide a view to render instead of the default view. ``` struct MyEntryViewBuilder: ChatFeedViewBuilder { var renderMode: RenderModeClosure? { return { model in guard let entryModel = model as? ConversationEntryModel else { return .existing } switch entryModel.entry.type { case .participantChanged: if let changed = entryModel.entry.payload as? ParticipantChanged { if changed.operations.first?.type == .add { return .existing } else { return .none } } else { return .existing } default: return .replace } } } var completeView: CompleteViewClosure? { return { model, client in guard let entryModel = model as? ConversationEntryModel else { return Color.red } switch entryModel.entry.format { case .textMessage: return Color.green case .listPicker: return Color.yellow default: return Color.blue } } } } ``` The preceding example shows how you can use logic on the [`participantChanged`](https://salesforce-async-messaging.github.io/messaging-in-app-ios/documentation/smiclientcore/conversationentrytypes/participantchanged) event to set different render modes. It also shows how you can replace the [text messages](https://salesforce-async-messaging.github.io/messaging-in-app-ios/documentation/smiclientcore/conversationformattypes/textmessage) with a green bar and the [list pickers](https://salesforce-async-messaging.github.io/messaging-in-app-ios/documentation/smiclientcore/conversationformattypes/listpicker) with a yellow bar. Similarly, you can define your unique views or our default views for each chat element. # Define Your UI For Each Entry Type Define your UI for each entry type you replaced in the [Hide or Replace Messages in a Chat Feed](https://developer.salesforce.com/docs/service/messaging-in-app/guide/android-hide-replace-entries.md#replace-all-entries-of-a-certain-type) section. ## Sample Code for Defining Your Own UI for the Text Message Entry Type ``` @Composable internal fun TextMessageReplacementEntry( isLocal: Boolean, text: String? ) { val shape = RoundedCornerShape(16) ReplacementMessageContainer(isLocal = isLocal) { Card( modifier = Modifier .wrapContentSize() .border(shape = shape, width = 1.dp, color = Color.Green), shape = shape ) { Box( contentAlignment = Alignment.Center, modifier = Modifier .wrapContentSize(), ) { Text( text = text ?: "", color = Color.Green, modifier = Modifier.padding(horizontal = 30.dp, vertical = 10.dp), ) } } } } ``` ## Sample Code for Defining Your Own UI for the Choices Message Entry Type ``` @Composable internal fun DisplayableOptionsReplacementEntry( title: String, optionItems: List, onSelection: ((OptionItem) -> Unit) ) { val shape = RoundedCornerShape(16) Card( modifier = Modifier .wrapContentSize() .border(shape = shape, width = 1.dp, color = Color.Green), shape = shape ) { Text( modifier = Modifier.fillMaxWidth().padding(16.dp), text = title, color = Color.Green ) optionItems.forEach { TextButton( modifier = Modifier.fillMaxWidth().border(1.dp, Color.Green, shape), onClick = { onSelection(OptionItem.SelectionsOptionItem(it.optionId)) } ) { Text(text = (it.titleItem.title), color = Color.Green) } } } } ``` In the [Replace All Entries](https://developer.salesforce.com/docs/service/messaging-in-app/guide/android-hide-replace-entries.md#replace-all-entries-of-a-certain-type) section, ‌this code snippet intercepts the reply and sends it by using the `ConversationClient`. ``` CoroutineScope(Dispatchers.Main).launch { conversationClient?.sendReply(it) } ``` In the sample code for defining your own UI for the choices message entry type above, this code snippet defines the click handler for the intercepted reply. ``` onClick = { onSelection(OptionItem.SelectionsOptionItem(it.optionId)) } ``` # Defines Resources For Represents the Defines Resources For relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. ## Relationship Type Definition ||| |-|-| |Developer Name|`SD_DeReFo`| |Description|Defines the Defines Resources For relationship between configuration items in the CMDB.| |Master Label|Defines Resources For| |Direct Relationship|Defines Resources For| |Inverse Relationship|Gets Resources From| |Line Stroke|Solid| |Color Code|`#00FF99`| # Degraded Experience in Older iOS Versions The [iOS SDK 1.7.0 release](https://github.com/Salesforce-Async-Messaging/messaging-in-app-ios/releases/tag/1.7.0) features UI SDK built by using SwiftUI. Users who have iOS versions older than iOS 15.0 ‌face a degraded experience because these versions don’t fully support all SwiftUI functionality. ## Choice List in the Chatbot In ‌iOS 16.0 and earlier versions, the chatbot choice list is displayed in a single stack below the question. Apps running on iOS 16 or later versions show the choice list in a brick-stacked fashion, spread across the width of the screen. ## Chat Input Field Due to limitations in SwiftUI in iOS 16 and earlier versions, the chat input field doesn’t expand after multiple lines of text are typed. The text isn’t lost, and the user can continue typing, but the field doesn’t expand to show the extra text. ## Share Sheet In iOS 15 and earlier versions, the share sheet was displayed in full-screen. In iOS 16 and later versions, the share sheet is shown in half-screen. ## Pre-Chat Next Button Navigation In iOS 15 and earlier versions, the Next button on the pre-chat keyboard doesn’t move the focus among fields in the pre-chat form. # Delete a Conversation Participant Delete a conversation participant to remove a Messaging end user and all of their messaging-related data from Salesforce. See the [deleteConversationParticipantData](https://developer.salesforce.com/docs/service/conversation-data-api/references/conversation-data-api-reference?meta=deleteConversationParticipantData) schema for more information about deleting conversation participant data. Watch the video for an end-to-end walkthrough of how to delete a conversation participant and their messaging-related data. ::video{src="https://developer.salesforce.com/docs/service/conversation-data-api/guide/fiZjLdpyfFfXEwdnt5u9YW" title="Conversation Data API end-to-end walkthrough" type="vidyard"} # Delete a Primary Version of an Article Deletes the primary version of an article. ## URI ```nolang /services/data/v25.0/knowledgeManagement/articleVersions/masterVersions/ ``` ## Formats JSON, XML ## HTTP Method DELETE ## Authentication `Authorization: OAuth {accesstoken}` ## Parameters None ## Input None required ## Output HTTP status code 204 is returned when an existing record is deleted. # Delete a Translated Version of an Article Deletes a translated version of an article. ## URI ```nolang /services/data/v25.0/knowledgeManagement/articleVersions/translations/ ``` ## Formats JSON, XML ## HTTP Method DELETE ## Authentication `Authorization: OAuth {accesstoken}` ## Parameters None ## Input None needed ## Output HTTP status code 204 is returned when an existing record is deleted. # Delete Configuration Item Delete a configuration item from the Configuration Management Database using its unique identifier. ## Special Access Rules To delete a configuration item, you must have the IT Service Configuration Item Type Manager user permission. ## Request ### JSON example ```nolang mutation DeleteConfigurationItem { deleteConfigurationItem(id: "123333") { id status message } } ``` ### Properties |Name|Type|Description|Required or Optional|Available Version| |----|----|-----------|--------------------|-----------------| |`id`|Integer|The unique identifier of the configuration item to delete.|Required|67.0| ## Response ### JSON example This example is a sample response from the `deleteConfigurationItem` mutation. ```nolang { "data": { "deleteConfigurationItem": { "id": "9666801", "status": "Success", "message": "Configuration item deleted successfully." } } } ``` ### Properties |Name|Type|Description|Available Version| |----|----|-----------|-----------------| |`id`|Integer|The unique integer identifier of the deleted configuration item.|67.0| |`status`|String|The status of the delete operation.|67.0| |`message`|String|A message providing details about the delete operation result.|67.0| # Delete Configuration Item Delete a configuration item from the Configuration Management Database using its unique identifier. ## Special Access Rules To delete a configuration item, you must have the IT Service Configuration Item Type Manager user permission. ## Request ### JSON example ```nolang mutation DeleteCI { deleteCI(id: "123333") { id status message } } ``` ### Properties |Name|Type|Description|Required or Optional|Available Version| |----|----|-----------|--------------------|-----------------| |`id`|Integer|The unique identifier of the configuration item to delete.|Required|66.0| ## Response ### JSON example ```nolang { "data": { "deleteCI": { "id": "9666801", "status": "success", "message": "CI Deleted Successfully" } } } ``` ### Properties |Name|Type|Description|Available Version| |----|----|-----------|-----------------| |`id`|Integer|The unique integer identifier of the deleted configuration item.|66.0| |`status`|String|The status of the delete operation.|66.0| |`message`|String|A message providing details about the delete operation result.|66.0| # Delete Configuration Item Relationship Submit an operation to delete relationships between configuration items (CIs). This is a synchronous request. ## Special Access Rules To delete a configuration item relationship, you must have the IT Service Configuration Item Type Manager user permission. ## Request ### JSON example ```nolang mutation DeleteCnfgItemRelationship { deleteCnfgItemRelationship(id: "8") { id status message } } ``` ### Properties |Name|Type|Description|Required or Optional|Available Version| |----|----|-----------|--------------------|-----------------| |`id`|ID|The unique identifier of the CI relationship to delete.|Required|67.0| ## Response ### JSON example This example is a sample response from the `deleteCnfgItemRelationship` mutation. ```nolang { "data": { "deleteCnfgItemRelationship": { "id": "8", "status": "Success", "message": "Configuration item relationship deleted successfully." } } } ``` ### Properties |Name|Type|Description|Available Version| |----|----|-----------|-----------------| |`id`|Integer|The relationship identifier.|67.0| |`status`|String|Indicates the success or failure of the operation.|67.0| |`message`|String|A message providing details about the delete operation result.|67.0| # Delete Configuration Item Relationship Submit an operation to delete relationships between configuration items (CIs). This is a synchronous request. ## Special Access Rules To delete a configuration item relationship, you must have the IT Service Configuration Item Type Manager user permission. ## Request ### JSON example ```nolang mutation DeleteCIRelationship { deleteCIRelationship(id: "8") { id status message } } ``` ### Properties |Name|Type|Description|Required or Optional|Available Version| |----|----|-----------|--------------------|-----------------| |`id`|Integer|The unique identifier of the CI relationship to delete.|Required|66.0| ## Response ### JSON example This example is a sample response from the `deleteCIRelationship` mutation. ```nolang { "data": { "deleteCIRelationship": { "id": "8", "status": "success", "message": "Relationship deleted successfully" } } } ``` ### Properties |Name|Type|Description|Available Version| |----|----|-----------|-----------------| |`id`|Integer|The relationship identifier.|66.0| |`status`|String|Indicates the success or failure of the operation.|66.0| |`message`|String|A message providing details about the delete operation result.|66.0| # Delete the Translated Value of a Survey Field After a survey field is translated into a particular language, you can delete the translated value of the survey field. This resource is available in REST API version 48.0 and later. **note:** This URI can only be used for the flow process type `Survey`. ## Syntax **URI:** `/services/data/vXX.X/localizedvalue/record/developerName/language` **Formats:** JSON **HTTP methods:** DELETE **Request parameters** |Parameter|Description| |---------|-----------| |`developerName`|The developer name of the flow field. For example, `Flow.Flow.MyFlow.1.Choice.Choice_1_Master.InputLabel`| |`language`|Language of the translated field. Possible values are `da`, `nl_NL`, `fi`, `fr`, or `de`.| # Delete the Translated Value of Multiple Survey Fields in One or More Languages After survey fields are translated into one or more languages, you can delete the translated values of multiple survey fields. This resource is available in REST API version 48.0 and later. **note:** This URI can only be used for the flow process type `Survey`. ## Syntax **URI:** `/services/data/vXX.X/localizedvalue/records/delete` **Formats:** JSON **HTTP methods:** POST **Request body JSON example** ```nolang [ { "developerName": "Flow.Flow.MyFlow.1.Choice.Choice_1_Master.InputLabel", "language": "en_US" }, { "developerName": "Flow.Flow.MyFlow.1.Choice.Choice_1_Master.InputLabel", "language": "zh_CN" } ] ``` **Request parameters** |Parameter|Description| |---------|-----------| |`developerName`|Required. Developer name of the flow field.| |`language`|Required. Language into which the flow field was translated.| # Depends On Represents the Depends On relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. ## Relationship Type Definition ||| |-|-| |Developer Name|`SD_DeOn`| |Description|Defines the Depends On relationship between configuration items in the CMDB.| |Master Label|Depends On| |Direct Relationship|Depends On| |Inverse Relationship|Used By| |Line Stroke|Solid| |Color Code|`#00CC99`| # Deployed On Represents the Deployed On relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. ## Relationship Type Definition ||| |-|-| |Developer Name|`SD_DeOn1`| |Description|Defines the Deployed On relationship between configuration items in the CMDB.| |Master Label|Deployed On| |Direct Relationship|Deployed On| |Inverse Relationship|Deploys| |Line Stroke|Solid| |Color Code|`#66FF66`| # Deploys Represents the Deploys relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. ## Relationship Type Definition ||| |-|-| |Developer Name|`SD_Depxx`| |Description|Defines the Deploys relationship between configuration items in the CMDB.| |Master Label|Deploys| |Direct Relationship|Deploys| |Inverse Relationship|Deployed On| |Line Stroke|Solid| |Color Code|`#66FF00`| # DepreciationPlan Represents the rules and methods used to calculate the depreciation value of an asset. This object is available in API version 66.0 and later. ## Supported Calls `create()`, `delete()`, `describeLayout()`, `describeSObjects()`, `getDeleted()`, `getUpdated()`, `query()`, `retrieve()`, `search()`, `undelete()`, `update()`, `upsert()` ## Fields ### DeprCalcFreq - **Type**: picklist - **Properties**: Create, Filter, Group, Restricted picklist, Sort, Update - **Description**: Specifies how often depreciation is calculated for this rule. - **Possible values**: - `Monthly` - `Yearly` ### DepreciationMethod - **Type**: picklist - **Properties**: Create, Filter, Group, Restricted picklist, Sort, Update - **Description**: Specifies the method used to calculate asset depreciation. - **Possible values**: - `DecliningBalance` - `DoubleDecliningBalance` - `StraightLine` - `SumOfTheYearsDigits` ### LastReferencedDate - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: The timestamp when the current user last accessed this record, a record related to this record, or a list view. ### LastViewedDate - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: The timestamp when the current user last viewed this record or list view. ### Name - **Type**: string - **Properties**: Create, Filter, Group, idLookup, Sort, Update - **Description**: Unique name to identify this depreciation rule. ### OwnerId - **Type**: reference - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: ID of the user who owns the record. This field is a polymorphic relationship field. - **Relationship Name**: Owner - **Refers To**: Group, User # Detailed Branding Tokens Use these tokens if you want to configure specific elements of the app. When you change any of these detailed branding token values, it overrides the generic token used by that element. ## Header/General Colors | Detailed Token | Generic Token | Description | | --------------------------- | ------------------------- | ----------------------------- | | smi_banner_background | ​​smi_color_on_background | Banner background color | | smi_banner_text | ​​smi_color_background | Banner text color | | smi_chat_background | ​​smi_color_background | Chat window background color | | smi_cta_buttons | ​​smi_color_secondary | Call-to-action button color | | smi_cta_buttons_text | secondary | Call-to-action text color | | smi_image_viewer_background | smi_color_tertiary | Image viewer background color | | smi_navigation_background | ​​smi_color_primary | Navigation background color | | smi_navigation_icon | smi_color_on_primary | Navigation icon color | | smi_navigation_text | ​​smi_color_on_primary | Navigation text color | | smi_url_text | smi_color_secondary | Hyperlink text color | ## Bubble/Chat Colors | Detailed Token | Generic Token | Description | | --------------------------------------- | ---------------------------------------- | ------------------------------------------------- | | smi_avatar_background | ​​smi_color_secondary | Avatar background color | | smi_avatar_foreground | ​​smi_color_on_secondary | Avatar foreground color | | smi_chat_separator | smi_color_on_background_semi_transparent | Chat separator color | | smi_icon_error | smi_color_on_secondary | Error icon color that's used in the unknown entry | | smi_received_bubble_text | ​​smi_color_on_surface | Text color for incoming message bubble | | smi_received_bubble_background | ​​smi_color_surface | Background color for incoming chat bubble | | smi_received_bubble_border | ​​smi_color_surface_variant | Border color for incoming chat bubble | | smi_sent_bubble_background | ​​smi_color_secondary | Background color for outgoing chat bubble | | smi_sent_bubble_text | ​​smi_color_on_secondary | Text color for outgoing message bubble | | smi_timestamp | ​​smi_color_on_background | Timestamp text color | | smi_typing_indicator_text | ​​smi_color_on_background | Typing indicator color | | smi_unknown_entry_error_icon_background | smi_color_error | Error entry icon background color | ## Button Colors | Detailed Token | Generic Token | Description | | --------------------------------------- | ------------------------------ | --------------------------------------- | | smi_button_background | ​​smi_color_surface | Button background color | | smi_button_border | ​​smi_color_surface_variant | Button border color | | smi_button_disabled_background | ​​smi_color_surface | Disabled text background color | | smi_button_disabled_selected_background | smi_color_on_background | Disabled selected text background color | | smi_button_disabled_selected_text | smi_color_background | Disabled selected text color | | smi_button_disabled_text | ​​smi_color_on_background | Disabled text color | | smi_button_focus_background | ​​smi_color_on_surface_variant | Focus text background color | | smi_button_focus_text | ​​smi_color_surface | Focus text color | | smi_button_text | ​​smi_color_on_surface_variant | Button text color | | smi_list_picker_title_background | smi_color_surface | List picker title background color | | smi_list_picker_title_text | ​​smi_color_on_surface | List picker title text color | | smi_cancel_button_active | ​​smi_color_on_secondary | Cancel button active color | | smi_cancel_button_bg_active | ​​smi_color_on_background | Cancel button active background color | | smi_cancel_button_bg_pressed | ​​smi_color_secondary_active | Cancel button pressed background color | | smi_cancel_button_pressed | ​​smi_color_on_secondary | Cancel button pressed color | ## Camera Colors | Detailed Token | Generic Token | Description | | ---------------------------- | ----------------------------------------- | -------------------------------------- | | smi_camera_button_active | ​​smi_color_on_secondary | Camera button active color | | smi_camera_button_bg_active | ​​smi_color_on_secondary_transparent | Camera button active background color | | smi_camera_button_bg_focused | ​​smi_color_on_secondary_semi_transparent | Camera button focused background color | | smi_camera_button_bg_pressed | ​​smi_color_on_secondary | Camera button pressed background color | | smi_camera_button_focused | ​​smi_color_secondary | Camera button focused color | | smi_camera_button_pressed | ​​smi_color_on_secondary | Camera button pressed color | ## Card Colors | Detailed Token | Generic Token | Description | | ----------------------- | --------------------------- | --------------------------- | | smi_card_background | ​​smi_color_primary | Background color for a card | | smi_card_border | ​​smi_color_primary_variant | Border color for a card | | smi_card_headline_text | ​​smi_color_on_primary | Headline text for a card | | smi_card_subheader_text | ​​smi_color_primary_variant | Subheader text for a card | ## Carousels Colors | Detailed Token | Generic Token | Description | | ---------------------------------------- | ----------------------- | ------------------------------------------ | | smi_carousel_background | smi_color_surface | Carousel background color | | smi_carousel_button_background | smi_color_surface | Carousel button background color | | smi_carousel_button_text | smi_color_secondary | Carousel button text color | | smi_carousel_button_text_disabled | smi_color_on_background | Carousel button text disabled color | | smi_carousel_image_background | smi_color_primary | Carousel image background color | | smi_carousel_progress_indicator_active | smi_color_secondary | Carousel progress indicator active color | | smi_carousel_progress_indicator_inactive | smi_color_on_background | Carousel progress indicator inactive color | | smi_carousel_selected_highlight | smi_color_secondary | Carousel selected highlight color | | smi_carousel_selected_icon_foreground | smi_color_on_secondary | Carousel selected icon foreground color | | smi_carousel_selected_icon_background | smi_color_secondary | Carousel selected icon background color | | smi_carousel_sub_title_text | smi_color_on_primary | Carousel text subtitle color | | smi_carousel_title_text | smi_color_on_primary | Carousel text title color | ## Citation Colors | Detailed Token | Generic Token | Description | | -------------------------------------- | ----------------------------------- | --------------------------------------- | | smi_citations_source_button_background | smi_color_surface_secondary_variant | Citation source button background color | | smi_citations_source_button_text | smi_color_on_surface | Citation source button text color | ## End Chat Session Colors | Detailed Token | Generic Token | Description | | -------------------------------------------------- | ----------------------------------- | ------------------------------------------------ | | smi_end_chat_confirmation_background | smi_color_background | End chat confirmation screen background color | | smi_end_chat_confirmation_button_background | smi_color_secondary | End chat confirmation button color | | smi_end_chat_confirmation_button_border | smi_color_secondary | End chat confirmation button border color | | smi_end_chat_confirmation_button_cancel_background | smi_color_surface | End chat confirmation cancel button color | | smi_end_chat_confirmation_button_cancel_border | smi_color_on_surface_variant | End chat confirmation cancel button border color | | smi_end_chat_confirmation_button_cancel_text | smi_color_on_surface | End chat confirmation cancel button text color | | smi_end_chat_confirmation_button_text | smi_color_on_secondary | End chat confirmation button text color | | smi_end_chat_confirmation_text | smi_color_on_surface | End chat confirmation screen text color | | smi_end_chat_confirmation_progress_indicator | smi_color_secondary | End session progress indicator color | ## Fallback Message Screen Colors | Detailed Token | Generic Token | Description | | --------------------------------------------- | ----------------------------- | ----------------------------------------------------- | | smi_fallback_message_background | smi_color_background | Fallback message confirmation screen background color | | smi_fallback_message_confirmation_button | smi_color_secondary | Fallback message confirmation button color | | smi_fallback_message_confirmation_button_text | smi_color_on_secondary | Fallback message confirmation button text color | | smi_fallback_message_confirmation_text | smi_color_on_surface | Fallback message confirmation screen text color | ## File Type Placeholders | Detailed Token | Default Light Color | Default Dark Color | Description | | ------------------------- | ------------------- | ------------------ | ------------------------------------------ | | smi_color_file_icon_csv | #FF2E844A | #FF2E844A | Placeholder color for .csv files | | smi_color_file_icon_excel | #FF2E844A | #FF2E844A | Placeholder color for .xls and .xlsx files | | smi_color_file_icon_txt | #FFE4A201 | #FFE4A201 | Placeholder color for .txt files | | smi_color_file_icon_word | #FF107CAD | #FF107CAD | Placeholder color for .doc and .docx files | | smi_color_file_icon_xml | #FFF38303 | #FFF38303 | Placeholder color for .xml files | ## Icon Colors | Detailed Token | Generic Token | Description | | ----------------------------- | ------------------------- | ------------------------------- | | smi_icon_background | ​​smi_color_secondary | Icon background color | | smi_icon_background_secondary | smi_color_on_background | Icon secondary background color | | smi_icon_disabled | ​​smi_color_on_background | Icon disabled color | | smi_icon_foreground | ​​smi_color_on_secondary | Icon foreground color | ## Input Colors | Detailed Token | Generic Token | Description | | --------------------- | --------------------------- | ----------------------------------------------- | | smi_input_background | ​​smi_color_surface | Background color for text input field | | smi_input_border | ​​smi_color_surface_variant | Border color for text input field | | smi_input_text | ​​smi_color_on_surface | Text font color when typing a message | | smi_input_placeholder | ​​smi_color_on_background | Placeholder text color for the input text field | ## Loading Screen Colors | Detailed Token | Generic Token | Description | | --------------------------------------------- | --------------------------- | ----------------------------------------------- | | smi_loading_screen_avatar | smi_color_on_background | Loading screen avatar color | | smi_loading_screen_background | smi_color_background | Loading screen background color | | smi_loading_screen_input_text_placeholder | smi_color_surface_secondary | Loading screen input text placeholder color | | smi_loading_screen_received_bubble_background | smi_color_on_background | Loading screen received bubble background color | | smi_loading_screen_sent_bubble_background | smi_color_surface_secondary | Loading screen sent bubble background color | | smi_loading_screen_text_placeholder | smi_color_surface_secondary | Loading screen placeholder text color | ## Markdown Text Colors | Detailed Token | Generic Token | Description | | ------------------------------------- | --------------------------- | ----------------------------------------- | | smi_received_markdown_code_background | smi_color_background | Markdown code background color | | smi_received_markdown_code_text | smi_color_on_surface | Markdown code text color | | smi_received_markdown_horizontal_rule | smi_color_on_surface | Markdown horizontal rule background color | | smi_received_markdown_link_text | smi_color_secondary | Markdown link text color | ## Message Search Colors | Detailed Token | Generic Token | Description | | --------------------------------------------- | ---------------------------------------- | ------------------------------------- | | smi_message_search_input_bar | smi_color_on_background_semi_transparent | Search input bar color | | smi_message_search_highlight_background_agent | smi_color_surface_highlight | Highlighted background color for rep | | smi_message_search_highlight_background_user | smi_color_secondary_highlight | Highlighted background color for user | | smi_message_search_highlight_border_agent | smi_color_highlight | Highlighted border color for rep | | smi_message_search_highlight_border_user | smi_color_highlight | Highlighted border color for user | | smi_message_search_highlight_text_agent | smi_color_primary | Highlighted text color for rep | | smi_message_search_highlight_text_user | smi_color_primary | Highlighted text color for user | ## Participant Client Menu Colors | Detailed Token | Generic Token | Description | | ------------------------------------------------- | ---------------------------- | --------------------------------------- | | smi_participant_client_menu_background | smi_color_background | Client menu background color | | smi_participant_client_menu_item_background | smi_color_surface | Client menu item background color | | smi_participant_client_menu_item_focus_background | smi_color_on_surface_variant | Client menu item focus background color | | smi_participant_client_menu_item_icon | smi_color_secondary | Client menu item icon color | | smi_participant_client_menu_item_text | smi_color_on_surface | Client menu text item color | | smi_participant_client_menu_search_icon | smi_color_secondary | Client menu search icon color | | smi_participant_client_menu_button | smi_color_surface | Client menu button color | | smi_participant_client_menu_button_text | smi_color_on_surface | Client menu button text color | | smi_participant_client_menu_button_border | smi_color_surface_variant | Client menu button border color | | smi_participant_client_menu_button_selected | smi_color_on_surface_variant | Client menu button selected color | ## Pre-Chat Colors | Detailed Token | Generic Token | Description | | ---------------------------- | ---------------------------- | --------------------------------------------- | | smi_prechat_background | ​​smi_color_background | Pre-chat window background color | | smi_prechat_border | ​​smi_color_on_primary | Border color for text input field in pre-chat | | smi_prechat_button | ​​smi_color_secondary | Pre-chat button color | | smi_prechat_button_active | ​​smi_color_secondary_active | Pre-chat active button color | | smi_prechat_button_text | ​​smi_color_on_secondary | Pre-chat button text color | | smi_prechat_disabled | smi_color_surface_secondary | Disabled pre-chat field | | smi_prechat_error | ​​smi_color_error | Pre-chat error feedback color | | smi_prechat_input_background | ​​smi_color_surface | Pre-chat window background color | | smi_prechat_text | ​​smi_color_on_primary | Text color on pre-chat form | | smi_prechat_text_active | ​​smi_color_secondary | Color for the active pre-chat cell | ## Progress Indicator Colors | Detailed Token | Generic Token | Description | | ----------------------------------------- | -------------------------------- | ---------------------------------------------------- | | smi_notification_badge_background | smi_color_surface | Notification badge background color | | smi_notification_badge_counter_background | smi_color_error | Notification badge unread message counter background | | smi_notification_badge_counter_text | smi_color_surface | Notification badge unread message counter text color | | smi_notification_badge_icon | smi_color_on_surface | Notification badge icon color | | smi_notification_badge_outline | smi_color_surface_variant | Notification badge outline color | | smi_progress_indicator_icon_inner | smi_color_on_surface | Progress indicator animation icon inner arch color | | smi_progress_indicator_icon_outer | smi_color_on_surface | Progress indicator animation icon outer arch color | | smi_progress_indicator_text | smi_color_on_surface | Progress indicator label text color | ## Request Transcript Colors | Detail Token | Generic Token | Description | | -------------------------------------------- | ---------------------------- | ------------------------------------------------------ | | smi_transcript_background | smi_color_background | Request transcript screen background color | | smi_transcript_text | smi_color_on_surface | Request transcript screen text color | | smi_transcript_button_leave | smi_color_secondary | Request transcript leave button color | | smi_transcript_button_leave_border | smi_color_secondary | Request transcript leave button border color | | smi_transcript_button_leave_text | smi_color_on_secondary | Request transcript leave button text color | | smi_transcript_button_cancel | smi_color_surface | Request transcript cancel button color | | smi_transcript_button_cancel_border | smi_color_on_surface_variant | Request transcript cancel button border color | | smi_transcript_button_cancel_text | smi_color_on_surface | Request transcript cancel button text color | | smi_transcript_progress_indicator | smi_color_secondary | Request transcript progress indicator color | | smi_transcript_progress_indicator_background | smi_color_on_secondary | Request transcript progress indicator background color | ## Secure Forms Colors | Detailed Token | Generic Token | Description | | ------------------------------------------ | --------------------------- | ------------------------------------------------------------- | | smi_form_back_button | smi_color_on_secondary | Secure form back button background color | | smi_form_back_button_text | smi_color_secondary | Secure form back button text color | | smi_form_background | smi_color_background | Secure form background color | | smi_form_cell_icon_background_disabled | smi_color_surface_highlight | Secure form cell icon disabled background color | | smi_form_cell_icon_disabled | smi_color_primary | Secure form cell icon disabled color | | smi_form_confirmation_button_cancel | smi_color_surface | Secure form confirmation cancel button background color | | smi_form_confirmation_button_cancel_border | smi_color_on_surface | Secure form confirmation cancel button border text color | | smi_form_confirmation_button_cancel_text | smi_color_on_surface | Secure form confirmation cancel button text color | | smi_form_confirmation_button_leave | smi_color_secondary | Secure form confirmation window leave button background color | | smi_form_confirmation_button_leave_text | smi_color_on_secondary | Secure form confirmation window leave button text color | | smi_form_date_picker_icon | smi_color_secondary | Secure form date picker icon color | | smi_form_input_background | smi_color_background | Secure form input background color | | smi_form_input_border | smi_color_on_primary | Secure form input border color | | smi_form_input_border_active | smi_color_secondary | Secure form input border active color | | smi_form_input_border_error | smi_color_error | Secure form input border error color | | smi_form_input_footer_label | smi_color_on_primary | Secure form input footer label | | smi_form_input_text | smi_color_on_primary | Secure form input text color | | smi_form_input_title_text | smi_color_on_primary | Secure form input title text color | | smi_form_next_button | smi_color_secondary | Secure form next button background color | | smi_form_next_button_text | smi_color_on_secondary | Secure form next button text color | | smi_form_option_button_background | smi_color_primary | Secure form selectable option button background color | | smi_form_option_button_border | smi_color_on_primary | Secure form selectable option button border color | | smi_form_option_button_border_required | smi_color_error | Secure form selectable option button border required color | | smi_form_option_button_border_selected | smi_color_secondary | Secure form selectable option button border selected color | | smi_form_option_button_icon | smi_color_secondary | Secure form option icon button color | | smi_form_option_button_text | smi_color_on_primary | Secure form selectable option button text color | | smi_form_option_text_error | smi_color_error | Secure form selectable option text error color | | smi_form_option_title | smi_color_on_primary | Secure form selectable option title color | | smi_form_proress_bar_foreground | smi_color_secondary | Secure form progress bar foreground color | | smi_form_sub_title_text | smi_color_on_primary | Secure form subtitle text color | | smi_form_submit_button | smi_color_secondary | Secure form submit button color | | smi_form_submit_button_text | smi_color_on_secondary | Secure form submit button color text | | smi_form_title_text | smi_color_on_primary | Secure form title text color | # Detailed Branding Tokens Use these tokens if you want to configure specific elements of the app. When you change any of these detailed branding token values, it overrides the generic token used by that element. ## Header/General Colors | Detailed Token | Generic Token | Description | | ------------------------- | ------------- | ----------------------------- | | SMI.bannerBackground | onBackground | Banner background color | | SMI.bannerText | background | Banner text color | | SMI.chatBackground | background | Chat window background color | | SMI.ctaButtons | secondary | Call-to-action button color | | SMI.ctaButtonsText | secondary | Call-to-action text color | | SMI.imageViewerBackground | tertiary | Image viewer background color | | SMI.navigationBackground | primary | Navigation background color | | SMI.navigationIcon | onPrimary | Navigation icon color | | SMI.navigationText | onPrimary | Navigation text color | ## Bubble/Chat Colors | Detailed Token | Generic Token | Description | | ----------------------------------- | --------------------------- | ------------------------------------------------- | | SMI.avatarBackground | secondary | Avatar background color | | SMI.avatarForeground | onSecondary | Avatar foreground color | | SMI.chatSeperator | onBackgroundSemiTransparent | Chat separator color | | SMI.iconError | onSecondary | Error icon color that's used in the unknown entry | | SMI.receivedBubbleBackground | surface | Background color for an incoming chat bubble | | SMI.receivedBubbleBorder | surfaceVariant | Border color for incoming chat bubble | | SMI.receivedBubbleText | onSurface | Text color for an incoming message bubble | | SMI.sentBubbleBackground | secondary | Background color for an outgoing chat bubble | | SMI.sentBubbleText | onSecondary | Text color for an outgoing message bubble | | SMI.timestamp | onBackground | Timestamp text color | | SMI.typingIndicatorText | onBackground | Typing indicator ellipse color | | SMI.unknownEntryErrorIconBackground | error | Error entry icon background color | ## Button Colors | Detailed Token | Generic Token | Description | | ------------------------------------ | ----------------- | --------------------------------------- | | SMI.buttonBackground | surface | Button background color | | SMI.buttonBorder | surfaceVariant | Button border color | | SMI.buttonDisabledBackground | surface | Disabled text background color | | SMI.buttonDisabledSelectedBackground | onBackground | Disabled selected text background color | | SMI.buttonDisabledSelectedText | background | Disabled selected text color | | SMI.buttonDisabledText | onBackground | Disabled text color | | SMI.buttonFocusBackground | onSurfaceVariant | Focus text background color | | SMI.buttonFocusText | surface | Focus text color | | SMI.buttonText | onSurfaceVariant | Button text color | | SMI.cancelButtonActive | ​​onSecondary | Cancel button active color | | SMI.cancelButtonBgActive | ​​onBackground | Cancel button active background color | | SMI.cancelButtonBgPressed | ​​secondaryActive | Cancel button pressed background color | | SMI.cancelButtonPressed | ​​onSecondary | Cancel button pressed color | | SMI.listPickerTitleBackground | surface | List picker title background color | | SMI.listPickerTitleText | onSurface | List picker title text color | ## Camera Colors | Detailed Token | Generic Token | Description | | ------------------------- | ---------------------------- | -------------------------------------- | | SMI.cameraButtonActive | ​​onSecondary | Camera button active color | | SMI.cameraButtonBgActive | ​​onSecondaryTransparent | Camera button active background color | | SMI.cameraButtonBgFocused | ​​onSecondarySemiTransparent | Camera button focused background color | | SMI.cameraButtonBgPressed | ​​onSecondary | Camera button pressed background color | | SMI.cameraButtonFocused | ​​secondary | Camera button focused color | | SMI.cameraButtonPressed | ​​onSecondary | Camera button pressed color | ## Card Colors | Detailed Token | Generic Token | Description | | --------------------- | -------------- | --------------------------- | | SMI.cardBackground | primary | Background color for a card | | SMI.cardBorder | primaryVariant | Border color for a card | | SMI.cardHeadlineText | onPrimary | Headline text for a card | | SMI.cardSubheaderText | primaryVariant | Subheader text for a card | ## Carousels Colors | Detailed Token | Generic Token | Description | | ------------------------------------- | ------------- | ------------------------------------------ | | SMI.carouselBackground | surface | Carousel button background color | | SMI.carouselButtonText | secondary | Carousel button text color | | SMI.carouselButtonBackground | surface | Carousel button text disabled color | | SMI.carouselButtonTextDisabled | onBackground | Carousel button text color | | SMI.carouselImageBackground | primary | Carousel selected icon background color | | SMI.carouselProgressIndicatorActive | secondary | Carousel background color | | SMI.carouselProgressIndicatorInactive | onBackground | Carousel progress indicator active color | | SMI.carouselSelectedHighlight | secondary | Carousel progress indicator inactive color | | SMI.carouselSelectedIconBackground | secondary | Carousel selected icon foreground color | | SMI.carouselSelectedIconForeground | onSecondary | Carousel selected highlight color | | SMI.carouselSubTitleText | onPrimary | Carousel text subtitle color | | SMI.carouselTitleText | primary | Carousel text title color | ## Citation Colors | Detailed Token | Generic Token | Description | | ----------------------------------- | ----------------------- | --------------------------------------- | | SMI.citationsSourceButtonBackground | surfaceSecondaryVariant | Citation source button background color | | SMI.citationsSourceButtonText | onSurface | Citation source button text color | ## End Chat Session Colors | Detailed Token | Generic Token | Description | | --------------------------------------------- | ---------------- | ------------------------------------------------ | | SMI.endChatConfirmationBackground | background | End chat confirmation screen background color | | SMI.endChatConfirmationButtonBackground | secondary | End chat confirmation button color | | SMI.endChatConfirmationButtonBorder | secondary | End chat confirmation button border color | | SMI.endChatConfirmationButtonCancelBackground | surface | End chat confirmation cancel button color | | SMI.endChatConfirmationButtonCancelBorder | onSurfaceVariant | End chat confirmation cancel button border color | | SMI.endChatConfirmationButtonCancelText | onSurface | End chat confirmation cancel button text color | | SMI.endChatConfirmationButtonText | onSecondary | End chat confirmation button text color | | SMI.endChatConfirmationProgressIndicator | secondary | End session progress indicator color | | SMI.endChatConfirmationText | onSurface | End chat confirmation screen text color | ## Fallback Message Screen Colors | Detailed Token | Generic Token | Description | | ----------------------------------------- | ------------- | ----------------------------------------------------- | | SMI.fallbackMessageBackground | background | Fallback message confirmation screen background color | | SMI.fallbackMessageConfirmationButton | secondary | Fallback message confirmation button color | | SMI.fallbackMessageConfirmationButtonText | onSecondary | Fallback message confirmation button text color | | SMI.fallbackMessageConfirmationText | onSurface | Fallback message confirmation screen text color | ## File Type Placeholders | Detailed Token | Default Light Color | Default Dark Color | Description | | ---------------------- | ------------------- | ------------------ | ------------------------------------------ | | SMI.colorFileIconCsv | #FF2E844A | #FF2E844A | Placeholder color for .csv files | | SMI.colorFileIconExcel | #FF2E844A | #FF2E844A | Placeholder color for .xls and .xlsx files | | SMI.colorFileIconTxt | #FFE4A201 | #FFE4A201 | Placeholder color for .txt files | | SMI.colorFileIconWord | #FF107CAD | #FF107CAD | Placeholder color for .doc and .docx files | | SMI.colorFileIconXml | #FFF38303 | #FFF38303 | Placeholder color for .xml files | ## Icon Colors | Detailed Token | Generic Token | Description | | --------------------------- | ------------- | ------------------------------- | | SMI.iconBackground | secondary | Icon background color | | SMI.iconBackgroundSecondary | onBackground | Icon secondary background color | | SMI.iconDisabled | onBackground | Icon disabled color | | SMI.iconForeground | onSecondary | Icon foreground color | ## Input Colors | Detailed Token | Generic Token | Description | | -------------------- | -------------- | ----------------------------------------------- | | SMI.inputBackground | surface | Background color for text input field | | SMI.inputBorder | surfaceVariant | Border color for text input field | | SMI.inputPlaceholder | onBackground | Placeholder text color for the input text field | | SMI.inputText | onSurface | Text font color when typing a message | ## Loading Screen Colors | Detailed Token | Generic Token | Description | | ----------------------------------------- | ---------------- | ----------------------------------------------- | | SMI.loadingScreenAvatar | onBackground | Loading screen avatar color | | SMI.loadingScreenBackground | background | Loading screen background color | | SMI.loadingScreenInputTextPlaceholder | surfaceSecondary | Loading screen input text placeholder color | | SMI.loadingScreenReceivedBubbleBackground | onBackground | Loading screen received bubble background color | | SMI.loadingScreenSentBubbleBackground | surfaceSecondary | Loading screen sent bubble background color | | SMI.loadingScreenTextPlaceholder | surfaceSecondary | Loading screen placeholder text color | ## Markdown Text Colors | Detailed Token | Generic Token | Description | | ---------------------------------- | ------------- | ------------------------------ | | SMI.receivedMarkdownCodeBackground | background | Markdown code background color | | SMI.receivedMarkdownCodeText | onSurface | Markdown code text color | | SMI.receivedMarkdownHorizontalRule | onSurface | Markdown horizontal rule color | | SMI.receivedMarkdownLinkText | secondary | Markdown link text color | ## Message Search Colors | Detailed Token | Generic Token | Description | | ----------------------------------------- | --------------------------- | ------------------------------------- | | SMI.messageSearchHighlightBackgroundAgent | surfaceHighlight | Highlighted background color for rep | | SMI.messageSearchHighlightBackgroundUser | secondaryHighlight | Highlighted background color for user | | SMI.messageSearchHighlightBorderAgent | highlight | Highlighted border color for rep | | SMI.messageSearchHighlightBorderUser | highlight | Highlighted border color for user | | SMI.messageSearchHighlightTextAgent | primary | Highlighted text color for rep | | SMI.messageSearchHighlightTextUser | primary | Highlighted text color for user | | SMI.messageSearchInputBar | onBackgroundSemiTransparent | Search input bar color | ## Participant Client Menu Colors | Detailed Token | Generic Token | Description | | -------------------------------------------- | ---------------- | --------------------------------------- | | SMI.participantClientMenuBackground | background | Client menu background color | | SMI.participantClientMenuItemBackground | surface | Client menu item background color | | SMI.participantClientMenuItemIcon | secondary | Client menu item icon color | | SMI.participantClientMenuItemFocusBackground | onSurfaceVariant | Client menu item focus background color | | SMI.participantClientMenuItemText | onSurface | Client menu text item color | | SMI.participantClientMenuSearchIcon | secondary | Client menu search icon color | | SMI.participantClientMenuButton | surface | Client menu button color | | SMI.participantClientMenuButtonText | onSurface | Client menu button text color | | SMI.participantClientMenuButtonBorder | surfaceVariant | Client menu button border color | | SMI.participantClientMenuButtonSelected | onSurfaceVariant | Client menu button selected color | ## Pre-Chat Colors | Detailed Token | Generic Token | Description | | -------------------------- | ---------------- | ---------------------------------------------------------- | | SMI.prechatBackground | background | Pre-chat window background color | | SMI.prechatBorder | onPrimary | Border color for text input field in pre-chat | | SMI.prechatButton | secondary | Pre-chat button color | | SMI.prechatButtonActive | secondaryActive | Pre-chat active button color | | SMI.prechatButtonText | onSecondary | Pre-chat button text color | | SMI.prechatDisabled | surfaceSecondary | Disabled pre-chat field | | SMI.prechatError | error | Pre-chat error feedback color | | SMI.prechatInputBackground | surface | Pre-chat window background color | | SMI.prechatText | onPrimary | Text color on pre-chat form | | SMI.prechatTextActive | secondary | Color for the active pre-chat cell | | SMI.urlText | secondary | URL link color in the pre-chat Terms and Conditions string | ## Request Transcript Colors | Detailed Token | Generic Token | Description | | ----------------------------------------- | ---------------- | ------------------------------------------------------ | | SMI.transcriptBackground | background | Request transcript screen background color | | SMI.transcriptText | onSurface | Request transcript screen text color | | SMI.transcriptButtonLeave | secondary | Request transcript leave button color | | SMI.transcriptButtonLeaveBorder | secondary | Request transcript leave button border color | | SMI.transcriptButtonLeaveText | onSecondary | Request transcript leave button text color | | SMI.transcriptButtonCancel | surface | Request transcript cancel button color | | SMI.transcriptButtonCancelBorder | onSurfaceVariant | Request transcript cancel button border color | | SMI.transcriptButtonCancelText | onSurface | Request transcript cancel button text color | | SMI.transcriptProgressIndicator | secondary | Request transcript progress indicator color | | SMI.transcriptProgressIndicatorBackground | onSecondary | Request transcript progress indicator background color | ## Progress Indicator Colors | Detailed Token | Generic Token | Description | | -------------------------------------- | -------------- | ---------------------------------------------------- | | SMI.notificationBadgeBackground | surface | Notification badge background color | | SMI.notificationBadgeCounterBackground | error | Notification badge unread message counter background | | SMI.notificationBadgeCounterText | surface | Notification badge unread message counter text color | | SMI.notificationBadgeIcon | onSurface | Notification badge icon color | | SMI.notificationBadgeOutline | surfaceVariant | Notification badge outline color | | SMI.progressIndicatorIconInner | onSurface | Progress indicator animation icon inner arch color | | SMI.progressIndicatorIconOuter | onSurface | Progress indicator animation icon outer arch color | | SMI.progressIndicatorText | onSurface | Progress indicator label text color | ## Secure Forms Colors | Detailed Token | Generic Token | Description | | -------------------------------------- | ---------------- | ------------------------------------------------------------- | | SMI.formBackButton | onSecondary | Secure form back button background color | | SMI.formBackButtonText | secondary | Secure form back button text color | | SMI.formBackground | background | Secure form background color | | SMI.formCellIconBackgroundDisabled | surfaceHighlight | Secure form cell icon disabled background color | | SMI.formCellIconDisabled | primary | Secure form cell icon disabled color | | SMI.formConfirmationButtonCancel | surface | Secure form confirmation cancel button background color | | SMI.formConfirmationButtonCancelBorder | onSurface | Secure form confirmation cancel button border text color | | SMI.formConfirmationButtonCancelText | onSurface | Secure form confirmation cancel button text color | | SMI.formConfirmationButtonLeave | secondary | Secure form confirmation window leave button background color | | SMI.formConfirmationButtonLeaveText | onSecondary | Secure form confirmation window leave button text color | | SMI.formDatePickerIcon | secondary | Secure form date picker icon color | | SMI.formInputBackground | background | Secure form input background color | | SMI.formInputBorder | onPrimary | Secure form input border color | | SMI.formInputBorderActive | secondary | Secure form input border active color | | SMI.formInputBorderError | error | Secure form input border error color | | SMI.formInputFooterLabel | onPrimary | Secure form input footer label | | SMI.formInputText | onPrimary | Secure form input text color | | SMI.formInputTitleText | onPrimary | Secure form input title text color | | SMI.formNextButton | secondary | Secure form next button background color | | SMI.formNextButtonText | onSecondary | Secure form next button text color | | SMI.formOptionButtonBackground | primary | Secure form selectable option button background color | | SMI.formOptionButtonBorder | onPrimary | Secure form selectable option button border color | | SMI.formOptionButtonBorderSelected | secondary | Secure form selectable option button border selected color | | SMI.formOptionButtonBorderRequired | error | Secure form selectable option button border required color | | SMI.formOptionButtonIcon | secondary | Secure form option icon button color | | SMI.formOptionButtonText | onPrimary | Secure form selectable option button text color | | SMI.formOptionTextError | error | Secure form selectable option text error color | | SMI.formOptionTitle | onPrimary | Secure form selectable option title color | | SMI.formProressBarForeground | secondary | Secure form progress bar foreground color | | SMI.formSubTitleText | onPrimary | Secure form subtitle text color | | SMI.formSubmitButton | secondary | Secure form submit button color | | SMI.formSubmitButtonText | onSecondary | Secure form submit button color text | | SMI.formTitleText | onPrimary | Secure form title text color | # Develop a Workplace Command Center Solution For the best user experience, develop a solution that integrates with Workplace Command Center. Workplace Command Center provides a top down view of the readiness states of a workforce, worksites, and the operating profile of a business. Workplace Command Center UI includes: - A global filter component, allowing the user to filter Command Center components by Location. Location selection changes are communicated to other components using Lightning Message Service. - Components with visualizations sourced from the Wellness Check survey, including a mapping visualization of site and location status, and charts of wellness responses. - A public world-wide health visualization provided by Tableau, showing the same data for all customers. Because this is a public component, Tableau licenses are not required. Ready to learn more? - **[Create a Workplace Command Center Compatible Lightning Component](https://developer.salesforce.com/docs/service/workdotcom-dev/guide/wdc-cc-create-lightning-component.md)** Use Workplace Command Center compatible components in your custom solution. - **[Respond to Location Filter Changes](https://developer.salesforce.com/docs/service/workdotcom-dev/guide/wdc-cc-location-filter-changes.md)** Custom components should respond to global filter changes if possible, to provide a cohesive Command Center user experience. - **[Add a Component to Workplace Command Center](https://developer.salesforce.com/docs/service/workdotcom-dev/guide/wdc-cc-add-component.md)** Users will need to add custom components to the Workplace Command Center. **See Also** - [_Github_: Sample solution](https://github.com/forcedotcom/WorkDotCom-Partners) # Developing with Salesforce Knowledge Salesforce Knowledge gives your website visitors, clients, partners, and service agents the ultimate in support. You can create and manage your company information and securely share it when and where it is needed. Most features are declarative and let you point-and-click your way to a successful implementation. However, the API allows you to code your way to case deflection, happier customers, and more productive support agents. This guide discusses both Lightning Knowledge and Knowledge in Salesforce Classic. # Device Represents a Device configuration item in the Configuration Management Database (CMDB). ## Configuration Item Type Definition ||| |-|-| |Name|Device| |Developer Name|`SD_Devxx`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Base](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-base.md)| |Rule Name|Default rule for all IIS Servers| |Identifier(s)|Host Name| ## Attributes ### Cores per CPU - **Type**: text - **Developer Name**: `SD_CoPeCp` - **Attribute Set**: [System Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-system-information.md) - **Description**: The cores per cpu of the Device. - **Required**: Optional ### CPU Speed(GHz) - **Type**: double - **Developer Name**: `SD_CpSp` - **Attribute Set**: [System Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-system-information.md) - **Description**: The cpu speed(ghz) of the Device. - **Required**: Optional ### CPU Type - **Type**: text - **Developer Name**: `SD_CpTy` - **Attribute Set**: [System Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-system-information.md) - **Description**: The cpu type of the Device. - **Required**: Optional ### Device Caption - **Type**: text - **Developer Name**: `SD_DeCa1` - **Attribute Set**: [Device Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-device-details.md) - **Description**: The device caption of the Device. - **Required**: Optional ### Device Contact - **Type**: text - **Developer Name**: `SD_DeCo` - **Attribute Set**: [Device Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-device-details.md) - **Description**: The device contact of the Device. - **Required**: Optional ### Device Description - **Type**: text - **Developer Name**: `SD_DeDe` - **Attribute Set**: [Device Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-device-details.md) - **Description**: The device description of the Device. - **Required**: Optional ### Device ID - **Type**: text - **Developer Name**: `SD_DeId` - **Attribute Set**: [Device Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-device-details.md) - **Description**: The device id of the Device. - **Required**: Optional ### Device Location - **Type**: text - **Developer Name**: `SD_DeLo` - **Attribute Set**: [Device Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-device-details.md) - **Description**: The device location of the Device. - **Required**: Optional ### Device Manufacturer Name - **Type**: text - **Developer Name**: `SD_DeMaNa` - **Attribute Set**: [Device Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-device-details.md) - **Description**: The device manufacturer name of the Device. - **Required**: Optional ### Device Model Name - **Type**: text - **Developer Name**: `SD_DeMoNa` - **Attribute Set**: [Device Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-device-details.md) - **Description**: The device model name of the Device. - **Required**: Optional ### Device Name - **Type**: text - **Developer Name**: `SD_DeNa` - **Attribute Set**: [Device Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-device-details.md) - **Description**: The device name of the Device. - **Required**: Required ### Device Object ID - **Type**: text - **Developer Name**: `SD_DeObId` - **Attribute Set**: [Device Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-device-details.md) - **Description**: The device object id of the Device. - **Required**: Optional ### Device Serial Number - **Type**: text - **Developer Name**: `SD_DeSeNu` - **Attribute Set**: [Device Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-device-details.md) - **Description**: The device serial number of the Device. - **Required**: Optional ### Device Type - **Type**: text - **Developer Name**: `SD_DeTy` - **Attribute Set**: [Hardware and Network](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-hardware-and-network.md) - **Description**: The device type of the Device. - **Required**: Optional ### Device Uptime - **Type**: text - **Developer Name**: `SD_DeUp` - **Attribute Set**: [Device Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-device-details.md) - **Description**: The device uptime of the Device. - **Required**: Optional ### Hardware Type - **Type**: text - **Developer Name**: `SD_HaTy` - **Attribute Set**: [Device Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-device-details.md) - **Description**: The hardware type of the Device. - **Required**: Optional ### Host Name - **Type**: text - **Developer Name**: `SD_HoNa` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The host name of the Device. - **Required**: Optional ### IMEI Number - **Type**: text - **Developer Name**: `SD_ImNu` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The imei number of the Device. - **Required**: Optional ### Local FQDN - **Type**: text - **Developer Name**: `SD_LoFq` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The local fqdn of the Device. - **Required**: Optional ### Manufacturer - **Type**: text - **Developer Name**: `SD_Ma` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The manufacturer of the Device. - **Required**: Optional ### Model Number - **Type**: text - **Developer Name**: `SD_MoNu` - **Attribute Set**: [Asset Primary Information](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-asset-primary-information.md) - **Description**: The model number of the Device. - **Required**: Optional ### Operating System - **Type**: text - **Developer Name**: `SD_OpSy` - **Attribute Set**: [Operating System Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-operating-system-details.md) - **Description**: The operating system of the Device. - **Required**: Optional ### OS Architecture - **Type**: text - **Developer Name**: `SD_OsAr` - **Attribute Set**: [Operating System Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-operating-system-details.md) - **Description**: The os architecture of the Device. - **Required**: Optional ### OS Build Number - **Type**: text - **Developer Name**: `SD_OsBuNu` - **Attribute Set**: [Operating System Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-operating-system-details.md) - **Description**: The os build number of the Device. - **Required**: Optional ### OS Kernel - **Type**: text - **Developer Name**: `SD_OsKe` - **Attribute Set**: [Operating System Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-operating-system-details.md) - **Description**: The os kernel of the Device. - **Required**: Optional ### Uptime - **Type**: text - **Developer Name**: `SD_Up` - **Attribute Set**: [Hardware and Network](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-hardware-and-network.md) - **Description**: The uptime of the Device. - **Required**: Optional ### UUID - **Type**: text - **Developer Name**: `SD_Uu` - **Attribute Set**: [Virtual Machine Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-virtual-machine-details.md) - **Description**: The uuid of the Device. - **Required**: Optional # Device Details Represents the Device Details attribute set in the Configuration Management Database (CMDB). This attribute set groups related attributes for configuration items. ## Configuration Item Attribute Set Definition ||| |-|-| |Display Name|Device Details| |Developer Name|`SD_DeDe`| |Master Label|Device_Details| ## Attributes ### Boot Version - **Type**: text - **Developer Name**: `SD_BoVe` - **Description**: Describes the Boot Version for configuration items. - **Required**: Optional ### Call Server - **Type**: text - **Developer Name**: `SD_CaSe` - **Description**: Describes the Call Server for configuration items. - **Required**: Optional ### Configuration Server - **Type**: text - **Developer Name**: `SD_CoSe` - **Description**: Describes the Configuration Server for configuration items. - **Required**: Optional ### Device Caption - **Type**: text - **Developer Name**: `SD_DeCa1` - **Description**: Describes the Device Caption for configuration items. - **Required**: Optional ### Device Contact - **Type**: text - **Developer Name**: `SD_DeCo` - **Description**: Describes the Device Contact for configuration items. - **Required**: Optional ### Device Description - **Type**: text - **Developer Name**: `SD_DeDe` - **Description**: Describes the Device Description for configuration items. - **Required**: Optional ### Device ID - **Type**: text - **Developer Name**: `SD_DeId` - **Description**: Describes the Device ID for configuration items. - **Required**: Optional ### Device Location - **Type**: text - **Developer Name**: `SD_DeLo` - **Description**: Describes the Device Location for configuration items. - **Required**: Optional ### Device Manufacturer Name - **Type**: text - **Developer Name**: `SD_DeMaNa` - **Description**: Describes the Device Manufacturer Name for configuration items. - **Required**: Optional ### Device Model Name - **Type**: text - **Developer Name**: `SD_DeMoNa` - **Description**: Describes the Device Model Name for configuration items. - **Required**: Optional ### Device Name - **Type**: text - **Developer Name**: `SD_DeNa` - **Description**: Describes the Device Name for configuration items. - **Required**: Optional ### Device Object ID - **Type**: text - **Developer Name**: `SD_DeObId` - **Description**: Describes the Device Object ID for configuration items. - **Required**: Optional ### Device Serial Number - **Type**: text - **Developer Name**: `SD_DeSeNu` - **Description**: Describes the Device Serial Number for configuration items. - **Required**: Optional ### Device Uptime - **Type**: text - **Developer Name**: `SD_DeUp` - **Description**: Describes the Device Uptime for configuration items. - **Required**: Optional ### Firmware Revision - **Type**: text - **Developer Name**: `SD_FiRe` - **Description**: Describes the Firmware Revision for configuration items. - **Required**: Optional ### Hardware Revision - **Type**: text - **Developer Name**: `SD_HaRe` - **Description**: Describes the Hardware Revision for configuration items. - **Required**: Optional ### Hardware Type - **Type**: text - **Developer Name**: `SD_HaTy` - **Description**: Describes the Hardware Type for configuration items. - **Required**: Optional ### Missing Components - **Type**: text - **Developer Name**: `SD_MiCo` - **Description**: Describes the missing components for configuration items. Possible values are `FALSE` or `TRUE`. - **Required**: Optional ### Post Version - **Type**: text - **Developer Name**: `SD_PoVe` - **Description**: Describes the Post Version for configuration items. - **Required**: Optional ### Software Revision - **Type**: text - **Developer Name**: `SD_SoRe` - **Description**: Describes the Software Revision for configuration items. - **Required**: Optional ### System Object ID - **Type**: text - **Developer Name**: `SD_SyObId` - **Description**: Describes the System Object ID for configuration items. - **Required**: Optional # disableClickToDial() for Lightning Experience ## Usage Disables click-to-dial. This method is available in API version 38.0 or later. **note:** You can use this method with the Lightning web component `lightning-click-to-dial`. You can also use it with the Aura component `lightning:clickToDial`. Keep in mind that you can’t use either component in iFrames. This method can’t be used with the Visualforce component `support:clickToDial`. ## Syntax ```javascript sforce.opencti.disableClickToDial({ callback: FUNCTION //Optional }) ``` ## Arguments |Name|Type|Description| |------|------|-------------| |`callback`|function|JavaScript method executed when the API method call is completed.| ## Sample Code–HTML and JavaScript ```html ``` ## Response This method is asynchronous. The response is returned in an object passed to a callback method. The response object contains the following fields. |Name|Type|Description| |------|------|-------------| |`success`|boolean|Returns `true` if the API method call was invoked successfully, `false` otherwise.| |`returnValue`|object|This API method doesn’t return this object. The `returnValue` is always `null`.| |`errors`|array|If the API call was successful, this variable is `null`. If the API call failed, this variable returns an array of [error messages](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-error-messages-lightning.md).| # disableClickToDial() for Salesforce Classic ## Usage Disables click-to-dial. ## Syntax ```javascript sforce.interaction.cti.disableClickToDial( (optional) callback:function ) ``` ## Arguments |Name|Type|Description| |------|------|-------------| |`callback`|function|JavaScript method executed when the API method call is completed.| ## Sample Code–JavaScript ```javascript ``` ## Response This method is asynchronous. The response is returned in an object passed to a callback method. The response object contains the following fields. |Name|Type|Description| |------|------|-------------| |`result`|boolean|`true` if click-to-dial was disabled, `false` if click-to-dial wasn’t disabled.| |`error`|string|If the API call was successful, this variable is undefined. If the API call failed, this variable returns an error message.| # disableTabClose() Prevents a user from closing a tab or a subtab. If the ID parameter doesn’t specify a tab, the enclosing tab is used. You can also use this method to re-enable a tab that has been disabled. Available in API version 36.0 or later. **note:** - If you disable subtabs from closing, the primary tab is also disabled from closing. - If a record is deleted whose primary tab is disabled, the tab is forcibly closed. - If a record is deleted whose subtab is disabled, the subtab is not closed. ## Syntax ```javascript sforce.console.disableTabClose(disable:boolean, (optional) tabId:String, (optional) callback:Function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`disable`|boolean|Specifies whether to disable the tab. If `true`, the user can’t close the tab. If `false`, the user can close the tab.| |`tabId`|string|The tabId for the tab to enable or disable. Use `false` to automatically select the enclosing tab or subtab without needing to specify a tabId. The enclosing tabId can’t be inferred when this call is made from outside a sidebar component. For example, if you call this method from a footer widget, specify the tabId. If the tabId is for a “Details” subtab of a primary tab, the primary tabId is used instead.| |`callback`|function|JavaScript method that’s called upon completion of the method. The callback is passed a response object. See response information below.| ## Sample Code–Visualforce ```apex_page Disable close Tab on Load

Disable Tab Close Examples



API Callback Result



With No Tab ID

The tab ID will be auto-detected by context, or the event will fail.

With Tab ID Provided

When the event context doesn't have a detectable tab ID, you can supply it yourself.

``` ## Response This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following fields: |Name|Type|Description| |----|----|-----------| |`success`|boolean|`true` if the action completed successfully, `false` otherwise.| |`message`|string|If the action completed successfully, message contains the affected tabId. If the action failed, message contains the error message.| # disableTabClose() for Lightning Experience Prevents a workspace tab or subtab from closing. This method removes the close button from a tab or subtab, and disables the keyboard shortcuts that close tabs and subtabs. This method works only in Lightning console apps. ## Arguments The method provides the same argument for both Aura Components and Lightning Web Components (LWC). |Name|Type|Description| |----|----|-----------| |`tabId`|string|The ID of the workspace tab or subtab to disable tab close for.| |`disabled`|boolean|Specifies whether to disable tab close.| **note:** `disableTabClose()` doesn’t prevent the browser from refreshing or closing the browser tab. ## LWC Sample Code This component has a function that opens a tab using [a page reference](https://developer.salesforce.com/docs/service/api-console/sforce-api-console-lightning-open-pagereference.md) and then prevents it from being closed. When the [`openTab()`](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-lightning-opentab.md) method resolves successfully, it returns the `tabInfo` object. The `const { tabId }` syntax destructures the `tabInfo` object and binds the `tabInfo.tabId` value on the `tabId` variable. `disableTabClose()` uses this `tabId` value to prevent the tab from closing. ```javascript import { LightningElement } from 'lwc'; import { openTab, disableTabClose, IsConsoleNavigation } from 'lightning/platformWorkspaceApi'; export default class DisableTabCloseExample extends LightningElement { async handleOpenAndDisable() { if (!this.isConsoleNavigation) { return; } try { const { tabId } = await openTab({ pageReference: { "type": "standard__objectPage", "attributes": { "objectApiName":"Account", "actionName":"home" }, }, }); await disableTabClose(tabId, true); } catch (error) { // handle error } } } ``` For another example that uses `disableTabClose()`, see the [workspaceAPIDisableTabClose](https://github.com/trailheadapps/lwc-recipes/tree/main/force-app/main/default/lwc/workspaceAPIDisableTabClose) component in the [lwc-recipes repo](https://github.com/trailheadapps/lwc-recipes/tree/main/force-app/main/default/lwc). To make your component available for use in a Lightning console app, specify the `lightning__AppPage` target in the [component’s configuration file](https://developer.salesforce.com/docs/platform/lwc/guide/use-config-for-console-app.html). ## Aura Components Sample Code This component has a button that, when pressed, disables the ability to close the currently focused tab. Component code: ```html ``` Controller code: ```javascript ({ disableCloseFocusedTab : function(component, event, helper) { var workspaceAPI = component.find("workspace"); workspaceAPI.getFocusedTabInfo().then(function(response) { var focusedTabId = response.tabId; workspaceAPI.disableTabClose({ tabId: focusedTabId, disabled: true }) .then(function(tabInfo) { console.log(tabInfo); }) .catch(function(error) { console.log(error); }); }) .catch(function(error) { console.log(error); }); } }) ``` ## Response This method returns a promise that, upon success, resolves to a `tabInfo` object representing the focused tab. A `tabInfo` object is a JSON array of information about a workspace tab, with nested arrays of information on each subtab. This is the structure of a `tabInfo` object. ```javascript { tabId: string, url: string (URL), pinned: boolean, closeable: boolean, title: string, icon: string (SLDS iconKey), iconAlt: string, customTitle: string (optional), customIcon: string (optional), customIconAlt: string (optional), highlighted: boolean, pageReference: object, isSubtab: boolean, parentTabId: string, subtabs: [ { tabId: string, url: string (URL), pinned: boolean, closeable: boolean, title: string, icon: string (SLDS iconKey), iconAlt: string, customTitle: string (optional), customIcon: string (optional), customIconAlt: string (optional), highlighted: boolean, pageReference: object, isSubtab: boolean, parentTabId: string, focused: boolean, recordId: string, }, ... ], focused: boolean, recordId: string } ``` # disableUtilityPopOut() for Lightning Experience Disables pop-out for a utility. This method isn’t supported for Lightning Web Components (LWC). For LWC usage, see [enablePopout()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-lwc-enablepopout.md). ## Arguments |Name|Type|Description| |----|----|-----------| |`utilityId`|string|The ID of the utility to disable pop-out for. Optional when called within a utility.| |`disabled`|boolean|If true, disables pop-out and removes the pop-out icon for a utility that isn’t popped out. If the utility is already popped out, the pop-out icon is disabled. If `disabledText` is provided, the pop-out icon isn’t removed, but it’s disabled.| |`disabledText`|string|Hover text for the pop-out and pop-in icons if `disabled` is set to true. Optional.| ## Aura Components Sample Code This component has a button that, when pressed, disables utility pop-out. Component code: ```html ``` Controller code: ```javascript ({ handleDisableUtilityPopOut : function(component, event, helper) { var utilityAPI = component.find("utilitybar"); utilityAPI.disableUtilityPopOut({ disabled: true, disabledText: "Pop-out is disabled" }); } }) ``` ## Response This method returns a promise that, upon success, resolves to `true`. # Display Custom LWC Components for Enhanced Web Chat in Your Translated Languages To display Enhanced Web Chat custom LWC components in your translated languages, create a JSON file and upload it as a static resource in Salesforce. Alternatively, use deployment configuration data to access Enhanced Web Chat custom labels. By default, Enhanced Web Chat’s custom LWC components can’t fetch translations for [Salesforce custom labels](https://help.salesforce.com/s/articleView?id=platform.cl_about.htm). These Salesforce custom labels use site language to load translated labels. Our custom LWC components are rendered within the unique site generated for each Enhanced Chat deployment. Enhanced Chat loads the unique site in its default language, which prevents custom LWC components from fetching labels in any other language. Use the instructions in this topic to translate a custom LWC component into multiple languages. # DisposalOrder Manages the disposal of IT hardware assets, tracking the method, vendor, costs, and status. This object is available in API version 67.0 and later. ## Supported Calls `create()`, `delete()`, `describeLayout()`, `describeSObjects()`, `getDeleted()`, `getUpdated()`, `query()`, `retrieve()`, `search()`, `undelete()`, `update()`, `upsert()` ## Fields ### ActualPickupDate - **Type**: date - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The date when the assets were picked up. ### DisposalCoordinatorId - **Type**: reference - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The person responsible for managing the disposal. This field is a relationship field. - **Relationship Name**: DisposalCoordinator - **Refers To**: User ### DisposalCost - **Type**: currency - **Properties**: Create, Filter, Nillable, Sort, Update - **Description**: The total cost of the disposal. ### DisposalDate - **Type**: date - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The date when the disposal was completed. ### DisposalMethod - **Type**: picklist - **Properties**: Create, Filter, Group, Nillable, Restricted picklist, Sort, Update - **Description**: The method used to dispose of the assets. - **Possible values**: - `DESTRUCTION` - `DONATION` - `MIXED` - `RECYCLE` - `RESALE` - `RETURN_TO_VENDOR` - `TO_BE_DETERMINED` ### DisposalVendorId - **Type**: reference - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The vendor or internal team responsible for the disposal. This field is a relationship field. - **Relationship Name**: DisposalVendor - **Refers To**: Account ### ExpectedPickupDate - **Type**: date - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The date when the vendor is expected to pick up the assets. ### LastReferencedDate - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: The date and time when the disposal order was last referenced. ### LastViewedDate - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: The date and time when the disposal order was last viewed. ### Name - **Type**: string - **Properties**: Autonumber, Defaulted on create, Filter, idLookup, Sort - **Description**: An auto-assigned number that identifies the disposal order. ### Notes - **Type**: textarea - **Properties**: Create, Nillable, Update - **Description**: Additional details about the disposal order. ### OwnerId - **Type**: reference - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: The user who owns the disposal order. This field is a polymorphic relationship field. - **Relationship Name**: Owner - **Refers To**: Group, User ### PickupAddress - **Type**: address - **Properties**: Filter, Nillable - **Description**: The physical address where the asset is picked up. ### PickupCity - **Type**: string - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The city of the physical address where the asset is picked up. ### PickupCountry - **Type**: string - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The country of the physical address where the asset is picked up. ### PickupGeocodeAccuracy - **Type**: picklist - **Properties**: Create, Filter, Group, Nillable, Restricted picklist, Sort, Update - **Description**: The geocode accuracy of the physical address where the asset is picked up. - **Possible values**: - `Address` - `Block` - `City` - `County` - `ExtendedZip` - `NearAddress` - `Neighborhood` - `State` - `Street` - `Unknown` - `Zip` ### PickupLatitude - **Type**: double - **Properties**: Create, Filter, Nillable, Sort, Update - **Description**: The latitude of the physical address where the asset is picked up. ### PickupLongitude - **Type**: double - **Properties**: Create, Filter, Nillable, Sort, Update - **Description**: The longitude of the physical address where the asset is picked up. ### PickupPostalCode - **Type**: string - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The postal or zip code of the physical address where the asset is picked up. ### PickupState - **Type**: string - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The state or province of the physical address where the asset is picked up. ### PickupStreet - **Type**: textarea - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The street address of the physical address where the asset is picked up. ### PurchaseOrderNumber - **Type**: string - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The purchase order number associated with the disposal. ### RequestedById - **Type**: reference - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The user who initiated the disposal order. This field is a relationship field. - **Relationship Name**: RequestedBy - **Refers To**: User ### Status - **Type**: picklist - **Properties**: Create, Defaulted on create, Filter, Group, Restricted picklist, Sort, Update - **Description**: The status of the disposal order. - **Default value**: `DRAFT` - **Possible values**: - `APPROVED` - `CANCELED` - `DISPOSED` - `DRAFT` - `PENDING_CERTIFICATE_OF_DISPOSAL` - `PENDING_DISPOSAL` ### VendorCaseNumber - **Type**: string - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The case number issued by the vendor for tracking purposes. # DisposalOrderHistory Represents the history of changes made to a disposal order. This object is available in API version 67.0 and later. ## Supported Calls `describeSObjects()`, `getDeleted()`, `getUpdated()`, `query()`, `retrieve()` ## Fields ### DataType - **Type**: picklist - **Properties**: Filter, Group, Nillable, Restricted picklist, Sort - **Description**: The data type of the changed field. - **Possible values**: - `Address` - `AnyType` - `AutoNumber` - `Base64` - `BitVector` - `Boolean` - `Content` - `Currency` - `DataCategoryGroupReference` - `DateOnly` - `DateTime` - `Division` - `Double` - `DynamicEnum` - `Email` - `EncryptedBase64` - `EncryptedText` - `EntityId` - `EnumOrId` - `ExternalId` - `Fax` - `File` - `HtmlMultiLineText` - `HtmlStringPlusClob` - `InetAddress` - `Json` - `Location` - `MultiEnum` - `MultiLineText` - `Namespace` - `Percent` - `PersonName` - `Phone` - `Raw` - `RecordType` - `SfdcEncryptedText` - `SimpleNamespace` - `StringPlusClob` - `Switchable_PersonName` - `Text` - `TimeOnly` - `Url` - `YearQuarter` ### DisposalOrderId - **Type**: reference - **Properties**: Filter, Group, Sort - **Description**: The disposal order associated with the history entry. This field is a relationship field. - **Relationship Name**: DisposalOrder - **Refers To**: DisposalOrder ### Field - **Type**: picklist - **Properties**: Filter, Group, Restricted picklist, Sort - **Description**: The field that was changed. ### NewValue - **Type**: anyType - **Properties**: Nillable, Sort - **Description**: The new value of the changed field. ### OldValue - **Type**: anyType - **Properties**: Nillable, Sort - **Description**: The previous value of the changed field. # DisposalOrderLineItem Represents an individual asset linked to a disposal order. This object is available in API version 67.0 and later. ## Supported Calls `create()`, `delete()`, `describeLayout()`, `describeSObjects()`, `getDeleted()`, `getUpdated()`, `query()`, `retrieve()`, `undelete()`, `update()`, `upsert()` ## Fields ### AssetId - **Type**: reference - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The asset associated with the disposal line item. This field is a relationship field. - **Relationship Name**: Asset - **Refers To**: Asset ### DisposalOrderId - **Type**: reference - **Properties**: Create, Filter, Group, Sort - **Description**: The disposal order associated with the line item. This field is a relationship field. - **Relationship Name**: DisposalOrder - **Relationship Type**: Master-detail - **Refers To**: DisposalOrder (the master object) ### DisposalOrderLineItemNumber - **Type**: string - **Properties**: Autonumber, Defaulted on create, Filter, idLookup, Sort - **Description**: An auto-assigned number that identifies the disposal order line item. ### LastReferencedDate - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: The date and time when the disposal order line item was last referenced. ### LastViewedDate - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: The date and time when the disposal order line item was last viewed. ### Reason - **Type**: string - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The reason for disposing of the asset. ### Status - **Type**: picklist - **Properties**: Create, Filter, Group, Restricted picklist, Sort, Update - **Description**: The status of the disposal order line item. - **Possible values**: - `Disposed` - `PendingCertificateOfDisposal` - `PendingDisposal` - `Shipped` - `Void` # DisposalOrderLineItemHistory Represents the history of changes made to a disposal order line item. This object is available in API version 67.0 and later. ## Supported Calls `describeSObjects()`, `getDeleted()`, `getUpdated()`, `query()`, `retrieve()` ## Fields ### DataType - **Type**: picklist - **Properties**: Filter, Group, Nillable, Restricted picklist, Sort - **Description**: The data type of the changed field. - **Possible values**: - `Address` - `AnyType` - `AutoNumber` - `Base64` - `BitVector` - `Boolean` - `Content` - `Currency` - `DataCategoryGroupReference` - `DateOnly` - `DateTime` - `Division` - `Double` - `DynamicEnum` - `Email` - `EncryptedBase64` - `EncryptedText` - `EntityId` - `EnumOrId` - `ExternalId` - `Fax` - `File` - `HtmlMultiLineText` - `HtmlStringPlusClob` - `InetAddress` - `Json` - `Location` - `MultiEnum` - `MultiLineText` - `Namespace` - `Percent` - `PersonName` - `Phone` - `Raw` - `RecordType` - `SfdcEncryptedText` - `SimpleNamespace` - `StringPlusClob` - `Switchable_PersonName` - `Text` - `TimeOnly` - `Url` - `YearQuarter` ### DisposalOrderLineItemId - **Type**: reference - **Properties**: Filter, Group, Sort - **Description**: The disposal order line item associated with the history entry. This field is a relationship field. - **Relationship Name**: DisposalOrderLineItem - **Refers To**: DisposalOrderLineItem ### Field - **Type**: picklist - **Properties**: Filter, Group, Restricted picklist, Sort - **Description**: The field that was changed. ### NewValue - **Type**: anyType - **Properties**: Nillable, Sort - **Description**: The new value of the changed field. ### OldValue - **Type**: anyType - **Properties**: Nillable, Sort - **Description**: The previous value of the changed field. # DisposalOrderShare Represents a sharing entry on a disposal order. This object is available in API version 67.0 and later. ## Supported Calls `create()`, `delete()`, `describeSObjects()`, `query()`, `retrieve()`, `update()`, `upsert()` ## Fields ### AccessLevel - **Type**: picklist - **Properties**: Create, Filter, Group, Restricted picklist, Sort, Update - **Description**: The level of access that the user or group has to the disposal order. - **Possible values**: - `All`—Owner - `Edit`—Read/Write - `Read`—Read Only ### ParentId - **Type**: reference - **Properties**: Create, Filter, Group, Sort - **Description**: The disposal order associated with the sharing entry. This field is a relationship field. - **Relationship Name**: Parent - **Refers To**: DisposalOrder ### RowCause - **Type**: picklist - **Properties**: Create, Filter, Group, Nillable, Restricted picklist, Sort - **Description**: The reason why the user or group is granted access to the disposal order. - **Possible values**: - `ALMAssignmentSharing`—Actionable List Member Sharing Rule - `CompliantDataSharing`—Compliant Data Sharing - `GuestParentImplicit`—Associated guest user sharing - `GuestPersonImplicit`—Associated Guest User Sharing - `GuestRule`—Guest User Sharing Rule - `ImplicitChild`—Account Sharing - `ImplicitParent`—Associated record owner or sharing - `ImplicitPerson`—Person Contact - `LSC4CEAutoShare`—Lifesciences Commercial Auto Share - `LearningAssignment`—Learning Assignment Share - `LearningAssignmentImplicit`—Learning Assignment Implicit Share - `LearningItemAssignment`—Learning Item Assignment Share - `Manual`—Manual Sharing - `MfgTargetShare`—Manufacturing Target Sharing Rule - `ObligationAssigneeShare`—Obligation Assignee Share - `Owner` - `Rule`—Sharing Rule - `SharingRecordCollection`—Record Collection - `SurveyShare`—Survey Sharing Rule - `Team`—Sales Team - `Territory`—Territory Assignment Rule - `Territory2AssociationManual`—Territory Manual - `Territory2Forecast`—Territory assignment for forecasting and reporting - `Territory2SplitsForecast`—Territory Splits Share - `TerritoryManual`—Territory Manual - `TerritoryRule`—Territory Sharing Rule ### UserOrGroupId - **Type**: reference - **Properties**: Create, Filter, Group, Sort - **Description**: The user or group associated with the sharing entry. This field is a polymorphic relationship field. - **Relationship Name**: UserOrGroup - **Refers To**: Group, User # Docker Details Represents the Docker Details attribute set in the Configuration Management Database (CMDB). This attribute set groups related attributes for configuration items. ## Configuration Item Attribute Set Definition ||| |-|-| |Display Name|Docker Details| |Developer Name|`SD_DoDe`| |Master Label|Docker_Details| ## Attributes ### Container ID - **Type**: text - **Developer Name**: `SD_CoId` - **Description**: Describes the Container ID for configuration items. - **Required**: Optional ### Container Name - **Type**: text - **Developer Name**: `SD_CoNa` - **Description**: Describes the Container Name for configuration items. - **Required**: Optional ### Docker Image ID - **Type**: text - **Developer Name**: `SD_DoImId` - **Description**: Describes the Docker Image ID for configuration items. - **Required**: Optional ### Docker Image Size - **Type**: text - **Developer Name**: `SD_DoImSi` - **Description**: Describes the Docker Image Size for configuration items. - **Required**: Optional ### Docker Image Tag - **Type**: text - **Developer Name**: `SD_DoImTa` - **Description**: Describes the Docker Image Tag for configuration items. - **Required**: Optional ### Mapped Ports - **Type**: text - **Developer Name**: `SD_MaPo` - **Description**: Describes the Mapped Ports for configuration items. - **Required**: Optional ### Repository - **Type**: text - **Developer Name**: `SD_Re1` - **Description**: Describes the Repository for configuration items. - **Required**: Optional # DR Provided By Represents the DR Provided By relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. ## Relationship Type Definition ||| |-|-| |Developer Name|`SD_DrPrBy`| |Description|Defines the DR Provided By relationship between configuration items in the CMDB.| |Master Label|DR Provided By| |Direct Relationship|DR Provided By| |Inverse Relationship|Provides DR To| |Line Stroke|Solid| |Color Code|`#9966FF`| # DSL Modem Represents a DSL Modem configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. ## Configuration Item Type Definition ||| |-|-| |Name|DSL Modem| |Developer Name|`SD_DsMo`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Network Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-network-device.md)| |Rule Name|Default rule for all AWS EC2 Instances| |Identifier(s)|Instance Id| ## Attributes No associated attributes for this configuration item type. # Dynamic Send Survey Invitation Actions Send customized notifications to users about important events or updates to the records that they're working on. For example, notify account owners when a case is created. This action is available in API version 51.0 and later. ## Special Access Rules To access the Dynamic Send Survey Invitation action, you must have the Feedback Management Survey Response Pack and the Salesforce org enabled with Surveys. ## Supported REST HTTP Methods **URIs:** - Get the list of invocable actions for each available survey: `/services/data/vXX.X/actions/custom/dynamicSendSurveyInvitation` Where `XX.X` is the lastes API version. - Send survey invitation by email by using the invocable action: `/services/data/v51.0/actions/custom/dynamicSendSurveyInvitation/SURVEY_NAME` Where `SURVEY_NAME` is a variable. **Formats:** JSON, XML **HTTP Methods:** GET, HEAD, POST **Authentication:** `Authorization: Bearer TOKEN` Where `TOKEN` is a variable. ## Inputs |Input|Type|Description| |-----|----|-----------| |`anonymousResponse`|boolean|Indicates whether the participant's name is recorded in the response record (`true`) or not (`false`).| |`autoExpiryDays`|integer|Number of days remaining for the survey invitation to expire.| |`emailTemplateName`|string|Developer name of the template that contains either the question or the survey link.| |`isUnauthenticatedResponse`|boolean|Indicates whether the participant is required to authenticate before starting the survey (`true`) or not (`false`).| |`personalInvitation`|boolean|Indicates whether the invitation is specific to the recipient (`true`) or not (`false`).| |`recipient`|reference|Required. Salesforce ID of the record that the survey invitation is sent to.| |`recipientType`|string|Type of the survey recipient.| |`surveyQuestionName`|string|Developer name of the question that's sent by using the invitation.| |`surveySubjectEntity`|reference|ID of the record that associates the invitation record with another record.| ## Outputs None. ## Example **GET** This example shows how to get information about the Dynamic Send Survey Invitation action type. ```nolang curl --include --request GET \ --header "Authorization: Authorization: Bearer 00DR...xyz" \ --header "Content-Type: application/json" \ "https://instance.salesforce.com/services/data/v51.0/actions/custom/dynamicSendSurveyInvitation" ``` Here's a response that returns the list of invocable actions for each survey. ```nolang { "actions" : [ { "label" : "flowsend", "name" : "flowsend", "type" : "SEND_SURVEY_DYNAMIC_INVOCABLE_ACTION", "url" : "/services/data/v51.0/actions/custom/dynamicSendSurveyInvitation/flowsend" }, { "label" : "survey2", "name" : "survey2", "type" : "SEND_SURVEY_DYNAMIC_INVOCABLE_ACTION", "url" : "/services/data/v51.0/actions/custom/dynamicSendSurveyInvitation/survey2" }, { "label" : "survey", "name" : "survey", "type" : "SEND_SURVEY_DYNAMIC_INVOCABLE_ACTION", "url" : "/services/data/v51.0/actions/custom/dynamicSendSurveyInvitation/survey" } ] } ``` **POST** Here's a request for the Dynamic Send Survey Invitation action. ```nolang { "inputs":[{ "recipient" : "003xx000004WpemAAC", "isUnauthenticatedResponse" : false, "autoExpiryDays" : 6 }] } ``` Here's a response for the Dynamic Send Survey Invitation action. ```nolang [ { "actionName" : "survey", "errors" : null, "isSuccess" : true, "outputValues" : null } ] ``` # Dynamically Control Messaging Actions Control what reps can or can’t do per Messaging session agentWork, according to your business needs. Enable or disable Messaging actions for a specific Bring Your Own Channel for CCaaS Messaging session. For example, turn on transfers for certain queues and turn off transfers for others. **note:** Lighting App Builder settings for the Enhanced Conversation Component that hide controls take precedence over dynamically controlled Messaging actions. For example, if the transfer action in a Messaging session layout is hidden but transfers are enabled through Interaction Service API for that Messaging session agentWork, the transfer action isn’t visible to the rep. 1. To create an AgentWork record when the system finds a rep to handle a work assignment, call the Interaction Service AgentWork API (`POST /api/v1/agentWork`). 2. As part of the payload for the AgentWork API, include the optional `agentActionVisibilities` JSON object. This object specifies whether a particular action is enabled or disabled for the Messaging session agentWork using these parameters. - `agentAction`: Required. An enum that specifies which Messaging action is dynamically controlled. Options are `Transfer` and `Conference`. - `visible`: Required. A Boolean that indicates whether an action is enabled (`true`) or disabled (`false`). Although Messaging action buttons are visible if visible is `false`, they aren’t functional. Here are two example payloads. They differ based on whether a Pending Service Routing (PSR) record already exists when you call the AgentWork API. ```json { "userId": "USER_ID", "workItemId": "WORK_ITEM_ID", "capacityWeight": CAPACITY_WEIGHT, "routingContext": { "conversationIdentifier": "CONVERSATION_ID", "routingType": "ROUTING_TYPE", "routingCorrelationId": "EVENT_ID" }, "agentActionVisibilities": [{ "agentAction": "Transfer", "visible": true }] } ``` ```json { "userId": "USER_ID", "workItemId": "WORK_ITEM_ID", "agentActionVisibilities": [{ "agentAction": "Conference", "visible": false }] } ``` **See Also** - [Interaction Service API](https://developer.salesforce.com/docs/service/interaction-service-api/guide/get-started.html) - _GitHub_: [Interaction Service APIs](https://github.com/salesforce-misc/interaction-service-apis) # Edit an Online Version of a Primary Article Creates a draft copy of the online version of a primary article. This does not unpublish the online version. ## URI ```nolang /services/data/v25.0/knowledgeManagement/articleVersions/masterVersions ``` ## Formats JSON, XML ## HTTP Method POST ## Authentication `Authorization: OAuth {accesstoken}` ## Parameters | Parameter | Description | | --------- | ---------------------- | | articleId | The ID of the article. | ## Input ```nolang { "articleId": } ``` # Embedded Service Chat SDK for Android Developer Guide The Embedded Service Chat SDK for Mobile Apps makes it easy to give customers access to powerful chat features right from within your native app. This guide helps you get started using the SDK in your mobile app. **important:** 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](https://help.salesforce.com/s/articleView?id=service.miaw_intro_landing.htm&type=5) before that date. Messaging offers many of the [chat features](https://help.salesforce.com/s/articleView?id=service.miaw_chat_vs_messaging.htm&type=5) that you love plus asynchronous conversations that can be picked back up at any time. Learn about chat retirement in [Help](https://help.salesforce.com/s/articleView?id=001790618&type=1). **October 2023 Release (Version 224.2.6)** This documentation describes the | Component | Version Number | | --------- | -------------- | | Chat | 4.3.6 | | Common | 8.0.6 | **See Also** - [Service SDK for Android Release Notes](https://github.com/forcedotcom/ServiceSDK-Android/releases) - [Service SDK for Android Reference Documentation](https://forcedotcom.github.io/ServiceSDK-Android/) - [Service SDK for iOS Developer Guide](https://developer.salesforce.com/docs/atlas.en-us.service_sdk_ios.meta/service_sdk_ios/servicesdk_ios_dev_guide.htm) # Embedded Service Chat SDK for iOS Developer Guide The Embedded Service Chat SDK for Mobile Apps makes it easy to give customers access to powerful chat features right from within your native app. This guide helps you get started using the SDK in your mobile app. **important:** 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](https://help.salesforce.com/s/articleView?id=service.miaw_intro_landing.htm&type=5) before that date. Messaging offers many of the [chat features](https://help.salesforce.com/s/articleView?id=service.miaw_chat_vs_messaging.htm&type=5) that you love plus asynchronous conversations that can be picked back up at any time. Learn about chat retirement in [Help](https://help.salesforce.com/s/articleView?id=001790618&type=1). **October 2023 Release (Version 246.0.0)** This documentation describes the Service Chat SDK, which uses the following components. | Component | Version Number | | ----------- | -------------- | | Chat | 4.1.2 | | ServiceCore | 4.2.8 | **note:** If you are using Xcode 12.3 or later, you must install the SDK using XCFramework files. To learn more, review the [installation instructions](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/ios-sdk-install-overview.md). **See Also** - [Service SDK for iOS Release Notes](https://github.com/forcedotcom/ServiceSDK-iOS/releases) - [Service SDK for iOS Reference Documentation](https://forcedotcom.github.io/ServiceSDK-iOS/) - [Service SDK for Android Developer Guide](https://developer.salesforce.com/docs/atlas.en-us.service_sdk_android.meta/service_sdk_android/servicesdk_android_dev_guide.htm) # Employee Represents an employee within a company or organization. This object is available in API version 48.0 and later. In API version 49.0 and later, this object supports reports, criteria-based sharing rules, and history tracking, plus you can exclude individual fields from custom page layouts. ## Supported Calls `create()`, `delete()`, `describeLayout()`, `describeSObjects()`, `getDeleted()`, `getUpdated()`, `query()`, `retrieve()`, `search()` `undelete()`, `update()`, `upsert()` ## Special Access Rules To access this object, you must have a Workplace Command Center permission set license and the Provides access to Workplace Command Center features system permission or have the Employee Management and Employee User add-on licenses. ## Fields | Field | Type | Properties | Description | | -------------------------- | --------- | ------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | AboutMe | textarea | Create, Filter, Group, Nillable, Sort, Update | Information about the employee, such as areas of interest or skills. Values can be provided on Employee’s profile page. This field is available even if Chatter is disabled. | | AlternateEmail | email | Create, Filter, Group, Nillable, Sort, Update | The employee’s alternate email address. | | Availability | picklist | Create, Filter, Group, Nillable, Sort, Update | The employee’s availability status.Possible values are:
  • `In The Office`
  • `Out Of Office`
  • `Out Sick`
  • `PTO`
  • `Volunteering Time Off`
  • `Working Remotely`
| | AvailabilityEndDate | dateTime | Create, Filter, Nillable, Sort, Update | The end date of the Employee’s availability, inclusive of the date. | | AvailabilityStartDate | dateTime | Create, Filter, Nillable, Sort, Update | The start date of the Employee’s availability, inclusive of the date. | | BannerPhotoUrl | url | Filter, Nillable, Sort | Read only. The URL for the employee's banner photo. Available in API v51.0 and later. | | CurrentWellnessStatus | picklist | Create, Filter, Group, Nillable, Sort, Update | The employee’s current wellness status.Possible values are:
  • `Available To Work`
  • `Remote Work Only`
  • `Unavailable`
  • `Unknown`
| | DateOfBirth | date | Create, Filter, Group, Nillable, Sort, Update | The employee’s date of birth. | | Email | email | Create, Filter, Group, idLookup, Nillable, Sort, Update | The employee’s email address. This field is unique within your organization. | | EmployeeNumber | string | Create, Filter, Group, idLookup, Sort, Update | Required. The employee's employment ID for the organization they were hired into. This field is unique within your organization. | | EmployeeStatus | picklist | Create, Filter, Group, Sort, Update | Required. The employee's current work status.Possible values are:
  • `Active`
  • `Inactive`
  • `Leave`
  • `Terminated`
| | EmploymentType | picklist | Create, Filter, Group, Nillable, Sort, Update | The employee's full-time or part-time status.Possible values are:
  • `Full-Time`
  • `Part-Time`
| | FirstName | string | Create, Filter, Group, Sort, Update | Required. The employee’s first name. | | FullPhotoUrl | url | Filter, Nillable, Sort | Read only. The URL for the employee's profile photo. The URL is updated every time a photo is uploaded and reflects the most recent photo. If a newer photo has been uploaded, the URL returned for an older photo isn’t guaranteed to return a photo. Query this field for the URL of the most recent photo. Available in API v51.0 and later. | | Gender | picklist | Create, Filter, Group, Nillable, Sort, Update | The employee’s gender.Possible values are:
  • `Female`
  • `Male`
  • `Non-Binary / Non-Conforming`
  • `Other`
  • `Prefer Not to State`
  • `Transgender Female`
  • `Transgender Male`
| | HomeAddress | address | Filter, Nillable | The employee’s home address. | | HomeCity | string | Create, Filter, Group, Nillable, Sort, Update | The city for the employee’s home address. | | HomeCountry | string | Create, Filter, Group, Nillable, Sort, Update | The county for the employee’s home address. | | HomeGeocodeAccuracy | picklist | Create, Filter, Group, Nillable, Restricted picklist, Sort, Update | The level of accuracy of an employee’s home address geographical coordinates compared with its physical address. A geocoding service typically provides this value based on the address’s latitude and longitude coordinates.Possible values are:
  • `Address`
  • `Block`
  • `City`
  • `County`
  • `ExtendedZip`
  • `NearAddress`
  • `Neighborhood`
  • `State`
  • `Street`
  • `Unknown`
  • `Zip`
| | HomeLatitude | double | Create, Filter, Nillable, Sort, Update | Used with HomeLongitude to specify the precise geolocation of the employee’s home address. Acceptable values are numbers between –90 and 90 with up to 15 decimal places. | | HomeLongitude | double | Create, Filter, Nillable, Sort, Update | Used with HomeLatitude to specify the precise geolocation of the employee’s home address. Acceptable values are numbers between –180 and 180 with up to 15 decimal places. | | HomePhone | phone | Create, Filter, Group, Nillable, Sort, Update | The employee’s home phone number. | | HomePostalCode | string | Create, Filter, Group, Nillable, Sort, Update | The postal code for the employee’s home address. | | HomeState | string | Create, Filter, Group, Nillable, Sort, Update | The state for the employee’s home address. | | HomeStreet | textarea | Create, Filter, Group, Nillable, Sort, Update | The street for the employee’s home address. | | IndividualId | reference | Create, Filter, Group, Nillable, Sort, Update | A reference to the Individual record that this employee is assigned to. | | InternalOrganizationUnitId | reference | Create, Filter, Group, Nillable, Sort, Update | A reference to the InternalOrganizationUnit this employee is assigned to. | | JobProfile | picklist | Create, Filter, Group, Nillable, Sort, Update | The employee’s job profile at the company. | | LastName | string | Create, Filter, Group, Sort, Update | Required. The employee’s last name. | | LastReferencedDate | dateTime | Filter, Nillable, Sort | The timestamp for when the current user last viewed a record related to this record. | | LastViewedDate | dateTime | Filter, Nillable, Sort | The timestamp for when the current user last viewed this record. If this value is null, this record might only have been referenced (LastReferencedDate) and not viewed. | | LocationId | reference | Create, Filter, Group, Nillable, Sort, Update | A reference to the Location that this employee is assigned to. | | ManagerId | reference | Create, Filter, Group, Nillable, Sort, Update | A reference to the Employee record of the employee's manager. | | MediumPhotoUrl | url | Filter, Nillable, Sort | Read only. The URL for the medium-sized employee's profile photo. The URL is updated every time a photo is uploaded and reflects the most recent photo. If a newer photo has been uploaded, the URL returned for an older photo isn’t guaranteed to return a photo. Query this field for the URL of the most recent photo. Available in API v51.0 and later. | | MiddleName | string | Create, Filter, Group, Nillable, Sort, Update | The employee’s middle name. | | Name | string | Filter, Group, idLookup, Nillable, Sort | A compound field of `Employee.FirstName`, `Employee.MiddleName`, and `Employee.LastName`. | | NameSuffix | string | Create, Filter, Group, Nillable, Sort, Update | The employee’s suffix. | | OutOfOfficeMessage | string | Create, Filter, Group, Nillable, Sort, Update | The message portion of the employee availability. This message can provide reasons or details about the change in availability. The maximum length of this string is 40 characters. | | OwnerId | reference | Create, Defaulted on create, Filter, Group, Sort, Update | The ID of the user who currently owns this record. Default value is the user logged in to the API to perform the create operation. | | PreferredFirstName | string | Create, Filter, Group, Nillable, Sort, Update | The name the employee prefers to be called. | | PreferredPronoun | picklist | Create, Filter, Group, Nillable, Sort, Update | The employee's preferred pronoun.Possible values are:
  • `He/Him/His`
  • `Other/Ask Me`
  • `She/Her/Hers`
  • `They/Them/Theirs`
| | RelatedPersonId | reference | Create, Filter, Group, Nillable, Sort, Update | Links an employee to a person account with a unique value. Reserved for future use. Don’t edit it. | | SmallPhotoUrl | url | Filter, Nillable, Sort | Read only. The URL for the small-sized employee's profile photo. The URL is updated every time a photo is uploaded and reflects the most recent photo. If a newer photo has been uploaded, the URL returned for an older photo isn’t guaranteed to return a photo. Query this field for the URL of the most recent photo. Available in API v51.0 and later. | | StatusAsOf | dateTime | Create, Filter, Sort, Update | Required. Start date of the employee’s current status. | | StatusEndDate | dateTime | Create, Filter, Nillable, Sort, Update | Planned end date for the employee’s status. | | TimeZone | picklist | Create, Filter, Group, Nillable, Restricted picklist, Sort, Update | The time zone which the employee’s work hours fall within. | | UserId | reference | Create, Filter, Group, Nillable, Sort, Update | Lookup field to associate an Employee record with a user in the org. The field is optional and unique. | | WorkPhone | phone | Create, Filter, Group, Nillable, Sort, Update | The employee's formatted work phone number including country code and extension. | | WorkerType | picklist | Create, Filter, Group, Restricted picklist, Sort, Update | Required. The type of worker for the employee.Possible values are:
  • `Alumnus`
  • `Contractor`
  • `Employee`
  • `Intern`
  • `Temporary`
| | WorkingHoursEnd | picklist | Create, Filter, Group, Nillable, Restricted picklist, Sort, Update | The end time of the employee’s working hours. | | WorkingHoursStart | picklist | Create, Filter, Group, Nillable, Restricted picklist, Sort, Update | The start time of the employee’s working hours. | ## Associated Objects This object has the following associated objects. Unless noted, they’re available in the same API version as this object. - EmployeeHistory (API version 49.0) - : History is available for tracked fields of the object. - EmployeeOwnerSharingRule - : Sharing rules are available for the object. - EmployeesShare (API version 49.0) - : Sharing is available for the object. **See Also** - [Employee Custom Fields](https://developer.salesforce.com/docs/service/workdotcom-dev/guide/wdc-cc-sforce-api-objects-employee.md) # Employee Work.com uses the Employee standard object to track information about users who are students, volunteers, and other roles in addition to employees. Some managed packages also install custom fields for the Employee standard object. A Location\_\_c field relates an employee (or user with another role) to a location. ## Custom Fields
FieldTypePropertiesDescription
wkcc\_\_CurrentWellnessStatusAsOf\_\_cdateTimeCreate, Filter, Nillable, Sort, Update

Indicates the date and time of the last wellness status update for the employee. This field is updated automatically when the employee responds to a survey with their wellness status. Salesforce admins can update the field manually, when needed, along with or independently of the CurrentWellnessStatus standard field on Employee.

This field isn't part of the default Employee page layout. To add this field, edit the page layout for Employee.

This value is stored in GMT time but is shown to users in local time. Available in API version 50.0 and later.

wkcc\_\_IndividualRole\_\_cpicklistCreate, Filter, Group, Nillable, Restricted picklist, Sort, UpdateDenotes the role of an individual to support sending surveys by role to one or more selected locations. The initial value is Employee, but you can add picklist values for the roles you need, such as Student, and set a default value. The values are available when you send a survey to a location, so you can focus the survey on individuals with the assigned role.
wkcc\_\_ReadyToReturn\_\_cbooleanCreate, Defaulted on create, Filter, Group, Sort, UpdateIndicates whether an employee is ready to work at their assigned workplace location (true) or not (false). The default value is false. This field isn’t included by default on the employee page layout. Available in API version 50.0 and later.
wkdw\_\_DisplayName\_\_cstringAggregatable, Filter, SortDisplay name of the user. The value is a concatenation of PreferredFirstName and LastName. If PreferredFirstName doesn’t have a value, the formula field uses FirstName instead. Requires the Employee Workspace managed package.
# Employee Concierge Data Triggers When the Employee Concierge managed package is installed, data triggers on the Employee and Case objects are added. We recommend using the default settings for the Employee Concierge triggers. ## Case Trigger When a new ticket is created, `wkdw__CaseTrigger` automatically shares that ticket with the associated employee. ## Employee Trigger When a new employee record is added in your org, `wkdw__EmployeeTrigger` creates a person account. This trigger also updates an existing person account if the related employee record is edited. ## Impact of Enabling or Disabling Employee Concierge Triggers By default, `wkdw__CaseTrigger` and `wkdw__EmployeeTrigger` are enabled in your org. Although it’s possible to edit these settings, we recommend using the default trigger settings. Employee Concierge features don’t work as expected unless your org uses the default trigger settings. If `wkdw__CaseTrigger` is disabled, any case created by or for an employee isn't automatically shared with that person. Cases created when the trigger is disabled must be manually shared for an employee to access the related tickets. Disable or re-enable this trigger using the Case Sharing Disabled option (wkdw\_\_IsCaseSharingDisabled\_\_c) found under the Custom Settings menu in your org. If `wkdw__EmployeeTrigger` is disabled, person account records aren’t created or updated when you add or update employee records. If you add or edit employee records after disabling the trigger, use the Concierge Settings sync option to create or update person accounts. Disable or re-enable this trigger using the Employee Person Account Sync Disabled option (wkdw\_\_IsPersonAccountSyncDisabled\_\_c) found under the Custom Settings menu in your org. # EmployeeCrisisAssessment Represents a crisis assessment of an Employee. This object is available in API version 48.0 and later. In API version 49.0 and later, this object supports reports, criteria-based sharing rules, and history tracking, plus you can exclude individual fields from custom page layouts. For Work.com, when an employee responds to a wellness survey, an EmployeeCrisisAssessment record is created based on an employee's answers. ## Supported Calls `create()`, `delete()`, `describeLayout()`, `describeSObjects()`, `getDeleted()`, `getUpdated()`, `query()`, `retrieve()`, `undelete()`, `update()`, `upsert()` ## Special Access Rules To access this object, you must be assigned a Workplace Command Center permission set license and the Provides access to Workplace Command Center features system permission. ## Fields |Field|Type|Properties|Description| |-----|----|----------|-----------| |Assessment|picklist|Create, Filter, Group, Nillable, Sort, Update|The employee's COVID-19 status at the time of the assessment. Possible values are:
  • `COVID-19 Immune or Recovered`
  • `COVID-19 No Symptoms`
  • `COVID-19 Symptoms or Exposed`
  • `COVID-19 Test Negative`
  • `COVID-19 Test Positive`
  • `Declined`
| |AssessmentDate|dateTime|Create, Filter, Sort, Update|The date of the assessment. Required| |AssessmentNumber|string|Autonumber, Defaulted on create, Filter, idLookup, Sort|The assessment record number.| |CrisisId|reference|Create, Filter, Group, Nillable, Sort, Update|The Crisis that this assessment is associated with.| |EmployeeId|reference|Create, Filter, Group, Sort, Update|Required. The Employee that this assessment is associated with.| |LastReferencedDate|dateTime|Filter, Nillable, Sort|The timestamp for when the current user last viewed a record related to this record.| |LastViewedDate|dateTime|Filter, Nillable, Sort|The timestamp for when the current user last viewed this record. If this value is null, this record might only have been referenced (LastReferencedDate) and not viewed.| |OwnerId|reference|Create, Defaulted on create, Filter, Group, Sort, Update|The ID of the user who currently owns this record. Default value is the user logged in to the API to perform the create operation.| |SourceAssessment|string|Create, Filter, Group, Nillable, Sort, Update|The record in the source system that drove this assessment.| |SourceSystem|string|Create, Filter, Group, Nillable, Sort, Update|The source system that drove this assessment.| ## Associated Objects This object has the following associated objects. Unless noted, they are available in the same API version as this object. - EmployeeCrisisAssessmentHistory (API version 49.0) - : History is available for tracked fields of the object. - EmployeeCrisisAssessmentOwnerSharingRule - : Sharing rules are available for the object. - EmployeeCrisisAssessmentShare (API version 49.0) - : Sharing is available for the object. # Enable and Configure Concurrent Scheduling You must enable concurrent scheduling to let users schedule multiple service appointments in the same time slot. Also, there are some things to keep in mind when you implement concurrent scheduling. For more information, see [Enable and Configure Concurrent Scheduling](https://help.salesforce.com/s/articleView?id=platform.ls_set_up_concurrent.htm&type=5) in Salesforce Scheduler Help. # Enable Appointment Distribution Make resource selection for territories with relatively large numbers of resources easier by setting Appointment Distribution to show only a short list of least-consumed resources from your resource pool. For information on enabling appointment distribution, see [Enable Appointment Distribution](https://help.salesforce.com/s/articleView?id=platform.ls_enable_appointment_distribution.htm&type=5). # Enable Bring Your Own Channel for CCaaS Enable Bring Your Own Channel for CCaaS to give Salesforce admins the ability to integrate partner messaging and voice channels into Salesforce contact centers. Enable Bring Your Own Channel for CCaaS by creating and packaging all the metadata needed for Salesforce admins to set up and configure the product. The steps to enable Bring Your Own Channel for CCaaS include creating a Dev Hub org and registering a namespace, then creating an OAuth-enabled Interaction Service external client app, a custom platform event, and ConversationVendorInfo and ContactCenterChannel records. The entire package is uploaded to AppExchange for Salesforce admins to download and install in their orgs. Before you continue, complete the requirements to [prepare your environment](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/introduction.md). # Enable Bring Your Own Channel for Messaging As a Messaging partner, enable Bring Your Own Channel for Messaging by creating and packaging all the metadata needed for Salesforce admins to set up and configure Bring Your Own Channel for Messaging. The steps to enable Bring Your Own Channel for Messaging include creating a Dev Hub org and registering a namespace, then creating an OAuth-enabled Interaction Service external client app, a custom platform event, and ConversationVendorInfo and ConversationChannelDefinition records. The entire package is uploaded to AppExchange for Salesforce admins to download and install in their orgs. Before you continue, complete the requirements to [prepare your environment](https://developer.salesforce.com/docs/service/messaging-partner/guide/introduction.md). **tip:** To create your own integration instead of packaging one for download on AppExchange, follow the steps in [Create Your Own Messaging Provider Integration](https://developer.salesforce.com/docs/service/messaging-partner/guide/create-your-own-integration.md). # Enable Concurrent Scheduling Enable concurrent scheduling so that users can use the dummy resource to schedule multiple appointments within the same time slot. For information on what to keep in mind when you implement concurrent scheduling, see [Enable and Configure Concurrent Scheduling](https://help.salesforce.com/s/articleView?id=platform.ls_set_up_concurrent.htm&type=5). 1. From Setup, in the Quick Find box, enter `Salesforce Scheduler`, and then select **Salesforce Scheduler Settings**. 2. Enable concurrent scheduling. # Enable Debug Logging for the Android SDK SDK logs are disabled by default. To enable logging, you add a sink and then specify a log level. Call [`addSink`](https://developer.salesforce.com/docs/service/service-sdk-android/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-Android/releases/common/8.0.5/api/reference/com/salesforce/android/service/common/utilities/logging/ServiceLogging.html#addSink(com.salesforce.android.service.common.utilities.logging.ServiceLoggingSink)>) to direct the debug logs to the specified sink. `LOG_CAT_SINK` directs all log messages to the Android logcat using the standard `Log.` calls. Set the log level with [`setLogLevel`](https://developer.salesforce.com/docs/service/service-sdk-android/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-Android/releases/common/8.0.5/api/reference/com/salesforce/android/service/common/utilities/logging/ServiceLogging.html#setLogLevel(int)>). For example: ```java ServiceLogging.addSink(ServiceLogging.LOG_CAT_SINK); ServiceLogging.setLogLevel(ServiceLogging.LEVEL_TRACE); ``` To direct the logs somewhere other than logcat, implement your own [`ServiceLoggingSink`](https://forcedotcom.github.io/ServiceSDK-Android/releases/common/8.0.5/api/reference/com/salesforce/android/service/common/utilities/logging/ServiceLoggingSink.html). To learn more about Android logging, see [Write and View Logs](https://developer.android.com/studio/debug/am-logcat.html). # Enable Debug Logging for the iOS SDK To configure the Service Chat SDK logs, set the `level` property on the `ServiceLogger` shared instance. Use the [`shared`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCServiceLogger.html#/c:objc(cs)SCServiceLogger(cpy)sharedLogger>) singleton on [`ServiceLogger`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCServiceLogger.html) to adjust the [`level`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCServiceLogger.html#/c:objc(cs)SCServiceLogger(py)level>). In Swift: ```java ServiceLogger.shared.level = .debug ``` In Objective-C: ```java [SCServiceLogger sharedLogger].level = SCSLoggerLevelDebug; ``` The log level is specified using the `SCSLoggerLevel` enumerated type. It can be one of these values: - `SCSLoggerLevelDebug` (`.debug` in Swift) - `SCSLoggerLevelInfo` (`.info` in Swift) - `SCSLoggerLevelError` (`.error` in Swift)—Default value - `SCSLoggerLevelFault` (`.fault` in Swift) - `SCSLoggerLevelOff` (`.off` in Swift) By default, logs go to the console output. You can have logs go to a file using the [`filehandle`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCServiceLogger.html#/c:objc(cs)SCServiceLogger(py)filehandle>) property. # Enable Maps and Location Services Salesforce Scheduler uses maps and location services to search for appointment locations (service territories).. For information on enabling maps and location services, see [Enable Maps and Location Services in Salesforce Scheduler](https://help.salesforce.com/s/articleView?id=platform.ls_provide_maps.htm&type=5). # Enable Multi-Resource Scheduling Enable the Multi-Resource Scheduling setting to let users schedule groups of resources for customer appointments. 1. From Setup, in the Quick Find box, enter Salesforce Scheduler, and then select **Salesforce Scheduler Settings**. 2. Enable **Multi-Resource Scheduling**. 3. Save your changes. # Enable Third-Party Bots for a Partner Contact Center As an alternative to setting up Salesforce AI agents and bots, admins can set up third-party bots in Salesforce partner contact centers with Bring Your Own Channel for Contact Center as a Service (CCaaS). This helps admins use the same partner vendor for backend contact center functionality and bots, while their reps have a familiar experience in Salesforce. If a third-party bot solves customer problems or requests during a Messaging session, the session isn't escalated to a rep. Alternatively, a customer can request to chat with a rep to escalate the Messaging session. Either way, partners send conversation entries and any message attachments to Salesforce. For Messaging sessions that don't get escalated, this information is useful for tracking metrics and collecting data. For a Messaging session that gets escalated to a rep, previous conversation entries between the customer and the third-party bot appear in the conversation component. These entries help the rep gather context quickly and act on the customer request more efficiently. To make third-party bots an option for reps helping customers in Messaging sessions, configure your environment to call Interaction Service API endpoints so they ingest historical conversation entries from a partner’s repository into Salesforce. 1. To create a new conversation, call the Establish Conversation API (`POST /api/v1/conversation`). Pass in the parameter `channelAddressIdentifier` and information about the `participants`. 2. To send the conversation history and transcript to Salesforce, call the Conversation History API (`POST /api/v1/conversationHistory`). - Pass in the parameters `channelAddressIdentifier`, `conversationParticipants`, and `conversationEntries`. - Pass a `displayName` and `participant` information for the third-party bot as part of the related `ConversationParticipant` payload in the Conversation History API request. This information helps to identify the bot in the transcript. - To send an attachment with a conversation entry, [upload the file](https://developer.salesforce.com/docs/atlas.en-us.uiapi.meta/uiapi/ui_api_features_records_content_document.htm) to Salesforce with the User Interface API. Then pass the attachment information in the `conversationEntries.entryPayload` of the Conversation History API request. The Conversation History API sends a maximum of five conversation entries for a maximum of three Messaging session participants and associates the entries with a Messaging session record. As part of the first call to the Conversation History API, the response includes a Messaging session ID. In case of escalation, use the Messaging session ID to route the conversation to a rep. While routing is in progress, you can continue calling the Conversation History API with the same session ID to complete the upload of transcript to Salesforce. If needed, call the endpoint repeatedly until the full conversation history is sent to Salesforce. **tip:** Upload the transcript in reverse order, first uploading the latest message and then earlier messages. This helps the rep see the latest conversation in case routing happens before the entire transcript is uploaded. **See Also** - _Interaction Service API_: [Send Historical Conversation Entries](https://developer.salesforce.com/docs/service/interaction-service-api/references/interaction-service-reference/api-conversationHistory.html) - _GitHub_: [Interaction Service APIs](https://github.com/salesforce-misc/interaction-service-apis) # enableClickToDial() for Lightning Experience ## Usage Enables click-to-dial. This method is available in API version 38.0 or later. **note:** You can use this method with the Lightning web component `lightning-click-to-dial`. You can also use it with the Aura component `lightning:clickToDial`. Keep in mind that you can’t use either component in iFrames. This method can’t be used with the Visualforce component `support:clickToDial`. ## Syntax ```javascript sforce.opencti.enableClickToDial({ callback: FUNCTION //Optional }) ``` ## Arguments |Name|Type|Description| |------|------|-------------| |`callback`|function|JavaScript method executed when the API method call is completed.| ## Sample Code–HTML and JavaScript ```html ``` ## Response This method is asynchronous. The response is returned in an object passed to a callback method. The response object contains the following fields. |Name|Type|Description| |------|------|-------------| |`success`|boolean|Returns `true` if the API method call was invoked successfully, `false` otherwise.| |`returnValue`|object|This API method doesn’t return this object. The `returnValue` is always `null`.| |`errors`|array|If the API call was successful, this variable is `null`. If the API call failed, this variable returns an array of [error messages](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-error-messages-lightning.md).| # enableClickToDial() for Salesforce Classic ## Usage Enables click-to-dial. ## Syntax ```javascript sforce.interaction.cti.enableClickToDial( (optional) callback:function ) ``` ## Arguments |Name|Type|Description| |------|------|-------------| |`callback`|function|JavaScript method executed when the API method call is completed.| ## Sample Code–JavaScript ```javascript ``` ## Response This method is asynchronous. The response is returned in an object passed to a callback method. The response object contains the following fields. |Name|Type|Description| |------|------|-------------| |`result`|boolean|`true` if click-to-dial was enabled, `false` if click-to-dial wasn’t enabled.| |`error`|string|If the API call was successful, this variable is undefined. If the API call failed, this variable returns an error message.| # enableModal() for Lightning Experience Toggles modal mode for a utility. While in modal mode, an overlay blocks users from using the console while the utility panel is visible. This method is available for Lightning Web Components (LWC) only. ## Arguments |Name|Type|Description| |----|----|-----------| |`utilityId`|string|The ID of the utility for which to toggle modal mode.| |`enabled`|boolean|Specifies whether to enable the utility's modal mode.| ## LWC Sample Code This component toggles modal mode in a utility bar. ```javascript import { LightningElement, wire } from 'lwc'; import { enableModal, EnclosingUtilityId } from 'lightning/platformUtilityBarApi'; export default class EnableModalExample extends LightningElement { @wire(EnclosingUtilityId) utilityId; isModalEnabled = false; async handleToggle() { const enable = !this.isModalEnabled; this.isModalEnabled = enable; await enableModal(this.utilityId, enable); } } ``` To make your component available for use in a utility bar, specify the `lightning__UtilityBar` target in the [component’s configuration file](https://developer.salesforce.com/docs/platform/lwc/guide/use-config-for-utility-bar.html). ## Response Returns a promise that resolves to `true` if successful. The promise is rejected on error. # enablePopout() for Lightning Experience Toggles pop-out mode on a utility. Enabling pop-out mode on a utility displays the utility in a separate child window. This method is available for Lightning Web Components (LWC) only. ## Arguments Optional parameters are passed into an object as the last argument of the method. |Name|Type|Description| |----|----|-----------| |`utilityId`|string|The ID of the utility for which to toggle pop-out mode.| |`enabled`|boolean|Specifies whether to enable the utility's modal mode.| |`disabledText`|string|Optional. Hover text for pop-out button when the utility is not enabled for pop-out mode.| ## LWC Sample Code This component toggles modal mode in a utility bar. ```javascript import { LightningElement, wire } from 'lwc'; import { enablePopout, EnclosingUtilityId } from 'lightning/platformUtilityBarApi'; export default class EnablePopoutExample extends LightningElement { @wire(EnclosingUtilityId) utilityId; enable = true; async handleToggle() { const enable = !this.isPopoutEnabled; await enablePopout(this.utilityId, enable, { disabledText: 'disabled' }); this.isPopoutEnabled = enable; } } ``` To make your component available for use in a utility bar, specify the `lightning__UtilityBar` target in the [component’s configuration file](https://developer.salesforce.com/docs/platform/lwc/guide/use-config-for-utility-bar.html). ## Response Returns a promise that resolves to `true` if successful. The promise is rejected on error. # `EnclosingTabId` Context Wire Adapter for Lightning Experience Returns the ID of the enclosing tab or subtab. This wire adapter is available for Lightning Web Components (LWC) only. To determine if the component is within a tab or subtab, use this context wire adapter. If a caller component isn’t using the wire adapter inside a tab or subtab, the enclosing utility tab ID is null. **tip:** To retrieve information about the tab or the subtab that a component is rendered in, first use `EnclosingTabId` instead of [`getFocusedTabInfo()`](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-lightning-getfocusedtabinfo.md). Then call [`getTabInfo()`](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-lightning-gettabinfo.md) and use the enclosing tab’s ID as the argument. By using `EnclosingTabId`, you make sure that the correct tab ID is returned when you work with lifecycle hooks such as `renderedCallback()` or `connectedCallback()`. ## LWC Sample Code To get the ID of the enclosing tab in LWC, use the `EnclosingTabId` wire adapter. This component retrieves the enclosing tab ID and closes the tab. ```javascript import { LightningElement, wire } from 'lwc'; import { EnclosingTabId, closeTab } from 'lightning/platformWorkspaceApi'; export class CloseEnclosingTabExample extends LightningElement { @wire(EnclosingTabId) enclosingTabId; handleClick() { // Ensure that we have a tab open if (!this.enclosingTabId) { return; } closeTab(this.enclosingTabId); } } ``` For another example that uses the `EnclosingTabId` wire adapter, see [openSubtab()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-lightning-opensubtab.md). To make your component available for use in a Lightning console app, specify the `lightning__AppPage` target in the [component’s configuration file](https://developer.salesforce.com/docs/platform/lwc/guide/use-config-for-console-app.html). ## Response This method returns a promise that, upon success, resolves to the `tabId` of the enclosing tab, if within a tab. If not within a tab, this method resolves to `false` upon success. **See Also** - [*LWC Dev Guide*: Understand the Wire Service](https://developer.salesforce.com/docs/platform/lwc/guide/data-wire-service-about.html) # EnclosingUtilityId Context Wire Adapter for Lightning Experience Determines if the component is within a utility. This wire adapter is available for Lightning Web Components (LWC) only. To obtain the ID of the enclosing utility, use this context wire adapter. If a caller component isn’t using the wire adapter inside a panel, the enclosing utility ID is null. ## LWC Sample Code This component minimizes a utility bar panel using the enclosing utility ID and the [minimize()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-lwc-minimize.md) method. ```javascript import { LightningElement, wire } from 'lwc'; import { EnclosingUtilityId, minimizeUtility } from 'lightning/platformUtilityBarApi'; export default class MinimizeUtilityExample extends LightningElement { @wire(EnclosingUtilityId) utilityId; handleClick() { if (!this.utilityId) { return; } // Minimize the utility bar panel minimize(this.utilityId); } } ``` To make your component available for use in a utility bar, specify the `lightning__UtilityBar` target in the [component’s configuration file](https://developer.salesforce.com/docs/platform/lwc/guide/use-config-for-utility-bar.html). ## Response Returns the enclosing utility ID if the caller component is within a utility,  or `null` otherwise. **See Also** - [*LWC Dev Guide*: Understand the Wire Service](https://developer.salesforce.com/docs/platform/lwc/guide/data-wire-service-about.html) # End or Inactivate a Messaging Session Ends or suspends a messaging session. Use this API to end or suspend a messaging session while noting whether the action came from a Messaging End User or your partner system. The End or Inactivate a Messaging Session API doesn’t rely on an End Chat UI component interaction in Salesforce or the session inactivation timeout set by the Salesforce admin in the Messaging Channel. The partner system uses this API to notify Salesforce if a chat has ended or become inactive. The rep can then receive a status notification, start After Conversation Work, if enabled, and move on to the next session or work item. This API applies to the following products: - Bring Your Own Channel for Contact Center as a Service - Bring Your Own Channel for Messaging This API is available in version 65.0 and later. ## URI `v1/messagingSession` ## HTTP Method POST ## Headers ### Authorization (User-Level Authentication) **Format:** `Bearer ` String. Standard header. Used to authenticate the user, where `` is the Salesforce access token used as the bearer token to make requests to the Interaction Service APIs. Required. ### Content-Type **Format:** `application/json` String. Standard header. Format of the request payload. Required for any request that includes a body. ### OrgId **Format:** `` String. Custom header. The Salesforce org. `` is the 15-character Org ID of the Salesforce org. Required. ### RequestId **Format:** `` String. Custom header. Universally Unique Identifier (``) that references and tracks this request. Required. ### AuthorizationContext **Format:** `` String. Custom header. Additional information for the request authorization used to authenticate and validate requests against the connected app scopes. - For Bring Your Own Channel for CCaaS, set `` to the developer name of the ConversationChannelDefinition record. For example, Partner1_ChannelDefinition1. Required. - For Bring Your Own Channel for Messaging, set `` to the developer name of the ConversationChannelDefinition record. For example, Partner1_ChannelDefinition1. Required. ### Sample Header ``` -H $'Authorization: Bearer 00DSG000009SWby\!...LN8XxeRIxGe' \ -H "content-type: application/json" \ -H "OrgId: 00DSG000009SWby" \ -H "AuthorizationContext: Partner1_ChannelDefinition1" \ -H "RequestId: a1b23c45-c06a-4784-c96c-cb95d3321bda" \ ``` ## Parameters | Property Name | Type | Description | Required | | :----------------------- | :----- | :---------------------------------------------------------------------------------------------------------------------------------------------- | :------- | | channelAddressIdentifier | string | The globally unique ID (GUID) for the conversation channel (`MessagingChannel.ChannelAddressIdentifier`) field. Maximum size is 240 characters. | Yes | | endUserClientId | string | The end user client identifier. This value comes from the partner system and can be up to 240 characters long. | Yes | | conversationIdentifier | string | The unique ID for the conversation channel. | Yes | | sessionId | string | The messaging session ID. | No | | operation | string | Specifies the action to take on the messaging session. Valid values are:
- **End**
- **Inactivate** | Yes | | operationBy | string | Specifies where the operation originated from. Valid values are:
- **EndUser**
- **System** | No | ## Examples ### Request ```json { "channelAddressIdentifier": "", "endUserClientId": "", "conversationIdentifier": "", "operation": "End", "operationBy": "" } ``` ```json { "channelAddressIdentifier": "", "endUserClientId": "", "sessionId" : "", "conversationIdentifier": "", "operation": "Inactivate", "operationBy": "" } ``` ### Response ```json { "success": true } ``` ```json { "success": false, "ErrorReason": ACTIVE_CONVERSATION_NOT_FOUND } ``` If `success` is `false`, `ErrorReason` lists the reason why the Messaging session wasn’t successfully ended or inactivated. Valid values are: - `ACTIVE_CONVERSATION_NOT_FOUND` - `END_SESSION_FAILED` - `INTERNAL_ERROR` - `PERMISSION_DENIED` - `CHANNEL_ADDRESS_NOT_FOUND` - `SESSION_NOT_FOUND` - `END_USER_NOT_FOUND` - `ORG_NOT_FOUND` - `CONVERSATION_PRECONDITION_FAILED` - `CONVERSATION_PROCESSING_ABORTED` - `CHANNEL_ADDRESS_IS_INACTIVE` - `CUSTOMER_ERROR` ## See Also - _GitHub_: [Interaction Service APIs](https://github.com/salesforce-misc/interaction-service-apis) # End-of-Life Salesforce is committed to supporting each Salesforce Console Integration Toolkit version for a minimum of three years from the date of its first release. To improve the quality and performance of the Salesforce Console Integration Toolkit, versions that are more than three years old may not be supported. When a Salesforce Console Integration Toolkit version is scheduled to be unsupported, an advance end-of-life notice will be given at least one year before support for the version ends. Salesforce will directly notify customers using Salesforce Console Integration Toolkit versions scheduled for end of life. # endChat() Ends a chat in which an agent is currently engaged. Available in API version 29.0 or later. ## Syntax ```javascript sforce.console.chat.endChat(chatKey:String, (optional)callback:Function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`chatKey`|String|The chat key for the engaged chat you wish to end.| |`callback`|function|JavaScript method called upon completion of the method.| ## Sample Code–Visualforce ```apex_page End Chat ``` ## Response This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following properties: |Name|Type|Description| |----|----|-----------| |`success`|Boolean|`true` if ending the chat was successful; `false` if ending the chat wasn’t successful.| # endChat() for Lightning Experience Ends a chat in which an agent is currently engaged. This method works only in Lightning console apps. ## Arguments |Name|Type|Description| |----|----|-----------| |`argumentObj`|Object|An object containing all the arguments to be passed into this method.| ## `argumentObj` |Name|Type|Description| |----|----|-----------| |`recordId`|String|The ID of the chat that you want to end.| ## Sample Code This example ends the chat and logs the result. Component Code: ```html ``` Controller Code: ```javascript ({ endChat: function(cmp, evt, helper) { var conversationKit = cmp.find("conversationKit"); var recordId = cmp.get("v.recordId"); conversationKit.endChat({ recordId: recordId }) .then(function(result){ if (result) { console.log("Successfully ended chat"); } else { console.log("Failed to end chat"); } }); } }) ``` ## Response Returns a Promise. Success resolves to true. The Promise is rejected if there's an error. # endConversation() for LWC for Lightning Experience Ends the Messaging session. This method works only in Lightning console apps. ## Arguments |Name|Type|Description| |----|----|-----------| |`recordId`|String|The ID of the record for the Messaging session.| ## Response Returns a Promise. Success resolves to `true`. The Promise is rejected if there's an error. # EngagementChannelType Represents a channel through which a customer can be reached for communication. The Engagement Channel Type object supports only the English language. This object is available in API version 48.0 and later. ## Supported Calls `create()`, `delete()`, `describeLayout()`, `describeSObjects()`, `getDeleted()`, `getUpdated()`, `query()`, `retrieve()`, `search()`, `undelete()`, `update()`, `upsert()` ## Special Access Rules Salesforce Scheduler must be enabled. ## Fields ### ContactPointType - **Type**: picklist - **Properties**: Create, Filter, Group, Nillable, Restricted picklist, Sort, Update - **Description**: The contact point type of the channel. - **Possible values**: - `InPerson`—In Person - `Phone` - `Video` ### IsActive - **Type**: boolean - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: Indicates whether the engagement channel type is active (true) or not (false). This field is available in API version 56.0 and later. ### LastReferencedDate - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: The timestamp for when the current user last viewed a record related to this record. ### LastViewedDate - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: The timestamp for when the current user last viewed this record. If this value is null, it’s possible that this record was referenced `(LastReferencedDate)` and not viewed. ### Name - **Type**: string - **Properties**: Create, Filter, Group, idLookup, Sort, Update - **Description**: Required. Name of the communication subscription consent record. ### OwnerId - **Type**: reference - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: The ID of the account owner associated with this customer. This field is a polymorphic relationship field. - **Relationship Name**: Owner - **Relationship Type**: Lookup - **Refers To**: Group, User ### UsageType - **Type**: multipicklist - **Properties**: Create, Filter, Nillable, Update - **Description**: Specifies the usage of the engagement channel type. This field is available in API version 56.0 and later. - **Possible values**: - `Salesforce Scheduler` ## Associated Objects This object has the following associated objects. If the API version isn’t specified, they’re available in the same API versions as this object. Otherwise, they’re available in the specified API version and later. [EngagementChannelTypeFeed](https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_associated_objects_feed.htm): Feed tracking is available for the object. [EngagementChannelTypeHistory](https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_associated_objects_history.htm): History is available for tracked fields of the object. [EngagementChannelTypeShare](https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_associated_objects_share.htm): Sharing is available for the object. # EngagementChannelWorkType Represents the relationship between an Engagement Channel Type object and a Work Type object for Salesforce Scheduler. This object is available in API version 56.0 and later. ## Supported Calls `create()`, `delete()`, `describeLayout()`, `describeSObjects()`, `getDeleted()`, `getUpdated()`, `query()`, `retrieve()`, `search()`, `undelete()`, `update()`, `upsert()` ## Special Access Rules Salesforce Scheduler must be enabled. ## Fields ### AreAllEngmtChnlSupported - **Type**: boolean - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: Indicates whether the work type supports all engagement channels (`true`) or not (`false`). ### EngagementChannelTypeId - **Type**: reference - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The ID of the engagement channel type that’s related to the work type indicated in the `WorkTypeId` field. This field is a relationship field. - **Relationship Name**: EngagementChannelType - **Relationship Type**: Lookup - **Refers To**: EngagementChannelType ### LastReferencedDate - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: The date and time that the current user last viewed a record related to this object. ### LastViewedDate - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: The timestamp for when the current user last viewed this object. ### Name - **Type**: string - **Properties**: Autonumber, Defaulted on create, Filter, idLookup, Sort - **Description**: The name of this engagement channel-work type relationship. ### WorkTypeId - **Type**: reference - **Properties**: Create, Filter, Group, Sort - **Description**: The ID of the work type that’s related to the engagement channel type indicated in the `EngagementChannelTypeId` field. This field is a relationship field. - **Relationship Name**: WorkType - **Relationship Type**: Lookup - **Refers To**: WorkType ## Associated Objects This object has the following associated objects. If the API version isn’t specified, they’re available in the same API versions as this object. Otherwise, they’re available in the specified API version and later. [EngagementChannelWorkTypeFeed](https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_associated_objects_feed.htm): Feed tracking is available for the object. [EngagementChannelWorkTypeHistory](https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_associated_objects_history.htm): History is available for tracked fields of the object. # Enhance the Experience for Android You can enhance your users' experience by adding push notifications, passing information to Salesforce about a verified user, sending hidden pre-chat fields, adjusting chat button visibility based on business hours, and more. This article applies to the following implementations: | UI SDK | Core SDK | | :----: | :------: | | ✅ | ✅ | # Enhance the Experience for iOS You can enhance your users' experience by adding push notifications, passing information to Salesforce about a verified user, sending hidden pre-chat fields, adjusting chat button visibility based on business hours, and more. This article applies to the following implementations: | UI SDK | Core SDK | | :----: | :------: | | ✅ | ✅ | # Enhance the User Experience The Actions & Recommendations component gives your agents a clear set of steps to follow. Help your agents be more productive by fine-tuning how they use the list. - **[Show Users the Top Recommendations](https://developer.salesforce.com/docs/service/salesforce-guided-engagement/guide/guided-engagement-sample-user-nba.md)** You can show the top recommendations from your Einstein Next Best Action strategies in the Actions & Recommendations component. To display recommendations, configure a deployment in Setup or programmatically with the metadata type RecordActionDeployment. - **[Let Users Resume Paused Flows from the Actions & Recommendations Component](https://developer.salesforce.com/docs/service/salesforce-guided-engagement/guide/guided-engagement-sample-user-pausedflow.md)** When you configure Process Automation Settings, you can allow users to pause flows. Show agents paused flows associated with the current record page in the Actions & Recommendations component. When there’s a handoff or a customer calls back, the agent can easily find and resume the paused flow. The component shows all paused flows associated with the current record, including flows not started from the list. - **[Show Users Which Steps to Complete First or Last](https://developer.salesforce.com/docs/service/salesforce-guided-engagement/guide/guided-engagement-sample-user-pinned.md)** Pin actions to the top or bottom of the Actions & Recommendations component so that users know to complete them first or last. - **[Remind Users to Complete Mandatory Steps](https://developer.salesforce.com/docs/service/salesforce-guided-engagement/guide/guided-engagement-sample-user-mandatory.md)** Highlight required steps by configuring them as mandatory actions. When agents try to close a flow that’s mandatory, they see a reminder that the step is required. - **[Keep Steps Visible on Your List](https://developer.salesforce.com/docs/service/salesforce-guided-engagement/guide/guided-engagement-sample-user-removable.md)** Hide the remove option for actions that you want agents to complete. Agents can’t remove these steps, so they remain on the list unless they’re completed. - **[Find Another Action](https://developer.salesforce.com/docs/service/salesforce-guided-engagement/guide/guided-engagement-sample-user-add-action.md)** Sometimes a customer interaction requires a step that doesn’t appear in the Actions & Recommendations component. When an agent clicks Add, they can search for an action and start it. You can help users narrow their search by configuring a subset of actions. - **[View the Action History](https://developer.salesforce.com/docs/service/salesforce-guided-engagement/guide/guided-engagement-access-history.md)** See which actions were launched, by which agents, and when in the History tab on the Actions & Recommendations component. The History tab also shows the state, or status, for each action, so you can see when an action was started, paused, resumed, and completed. You also can access the action history for a record programmatically using the RecordActionHistory object. Enhanced Chat API Endpoints # Enhanced Chat API Endpoints Public REST API for Enhanced Chat **Version:** 2.0.0 ## Servers * `https://{scrt-url}` * ``scrt-url (default mycompanyname.salesforce-scrt.com) In the URI, set `{scrt-url}` to the URL in the Enhanced Chat custom client Embedded Service deployment code snippet. For example, `https://mycompanyname.salesforce-scrt.com`.`` Default security: ScrtAuth. ## Security * `ScrtAuth` (http) Authenticated by the JWT tokens generated by the service for individual clients. Use the header, `Authorization: Bearer `. String. Standard header. The authorization token, where `` is the access token (`accessToken`) provided by the [Generate access token](/docs/service/messaging-api/references/miaw-api-reference?meta=generateAccessTokenForAuthenticatedUser) or [Generate access token for unauthenticated user](/docs/service/messaging-api/references/miaw-api-reference?meta=generateAccessTokenForUnauthenticatedUser) Enhanced Chat API. Verify that the access token is valid and hasn't expired. Required where specified. * HTTP scheme: bearer (JSON Web Tokens) ## Operations ### POST Generates an access token. Use the access token as a bearer token to make requests to the Enhanced Chat APIs. `POST /iamessage/api/v2/authorization/authenticated/access-token` Operation ID: `generateAccessTokenForAuthenticatedUser`. Tags: authorizationV2. #### Request body (required) Media type: `application/json`. Schema: `AuthenticatedAccessTokenRequest`. #### Responses * **200** JWT issued. Media type: `application/json`. Schema: `AccessTokenResponse`. * **400** Bad request. * **401** Unauthenticated Request. * **403** Unauthorized Request. * **405** Method not allowed. * **500** Internal server error. * **503** Service unavailable. * **504** Gateway timeout. ### DELETE Revokes an access token that was generated for an authenticated user. `DELETE /iamessage/api/v2/authorization/authenticated/access-token` Operation ID: `revokeToken`. Tags: authorizationV2. #### Responses * **204** The JWT has been revoked. * **400** Bad request. * **401** Unauthenticated Request. * **405** Method not allowed. * **500** Internal server error. * **503** Service unavailable. * **504** Gateway timeout. ### POST Generates an access token for an unverified “guest” user. `POST /iamessage/api/v2/authorization/unauthenticated/access-token` Operation ID: `generateAccessTokenForUnauthenticatedUser`. Tags: authorizationV2. #### Request body (required) Media type: `application/json`. Schema: `UnauthenticatedAuthorizationRequest`. #### Responses * **200** JWT issued. Media type: `application/json`. Schema: `AccessTokenResponse`. * **400** Bad request. * **401** Unauthenticated Request. * **405** Method not allowed. * **500** Internal server error. * **503** Service unavailable. * **504** Gateway timeout. ### GET Generates a JSON Web Token (JWT). This endpoint supports web users using multiple tabs, and it doesn't extend the JWT expiration time. `GET /iamessage/api/v2/authorization/continuation-access-token` Operation ID: `generateContinuationToken`. Tags: authorizationV2. #### Responses * **200** JWT issued with same subject ID but different client ID. Media type: `application/json`. Schema: `ContinueAccessTokenResponse`. * **400** Bad request. * **401** Unauthenticated Request. * **405** Method not allowed. * **500** Internal server error. * **503** Service unavailable. * **504** Gateway timeout. ### POST Creates a conversation if it doesn't exist. This API can also pass pre-chat data in the form of routing attributes. `POST /iamessage/api/v2/conversation` Operation ID: `createConversation`. Tags: conversationV2. #### Request body (required) Media type: `application/json`. Schema: `CreateConversationRequest`. #### Responses * **201** The conversation was created successfully. * **400** Bad request data. * **401** Unauthenticated request. * **403** Unauthorized request. * **404** Not Found. * **409** The conversation is already closed. * **500** Internal server error. * **503** Service unavailable. * **504** Gateway timeout. ### POST Adds a typing indicator to notify participants when typing starts or stops. Add a “typing started” indicator to notify the reps or bots when the end user starts typing a message. Add a “typing stopped” indicator to notify the reps or bots when the end user stops typing. `POST /iamessage/api/v2/conversation/{conversationId}/entry` Operation ID: `addTypingIndicatorToAConversation`. Tags: conversationV2. #### Parameters * `conversationId` (path, string, required) The UUID of the conversation. The UUID must be in lowercase. #### Request body (required) Media type: `application/json`. Schema: `SendEntriesRequestApi`. #### Responses * **200** Successful publication of entry. * **400** Bad request data. * **401** Unauthenticated request. * **403** Unauthorized request. * **404** Not Found. * **500** Internal server error. * **503** Service unavailable. * **504** Gateway timeout. ### POST Sends a message from the end user to the rep or bot. The message is sent one at a time and each message can be in a different form, depending on the message type and its payload. `POST /iamessage/api/v2/conversation/{conversationId}/message` Operation ID: `sendMessage`. Tags: conversationV2. If the administrator has configured Enhanced Chat so that the pre-chat form appears with every session, this API can also pass pre-chat data in the form of routing attributes. The maximum request payload size for this API is 8 KB. #### Parameters * `conversationId` (path, string, required) The UUID of the conversation. The UUID must be in lowercase. Pattern: ^\[0-9a-f\]{8}-\[0-9a-f\]{4}-4\[0-9a-f\]{3}-\[89ab\]\[0-9a-f\]{3}-\[0-9a-f\]{12}$. _Example_ ``` 5461185f-abc6-4435-b1e1-3b3aa65719be ``` #### Request body (required) Media type: `application/json`. Schema: `SendMessageRequestApi`. #### Responses * **202** Successful publication of a message to a conversation. Media type: `application/json`. Schema: `SendMessageResponseApi`. * **400** Bad request. * **401** Unauthenticated Request. * **403** Unauthorized Request. * **417** No active messaging session present. Send the request with `isNewMessagingSession` value as true. * **500** Internal server error. * **503** Service unavailable. * **504** Gateway timeout. ### POST Sends a list of conversation entries with “delivery” acknowledgements and “read” receipts. Each conversation entry in the list indicates whether the entry from the rep or bot has been delivered to or read by the end user. `POST /iamessage/api/v2/conversation/{conversationId}/acknowledge-entries` Operation ID: `sendDeliveryAcknowledgementsOrReadReceipts`. Tags: conversationV2. #### Parameters * `conversationId` (path, string, required) The UUID of the conversation. The UUID must be in lowercase. #### Request body (required) Media type: `application/json`. Schema: `AcknowledgeEntriesRequestApi`. #### Responses * **200** Successful acknowledgement of read/delivery entry. * **400** Bad request. * **401** Unauthenticated Request. * **403** Unauthorized Request. * **500** Internal server error. * **503** Service unavailable. * **504** Gateway timeout. ### POST Sends a file attachment from the end user to the rep. `POST /iamessage/api/v2/conversation/{conversationId}/file` Operation ID: `sendFile`. Tags: conversationV2. This endpoint requires a `Content-Type: multipart/form-data` Standard header. Accepts non-ASCII or binary data to support file uploads. The multipart/form-data request body must contain two or more parts. Before you continue, verify that Inbound File Attachments is enabled for the Messaging channel. As of capabilitiesVersion 63, the endpoint supports the following file types: * image/bmp * image/gif * image/jpg * image/jpeg * image/png * image/tiff * application/csv * application/doc * application/docx * application/pdf * application/txt * application/xlsx * application/xml Files can only be sent one at a time, and the maximum size of each file is 5 MB. Here's an example cURL command: ``` curl --location 'https://esw-sdb3-blitz.test1.my.pc-rnd.salesforce-scrt.com/iamessage/api/v2/conversation/4baa7397-a02e-4f93-9926-966870b2f8e8/file' \ --header Authorization: Bearer --header 'Cookie: JSESSIONID=node01y2kzj3uoh4uromf49vqpappc25.node0' \ --form 'messageEntry=" { \"message\": { \"id\": \"376ac270-f583-4216-86f7-c758cc2888bc\", \"fileId\": \"d9f9ab91-5f10-4199-9ad4-12cf565fa97d\", \"text\": \"Hello\", \"inReplyToMessageId\": \"59b98322-c7ed-4116-8499-9e8c98f6851d\" }, \"isNewMessagingSession\": false, \"esDeveloperName\": \"miawAPI\" }";type=application/json' \ --form 'fileData=@"/User//Downloads/ConversationTranscript.pdf"' ``` #### Parameters * `conversationId` (path, string, required) The UUID of the conversation. The UUID must be in lowercase. Pattern: ^\[0-9a-f\]{8}-\[0-9a-f\]{4}-4\[0-9a-f\]{3}-\[89ab\]\[0-9a-f\]{3}-\[0-9a-f\]{12}$. _Example_ ``` 5461185f-abc6-4435-b1e1-3b3aa65719be ``` #### Request body (required) Media type: `multipart/form-data`. Schema: `object`. * `messageEntry` (_SendFilesRequestApi_, required) * `fileData` (_string (binary)_, required) The file you want to upload. Content type is `application/octet-stream`. _Example_ ``` Content-Disposition: form-data; name="messageEntry"; Content-Type: application/json { "esDeveloperName": "myDeployment", "message": { "id": "bd8f4890-2640-4d94-8ac0-915155b672e8", "fileId": "6fc22906-c24a-4c53-b382-fd091dacd848", "text": "Lights on my broken router look like this", "inReplyToMessageId": "a133c185-73a7-4adf-b6d9" }, "routingAttributes": { "_firstName": "John" }, "isNewMessagingSession": true, "language" : "en_US" } Content-Type: application/octet-stream Content-Disposition: form-data; name="fileData"; filename=7123025_logo_google_g_icon.png; ``` #### Responses * **202** Successful publication of a file to a conversation. Media type: `application/json`. Schema: `SendMessageResponseApi`. * **400** Bad request. * **401** Unauthenticated Request. * **403** Unauthorized Request. * **415** Unsupported type. * **500** Internal server error. * **503** Service unavailable. * **504** Gateway timeout. ### GET Retrieves the routing status of the specified conversation. `GET /iamessage/api/v2/conversation/{conversationId}` Operation ID: `retrieveConversationRoutingStatus`. Tags: queryV2. #### Parameters * `conversationId` (path, string, required) The UUID of the conversation. The UUID must be in lowercase. #### Responses * **200** Successful retrieval of the routing status. Media type: `application/json`. Schema: `ConversationStatusResponse`. * **400** Bad request data. * **401** Unauthenticated request. * **403** Unauthorized request. * **404** Not Found. * **500** Internal server error. * **503** Service unavailable. * **504** Gateway timeout. ### DELETE Closes a conversation between an end user and a rep. After a conversation is closed, end users and reps can no longer send messages in this conversation. Instead, they must start a new conversation. `DELETE /iamessage/api/v2/conversation/{conversationId}` Operation ID: `closeConversation`. Tags: conversationV2. #### Parameters * `esDeveloperName` (query, string, required) The API name of the Enhanced Chat Embedded Service deployment. The name can contain alphanumeric characters and underscores, and must begin with a letter. The deployment type that's associated with the `esDeveloperName` deployment must match the `deploymentType` in the access token. Verify that the Embedded Service deployment is configured to support the request. * The deployment type for the Embedded Service deployment must be set to Custom Client. If properly configured, after you send the request, `deploymentType` in the response will be set to `api`. If `deploymentType` isn't set to `api`, create an Embedded Service deployment or use another deployment with deployment type set to Custom Client. See [Configure a Custom Client Deployment for Enhanced Chat](https://help.salesforce.com/s/articleView?id=service.miaw_deployment_custom.htm) for more information. _Example_ ``` {esDeveloperName} ``` * `conversationId` (path, string, required) The UUID of the conversation to close. The UUID must be in lowercase. #### Responses * **204** The conversation was closed successfully. * **400** Bad request data. * **401** Unauthenticated request. * **403** Unauthorized request. * **404** Not Found. * **500** Internal server error. * **503** Service unavailable. * **504** Gateway timeout. ### DELETE Ends a messaging session within a conversation between an end user and a rep. `DELETE /iamessage/api/v2/conversation/{conversationId}/session` Operation ID: `endMessagingSession`. Tags: conversationV2. This endpoint enables end users to end a messaging session, indicating that they have ended the engagement. Ending a messaging session doesn’t close the conversation. The conversation remains open until it’s actively closed. See [Close conversation](/docs/service/messaging-api/references/miaw-api-reference?meta=closeConversation) for more information. While open, authenticated users and reps can continue the conversation through an unlimited number of messaging sessions. #### Parameters * `conversationId` (path, string, required) The UUID of the conversation to close the messaging session. The UUID must be in lowercase. * `esDeveloperName` (query, string, required) Required. The API name of the Enhanced Chat Embedded Service deployment. For example, esDeveloperName: "embeddedServiceDeveloperName". _Example_ ``` {esDeveloperName} ``` #### Responses * **204** No Content Empty. * **400** The esDeveloperName must be associated with a Messaging channel. * **401** Unauthenticated request. * **403** End user not found. The JWT is valid but the end user doesn't exist. * **404** Not Found. * **500** An internal error occurred. Contact Salesforce Customer Support. * **503** Service unavailable. * **504** Gateway timeout. ### GET Returns a list of all conversations for a specific end user. This API is useful to determine if an end user is part of a specific conversation. The list is always returned in chronological ascending order. `GET /iamessage/api/v2/conversation/list` Operation ID: `listConversations`. Tags: queryV2. #### Parameters * `inclClosedConvs` (query, boolean) Optional. Indicates whether the list of conversations returned should include conversations that end users have closed. The default value is false. Default: `false`. * `limit` (query, integer (int32)) Optional. The maximum number of conversations to retrieve. For example, limit: 50. The value must be between 1-50. The default value is 20. * `conversationId` (query, string) Optional. The UUID of the conversation. The UUID must be in lowercase. Specify this value to filter the list to just conversations with the UUID. If the value isn't specified, the endpoint returns all conversations. * `startTimestamp` (query, integer (int64)) Optional. The start date and time (in UTC) used to determine which conversations to include in the response. Conversations that start on or after the specified start date and time are included in the list of conversations returned. For example, startTimestamp: 1641347196100. The start date and time can't be less than zero (0) or greater than the current time in milliseconds. If the value isn't specified, it takes the conversation from the very beginning. * `endTimestamp` (query, integer (int64)) Optional. The end date and time (in UTC) used to determine which conversations to include in the response. Conversations that start on or before the specified end date and time are included in the list of conversations returned. For example, endTimestamp: 1641347606585. The end timestamp can't be less than zero (0) or less than the start timestamp. If the value isn't specified, it defaults to the current timestamp. #### Responses * **200** Supported http request methods. Media type: `application/json`. Schema: `ListConversationResponse`. * **400** Bad request data. * **401** Unauthenticated Request. * **403** Unauthorized Request. * **500** Internal server error. * **503** Service unavailable. * **504** Gateway timeout. ### GET Lists conversation entries for the specified conversation. `GET /iamessage/api/v2/conversation/{conversationId}/entries` Operation ID: `listConversationEntries`. Tags: queryV2. Users are only able to query the conversation entries that they've participated in. By default, the API returns 20 conversation entries at a time in reverse chronological order, starting with the newest conversation. To narrow down the list, use the query parameters to filter and customize the query. Note: The `entryTypeFilter` query parameter represents the type of conversation entries you want to display in the list. This parameter is optional. Valid values include `CloseConversation`, `ParticipantChanged`, `Message`, `RoutingResult`, `RoutingWorkResult`, and `SessionStatusChanged`. List multiple entryTypeFilter values as comma-separated values. If entryTypeFilter values aren't specified, the endpoint returns conversation entries for all conversation entry types. #### Parameters * `conversationId` (path, string, required) The UUID of the conversation. The UUID must be in lowercase. * `limit` (query, integer (int32)) Optional. The maximum number of conversation entries to retrieve. For example, limit: 50. The default value is 20. * `startTimestamp` (query, integer (int64)) Optional. The start date and time (in UTC) used to determine which conversations to include in the response. Conversations that start on or after the specified start date and time are included in the list of conversations returned. For example, startTimestamp: 1641347196100. The start date and time can't be less than zero (0) or greater than the current time in milliseconds. If the value isn't specified, it defaults to zero (0) and the API returns all conversations irrespective of the startTimestamp. * `endTimestamp` (query, integer (int64)) Optional. The end date and time (in UTC) used to determine which conversations to include in the response. Conversations that start on or before the specified end date and time are included in the list of conversations returned. For example, endTimestamp: 1641347606585. The end timestamp can't be less than zero (0) or less than the start timestamp. If the value isn't specified, it defaults to the current timestamp. * `direction` (query, string) Optional. Determines whether the API gets the entries starting with the newest one (FromEnd) or starting with the oldest one (FromStart) first within the specified endTimestamp and startTimestamp dates. The default value is FromEnd. * `entryTypeFilter (See Note)` (query, array of string, style: form, explode: true) Each item: Optional. The type of conversation entries you want to display in the list. You can derive these values from the entryType field in the response. List multiple entryType values as comma-separated values. For example, entryTypeFilter: 'Message', 'ParticipantChanged'. If the value isn't specified, the endpoint returns conversation entries for all event types. #### Responses * **200** Successful retrieval of the conversation entries. Media type: `application/json`. Schema: `GetConversationEntriesResponse`. * **400** Bad request. * **401** Unauthenticated Request. * **403** Unauthorized Request. * **500** Internal server error. ### GET Generates a transcript of the last 200 conversation entries. The transcript is generated into binary format and saved as a PDF file. `GET /iamessage/api/v2/conversation/{conversationId}/transcript` Operation ID: `retrieveConversationTranscript`. Tags: queryV2. Before you continue, verify that the administrator has turned on the ability to download transcripts for end users. See [Allow End Users to Download a Transcript of a Messaging Session](https://help.salesforce.com/s/articleView?id=service.miaw_download_transcript.htm) for more information. #### Parameters * `esDeveloperName` (query, string, required) The API name of the Enhanced Chat Embedded Service deployment. The name can contain alphanumeric characters and underscores, and must begin with a letter. Verify that the Embedded Service deployment is configured to support the request. * The deployment type for the Embedded Service deployment must be set to Custom Client. If properly configured, after you send the request, `deploymentType` in the response will be set to `api`. If `deploymentType` isn't set to `api`, create an Embedded Service deployment or use another deployment with deployment type set to Custom Client. See [Configure a Custom Client Deployment for Enhanced Chat](https://help.salesforce.com/s/articleView?id=service.miaw_deployment_custom.htm) for more information. * `conversationId` (path, string, required) The UUID of the conversation to generate a transcript for. The UUID must be in lowercase. #### Responses * **200** Successful generation of transcript in PDF format. Media type: `application/octet-stream`. Schema: `string (binary)`. Type: `string (binary)`. * **400** Bad request data. * **401** Unauthenticated Request. * **403** Unauthorized Request. * **429** Too many requests. * **500** Internal server error. * **503** Service unavailable. * **504** Gateway timeout. ### POST Registers a mobile device to support push notifications. `POST /iamessage/api/v2/notification-registration` Operation ID: `registerDeviceForPushNotifications`. Tags: notificationV2. Before you begin, verify that the `platform` field in the access token (`accessToken`) used in this request is set to `mobile`. See [Generate access token](/docs/service/messaging-api/references/miaw-api-reference?meta=generateAccessTokenForAuthenticatedUser) or [Generate access token for unauthenticated user](/docs/service/messaging-api/references/miaw-api-reference?meta=generateAccessTokenForUnauthenticatedUser) for more information. #### Request body (required) Media type: `application/json`. Schema: `RegisterNotificationRequest`. #### Responses * **204** Successful registration of the notification. * **400** Bad request data. * **401** Unauthenticated Request. * **403** Unauthorized Request. * **500** Internal server error. * **503** Service unavailable. * **504** Gateway timeout. ### DELETE Unregisters a mobile device from push notifications. `DELETE /iamessage/api/v2/notification-registration` Operation ID: `unregisterDeviceFromPushNotifications`. Tags: notificationV2. Before you begin, verify that the `platform` field in the access token (`accessToken`) used in this request is set to `mobile`. See [Generate access token](/docs/service/messaging-api/references/miaw-api-reference?meta=generateAccessTokenForAuthenticatedUser) or [Generate access token for unauthenticated user](/docs/service/messaging-api/references/miaw-api-reference?meta=generateAccessTokenForUnauthenticatedUser) for more information. #### Responses * **204** Successful unregistration from push notifications. * **400** Bad request data. * **401** Unauthenticated Request. * **403** Unauthorized Request. * **500** Internal server error. * **503** Service unavailable. * **504** Gateway timeout. ## Schemas ### AuthenticatedAccessTokenRequest Request to issue an authorization token by supplying a valid identity token issued by the customer's IDP. Includes all fields of `BaseAuthorizationRequest`. * `authorizationType` (_AuthorizationType_, required) * `customerIdentityToken` (_string_, required) The JSON Web Token (JWT) for the end user who initiates the conversation. This field is required. The token is issued by the customer’s identity provider (IdP) and is passed into the Enhanced Chat API to verify the authenticity of the end user. Verify that the JWT token hasn’t expired and includes the following claims: * `sub` * `alg` * `kid` * `iss` The JWT claims can’t be null or empty. ### AccessTokenResponse Non persisted Access Token Request Payload * `accessToken` (_string_, required) The JWT to be used as a bearer token when sending requests that require authorization. When sending requests, set the Authorization header to Bearer ``, where `` is the value of the accessToken. Example: `JWT`. * `lastEventId` (_string_, required) The ID used to help establish connections to the server-sent events (SSE) endpoint to receive messages and events from the server. See [Server-Sent Events](/docs/service/messaging-api/references/about/server-sent-events.html) for more information. * `context` (_AccessTokenRespContext_, required) The response context object. ### UnauthenticatedAuthorizationRequest Request from an unauthenticated client for (limited) authorization to access API. Includes all fields of `BaseAuthorizationRequest`. ### ContinueAccessTokenResponse Non persisted Access Token Request Payload * `accessToken` (_string_, required) The JWT to be used as a bearer token when sending requests that require authorization. When sending requests, set the Authorization header to Bearer ``, where `` is the value of the accessToken. Example: `JWT`. * `lastEventId` (_string_, required) The ID used to help establish connections to the server-sent events (SSE) endpoint to receive messages and events from the server. See [Server-Sent Events](/docs/service/messaging-api/references/about/server-sent-events.html) for more information. ### CreateConversationRequest Create Conversation Request Payload * `conversationId` (_string_, required) The UUID of the conversation. The UUID must be in lowercase. Example: `5461185f-abc6-4435-b1e1-3b3aa65719be`. * `routingAttributes` (_object_, nullable) Example: `/** Description Information about the conversation captured from the pre-chat form that the end user completes. The attribute values can come from both visible and hidden fields in the pre-chat form, and the information comes in as string values. Omni Flow can send pre-chat form data to the messaging session for a more informed rep experience. See Map Pre-Chat Values in Omni-Channel Flow at https://help.salesforce.com/s/articleView?id=service.miaw_map_messaging_2.htm for more information. **/ Example: { "_firstName": "jacob", "_lastName": "jacobs", "_email": "jjacobs@acme.com" }` . Example: `/** Description Information about the conversation captured from the pre-chat form that the end user completes. The attribute values can come from both visible and hidden fields in the pre-chat form, and the information comes in as string values. Omni Flow can send pre-chat form data to the messaging session for a more informed rep experience. See Map Pre-Chat Values in Omni-Channel Flow at https://help.salesforce.com/s/articleView?id=service.miaw_map_messaging_2.htm for more information. **/ Example: { "_firstName": "jacob", "_lastName": "jacobs", "_email": "jjacobs@acme.com" }` . Additional properties: `string`. * `esDeveloperName` (_string_, required) The API name of the Enhanced Chat Embedded Service deployment. The name can contain alphanumeric characters and underscores, and must begin with a letter. Verify that the Embedded Service deployment is configured to support the request. * The deployment type for the Embedded Service deployment must be set to Custom Client. If properly configured, after you send the request, `deploymentType` in the response will be set to `api`. If `deploymentType` isn't set to `api`, create an Embedded Service deployment or use another deployment with deployment type set to Custom Client. See [Configure a Custom Client Deployment for Enhanced Chat](https://help.salesforce.com/s/articleView?id=service.miaw_deployment_custom.htm) for more information. Example: `myDeployment`. * `language` (_string_, nullable) The language code for the language the end user wants to use. For example, `en_US`. For a list of Salesforce supported languages, see the [Supported Languages](https://help.salesforce.com/s/articleView?id=xcloud.faq_getstart_what_languages_does.htm&language=en_US&type=5) help page. Example: `en_US`. ### SendEntriesRequestApi Request for SendEntries API * `entryType` (_SendEntriesEntryType_, required) * `id` (_string_, required) The UUID of the TypingStartedIndicator or TypingStoppedIndicator event that's sent out when the participant starts or stops typing. Example: `f7904eb6-5352-4c5e-adf6-5f100572cf5d`. ### SendMessageRequestApi Send Message Request Payload * `message` (_StaticContentMessage | ChoicesResponseMessage | FormResponseMessage_, required) One of: `StaticContentMessage`, `ChoicesResponseMessage`, `FormResponseMessage`. * `esDeveloperName` (_string_, required) The API name of the Enhanced Chat Embedded Service deployment. The name can contain alphanumeric characters and underscores, and must begin with a letter. Verify that the Embedded Service deployment is configured to support the request. * The deployment type for the Embedded Service deployment must be set to Custom Client. If properly configured, after you send the request, `deploymentType` in the response will be set to `api`. If `deploymentType` isn't set to `api`, create an Embedded Service deployment or use another deployment with deployment type set to Custom Client. See [Configure a Custom Client Deployment for Enhanced Chat](https://help.salesforce.com/s/articleView?id=service.miaw_deployment_custom.htm) for more information. Example: `myDeployment`. * `isNewMessagingSession` (_boolean_) Indicates whether this is the first message in the messaging session. This parameter value determines whether the routing attributes for the pre-chat form (routingAttributes) are sent. Default: `false`. * `routingAttributes` (_object_, nullable) Example: `/** Description Information about the conversation captured from the pre-chat form that the end user completes. The attribute values can come from both visible and hidden fields in the pre-chat form, and the information comes in as string values. Omni Flow can send pre-chat form data to the messaging session for a more informed rep experience. See Map Pre-Chat Values in Omni-Channel Flow at https://help.salesforce.com/s/articleView?id=service.miaw_map_messaging_2.htm for more information. Routing attributes are only sent when the end user starts a new session (isNewMessagingSession is true) and the pre-chat form has been configured to appear with every session. See [Customize Pre-Chat for Enhanced Chat at https://help.salesforce.com/s/articleView?id=service.miaw_custom_prechat_2.htm for more information. When the end user starts a new session and sends a text message and a file, the routing attributes are sent with whichever conversation entry (the message or file) goes out first. For example, if the end user starts a new session and sends the file before the text message, the routing attributes are sent with the file. **/ Example: { "_firstName": "jacob", "_lastName": "jacobs", "_email": "jjacobs@acme.com" }` . Example: `/** Description Information about the conversation captured from the pre-chat form that the end user completes. The attribute values can come from both visible and hidden fields in the pre-chat form, and the information comes in as string values. Omni Flow can send pre-chat form data to the messaging session for a more informed rep experience. See Map Pre-Chat Values in Omni-Channel Flow at https://help.salesforce.com/s/articleView?id=service.miaw_map_messaging_2.htm for more information. Routing attributes are only sent when the end user starts a new session (isNewMessagingSession is true) and the pre-chat form has been configured to appear with every session. See [Customize Pre-Chat for Enhanced Chat at https://help.salesforce.com/s/articleView?id=service.miaw_custom_prechat_2.htm for more information. When the end user starts a new session and sends a text message and a file, the routing attributes are sent with whichever conversation entry (the message or file) goes out first. For example, if the end user starts a new session and sends the file before the text message, the routing attributes are sent with the file. **/ Example: { "_firstName": "jacob", "_lastName": "jacobs", "_email": "jjacobs@acme.com" }` . Additional properties: `string`. * `language` (_string_, nullable) The language code for the language the end user wants to use. For example, `en_US`. For a list of Salesforce supported languages, see the [Supported Languages](https://help.salesforce.com/s/articleView?id=xcloud.faq_getstart_what_languages_does.htm&language=en_US&type=5) help page. ### SendMessageResponseApi Non persisted Access Token Request Payload * `conversationEntries` (_array of ConversationEntryResult_, required) ### AcknowledgeEntriesRequestApi Request for AcknowledgeEntry API * `acks` (_array of AcknowledgeEntryData_) An object representing an array of delivery acknowledgements or read receipts. The maximum number of objects per array is 25. ### SendFilesRequestApi Send Files Request Payload. Each message object must contain a unique ID attribute. Content type is `application/json`. * `message` (_SendFilesMessageApi_, required) An object representing a message. * `esDeveloperName` (_string_, required) The API name of the Enhanced Chat Embedded Service deployment. The name can contain alphanumeric characters and underscores, and must begin with a letter. Verify that the Embedded Service deployment is configured to support the request. * The deployment type for the Embedded Service deployment must be set to Custom Client. If properly configured, after you send the request, `deploymentType` in the response will be set to `api`. If `deploymentType` isn't set to `api`, create an Embedded Service deployment or use another deployment with deployment type set to Custom Client. See [Configure a Custom Client Deployment for Enhanced Chat](https://help.salesforce.com/s/articleView?id=service.miaw_deployment_custom.htm) for more information. Example: `myDeployment`. * `routingAttributes` (_object_, nullable) Example: `/** Description Information about the conversation captured from the pre-chat form that the end user completes. The attribute values can come from both visible and hidden fields in the pre-chat form, and the information comes in as string values. Omni Flow can send pre-chat form data to the messaging session for a more informed rep experience. See Map Pre-Chat Values in Omni-Channel Flow at https://help.salesforce.com/s/articleView?id=service.miaw_map_messaging_2.htm for more information. Routing attributes are only sent when the end user starts a new session (isNewMessagingSession is true) and the pre-chat form has been configured to appear with every session. See [Customize Pre-Chat for Enhanced Chat at https://help.salesforce.com/s/articleView?id=service.miaw_custom_prechat_2.htm for more information. When the end user starts a new session and sends a text message and a file, the routing attributes are sent with whichever conversation entry (the message or file) goes out first. For example, if the end user starts a new session and sends the file before the text message, the routing attributes are sent with the file. **/ Example: { "_firstName": "jacob", "_lastName": "jacobs", "_email": "jjacobs@acme.com" }` . Example: `/** Description Information about the conversation captured from the pre-chat form that the end user completes. The attribute values can come from both visible and hidden fields in the pre-chat form, and the information comes in as string values. Omni Flow can send pre-chat form data to the messaging session for a more informed rep experience. See Map Pre-Chat Values in Omni-Channel Flow at https://help.salesforce.com/s/articleView?id=service.miaw_map_messaging_2.htm for more information. Routing attributes are only sent when the end user starts a new session (isNewMessagingSession is true) and the pre-chat form has been configured to appear with every session. See [Customize Pre-Chat for Enhanced Chat at https://help.salesforce.com/s/articleView?id=service.miaw_custom_prechat_2.htm for more information. When the end user starts a new session and sends a text message and a file, the routing attributes are sent with whichever conversation entry (the message or file) goes out first. For example, if the end user starts a new session and sends the file before the text message, the routing attributes are sent with the file. **/ Example: { "_firstName": "jacob", "_lastName": "jacobs", "_email": "jjacobs@acme.com" }` . Additional properties: `string`. * `isNewMessagingSession` (_boolean_) Indicates whether this is the first message in the messaging session. This parameter value determines whether the routing attributes for the pre-chat form (routingAttributes) are sent. Default: `false`. * `language` (_string_, nullable) The language code for the language the end user wants to use. For example, `en_US`. For a list of Salesforce supported languages, see the [Supported Languages](https://help.salesforce.com/s/articleView?id=xcloud.faq_getstart_what_languages_does.htm&language=en_US&type=5) help page. ### ConversationStatusResponse Current status response for a conversation. * `conversationId` (_string_, required) The UUID of the conversation. Example: `e6475bcb-2b98-4abd-b248-150878a3980b`. * `routingStatus` (_string_) The status of the conversation. Customers can request the routing status at any point in the conversation. Possible values are: * `ROUTED` - No router participant is in the conversation and the conversation is considered routed. * `NEEDS_ROUTING` - No routing in progress and conversation needs to be routed. * `INITIAL` - Initial routing in progress. * `TRANSFER` - Transfer routing in progress. Example: `ROUTED`. ### ListConversationResponse List Conversation Request Payload. * `conversations` (_array of ConversationDetails_, required) An object representing an array of conversation objects. The details of each conversation include the API name of the Enhanced Chat Embedded Service deployment (`esDeveloperName`), the ID of the message channel (`channelAddressIdentifier`) that's associated to the Embedded Service deployment, the ID of the conversation (`conversationId`), and when the conversation started (`startTimestamp`). If the conversation is closed (`isConversationClosed` is true), the `esDeveloperName` field isn't included in the response. If the conversation is open (`isConversationClosed` is false), the `endTimestamp` value is zero (0). If the conversation is closed (`isConversationClosed` is true), the `endTimestamp` value is the date and time (in UTC) when the conversation was closed. * `openConversationsFound` (_integer (int32)_, required) The number of open conversations found between the startTimestamp and endTimestamp date. Example: `1`. * `closedConversationsFound` (_integer (int32)_, required) The number of closed conversations found between the startTimestamp and endTimestamp date. Example: `0`. ### GetConversationEntriesResponse List Conversation Entries response payload. * `conversationEntries` (_array of ConversationEntryDetails_, required) The list of conversation entries for a particular conversation. ### RegisterNotificationRequest Notification registration request payload. * `pushServiceProvider` (_PushServiceProvider_, required) * `deviceToken` (_string_, required) The token of the device where push notifications are sent to. The token must be in the correct format as defined by the push notification service provider, such as APNS or FCM. Example: `03ab25c845d460bcdad7802d2vf6fc1dfde97283bf75cc993eb6dca835ea2e2g`. ### BaseAuthorizationRequest Base request used to acquire an authorization token. * `orgId` (_string_, required) The 15-character org ID of the Salesforce org where Enhanced Chat is set up. Example: `00Dxx0000000xxx`. * `esDeveloperName` (_string_, required) The API name of the Enhanced Chat Embedded Service deployment. The name can contain alphanumeric characters and underscores, and must begin with a letter. * The deployment type for the Embedded Service deployment must be set to Custom Client. If properly configured, after you send the request, `deploymentType` in the response will be set to `api`. If `deploymentType` isn't set to `api`, create an Embedded Service deployment or use another deployment with deployment type set to Custom Client. See [Configure a Custom Client Deployment for Enhanced Chat](https://help.salesforce.com/s/articleView?id=service.miaw_deployment_custom.htm) for more information. Example: `myDeployment`. * `capabilitiesVersion` (_CapabilitiesVersion_, required) * `platform` (_Platform_, required) * `deviceId` (_string_, nullable) The ID of the installation of the app in the device. For mobile apps, this is a required field. Generate a unique ID for the installation of the app in the device. The ID must be between 36 and 128 characters long. The ID should be reusable and the same ID should be consistently generated for the installation of the app in the device. The ID can be generated when the app is installed in the device. If multiple apps are installed in a device, each app must have their own unique device ID. For web apps, don't include this field. The service creates a unique ID that remains the same for the user for a specific deployment in an org. Example: `b8c06d01-b410-4097-bd8a-03cc71862d24`. * `context` (_AccessTokenRequestContext_) * `captchaToken` (_CaptchaToken_) ### AuthorizationType The authorization type used to interact with the Enhanced Chat APIs. Set this value to JWT. This field is required. Type: `string`. Allowed values: `JWT`. Default: `JWT`. ### AccessTokenRespContext Access token response context. * `deviceId` (_string_, required) For mobile apps, this is the same device ID (deviceId) that was sent in the request. For web apps, this must be a unique ID that's generated on the server. Example: `b8c06d01-b410-4097-bd8a-03cc71862d24`. * `endUser` (_MessagingParticipant_) * `configuration` (_EmbeddedServiceConfigResponse_) ### SendEntriesEntryType The type of conversation entry that determines whether the end user starts or stops typing a message. Possible values are: * `TypingStartedIndicator` to notify the reps or bots when the end user starts typing a message. * `TypingStoppedIndicator` to notify the reps or bots when the end user stops typing a message. Type: `string`. Allowed values: `TypingStartedIndicator`, `TypingStoppedIndicator`. ### StaticContentMessage Non interactive MT or MO message with static content. * `inReplyToMessageId` (_InReplyToMessageId_) * `id` (_MessageId_, required) * `messageType` (_string_, required) Allowed values: `StaticContentMessage`. * `staticContent` (_StaticContentText_, required) ### ChoicesResponseMessage MO response message to a choices message * `inReplyToMessageId` (_InReplyToMessageId_) * `id` (_MessageId_, required) * `messageType` (_string_, required) Allowed values: `ChoicesResponseMessage`. * `choicesResponse` (_ChoicesResponseSelections_, required) ### FormResponseMessage MO Form response message * `inReplyToMessageId` (_InReplyToMessageId_) * `id` (_MessageId_, required) * `messageType` (_string_, required) Allowed values: `FormResponseMessage`. * `formResponse` (_FormResponseInputs_, required) ### ConversationEntryResult The details of the conversation entry, including the ID of the conversation entry and the date and time (in UTC) when the message was sent by the client. * `id` (_string_, required) Example: `6fc22906-c24a-4c53-b382-fd091dacd848`. * `clientTimestamp` (_integer (int64)_, required) The time when the conversation entry was processed by the server. Example: `1713390200`. ### AcknowledgeEntryData Request object for acknowledge entry * `id` (_string_, required) The UUID of the delivery acknowledgement or read receipt. The UUID must be in lowercase. The value must be unique within the array. Example: `b2104971-42a5-47d3-8d82-1a1118fa2af3`. * `entryType` (_AcknowledgeEntryType_, required) * `conversationEntryId` (_string_, required) The ID of the conversation entry that the delivery acknowledgement or read receipt is associated with. The combination of `conversationEntryId` and `entryType` must be unique within the array. Example: `1c896056-3ecc-44f9-96fa-4a64c77b17e2`. ### SendFilesMessageApi An object representing a message. * `id` (_string_, required) The UUID of the message. The ID must be unique to the conversation entry. If multiple messages are sent with the same ID, then only the first message will be processed. Example: `57904eb6-5352-4c5e-adf6-5f100572cf5d`. * `fileId` (_string_, required) The ID of the file. * `inReplyToMessageId` (_string_, nullable) If the message is in reply to another message, this value is the UUID of the message being replied to. Example: `a133c185-73a7-4adf-b6d9-b7fd62babb4e`. * `text` (_string_, nullable) The text, if any, that's sent with the file. The text must be 4000 characters or less. ### ConversationDetails * `conversationId` (_string_, required) The ID of the conversation. Example: `4hLzy5R1l49Y9b98_xTLoV`. * `startTimestamp` (_integer (int64)_, required) When the conversation started. Example: `1645432313000`. * `endTimestamp` (_integer (int64)_, required) When the conversation ended. If the conversation is open, the value is zero (0). If the conversation is closed, the value is the date and time (in UTC) when the conversation was closed. Example: `0`. * `channelAddressIdentifier` (_string_, required) The ID of the Message channel. Example: `dfbb03d3-4418-4584-bd0e-7ed895181f08`. * `esDeveloperName` (_string_) The API name of the Enhanced Chat Embedded Service deployment. The name can contain alphanumeric characters and underscores, and must begin with a letter. Verify that the Embedded Service deployment is configured to support the request. * The deployment type for the Embedded Service deployment must be set to Custom Client. If properly configured, after you send the request, `deploymentType` in the response will be set to `api`. If `deploymentType` isn't set to `api`, create an Embedded Service deployment or use another deployment with deployment type set to Custom Client. See [Configure a Custom Client Deployment for Enhanced Chat](https://help.salesforce.com/s/articleView?id=service.miaw_deployment_custom.htm) for more information. Example: `myDeployment`. * `isConversationClosed` (_boolean_, required) Indicates that conversation is closed. Example: `false`. ### ConversationEntryDetails The details of the conversation entry, including the ID of the conversation entry and the date and time (in UTC) when the message was sent by the client. * `entryType` (_string_, required) The type of conversation entry. Examples of conversation entries include a block of message text, a participant change, a routing action, and a rep status update. Example: `Message`. * `entryPayload` (_object_, required) The payload for the conversation entry. The payload details depend on the entryType. Example: `{...}`. * `transcriptedTimestamp` (_integer (int64)_, required) The date and time (in UTC) when the conversation entry was received by the Salesforce server. Example: `1645500204995`. * `sender` (_PublicParticipantDetails_, required) * `clientTimestamp` (_integer (int64)_, required) The date and time (in UTC) when the conversation entry was sent by the client. Example: `1645500204976`. * `identifier` (_string_, required) The ID of the conversation entry. Example: `27830232sasd12323425`. * `senderDisplayName` (_string_, required) The display name of the end user. This value always defaults to “Guest” for the end user. Example: `Guest`. ### PushServiceProvider The name of the push notification service provider. Possible values are: * `APNS` for Apple Push Notification Service * `FCM` for Firebase Cloud Messaging Type: `string`. Allowed values: `APNS`, `FCM`. Example: `APNS`. ### CapabilitiesVersion The version number that determines the messaging content types that are supported for app capabilities. If the content type isn't supported by the capabilitiesVersion, the content is translated to text before the rep or bot sends the message. When the request is sent, the service registers the participant's device with the capabilitiesVersion or updates the version if one already exists. Use capabilitiesVersion 62 for progress indicators and capabilitiesVersion 63 for streaming tokens and enhanced messaging attachment file type support. Type: `string`. Allowed values: `1`, `62`, `63`. Example: `1`. ### Platform Specifies whether the Embedded Service deployment (esDeveloperName) is used for a mobile or web application. Possible values are: “Mobile” and “Web”. Type: `string`. Allowed values: `Web`, `Mobile`. Default: `Web`. Example: `Web`. ### AccessTokenRequestContext Access token request context The request context object. Required for web apps. * `appName` (_string_) A name, such as the name of a business unit, that represents the app's intended use. Mobile and web apps in the same business unit should send the same name. The name can include alphanumeric characters and the underscore (\_) special character and be up to 40 characters long. The name is case sensitive. For example, “salesApp”, “sales\_app”, or xyz\_sales\_app”. For mobile apps, this is a required field. For web apps, don't include this field; if you include the field, it'll be ignored. Example: `salesApp`. * `clientVersion` (_string_) The customer's app version. The value must be 25 characters or less and follow the version numbering pattern `99`, `99.99`, or `99.99.99`. While this value isn't required, it can be useful when performing customer investigations. Example: `1.2.3`. ### CaptchaToken reCAPTCHA Token for server-side validation. Type: `string`. Example: ``. ### MessagingParticipant Conversation Participant * `appType` (_string_) The appType used for the conversation. Example: `iamessage`. * `role` (_string_) The role of a participant. Example: `EndUser`. * `subject` (_string_, required) Subject identifier for this participant. Example: ``. * `displayName` (_string_) The display name for this participant ### EmbeddedServiceConfigResponse Contains the features that are configured in the setup. See [Sample Configuration File](/docs/service/messaging-api/references/about/sample-configuration.html) for a sample configuration that's returned. * `embeddedServiceConfig` (_EmbeddedServiceConfigInfo_, required) * `timestamp` (_integer (int64)_, required) The time when response was served from Core. Example: `1609790105500`. ### InReplyToMessageId If the message is in reply to another message, this value is the UUID of the message being replied to. Type: `string`. Example: `a133c185-73a7-4adf-b6d9-b7fd62babb4e`. ### MessageId The UUID of the message. The ID must be unique to the conversation entry. If multiple messages are sent with the same ID, only the first message will be processed. Type: `string`. Example: `57904eb6-5352-4c5e-adf6-5f100572cf5d`. ### StaticContentText Static text content * `formatType` (_any_, required) Allowed values: `Text`. * `text` (_Text_, required) ### ChoicesResponseSelections The selections to a choices message * `formatType` (_any_, required) Allowed values: `Selections`. * `selectedOptions` (_array of SelectedOption_, required) Minimum items: 1. ### FormResponseInputs The input response values to a Form Message * `formatType` (_any_, required) Allowed values: `Inputs`. * `formTitle` (_AbstractTitleItem_) * `inputValues` (_array of AbstractInputValue_, required) ### AcknowledgeEntryType The type of conversation entry that indicates whether the entry from the rep or bot has been delivered to or read by the end user. Possible values are `Read` to acknowledge that the end user has read the conversation entry, or `Delivery` to acknowledge that the conversation entry has been delivered to the end user. Each delivery acknowledgement must be sent. If the end user reads multiple messages in a row, only the last read message needs to be acknowledged/sent. Type: `string`. Allowed values: `Read`, `Delivery`. Example: `Delivery`. ### PublicParticipantDetails The participant who sent the conversation entry and the details associated with the sender. The role (`role`) represents the participant that is responsible for the event, such as End User, Agent, Chatbot, System (when the system responds), or Router (when the request is being routed). The subject (`subject`) is the unique subject ID of the sender participant. * `role` (_string_) The role of a participant. Example: `endUser`. * `subject` (_string_, required) Subject identifier for this participant. Example: `v1/iamessage/UNAUTH/f0363938-af24-4971-ad6b-45cd8daaec57/uid:34e21b0f-b81f-42ca-87a0-9e64d259bdb4`. ### EmbeddedServiceConfigInfo * `name` (_string_, required) Example: `developerName`. * `deploymentType` (_string_, required) The deployment type for the Embedded Service deployment. This value is `api`, which represents deployment type Custom Client in the Salesforce Ligthning UI. If `deploymentType` isn't set to `api`, create an Embedded Service deployment or use another deployment with deployment type set to Custom Client. See [Configure a Custom Client Deployment for Enhanced Chat](https://help.salesforce.com/s/articleView?id=service.miaw_deployment_custom.htm) for more information. Example: `api`. * `embeddedServiceMessagingChannel` (_EmbeddedServiceMessagingChannel_) * `forms` (_array of ESWForm_, required) * `attachments` (_AttachmentConfig_, required) * `choiceListConfig` (_ChoiceListConfigInfo_) * `transcript` (_TranscriptConfig_, required) ### Text The text that's sent with the message. The text must be 4000 characters or less. Type: `string`. ### SelectedOption A selection option from a ChoicesSelectionsMessage * `optionIdentifier` (_UniqueIdentifier_, required) ### AbstractTitleItem Discriminator: `itemType` selects the concrete type. * `itemType` (_TitleItemType_, required) * `title` (_string_, required) * `subTitle` (_string_) * `secondarySubTitle` (_string_) * `tertiarySubTitle` (_string_) * `referenceId` (_UniqueId_) ### AbstractInputValue Discriminator: `inputValueType` selects the concrete type. * `inputValueType` (_InputValueType_, required) * `inputId` (_InputId_, required) * `inputlabel` (_AbstractTitleItem_) ### EmbeddedServiceMessagingChannel * `channelAddressIdentifier` (_string_, required) Example: `43bb33f4-5c13-4815-ab1b-7ccd679de4dc`. * `authMode` (_string_) Enum field Values from Core Auth or UnAuth Allowed values: `Auth`, `UnAuth`. ### ESWForm * `formType` (_string_, required) Supported types of forms. Allowed values: `PreChat`. * `displayContext` (_string_, required) Display context of the form. Allowed values: `Conversation`, `Session`. * `formFields` (_array of ESWFormFields_, required) ### AttachmentConfig * `endUserToAgent` (_boolean_, required) * `maxFileSize` (_integer (int32)_) The maximum allowed file size for each attachment. See [Send Images and Files in Messaging Sessions](https://help.salesforce.com/s/articleView?id=service.livemessage_agent_send_files.htm) for more information about maximum file sizes for message attachments. Example: `5242880`. * `allowedFileTypes` (_object_) A list of file types and the file formats they support. File types include `image`, `audio`, `video`, `text`, and `other`. If a file type doesn't support any file formats, the value is set to empty square brackets (`[]`). See [Send Images and Files in Messaging Sessions](https://help.salesforce.com/s/articleView?id=service.livemessage_agent_send_files.htm) for more information about allowed file types. Additional properties: `array of string`. _Example_ ``` { "image": [ "png", "bmp", "tiff", "gif" ], "audio": [], "video": [ "mp4" ], "text": [ "csv", "txt" ], "other": [ "xml", "xls", "xlsx" ] } ``` ### ChoiceListConfigInfo * `choiceList` (_array of ChoiceListInfo_) ### TranscriptConfig * `allowTranscriptDownload` (_boolean_, required) Flag to indicate whether end user can download the transcript or not. ### UniqueIdentifier An string identifier that identifies objects or items uniquely per message instance Type: `string`. ### TitleItemType Type: `string`. Allowed values: `TitleItem`, `TitleImageItem`, `TitleVideoItem`. ### UniqueId A UUID that identifies objects or items uniquely per message instance Type: `string`. Example: `cbd4e3fe-f210-43b8-a4b7-dd77e39ee5e1`. ### InputValueType Type: `string`. Allowed values: `SingleInputValue`, `SelectedOptionsInputValue`. ### InputId An id that uniquely identifies an input in a form message Type: `string`. ### ESWFormFields * `name` (_string_, required) The external name used to identify the prechat field. * `order` (_integer (int32)_, required) Order of the prechat field. * `type` (_string_, required) Supported types of prechat fields for both standard and custom. Allowed values: `Text`, `Email`, `Number`, `Checkbox`, `Phone`, `ChoiceList`. * `required` (_boolean_, required) States if value is required for the prechat field. * `maxLength` (_integer (int32)_, required) The maximum allowed characters for the prechat field. * `isHidden` (_boolean_, required) is the prechat field hidden. * `choiceListId` (_string_) The id of the choice list associated with this form field. ### ChoiceListInfo * `choiceListId` (_string_) Example: `choice_list_id`. * `choiceListValues` (_array of ChoiceListValueInfo_) ### ChoiceListValueInfo * `order` (_integer_) Example: `0`. * `choiceListValueName` (_string_) Example: `choice_list_value_name`. * `choiceListValueId` (_string_) Example: `choice_list_value_id`. * `isDefaultValue` (_boolean_) ### AbstractMessage An object representing a message. Discriminator: `messageType` selects the concrete type. * `inReplyToMessageId` (_InReplyToMessageId_) * `id` (_MessageId_, required) * `messageType` (_MessageType_, required) ### AbstractChoicesResponse Discriminator: `formatType` selects the concrete type. * `formatType` (_ChoicesResponseFormatType_, required) ### AbstractFormResponse Discriminator: `formatType` selects the concrete type. * `formatType` (_SecureFormFormatType_, required) ### TitleItem Includes all fields of `AbstractTitleItem`. ### TitleImageItem Includes all fields of `AbstractTitleItem`. * `imageId` (_UniqueId_, required) * `imageSubTitle` (_string_) ### TitleVideoItem Includes all fields of `AbstractTitleItem`. * `videoId` (_UniqueId_, required) * `imageId` (_UniqueId_) ### SingleInputValue Single value of an input Includes all fields of `AbstractInputValue`. * `displayValue` (_string_) * `value` (_AbstractValue_, required) ### SelectedOptionsInputValue The select options of a select/picker input Includes all fields of `AbstractInputValue`. * `selectedOptions` (_array of SelectedFormOption_, required) ### TextValue A text value Includes all fields of `AbstractValue`. * `textValue` (_string_, required) ### DoubleValue A double value Includes all fields of `AbstractValue`. * `doubleValue` (_number (double)_, required) ### IntegerValue An integer value Includes all fields of `AbstractValue`. * `integerValue` (_integer_, required) ### UrlValue An url value Includes all fields of `AbstractValue`. * `urlValue` (_Url_, required) ### DateValue A date value as defined by rfc3339 Includes all fields of `AbstractValue`. * `dateValue` (_string (date)_, required) ### DateTimeValue A date time value as defined by rfc3339 Includes all fields of `AbstractValue`. * `dateTimeValue` (_string (date-time)_, required) ### AbstractStaticContent Discriminator: `formatType` selects the concrete type. * `formatType` (_StaticContentFormatType_, required) ### StaticContentExternalAttachments Encrypted attachments with optional text Includes all fields of `AbstractStaticContent`. * `text` (_Text_) * `attachments` (_array of EncryptedAttachment_, required) Minimum items: 1. ### OctetJwk A JWK with key type 'oct'. [https://tools.ietf.org/html/rfc7518#section-6.4](https://tools.ietf.org/html/rfc7518#section-6.4) Includes all fields of `AbstractJwk`. * `alg` (_OctetJwkAlgorythmType_, required) * `k` (_string_, required) ### StaticContentLinks A list of web links. Includes all fields of `AbstractStaticContent`. * `links` (_array of Link_, required) Minimum items: 1. Maximum items: 1. ### BaseRenewTokenRequest Renew token request with common fields. * `accessToken` (_string_, required) Expired access token * `refreshToken` (_string_, required) Valid refresh token * `deviceId` (_string_) Globally unique device identifier ### DeviceInfo Captures all the details related to the device that is being used in the conversation. Used for metric and data analysis. * `appName` (_string_) Name of the app current using the API * `os` (_string_) Captures information about operating system. * `osVersion` (_string_) Captures version of operating system. * `browser` (_string_) Captures information about the browser. * `browserVersion` (_string_) Captures information about the browser version. * `clientVersion` (_string_) Captures additional information related to client version. * `deviceType` (_string_) Captures information on the device type, eg. Iphone13 ### MessagingConversationInfo Conversation Info * `conversationId` (_string_, required) The Id of the conversation. * `startTimestamp` (_integer (int64)_, required) The startTimestamp of the conversation. * `endTimestamp` (_integer (int64)_) The endTimestamp of the conversation. * `channelAddressIdentifier` (_string_, required) Unique Identifier associated with the Messaging channel record. * `participants` (_array of MessagingParticipant_, required) The participants associated with the conversations. ### MessagingConversationEntry * `entryType` (_string_, required) The type of the ConversationEntry, replicated from entryPayload. Required. * `entryPayload` (_string_, required) Json serialized entry payload. * `transcriptedTimestamp` (_integer (int64)_, required) The UNIX Epoch time of when this message was received by the server. Required. * `sender` (_MessagingParticipant_, required) * `clientTimestamp` (_integer (int64)_, required) The UNIX Epoch time of when this message was sent by the client. Required. * `identifier` (_string_, required) The id of the entry.Required. * `senderDisplayName` (_string_, required) The displayName for the sender of this Conversation Entry. ### AcknowledgementData The acknowledgement data made for a conversation per participant. * `conversationEntryId` (_string_, required) The unique identifier for the conversation entry this acknowledgement is associated with. ### QueryDirection Type: `string`. Allowed values: `FromStart`, `FromEnd`. ### EntryType Enum listing unique identifiers types of entries. Type: `string`. Allowed values: `Message`, `TypingIndicator`, `ParticipantChanged`, `MessageDeliveryFailed`, `UndeliveredConversationEntry`, `TypingStartedIndicator`, `TypingStoppedIndicator`, `DeliveryAcknowledgement`, `ReadAcknowledgement`, `RoutingResult`, `RoutingWorkResult`, `CloseConversation`, `SessionStatusChanged`. ### ChoicesResponseFormatType The rendering format of a message. How it looks. Type: `string`. Allowed values: `Text`, `Selections`. Example: `Selections`. ### StaticContentFormatType The rendering format of a message. How it looks. Type: `string`. Allowed values: `Text`, `ExternalAttachments`, `Links`. Example: `Text`. ### Link A web link. * `url` (_string_, required) ### OctetJwkAlgorythmType Type: `string`. Allowed values: `A256GCM`. ### JwkKeyType The key type of the JWK. [https://tools.ietf.org/html/rfc7517#section-4.1](https://tools.ietf.org/html/rfc7517#section-4.1) Type: `string`. Allowed values: `oct`. ### Attachment A file sent as an attachment with a message. * `name` (_string_, required) * `id` (_UniqueId_, required) * `mimeType` (_MimeType_, required) * `url` (_Url_, required) * `referenceId` (_UniqueId_) ### MimeType A mime type Type: `string`. ### Url A url Type: `string`. ### EncryptedAttachmentStatus The status of an encrypted attachment Type: `string`. Allowed values: `Available`, `PendingUpload`. Example: `Available`. ### MessageType The type of message being sent to the rep or bot. Possible values include: `StaticContentMessage`, `ChoicesMessage`, and `FormMessage`. For example, a `messageType` of `StaticContentMessage` represents a message that contains static content. This value also determines the message format type (`formatType`) and how it's defined. Type: `string`. Allowed values: `StaticContentMessage`, `ChoicesResponseMessage`, `FormResponseMessage`. ### ValueType The type of a value Type: `string`. Allowed values: `TextValue`, `IntegerValue`, `DoubleValue`, `UrlValue`, `DateValue`, `DateTimeValue`. ### SecureFormFormatType The rendering format of a message. How it looks. Type: `string`. Allowed values: `Inputs`. Example: `Inputs`. ### SelectedFormOption A selection option from a SecureFormsInputsResponse message * `optionIdentifier` (_UniqueIdentifier_, required) * `optionTitle` (_AbstractTitleItem_) * `optionId` (_UniqueId_) ### AbstractValue The base type from which simple value types extends Discriminator: `valueType` selects the concrete type. * `valueType` (_ValueType_, required) ### AbstractJwk Discriminator: `kty` selects the concrete type. * `kty` (_JwkKeyType_, required) ### EncryptedAttachment A file sent as an encrypted attachment with a message. * `attachment` (_Attachment_, required) * `iv` (_string_, required) * `jwk` (_OctetJwk_, required) * `sizeInBytes` (_integer_) * `status` (_EncryptedAttachmentStatus_) # Enhanced Chat API Release Notes This section describes recent changes that have been made to this guide. ## Updates for June 2026 - Added [Enhanced Chat Configuration API Endpoints](https://developer.salesforce.com/docs/service/messaging-api/references/miaw-api-reference-esw?meta=Summary) section. - Added [Agent Availability API](https://developer.salesforce.com/docs/service/messaging-api/references/miaw-api-reference-esw?meta=getAgentAvailability). ## Updates for February 2026 - Added [SessionStatusChanged](https://developer.salesforce.com/docs/service/messaging-api/references/miaw-api-reference?meta=type%3AEntryType) EntryType as a supported conversation entry type when [listing conversation entries](https://developer.salesforce.com/docs/service/messaging-api/references/miaw-api-reference?meta=listConversationEntries). - Added [CONVERSATION_SESSION_STATUS_CHANGED](https://developer.salesforce.com/docs/service/messaging-api/references/about/server-sent-events-structure.html#conversation_session_status_changed) server-sent event. Enhanced Chat Configuration API Endpoints # Enhanced Chat Configuration API Endpoints Public REST API for Enhanced Chat Configuration **Version:** 2.0.0 ## Servers * `https://{scrt-url}` * ``scrt-url (default mycompanyname.salesforce-scrt.com) In the URI, set `{scrt-url}` to the URL in the Enhanced Chat custom client Embedded Service deployment code snippet. For example, `https://mycompanyname.salesforce-scrt.com`.`` ## Operations ### GET Determines whether service reps are available to accept new chats based on the criteria specified in the channel settings. `GET /embeddedservice/v2/agent-availability` Operation ID: `getAgentAvailability`. Tags: agentAvailabilityV2. Before you use this endpoint, an admin must enable Chat Button visibility in Setup. See [Control Chat Button Visibility in Enhanced Chat](https://help.salesforce.com/s/articleView?language=en_US&id=service.miaw_chat_button_visibility.htm&type=5) for more information. Salesforce uses the routing type setting to determine whether to check the primary or fallback queue for agent availability: * If routing is queue-based (Routing Type is **Omni-Queue**), Salesforce checks the Queue for agent availability. * If routing is based on an Omni-Channel flow (Routing Type is **Omni-Flow**), Salesforce checks the fallback queue for agent availability. * If routing is directed to an Agentforce Service Agent (Routing Type is **Agentforce Service Agent**), Salesforce checks the fallback queue for agent availability. #### Parameters * `orgId` (query, string, required) The 15-character org ID of the Salesforce org where Enhanced Chat is set up. * `esConfigName` (query, string, required) The API name of the Enhanced Chat Embedded Service deployment. The name can contain alphanumeric characters and underscores, and must begin with a letter. The deployment type that's associated with the `esDeveloperName` deployment must match the `deploymentType` in the access token. Verify that the Embedded Service deployment is configured to support the request. * The deployment type for the Embedded Service deployment must be set to Custom Client. If properly configured, after you send the request, `deploymentType` in the response will be set to `api`. If `deploymentType` isn't set to `api`, create an Embedded Service deployment or use another deployment with deployment type set to Custom Client. See [Configure a Custom Client Deployment for Enhanced Chat](https://help.salesforce.com/s/articleView?id=sf.miaw_deployment_custom.htm) for more information. #### Responses * **200** Successful Request Media type: `application/json`. Schema: `AgentAvailabilityResponse`. * **400** Bad Request Media type: `application/json`. Schema: `Error`. _Example: invalidConfigName_ Invalid Embedded Service configuration name ``` { "success": false, "error": { "errorCode": "BAD_REQUEST", "message": "The Embedded Service configuration name is invalid." } } ``` _Example: missingOrgId_ Missing organization ID ``` { "success": false, "error": { "errorCode": "BAD_REQUEST", "message": "Specify a valid organization ID." } } ``` _Example: invalidOrgId_ Invalid or deleted organization ``` { "success": false, "error": { "errorCode": "BAD_REQUEST", "message": "The organization ID is invalid or the organization was deleted." } } ``` _Example: edgeNotEnabled_ Edge not enabled for the organization ``` { "success": false, "error": { "errorCode": "BAD_REQUEST", "message": "To check agent availability, enable Edge for your organization." } } ``` _Example: unsupportedDeploymentType_ Deployment type not supported ``` { "success": false, "error": { "errorCode": "BAD_REQUEST", "message": "Agent availability API is not supported for this deployment type." } } ``` _Example: invalidParameters_ Invalid request parameters ``` { "success": false, "error": { "errorCode": "INVALID_INPUT", "message": "The request contains invalid parameters. Check the request and try again." } } ``` * **401** Unauthenticated Request * **403** Unauthorized Request * **404** Not Found * **410** Gone Media type: `application/json`. Schema: `Error`. * **422** Unprocessable Entity (Setup Errors) Media type: `application/json`. Schema: `Error`. _Example: chatButtonVisibilityDisabled_ Chat Button Visibility setting turned off ``` { "success": false, "error": { "errorCode": "SETUP_ERROR", "message": "To check agent availability, you must turn on the Chat Button Visibility setting in your Messaging channel settings." } } ``` _Example: queueNotConfigured_ Queue not configured ``` { "success": false, "error": { "errorCode": "SETUP_ERROR", "message": "You haven't configured a queue in your Messaging channel settings." } } ``` * **429** Too Many Requests. **Recommendation:** If you receive a 429 response, don't use fixed-interval polling. Instead, implement exponential backoff with jitter to avoid further rate limiting. * **500** Internal Server Error Media type: `application/json`. Schema: `Error`. _Example: internalError_ Internal server error ``` { "success": false, "error": { "errorCode": "INTERNAL_ERROR", "message": "An internal error occurred. Contact Salesforce Customer Support." } } ``` * **503** Service Unavailable * **504** Gateway Timeout ## Schemas ### AgentAvailabilityResponse * `success` (_boolean_, required) Indicates whether the request was successful. Example: `true`. * `response` (_AgentAvailabilityResponseBody_) ### Error * `success` (_boolean_, required) Indicates whether the request was successful. Example: `false`. * `error` (_ErrorCode_, required) ### AgentAvailabilityResponseBody * `agentAvailable` (_boolean_, required) Indicates whether an agent is available. Example: `false`. ### ErrorCode * `errorCode` (_ResponseErrorCode_, required) Error code if an error occurred. * `message` (_string_, required) Brief description of the error. Example: `The org ID is invalid or doesn't exist.`. ### ResponseErrorCode Response error code. Type: `string`. Allowed values: `BAD_REQUEST`, `FORBIDDEN`, `INVALID_INPUT`, `SETUP_ERROR`, `INTERNAL_ERROR`, `RATE_LIMITED`, `UNKNOWN_ERROR`. Default: `UNKNOWN_ERROR`. # Enhanced In-App Chat Android Reference See the [Android reference documentation site](https://salesforce-async-messaging.github.io/messaging-in-app-android/) for this SDK. Related links: - [Use the UI SDK for Android](https://developer.salesforce.com/docs/service/messaging-in-app/references/guides/android-ui-sdk.md) - [Use the Core SDK for Android](https://developer.salesforce.com/docs/service/messaging-in-app/references/guides/android-core-sdk.md) - [Android Examples](https://github.com/Salesforce-Async-Messaging/messaging-in-app-android/tree/main/examples) # Enhanced In-App Chat iOS Reference See the [iOS reference documentation site](https://salesforce-async-messaging.github.io/messaging-in-app-ios/) for this SDK. Related links: - [Use the UI SDK for iOS](https://developer.salesforce.com/docs/service/messaging-in-app/references/guides/ios-ui-sdk.md) - [Use the Core SDK for iOS](https://developer.salesforce.com/docs/service/messaging-in-app/references/guides/ios-core-sdk.md) - [iOS Examples](https://github.com/Salesforce-Async-Messaging/messaging-in-app-ios/tree/master/examples) # Enhanced In-App Chat Reference Documentation You can find iOS and Android reference documentation at our GitHub repositories. - [iOS reference documentation site](https://salesforce-async-messaging.github.io/messaging-in-app-ios/) - [Android reference documentation site](https://salesforce-async-messaging.github.io/messaging-in-app-android/) # Enhanced Web Chat Reference This reference guide contains information about all the Enhanced Web Chat APIs in JavaScript and about Lightning Web Components (LWC). To ensure that Enhanced Web Chat works optimally, always republish your deployment after testing newly added features and bug fixes. To learn more about publishing a deployment, see [Configure an Enhanced Web Chat Deployment](https://help.salesforce.com/s/articleView?id=service.miaw_configure_web_deployment_1.htm) in Salesforce Help. - [Settings](https://developer.salesforce.com/docs/service/messaging-web/references/m4w-reference/settingsAPI.md) - [Event Listeners](/docs/service/messaging-web/guide/event-listeners.html) - [Auto-Response API](https://developer.salesforce.com/docs/service/messaging-web/references/m4w-reference/autoResponseAPI.md) - [Pre-Chat API](https://developer.salesforce.com/docs/service/messaging-web/references/m4w-reference/prechatAPI.md) - [User Verification API](https://developer.salesforce.com/docs/service/messaging-web/references/m4w-reference/userVerificationAPI.md) - [Utilities API](https://developer.salesforce.com/docs/service/messaging-web/references/m4w-reference/utilAPI.md) - [Get Custom Lightning Web Components Configuration Details](https://developer.salesforce.com/docs/service/messaging-web/references/m4w-reference/customComponents.md) # Environment Control Represents an Environment Control configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of IOT Sensor. ## Configuration Item Type Definition ||| |-|-| |Name|Environment Control| |Developer Name|`SD_EnCo`| |Component|No| |End User Compute/Unmetered|No| |Parent|[IOT Sensor](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-iot-sensor.md)| |Rule Name|Default rule for all Cisco Systems Unified Sip Proxy| |Identifier(s)|MAC address| ## Attributes No associated attributes for this configuration item type. # Environmental Climate Monitor Represents an Environmental Climate Monitor configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of IOT Sensor. ## Configuration Item Type Definition ||| |-|-| |Name|Environmental Climate Monitor| |Developer Name|`SD_EnClMo`| |Component|No| |End User Compute/Unmetered|No| |Parent|[IOT Sensor](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-iot-sensor.md)| |Rule Name|Default rule for all Wireless Bridge| |Identifier(s)|MAC address| ## Attributes No associated attributes for this configuration item type. # Error Code Details Get to know the error codes and messages for the Salesforce Feedback Management (SFM) unAuth Response APIs. - **[accessToken](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/surveys-unauth-apis-accesstoken-error-codes.md)** Listed are the error codes and error code messages associated with the Salesforce Feedback Management (SFM) UnAuth Response APIs for the `accessToken` resource. - **[survey-response (PATCH)](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/surveys-unauth-apis-patch-error-codes.md)** Listed are the error codes and error code messages associated with the Salesforce Feedback Management (SFM) unAuth Response APIs for the `survey-response` PATCH resource. - **[survey-response (POST)](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/surveys-unauth-apis-post-error-codes.md)** Listed are the error codes and error code messages associated with the Salesforce Feedback Management (SFM) unAuth Response APIs for the `survey-response` (POST) resource. # Error Codes and Responses When using the APIs in Salesforce Scheduler, you may encounter error codes and messages under certain conditions. For each Scheduler API, it lists the potential error codes, the associated error messages, and a description of what causes the error to occur. The following is a list of error code details within the Salesforce Scheduler platform. - **[Appointment Candidates (GET)](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/appointmentcandidates-get.md)** Contains the error codes and error code messages related with the Salesforce Scheduler API for `getAppointmentSlots` (GET) resource. - **[Appointment Slots (GET)](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/appointmentslots-get.md)** Contains the error codes and error code messages related with Salesforce Scheduler API for the `getAppointmentSlots` (GET) resource. - **[Available Territory Slots (POST)](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/availableterritoryslots.md)** Contains the error codes and error code messages related with Salesforce Scheduler API for the `available-territory-slots` (POST) resource. - **[Estimated Wait Time (POST)](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/estimatedwaittime-post.md)** Contains the error codes and error code messages related with Salesforce Scheduler API for the `estimated-wait-time` (POST) resource. - **[Service Appointments (PATCH)](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/serviceappointment-patch.md)** Contains the error codes and error code messages related with Salesforce Scheduler API for the `service-appointments` (PATCH) resource. - **[Service Appointments (POST)](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/serviceappointment-post.md)** Contains the error codes and error code messages related with Salesforce Scheduler API for the `service-appointments` (POST) resource. - **[Service Territories (GET)](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/serviceterritories-get.md)** Contains the error codes and error code messages related with Salesforce Scheduler API for the `service-territories` (GET) resource. - **[Waitlist Participants (PATCH)](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/waitlistparticipants-patch.md)** Contains the error codes and error code messages related with Salesforce Scheduler API for the `waitlist/participants` (PATCH) resource. # Error Handling with Promises Promises can simplify code that handles the success or failure of asynchronous calls. To use error handling with promises, use the `catch()` method on the promise that is returned from calling an API method. The `catch()` method returns a promise and accepts a single function parameter that’s called if the promise is rejected. This function has one argument that shows the reason for the rejection. The promise returned by `catch()` is rejected if the function that is passed in either throws an error or returns a promise that’s rejected. Otherwise, the promise is resolved. ## Best Practices for Error Handling When handling errors for Lightning console apps, consider validating the input, logging the error message, and provide user feedback if the method fails. For example, if you use [`setSelectedNavigationItem()`](https://developer.salesforce.com/docs/service/api-console/guide/navigationitemapi/sforce-api-console-lightning-setselectednavigationitem.md), check that the developer name is valid and handle any errors accordingly. The example uses `console.error` and `console.log` for simplicity. To show an error notification in the UI, use [`lightning/platformShowToastEvent`](https://developer.salesforce.com/docs/platform/lightning-component-reference/guide/lightning-platform-show-toast-event.html) or [`lightning/toast`](https://developer.salesforce.com/docs/platform/lightning-component-reference/guide/lightning-toast.html?type=Develop) instead. ```javascript import { setSelectedNavigationItem } from 'lightning/platformNavigationItemApi'; async safeNavigate(developerName) { // Validate input if (!developerName || typeof developerName !== 'string') { console.error('Invalid developer name provided'); return false; } try { await setSelectedNavigationItem(developerName); return true; } catch (error) { // Log error details console.error('Navigation failed:', { developerName, error: error.message, stack: error.stack }); // Show user-friendly message this.dispatchEvent(new CustomEvent('navigationerror', { detail: { message: 'Unable to navigate. Please try again.' } })); return false; } } ``` ## Common Lightning Console Errors Here are several common errors that you can encounter when working with Lightning Console JavaScript API. - Error: This API is only available in Lightning console apps. - : This error is thrown when an API method is called from outside a console app. ```javascript try { await focusNavigationItem(); } catch (error) { if (error.message.includes('console')) { console.log('Not running in a console app'); } } ``` - Error: setSelectedNavigationItem requires a valid developerName parameter - : This error is thrown when the `setSelectedNavigationItem()`contains an invalid developer name. ```javascript try { await setSelectedNavigationItem(''); } catch (error) { console.error('Invalid parameter:', error.message); } ``` - Error: Navigation item doesn't exist - : This error is thrown when the navigation item isn’t found. ```javascript try { await setSelectedNavigationItem('NonExistentItem'); } catch (error) { console.error('Navigation item not found:', error); } ``` - Error: "The selected navigation item has unsaved changes. Save the changes, then try again. - : This error is thrown when you have unsaved changes. ```javascript try { await refreshNavigationItem(); } catch (error) { if (error.message.includes('unsaved changes')) { console.log('Please save changes before refreshing'); } } ``` # Error Using the Salesforce Mobile SDK with the Service Chat SDK If you're trying to build a Service Chat SDK project that explicitly embeds the Salesforce Mobile SDK, exclude these two maven dependencies to prevent conflicts. When building an app with both SDKs, you may encounter an error such as this error: ```java Error: more than one library with package name 'com.salesforce.androidsdk.analytics' ``` Or this error: ```java Duplicate zip entry [classes.jar:com/salesforce/androidsdk/smartstore/app/SmartStoreSDKManager.class] ``` To solve the problem, exclude the problematic dependencies from your `build.gradle` file. ```java compile('com.salesforce.service:servicesdk:224.2.6') { exclude group: 'com.salesforce.mobilesdk', module: 'SmartStore' exclude group: 'com.salesforce.mobilesdk', module: 'SalesforceSDK' } ``` # errors Represents the property to store errors that occurred as a result of the NLP Operation. ## Signature `public List errors {get; set;}` ## Property Value Type: List\ # Establish a Conversation Establishes a conversation and generates a conversation ID (`conversationIdentifier`) and messaging session ID (`messagingSessionId`). The conversation channel address identifier (`channelAddressIdentifier`) combined with the end user client identifier (`participants.subject`) creates a new conversation. If the API request doesn’t find a conversation corresponding to the passed in conversation channel and end user client identifier, a new conversation is created and a new `conversationIdentifier` value is returned. Similarly, if the API request doesn’t find a corresponding messaging session, a new `messagingSessionId` is returned. If the API request finds a conversation corresponding to the conversation channel address identifier and end user client identifier that’s passed in, the existing `conversationIdentifier` value is returned. Similarly, it returns the existing `messagingSessionId` if one exists. The `conversationIdentifier` value is used by other Interaction Service APIs to perform tasks, such as route conversations, create AgentWork records, and send historical conversation entries. This API applies to the following products: - Bring Your Own Channel for Contact Center as a Service - Bring Your Own Channel for Messaging This API is available in version 61.0 and later. ## URI `v1/conversation` ## HTTP Method POST ## Headers ### Authorization (User-Level Authentication) **Format:** `Bearer ` String. Standard header. Used to authenticate the user, where `` is the Salesforce access token used as the bearer token to make requests to the Interaction Service APIs. Required. ### Content-Type **Format:** `application/json` String. Standard header. Format of the request payload. Required for any request that includes a body. ### OrgId **Format:** `` String. Custom header. The Salesforce org. `` is the 15-character Org ID of the Salesforce org. Required. ### RequestId **Format:** `` String. Custom header. Universally Unique Identifier (``) that references and tracks this request. Required. ### AuthorizationContext **Format:** `` String. Custom header. Additional information for the request authorization used to authenticate and validate requests against the connected app scopes. - For Bring Your Own Channel for CCaaS, set `` to the developer name of the ConversationChannelDefinition record. For example, Partner1_ChannelDefinition1. Required. - For Bring Your Own Channel for Messaging, set `` to the developer name of the ConversationChannelDefinition record. For example, Partner1_ChannelDefinition1. Required. ### Sample Header ``` -H $'Authorization: Bearer 00DSG000009SWby!...LN8XxeRIxGe' \ -H "content-type: application/json" \ -H "OrgId: 00DSG000009SWby" \ -H "AuthorizationContext: Partner1_ChannelDefinition1" \ -H "RequestId: a1b23c45-c06a-4784-c96c-cb95d3321bda" \ ``` ## Parameters | Property Name | Type | Description | Required | | :----------------------- | :----- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------- | | channelAddressIdentifier | string | The globally unique ID for the conversation channel (`MessagingChannel.ChannelAddressIdentifier`). | Yes | | participants | string | A list of end user and rep participants in the conversation. | Yes | | participants.subject | string | The end user client identifier. | Yes | | participants.role | string | The role within the conversation. Set this value to **EndUser**. | Yes | | participants.appType | string | The app type used for the conversation. Set this value to **custom** to represent a custom channel. | Yes | | routingAttributes | object | An optional object containing custom data to use for routing the conversation. This data helps Salesforce direct the conversation to the most appropriate rep or queue.
For Bring Your Own Channel for Messaging:
- If you add [support for custom parameters](https://developer.salesforce.com/docs/service/messaging-partner/guide/add-custom-objects.html) and call this API for an AI agent to initiate a conversation with proactive messaging, set `routingAttributes` to a `key-value` pair. `key` is set to the channel variable name in the parameter mapping, and `value` is set to the name of the custom parameter in Salesforce.
- If the messaging end user initiates the conversation instead, set `routingAttributes` in the [Message Interaction API](/docs/service/interaction-service-api/references/interaction-service-reference/interaction-type-message.html) (`/interactions`).
If conversation routing is partner-owned for Bring Your Own Channel for CCaaS and you add support for custom parameters, use the [/route API](https://developer.salesforce.com/docs/service/interaction-service-api/references/interaction-service-reference/api-route.md) to configure the routing attributes instead. | No | ## Example ### Request ```json { “channelAddressIdentifier”: “a12bc345-1303-44c2-866c-f30d546b58de” “participants”: [ { "subject”: “UserName01" "role”: “EndUser" "appType": "custom" } ], routingAttributes: { "newEndUserName" : "Sally Goforth" } } ``` ### Response ```json { "conversationIdentifier":"34ync34-34c34-v5v56n6-bn76n576" "messagingSessionId": "0MwSG00000BhyYr0A" "success":true } ``` ## See Also - _GitHub_: [Interaction Service APIs](https://github.com/salesforce-misc/interaction-service-apis) - _Bring Your Own Channel for CCaaS:_ [Enable Third-Party Bots for a Partner Contact Center](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/third-party-bots.html) # Estimated Wait Time (POST) Contains the error codes and error code messages related with Salesforce Scheduler API for the `estimated-wait-time` (POST) resource. This table lists HTTP response code descriptions that are unique to this resource. |HTTP Response Code|Error Code|Description| |------------------|----------|-----------| |400|`JSON_PARSER_ERROR`|The HTTP entity body is required, but this request has no entity body.| |405|`METHOD_NOT_ALLOWED`|The request used an HTTP method other than `POST`.| |500|`INTERNAL_ERROR`|Specify a valid Waitlist ID or Waitlist Participant ID and try again. Returned when both `waitlistId` and `waitlistParticipantId` are missing, empty, or null.| |500|`INTERNAL_ERROR`|The waitlist `` doesn't have an active work type group. Returned when `waitlistId` is invalid.| |500|`INTERNAL_ERROR`|Invalid waitlist participant id. Only one waitlist should be associated with waitlist participant. Returned when `waitlistParticipantId` is invalid.| # ESXi Host Details Represents the ESXi Host Details attribute set in the Configuration Management Database (CMDB). This attribute set groups related attributes for configuration items. ## Configuration Item Attribute Set Definition ||| |-|-| |Display Name|ESXi Host Details| |Developer Name|`SD_EsHoDe`| |Master Label|ESXi_Host_Details| ## Attributes ### ESXi Build - **Type**: text - **Developer Name**: `SD_EsBu` - **Description**: Describes the ESXi Build for configuration items. - **Required**: Optional ### ESXi Name - **Type**: text - **Developer Name**: `SD_EsNa` - **Description**: Describes the ESXi Name for configuration items. - **Required**: Optional ### ESXi Vendor - **Type**: text - **Developer Name**: `SD_EsVe` - **Description**: Describes the ESXi Vendor for configuration items. - **Required**: Optional ### ESXi Version - **Type**: text - **Developer Name**: `SD_EsVe1` - **Description**: Describes the ESXi Version for configuration items. - **Required**: Optional ### License Product Name - **Type**: text - **Developer Name**: `SD_LiPrNa` - **Description**: Describes the License Product Name for configuration items. - **Required**: Optional ### License Product Version - **Type**: text - **Developer Name**: `SD_LiPrVe` - **Description**: Describes the License Product Version for configuration items. - **Required**: Optional ### Product Line Id - **Type**: text - **Developer Name**: `SD_PrLiId` - **Description**: Describes the Product Line Id for configuration items. - **Required**: Optional ### VM Count - **Type**: text - **Developer Name**: `SD_VmCo` - **Description**: Describes the VM Count for configuration items. - **Required**: Optional # Esxi virtualises host Represents the Esxi virtualises host relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. ## Relationship Type Definition ||| |-|-| |Developer Name|`SD_EsViHo`| |Description|Defines the Esxi virtualises host relationship between configuration items in the CMDB.| |Master Label|Esxi virtualises host| |Direct Relationship|Esxi virtualises host| |Inverse Relationship|Host Virtualised on| |Line Stroke|Solid| |Color Code|`#D33682`| # Evaluate When to Open or Close Locations with Workplace Strategy Planner With Workplace Strategy Planner, add business priorities, operating guidelines, and COVID-19 public data to your Work.com org. Set thresholds on metrics to evaluate current risk levels at all workplace locations. Use the dashboard to visualize all the data in one place and to help guide your operating decisions. - **[Workplace Strategy Planner Data Triggers](https://developer.salesforce.com/docs/service/workdotcom-dev/guide/wkplan-data-triggers.md)** When the Workplace Strategy Planner managed package is installed into an org, data triggers on Crisis, Location, and Location Assessment are added. - **[Workplace Strategy Planner Object Reference](https://developer.salesforce.com/docs/service/workdotcom-dev/guide/wkplan-object-reference-intro.md)** The Workplace Strategy Planner package includes several custom objects and fields that are described in this section. Workplace Strategy Planner requires Workplace Command Center and builds on standard objects, such as Employee, Location, and Address. # Event Listeners Set up notifications when certain Enhanced Chat events are triggered. Use `window.addEventListener` to register a handler for a standard client event. ## Events | Event Name | Event Details | Scenario | | --------------------------------------------------- | ----------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `onEmbeddedMessagingBusinessHoursEnded` | {} | Fires when the current time is outside business hours. Business hours are specified in the Business Hours record. | | `onEmbeddedMessagingBusinessHoursStarted` | {} | Fires when a page that was loaded outside business hours transitions into business hours. Business hours are specified in the Business Hours record. | | `onEmbeddedMessagingButtonCreated` | {} | Fires when a chat button is added to your site. The button may be hidden if you are outside business hours or if it's set to hide. Business hours are specified in the Business Hours record. | | `onEmbeddedMessagingButtonClicked` | {} | Fires the first time the chat button is clicked by the end user. | | `onEmbeddedMessagingConversationClosed` | { SSE PAYLOAD } | Fires when an end user closes the messaging conversation. See [this example](https://developer.salesforce.com/docs/service/messaging-api/references/about/server-sent-events-structure.html#conversation_close_conversation) of the CONVERSATION_CLOSE_CONVERSATION server-sent event (SSE) payload. | | `onEmbeddedMessagingConversationOpened` | {} | Fires when a messaging conversation is loaded into a browser tab, whether it moved to a new browser tab or was loaded in the browser tab where the conversation started. | | `onEmbeddedMessagingConversationParticipantChanged` | { SSE PAYLOAD } | Fires when a new internal user, such as a bot or a rep, joins a conversation. Or, when an existing internal user leaves a conversation. See [this example](https://developer.salesforce.com/docs/service/messaging-api/references/about/server-sent-events-structure.html#conversation_participant_changed) of the CONVERSATION_PARTICIPANT_CHANGED server-sent event (SSE) payload. | | `onEmbeddedMessagingConversationRouted` | { SSE PAYLOAD } | Fires when a messaging conversation is routed or manually transferred from one internal recipient to another, such as from a bot to a rep. This event also fires if the routing or manual transfer is unsuccessful. See [this example](https://developer.salesforce.com/docs/service/messaging-api/references/about/server-sent-events-structure.html#conversation_routing_result) of the CONVERSATION_ROUTING_RESULT server-sent event (SSE) payload. | | `onEmbeddedMessagingConversationStarted` | {conversationId: "id"} | Fires when a messaging conversation starts. This event only applies to the browser tab where the conversation was created. | | `onEmbeddedMessageDelivered` | { SSE PAYLOAD } | Fires when an end user receives a delivery receipt. Delivery receipts must be enabled in Setup. See [this example](https://developer.salesforce.com/docs/service/messaging-api/references/about/server-sent-events-structure.html#conversation_delivery_acknowledgement) of the CONVERSATION_DELIVERY_ACKNOWLEDGEMENT server-sent event (SSE) payload. | | `onEmbeddedMessagingFirstBotMessageSent` | { SSE PAYLOAD } | Fires when the first bot joins the conversation and sends its first message. | | `onEmbeddedMessagingIdentityTokenExpired` | {} | The client dispatches the onEmbeddedMessagingIdentityTokenExpired event when you interact with the client after both the Salesforce authorization token and identity token have expired. If the Salesforce authorization token expires, but the identity token is still valid, the client generates a new Salesforce authorization token and keeps the session active without sending the onEmbeddedMessagingIdentityTokenExpired event. If you want to continue the session but the identity token has expired, you can renew the token and send it to the client using the [setIdentityToken](https://developer.salesforce.com/docs/service/messaging-web/references/m4w-reference/userVerificationAPI.html#setidentitytokenparameters) method in the event handler. The messaging session and user data are cleared automatically if you don't respond within 30 seconds of the onEmbeddedMessagingIdentityTokenExpired event being dispatched. If you want to clear the session before the 30 seconds have expired explicitly, you can call the [clearSession](https://developer.salesforce.com/docs/service/messaging-web/references/m4w-reference/userVerificationAPI.html#clearsession) method. | | `onEmbeddedMessagingInvitationAccepted` | {} | Fires when an invitation is accepted. | | `onEmbeddedMessagingInvitationRejected` | {} | Fires when an invitation is rejected. | | `onEmbeddedMessagingInvitationShown` | {} | Fires when an invitation is displayed or when a custom invitation is triggered. | | `onEmbeddedMessagingPreChatLoaded` | { prechatDisplay : "Conversation" / "Session" } | Fires when the pre-chat form is displayed to the end user. | | `onEmbeddedMessagingPreChatSubmitted` | { prechatDisplay : "Conversation" / "Session" } | Fires when the end user submits the pre-chat form. | | `onEmbeddedMessageLinkClicked` | {} | Runs when an end user clicks a link in the messaging conversation. Excludes enhanced links or links clicked outside of the conversation state, such as in pre-chat or post-chat. | | `onEmbeddedMessageRead` | { SSE PAYLOAD } | Fires when an end user receives a read receipt. Read receipts must be enabled in Setup. See [this example](https://developer.salesforce.com/docs/service/messaging-api/references/about/server-sent-events-structure.html#conversation_read_acknowledgement) of the CONVERSATION_READ_ACKNOWLEDGEMENT server-sent event (SSE) payload. | | `onEmbeddedMessagingReady` | {} | Fires when the Salesforce JavaScript API for Messaging is ready to use. At this point, you can make calls such as [userVerificationAPI.setIdentityToken](https://developer.salesforce.com/docs/service/messaging-web/references/m4w-reference/userVerificationAPI.html#setidentitytokenparameters) and [setHiddenPrechatFields](https://developer.salesforce.com/docs/service/messaging-web/references/m4w-reference/prechatAPI.html#sethiddenprechatfieldsfields). To let you know that the API is ready for calls, this method is called in the following situations.
  • Whenever a new page with the web client is loaded.
  • For user-verified conversations: after the user logs out (([userVerificationAPI.clearSession](https://developer.salesforce.com/docs/service/messaging-web/references/m4w-reference/userVerificationAPI.html#clearsession)) is called) and the API is ready for another conversation.
  • For anonymous conversations: after the conversation has ended and the user closes the chat window.
| | `onEmbeddedMessageSent` | { SSE PAYLOAD } | Fires when a rep, a bot, or an end user sends a message. The message can be typed manually or sent in the form of a messaging component. This event also fires when an end user clicks on a messaging component, resulting in a second messaging component being sent. See [this example](https://developer.salesforce.com/docs/service/messaging-api/references/about/server-sent-events-structure.html#conversation_message) of the CONVERSATION_MESSAGE server-sent event (SSE) payload. | | `onEmbeddedMessagingSessionStatusUpdate` | {SSE PAYLOAD} | Fires when a messaging session status changes to `Waiting`, `Active`, or `Ended`. | | `onEmbeddedMessagingTranscriptDownloadSuccessful` | { conversationId: "id" } | Fires when the messaging conversation transcript is successfully downloaded. | | `onEmbeddedMessagingTranscriptRequested` | { conversationId: "id" } | Fires when an end user requests a transcript of their messaging conversation history. | | `onEmbeddedMessagingTranscriptRequestFailed` | { conversationId: "id" } | Fires when the transcript request fails. | | `onEmbeddedMessagingWindowClosed` | {} | Fires when an end user clicks the Close (X) button or when the [clearSession](https://developer.salesforce.com/docs/service/messaging-web/references/m4w-reference/userVerificationAPI.html#clearsession) API closes the messaging window. | | `onEmbeddedMessagingWindowMinimized` | {} | Fires when the messaging conversation window is minimized. | | `onEmbeddedMessagingWindowMaximized` | {} | Fires when the messaging conversation window is maximized. | | `onEmbeddedMessagingWithinBusinessHours` | {} | Fires when a page is loaded during business hours. Business hours are specified in the Business Hours record. | Learn more about server-sent event (SSE) payloads in [Server-Sent Events](https://developer.salesforce.com/docs/service/messaging-api/references/about/server-sent-events.html). ## Code Example The following code is an example of how these events can be used in your Enhanced Web Chat code snippet. ```javascript window.addEventListener("onEmbeddedMessagingConversationStarted", (event) => { console.log("Received the onEmbeddedMessagingConversationStarted event…"); console.log("Event detail: ", event.detail); // Do something... }); ``` # Events for Use events and handlers in your Aura components and controllers to respond to events like workspace tabs opening, closing, or gaining focus. In Lightning web components, subscribe to Aura application events using their corresponding Lightning message channels. Aura application events are received by all rendered Aura components, even those on background tabs. By default, the Lightning message channel events are received by active components only, such as those on the foreground tab or in activated utility bar components. Your component can receive all Lightning message channel events by subscribing with the optional `APPLICATION_SCOPE` parameter. For more information, see [Define the Scope of the Message Service](https://developer.salesforce.com/docs/platform/lwc/guide/use-message-channel-scope.html). - **[lightning:tabClosed](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-events-tabclosed.md)** Indicates that a tab has been closed. - **[lightning:tabCreated](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-events-tabcreated.md)** Indicates that a tab has been created successfully. - **[lightning:tabFocused](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-events-tabfocused.md)** Indicates a tab was focused. - **[lightning:tabRefreshed](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-events-tabrefreshed.md)** Indicates that a tab has been refreshed. - **[lightning:tabReplaced](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-events-tabreplaced.md)** Indicates that a tab has been replaced successfully. - **[lightning:tabUpdated](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-events-tabupdated.md)** Indicates that a tab has been updated successfully. - **[Subscribe to Aura Application Events in LWC](https://developer.salesforce.com/docs/service/api-console/lwc/sforce-api-console-lwc-intro.md)** Subscribe to Aura application events using their corresponding Lightning message channels. - **[Lightning Web Component Events for Enhanced Messaging](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-lightning-enhanced-messaging-lwc-events.md)** JavaScript can be executed when certain types of events occur in a console, such as when a user closes a tab. A few events are specific to Messaging. These events apply to Lightning web components in Lightning Experience only. - **[Aura Events for Enhanced Messaging](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-lightning-messaging-events.md)** JavaScript can be executed when certain types of events occur in a console, such as when a user closes a tab. A few events are specific to Messaging. These events apply to Aura components in Lightning Experience only. - **[Events for Chat](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-lightning-liveagent-events.md)** JavaScript can be executed when certain types of events occur in a console, such as when a user closes a tab. A few events are specific to Chat. These events apply to Lightning Experience only. - **[Events for Omni-Channel](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-lightning-omnichannel-events.md)** JavaScript can be executed when certain types of events occur in a console, such as when a user closes a tab. There are a few events that are specific to Omni-Channel. These events apply to Lightning Experience only. # Events for Chat JavaScript can be executed when certain types of events occur in a console, such as when a user closes a tab. A few events are specific to Chat. These events apply to Lightning Experience only. **important:** The legacy chat product is in maintenance-only mode, and we won't continue to build new features. You can continue to use it, but we no longer recommend that you implement new chat channels. Instead, you can modernize your customer communication with [Messaging for In-App and Web](https://help.salesforce.com/s/articleView?id=service.miaw_intro_landing.htm&type=5). Messaging offers many of the [chat features that you](https://help.salesforce.com/s/articleView?id=service.miaw_chat_vs_messaging.htm&type=5) love plus asynchronous conversations that can be picked back up at any time. For Lightning Console JavaScript API, use [Lightning Web Component Events for Enhanced Messaging](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-lightning-enhanced-messaging-lwc-events.md) or [Aura Events for Enhanced Messaging](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-lightning-messaging-events.md). - **[lightning:conversationAgentSend](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-events-liveagent-conversationagentsend.md)** Event triggered when an agent sends a chat message through the Salesforce console. This method does not intercept the message before it’s sent to the chat visitor. This event is also triggered when using Enhanced Messaging channels. - **[lightning:conversationChatEnded](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-events-liveagent-conversationchatended.md)** Event triggered when an active chat ends or an agent leaves a chat conference. This event is also triggered when using Enhanced Messaging channels. - **[lightning:conversationCustomEvent](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-events-liveagent-conversationcustomevent.md)** Event triggered when a custom event occurs during a chat. - **[lightning:conversationNewMessage](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-events-liveagent-conversationnewmessage.md)** Event triggered when the customer sends a new message. This event is also triggered when using Enhanced Messaging channels. To work with Enhanced Messaging channels, the session must be active and the Enhanced Conversation Component must be visible on the page. # Events for Omni-Channel JavaScript can be executed when certain types of events occur in a console, such as when a user closes a tab. There are a few events that are specific to Omni-Channel. These events apply to Lightning Experience only. - **[lightning:omniChannelConnectionError](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-events-omnichannelconnectionerror.md)** Indicates that a network connection issue occurred. - **[lightning:omniChannelLoginSuccess](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-events-omnichannelloginsuccess.md)** Indicates that an agent has been logged into Omni-Channel successfully. - **[lightning:omniChannelStatusChanged](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-events-omnichannelstatuschanged.md)** Indicates that an agent has changed his or her presence status in Omni-Channel. - **[lightning:omniChannelLogout](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-events-omnichannellogout.md)** Indicates that an agent has logged out of Omni-Channel. - **[lightning:omniChannelWorkAssigned](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-events-omnichannelworkassigned.md)** Indicates that an agent has been assigned a new work item. - **[lightning:omniChannelWorkAccepted](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-events-omnichannelworkaccepted.md)** Indicates that an agent has accepted a work assignment, or that a work assignment has been automatically accepted. - **[lightning:omniChannelWorkDeclined](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-events-omnichannelworkdeclined.md)** Indicates that an agent has declined a work assignment. - **[lightning:omniChannelWorkClosed](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-events-omnichannelworkclosed.md)** Indicates that the status of an AgentWork object is changed to Closed. - **[lightning:omniChannelWorkFlagUpdated](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-events-omnichannelworkflagupdated.md)** Indicates that an agent’s work item flag has been raised or lowered. - **[lightning:omniChannelWorkloadChanged](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-events-omnichannelworkloadchanged.md)** Indicates that an agent’s workload has changed. This includes receiving new work items, declining work items, and closing items in the console. It also indicates that there has been a change to an agent’s capacity or presence configuration, or that the agent has gone offline in the Omni-Channel utility. # Exchanges Data With Represents the Exchanges Data With relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. ## Relationship Type Definition ||| |-|-| |Developer Name|`SD_ExDaWi`| |Description|Defines the Exchanges Data With relationship between configuration items in the CMDB.| |Master Label|Exchanges Data With| |Direct Relationship|Exchanges Data With| |Inverse Relationship|Exchanges Data With| |Line Stroke|Solid| |Color Code|`#6699FF`| # Extend Work.com with Custom Solutions Build custom solutions for Work.com, including Workplace Command Center, Wellness Check, Shift Management, Employee Workspace and more, to help businesses respond to a major event, adopt wide-scale compliance, implement an auditing system, or other workplace operations. We built Work.com as the solution to help businesses reopen the workplace as quickly as possible, while keeping employees, customers, partners, and communities safe and informed during the COVID-19 crisis and beyond. The Work.com solution is an ecosystem of many products including the Workplace Command Center, Shift Management, Emergency Response Management and more. Work.com provides a framework for organizing critical information from various sources such as government policies, regional health data, and company information. Use the Work.com framework to enhance employees’ Work.com experience, or integrate Work.com data with existing apps in the following ways. - Enrich Work.com data. Add more employee or location details, or integrate your own data model, to improve the Work.com Workplace Command Center experience. - Enhance the Workplace Command Center functionality. Create custom components that users can add to the Workplace Command Center with critical features. Update your component UI in real-time based on user changes to location filters. - Integrate Work.com data in other solutions. Expand the Work.com solution with more data-driven apps. As you begin developing your Work.com solution, we recommend reviewing [Salesforce's Privacy and Ethical Use Principles guiding COVID-19 response](https://www.salesforce.com/content/dam/web/en_us/www/documents/legal/Privacy/privacy-and-ethical-use-principles-guiding-our-covid-19-response.pdf). # Feeds Represents the Feeds relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. ## Relationship Type Definition ||| |-|-| |Developer Name|`SD_Feexx`| |Description|Defines the Feeds relationship between configuration items in the CMDB.| |Master Label|Feeds| |Direct Relationship|Feeds| |Inverse Relationship|Fed By| |Line Stroke|Solid| |Color Code|`#00CC00`| # Fetch Files Output representation for a fetch optimization files operation. Contains a map of the files created in the org for the specified optimization request. ## JSON Example ```nolang { "createdFiles": { "property1": { "contentVersionId": "string", "success": true }, "property2": { "contentVersionId": "string", "success": true } } } ``` ## Properties |Property Name|Type|Description|Filter Group and Version|Available Version| |-------------|----|-----------|------------------------|-----------------| |`createdFiles`|Map\|Map of file names to their corresponding file creation details. Each key is the name of a file associated with the optimization request. Each value contains the Content Version ID and a success indicator.|Small, 66.0|66.0| # Fetch Files Input Input representation for retrieving files generated by an optimization request in Enhanced Scheduling and Optimization. ## JSON Example ```nolang { "optimizationRequestId": "0XxXX0000000001AAA" } ``` ## Properties |Name|Type|Description|Required or Optional|Available Version| |----|----|-----------|--------------------|-----------------| |`optimizationRequestId`|String|ID of the optimization request for which to retrieve the generated files.|Required|66.0| # Fetch Optimization Files Fetch the files generated for an optimization request in Enhanced Scheduling and Optimization. This resource requires Field Service to be enabled for the org and requires the context user to have Field Service enabled. ## Resource ```nolang /connect/field-service/scheduling-operations/fetchOptimizationFiles ``` ## Resource Example ```nolang https://yourInstance.salesforce.com/services/data/v68.0/connect/field-service/scheduling-operations/fetchOptimizationFiles ``` ## Available Version 66.0 ## HTTP Methods POST ## Request Body for POST ### JSON Example ```nolang { "optimizationRequestId": "0XxXX0000000001AAA" } ``` ### Properties |Name|Type|Description|Required or Optional|Available Version| |----|----|-----------|--------------------|-----------------| |`optimizationRequestId`|String|ID of the optimization request for which to retrieve the generated files.|Required|66.0| ## Response Body for POST [Fetch Files](https://developer.salesforce.com/docs/service/field-service-dev/guide/connect-responses-fetch-files.md) # Field Service Apex Reference The Field Service Apex Reference provides the Field Service (FSL) namespace for programmatic access to Field Service functionality and the ConnectApi namespace for accessing Connect REST API data and building custom experiences in Salesforce. - **[ConnectApi Namespace](https://developer.salesforce.com/docs/service/apex/reference/ns-connectapi/apex-classes-connect-api.md)** The `ConnectApi` namespace (also called Connect in Apex) provides classes for accessing the same data available in Connect REST API. Use Connect in Apex to create custom experiences in Salesforce. - **[FSL Apex Namespace](https://developer.salesforce.com/docs/service/field-service-dev/guide/apex-namespace-fsl.md)** The Field Service (FSL) namespace contains all classes, methods, Visualforce pages, and custom objects within the Field Service managed package. To allow access to namespace elements, assign the FSL custom permission set that's appropriate for the user's persona. For example, to allow a user to book appointments, assign the FSL Agent custom permission set. **See Also** - [Install the Field Service Managed Package](https://help.salesforce.com/articleView?id=pfs_install.htm) # Field Service API The REST and Connect REST endpoints mentioned here can be used to manage your field service implementation. - **[Field Service Flow](https://developer.salesforce.com/docs/service/field-service-dev/guide/fsl-dev-fieldserviceflow.md)** Returns information corresponding to a field service flow. This resource is available in REST API version 42.0 and later. - **[Field Service Mobile Settings](https://developer.salesforce.com/docs/service/field-service-dev/guide/fsl-dev-fieldservicemobilesettings.md)** Returns information about the Field Service mobile app settings assigned to the profile of the context user. This resource is available in REST API version 42.0 and later. - **[Service Report Template](https://developer.salesforce.com/docs/service/field-service-dev/guide/fsl-dev-servicereporttemplate.md)** Returns information corresponding to one or more service report templates in field service. This resource is available in REST API version 40.0 and later. - **[Appointment Bundling REST APIs](https://developer.salesforce.com/docs/service/field-service-dev/guide/fsl-rest-sabundling.md)** Use the Appointment Bundling REST APIs to create bundles, remove bundle members, start the automated process for creating bundles, unbundle one or more bundles, and update a bundle. - **[REST Reference](https://developer.salesforce.com/docs/service/field-service-dev/guide/schedulingoperation/business-apis/fs-apis-rest-references.md)** You can access Field Service APIs using REST endpoints. These REST APIs follow similar conventions as Connect REST APIs. # Field Service Code Examples Use these code examples to get started working programmatically with Field Service features. - **[Create a Service Report with Apex](https://developer.salesforce.com/docs/service/field-service-dev/guide/fsl-dev-code-samples-sr.md)** The Create Service Report action on work orders, work order line items, and service appointments can also be called using Apex code. The code example shown creates a service report with two signatures by making an Apex callout to the `createServiceReport` action REST API resource. - **[Generate Work Orders on Maintenance Plans with Apex](https://developer.salesforce.com/docs/service/field-service-dev/guide/fsl-dev-code-samples-wo.md)** The **Generate Work Orders** action on maintenance plans can also be called using Apex code. The following code sample creates work order records by making an Apex callout to the `generateWorkOrder` action REST API resource. - **[Code Examples: Dispatcher Console Custom Actions](https://developer.salesforce.com/docs/service/field-service-dev/guide/fsl-dev-code-samples-dispatcher.md)** Learn how to configure Apex classes or Visualforce pages that you want to link to a custom action in the dispatcher console. - **[Create Service Appointment Lists in the Dispatcher Console](https://developer.salesforce.com/docs/service/field-service-dev/guide/fsl-dev-code-samples-sal.md)** You can create user-specific temporary appointment lists by adding the `Create Temporary Service Appointment List` custom permission in Field Service managed package. If the custom permission is enabled, the Field Service app creates a connection to the `CreateFilterEvent__e` platform event channel and subscribes to related messages. # Field Service Core Data Model Use Field Service’s core objects to complete essential field service tasks such as managing work orders, defining your service territories, and tracking your workforce. **note:** Asterisks in the following diagrams signify required fields. _Work orders_ represent work to be completed for your customers, and are central to field service operations in Salesforce. To divide the work further for billing purposes or to track subtasks, add work order line items, which are child records of work orders. ![Work Order diagram](https://developer.salesforce.com/media/field-service-dev/fsl_dev_wo.png '{"class": "image-xs"}') Work orders offer a great deal of flexibility. They can be associated with many types of records, including: - _Assets_, to track work performed on a specific asset - _Cases_, to indicate that the work is being performed as part of a customer case - _Accounts_ and _contacts_, representing the customer - _Entitlements_ and _service contracts_, to indicate that the work is being done to fulfill a service-level agreement While work orders describe the work to be performed, _service appointments_ represent the visits your team makes to the field to perform the work. They include scheduling settings such as an arrival window, scheduled start and end times, and appointment duration. Every service appointment has a parent record. The parent record is typically a work order or work order line item, but you can also add child service appointments to accounts, assets, leads, or opportunities to track related visits. A record can have multiple child service appointments; for example, a work order may have two service appointments if two visits were needed to complete the work. ![Service appointment diagram](https://developer.salesforce.com/media/field-service-dev/fsl_dev_sa.png) If your team often performs the same tasks for multiple customers, create _work types_ to standardize your field service work. Work types are templates that can be applied to work orders and work order line items. On a work type, you can define the duration of the work and add _skill requirements_ to indicate the level of expertise needed to complete the work. You can also opt to auto-create a child service appointment on any record that uses the work type. Work orders and service appointments are supported by a variety of objects that control when and where the work occurs, the nature of the work, and who performs it. ![Core diagram](https://developer.salesforce.com/media/field-service-dev/fsl_dev_core.png) ## Who Performs the Work Members of your mobile workforce are represented in Salesforce as _service resources_. A service resource represents an individual technician who can be assigned to a service appointment. You can also create _service crews_, which are groups of service resources with complementary skills and experience that can be assigned to appointments as a unit. To assign a service resource to a service appointment, create an _assigned resource_ record. Assigned resources contain lookups to a service resource and a service appointment. To assign a service crew to an appointment, first create a representative service resource record with a resource type of Crew. Then, create an assigned resource record that looks up to the Crew service resource. Service resources come with several objects that let you define their skills and availability: - _Service resource skills_ represent a service resource’s certifications or levels of expertise. - _Resource capacity_ records track the hourly or job-based capacity of contractors. - _Resource absences_ represent time when a service resource needs to miss work. - _Resource preferences_ designate specific service resources as preferred, required, or excluded on a work order or account. ## Where the Work Occurs _Service territories_ are the places where your team can perform field service work and are a way to organize your service resources. They typically represent geographic territories such as cities or counties but may also represent functional divisions like sales versus service. A _work order_ can be associated with one service territory. _Service resources_ are assigned to one or more service territories as _service territory members_ to indicate that they are available to work in the territory. ![Territory diagram](https://developer.salesforce.com/media/field-service-dev/fsl_dev_territory.png) ## When the Work Occurs _Operating hours_ indicate when your team can perform field service work. They can be assigned to accounts, service territories, and service territory members. To add detail to operating hours, create _time slots_, which represent the hours of operation in a particular day. ![Operating hours diagram](https://developer.salesforce.com/media/field-service-dev/fsl_dev_oh.png) If a customer _entitlement_ includes terms regarding when the customer has access to field service, you can track these hours on the entitlement using the **Operating Hours** field (API name: `SvcApptBookingWindowsId`). For example, if Customer A is entitled to service Monday through Friday from 8 AM to noon, but Customer B is entitled to 24/7 service, you can create operating hours for each customer and assign them to the related entitlement. **See Also** - [Guidelines for Creating Operating Hours for Field Service](https://help.salesforce.com/articleView?id=fs_oh_considerations.htm) # Field Service Custom Fields on Standard Objects A list of custom fields on standard Salesforce objects installed with the Field Service managed package. See the [Field Service Apex Reference](https://developer.salesforce.com/docs/service/field-service-dev/guide/fsl-dev-mp-intro.md) section for more API references related to the managed package. - **[AssignedResource Custom Fields](https://developer.salesforce.com/docs/service/field-service-dev/guide/objects/fsl-custom-fields-object-assignedresource.md)** Custom fields associated with a service resource who is assigned to a service appointment in Field Service. Assigned resources appear in the Assigned Resources related list on service appointments. This object is available in API version 38.0 and later. - **[ResourceAbsence Custom Fields](https://developer.salesforce.com/docs/service/field-service-dev/guide/objects/fsl-custom-fields-object-resourceabsence.md)** Custom fields associated with a time period in which a service resource is unavailable to work in Field Service. - **[ServiceAppointment Custom Fields](https://developer.salesforce.com/docs/service/field-service-dev/guide/objects/fsl-custom-fields-object-serviceappointment.md)** Custom fields associated with an appointment to complete work for a customer in Field Service. - **[ServiceResource Custom Fields](https://developer.salesforce.com/docs/service/field-service-dev/guide/objects/fsl-custom-fields-object-serviceresource.md)** Custom fields associated with a field service technician or crew in Field Service. - **[ServiceResourceCapacity Custom Fields](https://developer.salesforce.com/docs/service/field-service-dev/guide/objects/fsl-custom-fields-object-serviceresourcecapacity.md)** Custom fields associated with the maximum number of scheduled hours or number of service appointments that a capacity-based service resource can complete within a specific time period. - **[ServiceTerritory Custom Fields](https://developer.salesforce.com/docs/service/field-service-dev/guide/objects/fsl-custom-fields-object-serviceterritory.md)** Custom fields associated with a geographic or functional region in which field service work can be performed in Field Service. - **[TimeSlot Custom Fields](https://developer.salesforce.com/docs/service/field-service-dev/guide/objects/fsl-custom-fields-object-timeslot.md)** Custom fields associated with a period of time on a specified day of the week during which field service work can be performed in Field Service. Operating hours consist of one or more time slots. - **[WorkOrder Custom Fields](https://developer.salesforce.com/docs/service/field-service-dev/guide/objects/fsl-custom-fields-object-workorder.md)** Custom fields associated with field service work to be performed for a customer. - **[WorkOrderLineItem Custom Fields](https://developer.salesforce.com/docs/service/field-service-dev/guide/objects/fsl-custom-fields-object-workorderlineitem.md)** Custom fields associated with a subtask on a work order in field service. # Field Service Custom Triggers Field Service custom triggers ensure that the objects and respective fields are processed before or after scheduling. The Field Service package provides triggers on Salesforce objects. Each trigger checks for various conditions and then performs tasks based on what it finds. Some of the triggers run on custom objects and some on standard objects. |Trigger Name|Host Object|Object Type| |------------|-----------|-----------| |FSL__TR021_AssignedResource.trigger|Assigned Resource|Standard Object| |FSL__TR004_Event.trigger|Event|Standard Object| |FSL__TR030_GanttPalette.trigger|Gantt Palette|Custom Object| |FSL__TR029_GanttFilter.trigger|Gantt Filter|Custom Object| |FSL__TR034_OperatingHours.trigger|Operating Hours|Standard Object| |FSL__TR013_OptimizationRequest.trigger|Optimization Request|Custom Object| |FSL__TR028_Polygon.trigger|Map Polygon|Custom Object| |FSL__TR007_ResourceAbsence.trigger|Resource Absence|Standard Object| |FSL__TR010_SchedulingPolicy.trigger|Scheduling Policy|Custom Object| |FSL__SchedulingPolicyWorkRule.trigger|Scheduling Policy Work Rule|Custom Object| |FSL__TR001_Service.trigger|Service Appointment|Standard Object| |FSL__TR008_ServiceResource.trigger|Service Resource|Standard Object| |FSL__TR012_Capacity.trigger|Service Resource Capacity|Standard Object| |FSL__TR066_ServiceObjective.trigger|Service Objective|Custom Object| |FSL__TR025_ServiceResourceSkill.trigger|Service Resource Skill|Standard Object| |FSL__TR0023_ServiceTerritory.trigger|Service Territory|Standard Object| |FSL__TR020_ResourceTerritories.trigger|Service Territory Member|Standard Object| |FSL__TR0024_ServiceTerritory.trigger|Skill Requirement|Standard Object| |FSL__TR051_TimeDependency.trigger|Time Dependency|Custom Object| |FSL__TR027_TimeSlot.trigger|Time Slot|Standard Object| |FSL__TR005_UserTerritory.trigger|User Territory|Custom Object| |FSL__TR022_WorkOrder.trigger|Work Order|Standard Object| |FSL__TR026_WorkRule.trigger|Work Rule|Custom Object| |FSL__TR022_WorkOrderLineItem.trigger|Work Order Line Item|Standard Object| ## Assigned Resource **Before Insert:** - Stops the trigger execution if one of the created resources is crew members. This situation is handled in a different flow. - Fails the trigger if the inserted assigned resources don’t have the scheduled start and schedule end time fields populated. - Fails the trigger if the created resources don’t have a valid service territory member assigned to them. - Populates the created resource’s ServiceCrewId field if the resources are from type Crew. **After Insert:** - If the Enable User Territories sharing setting is enabled, this trigger shares the created service appointment with the service territory public group. This functionality provides sharing to the dispatchers that are part of the service appointment territory. If the service resource is relocated, the appointment is shared with the public group of the new territory, ensuring dispatchers have access to relevant service appointments. - If the Enable User Territories sharing setting is enabled and the respective service appointment parent sharing setting is enabled, this trigger shares the created service appointment’s parent with the service territory public group. This action provides sharing to the dispatchers that are part of the service appointment territory. To learn more, see [Limit Access to Field Service Records](https://help.salesforce.com/articleView?id=fs_sharing.htm&type=5). - If the status categories change to Dispatched, this trigger shares the created resource’s service appointments with the service resource’s users. If the service territories change, this trigger shares with the service territory public groups. - Mentions the assigned resource user if the relevant setting is enabled. - Performs this operation in an asynchronous method if possible. - Stops the trigger execution if one of the created resources is crew members. This behavior is handled in a different flow. - Updates or creates a calendar event based on the created resource. - If the assigned resources’ service statuses are either None or Canceled, this trigger changes their statuses to Assigned. - If the created resources’ service is a multi-day service appointment, this trigger checks if it’s necessary to recalculate the service duration. If so, the trigger recalculates the length. - If the travel trigger is enabled in the org, this trigger recalculates travel for all services scheduled on the same day as the services’ start and end dates. - Creates assigned resources for crew members. If the resource in the trigger is for the resource type crew, we create a single resource per crew member as well. - Updates the ResourceCapacity object according to the resources’ service appointments. If a service appointment is scheduled to a contractor, this trigger updates their capacity to reflect the actual scheduled working time and working items allocated. **Before Update:** - Fails the trigger if the created Assigned Resources record doesn’t have a valid Service Territory Member assigned to them. - Populates the ServiceCrewId field if the service resources are from type crew. **After Update:** - If the Enable User Territories sharing setting is enabled, this trigger shares the created service appointment with the service territory public group. This functionality provides sharing to the dispatchers that are part of the service appointment territory. If the service resource is relocated, the appointment is shared with the public group of the new territory, ensuring dispatchers have access to relevant service appointments. - If the service appointment is a multi-day appointment, this trigger checks if there’s a need to recalculate the service duration. If so, this trigger recalculates the length. - Updates or creates a calendar event based on the assigned resources updated. - Creates and deletes assigned resources based on the resources’ updates. If an assigned resource in the trigger is for the service resource of type crew, we create a single assigned resource per crew member as well. - Updates the Resource Capacity object according to the assigned resources’ service appointments. If an assigned resource was scheduled to a contractor, we update their capacity to reflect the actual scheduled working time and working items allocated. - If the Service Resource field was changed on the assigned resource update, this trigger removes old sharing and creates sharing according to the service resource’s and the dispatcher’s territories. - If the Make assigned resources followers of service appointments that are Dispatched or In Progress setting is enabled in the settings page, and the respective service appointment Status Category field was updated, this trigger makes the updated assigned resources followers of the service appointments and parents. - If the travel trigger is enabled in the org, this trigger recalculates travel for all services scheduled in the same day of the services’ start and end dates. - Updates the schedule mode according to the actual scheduling operation (that is, Optimization, Automatic, Manual). **Before Delete:** - Removes sharing from the delete assigned resources’ service appointments. - If the deleted assigned resource is a resource of the type crew, this trigger deletes the respective crew members appointment resources. **After Delete:** - If the travel trigger is enabled in the org, this trigger recalculates travel for all services scheduled in the same day of the deleted assigned resources’ services’ start and end dates. - Updates the Resource Capacity object according to the deleted assigned resources’ service appointments. If a service appointment was unscheduled from a contractor, update their capacity to reflect the actual scheduled working time and working items allocated. - If the Make assigned resources followers of service appointments that are Dispatched or In Progress setting is enabled in the settings page, this trigger unfollows the deleted assigned resources’ service appointments and service appointments’ parents. - Nullifies the deleted assigned resources’ Service Appointments’ scheduled start and end time, and changes the status to None. - If one of two Follow Immediately chains were unscheduled, that is, the assigned resource got deleted, this trigger unschedules the respective service appointment in the chain. To learn more, see [Schedule an Appointment That Immediately Follows Another](https://releasenotes.docs.salesforce.com/en-us/spring20/release-notes/rn_field_service_follow_immed.htm). ## Event All triggers for this object are part of the Calendar Sync feature, which is described in [Calendar Sync’s Knowledge Article](https://help.salesforce.com/articleView?id=000316720&type=1). **Before Insert:** - Creates Resource Absences, Work Orders, Service Appointments, and Assigned Resources according to the settings described in [Calendar Sync’s Knowledge Article](https://help.salesforce.com/articleView?id=000316720&type=1). - Calendar Sync’s settings are located in the Field Service settings page. From the settings page, select **Sharing** | **Calendar Sync**. **After Update:** This file is called FSL__TR004_Event_BeforeUpdate but fires only after update. - If one or more of the following fields has changed, this trigger updates the Salesforce records accordingly: OwnerId, Subject, Location, StartDateTime, EndDateTime. - If the FSL__Event_Type__c field has changed and the new value is valid, this trigger creates the Salesforce records accordingly. **After Delete:** This file is called FSL__TR004_Event_BeforeDelete but fires only after delete. - If the FSL__Event_Type__c field matches the ‘Calendar Event type’ setting of Service Appointment, and the service hasn’t been updated, then this trigger deletes the Assigned Resource related to that service. This trigger unschedules the Service Appointment. - If the FSL__Event_Type__c field matches the ‘Calendar Event type’ setting of Resource Absence, then this trigger deletes the related absence. ## Gantt Filter **After Insert:** - If the Make this filter available for all users checkbox is checked, this trigger creates a Share record for the FSL__Gantt_Filter__c and AllInternalUsers group. **After Update:** - If the Make this filter available for all users checkbox is unchecked in the update, then this trigger deletes its share record. - If the checkbox is checked in the update, then this trigger adds a sharing record as described in After Insert. ## Gantt Palette **After Insert:** - Add sharing to the AllInternalUsers group. **After Update:** - Add sharing to the AllInternalUsers group if no such sharing exists already. ## Map Polygon **Before Insert:** - Sets the minimum and maximum Latitude and Longitude of the polygon to the designated fields. **Before Update:** - Sets the minimum and maximum Latitude and Longitude of the polygon to the designated fields. ## Operating Hours **Before Delete:** - Validates that the record deleted isn’t the default operating hours in appointment booking settings. From the Field Service settings page, select **Global Actions** | **Appointment Booking**. **After Update:** - If the Appointment Bundling feature is enabled, and the Use Bundle Apex Mode custom setting equals 2, the serviceTerritoryRefresh API http request is triggered. ## Optimization Request **Before Insert:** - Sets the FSL__Text_Status__c text field with the value of the FSL__Status__c picklist field. The FSL__Text_Status__c is a text field marked as an External ID and is used to improve query performance. **Before Update:** - Prevents the FSL__Status__c picklist field from changing from In Progress to Queued. This trigger returns the status to In Progress. - Validates that a record with the FSL__Status__c value of Aborted doesn’t change to Completed. If it does, this trigger prevents the change and throws an error. - If the status is changed to Aborted, this trigger checks the following conditions: - The change wasn’t caused by the optimization user. - The Optimization Request wasn’t aborted by the auto-kill feature. That is, the feature that kills requests that stay in a specific status more than what’s defined in the custom settings. - The user has Abort_Optimization_Request custom permission on their profile or one of their permission sets. If all the previously mentioned criteria are met, the request is aborted. ## Resource Absence **Before Insert:** - Changes the scale of the geolocation values (latitude and longitude) to 6 digits after the decimal point. - Removes seconds and milliseconds from the resource absence DateTime fields. - Fills the InternalSLRGeolocation fields (latitude and longitude) based on the geolocation values. The InternalSLRGeolocation fields are used in street-level routing and predictive route calculations. **After Insert:** - If the inserted resource absence is the type nonavailability then: - If a multi-day service appointment was affected by the resource absence and there’s just one service appointment, this trigger updates its duration. - If Fix Overlaps is enabled in the org and Travel Trigger is disabled, this trigger calls Fix Overlaps. - If Travel Trigger is enabled in the org and no multi-day appointment was updated in step 1, this trigger recalculates travel for all services scheduled in the same day of the absences’ start and end dates. - If the calendar sync feature is turned on then the trigger creates a calendar event for the resource absence. - Otherwise, this trigger does nothing. **Before Update:** (content is the same as Before Insert) - Changes the scale of the geolocation values (latitude and longitude) to 6 digits after the decimal point. - Removes seconds and milliseconds from the resource absence’s DateTime fields. - Fills the InternalSLRGeolocation fields (latitude and longitude) based on the geolocation values. The InternalSLRGeolocation fields are used in street-level routing and predictive routes’ calculations. We don’t check for a change in the geolocation values—we update them like in the Before Insert trigger. **After Update:** - If the updated resource absence is the type non availability then: - If a multi-day service appointment was affected by the resource absence change and there’s just one service appointment, this trigger updates its duration. - If Fix Overlaps is enabled in the org and Travel Trigger is disabled, this trigger calls Fix Overlaps. - If Travel Trigger is enabled in the org and no multi-day appointment was updated in step 1, this trigger recalculates travel for all services scheduled in the same day of the absences’ start and end dates. - If the calendar sync feature is turned on then the trigger creates a calendar event for the resource absence. - Otherwise, this trigger does nothing. **Before Delete:** - Deletes the matching calendar event if it exists. See the [Calendar Sync’s Knowledge Article](https://help.salesforce.com/articleView?id=000316720&type=1) for more information. **After Delete:** - If the deleted resource absence is the type nonavailability then: - If a multi-day service appointment was affected by the resource absence deletion and there’s just one service appointment, this trigger updates its duration. - If Fix Overlaps is enabled in the org and Travel Trigger is disabled, this trigger calls Fix Overlaps. - If Travel Trigger is enabled in the org and no multi-day appointment was updated in step 1, this trigger recalculates travel for all services scheduled in the same day of the absences’ start and end dates. ## Scheduling Policy **Before Insert:** - Validates that the Travel Mode checkbox is checked only when this feature is enabled in the org. - Validates that In-Day Optimization is checked only when Enhanced Optimization is enabled in the org. **After Insert:** - Creates Earliest Start Time and Due Date basic time rules if they don’t exist. - Create the Scheduling Policy Work Rule junction object to assign these work rules to the inserted policy. **Before Update:** - Validates that the Travel Mode checkbox is checked only when this feature is enabled in the org. - Validates that In-Day Optimization is checked only when Enhanced Optimization is enabled in the org. **Before Delete:** - Validate that the deleted record isn’t the default scheduling policy for the appointment booking action. - Validates that the Travel Mode checkbox is checked only when this feature is enabled in the org. - Validates that In-Day Optimization is checked only when Enhanced Optimization is enabled in the org. - Deletes the Earliest Start Time and Due Date’Scheduling Policy Work Rules junction objects. ## Scheduling Policy Work Rule **Before Insert:** - Validates that there are no duplications. That is, validates that there’s just one Scheduling Policy Work Rule record referencing a specific work rule in the same policy. - Validates that there aren’t more than two enhanced match rules in the same policy. If there are two, make sure they’re referencing different Linking Objects. - Validates that there aren’t more than four Count Rules with Count Type of CustomValue. - Validates that all Count Rule fields are valid. **Before Update:** Same as Before Insert. **Before Delete:** - Prevents the deletion of a Scheduling Policy Work Rule record related to Due Date and Earliest Start Time basic rules. - If you delete the Scheduling Policy, it passes over this validation and deletes all related Scheduling Policy Work Rules. ## Service Appointment **Before Insert:** - Remove seconds from the Service Appointment’s DateTime fields. - If there’s a geolocation (latitude and longitude) on the created ServiceAppointment record, limit the decimal places after the decimal point to a maximum of 6 digits. - If there’s a geolocation (latitude and longitude) on the created ServiceAppointment record, populate the FSL__InternalSLRGeolocation__Latitude__s, FSL__InternalSLRGeolocation__Longitude__s fields. These fields are used when calculating street-level routing routes. - If the Derive the Service Appointment due date from its Work Type setting is enabled, this trigger derives the Duration field from the work order parent record and populates the Due Date field with the value of Earliest Start Permitted plus Due Date offset, which comes from the parent’s work type field. - If the Set your default service appointment duration to one hour setting is enabled, this trigger sets the service appointment duration to 1 hour if one of the following occurs: - The duration field is null. - The duration is shorter than 1 minute. **After Insert:** - If the Enable User Territories sharing setting is enabled, share the created service appointment with the service territory public group. This behavior provides sharing to the dispatchers who are part of the service appointment’s territory. - If the Enable User Territories sharing setting is enabled and the respective service appointment parent sharing setting is enabled, that is, Share parent Work Order when Service Appointment is shared, this trigger shares the created service appointment’s parent with the service territory public group. This behavior provides sharing to the dispatchers who are part of the service appointment’s territory. - If the Derive the Service Appointment due date from its Work Type setting is enabled, this trigger derives the Duration field from the work order parent record and populates the Due Date field with the value of Earliest Start Permitted plus Due Date offset, which comes from the parent’s work type field. This behavior is intentionally in both the Before Insert and the After Insert triggers. - Schedules created service appointments in batches if they have the Auto Schedule field value set to true. The default policy, which is set in the Field Service settings page, is used when auto-scheduling service appointments upon creation. - After the batch was invoked, the Auto Schedule flag is set to false automatically. - If the Use polygons to assign service territories setting is enabled, this trigger auto populates the created service appointment’s service territory field based on the service appointment’s address and its match of a Map Polygon Service Territory field. - If there’s no match between the service appointment’s address and the organization map polygons, the service territory field remains unchanged. - If the Appointment Bundling feature is enabled; the Use Bundle Apex Mode custom setting equals 2; and the inserted service appointment is a bundle or a bundle member; then the afterServiceAppointmentUpdate API http request is triggered. - If the Appointment Bundling feature is enabled; automatic bundling is enabled; the inserted service appointment isn’t a bundle or a bundle member; the modified fields of the service appointment exist within the restrictions of the automatic mode; the service territory of the service appointment is in the defined ApptBundlePolicySvcTerr; the Recordeset Filter Criteria matches; the status of the service appointment exists in the bundle statuses; the service appointment isn’t pinned; and the due date isn’t in the past while considering the timezone of the service appointment’s service territory; then the automatic API request is triggered. **Before Update:** - Remove seconds from the service appointment’s DateTime fields. - If there’s a geolocation (latitude and longitude) on the created ServiceAppointment record, this trigger limits the decimal places after the decimal point to a maximum of 6 digits. - If Service Appointment Status Transitions are enabled in the Field Service settings page and there was a change in the service appointment status field, this trigger validates the status transition legality. - If the updated service appointment’s Status Category was changed to either Canceled or New, this trigger removes the Scheduled Start Time and Scheduled End Time field values. - Prevents updating the Scheduled Start Time, Scheduled End Time, Latitude, and Longitude field values if the Is Pinned field value is set to true. - If the service appointment is a multi-day service appointment, this trigger checks if there’s a need to recalculate the service duration. If so, it recalculates the length. - If the Drip-Feed feature is enabled in the settings page, this trigger dispatches the next service appointment in the day. This action is done in case the current service appointment status categories changed to Completed, Canceled or,Couldn’t Complete. For more information, see [Drip Feed Service Appointments](https://help.salesforce.com/articleView?id=pfs_dispatch_drip_feed.htm&type=5) in Salesforce Help. - If the Mention assigned user when the Service Appointment is dispatched setting is enabled, mention the user upon service cancellation. - Validates that the updated service appointment duration is longer than 1 minute. if the duration is null or 1 minute, change the duration to 1 hour. - If there’s a geolocation (latitude and longitude) on the updated service record and it has changed within the update, this trigger populates the FSL__InternalSLRGeolocation__Latitude__s, FSL__InternalSLRGeolocation__Longitude__s fields. Those fields are used when calculating street-level routing routes. - If the FSL__Prevent_Geocoding_For_Chatter_Actions__c field is checked, this trigger disables Data.com’s geolocation cleanup, which happens on address change, and returns the value of FSL__Prevent_Geocoding_For_Chatter_Actions__c field to false. - If the Auto Schedule field on the updated service appointment record is set to true upon the service appointment’s update process, this trigger prepares a set of service appointments that are called on the After Update trigger operation and sets the field to false. - If the Use polygons to assign service territories setting is enabled and their geolocations fall within relevant Map Polygons records, this trigger classifies the updated service appointment territories based on a geographic area. For more information, see [Create and Manage Map Polygons](https://help.salesforce.com/articleView?id=pfs_map_polygons.htm&type=5) and [Enable Map Polygons](https://help.salesforce.com/articleView?id=pfs_map_polygons_enable.htm&type=5) in Salesforce Help. **After Update:** - Shares the updated service appointments with the assigned resources if the status categories were changed to Dispatched. Shares with the service territory public groups if the service territories changed. - Mentions the assigned resource user if the relevant setting is enabled. - Performs this operation in an asynchronous method if not already in an async context. - Creates and deletes Salesforce calendar events based on the service appointment status changes. - If the SA Status category changed from New/Scheduled to Dispatched, this trigger creates a calendar event. - If the service appointment status category changed from Dispatched to Scheduled/New, this trigger deletes the calendar event. - If a service appointment assigned resource was changed and the service appointment remained dispatched, this trigger updates the relevant Salesforce calendar event accordingly. - Updates the Resource Capacity object according to the service appointment change. If a service appointment was scheduled to a contractor, this trigger updates their capacity to reflect the actual scheduled working time and working items allocated. - Schedules updated service appointments in batches if they have the Auto Schedule field value set to true. The default policy, which is set in the Field Service settings page, is used when auto-scheduling service appointments upon update. - After the batch is invoked, the Auto Schedule flag is set to false automatically. - If the Make assigned resources followers of service appointments that are Dispatched or In Progress setting is enabled in the settings page, and the Status Category field was updated, this trigger makes the assigned resources followers of the updated service appointments. - If an updated service appointment is assigned to a Service Crew, this trigger creates/updates/deletes the service’s assigned resources according to the newly updated service appointment to reflect the actual Service Crew scheduling. To learn more, see [Considerations for Scheduling Service Crews](https://help.salesforce.com/articleView?id=pfs_service_crews_considerations.htm&type=5) in Salesforce Help. - If the travel trigger is enabled in the org, this trigger recalculates travel for all services scheduled in the same day of the services’ start and end dates. - If the Scheduled Start and End Times of the updated service appointments are null but the service appointments have an assigned resource related to them, this trigger deletes the assigned resources. - Updates the schedule mode according to the actual scheduling operation, that is, Optimization, Automatic, or Manual. - Evaluates the scheduling recipes according to the actual service appointment update, that is, Canceled, Shortened, Late-end, or Emergency. - To learn more, see [Create Scheduling Recipes for Common Events](https://help.salesforce.com/articleView?id=pfs_create_scheduling_recipe.htm&type=5) in Salesforce Help. - If the Appointment Bundling feature is enabled; the Use Bundle Apex Mode custom setting equals 2; and the updated service appointment is a bundle or a bundle member; then run the bundle service appointment logic. - If the Appointment Bundling feature is enabled; the Use Bundle Apex Mode custom setting equals 2; and the updated service appointment is a bundle or a bundle member; then the afterServiceAppointmentUpdate API http request is triggered. - If the Appointment Bundling feature is enabled; the Use Bundle Apex Mode custom setting equals 2; and the updated service appointment is a bundle member; then the trigger doesn’t update the SchedStartTime and the SchedEndTime fields when the RelatedBundleId field hasn’t changed. Only if the RelatedBundleId is updated, the SchedStartTime and the SchedEndTime fields change. - If the Appointment Bundling feature is enabled; automatic bundling is enabled; the updated service appointment isn’t a bundle or a bundle member; the modified fields of the service appointment exist within the restrictions of the automatic mode; the service territory of the service appointment is in the defined ApptBundlePolicySvcTerr; the Recordeset Filter Criteria matches; the status of the service appointment exists in the bundle statuses; the service appointment isn’t pinned; and the due date isn’t in the past while considering the timezone of the service appointment’s service territory; then the automatic API request is triggered. **Before Delete:** - Deletes the matching calendar event if it exists. See the [Calendar Sync’s Knowledge Article](https://help.salesforce.com/articleView?id=000316720&type=1) for more information. - Deletes assigned resource records from the deleted service appointments. - Remove sharing on the parent record, that is, the Work Order, from the territories’ public groups. ## Service Objective **Before Insert:** - Validates that the service objective has a record type. - If the service objective is a custom logic objective, validates and decodes the Custom Logic Data (must be filled). **Before Update:** Same as Before Insert. ## Service Resource **Before Insert:** - If the Efficiency field isn’t empty, this trigger checks if its value is in the valid range (between 0.1–10). If not, this trigger prevents the insertion and shows an error next to the Efficiency field. - If the ServiceCrewId field is empty, this trigger checks if there’s another Service Resource record pointing to the same service crew. If so, the trigger throws an error and prevents the insertion. **After Insert:** - If location-based sharing is turned on in your org, this trigger creates a ServiceResourceShare object for the user specified in the RelatedRecordId field. If location-based sharing is turned off it, this trigger does nothing. If the RelatedRecordId field is empty for a specific record, for example, a Service Resource of type Crew, this trigger doesn’t create a share object for the specific record. **Before Update:** - If the IsCapacityBased checkbox changed from false to true, this trigger validates there’s only one service territory member, excluding secondary service territory members, linked to that resource. Otherwise, this trigger throws an error and prevents the update. - If the Efficiency field isn’t empty, this trigger checks if its value is in the valid range (between 0.1–10). If not, this trigger prevents the update and shows an error next to the Efficiency field. - If the IsCapacityBased checkbox is checked, this trigger validates that this service resource doesn’t have any Service Crew Member records. Otherwise, this trigger throws an error and prevents the update. - If the ServiceCrewId field changed and the new value isn’t empty, this trigger validates that there’s no existing Service Resource record pointing to that Service Crew. Otherwise, this trigger throws an error and prevents the update. **After Update** - If the RelatedRecordId changed in the update and location-based sharing is turned on in your org, this trigger deletes all manual sharing records for the Service Resource, including those records created by the user, and creates a ServiceResourceShare object for the new related user. If it fails to delete one of the manual sharing objects this trigger doesn’t delete any of them. ## Service Resource Capacity The trigger is named TR012_CapacityAfterUpdate but it fires only before insert and before update. **Before Insert:** - Validates that monthly capacities are defined in the first day of the month. - Validates that capacities of the same duration type don’t overlap each other, that is, they don’t share a resource and date. - Validates that the Time Period and End Date fields are valid. - Updates the MinutesUsed__c field according to the duration of services scheduled within the capacity. - If the CapacityInWorkItems field isn’t empty, then this trigger updates the Work_Items_Allocated__c field with the number of services scheduled within the capacity. - HoursInUse__c field is a formula field based on MinutesUsed__c. This field updates accordingly. - Updates the Last Updated Epoch field with the number of milliseconds since January 1, 1970, 00:00:00 GMT. **Before Update:** - Validates that monthly capacities are defined in the first day of the month. - Validates that capacities of the same duration type don’t overlap, that is, they don’t share a resource and date. - Validates that the the Time Period and End Date fields are valid. - Validates if one or more of the following fields have changed: TimePeriod, StartDate, CapacityInHours, CapacityInWorkItems, ServiceResourceId. - If any of these fields have changed, this trigger updates the MinutesUsed__c field according to the duration of services scheduled within the capacity. - If the CapacityInWorkItems field isn’t empty, then this trigger updates the Work_Items_Allocated__c field with the number of services scheduled within the capacity. - HoursInUse__c field is a formula field based on MinutesUsed__c. This field updates accordingly. - Updates the Last Updated Epoch field with the number of milliseconds since January 1, 1970, 00:00:00 GMT. ## Service Resource Skill **Before Insert:** - Removes seconds and milliseconds from the Effective Start Date and Effective End Date fields. **Before Update:** Same as Before Insert. ## Service Territory **Before Insert:** - If the Enable Territory Name Duplicates custom setting is off (the default value is off), then this trigger makes sure there’s no duplication in the names of the inserted territories. - If the territory has a geolocation, then this trigger fills up the internal street-level routing geolocation values. **After Insert:** - If the Enable User Territories sharing setting is enabled, this trigger creates a new public group with the name of the territory, if no such group exists, and creates a sharing record for that group. - Adds the public group of the territory as a group member to the public group of the parent territory, if it has one. - If the Enable Service Auto Classification custom setting is on (the default is on), this trigger sets the FSL__TerritoryLevel__c field according to the parent territory and top-level territory values of all territories. This field represents the level of the territory in the hierarchy and is used in the polygon’s algorithm. - If the Appointment Bundling feature is enabled; and the Use Bundle Apex Mode custom setting equals 2; then the serviceTerritoryRefresh API http request is triggered. **Before Update:** - If the Enable Territory Name Duplicates custom setting is off (the default value is off) and the Name field has changed, then this trigger makes sure there’s no duplication in the names of the updated territories. - If the territory has a geolocation, then this trigger fills up the internal street-level routing geolocation values. **After Update:** - If the name or owner fields changed, this trigger updates the public group of the territory accordingly. - If the Parent Territory field changed, this trigger updates the Parent Territory’s public group and recalculates the FSL__TerritoryLevel__c field value to all records according to the new hierarchy. - If the Appointment Bundling feature is enabled; the Use Bundle Apex Mode custom setting equals 2; and the Operating Hours property was updated; then the serviceTerritoryRefresh API http request is triggered. **Before Delete:** - Deletes the Service Territory’s public group. - Updates children territory’s FSL__TerritoryLevel__c field according to the new hierarchy. - If the Appointment Bundling feature is enabled; and the Use Bundle Apex Mode custom setting equals 2; then the serviceTerritoryRefresh API http request is triggered. ## Service Territory Member **Before Insert:** - Removes seconds from the service territory member DateTime fields. - Checks for date collisions. If a primary or relocation service territory member exists in the same date, the trigger fails. - If a secondary service territory member exists in the same date and the created service territory member is in the same service territory, the trigger fails. - If there’s a geolocation (latitude and longitude) on the created service territory member record, this trigger populates the FSL__InternalSLRGeolocation__Latitude__s, FSL__InternalSLRGeolocation__Longitude__s fields. Those fields are used when calculating street-level routing routes. - Prevents creating service territory members of type Relocation to contractors. - Prevents creating more than one service territory member, excluding Secondary service territory members, to contractors. **Before Update:** - Checks for date collisions. If a primary or relocation service territory member exists in the same date, the trigger fails. - If a secondary service territory member exists in the same date and the created service territory member is in the same service territory, the trigger fails. - If there’s a geolocation (latitude and longitude) on the updated service territory member record, this trigger populates the FSL__InternalSLRGeolocation__Latitude__s, FSL__InternalSLRGeolocation__Longitude__s fields. Those fields are used when calculating street-level routing routes. - Prevents creating multiple service territory members of type Relocation or Primary to contractors. - Prevents creating more than one service territory member (excluding Secondary service territory members) to contractors. ## Skill Requirement All triggers are empty. ## Time Dependency **After Insert:** - Prevents creating duplicated dependencies between service appointments. - Prevents adding an Immediately Follow dependency type to an already created time dependency chain. - Adds service appointments to an existing chain according to the created Time Dependency. If needed, this trigger merges two chains according to the created Time Dependency. **Before Update:** - Prevents updating a Time Dependency if an existing Time Dependency has the same two service appointments. - Prevents adding an Immediately Follow dependency type to an already created time dependency chain. **After Delete:** - Splits two dependencies according to the deleted Time Dependency. For example, if chain A contains SerA→ SerB → SerC → SerD → SerE and the deleted Time Dependency is SerC → SerD, this trigger splits the chain into two: SerA → SerB → SerC and SerD → SerE. ## Time Slot **Before Insert:** - Removes seconds from DateTime fields. **Before Update:** - Removes seconds from DateTime fields. ## User Territory **Before Insert:** - If the Enable User Territories sharing setting is enabled, this trigger checks for uniqueness within all user territories. In other words, this trigger ensures that the same user isn’t related to the same territory. **After Insert:** - If the Enable User Territories sharing setting is enabled, this trigger adds users to the respective public groups according to the created User Territory. Make the User Territory.Service Territory name the same as the public group name. **BeforeUpdate:** - If the Enable User Territories sharing setting is enabled, this trigger checks for uniqueness within all user territories. In other words, this trigger ensures that the same user isn’t related to the same territory. **After Update:** - If the Enable User Territories sharing setting is enabled, this trigger adds and removes users to or from the respective public groups according to the updated user territory. For example, if a user territory is updated from User: David, Service Territory: LA to User: David, Service Territory: Washington, this change results in removing David from the LA public group and adding him to the Washington public group. **After Delete:** - If the Enable User Territories sharing setting is enabled, this trigger removes users from the respective public groups according to the deleted user territory. ## Work Order **Before Insert:** - If the AccountId field isn’t empty and the VisitingHoursId field is empty, this trigger populates VisitingHoursId with the related account’s operating hours ID. **Before Update:** - If the AccountId or VisitingHoursId fields changed, the AccountId field isn’t empty, and the VisitingHoursId field is empty, this trigger populates VisitingHoursId with the related account’s operating hours ID. - If the FSL__Prevent_Geocoding_For_Chatter_Actions__c field is checked, this trigger disables Data.com’s geolocation cleanup, which happens on an address change, and returns the value of FSL__Prevent_Geocoding_For_Chatter_Actions__c field to false. ## Work Order Line Item All triggers are empty. ## Work Rule **Before Update:** - If the work rule is Availability Rule, this trigger prevents setting a minimum gap if the fixed gap checkbox is disabled. - If the work rule is Availability Rule, this trigger prevents setting a break time if the Break And Travel trigger is disabled. - If the work rule is Match Boolean Rule, this trigger prevents updating the work rule if the resource property field isn’t populated. - If the work rule is a Time Rule, this trigger prevents updating a time rule with Scheduled Start Time Equal To/Before Arrival Window Start/End. - If the work rule is an Enhanced Match Rule or a Count Rule, this trigger prevents updating the rules with invalid field values. - If basic time work rules don’t exist in the org or are changed, this trigger creates valid basic time rules (Early Start Permitted & Due Date work rules). **Before Delete:** - Prevent deletion of the basic time work rules (Early Start Permitted & Due Date). # Field Service Data Objects Field Service is based on a suite of standard and custom Salesforce objects that relate to each other in different ways. These objects also serve as the foundation of the Field Service managed package and mobile app. The following object relationship diagrams and reference information are your field service object dictionary. Use them to guide your implementation decisions. You can create, retrieve, update, or delete field service records and objects, through our SOAP and REST APIs. You can query these objects using SOQL (Salesforce Object Query Language). - **[Field Service Core Data Model](https://developer.salesforce.com/docs/service/field-service-dev/guide/fsl-dev-soap-core.md)** Use Field Service’s core objects to complete essential field service tasks such as managing work orders, defining your service territories, and tracking your workforce. - **[Field Service Inventory Management Data Model](https://developer.salesforce.com/docs/service/field-service-dev/guide/fsl-dev-soap-inventory.md)** Use Field Service’s inventory objects to track the storage, request, consumption, return, and retirement of items in your inventory. - **[Field Service Preventive Maintenance Data Model](https://developer.salesforce.com/docs/service/field-service-dev/guide/fsl-dev-soap-maintenance.md)** Manage periodic maintenance with the help of maintenance plans, which define the maintenance schedule for specific assets. Maintenance plans typically reflect the terms in a customer’s service contract or entitlements. - **[Field Service Product Service Campaign Data Model](https://developer.salesforce.com/docs/service/field-service-dev/guide/fsl-dev-soap-product-service-campaign.md)** Use product service campaign to record the actions to address situations such as product recalls, manual firmware upgrades, safety or compliance audits, or end-of-life communications. Assets affected are associated with a campaign using product service campaign items. Campaign and campaign items can then be associated with work orders and return orders as needed to complete the work. - **[Field Service Warranty Management Data Model](https://developer.salesforce.com/docs/service/field-service-dev/guide/fsl-dev-soap-warranty.md)** Use warranty items to record details of the labor, parts, and expenses, along with any exchange options, that are provided to rectify issues with products sold or installed. Create standard warranties for products and product families and, for products you install, record details of additional or extended warranties along with exclusions and void terms. - **[Field Service Pricing Data Model](https://developer.salesforce.com/docs/service/field-service-dev/guide/fsl-dev-soap-pricing.md)** Link work orders to products or assets in your org to track product pricing and work being performed on your customers’ installed products. - **[Field Service Object References](https://developer.salesforce.com/docs/service/field-service-dev/guide/fsl-dev-object-references.md)** Object reference for standard and custom Salesforce objects used in Field Service. **See Also** - [Salesforce SOAP API Developer Guide](https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_quickstart_intro.htm) - [Salesforce REST API Developer Guide](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/intro_what_is_rest_api.htm) - [Salesforce SOQL and SOSL Reference](https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_sosl_intro.htm) # Field Service Developer Guide Field Service is a powerful, highly customizable toolbox of features that you can use to set up and manage a multiplatform, mobile service operation. This guide offers reference information and code examples to help you understand the structure of Field Service features and customize them with code. This guide includes: - Object diagrams that illustrate the relationships between field service data objects - Reference information for field service objects in the REST, Metadata, and Tooling APIs - Apex reference information for the Field Service managed package - Apex code examples that you can use to complete common field service tasks If you’re new to field service, we recommend checking out [Get on the Road with Field Service](https://trailhead.salesforce.com/en/trails/field_service) in Trailhead. Then, find curated links to documentation, blogs, Trailhead modules, and other resources through the [Field Service learning map (English only)](https://help.salesforce.com/s/articleView?id=service.fs_landing.htm&type=5) Happy coding! - **[Get Ready to Develop with Field Service](https://developer.salesforce.com/docs/service/field-service-dev/guide/fsl-dev-set-up.md)** To prepare to work programmatically with field service features, verify that Field Service is enabled in your org. - **[API End-of-Life Policy](https://developer.salesforce.com/docs/service/field-service-dev/guide/fsl-api-eol.md)** - **[Field Service Data Objects](https://developer.salesforce.com/docs/service/field-service-dev/guide/fsl-dev-soap.md)** Field Service is based on a suite of standard and custom Salesforce objects that relate to each other in different ways. These objects also serve as the foundation of the Field Service managed package and mobile app. - **[Field Service API](https://developer.salesforce.com/docs/service/field-service-dev/guide/fsl-dev-rest.md)** The REST and Connect REST endpoints mentioned here can be used to manage your field service implementation. - **[Field Service Metadata API](https://developer.salesforce.com/docs/service/field-service-dev/guide/fsl-dev-metadata.md)** The following Metadata types are used in Field Service. - **[Field Service Tooling API](https://developer.salesforce.com/docs/service/field-service-dev/guide/fsl-dev-tooling.md)** The following Tooling objects are used in Field Service. - **[Field Service Invocable Actions](https://developer.salesforce.com/docs/service/field-service-dev/guide/actions/fsl-actions-parent.md)** Here's a list of Field Service invocable actions. - **[Field Service Apex Reference](https://developer.salesforce.com/docs/service/field-service-dev/guide/fsl-dev-mp-intro.md)** The Field Service Apex Reference provides the Field Service (FSL) namespace for programmatic access to Field Service functionality and the ConnectApi namespace for accessing Connect REST API data and building custom experiences in Salesforce. - **[Field Service Custom Triggers](https://developer.salesforce.com/docs/service/field-service-dev/guide/fsl-dev-custom-triggers.md)** Field Service custom triggers ensure that the objects and respective fields are processed before or after scheduling. - **[Field Service Code Examples](https://developer.salesforce.com/docs/service/field-service-dev/guide/fsl-dev-code-samples.md)** Use these code examples to get started working programmatically with Field Service features. - **[Field Service Mobile App](https://developer.salesforce.com/docs/service/field-service-dev/guide/fsl-dev-mobile-intro.md)** Configure mobile-specific features, such as deep linking, for the Field Service app. **See Also** - [Install the Field Service Managed Package](https://help.salesforce.com/articleView?id=pfs_install.htm) - [Field Service Mobile App](https://help.salesforce.com/articleView?id=mfs_overview.htm) # Field Service Developer Guide Previous PDF Versions | API Version | Release | PDF | | ----------- | ---------- | ----------------------------------------------------------------------------------------------------- | | 68.0 | Winter '27 | [Download PDF](https://resources.docs.salesforce.com/264/latest/en-us/sfdc/pdf/field_service_dev.pdf) | | 67.0 | Summer '26 | [Download PDF](https://resources.docs.salesforce.com/262/latest/en-us/sfdc/pdf/field_service_dev.pdf) | | 66.0 | Spring '26 | [Download PDF](https://resources.docs.salesforce.com/260/latest/en-us/sfdc/pdf/field_service_dev.pdf) | | 65.0 | Winter '26 | [Download PDF](https://resources.docs.salesforce.com/258/latest/en-us/sfdc/pdf/field_service_dev.pdf) | # Field Service Flow Returns information corresponding to a field service flow. This resource is available in REST API version 42.0 and later. This resource accepts the API name of a flow definition and returns information about the active flow version. If no flow version is activated, the most recent version is returned. Flow elements can be translated to the language of the user invoking this API by using Translation Workbench. If a particular flow version’s elements have been translated, the data returned uses the language of the query. To learn more, see [Flow Components in Translation Workbench](https://help.salesforce.com/articleView?id=workbench_flow_components.htm). This resource is available to API users with Field Service mobile app user permissions and the Run Flows user permission. ## Syntax **URI**: `/services/data/vXX.X/support/fieldservice/Flow?developerNames=FLOW_UNIQUE_NAME` Where `FLOW_UNIQUE_NAME` is a variable. **Formats**: JSON, XML **HTTP Method**: GET **Authentication**: `Authorization: Bearer TOKEN` Where `TOKEN` is a variable. **Parameters**: |Parameter|Description| |---------|-----------| |`developerNames`|The unique name for the flow definition. Currently, you can specify only one unique name using this parameter.| ## Response Body The following table describes the main elements of the response body. |Field|Type|Description| |-----|----|-----------| |`Flows`|Array|List of flows.| |`CreatedDate`|String|Date the flow was created.| |`Description`|String|Description of the flow.| |`FullName`|String|Full name for the flow.| |`Id`|String|Unique ID for the flow.| |`LastModifiedDate`|String|Date the flow was last modified.| |`Metadata`| |Flow metadata.| |`Choices`|Array|List of choices used by fields.| |`ChoiceText`|String|Text of choice.| |`DataType`|String|Data type of choice.| |`Name`|String|Name for the choice.| |`Screens`|Array of objects|List of screens for the flow.| |`AllowBack`|Boolean|Whether you can go back from the screen.| |`AllowFinish`|Boolean|Whether you can finish the flow from the screen.| |`AllowPause`|Boolean|Whether you can pause from the screen.| |`Fields`|Array of objects|List of fields used by the screen.| |`HelpText`|String|Help text for the screen.| |`Label`|String|Label for the screen.| |`LocationX`|Number|X coordinate for the screen.| |`LocationY`|Number|Y coordinate for the screen.| |`Name`|String|Name of the screen.| |`ProcessType`|String|Type of process for the flow; in this case, it should be “FieldServiceMobile”.| |`Status`|String|Status of the flow.| |`VersionNumber`|Number|Version number for the flow.| ## Example This sample request uses the unique name “FS_Flow” for the flow definition. The response contains two screens. Screen 1 contains two fields: - Field 1: a text field - RadioButton: a field with two choices Screen 2 contains one field: - Field 2: a text field **Request**: `GET` `/services/data/v42.0/support/fieldservice/Flow?developerNames=FS_Flow` **Response**: ```nolang { "flows" : [ { "Id" : "301R000000008grIAA", "DefinitionId" : "300R00000004OLFIA2", "MasterLabel" : "FS_Flow", "ManageableState" : "unmanaged", "VersionNumber" : 1, "Status" : "Draft", "Description" : "FS Flow", "ProcessType" : "FieldServiceMobile", "CreatedDate" : "2017-12-05T19:22:16.000+0000", "CreatedById" : "005R0000000J2glIAC", "LastModifiedDate" : "2017-12-05T19:22:16.000+0000", "LastModifiedById" : "005R0000000J2glIAC", "Metadata" : { "actionCalls" : null, "apexPluginCalls" : null, "assignments" : null, "choices" : [ { "choiceText" : "Choice A", "dataType" : "String", "description" : null, "name" : "Choice_A", "processMetadataValues" : null, "userInput" : null, "value" : null }, { "choiceText" : "Choice B", "dataType" : "String", "description" : null, "name" : "Choice_B", "processMetadataValues" : null, "userInput" : null, "value" : null } ], "constants" : null, "decisions" : null, "description" : "FS Flow", "dynamicChoiceSets" : null, "formulas" : null, "fullName" : "FS_Flow-1", "interviewLabel" : "FS_Flow {!$Flow.CurrentDateTime}", "label" : "FS Flow", "loops" : null, "module" : null, "processMetadataValues" : null, "processType" : "FieldServiceMobile", "recordCreates" : null, "recordDeletes" : null, "recordLookups" : null, "recordUpdates" : null, "screens" : [ { "allowBack" : true, "allowFinish" : true, "allowPause" : true, "connector" : { "processMetadataValues" : null, "targetReference" : "Screen_2" }, "description" : null, "fields" : [ { "choiceReferences" : null, "dataType" : "String", "defaultSelectedChoiceReference" : null, "defaultValue" : null, "description" : null, "extensionName" : null, "fieldText" : "Field 1", "fieldType" : "InputField", "helpText" : "Help Text 1", "inputParameters" : [ ], "isRequired" : false, "isVisible" : null, "name" : "Field_1", "outputParameters" : [ ], "processMetadataValues" : null, "scale" : null, "validationRule" : null }, { "choiceReferences" : [ "Choice_A", "Choice_B" ], "dataType" : "String", "defaultSelectedChoiceReference" : null, "defaultValue" : null, "description" : null, "extensionName" : null, "fieldText" : "Pick a choice", "fieldType" : "RadioButtons", "helpText" : "Pick a Choice help text", "inputParameters" : [ ], "isRequired" : false, "isVisible" : null, "name" : "Pick_a_choice", "outputParameters" : [ ], "processMetadataValues" : null, "scale" : null, "validationRule" : null } ], "helpText" : null, "label" : "Screen 1", "locationX" : 189, "locationY" : 178, "name" : "Screen_1", "pausedText" : null, "processMetadataValues" : null, "rules" : null, "showFooter" : true, "showHeader" : true }, { "allowBack" : true, "allowFinish" : true, "allowPause" : true, "connector" : null, "description" : null, "fields" : [ { "choiceReferences" : null, "dataType" : "String", "defaultSelectedChoiceReference" : null, "defaultValue" : null, "description" : null, "extensionName" : null, "fieldText" : "Field 1", "fieldType" : "InputField", "helpText" : null, "inputParameters" : [ ], "isRequired" : false, "isVisible" : null, "name" : "Field_1", "outputParameters" : [ ], "processMetadataValues" : null, "scale" : null, "validationRule" : null } ], "helpText" : null, "label" : "Screen 2", "locationX" : 437, "locationY" : 289, "name" : "Screen_2", "pausedText" : null, "processMetadataValues" : null, "rules" : null, "showFooter" : true, "showHeader" : true } ], "startElementReference" : "Screen_1", "steps" : null, "subflows" : null, "textTemplates" : null, "urls" : null, "variables" : null, "waits" : null }, "FullName" : "FS_Flow-1" } ] } ``` # Field Service Inventory Management Data Model Use Field Service’s inventory objects to track the storage, request, consumption, return, and retirement of items in your inventory. **note:** Asterisks in the following diagrams signify required fields. Inventory management starts with _product items_, which represent the stock of a particular product at a particular location. Each product item is associated with a _product_ and a _location_ in Salesforce. For example, if you have 50 hammers stored in your Warehouse A location and 200 stored in Warehouse B, create one product item for each location. Product items list a quantity at the location that is updated automatically when inventory is transferred or consumed. ![Product item diagram](https://developer.salesforce.com/media/field-service-dev/fsl_dev_pi.png) If the Inventory Location option is selected on a location, it means that inventory can be stored there. Product items can be associated only with inventory locations. You can link a location to multiple _accounts_ and _service territories_. For example, if a location is a shopping mall, you can choose to associate it with every account that operates a store in the mall. You can also create _addresses_ for a location, such as a mailing and home address. And to keep track of customer sites, create _associated locations_, which contain lookups to an _account_ and a _location_. ![Location diagram](https://developer.salesforce.com/media/field-service-dev/fsl_dev_inv_basic.png) If a particular product is needed to complete a field service job, add _products required_ to ensure that the assigned service resources arrive prepared. Products required can be child records of _work orders_, _work order line items_, and _work types_. Work order and work order line items inherit their work type’s products required. When a product is consumed during the completion of a work order, track its consumption by creating a _product consumed_ record. You can add products consumed to work orders or work order line items. Track product consumption at the line item level if you want to know which products were used for each line item’s tasks. The way you use products consumed depends on how closely you want to track the state of your inventory in Salesforce. If you want to track the entire life cycle of items in your inventory, including their storage, transfer, and consumption, link your product consumed records to product items. This approach ensures that your inventory numbers update automatically to reflect the consumption of products from your inventory. If you want to track product consumption only, however, specify a **Price Book Entry** on each product consumed record and leave the **Product Item** field blank. ![Products required diagram](https://developer.salesforce.com/media/field-service-dev/fsl_dev_pr.png) The movement of items into and out of your inventory and between locations is tracked using these objects: - _Product requests_ are orders for products, which you might create when stock is running low. - _Product request line items_ are subdivisions of a product request. - _Product transfers_ track the movement of product items between inventory locations. - _Shipments_ represent the shipment of product items between locations. - _Product item transactions_ describe actions performed on a product item. They’re auto-generated records that help you track when inventory is replenished, consumed, or adjusted. - _Return orders_ track the return of a product item due to damage, order errors, or other reasons. - _Return order line items_ are subdivisions of a return order. ![Inventory diagram](https://developer.salesforce.com/media/field-service-dev/fsl_dev_inv_full.png) **See Also** - [Set Up Your Field Service Inventory](https://help.salesforce.com/articleView?id=fs_set_up_parts.htm) - [Guidelines for Transferring Inventory](https://help.salesforce.com/articleView?id=fs_product_transfers.htm) - [Guidelines for Consuming Inventory](https://help.salesforce.com/articleView?id=fs_products_consumed.htm) - [Common Inventory Management Tasks](https://help.salesforce.com/articleView?id=fs_parts_guidelines.htm) # Field Service Invocable Actions Here's a list of Field Service invocable actions. To understand more about invoking actions, see [Invoking Actions](https://developer.salesforce.com/docs/atlas.en-us.api_action.meta/api_action/actions_intro_overview.htm). - **[Convert Time Zone](https://developer.salesforce.com/docs/service/field-service-dev/guide/actions-obj-converttimezone.md)** Converts the time from the current time zone to the requested time zone. If the time doesn’t contain a time zone, the value defined in Input Time Zone is used instead. - **[Create Engagement Topic](https://developer.salesforce.com/docs/service/field-service-dev/guide/actions-obj-createengagementtopic.md)** Creates an engagement topic record that connects a given topic ID. For example, a service appointment ID, to a messaging session ID. If an engagement topic for this connection already exists, no action is taken. - **[Get Agent Context](https://developer.salesforce.com/docs/service/field-service-dev/guide/actions-obj-getagentcontext.md)** Retrieves the content of the agent context. - **[Get Service Appointment Time Slots](https://developer.salesforce.com/docs/service/field-service-dev/guide/actions-obj-getappointmentbookingslots.md)** Retrieves available service appointment time slots based on the time zone, operating hours, scheduling policy and time zone name parameters. - **[Get Current Time](https://developer.salesforce.com/docs/service/field-service-dev/guide/actions-obj-getcurrenttime.md)** Gets the current time for a given time zone. - **[Get Engagement Topics](https://developer.salesforce.com/docs/service/field-service-dev/guide/actions-obj-getengagementtopics.md)** Retrieves a list of pairs from the engagement topics of the object ID (from the TopicId field) and its object name for the current messaging session. - **[Get Field Service Object Field](https://developer.salesforce.com/docs/service/field-service-dev/guide/actions-obj-getfieldserviceobjectproperty.md)** Retrieves the value of an object’s field according to the value of another field. Relevant for Field Service objects only. For example, returns the ID of a Scheduling Policy according to a specific policy’s name. - **[Schedule Service Appointment](https://developer.salesforce.com/docs/service/field-service-dev/guide/actions-obj-scheduleserviceappointment.md)** Schedules a service appointment based on the scheduling policy ID and the service appointment ID. # Field Service Metadata API The following Metadata types are used in Field Service. The following list links to Metadata API types used in Field Service. - [FieldServiceSettings](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_fieldservicesettings.htm) Represents an organization’s Field Service settings. - [Flow](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_visual_workflow.htm) Represents the metadata associated with a flow, including its structure, logic, and run-time behavior. - [Flow for Field Service](https://developer.salesforce.com/docs/service/field-service-dev/guide/fsl-flow-metadata-api.md) Field Service exposes additional actionType values for the FlowActionCall Metadata type. - [Skill](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_skills.htm) Represents the settings for a skill used for field service or to route chats to agents in Chat, such as the name of the skill and which agents the skills are assigned to. - [TimeSheetTemplate](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_timesheettemplate.htm) Represents a template for creating time sheets in Field Service. This type extends the Metadata metadata type and inherits its `fullName` field. # Field Service Mobile App Configure mobile-specific features, such as deep linking, for the Field Service app. - **[Get Started with Lightning Web Components in the Field Service Mobile App](https://developer.salesforce.com/docs/service/field-service-dev/guide/sfs-gs/sfs-gs.md)** Learn how to create and use Lightning web components (LWCs) in the Field Service mobile app. LWCs offer a versatile and efficient framework to meet the needs of your Field Service operations, from enhancing user interfaces to extending functionality. - **[Build Custom Lightning Web Components for Service Documents](https://developer.salesforce.com/docs/service/field-service-dev/guide/fsl-dev-mobile-document-builder.md)** Customize templates for your specific business and branding needs by creating custom components with Lightning web components (LWCs). - **[Configure Deep Linking for the Field Service Mobile App](https://developer.salesforce.com/docs/service/field-service-dev/guide/fsl-dev-mobile-deep-linking.md)** Your field technicians rely on their mobile devices to perform complex tasks, and some of those tasks require them to navigate between multiple tabs, flows, or actions. With deep linking, you can send users directly to the right spot in the app. - **[Add Lighting Web Components for Plug-Ins to the Field Service Mobile App](https://developer.salesforce.com/docs/service/field-service-dev/guide/fsl-dev-mobile-lwc.md)** Enhance the Field Service mobile app by creating Lightning web components (LWCs) for plug-ins. # Field Service Mobile Settings Returns information about the Field Service mobile app settings assigned to the profile of the context user. This resource is available in REST API version 42.0 and later. The Field Service mobile app for Android and iOS comes with a variety of customizable settings, including branding colors, geolocation accuracy, app extensions, and date picker display. You can assign unique configurations of those settings to user profiles for a customized Field Service mobile experience. For example, configure separate settings to address the mobile needs of contractors, technicians of varying levels, and service crew leaders. The FieldServiceMobileSettings object represents a configuration of the mobile app settings. The assignment of a settings configuration to a user profile is stored in a child object, MobileSettingsAssignment. A FieldServiceMobileSettings record can also have zero or more child AppExtension records. The userSettings extension enables the return of user profile settings information. Each user profile can be associated with only one FieldServiceMobileSettings record. If a user’s profile isn’t explicitly assigned a settings record, the profile uses the default settings. This resource returns information about the FieldServiceMobileApp settings assigned to the profile of the user in the context of which the call is made. It is available in orgs where Field Service is enabled, and can be used for users who have one or more of the following: - Field Service Mobile permission set license - View Setup user permission - Customize Application user permission - System Administrator profile This resource can also be executed in the context of an Experience Builder site user with the Field Service Mobile permission set license. ## Syntax **URI**: `/services/data/vXX.X/sobjects/FieldServiceMobileSettings/userSettings` **Formats**: JSON, XML **HTTP Method**: GET **Authentication**: `Authorization: Bearer TOKEN` Where `TOKEN` is a variable. **Parameters**: None. ## Response Body A FieldServiceMobileSettings record contains the following properties. All string properties have a maximum length of 7 characters unless otherwise noted. For descriptions, see [FieldServiceMobileSettings](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_fieldservicemobilesettings.htm) in the *Salesforce Object Reference*. |Field|Type|Description| |-----|----|-----------| |`BgGeoLocationAccuracy`|Enum|Values: Medium, Coarse, VeryCoarse.| |`BgGeoLocationMinUpdateFreqMins`|Integer| | |`BrandInvertedColor`|String| | |`ContrastInvertedColor`|String| | |`ContrastPrimaryColor`|String| | |`ContrastQuaternaryColor`|String| | |`ContrastQuinaryColor`|String| | |`ContrastSecondaryColor`|String| | |`ContrastTertiaryColor`|String| | |`DefaultListViewDeveloperName`|String|Maximum length: 255.| |`FeedbackPrimaryColor`|String| | |`FeedbackSecondaryColor`|String| | |`FeedbackSelectedColor`|String| | |`FutureDaysInDatePicker`|Integer| | |`GeoLocationAccuracy`|Enum|Values: Fine, Medium, Coarse.| |`GeoLocationMinUpdateFreqMins`|Integer| | |`Id`|String| | |`IsAssignmentNotification`|Boolean| | |`IsDefault`|Boolean| | |`IsDispatchNotification`|Boolean| | |`IsScheduleViewResourceAbsences`|Boolean|Available in API version 55.0 and later.| |`IsSendLocationHistory`|Boolean| | |`IsShowEditFullRecord`|Boolean| | |`IsUseSalesforceMobileActions`|Boolean| | |`MetadataCacheTimeDays`|Integer| | |`NavbarBackgroundColor`|String| | |`NavbarInvertedColor`|String| | |`PastDaysInDatePicker`|Integer| | |`PrimaryBrandColor`|String| | |`RecordDataCacheTimeMins`|Integer| | |`SecondaryBrandColor`|String| | |`TimeIntervalSetupMins`|Enum|Values: 1, 5, 15, 20, 30, 60.| |`UpdateScheduleTimeMins`|Integer| | If any of the following is true, an error message is returned: - The user does not have access to FieldServiceMobileSettings - Field Service is not enabled in the org - An internal server error occurs ## Example **Request**: `GET` `/services/data/v56.0/sobjects/FieldServiceMobileSettings/userSettings` **Response**: ```nolang { "attributes" : { "type" : "FieldServiceMobileSettings", "url" : "/services/data/v46.0/sobjects/FieldServiceMobileSettings/0MfRM0000000rpR0AQ" }, "Id" : "0MfRM0000000rpR0AQ", "IsDeleted" : false, "DeveloperName" : "Field_Service_Mobile_Settings", "Language" : "en_US", "MasterLabel" : "Field Service Mobile Settings", "CreatedDate" : "2019-02-17T05:20:47.000+0000", "CreatedById" : "005RM000001hTsLYAU", "LastModifiedDate" : "2019-03-22T22:48:17.000+0000", "LastModifiedById" : "005RM000001k2kpYAA", "SystemModstamp" : "2019-03-22T22:48:17.000+0000", "NavbarBackgroundColor" : "#803ABE", "BrandInvertedColor" : "#FFFFFF", "FeedbackPrimaryColor" : "#C23934", "FeedbackSecondaryColor" : "#13C4A3", "PrimaryBrandColor" : "#803ABE", "SecondaryBrandColor" : "#2A7AB0", "ContrastPrimaryColor" : "#000000", "ContrastSecondaryColor" : "#444444", "ContrastTertiaryColor" : "#9FAAB5", "ContrastQuaternaryColor" : "#E6E6EB", "ContrastQuinaryColor" : "#EEEEEE", "ContrastInvertedColor" : "#FFFFFF", "IsScheduleViewResourceAbsences" : true, "IsSendLocationHistory" : false, "GeoLocationMinUpdateFreqMins" : 10, "GeoLocationAccuracy" : "Medium", "RecordDataCacheTimeMins" : 240, "MetadataCacheTimeDays" : 7, "UpdateScheduleTimeMins" : 30, "IsShowEditFullRecord" : false, "TimeIntervalSetupMins" : "15", "DefaultListViewDeveloperName" : null, "NavbarInvertedColor" : "#FFFFFF", "FeedbackSelectedColor" : "#FFFFFF", "FutureDaysInDatePicker" : 45, "PastDaysInDatePicker" : 45, "IsDefault" : true, "BgGeoLocationMinUpdateFreqMins" : 60, "BgGeoLocationAccuracy" : "Coarse", "IsUseSalesforceMobileActions" : false, "IsAssignmentNotification" : false, "IsDispatchNotification" : true } ``` # Field Service Object References Object reference for standard and custom Salesforce objects used in Field Service. - **[Field Service Standard and Custom Objects](https://developer.salesforce.com/docs/service/field-service-dev/guide/fsl-dev-soap-objects.md)** A list of standard Salesforce objects and Salesforce-managed custom objects used in Field Service. - **[Field Service Custom Fields on Standard Objects](https://developer.salesforce.com/docs/service/field-service-dev/guide/fsl-dev-standard-objects-custom-fields.md)** A list of custom fields on standard Salesforce objects installed with the Field Service managed package. - **[Supplementary Field Service Objects](https://developer.salesforce.com/docs/service/field-service-dev/guide/fsl-soap-dev-supplementary.md)** A list of Field Service objects that support history tracking or sharing. # Field Service Preventive Maintenance Data Model Manage periodic maintenance with the help of maintenance plans, which define the maintenance schedule for specific assets. Maintenance plans typically reflect the terms in a customer’s service contract or entitlements. **note:** Asterisks in the following diagram signify required fields. A _maintenance plan_ can be linked to an _account_ and _contact_—representing the customer—and, if the customer has one, to a _service contract_. A maintenance plan can cover multiple _assets_. For example, you can create a maintenance plan to track the monthly maintenance of 20 laser printers installed in a customer’s office building. The assets covered by a maintenance plan are represented as child records of the maintenance plan called _maintenance assets_. For more complex reoccurring maintenance, you can define _maintenance work rules_ for most assets and maintenance plans. With this feature you can, for example, set up a schedule for minor monthly maintenance and a major yearly service. You can also link a maintenance plan to a _location_ to indicate where the assets are installed. For example, link a plan to a location of the Site type that represents the office building where the printers are installed. After you create a maintenance plan or maintenance work rules, it’s time to generate _work orders_ for the planned maintenance visits. Maintenance plans come with a Generate Work Orders quick action, which can also be called with Apex code. Your maintenance plan settings determine how many work orders and work order line items are generated at once and what their settings are. You can opt to generate one work order per maintenance asset for each visit, or a parent work order for each visit with one work order line item per maintenance asset. Maintenance plans, maintenance assets, and maintenance work rules can be associated with a _work type_: - If you specify a work type on a maintenance plan, the plan’s work orders use that work type. - If you specify a work type on a maintenance asset, generated work orders that are associated with the maintenance asset use the maintenance asset’s work type. - If you specify a work type on a maintenance work rule, generated work orders that are associated with the maintenance work rule use the maintenance work rule’s work type. ![Maintenance diagram](https://developer.salesforce.com/media/field-service-dev/fsl_dev_maint.png) **See Also** - [Generate Work Orders on Maintenance Plans with Apex](https://developer.salesforce.com/docs/service/field-service-dev/guide/fsl-dev-code-samples-wo.md) # Field Service Pricing Data Model Link work orders to products or assets in your org to track product pricing and work being performed on your customers’ installed products. **note:** Asterisks in the following diagram signify required fields. ![Pricing diagram](https://developer.salesforce.com/media/field-service-dev/fsl_dev_pricing.png) If you’ve set up a product catalog in Salesforce to track the goods and services your business offers, you can associate items in your price books with work orders and their line items, similar to the way you can associate products with opportunities or orders. If you specify a _price book_ on a _work order_, this allows you to link each _work order line item_ to a _price book entry_ (product) from the price book. List price, discount, and quantity are defined at the line-item level. For example, if you create a work order for a solar panel installation, select a price book in the Price Book lookup field on the work order. Then, use the Price Book Entry lookup field on its work order line items to select goods or services listed in your price book, such as Site Assessment, Solar Panel, and Inverter. A quick glance at a completed work order’s line items shows you which products from your product catalog were sold as part of the work order. After a product is purchased and installed for a customer, it is typically tracked as an _asset_ in Salesforce. The Asset lookup field on work orders and work order line items allows you to track work being performed on a specific asset. It also makes it possible to view a history of all work completed on the asset. If an asset is replaced or upgraded, the relationship between the old and new asset is tracked in an _asset relationship_ record. An asset relationship lists a start and end time—for instance, if the replacement asset is being leased—and a relationship type, which must be defined by the admin. **See Also** - [Work Order Pricing Guidelines for Field Service](https://help.salesforce.com/articleView?id=wo_pricing.htm) - [Equal Asset Relationships](https://help.salesforce.com/articleView?id=assets_wo_equal.htm) # Field Service Product Service Campaign Data Model Use product service campaign to record the actions to address situations such as product recalls, manual firmware upgrades, safety or compliance audits, or end-of-life communications. Assets affected are associated with a campaign using product service campaign items. Campaign and campaign items can then be associated with work orders and return orders as needed to complete the work. **note:** Asterisks mean these fields are required. ![Product service campaign data model](https://developer.salesforce.com/media/field-service-dev/fsl_dev_product_service_campaign.png) # Field Service Standard and Custom Objects A list of standard Salesforce objects and Salesforce-managed custom objects used in Field Service. The following list links to reference information for the standard objects and Salesforce-managed custom objects. Some objects are specific to Field Service, while others are used across a variety Salesforce features. **note:** Most objects are available only if Field Service is enabled. Objects not tied to Field Service enablement are shown with an asterisk (\*). - [Address](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_address.htm) Represents a mailing, billing, or home address. - [ApptBundleAggrDurDnscale](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_apptbundleaggrdurdnscale.htm) Sums the duration of the bundle members, reduced by a predefined percentage. - [ApptBundleAggrPolicy](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_apptbundleaggrpolicy.htm) Policy that defines how the property values of the bundle members are aggregated and assigned to the bundle. - [ApptBundleConfig](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_apptbundleconfig.htm) Represents the general parameters that define the behavior of the bundle. - [ApptBundlePolicy](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_apptbundlepolicy.htm) Policy that defines how the bundling of service appointments should be handled. - [ApptBundlePolicySvcTerr](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_apptbundlepolicysvcterr.htm) Represents a link between the BundlePolicy and the ServiceTerritory. - [ApptBundlePropagatePolicy](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_apptbundlepropagatepolicy.htm) Policy that defines which property values are inherited from the bundle to the bundle members or are assigned as constant values in the bundle members. - [ApptBundleRestrictPolicy](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_apptbundlerestrictpolicy.htm) Policy that defines the restrictions that are considered while forming a bundle. - [ApptBundleSortPolicy](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_apptbundlesortpolicy.htm) Policy that defines the properties by which the bundle members are sorted within the bundle. Can also be used in the automatic mode for determining the order of the automatic selection of bundle members. - [AppExtension](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_appextension.htm) Represents a connection between the Field Service mobile app and another app, typically for passing record data to the Salesforce mobile app or other apps. - [Asset:sup[\*]](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_asset.htm) Represents an item of commercial value, such as a product sold by your company or a competitor, that a customer has purchased. - [AssetAccountParticipant](https://developer.salesforce.com/docs/service/automotive-cloud/objects/sforce-api-objects-assetaccountparticipant.md) Represents a junction between the Asset and Account objects describing the association between a participating account and an asset. - [AssetAttribute](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_assetattribute.htm) Stores asset attributes to track and analyze asset conditions to improve their uptime. - [AssetContactParticipant](https://developer.salesforce.com/docs/service/automotive-cloud/objects/sforce-api-objects-assetcontactparticipant.md) Represents a junction between the Asset and Contact objects describing the association between a participating contact and an asset. - [AssetDowntimePeriod:sup[\*]](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_assetdowntimeperiod.htm) Represents a period during which an asset is not able to perform as expected. Downtime periods include planned activities, such as maintenance, and unplanned events, such as mechanical breakdown. - [AssetRelationship:sup[\*]](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_assetrelationship.htm) Represents a non-hierarchical relationship between assets due to an asset modification; for example, a replacement, upgrade, or other circumstance. In Revenue Lifecycle Management, this object represents an asset or assets grouped in a bundle or set. - [AssetWarranty](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_assetwarranty.htm) Defines the warranty terms applicable to an asset along with any exclusions and extensions. - [AssignedResource](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_assignedresource.htm) Represents a service resource who is assigned to a service appointment in Field Service and Lightning Scheduler. Assigned resources appear in the Assigned Resources related list on service appointments. - [AssociatedLocation](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_associatedlocation.htm) Represents a link between an account and a location in Field Service. You can associate multiple accounts with one location. For example, a shopping center location may have multiple customer accounts. - [AttributeDefinition](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_attributedefinition.htm) Represents a product, asset, or object attribute, for example, a hardward specification or software detail. - [AttributePicklist](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_attributepicklist.htm) Represents a custom picklist for an asset attribute. - [AttributePicklistValue](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_attributepicklistvalue.htm) Represents the values of an asset attribute picklist. - [ContractLineItem:sup[\*]](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_contractlineitem.htm) Represents a product covered by a service contract (customer support agreement). - [ContractLineOutcome](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_contractlineoutcome.htm) Represents information on a contract line outcome’s captured data and other related parameters that are used when capturing data. - [ContractLineOutcomeData](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_contractlineoutcomedata.htm) Represents the contract line outcome’s captured data. It stores the data that was captured between the contract line outcome’s start date and end date. - [DigitalSignature](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_digitalsignature.htm) Represents a signature captured on a service report in field service. - [Entitlement:sup[\*]](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_entitlement.htm) Represents the customer support an account or contact is eligible to receive. - [EntityMilestone:sup[\*]](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_entitymilestone.htm) Represents a required step in a customer support process on a work order. The Salesforce user interface uses the term “object milestone. - [Expense](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_expense.htm) Represents an expense linked to a work order. Service resource technicians can log expenses, such as tools or travel costs. - [ExpenseReport](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_expensereport.htm) Represents a report that summarizes expenses. - [ExpenseReportEntry](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_expensereportentry.htm) Represents an entry in an expense report. - [FieldServiceMobileSettings](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_fieldservicemobilesettings.htm) Represents a configuration of settings that control the Field Service iOS and Android mobile app experience. - [FldSvcObjChg](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_fldsvcobjchg.htm) Represents a change made to one of a service appointment’s tracked fields. - [FldSvcObjChgDtl](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_fldsvcobjchgdtl.htm) Represents the details of a change made to one of a service appointment’s tracked fields. - [FSL__Time_Dependency__c](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_fsl__time_dependency__c.htm) Represents a dependency between two service appointments. This object is used to define scheduling relationships between two appointments. It allows you to determine the order and timing in which dependent appointments should be scheduled. - [GeolocationBasedAction](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_geolocationbasedaction.htm) Represents a geolocation-based action, which is an action that’s triggered when a user enters, exits, or is within the area of the associated object. - [LinkedArticle](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_linkedarticle.htm) Represents a knowledge article that is attached to a work order, work order line item, or work type. - [Location](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_location.htm) Represents a warehouse, service vehicle, work site, or other element of the region where your team performs field service work. In API version 49.0 and later, you can associate activities with specific locations. Activities, such as the tasks and events related to a location, appear in the activities timeline when you view the location detail page. Also in API version 49.0 and later, Work.com users can view Employees as a related list on Location records. In API version 51.0 and later, this object is available for Omnichannel Inventory and represents physical locations where inventory is available for fulfilling orders. - [MaintenanceAsset](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_maintenanceasset.htm) Represents an asset covered by a maintenance plan in field service. Assets can be associated with multiple maintenance plans. - [MaintenancePlan](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_maintenanceplan.htm) Represents a preventive maintenance schedule for one or more assets in field service. - [MaintenanceWorkRule](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_maintenanceworkrule.htm) Represents the recurrence pattern for a maintenance record. - [MobileSettingsAssignment](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_mobilesettingsassignment.htm) Represents the assignment of a particular field service mobile settings configuration to a user profile. - [OperatingHours](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_operatinghours.htm) Represents the hours in which a service territory, service resource, or account is available for work. OperatingHours is used by Field Service, Salesforce Scheduler, Salesforce Meetings, Sales Engagement, and Workforce Engagement. - [OperatingHoursHoliday](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_operatinghoursholiday.htm) Represents the day or hours for which a service territory and service resources exclusive to the service territory are unavailable in Field Service, Salesforce Scheduler, Salesforce Meetings, Sales Engagement, or Workforce Engagement. - [Pricebook2:sup[\*]](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_pricebook2.htm) Represents a price book that contains the list of products that your org sells. - [Product2:sup[\*]](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_product2.htm) Represents a product that your company sells. - [ProductConsumed](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_productconsumed.htm) Represents an item from your inventory that was used to complete a work order or work order line item in field service. - [ProductConsumedState](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_productconsumedstate.htm) Represents the status of an item from your inventory that was used to complete a work order or work order line item in Field Service. - [ProductItem](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_productitem.htm) Represents the stock of a particular product at a particular location in field service, such as all bolts stored in your main warehouse. - [ProductItemTransaction](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_productitemtransaction.htm) Represents an action taken on a product item in field service. Product item transactions are auto-generated records that help you track when a product item is replenished, consumed, or adjusted. - [ProductRequest](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_productrequest.htm) Represents an order for a part or parts in field service. - [ProductRequestLineItem](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_productrequestlineitem.htm) Represents a request for a part in field service. Product request line items are components of product requests. - [ProductRequired](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_productrequired.htm) Represents a product that is needed to complete a work order or work order line item in field service. - [ProductServiceCampaign](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_productservicecampaign.htm) Represents a set of activities to be performed on a product service campaign asset, such as a product recall for safety issues or product defects. - [ProductServiceCampaignItem](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_productservicecampaignitem.htm) Represents a product service campaign's asset. - [ProductServiceCampaignItemStatus](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_productservicecampaignitemstatus.htm) Represents a status for a product service campaign item in field service. - [ProductServiceCampaignStatus](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_productservicecampaignstatus.htm) Represents a status for a product service campaign in field service. - [ProductTransfer](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_producttransfer.htm) Represents the transfer of inventory between locations in field service. - [ProductWarrantyTerm](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_productwarrantyterm.htm) Defines the relationship between a product or product family and warranty term. - [RecordsetFilterCriteria](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_recordsetfiltercriteria.htm) Represents a set of filters that can be used to match service appointments or assets based on your criteria fields. - [RecordsetFilterCriteriaRule](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_recordsetfiltercriteriarule.htm) Represents a rule using fields from the designated source object to create filters on the filtered, or target, object. - [RecordsetFltrCritMonitor](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_recordsetfltrcritmonitor.htm) Monitors whether the value of an asset attribute is within the threshold of a recordset filter criteria (RFC). - [ResourceAbsence](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_resourceabsence.htm) Represents a time period in which a service resource is unavailable to work in Field Service, Salesforce Scheduler, or Workforce Engagement. - [ResourcePreference](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_resourcepreference.htm) Represents an account’s preference for a specified service resource on field service work. - [ReturnOrder](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_returnorder.htm) Represents the return or repair of inventory or products in Field Service, or the return of order products in Order Management. - [ReturnOrderLineItem](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_returnorderlineitem.htm) Represents a specific product that is returned or repaired as part of a return order in Field service, or a specific order item that is returned as part of a return order in Order Management. - [SerializedProduct](https://developer.salesforce.com/docs/service/healthcare-api/hc-sforce-api-objects-serializedproduct.md) Records serial numbers for each individual product in an inventory. - [SerializedProductTransaction](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_serializedproducttransaction.htm) Represents transactions performed on a serialized product. - [ServiceAppointment](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_serviceappointment.htm) Represents an appointment to complete work for a customer in Field Service, Lightning Scheduler,Intelligent Appointment Management, and Virtual Care. - [ServiceAppointmentStatus](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_serviceappointmentstatus.htm) Represents a possible status of a service appointment in field service. - [ServiceContract:sup[\*]](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_servicecontract.htm) Represents a customer support contract (business agreement). - [ServiceCrew](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_servicecrew.htm) Represents a group of service resources who can be assigned to service appointments as a unit. - [ServiceCrewMember](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_servicecrewmember.htm) Represents a technician service resource that belongs to a service crew. - [ServiceReport](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_servicereport.htm) Represents a report that summarizes a work order, work order line item, or service appointment. - [ServiceReportLayout](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_servicereportlayout.htm) Represents a service report template in field service. - [ServiceResource](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_serviceresource.htm) Represents a service technician or service crew in Field Service and Salesforce Scheduler, or an agent in Workforce Engagement. - [ServiceResourceCapacity](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_serviceresourcecapacity.htm) Represents the maximum number of scheduled hours or number of service appointments that a capacity-based service resource can complete within a specific time period. - [ServiceResourceSkill](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_serviceresourceskill.htm) Represents a skill that a service resource possesses in Field Service and Lightning Scheduler. - [ServiceTerritory](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_serviceterritory.htm) Represents a geographic or functional region in which work can be performed in Field Service, Salesforce Scheduler, or Workforce Engagement. - [ServiceTerritoryLocation](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_serviceterritorylocation.htm) Represents a location associated with a particular service territory in field service. - [ServiceTerritoryMember](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_serviceterritorymember.htm) Represents a service resource who can be assigned in a service territory in Field Service, Salesforce Scheduler, or Workforce Engagement. - [Shift](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_shift.htm) Represents a shift for service resource scheduling. - [ShiftPattern](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_shiftpattern.htm) Represents a pattern of templates for creating shifts. - [ShiftPatternEntry](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_shiftpatternentry.htm) ShiftPatternEntry links a shift template to a shift pattern. - [ShiftTemplate](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_shifttemplate.htm) Represents a template for creating shifts. - [Shipment](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_shipment.htm) Represents the transport of inventory in field service or a shipment of order items in Order Management. - [Skill:sup[\*]](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_skill.htm) Represents a category or group of Chat users or service resources in Field Service or Workforce Engagement. - [SkillRequirement](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_skillrequirement.htm) Represents a skill that is required to complete a particular task in Field Service, Omni-Channel, Salesforce Scheduler, or Workforce Engagement. Skill requirements can be added to pending service routing objects in Omni-Channel. They can be added to work types, work orders, and work order line items in Field Service and Lightning Scheduler. And they can be added to job profiles in Workforce Engagement. - [TimeSheet](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_timesheet.htm) Represents a schedule of a service resource’s time in Field Service or Workforce Engagement. - [TimeSheetEntry](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_timesheetentry.htm) Represents a span of time that a service resource spends on a field service task. - [TimeSlot](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_timeslot.htm) Represents a period of time on a specified day of the week during which work can be performed in Field Service, Salesforce Scheduler, or Workforce Engagement. Operating hours consist of one or more time slots. - [TravelMode](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_travelmode.htm) Represents a travel mode used for travel time calculations. The records include information about the type of transportation (such as Car or Walking), whether a vehicle can take toll roads, and whether a vehicle is transporting hazardous materials. - [WarrantyTerm](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_warrantyterm.htm) Represents warranty terms defining the labor, parts, and expenses covered, along with any exchange options, provided to rectify issues with products. - [WorkCapacityAvailability](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_workcapacityavailability.htm) Represents the available work capacity for a specific time and service territory. - [WorkCapacityLimit](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_workcapacitylimit.htm) Represents the capacity limit in a specific service territory for a workstream or for the whole service territory in a given period. - [WorkCapacityUsage](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_workcapacityusage.htm) Represents the capacity usage in a specific service territory for a workstream or for the whole service territory in a given period. - [WorkOrder:sup[\*]](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_workorder.htm) Represents field service work to be performed for a customer. - [WorkOrderLineItem:sup[\*]](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_workorderlineitem.htm) Represents a subtask on a work order in field service. - [WorkOrderLineItemStatus](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_workorderlineitemstatus.htm) Represents a possible status of a work order line item in field service. - [WorkPlan](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_workplan.htm) Represents a work plan for a work order or work order line item. - [WorkPlanSelectionRule](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_workplanselectionrule.htm) Represents a rule that selects a work plan for a work order or work order line item. - [WorkPlanTemplate](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_workplantemplate.htm) Represents a template for a work plan. - [WorkPlanTemplateEntry](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_workplantemplateentry.htm) Represents an object that associates a work step template with a work plan template. - [WorkOrderStatus](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_workorderstatus.htm) Represents a possible status of a work order in field service. - [WorkStep](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_workstep.htm) Represents a work step in a work plan. - [WorkStepStatus](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_workstepstatus.htm) Represents a picklist for a status category on a work step. - [WorkStepTemplate](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_worksteptemplate.htm) Represents a template for a work step. - [WorkType](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_worktype.htm) Represents a type of work to be performed in Field Service and Lightning Scheduler. Work types are templates that can be applied to work order or work order line items. - [WorkTypeGroup](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_worktypegroup.htm) Represents a grouping of work types used to categorize types of appointments available in Lightning Scheduler, or to define scheduling limits in Field Service. - [WorkTypeGroupMember](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_worktypegroupmember.htm) Represents the relationship between a work type and the work type group it belongs to. # Field Service Tooling API The following Tooling objects are used in Field Service. The following list links to Tooling API objects used in Field Service. - [CleanRule](https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_cleanrule.htm) Represents a data integration rule that controls how a data service adds and updates data for existing records in an org. - [TimeSheetTemplate](https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_timesheettemplate.htm) Represents a template for creating time sheets in Field Service. # Field Service Warranty Management Data Model Use warranty items to record details of the labor, parts, and expenses, along with any exchange options, that are provided to rectify issues with products sold or installed. Create standard warranties for products and product families and, for products you install, record details of additional or extended warranties along with exclusions and void terms. **note:** Asterisks in the following diagram signify required fields. A _warranty term_ is linked to a _product warranty term_ to define the standard warranty offered for a product or product family. When a product is installed, _asset warranty term_ details are created from the standard warranty. An asset warranty term can be associated with a work order, work order line item, case, or entitlement to track actions related to the fulfillment of the warranty term provisions. ![Warranty data model](https://developer.salesforce.com/media/field-service-dev/fsl_dev_warranty.png) # File Attachment Interaction Sends an `AttachmentInteraction` interaction event from the client side to Salesforce when an end user sends a file. This API applies to the following products: - Bring Your Own Channel for Contact Center as a Service - Bring Your Own Channel for Messaging This API is available in version 61.0 and later. When a file attachment is sent, a _“Success”_ response means the Salesforce system has received and acknowledged the request and will begin uploading the file. During this time, the Service Console displays the message, _“Uploading file…”_. To track the upload status and get the latest results, subscribe to the `MessageUpdated` outbound event. The request accepts non-ASCII or binary files and supports the most common image, audio, and video file types. ```json - "mimeType": "image/jpeg" - "mimeType": "image/gif" - "mimeType": "image/bmp" - "mimeType": "image/png" - "mimeType": "application/pdf" - "mimeType": "video/3gpp2" - "mimeType": "audio/3gpp2" - "mimeType": "video/3gpp" - "mimeType": "audio/3gpp" - "mimeType": "video/mpeg" - "mimeType": "audio/mpeg" - "mimeType": "video/mp4" - "mimeType": "audio/mp4" ``` Files can only be sent one at a time, and the maximum size of each file is 25 MB. The storage limit is the maximum size that your storage container allows. ## URI `v1/interactions` ## HTTP Method POST ## Headers ### Authorization (User-Level Authentication) **Format:** `Bearer ` String. Standard header. Used to authenticate the user, where `` is the Salesforce access token used as the bearer token to make requests to the Interaction Service APIs. Required. ### Content-Type **Format:** `multipart/form-data` String. Standard header. Format of the request payload. Required for any request that includes a body. ### OrgId **Format:** `` String. Custom header. The Salesforce org. `` is the 15-character Org ID of the Salesforce org. Required. ### RequestId **Format:** `` String. Custom header. Universally Unique Identifier (``) that references and tracks this request. Required. ### AuthorizationContext **Format:** `` String. Custom header. Additional information for the request authorization used to authenticate and validate requests against the connected app scopes. - For Bring Your Own Channel for CCaaS, set `` to the developer name of the ConversationChannelDefinition record. For example, Partner1_ChannelDefinition1. Required. - For Bring Your Own Channel for Messaging, set `` to the developer name of the ConversationChannelDefinition record. For example, Partner1_ChannelDefinition1. Required. ### Sample Header ``` -H $'Authorization: Bearer 00DSG000009SWby!...LN8XxeRIxGe' \ -H "content-type: multipart/form-data" \ -H "OrgId: 00DSG000009SWby" \ -H "AuthorizationContext: Partner1_ChannelDefinition1" \ -H "RequestId: a1b23c45-c06a-4784-c96c-cb95d3321bda" \ ``` ## Parameters | Property Name | Type | Description | Required | | :--------------------------- | :------ | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------- | | to | string | The channel address identifier. This is the globally unique ID for the conversation channel (`MessagingChannel.ChannelAddressIdentifier`). | Yes | | from | string | The end user client identifier. This value comes from the partner system and can be up to 240 characters long. | Yes | | interactions | array | A list of interactions that are initiated by a messaging or voice rep or end user. | Yes | | interactions.timestamp | boolean | The date and time when the interaction was received by the Salesforce server. | Yes | | interactions.interactionType | string | The type of interaction. Possible values include:
- **EntryInteraction** to represent the type of interaction, such as an inbound message, a message sent failure, or a typing start or stop indicator.
- **AttachmentInteraction** to represent a file attachment that comes within the inbound messaging request. | Yes | | interactions.id | string | The unique ID for the interaction. | Yes | | interactions.attachmentIndex | integer | The zero-based index value of the file in the list of attachments for the interaction. Only one file per interaction is allowed, so set this value to **0** (zero). | Yes | | interactions.contentLength | integer | The size of the file data measured in bytes. Specify the correct file size to ensure the file attachment uploads properly. | Yes | | interactions.text | string | The text, if any, that's sent with the file. | No | ## Example ```json { "to": "a12bc345-1303-44c2-866c-f30d546b58de", "from": "end-user-0001", "interactions": [{ "timestamp": 1615454544, "interactionType": "AttachmentInteraction", "id": "8432240c-81c7-492c-baf4-2e4cf0995610", "attachmentIndex": 0, "contentLength": 10000, "text": "This is the picture." }] } ``` ## See Also - _GitHub_: [Interaction Service APIs](https://github.com/salesforce-misc/interaction-service-apis) # File System Details Represents the File System Details attribute set in the Configuration Management Database (CMDB). This attribute set groups related attributes for configuration items. ## Configuration Item Attribute Set Definition ||| |-|-| |Display Name|File System Details| |Developer Name|`SD_FiSyDe`| |Master Label|File_System_Details| ## Attributes ### FS Free Space - **Type**: text - **Developer Name**: `SD_FsFrSp` - **Description**: Describes the FS Free Space for configuration items. - **Required**: Optional ### FS Name - **Type**: text - **Developer Name**: `SD_FsNa` - **Description**: Describes the FS Name for configuration items. - **Required**: Optional ### FS Size - **Type**: text - **Developer Name**: `SD_FsSi` - **Description**: Describes the FS Size for configuration items. - **Required**: Optional ### FS Used Space - **Type**: text - **Developer Name**: `SD_FsUsSp` - **Description**: Describes the FS Used Space for configuration items. - **Required**: Optional # Find Another Action Sometimes a customer interaction requires a step that doesn’t appear in the Actions & Recommendations component. When an agent clicks Add, they can search for an action and start it. You can help users narrow their search by configuring a subset of actions. For example, Maria, the Salesforce admin at Awesome Bank, wants her agents to see only the actions that they use for loan processing. ![Configure the flows available to your users when they click Add.](https://developer.salesforce.com/docs/media/guided_engagement_add_guided_actions.png) Maria configures the set of actions available to her agents. - When Maria configures an Actions & Recommendations deployment in Setup, she selects which actions her agents see when they click Add. - If Maria uses Metadata API to define a deployment, she can define which actions appear for her agents. When a user adds an action, it starts, and is added to the list above the actions pinned at the bottom. # fireEvent() Fires a custom event. This method is only available in API version 25.0 or later. ## Syntax ```javascript sforce.console.fireEvent( eventType:String, message:String, (optional)callback:Function ) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`eventType`|string|The type of custom event to fire.| |`message`|string|The message which is sent with the fired event.| |`callback`|function|JavaScript method called when the custom event is fired.| ## Sample Code–Visualforce ```apex_page ``` ## Response This method is asynchronous, so it returns its response in an object in a callback method. The response object contains the following field: |Name|Type|Description| |----|----|-----------| |`success`|boolean|`true` if firing the event is successful, `false` if firing the event wasn’t successful.| # fireOnCallBegin() Fires an event that notifies a call has begun. Use to get information or send information between an interaction log and a custom console component. This method is only available in API version 31.0 or later. ## Syntax ```javascript sforce.console.cti.fireOnCallBegin( callObjectId:String, callType:String, callLabel:String, (optional)callback:Function ) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`callObjectId`|string|The object ID of the call.| |`callType`|string|String that specifies the call type, which must be `internal`, `inbound` or `outbound`.| |`callLabel`|string|String that specifies a call as it appears in the **Attach Call** drop-down button. For example, `Call Label — Inbound Call 12:52:31 PM`.| |`callback`|function|JavaScript method called upon completion of the method.| ## Sample Code–Visualforce ```apex_page Click here to start a call ``` ## Response This method is asynchronous, so it returns its response in an object in a callback method. The response object contains the following field: |Name|Type|Description| |----|----|-----------| |`success`|boolean|`true` if firing the event is successful, `false` otherwise.| # fireOnCallEnd() Fires an event that notifies a call has ended. Use to get information or send information between an interaction log and a custom console component. This method executes when fireOnCallBegin() is called first. This method is only available in API version 31.0 or later. ## Syntax ```javascript sforce.console.cti.fireOnCallEnd( callObjectId:String, callDuration:Number, callDisposition:String, (optional)callback:Function ) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`callObjectId`|string|The object ID of the call.| |`callDuration`|number|Number specifying the duration of the call.| |`callDisposition`|string|String representing the call’s disposition, such as call successful, left voicemail, or disconnected.| |`callback`|function|JavaScript method called upon completion of the method.| ## Sample Code–Visualforce ```apex_page Click here to end a call ``` ## Response This method is asynchronous, so it returns its response in an object in a callback method. The response object contains the following field: |Name|Type|Description| |----|----|-----------| |`success`|boolean|`true` if firing the event is successful, `false` otherwise.| # fireOnCallLogSaved() Calls the `eventHandler` function registered with [onCallLogSaved()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-oncalllogsaved.md). Use to get information or send information between an interaction log and a custom console component.. This method is only available in API version 31.0 or later. ## Syntax ```javascript sforce.console.cti.fireOnCallLogSaved( id:String, (optional)callback:Function ) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`id`|string|The object ID of the saved call log.| |`callback`|function|JavaScript method called upon completion of the method.| ## Sample Code–Visualforce ```apex_page Test fireOnCallLogSaved API! ``` ## Response This method is asynchronous, so it returns its response in an object in a callback method. The response object contains the following field: |Name|Type|Description| |----|----|-----------| |`success`|boolean|`true` if firing the event is successful, `false` otherwise.| # Firewall Represents a Firewall configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. ## Configuration Item Type Definition ||| |-|-| |Name|Firewall| |Developer Name|`SD_Firxx`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Network Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-network-device.md)| |Rule Name|Default rule for all IP Phones| |Identifier(s)|MAC address| ## Attributes No associated attributes for this configuration item type. # Flow for Field Service Represents the metadata associated with a flow. Use Flow to create an application that takes users through a series of pages to query and update records in the database. You can also execute logic and provide branching capability based on user input to build dynamic applications. ## FlowActionCall Field Service exposes additional actionType values for the FlowActionCall Metadata type. ### actionType - **Field Type**: InvocableActionType (enumeration of type string) - **Description**: Required. The action type. Valid values include: - `convertTimeZone`​Converts the time from the current time zone to the requested time zone. This value is available in API version 62.0 and later. - `createEngagementTopic`​Creates an engagement topic record that connects a given topic ID. This value is available in API version 63.0 and later. - `getAgentContext`​Retrieves the content of the agent context. This value is available in API version 67.0 and later. - `getAppointmentBookingSlots`​Retrieves available service appointment time slots. This value is available in API version 62.0 and later. - `getCurrentTime`​Retrieves the current time for a given time zone. This value is available in API version 65.0 and later. - `getEngagementTopics`​Retrieves a list of pairs from the engagement topics. This value is available in API version 68.0 and later. - `getFieldServiceObjectProperty`​Retrieves the value of an object’s field according to the value of another field. This value is available in API version 65.0 and later. - `scheduleServiceAppointment`​Schedules a service appointment. This value is available in API version 62.0 and later. # focusNavigationItem() for Lightning Experience Focuses on the selected navigation object and opens the object's home page. Typically, standard and custom objects open the object's list view. If split view is open, focus remains on the selected navigation object. This method works only in Lightning console apps. Keep these things in mind when working with this method. - If a tab is already open for the navigation item, the focus is set on the tab. - If split view is open, the focus is set on the navigation tab. - If split view is collapsed, the navigation item’s tab is opened and focus is set on the tab. ## Arguments None ## LWC Sample Code This example moves the user's focus to the current navigation item's home page. ```javascript import { LightningElement } from 'lwc'; import { focusNavigationItem } from 'lightning/platformNavigationItemApi'; export default class MyComponent extends LightningElement { async handleFocusNav() { try { await focusNavigationItem(); console.log('Navigation item focused successfully'); } catch (error) { console.error('Failed to focus navigation item:', error); } } } ``` ## Aura Components Sample Code This component has a button that, when pressed, focuses on the navigation item and opens the navigation item’s home page. For most objects, the home page is the object’s list view. Component code: ```html ``` Controller code: ```javascript ({ focusNavigationItem : function(component, event, helper) { var navigationItemAPI = component.find("navigationItemAPI"); navigationItemAPI.focusNavigationItem().then(function(response) { console.log(response); }) .catch(function(error) { console.log(error); }); } }) ``` ## Response This method returns a promise that, upon success, resolves to `true`. The promise is rejected on error. # focusNavigationTab() Focuses the browser on the navigation tab. This method is only available in API version 31.0 or later. ## Syntax ```javascript sforce.console.focusNavigationTab((optional)callback:Function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`callback`|function|JavaScript method that’s called upon completion of the method.| ## Sample Code–Visualforce ```apex_page ``` ## Response This method is asynchronous, so it returns its response in an object in a callback method. The response object contains the following field: |Name|Type|Description| |----|----|-----------| |`success`|boolean|`true` if returning the object IDs was successful; `false` otherwise.| # focusPrimaryTabById() Focuses the browser on a primary tab that is already open with the specified ID. This method is only available in API version 22.0 or later. ## Syntax ```javascript sforce.console.focusPrimaryTabById(id:String, (optional)callback:Function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`id`|string|ID of the primary tab to go to.| |`callback`|function|JavaScript method that’s called upon completion of the method.| ## Sample Code–Visualforce ```apex_page Click here to go to an open primary tab by id ``` **note:** To see this example in action, click the custom link on a case. For more information, see [Define Custom Buttons and Links](https://help.salesforce.com/s/articleView?id=defining_custom_links.htm) in Salesforce Help. ## Response This method is asynchronous, so it returns its response in an object in a callback method. The response object contains the following field: |Name|Type|Description| |----|----|-----------| |`success`|boolean|`true` if going to the primary tab was successful; `false` if going to the primary tab wasn't successful.| # focusPrimaryTabByName() Focuses the browser on a primary tab that is already open with the specified name. This method is only available in API version 22.0 or later. ## Syntax ```javascript sforce.console.focusPrimaryTabByName(name:String, (optional)callback:Function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`name`|string|Name of the primary tab to go to.| |`callback`|function|JavaScript method that’s called upon completion of the method.| ## Sample Code–Visualforce ```apex_page Click here to go to a primary tab by name ``` **note:** To see this example in action, click the custom link on a case. For more information, see [Define Custom Buttons and Links](https://help.salesforce.com/s/articleView?id=defining_custom_links.htm) in Salesforce Help. ## Response This method is asynchronous, so it returns its response in an object in a callback method. The response object contains the following field: |Name|Type|Description| |----|----|-----------| |`success`|boolean|`true` if going to the primary tab was successful; `false` if going to the primary tab wasn't successful.| # focusSidebarComponent() Focuses the browser on a sidebar component. Use this method to focus on a component with the tab or accordion sidebar style. ## Syntax ```javascript sforce.console.focusSidebarComponent(componentInfo:string (optional)tabId:string, callback:Function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`componentInfo`|string|The JSON object that represents the component to focus on. This argument must include one of the following forms: Unambiguous types:
  • `{componentType: 'CASE_EXPERT_WIDGET' }`
  • `{componentType: 'FILES_WIDGET' }`
  • `{componentType: 'HIGHLIGHTS_PANEL' }`
  • `{componentType: 'KNOWLEDGE_ONE'}`
  • `{componentType: 'MILESTONE_WIDGET' }`
  • `{componentType: 'TOPICS_WIDGET' }`
  • `{componentType: 'VISUALFORCE' }`
Types that require additional parameters:
  • `{componentType: 'CANVAS', canvasAppId: '09Hxx0000000001'}`
  • `{componentType: 'RELATED_LIST', listName: 'Solution'}`
  • `{componentType: 'LOOKUP', fieldName: 'Account'}`
  • `{componentType: 'VISUALFORCE', pageName: 'VF1'}`
| |`tabId`|string|The ID of the tab on which to focus the browser.| |`callback`|function|JavaScript method that’s called upon completion of the method.| ## Sample Code–Visualforce ```apex_page Focus Knowledge Component ``` ## Response This method is asynchronous, so it returns its response in an object in a callback method. The response object contains the following field: |Name|Type|Description| |----|----|-----------| |`success`|boolean|`true` if focusing the sidebar component was successful; `false` otherwise.| # focusSubtabById() Focuses the browser on a subtab that is already open with the specified ID. This method is only available in API version 22.0 or later. ## Syntax ```javascript sforce.console.focusSubtabById(id:String, (optional)callback:Function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`id`|string|ID of the subtab to go to.| |`callback`|function|JavaScript method that’s called upon completion of the method.| ## Sample Code–Visualforce ```apex_page Click here to go to a subtab by id ``` **note:** To see this example in action, click the custom link on a case. For more information, see [Define Custom Buttons and Links](https://help.salesforce.com/s/articleView?id=defining_custom_links.htm) in Salesforce Help. ## Response This method is asynchronous, so it returns its response in an object in a callback method. The response object contains the following field: |Name|Type|Description| |----|----|-----------| |`success`|boolean|`true` if going to the subtab was successful; `false` if going to the subtab wasn't successful.| # focusSubtabByNameAndPrimaryTabId() Focuses the browser on a subtab that is already open with the specified name and primary tab ID. This method is only available in API version 22.0 or later. ## Syntax ```javascript sforce.console.focusSubtabByNameAndPrimaryTabId(name:String, primaryTabId:String,(optional)callback:Function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`name`|string|Name of the subtab to go to.| |`primaryTabId`|string|ID of the primary tab in which the subtab opened.| |`callback`|function|JavaScript method that’s called upon completion of the method.| ## Sample Code–Visualforce ```apex_page Click here to go to a subtab by name and primary tab ID ``` **note:** To see this example in action, click the custom link on a case. For more information, see [Define Custom Buttons and Links](https://help.salesforce.com/s/articleView?id=defining_custom_links.htm) in Salesforce Help. ## Response This method is asynchronous, so it returns its response in an object in a callback method. The response object contains the following field: |Name|Type|Description| |----|----|-----------| |`success`|boolean|`true` if going to the subtab was successful; `false` if going to the subtab wasn't successful.| # focusSubtabByNameAndPrimaryTabName() Focuses the browser on a subtab that is already open with the specified name and primary tab name. This method is only available in API version 22.0 or later. ## Syntax ```javascript sforce.console.focusSubtabByNameAndPrimaryTabName(name:String, primaryTabName:String,(optional)callback:Function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`name`|string|Name of the subtab to go to.| |`primaryTabName`|string|Name of the primary tab in which the subtab opened.| |`callback`|function|JavaScript method that’s called upon completion of the method.| ## Sample Code–Visualforce ```apex_page Click here to go to a subtab by name and primary tab name ``` **note:** To see this example in action, click the custom link on a case. For more information, see [Define Custom Buttons and Links](https://help.salesforce.com/s/articleView?id=defining_custom_links.htm) in Salesforce Help. ## Response This method is asynchronous, so it returns its response in an object in a callback method. The response object contains the following field: |Name|Type|Description| |----|----|-----------| |`success`|boolean|`true` if going to the subtab was successful; `false` if going to the subtab wasn't successful.| # focusTab() for Lightning Experience Focuses a workspace tab or subtab. This method works only in Lightning console apps. ## Arguments The method provides the same argument for both Aura Components and Lightning Web Components (LWC). |Name|Type|Description| |----|----|-----------| |`tabId`|string|ID of the workspace tab or subtab on which to focus.| ## LWC Sample Code This component has a function that retrieves information of all tabs using [`getAllTabInfo()`](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-lightning-getalltabinfo.md), which returns an array of `tabInfo` objects. Then, it uses `focusTab(allTabs[0].tabId)` to focus on the first tab in the array. ```javascript import { LightningElement } from 'lwc'; import { IsConsoleNavigation, getAllTabInfo, focusTab } from 'lightning/platformWorkspaceApi'; export default class FocusTabExample extends LightningElement { async handleOpen() { if (!this.isConsoleNavigation) { return; } try { const tabInfo = await getAllTabInfo(); await focusTab(tabInfo[0].tabId); } catch (error) { console.log(error); } } } ``` For another example that uses `focusTab()`, see the [workspaceAPIFocusTab](https://github.com/trailheadapps/lwc-recipes/tree/main/force-app/main/default/lwc/workspaceAPIFocusTab) component in the [lwc-recipes repo](https://github.com/trailheadapps/lwc-recipes/tree/main/force-app/main/default/lwc). To make your component available for use in a Lightning console app, specify the `lightning__AppPage` target in the [component’s configuration file](https://developer.salesforce.com/docs/platform/lwc/guide/use-config-for-console-app.html). ## Aura Components Sample Code This component has a button that, when pressed, opens a new tab and focuses it. Component code: ```html ``` Controller code: ```javascript ({ focusNewTab : function(component, event, helper) { var workspaceAPI = component.find("workspace"); workspaceAPI.openTab({ url: '/lightning/r/Account/001xx000003DI05AAG/view', }).then(function(response) { workspaceAPI.focusTab({tabId : response}); }) .catch(function(error) { console.log(error); }); } }) ``` **note:** The relative URL used in this example is a placeholder. To try this example yourself, use a relative URL with a record ID from your org. ## Response This method returns a promise that, upon success, resolves to `true`. # FormMessage The FormMessage message type supports the Inputs format type. See [Format Types](https://developer.salesforce.com/docs/service/messaging-api/references/about/message-types-format-types.md#format-types) for a list of supported message types and the format types they support. ## Inputs ```json { "entryType": "Message", "id": "412c0379-ea42-4549-8338-a98f897bdb13", "abstractMessage": { "messageType": "FormMessage", "inReplyToMessageId": null, "id": "412c0379-ea42-4549-8338-a98f897bdb13", "references": null, "form": { "formatType": "Inputs", "formTitle": { "itemType": "TitleItem", "secondarySubTitle": null, "title": "Please fill out this form", "subTitle": null, "tertiarySubTitle": null, "referenceId": null }, "introScreen": null, "images": [], "message": { "itemType": "TitleItem", "secondarySubTitle": null, "title": "Please fill out this form", "subTitle": null, "tertiarySubTitle": null, "referenceId": null }, "reply": { "itemType": "TitleItem", "secondarySubTitle": null, "title": "Please fill out this form", "subTitle": null, "tertiarySubTitle": null, "referenceId": null }, "sections": [ { "sectionType": "SingleInputSection", "nextSectionInputId": "4", "input": { "inputType": "TextInput", "id": "1", "label": { "itemType": "TitleItem", "secondarySubTitle": null, "title": "Secure Form Name", "subTitle": null, "tertiarySubTitle": null, "referenceId": null }, "hintText": null, "required": true, "regEx": null, "prefixText": null, "maximumCharacterCount": 80, "keyboardType": null, "textInputType": "Singleline", "textContentType": null, "placeholder": null }, "submitForm": null }, { "sectionType": "SingleInputSection", "nextSectionInputId": "3", "input": { "inputType": "TextInput", "id": "4", "label": { "itemType": "TitleItem", "secondarySubTitle": null, "title": "Text", "subTitle": null, "tertiarySubTitle": null, "referenceId": null }, "hintText": null, "required": false, "regEx": null, "prefixText": null, "maximumCharacterCount": 100, "keyboardType": null, "textInputType": "Singleline", "textContentType": null, "placeholder": null }, "submitForm": null }, { "sectionType": "SingleInputSection", "nextSectionInputId": "5", "input": { "inputType": "TextInput", "id": "3", "label": { "itemType": "TitleItem", "secondarySubTitle": null, "title": "Text Area", "subTitle": null, "tertiarySubTitle": null, "referenceId": null }, "hintText": null, "required": false, "regEx": null, "prefixText": null, "maximumCharacterCount": 255, "keyboardType": null, "textInputType": "Multiline", "textContentType": null, "placeholder": null }, "submitForm": null }, { "sectionType": "SingleInputSection", "nextSectionInputId": "6", "input": { "inputType": "TextInput", "id": "5", "label": { "itemType": "TitleItem", "secondarySubTitle": null, "title": "URL", "subTitle": null, "tertiarySubTitle": null, "referenceId": null }, "hintText": null, "required": false, "regEx": null, "prefixText": null, "maximumCharacterCount": null, "keyboardType": "URL", "textInputType": "Singleline", "textContentType": "URL", "placeholder": null }, "submitForm": null }, { "sectionType": "SingleInputSection", "nextSectionInputId": "2", "input": { "inputType": "TextInput", "id": "6", "label": { "itemType": "TitleItem", "secondarySubTitle": null, "title": "Phone", "subTitle": null, "tertiarySubTitle": null, "referenceId": null }, "hintText": null, "required": false, "regEx": null, "prefixText": null, "maximumCharacterCount": null, "keyboardType": "PhonePad", "textInputType": "Singleline", "textContentType": "TelephoneNumber", "placeholder": null }, "submitForm": null }, { "sectionType": "SingleInputSection", "nextSectionInputId": "7", "input": { "inputType": "TextInput", "id": "2", "label": { "itemType": "TitleItem", "secondarySubTitle": null, "title": "Email", "subTitle": null, "tertiarySubTitle": null, "referenceId": null }, "hintText": null, "required": true, "regEx": null, "prefixText": null, "maximumCharacterCount": null, "keyboardType": "EmailAddress", "textInputType": "Singleline", "textContentType": "EmailAddress", "placeholder": null }, "submitForm": null }, { "sectionType": "SingleInputSection", "nextSectionInputId": "8", "input": { "inputType": "SelectInput", "id": "7", "label": { "itemType": "TitleItem", "secondarySubTitle": null, "title": "Single Select", "subTitle": null, "tertiarySubTitle": null, "referenceId": null }, "hintText": null, "required": false, "multipleSelection": false, "optionItems": [ { "itemType": "TitleOptionItem", "titleItem": { "itemType": "TitleItem", "secondarySubTitle": null, "title": "Option 1", "subTitle": null, "tertiarySubTitle": null, "referenceId": null }, "optionIdentifier": "7-1", "optionId": null }, { "itemType": "TitleOptionItem", "titleItem": { "itemType": "TitleItem", "secondarySubTitle": null, "title": "Option 2", "subTitle": null, "tertiarySubTitle": null, "referenceId": null }, "optionIdentifier": "7-2", "optionId": null } ] }, "submitForm": null }, { "sectionType": "SingleInputSection", "nextSectionInputId": null, "input": { "inputType": "SelectInput", "id": "8", "label": { "itemType": "TitleItem", "secondarySubTitle": null, "title": "Multiselect", "subTitle": null, "tertiarySubTitle": null, "referenceId": null }, "hintText": null, "required": false, "multipleSelection": true, "optionItems": [ { "itemType": "TitleOptionItem", "titleItem": { "itemType": "TitleItem", "secondarySubTitle": null, "title": "Option 1", "subTitle": null, "tertiarySubTitle": null, "referenceId": null }, "optionIdentifier": "8-1", "optionId": null }, { "itemType": "TitleOptionItem", "titleItem": { "itemType": "TitleItem", "secondarySubTitle": null, "title": "Option 2", "subTitle": null, "tertiarySubTitle": null, "referenceId": null }, "optionIdentifier": "8-2", "optionId": null }, { "itemType": "TitleOptionItem", "titleItem": { "itemType": "TitleItem", "secondarySubTitle": null, "title": "Option 3", "subTitle": null, "tertiarySubTitle": null, "referenceId": null }, "optionIdentifier": "8-3", "optionId": null }, { "itemType": "TitleOptionItem", "titleItem": { "itemType": "TitleItem", "secondarySubTitle": null, "title": "Option 4", "subTitle": null, "tertiarySubTitle": null, "referenceId": null }, "optionIdentifier": "8-4", "optionId": null } ] }, "submitForm": true } ] } }, "messageReason": null } ``` # FormResponseMessage The FormResponseMessage message type supports the Result format type. See [Format Types](https://developer.salesforce.com/docs/service/messaging-api/references/about/message-types-format-types.md#format-types) for a list of supported message types and the format types they support. ## Inputs ```json { "entryType": "Message", "id": "6f48075d-0cd3-4f30-8e2b-66ab65b83e83", "abstractMessage": { "messageType": "FormResponseMessage", "inReplyToMessageId": "ecafb70f-d25a-458b-9a56-68b9e97880a6", "id": "6f48075d-0cd3-4f30-8e2b-66ab65b83e83", "references": [ { "recordId": "a00SB00000Eegy9", "id": "88a9702a-5888-4474-9d0c-804a7f413e53" } ], "formResponse": { "formatType": "Result", "result": { "resultType": "FormRecordsResult", "records": [ { "recordReferenceId": "88a9702a-5888-4474-9d0c-804a7f413e53", "resultMessage": "Secure Form created.", "isCreated": true } ] } } }, "messageReason": null } ``` # From Template Represents the From Template relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. ## Relationship Type Definition ||| |-|-| |Developer Name|`SD_FrTe`| |Description|Defines the From Template relationship between configuration items in the CMDB.| |Master Label|From Template| |Direct Relationship|From Template| |Inverse Relationship|Template For| |Line Stroke|Solid| |Color Code|`#FF5050`| # Gateway Represents a Gateway configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. ## Configuration Item Type Definition ||| |-|-| |Name|Gateway| |Developer Name|`SD_Gatxx`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Network Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-network-device.md)| |Rule Name|Default rule for all AV Devices| |Identifier(s)|MAC address| ## Attributes No associated attributes for this configuration item type. # Generate an Access Token Generate an access token and use it as the bearer token to make requests to the Interaction Service API. The access token is generated when enabling Bring Your Own Channel for Messaging or Bring Your Own Channel for Contact Center as a Service. If the feature is already enabled and you don't have an access token, generate one by following the steps on this page. Generate an access token for customers to use as the bearer token to make requests to the Interaction Service APIs. You must use a signed JSON Web Token (JWT) to generate the access token. ## Task 1: Copy the Consumer Key Get the consumer key of the Interaction Service external client app (ECA) or connected app, depending on your implementation. For an external client application: 1. From Setup in the Quick Find box, enter `External Client App Manager`, and then select **External Client App Manager**. 2. Select the external client app you created for your integration. 3. On the Settings tab, open the OAuth Settings section and click **Consumer Key and Secret**. 4. Verify your identity with the verification code sent to the email address of your Salesforce account. 5. Copy the consumer key. For a connected app: 1. From Setup, in the Quick Find box, enter `App Manager`, and then select **App Manager**. 2. From the dropdown list to the right of the connected app you created for your integration, select **View**. 3. Click **Manage Consumer Details**. 4. Verify your identity with the verification code sent to the email address of your Salesforce account. 5. Copy the consumer key. ## Task 2: Generate the Signed JSON Web Token Using your preferred method, such as [JWT.io](https://jwt.io/), generate a signed JWT. 1. For the header, set the `alg` header parameter to the `RSA256` hash algorithm. ```json { "alg":"RS256", "typ":"JWT" } ``` 2. For the payload, set these JWT claims: - `iss`: The consumer key of the connected app you created. - `sub`: The username of the Salesforce user account. - `aud`: The login URL for the Salesforce org. - `exp`: The expiry date and time for the token, measured in milliseconds since the Unix epoch. ```json { "iss": "1ABC23DcEoFGHIJK4Lp5MN67mOonaPm8W9Cy1KKmnSBPwfZsyiPqTGA1g3ptgKgVsCHHP0x", "sub": "salesforce.user.account@example.com", "aud": "https://test.example.com", "exp": 1864241433000 //Set this value to the token's expiry date and time. } ``` 3. For the signature, add the contents of your public and private keys in PEM format, making sure to include the respective headers and footers. You can find the public key in the `server.crt` file and the private key in the `server.key` file. ## Task 3: Generate the Access Token Use the cURL command to create an access token, where `JWT` is the signed JWT you generated, and `OAUTH_AUTH_ENDPOINT` with the OAuth authorization endpoint, such as `https://login.salesforce.com/services/oauth2/token`. ```curl curl --location --request POST -v OAUTH_AUTH_ENDPOINT --header 'Content-Type: application/x-www-form-urlencoded' --data-urlencode "grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer" --data-urlencode "assertion=" ``` Instead of using login.salesforce.com, you can also use the My Domain login URL, Experience Cloud site URL, or test.salesforce.com (for logging in to a sandbox) as the hostname in these endpoints. All endpoints require secure HTTP (HTTPS). The resulting token has the format `{orgId}!{token}`. Share this token with your customers to use as the bearer token to make requests to the Interaction Service APIs. **See Also** - _Salesforce Help_: [OAuth Endpoints](https://help.salesforce.com/s/articleView?id=xcloud.remoteaccess_oauth_endpoints.htm) ### See Also - _Bring Your Own Channel for Messaging:_ [Create the Interaction Service OAuth App](https://developer.salesforce.com/docs/service/messaging-partner/guide/create-connected-app.html) - _Bring Your Own Channel for CCaaS:_ [Create the Interaction Service OAuth App](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/configure-partner-routing-consent.html) # Generate an Appointment Invitation URL Only admins can generate invitation URLs. Share the invitation URLs with your users so that the users can use the URLs to quickly book appointments. For more information on how to generate appointment invitations URLs, see [Generate an Appointment Invitation URL](https://help.salesforce.com/s/articleView?id=platform.ls_generate_appnt_invitation_url.htm&type=5). When a user clicks the invitation URL to book an appointment, capture the invitation key from the appointment URL to fetch the appointment details. # Generate the Access Token Generate an access token for customers to use as the bearer token to make requests to the Interaction Service APIs. You must use a signed JSON Web Token (JWT) to generate the access token. ## Task 1: Copy the Consumer Key Get the consumer key of the Interaction Service external client app (ECA) or connected app, depending on your implementation. For an external client application: 1. From Setup in the Quick Find box, enter `External Client App Manager`, and then select **External Client App Manager**. 2. Select the external client app you created for your integration. 3. On the Settings tab, open the OAuth Settings section and click **Consumer Key and Secret**. 4. Verify your identity with the verification code sent to the email address of your Salesforce account. 5. Copy the consumer key. For a connected app: 1. From Setup, in the Quick Find box, enter `App Manager`, and then select **App Manager**. 2. From the dropdown list to the right of the connected app you created for your integration, select **View**. 3. Click **Manage Consumer Details**. 4. Verify your identity with the verification code sent to the email address of your Salesforce account. 5. Copy the consumer key. ## Task 2: Generate the Signed JSON Web Token Using your preferred method, such as [JWT.io](https://jwt.io/), generate a signed JWT. 1. For the header, set the `alg` header parameter to the `RSA256` hash algorithm. ```json { "alg":"RS256", "typ":"JWT" } ``` 2. For the payload, set these JWT claims: - `iss`: The consumer key of the connected app you created. - `sub`: The username of the Salesforce user account. - `aud`: The login URL for the Salesforce org. - `exp`: The expiry date and time for the token, measured in milliseconds since the Unix epoch. ```json { "iss": "1ABC23DcEoFGHIJK4Lp5MN67mOonaPm8W9Cy1KKmnSBPwfZsyiPqTGA1g3ptgKgVsCHHP0x", "sub": "salesforce.user.account@example.com", "aud": "https://test.example.com", "exp": 1864241433000 //Set this value to the token's expiry date and time. } ``` 3. For the signature, add the contents of your public and private keys in PEM format, making sure to include the respective headers and footers. You can find the public key in the `server.crt` file and the private key in the `server.key` file. ## Task 3: Generate the Access Token Use the cURL command to create an access token, where `JWT` is the signed JWT you generated, and `OAUTH_AUTH_ENDPOINT` with the OAuth authorization endpoint, such as `https://login.salesforce.com/services/oauth2/token`. ```curl curl --location --request POST -v OAUTH_AUTH_ENDPOINT --header 'Content-Type: application/x-www-form-urlencoded' --data-urlencode "grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer" --data-urlencode "assertion=" ``` Instead of using login.salesforce.com, you can also use the My Domain login URL, Experience Cloud site URL, or test.salesforce.com (for logging in to a sandbox) as the hostname in these endpoints. All endpoints require secure HTTP (HTTPS). The resulting token has the format `{orgId}!{token}`. Share this token with your customers to use as the bearer token to make requests to the Interaction Service APIs. **See Also** - _Salesforce Help_: [OAuth Endpoints](https://help.salesforce.com/s/articleView?id=xcloud.remoteaccess_oauth_endpoints.htm) # Generate the Access Token Generate an access token for customers to use as the bearer token to make requests to the Interaction Service APIs. You must use a signed JSON Web Token (JWT) to generate the access token. ## Task 1: Copy the Consumer Key Get the consumer key of the Interaction Service external client app (ECA) or connected app, depending on your implementation. For an external client application: 1. From Setup in the Quick Find box, enter `External Client App Manager`, and then select **External Client App Manager**. 2. Select the external client app you created for your integration. 3. On the Settings tab, open the OAuth Settings section and click **Consumer Key and Secret**. 4. Verify your identity with the verification code sent to the email address of your Salesforce account. 5. Copy the consumer key. For a connected app: 1. From Setup, in the Quick Find box, enter `App Manager`, and then select **App Manager**. 2. From the dropdown list to the right of the connected app you created for your integration, select **View**. 3. Click **Manage Consumer Details**. 4. Verify your identity with the verification code sent to the email address of your Salesforce account. 5. Copy the consumer key. ## Task 2: Generate the Signed JSON Web Token Using your preferred method, such as [JWT.io](https://jwt.io/), generate a signed JWT. 1. For the header, set the `alg` header parameter to the `RSA256` hash algorithm. ```json { "alg":"RS256", "typ":"JWT" } ``` 2. For the payload, set these JWT claims: - `iss`: The consumer key of the connected app you created. - `sub`: The username of the Salesforce user account. - `aud`: The login URL for the Salesforce org. - `exp`: The expiry date and time for the token, measured in milliseconds since the Unix epoch. ```json { "iss": "1ABC23DcEoFGHIJK4Lp5MN67mOonaPm8W9Cy1KKmnSBPwfZsyiPqTGA1g3ptgKgVsCHHP0x", "sub": "salesforce.user.account@example.com", "aud": "https://test.example.com", "exp": 1864241433000 //Set this value to the token's expiry date and time. } ``` 3. For the signature, add the contents of your public and private keys in PEM format, making sure to include the respective headers and footers. You can find the public key in the `server.crt` file and the private key in the `server.key` file. ## Task 3: Generate the Access Token Use the cURL command to create an access token, where `JWT` is the signed JWT you generated, and `OAUTH_AUTH_ENDPOINT` with the OAuth authorization endpoint, such as `https://login.salesforce.com/services/oauth2/token`. ```curl curl --location --request POST -v OAUTH_AUTH_ENDPOINT --header 'Content-Type: application/x-www-form-urlencoded' --data-urlencode "grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer" --data-urlencode "assertion=" ``` Instead of using login.salesforce.com, you can also use the My Domain login URL, Experience Cloud site URL, or test.salesforce.com (for logging in to a sandbox) as the hostname in these endpoints. All endpoints require secure HTTP (HTTPS). The resulting token has the format `{orgId}!{token}`. Share this token with your customers to use as the bearer token to make requests to the Interaction Service APIs. **See Also** - _Salesforce Help_: [OAuth Endpoints](https://help.salesforce.com/s/articleView?id=xcloud.remoteaccess_oauth_endpoints.htm) # Generate Work Orders on Maintenance Plans with Apex The **Generate Work Orders** action on maintenance plans can also be called using Apex code. The following code sample creates work order records by making an Apex callout to the `generateWorkOrder` action REST API resource. You can use this code sample in several different ways: - Add it to Apex controller code for an Aura component, and tie it to a custom UI or app functionality - Use it in an Apex trigger to semi-automate the creation of the work orders (for example, whenever a maintenance plan is created or updated) - Use it in an Apex REST service to create work orders when called from an external integration service **note:** - This code sample assumes that you have remote site settings enabled to make REST callouts. For more information, see [Adding Remote Site Settings](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_callouts_remote_site_settings.htm). - The mock maintenance plan ID in the code sample is `1MPR000000000Bu`. - This code sample references API version 45.0, but can be used with any version from 40.0 onward. **API Endpoint (v45.0):** `/services/data/v45.0/actions/standard/generateWorkOrders` ```apex String salesforceHost = System.Url.getSalesforceBaseURL().toExternalForm(); String url = salesforceHost + '/services/data/v45.0/actions/standard/generateWorkOrders'; // Create HTTP request HttpRequest request = new HttpRequest(); request.setEndpoint(url); request.setMethod('POST'); request.setHeader('Content-Type', 'application/json;charset=UTF-8'); request.setHeader('Authorization', 'OAuth ' + UserInfo.getSessionId()); // Set the body as a JSON object request.setBody('{"inputs" : [{"recordId" : "1MPR000000000Bu"}]}'); Http http = new Http(); HttpResponse response = http.send(request); // Parse the JSON response if (response.getStatusCode() != 201) { System.debug('The status code returned was not expected: ' + response.getStatusCode() + ' ' + response.getStatus()); } else { System.debug(response.getBody()); } ``` **See Also** - [Salesforce Actions Developer Guide: Generate Work Orders Actions](https://developer.salesforce.com/docs/atlas.en-us.api_action.meta/api_action/actions_obj_generate_work_orders.htm) # generateConsoleUrl() Generates a URL to a tab, or group of related tabs, in the Salesforce console. If any tabs include external URLs, then add the external URLs to the console’s allowlist so that they can display correctly.This method is only available in API version 28.0 or later. ## Syntax ```javascript sforce.console.generateConsoleUrl(urls:String, (optional)callback:Function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`urls`|string|An array of URLs. The first URL is a primary tab and subsequent URLs are subtabs. Note that the last URL is the subtab on which the console is focused. These URLs can be standard Salesforce URLs or relative URLs.| |`callback`|function|JavaScript method that’s called upon completion of the method.| ## Sample Code–Visualforce ```apex_page Click here to generate a console URL ``` ## Response This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following fields: |Name|Type|Description| |----|----|-----------| |`consoleUrl`|string|Console URL that represents the array of URLs passed into Salesforce.| |`success`|boolean|`true` if the URL was generated successfully, `false` if otherwise.| |`callback`|function|JavaScript method that’s called upon completion of the method.| # generateConsoleUrl() for Lightning Experience Generates a URL for a workspace tab and its subtabs. This method works only in Lightning console apps. This method isn’t supported for Lightning Web Components (LWC). ## Arguments |Name|Type|Description| |----|----|-----------| |`pageReferences`|pageReference[]|An array of page references. The first page reference is the workspace tab. Any following page references are subtabs. The last page reference is the focused subtab.| ## Sample Code This component has a button that, when pressed, uses the `generateConsoleUrl()` method to create a URL for the provided page references. Component code: ```html ``` Controller code: ```javascript ({ handleGenerateConsoleUrl : function(component, event, helper) { var workspaceAPI = cmp.find("workspaceAPI"); workspaceAPI.generateConsoleURL({ "pageReferences": [ { "type": "standard__recordPage", "attributes": { "objectApiName": "Account", "actionName": "view", "recordId": "001xx000003DGQXAA4" }, "state": {} }, { "type": "standard__recordPage", "attributes": { "objectApiName": "Account", "actionName": "view", "recordId": "001xx000003DGQWAA4" }, "state": {} }, { "type": "standard__recordPage", "attributes": { "objectApiName": "Account", "actionName": "view", "recordId": "001xx000003DGQYAA4" }, "state": {} } ] }).then(function(url) { console.log(url); }) .catch(function(error) { console.log(error); }); } }) ``` ## Response This method returns a promise that, upon success, resolves with the generated URL. |Name|Type|Description| |----|----|-----------| |`url`|string|A console URL that represents the array of URLs passed into Salesforce.| # Generic Branding Tokens ![Generic branding tokens](https://developer.salesforce.com/docs/media/messaging-in-app/messaging-android-device-colors.png) ![Generic branding tokens for pre-chat](https://developer.salesforce.com/docs/media/messaging-in-app/messaging-android-prechat-colors.png) Use these tokens to adjust the colors of the app to match your product's brand. | Keyword | Default Light Color | Default Dark Color | Description | | ---------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------- | | ​​smi_color_primary | #FAFAF9 ![color light](https://developer.salesforce.com/docs/media/messaging-in-app/colors/FAFAF9.png '{"class": "image-icon-lg"}') | #2B2826 ![color dark](https://developer.salesforce.com/docs/media/messaging-in-app/colors/2B2B26.png '{"class": "image-icon-lg"}') | Primary branding color | | ​​smi_color_primary_variant | #706E6B ![color light](https://developer.salesforce.com/docs/media/messaging-in-app/colors/706E6B.png '{"class": "image-icon-lg"}') | #2B2826 ![color dark](https://developer.salesforce.com/docs/media/messaging-in-app/colors/2B2826.png '{"class": "image-icon-lg"}') | Variant of the primary color | | ​​smi_color_on_primary | #2B2826 ![color light](https://developer.salesforce.com/docs/media/messaging-in-app/colors/2B2B26.png '{"class": "image-icon-lg"}') | #ECEBEA ![color dark](https://developer.salesforce.com/docs/media/messaging-in-app/colors/ECEBEA.png '{"class": "image-icon-lg"}') | Primary text color | | ​​smi_color_secondary | #0070D2 ![color light](https://developer.salesforce.com/docs/media/messaging-in-app/colors/0070D2.png '{"class": "image-icon-lg"}') | #007ADD ![color dark](https://developer.salesforce.com/docs/media/messaging-in-app/colors/007ADD.png '{"class": "image-icon-lg"}') | Secondary branding color | | ​​smi_color_on_secondary | #FFFFFF ![color light](https://developer.salesforce.com/docs/media/messaging-in-app/colors/FFFFFF.png '{"class": "image-icon-lg"}') | #FFFFFF ![color dark](https://developer.salesforce.com/docs/media/messaging-in-app/colors/FFFFFF.png '{"class": "image-icon-lg"}') | Secondary text color | | ​​smi_color_secondary_active | #014485 ![color light](https://developer.salesforce.com/docs/media/messaging-in-app/colors/014485.png '{"class": "image-icon-lg"}') | #16325C ![color dark](https://developer.salesforce.com/docs/media/messaging-in-app/colors/16325C.png '{"class": "image-icon-lg"}') | Secondary color for active elements | | smi_color_secondary_highlight | #062680 ![color light](https://developer.salesforce.com/docs/media/messaging-in-app/colors/062680.png '{"class": "image-icon-lg"}') | #6EC4FA ![color dark](https://developer.salesforce.com/docs/media/messaging-in-app/colors/6EC4FA.png '{"class": "image-icon-lg"}') | Secondary color for highlighted elements | | ​​smi_color_on_secondary_variant | #DDDBDA ![color light](https://developer.salesforce.com/docs/media/messaging-in-app/colors/DDDBDA.png '{"class": "image-icon-lg"}') | #1A1B1E ![color dark](https://developer.salesforce.com/docs/media/messaging-in-app/colors/1A1B1E.png '{"class": "image-icon-lg"}') | Alternate secondary text color | | ​​smi_color_background | #F3F2F2 ![color light](https://developer.salesforce.com/docs/media/messaging-in-app/colors/F3F2F2.png '{"class": "image-icon-lg"}') | #080707 ![color dark](https://developer.salesforce.com/docs/media/messaging-in-app/colors/080707.png '{"class": "image-icon-lg"}') | Background color | | ​​smi_color_on_background | #706E6B ![color light](https://developer.salesforce.com/docs/media/messaging-in-app/colors/706E6B.png '{"class": "image-icon-lg"}') | #B0ADAB ![color dark](https://developer.salesforce.com/docs/media/messaging-in-app/colors/B0ADAB.png '{"class": "image-icon-lg"}') | Color for elements on the background color | | ​​smi_color_surface | #FFFFFF ![color light](https://developer.salesforce.com/docs/media/messaging-in-app/colors/FFFFFF.png '{"class": "image-icon-lg"}') | #1A1B1E ![color dark](https://developer.salesforce.com/docs/media/messaging-in-app/colors/1A1B1E.png '{"class": "image-icon-lg"}') | Primary color for surfaces | | ​​smi_color_on_surface | #2B2826 ![color light](https://developer.salesforce.com/docs/media/messaging-in-app/colors/2B2826.png '{"class": "image-icon-lg"}') | #C9C7C5 ![color dark](https://developer.salesforce.com/docs/media/messaging-in-app/colors/C9C7C5.png '{"class": "image-icon-lg"}') | Text color on surfaces | | ​​smi_color_surface_highlight | #B3B3B3 ![color light](https://developer.salesforce.com/docs/media/messaging-in-app/colors/B3B3B3.png '{"class": "image-icon-lg"}') | #66676B ![color dark](https://developer.salesforce.com/docs/media/messaging-in-app/colors/66676B.png '{"class": "image-icon-lg"}') | Highlight color for surfaces | | ​​smi_color_surface_variant | #DDDBDA ![color light](https://developer.salesforce.com/docs/media/messaging-in-app/colors/DDDBDA.png '{"class": "image-icon-lg"}') | #30373D ![color dark](https://developer.salesforce.com/docs/media/messaging-in-app/colors/30373D.png '{"class": "image-icon-lg"}') | Variant color for surfaces | | ​​smi_color_on_surface_variant | #0070D2 ![color light](https://developer.salesforce.com/docs/media/messaging-in-app/colors/0070D2.png '{"class": "image-icon-lg"}') | #FFFFFF ![color dark](https://developer.salesforce.com/docs/media/messaging-in-app/colors/FFFFFF.png '{"class": "image-icon-lg"}') | Variant color for surfaces | | smi_color_surface_secondary | #CED0D2 ![color light](https://developer.salesforce.com/docs/media/messaging-in-app/colors/CED0D2.png '{"class": "image-icon-lg"}') | #30373D ![color dark](https://developer.salesforce.com/docs/media/messaging-in-app/colors/30373D.png '{"class": "image-icon-lg"}') | Secondary color for surfaces | | smi_color_surface_secondary_variant | #EDF4FF ![color light](https://developer.salesforce.com/docs/media/messaging-in-app/colors/EDF4FF.png '{"class": "image-icon-lg"}') | #3F3F3F ![color dark](https://developer.salesforce.com/docs/media/messaging-in-app/colors/3F3F3F.png '{"class": "image-icon-lg"}') | Secondary color variant for surfaces | | smi_color_tertiary | #000000 ![color light](https://developer.salesforce.com/docs/media/messaging-in-app/colors/000000.png '{"class": "image-icon-lg"}') | #000000 ![color dark](https://developer.salesforce.com/docs/media/messaging-in-app/colors/000000.png '{"class": "image-icon-lg"}') | Tertiary branding color | | smi_color_highlight | #FCC003 ![color light](https://developer.salesforce.com/docs/media/messaging-in-app/colors/FCC003.png '{"class": "image-icon-lg"}') | #FCC003 ![color dark](https://developer.salesforce.com/docs/media/messaging-in-app/colors/FCC003.png '{"class": "image-icon-lg"}') | Highlight color | | ​​smi_color_error | #A61A14 ![color light](https://developer.salesforce.com/docs/media/messaging-in-app/colors/A61A14.png '{"class": "image-icon-lg"}') | #D4504C ![color dark](https://developer.salesforce.com/docs/media/messaging-in-app/colors/D4504C.png '{"class": "image-icon-lg"}') | Error feedback color | | ​​smi_color_warning | #FFB75D ![color light](https://developer.salesforce.com/docs/media/messaging-in-app/colors/FFB75D.png '{"class": "image-icon-lg"}') | #FFB75D ![color dark](https://developer.salesforce.com/docs/media/messaging-in-app/colors/FFB75D.png '{"class": "image-icon-lg"}') | Warning feedback color | | ​​smi_color_success | #04844B ![color light](https://developer.salesforce.com/docs/media/messaging-in-app/colors/04844B.png '{"class": "image-icon-lg"}') | #4BCA81 ![color dark](https://developer.salesforce.com/docs/media/messaging-in-app/colors/4BCA81.png '{"class": "image-icon-lg"}') | Success feedback color | | smi_color_transparent | (alpha #00) #00FFFF ![color light](https://developer.salesforce.com/docs/media/messaging-in-app/colors/0000FFFF.png '{"class": "image-icon-lg"}') | (alpha #00) #00FFFF ![color dark](https://developer.salesforce.com/docs/media/messaging-in-app/colors/0000FFFF.png '{"class": "image-icon-lg"}') | Transparent color | | smi_color_background_transparent | (alpha #80) #F3F2F2 ![color light](https://developer.salesforce.com/docs/media/messaging-in-app/colors/80F3F2F2.png '{"class": "image-icon-lg"}') | (alpha #80) #080707 ![color dark](https://developer.salesforce.com/docs/media/messaging-in-app/colors/80080707.png '{"class": "image-icon-lg"}') | Transparent background color | | smi_color_surface_transparent | (alpha #80) #FFFFFF ![color light](https://developer.salesforce.com/docs/media/messaging-in-app/colors/80FFFFFF.png '{"class": "image-icon-lg"}') | (alpha #80) #1A1B1E ![color dark](https://developer.salesforce.com/docs/media/messaging-in-app/colors/801A1B1E.png '{"class": "image-icon-lg"}') | Transparent surface color | | smi_color_on_secondary_transparent | (alpha #80) #FFFFFF ![color light](https://developer.salesforce.com/docs/media/messaging-in-app/colors/80FFFFFF.png '{"class": "image-icon-lg"}') | (alpha #80) #FFFFFF ![color dark](https://developer.salesforce.com/docs/media/messaging-in-app/colors/80FFFFFF.png '{"class": "image-icon-lg"}') | Transparent secondary color | | smi_color_on_secondary_semi_transparent | (alpha #99) #FFFFFF ![color light](https://developer.salesforce.com/docs/media/messaging-in-app/colors/80FFFFFF.png '{"class": "image-icon-lg"}') | (alpha #99) #FFFFFF ![color dark](https://developer.salesforce.com/docs/media/messaging-in-app/colors/99FFFFFF.png '{"class": "image-icon-lg"}') | Transparent color on secondary | | smi_color_on_background_semi_transparent | (alpha: #80) #706E6B ![color light](https://developer.salesforce.com/docs/media/messaging-in-app/colors/80706E6B.png '{"class": "image-icon-lg"}') | (alpha: #80) #B0ADAB ![color dark](https://developer.salesforce.com/docs/media/messaging-in-app/colors/80B0ADAB.png '{"class": "image-icon-lg"}') | Semi-transparent color for elements on the background color | # Generic Branding Tokens ![Generic branding tokens](https://developer.salesforce.com/docs/media/messaging-in-app/messaging-ios-device-colors.png) ![Generic branding tokens for pre-chat](https://developer.salesforce.com/docs/media/messaging-in-app/messaging-ios-prechat-colors.png) Use these tokens to adjust the colors of the app to match your product's brand. | Keyword | Default Light Color | Default Dark Color | Description | | ------------------------------- | --------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------- | | SMI.primary | #FAFAF9 ![color light](https://developer.salesforce.com/docs/media/messaging-in-app/colors/FAFAF9.png '{"class": "image-icon-lg"}') | #2B2826 ![color dark](https://developer.salesforce.com/docs/media/messaging-in-app/colors/2B2B26.png '{"class": "image-icon-lg"}') | Primary branding color | | SMI.primaryVariant | #706E6B ![color light](https://developer.salesforce.com/docs/media/messaging-in-app/colors/706E6B.png '{"class": "image-icon-lg"}') | #2B2826 ![color dark](https://developer.salesforce.com/docs/media/messaging-in-app/colors/2B2826.png '{"class": "image-icon-lg"}') | Variant of the primary color | | SMI.onPrimary | #2B2B26 ![color light](https://developer.salesforce.com/docs/media/messaging-in-app/colors/2B2B26.png '{"class": "image-icon-lg"}') | #ECEBEA ![color dark](https://developer.salesforce.com/docs/media/messaging-in-app/colors/ECEBEA.png '{"class": "image-icon-lg"}') | Primary text color | | SMI.secondary | #0070D2 ![color light](https://developer.salesforce.com/docs/media/messaging-in-app/colors/0070D2.png '{"class": "image-icon-lg"}') | #007ADD ![color dark](https://developer.salesforce.com/docs/media/messaging-in-app/colors/007ADD.png '{"class": "image-icon-lg"}') | Secondary branding color | | SMI.onSecondary | #FFFFFF ![color light](https://developer.salesforce.com/docs/media/messaging-in-app/colors/FFFFFF.png '{"class": "image-icon-lg"}') | #FFFFFF ![color dark](https://developer.salesforce.com/docs/media/messaging-in-app/colors/FFFFFF.png '{"class": "image-icon-lg"}') | Secondary text color | | SMI.secondaryActive | #014485 ![color light](https://developer.salesforce.com/docs/media/messaging-in-app/colors/014485.png '{"class": "image-icon-lg"}') | #16325C ![color dark](https://developer.salesforce.com/docs/media/messaging-in-app/colors/16325C.png '{"class": "image-icon-lg"}') | Secondary color for active elements | | SMI.secondaryHighlight | #062680 ![color light](https://developer.salesforce.com/docs/media/messaging-in-app/colors/062680.png '{"class": "image-icon-lg"}') | #6EC4FA ![color dark](https://developer.salesforce.com/docs/media/messaging-in-app/colors/6EC4FA.png '{"class": "image-icon-lg"}') | Secondary color for highlighted elements | | ​​SMI.onSecondaryVariant | #DDDBDA ![color light](https://developer.salesforce.com/docs/media/messaging-in-app/colors/DDDBDA.png '{"class": "image-icon-lg"}') | #1A1B1E ![color dark](https://developer.salesforce.com/docs/media/messaging-in-app/colors/1A1B1E.png '{"class": "image-icon-lg"}') | Alternate secondary text color | | SMI.background | #F3F2F2 ![color light](https://developer.salesforce.com/docs/media/messaging-in-app/colors/F3F2F2.png '{"class": "image-icon-lg"}') | #080707 ![color dark](https://developer.salesforce.com/docs/media/messaging-in-app/colors/080707.png '{"class": "image-icon-lg"}') | Background color | | SMI.onBackground | #706E6B ![color light](https://developer.salesforce.com/docs/media/messaging-in-app/colors/706E6B.png '{"class": "image-icon-lg"}') | #B0ADAB ![color dark](https://developer.salesforce.com/docs/media/messaging-in-app/colors/B0ADAB.png '{"class": "image-icon-lg"}') | Color for elements on the background color | | SMI.surface | #FFFFFF ![color light](https://developer.salesforce.com/docs/media/messaging-in-app/colors/FFFFFF.png '{"class": "image-icon-lg"}') | #1A1B1E ![color dark](https://developer.salesforce.com/docs/media/messaging-in-app/colors/1A1B1E.png '{"class": "image-icon-lg"}') | Primary color for surfaces | | SMI.onSurface | #2B2826 ![color light](https://developer.salesforce.com/docs/media/messaging-in-app/colors/2B2826.png '{"class": "image-icon-lg"}') | #C9C7C5 ![color dark](https://developer.salesforce.com/docs/media/messaging-in-app/colors/C9C7C5.png '{"class": "image-icon-lg"}') | Text color on surfaces | | SMI.surfaceHighlight | #B3B3B3 ![color light](https://developer.salesforce.com/docs/media/messaging-in-app/colors/B3B3B3.png '{"class": "image-icon-lg"}') | #66676B ![color dark](https://developer.salesforce.com/docs/media/messaging-in-app/colors/66676B.png '{"class": "image-icon-lg"}') | Highlight color for surfaces | | SMI.surfaceVariant | #DDDBDA ![color light](https://developer.salesforce.com/docs/media/messaging-in-app/colors/DDDBDA.png '{"class": "image-icon-lg"}') | #30373D ![color dark](https://developer.salesforce.com/docs/media/messaging-in-app/colors/30373D.png '{"class": "image-icon-lg"}') | Variant color for surfaces | | SMI.onSurfaceVariant | #0070D2 ![color light](https://developer.salesforce.com/docs/media/messaging-in-app/colors/0070D2.png '{"class": "image-icon-lg"}') | #FFFFFF ![color dark](https://developer.salesforce.com/docs/media/messaging-in-app/colors/FFFFFF.png '{"class": "image-icon-lg"}') | Variant color for surfaces | | SMI.surfaceSecondary | #CED0D2 ![color light](https://developer.salesforce.com/docs/media/messaging-in-app/colors/CED0D2.png '{"class": "image-icon-lg"}') | #30373D ![color dark](https://developer.salesforce.com/docs/media/messaging-in-app/colors/30373D.png '{"class": "image-icon-lg"}') | Secondary color for surfaces | | SMI.surfaceSecondaryVariant | #EDF4FF ![color light](https://developer.salesforce.com/docs/media/messaging-in-app/colors/EDF4FF.png '{"class": "image-icon-lg"}') | #3F3F3F ![color dark](https://developer.salesforce.com/docs/media/messaging-in-app/colors/3F3F3F.png '{"class": "image-icon-lg"}') | Secondary color variant for surfaces | | SMI.tertiary | #000000 ![color light](https://developer.salesforce.com/docs/media/messaging-in-app/colors/000000.png '{"class": "image-icon-lg"}') | #000000 ![color dark](https://developer.salesforce.com/docs/media/messaging-in-app/colors/000000.png '{"class": "image-icon-lg"}') | Tertiary branding color | | SMI.highlight | #FCC003 ![color light](https://developer.salesforce.com/docs/media/messaging-in-app/colors/FCC003.png '{"class": "image-icon-lg"}') | #FCC003 ![color dark](https://developer.salesforce.com/docs/media/messaging-in-app/colors/FCC003.png '{"class": "image-icon-lg"}') | Highlight color | | SMI.error | #A61A14 ![color light](https://developer.salesforce.com/docs/media/messaging-in-app/colors/A61A14.png '{"class": "image-icon-lg"}') | #D4504C ![color dark](https://developer.salesforce.com/docs/media/messaging-in-app/colors/D4504C.png '{"class": "image-icon-lg"}') | Error feedback color | | SMI.warning | #FFB75D ![color light](https://developer.salesforce.com/docs/media/messaging-in-app/colors/FFB75D.png '{"class": "image-icon-lg"}') | #FFB75D ![color dark](https://developer.salesforce.com/docs/media/messaging-in-app/colors/FFB75D.png '{"class": "image-icon-lg"}') | Warning feedback color | | SMI.success | #04844B ![color light](https://developer.salesforce.com/docs/media/messaging-in-app/colors/04844B.png '{"class": "image-icon-lg"}') | #4BCA81 ![color dark](https://developer.salesforce.com/docs/media/messaging-in-app/colors/4BCA81.png '{"class": "image-icon-lg"}') | Success feedback color | | SMI.transparent | (alpha #00) #00FFFF ![color light](https://developer.salesforce.com/docs/media/messaging-in-app/colors/0000FFFF.png '{"class": "image-icon-lg"}') | (alpha #00) #00FFFF ![color dark](https://developer.salesforce.com/docs/media/messaging-in-app/colors/0000FFFF.png '{"class": "image-icon-lg"}') | Transparent color | | SMI.backgroundTransparent | (alpha #80) #F3F2F2 ![color light](https://developer.salesforce.com/docs/media/messaging-in-app/colors/80F3F2F2.png '{"class": "image-icon-lg"}') | (alpha #80) #080707 ![color dark](https://developer.salesforce.com/docs/media/messaging-in-app/colors/80080707.png '{"class": "image-icon-lg"}') | Transparent background color | | SMI.surfaceTransparent | (alpha #80) #FFFFFF ![color light](https://developer.salesforce.com/docs/media/messaging-in-app/colors/80FFFFFF.png '{"class": "image-icon-lg"}') | (alpha #80) #1A1B1E ![color dark](https://developer.salesforce.com/docs/media/messaging-in-app/colors/801A1B1E.png '{"class": "image-icon-lg"}') | Transparent surface color | | SMI.onSecondaryTransparent | (alpha #80) #FFFFFF ![color light](https://developer.salesforce.com/docs/media/messaging-in-app/colors/80FFFFFF.png '{"class": "image-icon-lg"}') | (alpha #80) #FFFFFF ![color dark](https://developer.salesforce.com/docs/media/messaging-in-app/colors/80FFFFFF.png '{"class": "image-icon-lg"}') | Transparent secondary color | | SMI.onSecondarySemiTransparent | (alpha #99) #FFFFFF ![color light](https://developer.salesforce.com/docs/media/messaging-in-app/colors/80FFFFFF.png '{"class": "image-icon-lg"}') | (alpha #99) #FFFFFF ![color dark](https://developer.salesforce.com/docs/media/messaging-in-app/colors/99FFFFFF.png '{"class": "image-icon-lg"}') | Transparent color on secondary | | SMI.onBackgroundSemiTransparent | (alpha: #80) #706E6B ![color light](https://developer.salesforce.com/docs/media/messaging-in-app/colors/80706E6B.png '{"class": "image-icon-lg"}') | (alpha: #80) #B0ADAB ![color dark](https://developer.salesforce.com/docs/media/messaging-in-app/colors/80B0ADAB.png '{"class": "image-icon-lg"}') | Semi-transparent color for elements on the background color | # Get a List of Salesforce Site and Experience Cloud Site URLs for an Online Article Returns a list of article URLs in Salesforce Sites, Experience Cloud sites, or both. Article URLs from Salesforce Sites are returned if the article is visible in a public knowledge base. Article URLs from Experience Cloud sites are returned if the article is visible to partners or customers. This API creates the URLs for the **Insert URL into Email** Lightning action. The org must have Lightning Knowledge enabled, and **Allow users to share articles via public URLs** enabled in Knowledge Settings. In addition, the API user must have read access on Knowledge. Available in API versions 46.0 and later. ## URI ```nolang /services/data/v46.0/knowledgeManagement/articles/siteListForOnlineArticle?articleId=articleId&language=xx_XX ``` ## Formats JSON, XML ## HTTP Method GET ## Authentication `Authorization: OAuth {accesstoken}` ## Parameters | Parameter | Description | | --------- | ------------------------------------------------------------- | | articleId | Either the 15– or 18–digit version of the article version ID. | | language | Language for the selected article. | ## Input None # Get Actual Service Resources Retrieve the actual service resources—an employee from your company, such as a loan officer, investment advisor, doctor, nurse practitioner, or retail store specialist who attends appointments with clients—based on the work type group and service territory that’s assigned to a service appointment. Business managers or administrators can then assign an available service resource to an appointment. 1. Make a `POST` request on the [`getAppointmentCandidates`](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/requests_ls_getappointmentcandidates.htm) REST API by passing the required `workTypeGroupId` and `territoryIds` parameters. **note:** Specify the shift’s scheduling policy ID to show only the actual resources who have set regular working hours with shifts. For more information, see [Configure Scheduling Policy to Enforce Shifts](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc11-assign-scheduling-policy-to-actual-resource.md). **Resource URI** ```nolang https://YOUR_INSTANCE.salesforce.com/services/data/v68.0/scheduling/getAppointmentCandidates ``` Where `YOUR_INSTANCE` is a variable. **Sample Request** ```nolang { "startTime": "2022-10-01T17:00:00.000+0000", "endTime": "2022-10-08T18:00:00.000+0000", "workTypeGroupId": "0VSS70000004DvWOAU", "schedulingPolicyId": "0VrS70000004CEhKAM", "territoryIds": [ "0HhS70000004F9zKAE" ] } ``` **Sample Response** The API returns the service resources available for the specified time slots. ```nolang { "candidates": [ { "endTime": "2022-10-01T17:30:00.000+0000", "resources": [ "0HnS700000007xwKAA" ], "startTime": "2022-10-01T17:00:00.000+0000", "territoryId": "0HhS70000004F9zKAE" }, { "endTime": "2022-10-01T18:00:00.000+0000", "resources": [ "0HnS700000007xwKAA" ], "startTime": "2022-10-01T17:30:00.000+0000", "territoryId": "0HhS70000004F9zKAE" }, { "endTime": "2022-10-01T18:30:00.000+0000", "resources": [ "0HnS700000007xwKAA" ], "startTime": "2022-10-01T18:00:00.000+0000", "territoryId": "0HhS70000004F9zKAE" }, { "endTime": "2022-10-01T19:00:00.000+0000", "resources": [ "0HnS700000007xwKAA" ], "startTime": "2022-10-01T18:30:00.000+0000", "territoryId": "0HhS70000004F9zKAE" }, { "endTime": "2022-10-01T19:30:00.000+0000", "resources": [ "0HnS700000007xwKAA" ], "startTime": "2022-10-01T19:00:00.000+0000", "territoryId": "0HhS70000004F9zKAE" }, { "endTime": "2022-10-01T20:00:00.000+0000", "resources": [ "0HnS700000007xwKAA" ], "startTime": "2022-10-01T19:30:00.000+0000", "territoryId": "0HhS70000004F9zKAE" }, { "endTime": "2022-10-01T20:30:00.000+0000", "resources": [ "0HnS700000007xwKAA" ], "startTime": "2022-10-01T20:00:00.000+0000", "territoryId": "0HhS70000004F9zKAE" }, { "endTime": "2022-10-01T21:00:00.000+0000", "resources": [ "0HnS700000007xwKAA" ], "startTime": "2022-10-01T20:30:00.000+0000", "territoryId": "0HhS70000004F9zKAE" }, { "endTime": "2022-10-01T21:30:00.000+0000", "resources": [ "0HnS700000007xwKAA" ], "startTime": "2022-10-01T21:00:00.000+0000", "territoryId": "0HhS70000004F9zKAE" }, { "endTime": "2022-10-01T22:00:00.000+0000", "resources": [ "0HnS700000007xwKAA" ], "startTime": "2022-10-01T21:30:00.000+0000", "territoryId": "0HhS70000004F9zKAE" }, { "endTime": "2022-10-01T22:30:00.000+0000", "resources": [ "0HnS700000007xwKAA" ], "startTime": "2022-10-01T22:00:00.000+0000", "territoryId": "0HhS70000004F9zKAE" }, { "endTime": "2022-10-01T23:00:00.000+0000", "resources": [ "0HnS700000007xwKAA" ], "startTime": "2022-10-01T22:30:00.000+0000", "territoryId": "0HhS70000004F9zKAE" }, { "endTime": "2022-10-01T23:30:00.000+0000", "resources": [ "0HnS700000007xwKAA" ], "startTime": "2022-10-01T23:00:00.000+0000", "territoryId": "0HhS70000004F9zKAE" }, { "endTime": "2022-10-02T00:00:00.000+0000", "resources": [ "0HnS700000007xwKAA" ], "startTime": "2022-10-01T23:30:00.000+0000", "territoryId": "0HhS70000004F9zKAE" }, { "endTime": "2022-10-02T00:30:00.000+0000", "resources": [ "0HnS700000007xwKAA" ], "startTime": "2022-10-02T00:00:00.000+0000", "territoryId": "0HhS70000004F9zKAE" } ] } ``` 2. Parse the JSON response, and show the actual service resources on a page. Business managers or administrators can select an actual resource for the appointment. # Get Agent Context Retrieves the content of the agent context. This action is available in API version 67.0 and later. ## Supported REST HTTP Methods **URI:** `/services/data/vXX.X/actions/standard/getAgentContext` Where `XX.X` is the latest API version. **Formats:** JSON, XML **HTTP Methods:** POST **Authentication:** `Authorization: Bearer TOKEN` Where `TOKEN` is a variable. ## Inputs |Input|Type|Description| |-----|----|-----------| |`contextDescription`|string|Optional. A description of the agent context.| ## Outputs |Output|Type|Description| |------|----|-----------| |`agentContextApex`|string|Specifies the agent context as an Apex object. This output is an Apex output type that contains nested arrays in JSON format.| ## Example Sample request body: ```nolang { "inputs" : [{ "contextDescription" : "Sample agent context description." }] } ``` Sample response body: ```nolang { "actionName" : "getAgentContext", "errors" : null, "isSuccess" : true, "outputValues" : { "agentContextApex" : { "contextDescription" : "Sample agent context description.", "contextId" : "0XxRZ0000008iPeYAI", "content" : "Sample agent context content." } } } ``` # Get Appointment Candidates A service resource represents an employee from your organization, such as a loan officer, investment advisor, doctor, nurse practitioner, or retail store specialist, who attends appointments with clients. Use the `getAppointmentCandidates` REST API to fetch the available service resources based on work type group and service territory. 1. Create a page in your app where you can show the available service resources based on the work type group and service territory. 2. Make a POST request on the [`getAppointmentCandidates`](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/requests_ls_getappointmentcandidates.htm) REST API by passing the required `workTypeGroupId` and `territoryIds` parameters. **Resource URI** ```nolang https://yourInstance.salesforce.com/services/data/vXX.X/scheduling/getAppointmentCandidates ``` **For an Existing User (Account)** To consider an existing user’s preferred visiting hours, pass `accountId` in the input request body. The preference is enforced when the Include Only Required Service Resources and Ignore Excluded Service Resources policy rules are enabled. See [Scheduling Policy Rules in Salesforce Scheduler](https://help.salesforce.com/s/articleView?id=platform.ls_scheduling_policies.htm&type=5). **Sample Request** ```nolang { "startTime" : "2023-11-01T09:00:00.000+0000", "endTime" : "2023-11-25T19:00:00.000+0000", "accountId" : "001S7000001pFlJIAU", "workTypeGroupId" : "0VSS700000000sVOAQ", "territoryIds" : ["0HhS700000001DYKAY"], "engagementChannelTypeIds": [ "0eFS70000004CG5MAM" ] } ``` **Sample Response** The API returns the available time slots and service resources. ```nolang { "candidates": [ { "endTime": "2023-11-24T18:00:00.000+0000", "engagementChannelTypeIds": [ "0eFS70000004CG5MAM" ], "resources": [ "0HnS700000002jAKAQ" ], "startTime": "2023-11-24T17:00:00.000+0000", "territoryId": "0HhS700000001DYKAY" }, { "endTime": "2023-11-24T18:15:00.000+0000", "engagementChannelTypeIds": [ "0eFS70000004CG5MAM" ], "resources": [ "0HnS700000002jAKAQ" ], "startTime": "2023-11-24T17:15:00.000+0000", "territoryId": "0HhS700000001DYKAY" }, { "endTime": "2023-11-24T18:30:00.000+0000", "engagementChannelTypeIds": [ "0eFS70000004CG5MAM" ], "resources": [ "0HnS700000002jAKAQ" ], "startTime": "2023-11-24T17:30:00.000+0000", "territoryId": "0HhS700000001DYKAY" }, { "endTime": "2023-11-24T18:45:00.000+0000", "engagementChannelTypeIds": [ "0eFS70000004CG5MAM" ], "resources": [ "0HnS700000002jAKAQ" ], "startTime": "2023-11-24T17:45:00.000+0000", "territoryId": "0HhS700000001DYKAY" }, { "endTime": "2023-11-24T19:00:00.000+0000", "engagementChannelTypeIds": [ "0eFS70000004CG5MAM" ], "resources": [ "0HnS700000002jAKAQ" ], "startTime": "2023-11-24T18:00:00.000+0000", "territoryId": "0HhS700000001DYKAY" }, { "endTime": "2023-11-24T19:15:00.000+0000", "engagementChannelTypeIds": [ "0eFS70000004CG5MAM" ], "resources": [ "0HnS700000002jAKAQ" ], "startTime": "2023-11-24T18:15:00.000+0000", "territoryId": "0HhS700000001DYKAY" }, { "endTime": "2023-11-24T19:30:00.000+0000", "engagementChannelTypeIds": [ "0eFS70000004CG5MAM" ], "resources": [ "0HnS700000002jAKAQ" ], "startTime": "2023-11-24T18:30:00.000+0000", "territoryId": "0HhS700000001DYKAY" } ] } ``` **For a Guest User (Lead)** **Sample Request** ```nolang { "startTime" : "2023-11-01T09:00:00.000+0000", "endTime" : "2023-11-25T19:00:00.000+0000", "workTypeGroupId" : "0VSS700000000sVOAQ", "territoryIds" : ["0HhS700000001DYKAY"], "engagementChannelTypeIds": [ "0eFS70000004CG5MAM" ] } ``` **Sample Response** The API returns the available time slots and service resources. ```nolang { "candidates": [ { "endTime": "2023-11-24T18:00:00.000+0000", "engagementChannelTypeIds": [ "0eFS70000004CG5MAM" ], "resources": [ "0HnS700000002jAKAQ" ], "startTime": "2023-11-24T17:00:00.000+0000", "territoryId": "0HhS700000001DYKAY" }, { "endTime": "2023-11-24T18:15:00.000+0000", "engagementChannelTypeIds": [ "0eFS70000004CG5MAM" ], "resources": [ "0HnS700000002jAKAQ" ], "startTime": "2023-11-24T17:15:00.000+0000", "territoryId": "0HhS700000001DYKAY" }, { "endTime": "2023-11-24T18:30:00.000+0000", "engagementChannelTypeIds": [ "0eFS70000004CG5MAM" ], "resources": [ "0HnS700000002jAKAQ" ], "startTime": "2023-11-24T17:30:00.000+0000", "territoryId": "0HhS700000001DYKAY" }, { "endTime": "2023-11-24T18:45:00.000+0000", "engagementChannelTypeIds": [ "0eFS70000004CG5MAM" ], "resources": [ "0HnS700000002jAKAQ" ], "startTime": "2023-11-24T17:45:00.000+0000", "territoryId": "0HhS700000001DYKAY" }, { "endTime": "2023-11-24T19:00:00.000+0000", "engagementChannelTypeIds": [ "0eFS70000004CG5MAM" ], "resources": [ "0HnS700000002jAKAQ" ], "startTime": "2023-11-24T18:00:00.000+0000", "territoryId": "0HhS700000001DYKAY" }, { "endTime": "2023-11-24T19:15:00.000+0000", "engagementChannelTypeIds": [ "0eFS70000004CG5MAM" ], "resources": [ "0HnS700000002jAKAQ" ], "startTime": "2023-11-24T18:15:00.000+0000", "territoryId": "0HhS700000001DYKAY" }, { "endTime": "2023-11-24T19:30:00.000+0000", "engagementChannelTypeIds": [ "0eFS70000004CG5MAM" ], "resources": [ "0HnS700000002jAKAQ" ], "startTime": "2023-11-24T18:30:00.000+0000", "territoryId": "0HhS700000001DYKAY" } ] } ``` 3. Parse the JSON response, and show the available service resources on the page so that the user can select a primary service resource. Here’s how a Select Service Resource page can look. ![A representation of the Select Service Resource screen.](https://developer.salesforce.com/media/salesforce-scheduler-dev-guide/screen_primary_resource.png) Here’s how a page can look when the user selects a primary service resource. ![A representation of the Select Service Resource screen with the primary resource selected.](https://developer.salesforce.com/media/salesforce-scheduler-dev-guide/screen_select_primary_resource.png) On the next page in your app, show the selected primary resource. You can also show the other service resources, including assets, so that users can add them as required resources. Then, show the consolidated time slots for all the selected resources. # Get Appointment Candidates Get a list of service resources based on the work type group or work type, and service territory that are selected in the previous step. A service resource represents an employee from your organization, such as a loan officer, investment advisor, doctor, nurse practitioner, or retail store specialist, who attends appointments with clients. Create a page in your app where you can show the available service resources based on the work type group or work type, and service territory. Make a POST request on the [`getAppointmentCandidates`](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/requests_ls_getappointmentcandidates.htm) REST API by passing the required `workTypeGroupId` or `workTypeId`, and `territoryIds` parameters. **Resource URI** ```nolang https://yourInstance.salesforce.com/services/data/vXX.X/scheduling/getAppointmentCandidates ``` **For an Existing User (Account)** To consider an existing user’s preferred visiting hours, pass `accountId` in the input request body. The preference is enforced when the Include Only Required Service Resources and Ignore Excluded Service Resources policy rules are enabled. **Sample Request** Using `workTypeGroupId`: ```nolang { "accountId" : "001B000001McLhMIAV", "startTime" : "2021-10-29T08:00:00.000+0000", "endTime" : "2021-10-29T18:00:00.000+0000", "allowConcurrentScheduling" : true, "workTypeGroupId" : "0VSB0000000TbhWOAS", "territoryIds" : ["0HhB00000001P0PKAU"] } ``` Using `workTypeId`: ```nolang { "accountId" : "001B000001McLhMIAV", "startTime" : "2021-10-29T08:00:00.000+0000", "endTime" : "2021-10-29T18:00:00.000+0000", "allowConcurrentScheduling" : true, "workType" : { "id" : "08qB00000002ocgIAA" }, "territoryIds" : ["0HhB00000001P0PKAU"] } ``` **Sample Response** The API returns the available time slots and service resources. ```nolang { "candidates" : [ { "endTime" : "2021-10-29T16:00:00.000+0000", "resources" : [ "0HnB00000001SJxKAM" ], "startTime" : "2021-10-29T15:00:00.000+0000", "territoryId" : "0HhB00000001P0PKAU" }, { "endTime" : "2021-10-29T16:30:00.000+0000", "resources" : [ "0HnB00000001SJxKAM" ], "startTime" : "2021-10-29T15:30:00.000+0000", "territoryId" : "0HhB00000001P0PKAU" }, { "endTime" : "2021-10-29T17:00:00.000+0000", "resources" : [ "0HnB00000001SJxKAM" ], "startTime" : "2021-10-29T16:00:00.000+0000", "territoryId" : "0HhB00000001P0PKAU" }, { "endTime" : "2021-10-29T17:30:00.000+0000", "resources" : [ "0HnB00000001SJxKAM" ], "startTime" : "2021-10-29T16:30:00.000+0000", "territoryId" : "0HhB00000001P0PKAU" }, { "endTime" : "2021-10-29T18:00:00.000+0000", "resources" : [ "0HnB00000001SJxKAM" ], "startTime" : "2021-10-29T17:00:00.000+0000", "territoryId" : "0HhB00000001P0PKAU" }, { "endTime" : "2021-10-29T16:00:00.000+0000", "resources" : [ "0HnB00000001SOUKA2" ], "startTime" : "2021-10-29T15:00:00.000+0000", "territoryId" : "0HhB00000001P0PKAU" }, { "endTime" : "2021-10-29T16:30:00.000+0000", "resources" : [ "0HnB00000001SOUKA2" ], "startTime" : "2021-10-29T15:30:00.000+0000", "territoryId" : "0HhB00000001P0PKAU" }, { "endTime" : "2021-10-29T17:00:00.000+0000", "resources" : [ "0HnB00000001SOUKA2" ], "startTime" : "2021-10-29T16:00:00.000+0000", "territoryId" : "0HhB00000001P0PKAU" }, { "endTime" : "2021-10-29T17:30:00.000+0000", "resources" : [ "0HnB00000001SOUKA2" ], "startTime" : "2021-10-29T16:30:00.000+0000", "territoryId" : "0HhB00000001P0PKAU" }, { "endTime" : "2021-10-29T18:00:00.000+0000", "resources" : [ "0HnB00000001SOUKA2" ], "startTime" : "2021-10-29T17:00:00.000+0000", "territoryId" : "0HhB00000001P0PKAU" } ] } ``` **For a Guest User (Lead)** **Sample Request** Using `workTypeGroupId`: ```nolang { "startTime" : "2021-10-13T08:00:00.000+0000", "endTime" : "2021-10-13T18:00:00.000+0000", "allowConcurrentScheduling" : true, "workTypeGroupId" : "0VSB0000000TbhWOAS", "territoryIds" : ["0HhB00000001P0PKAU"], } ``` Using `workTypeId`: ```nolang { "accountId" : "001B000001McLhMIAV", "startTime" : "2021-10-29T08:00:00.000+0000", "endTime" : "2021-10-29T18:00:00.000+0000", "allowConcurrentScheduling" : true, "workType" : { "id" : "08qB00000002ocgIAA" }, "territoryIds" : ["0HhB00000001P0PKAU"] } ``` **Sample Response** The API returns the available time slots and service resources. ```nolang { "candidates" : [ { "endTime" : "2021-10-29T16:00:00.000+0000", "resources" : [ "0HnB00000001SJxKAM" ], "startTime" : "2021-10-29T15:00:00.000+0000", "territoryId" : "0HhB00000001P0PKAU" }, { "endTime" : "2021-10-29T16:30:00.000+0000", "resources" : [ "0HnB00000001SJxKAM" ], "startTime" : "2021-10-29T15:30:00.000+0000", "territoryId" : "0HhB00000001P0PKAU" }, { "endTime" : "2021-10-29T17:00:00.000+0000", "resources" : [ "0HnB00000001SJxKAM" ], "startTime" : "2021-10-29T16:00:00.000+0000", "territoryId" : "0HhB00000001P0PKAU" }, { "endTime" : "2021-10-29T17:30:00.000+0000", "resources" : [ "0HnB00000001SJxKAM" ], "startTime" : "2021-10-29T16:30:00.000+0000", "territoryId" : "0HhB00000001P0PKAU" }, { "endTime" : "2021-10-29T18:00:00.000+0000", "resources" : [ "0HnB00000001SJxKAM" ], "startTime" : "2021-10-29T17:00:00.000+0000", "territoryId" : "0HhB00000001P0PKAU" }, { "endTime" : "2021-10-29T16:00:00.000+0000", "resources" : [ "0HnB00000001SOUKA2" ], "startTime" : "2021-10-29T15:00:00.000+0000", "territoryId" : "0HhB00000001P0PKAU" }, { "endTime" : "2021-10-29T16:30:00.000+0000", "resources" : [ "0HnB00000001SOUKA2" ], "startTime" : "2021-10-29T15:30:00.000+0000", "territoryId" : "0HhB00000001P0PKAU" }, { "endTime" : "2021-10-29T17:00:00.000+0000", "resources" : [ "0HnB00000001SOUKA2" ], "startTime" : "2021-10-29T16:00:00.000+0000", "territoryId" : "0HhB00000001P0PKAU" }, { "endTime" : "2021-10-29T17:30:00.000+0000", "resources" : [ "0HnB00000001SOUKA2" ], "startTime" : "2021-10-29T16:30:00.000+0000", "territoryId" : "0HhB00000001P0PKAU" }, { "endTime" : "2021-10-29T18:00:00.000+0000", "resources" : [ "0HnB00000001SOUKA2" ], "startTime" : "2021-10-29T17:00:00.000+0000", "territoryId" : "0HhB00000001P0PKAU" } ] } ``` Parse the JSON response, and show the available resources on the page so that the user can select a resource for the appointment. Here’s how a page showing the available service resources can look. ![A representation of the Select Service Resource screen.](https://developer.salesforce.com/media/salesforce-scheduler-dev-guide/concurrent-serviceResource.png) When users select a resource, show the available time slots for the selected resource. Here’s how a page showing the available time slots can look. ![A representation of the Select Service Appointment Time screen.](https://developer.salesforce.com/media/salesforce-scheduler-dev-guide/concurrent_timeSlot.png) On the next page in your app, you can show the appointment details for the user to review and create the appointment. # Get Appointment Time Slots A time slot represents a period in a day when an appointment can be scheduled. Use the `getAppointmentSlots` REST API to fetch the available time slots for a resource. 1. Create a page in your app to show the selected primary resource, other required resources, including assets, and the consolidated time slots for the primary service resource and required resources that users select. Here’s how a page can look. ![A representation of the manage multiple service resource screen.](https://developer.salesforce.com/media/salesforce-scheduler-dev-guide/screen_manage_multi_resources.png) 2. When the user selects one or more required resources, refresh the available time slots by making a POST request to the [getAppointmentSlots](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/requests_ls_getappointmentslots.htm) REST API and passing the selected required resources along with the `workTypeGroupId` and `territoryId` parameters. **Resource URI** ```nolang https://yourInstance.salesforce.com/services/data/vXX.X/scheduling/getAppointmentSlots ``` **Sample Request** ```nolang { "startTime" : "2023-11-30T09:00:00.000+0000", "endTime" : "2023-12-01T23:30:00.000+0000", "accountId" : "001S7000001pFlJIAU", "workTypeGroupId" : "0VSS700000000sVOAQ", "territoryIds" : ["0HhS700000001DYKAY"], "engagementChannelTypeIds": [ "0eFS70000004CG5MAM" ], "primaryResourceId" : "0HnS700000002jAKAQ", "requiredResourceIds" : ["0HnS700000002jKKAQ"] } ``` **Sample Response** The API returns the time slots where the selected primary resource and required resources are available for the multi-resource appointment. ```nolang { "timeSlots": [ { "endTime": "2023-11-30T18:00:00.000+0000", "engagementChannelTypeIds": [ "0eFS70000004CG5MAM" ], "remainingAppointments": 1, "startTime": "2023-11-30T17:00:00.000+0000", "territoryId": "0HhS700000001DYKAY" }, { "endTime": "2023-11-30T19:00:00.000+0000", "engagementChannelTypeIds": [ "0eFS70000004CG5MAM" ], "remainingAppointments": 1, "startTime": "2023-11-30T18:00:00.000+0000", "territoryId": "0HhS700000001DYKAY" }, { "endTime": "2023-11-30T20:00:00.000+0000", "engagementChannelTypeIds": [ "0eFS70000004CG5MAM" ], "remainingAppointments": 1, "startTime": "2023-11-30T19:00:00.000+0000", "territoryId": "0HhS700000001DYKAY" }, { "endTime": "2023-11-30T21:00:00.000+0000", "engagementChannelTypeIds": [ "0eFS70000004CG5MAM" ], "remainingAppointments": 1, "startTime": "2023-11-30T20:00:00.000+0000", "territoryId": "0HhS700000001DYKAY" }, { "endTime": "2023-11-30T22:00:00.000+0000", "engagementChannelTypeIds": [ "0eFS70000004CG5MAM" ], "remainingAppointments": 1, "startTime": "2023-11-30T21:00:00.000+0000", "territoryId": "0HhS700000001DYKAY" }, { "endTime": "2023-11-30T23:00:00.000+0000", "engagementChannelTypeIds": [ "0eFS70000004CG5MAM" ], "remainingAppointments": 1, "startTime": "2023-11-30T22:00:00.000+0000", "territoryId": "0HhS700000001DYKAY" }, { "endTime": "2023-12-01T00:00:00.000+0000", "engagementChannelTypeIds": [ "0eFS70000004CG5MAM" ], "remainingAppointments": 1, "startTime": "2023-11-30T23:00:00.000+0000", "territoryId": "0HhS700000001DYKAY" }, { "endTime": "2023-12-01T01:00:00.000+0000", "engagementChannelTypeIds": [ "0eFS70000004CG5MAM" ], "remainingAppointments": 1, "startTime": "2023-12-01T00:00:00.000+0000", "territoryId": "0HhS700000001DYKAY" }, { "endTime": "2023-12-01T02:00:00.000+0000", "engagementChannelTypeIds": [ "0eFS70000004CG5MAM" ], "remainingAppointments": 1, "startTime": "2023-12-01T01:00:00.000+0000", "territoryId": "0HhS700000001DYKAY" } ] } ``` 3. Parse the JSON response, and show the available time slots for the selected resources. Here’s how a Select Service Appointment Time page can look. ![A representation of the selected required resources screen.](https://developer.salesforce.com/media/salesforce-scheduler-dev-guide/screen_selected_requied_resources.png) **note:** A multi-resource appointment can have a maximum of five required service resources: one primary required service resource plus four required service resources, including asset resources. On the next page in your app, you can show the appointment details for the user to review and create the appointment. # Get Appointment Time Slots A time slot is a period in a day when an appointment can be scheduled. Use the `available-territory-slots` Connect API to fetch the consolidated availability of each service resource within the selected territory. 1. Create a page in your app where you can show the available time slots based on the work type group and service territory. 2. Make a POST request on the `available-territory-slots` Connect API by passing the required `workType` and `territoryIds` parameters. 3. Restrict the number of service resources returned by the request by passing a finite, integer value to the `resourceLimit​ApptDistribution` parameter. When appointment distribution is enabled, Salesforce Scheduler fetches and shows a list of appointment time slots based on the resource utilisation calculation frequency: monthly, parameter-based, or weekly. The Salesforce Scheduler uses the service resources’ utilization score for a specific period to suggest time slots for the least occupied resources. For more information, see [How Appointment Distribution Works](https://help.salesforce.com/s/articleView?id=platform.ls_how_appt_distribution_works.htm&type=5). In the custom app, you can hard code most of the parameters, including `territoryIds` and `resourceLimit​ApptDistribution`. Set the `territoryIds` parameter to the ID of the new virtual territory that you created in the beginning of this procedure. If the new territory is assigned to multiple work types, you can let your end user select a value for `workType` 4. Parse the JSON response, and show only the available time slots on the page so that users can select a time slot for their appointment. To ensure privacy, don’t show the service resources. Here’s how a page showing the available time slots can look. ![A representation of the Select Service Appointment Time screen.](https://developer.salesforce.com/media/salesforce-scheduler-dev-guide/screen_service_appointment_time.png) 5. Write custom code to select the least utilized resource or to randomly select a service resource for the appointment based on the time slot that the user selects. This sample code automatically selects the least utilized resource from the list available for the selected time slot. ```nolang var serviceResourceId=resources[0] ``` This sample code automatically selects a service resource and stores it in `serviceResourceId`. Pass the list of service resources available for the selected time slot in `resources`. ```nolang var index = Math.floor(Math.random() * Math.floor(resources.length)); var serviceResourceId=resources[index] ``` ## Example **Resource URI** ```nolang https://YOUR_INSTANCE.salesforce.com/services/data/vXX.X/connect/scheduling/available-territory-slots ``` Where `YOUR_INSTANCE` is a variable. **For an Existing User (Account)** To consider an existing user’s preferred visiting hours, pass `accountId` in the input request body. You can also specify the `startTime` and `endTime` parameters with the request. The preference is enforced when the [Enforce Account's Visiting Hours policy rule](https://help.salesforce.com/articleView?id=platform.ls_scheduling_policies.htm&type=5) is enabled. Sample Request ```nolang { "accountId" : "001B000001McLhMIAV", "workType" : { "id": "0VS2x000000PVu5GAG" }, "resourceLimit​ApptDistribution" : 10, "territoryIds" : [ "0Hh2w000000XmoXCAS" ] } ``` Sample Response The API returns the available time slots and service resources based on resource utilization. The response returns only 10 least consumed resources, as specified by the `resourceLimit​ApptDistribution` parameter. **note:** Setting a maximum number of resources you want to show for scheduling makes it possible to optimise performance for large territories, such as virtual or tele scenarios. ```nolang { "result" : { "territorySlots" : [ { "slots" : [ { "endTime" : "2021-05-24T17:00:00.000Z", "resources" : [ "0HnB0000000LVbfKAG", "0HnB0000000TavDKAS", "0HnB0000000Tav3KAC", "0HnB0000000TauyKAC", "0HnB0000000TavMQAS" ], "startTime" : "2021-05-24T16:00:00.000Z" }, { "endTime" : "2021-05-24T17:30:00.000Z", "resources" : [ "0HnB0000000Tav3KAC", "0HnB0000000TaozKAL", "0HnB0000000TavMQAS", "0HnB0000000TaiOKCS", "0HnB0000000TacOLCM" ], "startTime" : "2021-05-24T16:30:00.000Z" }, { "endTime" : "2021-05-24T18:00:00.000Z", "resources" : [ "0HnB0000000Tav3KAC", "0HnB0000000TauyKAC", "0HnB0000000LVgfKBG", "0HnB0000000TayMQQS", "0HnB0000000TacOLCM" ], "startTime" : "2021-05-24T17:00:00.000Z" }, { "endTime" : "2021-05-24T18:30:00.000Z", "resources" : [ "0HnB0000000Tav3KAC", "0HnB0000000TauyKAC", "0HnB0000000LVgfKBG", "0HnB0000000TayMQQS", "0HnB0000000TacOLCM" ], "startTime" : "2021-05-24T17:30:00.000Z" }, { "endTime" : "2021-05-24T19:00:00.000Z", "resources" : [ "0HnB0000000LVbfKAG", "0HnB0000000TavDKAS", "0HnB0000000Tav3KAC", "0HnB0000000TauyKAC", "0HnB0000000TavMQAS" ], "startTime" : "2021-05-24T18:00:00.000Z" }, { "endTime" : "2021-05-24T19:30:00.000Z", "resources" : [ "0HnB0000000LVbfKAG", "0HnB0000000TavDKAS", "0HnB0000000Tav3KAC", "0HnB0000000TauyKAC", "0HnB0000000TavMQAS" ], "startTime" : "2021-05-24T18:30:00.000Z" }, { "endTime" : "2021-05-24T20:00:00.000Z", "resources" : [ "0HnB0000000LVbfKAG", "0HnB0000000TavDKAS", "0HnB0000000Tav3KAC", "0HnB0000000TauyKAC", "0HnB0000000TavMQAS" ], "startTime" : "2021-05-24T19:00:00.000Z" }], "territoryId" : "0Hh2w000000XmoXCAS" } ] } } ``` **For a Guest User (Lead)** Sample Request ```nolang { "workType" : { "id": "0VS2x000000PVu5GAG" }, "resourceLimit​ApptDistribution" : 10, "territoryIds" : [ "0Hh2w000000XmoXCAS" ] } ``` Sample Response The API returns the available time slots and service resources based on resource utilization. The response returns only 10 least consumed resources, as specified by the `resourceLimit​ApptDistribution` parameter. **note:** Setting a maximum number of resources you want to show for scheduling makes it possible to optimise performance for large territories, such as virtual or tele scenarios. ```nolang { "result" : { "territorySlots" : [ { "slots" : [ { "endTime" : "2021-05-24T17:00:00.000Z", "resources" : [ "0HnB0000000LVbfKAG", "0HnB0000000TavDKAS", "0HnB0000000Tav3KAC", "0HnB0000000TauyKAC", "0HnB0000000TavMQAS" ], "startTime" : "2021-05-24T16:00:00.000Z" }, { "endTime" : "2021-05-24T17:30:00.000Z", "resources" : [ "0HnB0000000Tav3KAC", "0HnB0000000TaozKAL", "0HnB0000000TavMQAS", "0HnB0000000TaiOKCS", "0HnB0000000TacOLCM" ], "startTime" : "2021-05-24T16:30:00.000Z" }, { "endTime" : "2021-05-24T18:00:00.000Z", "resources" : [ "0HnB0000000Tav3KAC", "0HnB0000000TauyKAC", "0HnB0000000LVgfKBG", "0HnB0000000TayMQQS", "0HnB0000000TacOLCM" ], "startTime" : "2021-05-24T17:00:00.000Z" }, { "endTime" : "2021-05-24T18:30:00.000Z", "resources" : [ "0HnB0000000Tav3KAC", "0HnB0000000TauyKAC", "0HnB0000000LVgfKBG", "0HnB0000000TayMQQS", "0HnB0000000TacOLCM" ], "startTime" : "2021-05-24T17:30:00.000Z" }, { "endTime" : "2021-05-24T19:00:00.000Z", "resources" : [ "0HnB0000000LVbfKAG", "0HnB0000000TavDKAS", "0HnB0000000Tav3KAC", "0HnB0000000TauyKAC", "0HnB0000000TavMQAS" ], "startTime" : "2021-05-24T18:00:00.000Z" }, { "endTime" : "2021-05-24T19:30:00.000Z", "resources" : [ "0HnB0000000LVbfKAG", "0HnB0000000TavDKAS", "0HnB0000000Tav3KAC", "0HnB0000000TauyKAC", "0HnB0000000TavMQAS" ], "startTime" : "2021-05-24T18:30:00.000Z" }, { "endTime" : "2021-05-24T20:00:00.000Z", "resources" : [ "0HnB0000000LVbfKAG", "0HnB0000000TavDKAS", "0HnB0000000Tav3KAC", "0HnB0000000TauyKAC", "0HnB0000000TavMQAS" ], "startTime" : "2021-05-24T19:00:00.000Z" }], "territoryId" : "0Hh2w000000XmoXCAS" } ] } } ``` On the next page, you can show the appointment details for the user to review and create the appointment. # Get Available Resources Retrieve the resources that are available for an anonymous appointment. A service resource represents an employee from your organization, such as a loan officer, investment adviser, doctor, nurse practitioner, or retail store specialist, who attends appointments with clients. This task explains how to retrieve service resources that match various criteria such as work type group, territory, start time, and end time from the selected service appointment. Use the `getAppointmentCandidates` REST API to fetch the available service resources based on work type group and service territory. Make a POST request on the `getAppointmentCandidates` REST API by passing the required `workTypeGroupId`, `territoryIds`, `startTime`, and `endTime` parameters. Use this URI for the request: ```nolang https://YOUR_INSTANCE.salesforce.com/services/data/vXX.X/scheduling/getAppointmentCandidates ``` Where `YOUR_INSTANCE` is a variable. Use this request body with the POST request: ```nolang { "startTime" : START_TIME, "endTime" : END_TIME, "territoryIds" : [TERRITORY_IDS] "workType" : { "id": WORK_TYPE_ID } } ``` Where `START_TIME`, `END_TIME`, `TERRITORY_IDS`, and `WORK_TYPE_ID` are variables. This code snippet is an example request body: ```nolang { "startTime" : "2021-10-25T17:30:00.000+0000", "accountId" : "001B000001McLhMIAV", "territoryIds" : ["0HhB0000000TaHOKA0"], "workType" : { "id": "08qB0000000UF63IAG" } } ``` The request returns a list of anonymous resources that match the criteria specified in the request body. ```nolang { "candidates": [ { "endTime" : "2021-10-25T18:30:00.000+0000", "resources" : [ "0HnB0000000TavDKAS" ], "startTime" : "2021-10-25T17:30:00.000+0000", "territoryId" : "0HhB0000000TaHOKA0" }, { "endTime" : "2021-10-25T19:00:00.000+0000", "resources" : [ "0HnB0000000TavDKAS" ], "startTime" : "2021-10-25T18:00:00.000+0000", "territoryId" : "0HhB0000000TaHOKA0" }, { "endTime" : "2021-10-25T19:30:00.000+0000", "resources" : [ "0HnB0000000TavDKAS" ], "startTime" : "2021-10-25T18:30:00.000+0000", "territoryId" : "0HhB0000000TaHOKA0" }, { "endTime" : "2021-10-25T20:00:00.000+0000", "resources" : [ "0HnB0000000TavDKAS" ], "startTime" : "2021-10-25T19:00:00.000+0000", "territoryId" : "0HhB0000000TaHOKA0" } ] } ``` # Get Available Territory Slots A time slot represents a period in a day when an appointment can be scheduled. Use the `available-territory-slots` Connect API to fetch the consolidated availability of each service resource within the selected territory. 1. Create a page in your app where you can show the available time slots based on the work type group and service territory. 2. Make a POST request on the `available-territory-slots` Connect API by passing the required `workTypeGroupId` and `territoryIds` parameters. 3. Parse the JSON response, and show only the available time slots on the page. Don’t show the service resources to maintain their privacy. Here’s how a page showing the available time slots can look. ![A representation of the Select Service Appointment Time screen.](https://developer.salesforce.com/media/salesforce-scheduler-dev-guide/screen_service_appointment_time.png) 4. Write custom code to randomly select a service resource for the appointment based on the time slot that the user selects. This sample code automatically selects a service resource and stores it in `serviceResourceId` property. 5. Pass the list of service resources available for the selected time slot in `resources`. ## Example **Resource URI** ```nolang https://yourInstance.salesforce.com/services/data/vXX.X/connect/scheduling/available-territory-slots ``` **For an Existing User (Account)** To consider an existing user’s preferred visiting hours, pass `accountId` in the input request body. The preference is enforced when the [Enforce Account's Visiting Hours policy rule](https://help.salesforce.com/articleView?id=platform.ls_scheduling_policies.htm&type=5) is enabled. Sample Request ```nolang { "accountId" : "001S7000001pFlJIAU", "workTypeGroupId" : "0VSS700000000sVOAQ", "territoryIds" : [ "0HhS700000001DYKAY" ], "engagementChannelTypeIds": [ "0eFS70000004CG5MAM" ] } ``` Sample Response The API returns the available time slots and service resources. ```nolang { "result" : { "territorySlots" : [ { "slots" : [{ "endTime" : "2023-11-29T20:00:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-29T19:00:00.000Z" }, { "endTime" : "2023-11-29T20:15:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-29T19:15:00.000Z" }, { "endTime" : "2023-11-29T20:30:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-29T19:30:00.000Z" }, { "endTime" : "2023-11-29T20:45:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-29T19:45:00.000Z" }, { "endTime" : "2023-11-29T21:00:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-29T20:00:00.000Z" }, { "endTime" : "2023-11-29T21:15:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-29T20:15:00.000Z" }, { "endTime" : "2023-11-29T21:30:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-29T20:30:00.000Z" }, { "endTime" : "2023-11-29T21:45:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-29T20:45:00.000Z" }, { "endTime" : "2023-11-29T22:00:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-29T21:00:00.000Z" }, { "endTime" : "2023-11-29T22:15:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-29T21:15:00.000Z" }, { "endTime" : "2023-11-29T22:30:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-29T21:30:00.000Z" }, { "endTime" : "2023-11-29T22:45:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-29T21:45:00.000Z" }, { "endTime" : "2023-11-29T23:00:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-29T22:00:00.000Z" }, { "endTime" : "2023-11-29T23:15:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-29T22:15:00.000Z" }, { "endTime" : "2023-11-29T23:30:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-29T22:30:00.000Z" }, { "endTime" : "2023-11-29T23:45:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-29T22:45:00.000Z" }, { "endTime" : "2023-11-30T00:00:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-29T23:00:00.000Z" }, { "endTime" : "2023-11-30T00:15:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-29T23:15:00.000Z" }, { "endTime" : "2023-11-30T00:30:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-29T23:30:00.000Z" }, { "endTime" : "2023-11-30T00:45:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-29T23:45:00.000Z" }, { "endTime" : "2023-11-30T01:00:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-30T00:00:00.000Z" }, { "endTime" : "2023-11-30T01:15:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-30T00:15:00.000Z" }, { "endTime" : "2023-11-30T01:30:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-30T00:30:00.000Z" }, { "endTime" : "2023-11-30T01:45:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-30T00:45:00.000Z" }, { "endTime" : "2023-11-30T02:00:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-30T01:00:00.000Z" }, { "endTime" : "2023-11-30T18:00:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-30T17:00:00.000Z" }, { "endTime" : "2023-11-30T18:15:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-30T17:15:00.000Z" }, { "endTime" : "2023-11-30T18:30:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-30T17:30:00.000Z" }, { "endTime" : "2023-11-30T18:45:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-30T17:45:00.000Z" }, { "endTime" : "2023-11-30T19:00:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-30T18:00:00.000Z" }, { "endTime" : "2023-11-30T19:15:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-30T18:15:00.000Z" }, { "endTime" : "2023-11-30T19:30:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-30T18:30:00.000Z" }, { "endTime" : "2023-11-30T19:45:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-30T18:45:00.000Z" }, { "endTime" : "2023-11-30T20:00:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-30T19:00:00.000Z" }, { "endTime" : "2023-11-30T20:15:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-30T19:15:00.000Z" }, { "endTime" : "2023-11-30T20:30:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-30T19:30:00.000Z" }, { "endTime" : "2023-11-30T20:45:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-30T19:45:00.000Z" }, { "endTime" : "2023-11-30T21:00:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-30T20:00:00.000Z" }, { "endTime" : "2023-11-30T21:15:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-30T20:15:00.000Z" }], "territoryId" : "0HhS700000001DYKAY" } ] } } ``` **For a Guest User (Lead)** Sample Request ```nolang { "workTypeGroupId" : "0VSS700000000sVOAQ", "territoryIds" : [ "0HhS700000001DYKAY" ], "engagementChannelTypeIds": [ "0eFS70000004CG5MAM" ] } ``` Sample Response The API returns the available time slots and service resources. ```nolang { "result" : { "territorySlots" : [ { "slots" : [{ "endTime" : "2023-11-29T20:00:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-29T19:00:00.000Z" }, { "endTime" : "2023-11-29T20:15:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-29T19:15:00.000Z" }, { "endTime" : "2023-11-29T20:30:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-29T19:30:00.000Z" }, { "endTime" : "2023-11-29T20:45:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-29T19:45:00.000Z" }, { "endTime" : "2023-11-29T21:00:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-29T20:00:00.000Z" }, { "endTime" : "2023-11-29T21:15:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-29T20:15:00.000Z" }, { "endTime" : "2023-11-29T21:30:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-29T20:30:00.000Z" }, { "endTime" : "2023-11-29T21:45:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-29T20:45:00.000Z" }, { "endTime" : "2023-11-29T22:00:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-29T21:00:00.000Z" }, { "endTime" : "2023-11-29T22:15:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-29T21:15:00.000Z" }, { "endTime" : "2023-11-29T22:30:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-29T21:30:00.000Z" }, { "endTime" : "2023-11-29T22:45:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-29T21:45:00.000Z" }, { "endTime" : "2023-11-29T23:00:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-29T22:00:00.000Z" }, { "endTime" : "2023-11-29T23:15:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-29T22:15:00.000Z" }, { "endTime" : "2023-11-29T23:30:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-29T22:30:00.000Z" }, { "endTime" : "2023-11-29T23:45:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-29T22:45:00.000Z" }, { "endTime" : "2023-11-30T00:00:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-29T23:00:00.000Z" }, { "endTime" : "2023-11-30T00:15:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-29T23:15:00.000Z" }, { "endTime" : "2023-11-30T00:30:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-29T23:30:00.000Z" }, { "endTime" : "2023-11-30T00:45:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-29T23:45:00.000Z" }, { "endTime" : "2023-11-30T01:00:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-30T00:00:00.000Z" }, { "endTime" : "2023-11-30T01:15:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-30T00:15:00.000Z" }, { "endTime" : "2023-11-30T01:30:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-30T00:30:00.000Z" }, { "endTime" : "2023-11-30T01:45:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-30T00:45:00.000Z" }, { "endTime" : "2023-11-30T02:00:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-30T01:00:00.000Z" }, { "endTime" : "2023-11-30T18:00:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-30T17:00:00.000Z" }, { "endTime" : "2023-11-30T18:15:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-30T17:15:00.000Z" }, { "endTime" : "2023-11-30T18:30:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-30T17:30:00.000Z" }, { "endTime" : "2023-11-30T18:45:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-30T17:45:00.000Z" }, { "endTime" : "2023-11-30T19:00:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-30T18:00:00.000Z" }, { "endTime" : "2023-11-30T19:15:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-30T18:15:00.000Z" }, { "endTime" : "2023-11-30T19:30:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-30T18:30:00.000Z" }, { "endTime" : "2023-11-30T19:45:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-30T18:45:00.000Z" }, { "endTime" : "2023-11-30T20:00:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-30T19:00:00.000Z" }, { "endTime" : "2023-11-30T20:15:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-30T19:15:00.000Z" }, { "endTime" : "2023-11-30T20:30:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-30T19:30:00.000Z" }, { "endTime" : "2023-11-30T20:45:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-30T19:45:00.000Z" }, { "endTime" : "2023-11-30T21:00:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-30T20:00:00.000Z" }, { "endTime" : "2023-11-30T21:15:00.000Z", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-11-30T20:15:00.000Z" }], "territoryId" : "0HhS700000001DYKAY" } ] } } ``` On the next page in your app, you can show the appointment details for the user to review and create the appointment. # Get Components for Configuration Item Retrieve child components of a specific type for a configuration item by its unique identifier. ## Special Access Rules To query components for a configuration item, you must have the following user permissions: - IT Service Configuration Item Type Manager - IT Service Configuration Item Owner - IT Service Configuration Item Type Reader **See Also** - [Configuration Management Database GraphQL V2 API (POST)](https://developer.salesforce.com/docs/service/agentforce-it-service/graphql-api-cmdb-it-service-canonical-v2.md#configuration-management-database-graphql-v2-api-post) ## Request ### JSON example ```nolang query GetComponentsByCnfgItemId { getComponentsByCnfgItemId( cnfgItemId: 6460949 createdOn: "1775194238352" componentCnfgItemType: "SD_NeAd" lastModifiedOn: "1764831587989" pageNumber: null pageSize: null ) { id componentCnfgItems { id SD_AsNa SD_AsId SD_CiOwGr } } } ``` ### Properties |Name|Type|Description|Required or Optional|Available Version| |----|----|-----------|--------------------|-----------------| |`componentCnfgItemType`|String|The developer name of the configuration item type definition for the component type to return.|Required|67.0| |`createdOn`|String|The date and time the record was created.|Optional|68.0| |`id`|Integer|The unique integer identifier of the parent configuration item whose child components you want to retrieve.|Required|67.0| |`lastModifiedOn`|String|The date and time the record was last updated.|Optional|68.0| |`pageNumber`|Integer|The page number of the results to return. Use with `pageSize` for pagination.|Required|67.0| |`pageSize`|Integer|The maximum number of component configuration item records to return per page.|Required|67.0| ## Response ### JSON example ```nolang { "data": { "getComponentsByCnfgItemId": { "cnfgItemId": "6460949", "createdOn": "1775194238352", "componentCnfgItemType": "SD_NeAd", "lastModifiedOn": "1764831587989", "pageNumber": null, "pageSize": null, "componentCnfgItems": [ { "id": 6899801, "SD_AsNa": "New Component", "SD_AsId": "AST6899801", "SD_CiOwGr": null }, { "id": 6460950, "SD_AsNa": "eni-0a13f4fe4dede3844", "SD_AsId": "AST6460950", "SD_CiOwGr": null } ] } } } ``` ### Properties |Name|Type|Description|Available Version| |----|----|-----------|-----------------| |`id`|Integer|The unique integer identifier of the parent configuration item that was queried.|67.0| |`componentCnfgItems`|[componentCnfgItems](#componentcnfgitems)|An array of component configuration item objects for the current page.|67.0| ## ComponentCnfgItems ### JSON example Each element in the `componentCnfgItems` array is a component configuration item object. You can request the `id` field and any configuration item attributes by their developer name in the query. ```nolang { "id": 6899801, "SD_AsNa": "New Component", "SD_AsId": "AST6899801", "SD_CiOwGr": null } ``` ### Properties |Name|Type|Description|Available Version| |----|----|-----------|-----------------| |`id`|Integer|The unique integer identifier of the component configuration item.|67.0| **note:** You can request any available configuration item attribute in the `componentCnfgItems` selection by using its developer name. For example, `SD_AsNa`, `SD_OpSy`. The response includes only the fields you request. To learn more, see Configuration Item Types and Attributes. # Get Components for Configuration Item Retrieve child components of a specific type for a configuration item by its unique identifier. ## Special Access Rules To query components for a configuration item, you must have the following user permissions: - IT Service Configuration Item Type Manager - IT Service Configuration Item Owner - IT Service Configuration Item Type Reader ## Request ### JSON example ```nolang query GetComponentsByCIId { getComponentsByCIId( ciId: 6460949 createdOn: "1775194238352" componentCiType: "SD_NeAd" lastModifiedOn: "1764831587989" pageNumber: null pageSize: null ) { ciId records { id SD_AsNa SD_AsId SD_CiOwGr } } } ``` ### Properties |Name|Type|Description|Required or Optional|Available Version| |----|----|-----------|--------------------|-----------------| |`ciId`|Integer|The unique integer identifier of the parent configuration item whose child components you want to retrieve.|Required|66.0| |`componentCiType`|String|The developer name of the configuration item type definition for the component type to return.|Required|66.0| |`createdOn`|String|The date and time the record was created.|Optional|68.0| |`lastModifiedOn`|String|The date and time the record was last updated.|Optional|68.0| |`pageNumber`|Integer|The page number of the results to return. Use with `pageSize` for pagination.|Required|66.0| |`pageSize`|Integer|The maximum number of component configuration item records to return per page.|Required|66.0| ## Response ### JSON example ```nolang { "data": { "getComponentsByCIId": { "ciId": "6460949", "createdOn": "1775194238352", "lastModifiedOn": "1764831587989", "records": [ { "id": 6899801, "SD_AsNa": "New Component", "SD_AsId": "AST6899801", "SD_CiOwGr": null }, { "id": 6460950, "SD_AsNa": "eni-0a13f4fe4dede3844", "SD_AsId": "AST6460950", "SD_CiOwGr": null } ] } } } ``` ### Properties |Name|Type|Description|Available Version| |----|----|-----------|-----------------| |`ciId`|Integer|The unique integer identifier of the parent configuration item that was queried.|66.0| |`records`|[CIComponent](#cicomponent)|An array of component configuration item objects for the current page.|66.0| ## CIComponent ### JSON example Each element in the `records` array is a component configuration item object. You can request the `id` field and any configuration item attributes by their developer name in the query. ```nolang { "id": 6899801, "SD_AsNa": "New Component", "SD_AsId": "AST6899801", "SD_CiOwGr": null } ``` ### Properties |Name|Type|Description|Available Version| |----|----|-----------|-----------------| |`id`|Integer|The unique integer identifier of the component configuration item.|66.0| |Attributes (by developer name)|String|Configuration item attribute you request in the `records` is returned with its developer name.|66.0| **note:** You can request any available configuration item attribute in the `records` selection by using its developer name (for example, `SD_AsNa`, `SD_OpSy`). The response includes only the fields you request. To learn more, see [CI Types and Attributes](https://developer.salesforce.com/docs/service/agentforce-it-service/graphql-api-agentic-it-service-canonical.md#ci-types-and-attributes). # Get Configuration Item Query a configuration item by its unique identifier. This operation returns detailed information for a single configuration item. ## Special Access Rules To query a configuration item, you must have the following user permissions: - IT Service Configuration Item Type Manager - IT Service Configuration Item Owner - IT Service Configuration Item Type Reader **See Also** - [REST API Developer Guide: sObject Basic Information](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_sobject_basic_info.htm) ## Request ### JSON example ```nolang query GetConfigurationItemById { getConfigurationItemById(id: 345672) { id SD_AsNa createdOn cnfgItemTags { type key keyId value valueId } cnfgItemTypeDef { isComponent developerName name } discoverySourceDetails { createdBySource firstDiscoveredBy firstDiscoveredOn lastDiscoveredBy lastDiscoveredOn lastDiscoveredSourceDetails { date source } } } } ``` ### Properties |Name|Type|Description|Required or Optional|Available Version| |----|----|-----------|--------------------|-----------------| |`id`|Integer|The unique identifier of the configuration item to retrieve.|Required|67.0| ## Response ### JSON example ```nolang { "data": { "getConfigurationItemById": { "id": 6460947, "createdOn": "1775194238352", "cnfgItemTags": { "type": "KEY_VALUE", "key": "searchtags", "keyId": 764952, "value": "s1", "valueId": 859952 }, "cnfgItemTypeDef": { "isComponent": false, "developerName": "SD_AwEcIn", "name": "AWS EC2 Instance" }, "discoverySourceDetails": { "createdBySource": "Aws", "firstDiscoveredBy": "Aws", "firstDiscoveredOn": 1765929600000, "lastDiscoveredBy": "Aws", "lastDiscoveredOn": 1765929600000, "lastDiscoveredSourceDetails": [ { "date": 1765929600000, "source": "Aws" } ] } } } } ``` ### Properties |Name|Type|Description|Available Version| |----|----|-----------|-----------------| |`createdOn`|String|The date and time the record was created.|67.0| |`cnfgItemTypeDef`|[CnfgItemTypeDef](#cnfgitemtypedef)|The configuration item type definition.|67.0| |`discoverySourceDetails`|[DiscoverySourceDetails](#discoverysourcedetails)|Information about sources that have discovered this configuration item and when.|67.0| |`id`|Integer|The unique integer identifier of the configuration item.|67.0| |`lastModifiedOn`|String|The date and time the record was last updated.|67.0| ## CnfgItemTags Configuration item tags returned when requested in the query. ### Properties |Name|Type|Description|Available Version| |----|----|-----------|-----------------| |`key`|BigInteger|The tag key name.|67.0| |`keyId`|BigInteger|The unique identifier of the tag key.|67.0| |`type`|String|The tag type: `KEY_VALUE` (key and value) or `KEY_ONLY` (key only).|67.0| |`value`|String|The tag value. This field is null for `KEY_ONLY` tags.|67.0| |`valueId`|String|The unique identifier of the tag value. This field is null for `KEY_ONLY` tags.|67.0| ## CnfgItemTypeDef Configuration item type definition returned when requested in the query. ### Properties |Name|Type|Description|Available Version| |----|----|-----------|-----------------| |`isComponent`|Boolean|Indicates whether the configuration item type is a component type (`true`) or not (`false`).|67.0| |`developerName`|String|The developer name of the configuration item type. To retrieve the list of available CI type developer names programmatically, query the [CnfgItemTypeDef](https://developer.salesforce.com/docs/tooling-apis/tooling-api-objects-cnfgitemtypedef.md) object.|67.0| |`name`|String|The display name of the configuration item type.|67.0| ## DiscoverySourceDetails Contains information about sources that have discovered this configuration item, along with the date and time of discovery. ### Properties |Name|Type|Description|Available Version| |----|----|-----------|-----------------| |`createdBySource`|String|The source that created the configuration item.|67.0| |`firstDiscoveredBy`|String|The source that first discovered the configuration item.|67.0| |`firstDiscoveredOn`|Integer|The date and time when the configuration item was first discovered (milliseconds since epoch).|67.0| |`lastDiscoveredBy`|String|The source that last discovered the configuration item.|67.0| |`lastDiscoveredOn`|Integer|The date and time when the configuration item was last discovered (milliseconds since epoch).|67.0| |`lastDiscoveredSourceDetails`|[LastDiscoveredSourceDetails](#lastdiscoveredsourcedetails)[]|List of discovery events with date and source.|67.0| ## LastDiscoveredSourceDetails Each element in the `lastDiscoveredBySource` array contains the following fields. ### Properties |Name|Type|Description|Available Version| |----|----|-----------|-----------------| |`date`|Integer|The date and time when the configuration item was last discovered by this source (milliseconds since epoch).|67.0| |`source`|String|The source that performed the discovery.|67.0| When using the `getConfigurationItemById` operation, you can request any available attribute to be included in the response. The attributes you can include: - Standard Attributes—Attributes are available out-of-the-box. - Custom Attributes—Create and include custom attributes using the sObject API. Add any attribute using its Developer Name. For example, `SD_AsNa`—Asset Name, to specify exactly which information you want to receive for your Configuration Items (CIs). # Get Configuration Item History Perform a paginated retrieval of the audit trail for a specific configuration item. Returns a list of changes, including field-level modifications, timestamps, and user information. ## Special Access Rules To query a configuration item history, you must have the following user permissions: - IT Service Configuration Item Type Manager - IT Service Configuration Item Owner - IT Service Configuration Item Type Reader ## Request ### JSON example This example shows a sample request to retrieve the history of a specific configuration item. ```nolang query GetConfigurationItemHistory { getConfigurationItemHistory( input: { id: "6780001" filters: [{ filterKey: TIME, fromValue: "1768545221848", operator: LESS_THAN_OR_EQUAL }, { filterKey: OPERATION_TYPE, toValue: "EDIT", operator: CONTAINS }] pageNumber: 0 pageSize: 10 sort: { sortKey: OPERATION_TYPE, sortOrder: DESC } } ) { totalRecords cnfgItemAuditRecords { modifiedRecordId modifiedByUserId attributeChanges { attributeName originalValue modifiedValue } modifiedAttributes operationType userName valid time auditRecordId module parentConfigurationItemId } } } ``` ### Properties |Name|Type|Description|Required or Optional|Available Version| |----|----|-----------|--------------------|-----------------| |`id`|Integer|The unique identifier of the Configuration Item record whose history is to be retrieved.|Required|67.0| |`filters`|[Filters](#filters-properties)|List of filters.|Optional|67.0| |`sort`|[Sort](#sort-properties)|Sort criteria.|Optional|67.0| |`pageNumber`|Integer|The count of pages to return for results pagination.|Optional|67.0| |`pageSize`|Integer|The maximum number of history records to return in each page.|Optional|67.0| ## Filters Properties Use Filters to filter audit results. |Name|Type|Description|Required or Optional|Available Version| |----|----|-----------|--------------------|-----------------| |`filterKey`|String|The field to filter by. Valid values are:
  • `TIME`
  • `OPERATION_TYPE`
|Required|67.0| |`operator`|String|The comparison operator to use for filtering. Valid values are:
  • `EQUALS`—Matches a single exact value. Use with exactly one value in the values array.
  • `NOT_EQUALS`—Does not match a single exact value. Use with exactly one value in the values array.
  • `CONTAINS`—Matches if the field contains the specified value. Use with exactly one value in the values array.
  • `NOT_CONTAINS`—Matches if the field does not contain the specified value. Use with exactly one value in the values array.
  • `GREATER_THAN`—Matches if the field value is greater than the specified value. Use with exactly one value in the values array.
  • `GREATER_THAN_OR_EQUAL`—Matches if the field value is greater than or equal to the specified value. Use with exactly one value in the values array.
  • `LESS_THAN`—Matches if the field value is less than the specified value. Use with exactly one value in the values array.
  • `LESS_THAN_OR_EQUAL`—Matches if the field value is less than or equal to the specified value. Use with exactly one value in the values array.
  • `IS_BETWEEN`—Matches if the field value is between two specified values (inclusive). Use with exactly two values in the values array.
  • `NOT_BETWEEN`—Matches if the field value is not between two specified values (inclusive). Use with exactly two values in the values array.
|Required|67.0| |`fromValue`|String|First value of the `filterKey`.|Required|67.0| |`toValue`|String|Second value of the `filterKey`. Required if the `FilterOperator` requires two values.|Optional|67.0| |`value`|String|Filter value for single-value operators.|Optional|67.0| ## Sort Properties Use SortCriteria to specify how search results should be ordered. |Name|Type|Description|Required or Optional|Available Version| |----|----|-----------|--------------------|-----------------| |`sortKey`|String|The field name to use for sorting the search results.
  • `TIME`
  • `OPERATION_TYPE`
|Required|67.0| |`sortOrder`|String|The sort direction for the results. Valid values are:
  • `ASC`
  • `DESC`
|Required|67.0| ## Response ### JSON example This example is a sample response from the `getConfigurationItemHistory` query. ```nolang { "data": { "getConfigurationItemHistory": { "totalRecords": 7, "cnfgItemAuditRecords": [ { "modifiedRecordId": "6780001", "modifiedByUserId": "470701", "attributeChanges": [ { "attributeName": "Status", "modifiedValue": "In Build", "originalValue": "" }, { "attributeName": "IP Address", "modifiedValue": "192.168.172.45", "originalValue": "" }, { "attributeName": "Approval State", "modifiedValue": "Awaiting Approval", "originalValue": "" } ], "modifiedAttributes": [], "operationType": "EDIT_CMDBCI", "userName": "00Dxx00J5TkgqCi 00Dxx00J5TkgqCi", "valid": true, "time": 1768305455444, "auditRecordId": "36051312", "module": "CMDBCI", "parentConfigurationItemId": "6780001" }, { "modifiedRecordId": "6780001", "modifiedByUserId": "470701", "attributeChanges": [ { "attributeName": "Status", "modifiedValue": "In Test", "originalValue": "In Build" } ], "modifiedAttributes": [], "operationType": "EDIT_CMDBCI", "userName": "00Dxx00J5TkgqCi 00Dxx00J5TkgqCi", "valid": true, "time": 1768306294383, "id": "36056961", "module": "CMDBCI", "parentConfigurationItemId": "6780001" } ] } } } ``` ### CnfgItemAuditRecords |Field|Type|Description|Available Version| |-----|----|-----------|-----------------| |`auditRecordId`|ID|The unique identifer of the audit record.|67.0| |`modifiedRecordId`|ID|The unique identifier of the object that was modified.|67.0| |`parentConfigurationItemId`|ID|The unique identifier of the parent object.|67.0| |`operationType`|String|The operation type.|67.0| |`modifiedByUserId`|String|The unique identifier of the user who performed the update.|67.0| |`modifiedOn`|BigInterger|The date and time the object was last updated.|67.0| |`attributeChanges`|[List](#auditrecorddetails)|The list of attributes updated.|67.0| |`modifiedAttributes`|[List](#auditrecorddetails)|The list of updated attribute instances.|67.0| ### AuditRecordDetails |Field|Type|Description|Available Version| |-----|----|-----------|-----------------| |`attributeName`|Boolean|The name of the updated attribute.|67.0| |`originalValue`|String|The original value before an update was performed.|67.0| |`modifiedValue`|String|The value after an update was performed.|67.0| ### Properties |Name|Type|Description|Available Version| |----|----|-----------|-----------------| |`cnfgItemAuditRecords`|[CnfgItemAuditRecords](#cnfgitemauditrecords)|List of changes to the Configuration Item record.|67.0| |`totalRecords`|Integer|The total number of records that match the filter criteria across all pages, regardless of pagination.|67.0| # Get Configuration Item History Perform a paginated retrieval of the audit trail for a specific configuration item. Returns a list of changes, including field-level modifications, timestamps, and user information. ## Special Access Rules To query a configuration item history, you must have the following user permissions: - IT Service Configuration Item Type Manager - IT Service Configuration Item Owner - IT Service Configuration Item Type Reader ## Request ### JSON example This example shows a sample request to retrieve the history of a specific configuration item. ```nolang query GetCIHistory { getCIHistory( input: { ciId: "6780001" filters: [{ filterKey: TIME, value1: "1768545221848", operator: LESS_THAN_OR_EQUAL }, { filterKey: OPERATION_TYPE, value1: "EDIT", operator: CONTAINS }] pageNumber: 0 pageSize: 10 sort: { sortKey: OPERATION_TYPE, sortOrder: DESC } } ) { totalRecords auditRecords { commentCount entityId userId parameters { propertyName oldValue newValue } propertyInstanceChanges operationType userName valid time id module parentEntityId } } } ``` ### Properties |Name|Type|Description|Required or Optional|Available Version| |----|----|-----------|--------------------|-----------------| |`id`|Integer|The unique identifier of the Configuration Item record whose history is to be retrieved.|Required|66.0| |`filters`|[CIHistoryFilterCriteria](#filtercriteria-properties)[]|List of filters.|Optional|66.0| |`sort`|[CIHistorySortCriteria](#sortcriteria-properties)|Sort criteria.|Optional|66.0| |`pageNumber`|Integer|The count of pages to return for results pagination.|Optional|66.0| |`pageSize`|Integer|The maximum number of history records to return in each page.|Optional|66.0| ## FilterCriteria Properties Use FilterCriteria to filter audit results. |Name|Type|Description|Required or Optional|Available Version| |----|----|-----------|--------------------|-----------------| |`filterKey`|`CIHistoryFilterKey` (enumeration)|The field to filter by. Valid values are:
  • `TIME`
  • `OPERATION_TYPE`
|Required|66.0| |`operator`|`FilterOperator` (enumeration)|The comparison operator to use for filtering. Valid values are:
  • `EQUALS`—Matches a single exact value. Use with exactly one value in the values array.
  • `NOT_EQUALS`—Does not match a single exact value. Use with exactly one value in the values array.
  • `CONTAINS`—Matches if the field contains the specified value. Use with exactly one value in the values array.
  • `NOT_CONTAINS`—Matches if the field does not contain the specified value. Use with exactly one value in the values array.
  • `GREATER_THAN`—Matches if the field value is greater than the specified value. Use with exactly one value in the values array.
  • `GREATER_THAN_OR_EQUAL`—Matches if the field value is greater than or equal to the specified value. Use with exactly one value in the values array.
  • `LESS_THAN`—Matches if the field value is less than the specified value. Use with exactly one value in the values array.
  • `LESS_THAN_OR_EQUAL`—Matches if the field value is less than or equal to the specified value. Use with exactly one value in the values array.
  • `IS_BETWEEN`—Matches if the field value is between two specified values (inclusive). Use with exactly two values in the values array.
  • `NOT_BETWEEN`—Matches if the field value is not between two specified values (inclusive). Use with exactly two values in the values array.
|Required|66.0| |`value1`|String|First value of the filterKey.|Required|66.0| |`value2`|String|Second value of the filterKey. Required if the FilterOperator requires two values.|Optional|66.0| ## SortCriteria Properties Use SortCriteria to specify how search results should be ordered. |Name|Type|Description|Required or Optional|Available Version| |----|----|-----------|--------------------|-----------------| |`sortKey`|`CIHistoryFilterKey`|The field name to use for sorting the search results.|Required|66.0| |`sortOrder`|`SortOrder`|The sort direction for the results. Valid values are:
  • ASC—Ascending
  • DESC—Descending
|Required|66.0| ## Response ### JSON example This example is a sample response from the `getCIHistory` query. ```nolang { "data": { "getCIHistory": { "totalRecords": 7, "auditRecords": [ { "commentCount": 0, "entityId": "6780001", "userId": "470701", "parameters": [ { "propertyName": "Status", "oldValue": "", "newValue": "In Build" }, { "propertyName": "IP Address", "oldValue": "", "newValue": "192.168.172.45" }, { "propertyName": "Approval State", "oldValue": "", "newValue": "Awaiting Approval" } ], "propertyInstanceChanges": [], "operationType": "EDIT_CMDBCI", "userName": "00Dxx00J5TkgqCi 00Dxx00J5TkgqCi", "valid": true, "time": 1768305455444, "id": "36051312", "module": "CMDBCI", "parentEntityId": "6780001" }, { "commentCount": 0, "entityId": "6780001", "userId": "470701", "parameters": [ { "propertyName": "Status", "oldValue": "In Build", "newValue": "In Test" } ], "propertyInstanceChanges": [], "operationType": "EDIT_CMDBCI", "userName": "00Dxx00J5TkgqCi 00Dxx00J5TkgqCi", "valid": true, "time": 1768306294383, "id": "36056961", "module": "CMDBCI", "parentEntityId": "6780001" }, { "commentCount": 0, "entityId": "6780001", "userId": "470701", "parameters": [ { "propertyName": "Approval State", "oldValue": "Awaiting Approval", "newValue": "Approved" } ], "propertyInstanceChanges": [], "operationType": "EDIT_CMDBCI", "userName": "00Dxx00J5TkgqCi 00Dxx00J5TkgqCi", "valid": true, "time": 1768306278954, "id": "36057001", "module": "CMDBCI", "parentEntityId": "6780001" }, { "commentCount": 0, "entityId": "6780001", "userId": "470701", "parameters": [ { "propertyName": "Operating System", "oldValue": "", "newValue": "os123" } ], "propertyInstanceChanges": [], "operationType": "EDIT_CMDBCI", "userName": "00Dxx00J5TkgqCi 00Dxx00J5TkgqCi", "valid": true, "time": 1768306507193, "id": "36057003", "module": "CMDBCI", "parentEntityId": "6780001" }, { "commentCount": 0, "entityId": "6780001", "userId": "470701", "parameters": [ { "propertyName": "Status", "oldValue": "In Test", "newValue": "In Use" } ], "propertyInstanceChanges": [], "operationType": "EDIT_CMDBCI", "userName": "00Dxx00J5TkgqCi 00Dxx00J5TkgqCi", "valid": true, "time": 1768306528084, "id": "36057004", "module": "CMDBCI", "parentEntityId": "6780001" }, { "commentCount": 0, "entityId": "6780001", "userId": "470701", "parameters": [ { "propertyName": "Approval State", "oldValue": "Approved", "newValue": "Rejected" } ], "propertyInstanceChanges": [], "operationType": "EDIT_CMDBCI", "userName": "00Dxx00J5TkgqCi 00Dxx00J5TkgqCi", "valid": true, "time": 1768306286136, "id": "36057101", "module": "CMDBCI", "parentEntityId": "6780001" }, { "commentCount": 0, "entityId": "6780001", "userId": "470701", "parameters": [ { "propertyName": "Description", "oldValue": "", "newValue": "good" } ], "propertyInstanceChanges": [], "operationType": "EDIT_CMDBCI", "userName": "00Dxx00J5TkgqCi 00Dxx00J5TkgqCi", "valid": true, "time": 1768306518034, "id": "36057301", "module": "CMDBCI", "parentEntityId": "6780001" } ] } } } ``` ### Properties |Name|Type|Description|Available Version| |----|----|-----------|-----------------| |`totalRecords`|Integer|The total number of records that match the filter criteria across all pages, regardless of pagination.|66.0| |`auditRecords`|`[AuditRecord]`|List of changes to the Configuration Item record. Each object contains these fields:
  • `id` (ID): Row ID of that record.
  • `time` (Int): Timestamp of that change.
  • `parameters` ([ParameterObject]): Array of changes.
  • `operationType` (String): Type of operation.
  • `entityId` (String): CI ID.
  • `userId` (String): User ID who performed the change.
|66.0| # Get Configuration Item Relationship Retrieves detailed information about all configuration item (CI) relationships by using the unique identifier of a CI record. ## Special Access Rules To query a configuration item relationship, you must have the following user permissions: - IT Service Configuration Item Type Manager - IT Service Configuration Item Owner - IT Service Configuration Item Type Reader ## Request ### JSON example This example is a sample request to retrieve all relationships for a specific configuration item. ```nolang query GetCnfgItemRelationships { getCnfgItemRelationships(id: "6545401") { createdOn developerName id relationshipType sourceConfigurationItemId sourceConfigurationItemName targetConfigurationItemId targetConfigurationItemName } } ``` ### Properties |Name|Type|Description|Required or Optional|Available Version| |----|----|-----------|--------------------|-----------------| |`id`|Integer|The unique identifier of the Configuration Item whose relationships are to be retrieved.|Required|67.0| ## Response ### JSON example This example is a sample response from the `getCnfgItemRelationships` query. ```nolang { "data": { "getCnfgItemRelationships": [ { "createdOn": "1775194238352", "developerName": "SD_AIFr", "id": "1175502", "relationshipType": "Allocated From", "sourceConfigurationItemId": "6545402", "sourceConfigurationItemName": "testingapplication2", "targetConfigurationItemId": "6545401", "targetConfigurationItemName": "testingbase2" } ] } } ``` ### Properties |Name|Type|Description|Available Version| |----|----|-----------|-----------------| |`createdOn`|String|The date and time the record was created.|68.0| |`developerName`|String|Developer name of the configuration item.|67.0| |`id`|Integer|Unique ID of this relationship record.|67.0| |`relationshipType`|String|Name of the relationship type.|67.0| |`sourceConfigurationItemId`|Integer|ID of the parent configuration item.|67.0| |`sourceConfigurationItemName`|String|Display name of the parent configuration item.|67.0| |`targetConfigurationItemId`|int|ID of the child configuration item.|67.0| |`targetConfigurationItemName`|String|Display name of the child configuration item.|67.0| # Get Configuration Item Relationship Retrieves detailed information about all configuration item (CI) relationships by using the unique identifier of a CI record. ## Special Access Rules To query a configuration item relationship, you must have the following user permissions: - IT Service Configuration Item Type Manager - IT Service Configuration Item Owner - IT Service Configuration Item Type Reader ## Request ### JSON example This example is a sample request to retrieve all relationships for a specific configuration item. ```nolang query GetCIRelationships { getCIRelationships(id: "6545401") { createdOn developerName id relation source sourceName target targetName } } ``` ### Properties |Name|Type|Description|Required or Optional|Available Version| |----|----|-----------|--------------------|-----------------| |`id`|String|The unique identifier of the Configuration Item whose relationships are to be retrieved.|Required|66.0| ## Response ### JSON example This example is a sample response from the `getCIRelationships` query. ```nolang { "data": { "getCIRelationships": [ { "createdOn": "1775194238352", "developerName": "SD_AIFr", "id": "1175502", "relation": "Allocated From", "source": "6545402", "sourceName": "testingapplication2", "target": "6545401", "targetName": "testingbase2" } ] } } ``` ### Properties |Name|Type|Description|Available Version| |----|----|-----------|-----------------| |`createdOn`|String|The date and time the record was created.|68.0| |`developerName`|String|Developer name of the configuration item.|66.0| |`id`|Integer|Unique ID of this relationship record.|66.0| |`relation`|String|Name of the relationship type.|66.0| |`source`|Integer|ID of the parent configuration item.|66.0| |`sourceName`|String|Display name of the parent configuration item.|66.0| |`target`|int|ID of the child configuration item.|66.0| |`targetName`|String|Display name of the child configuration item.|66.0| # Get Configuration Item Tags Retrieve Returns a paginated list of configuration item (CI) tags. Tags are of type `KEY_VALUE` (key and value) or` KEY_ONLY` (key only). ## Special Access Rules To query configuration item tags, you must have the following user permissions: - IT Service Configuration Item Type Manager - IT Service Configuration Item Owner - IT Service Configuration Item Type Reader ## Request ### JSON example This example shows a sample request to get configuration item tags. ```nolang query GetAllConfigurationItemTags { getAllConfigurationItemTags( input: { pageSize: 10 } ) { cnfgItemTags { type key keyId valueId value } pageSize nextPageCursor hasMoreTags } } ``` ### Properties |Name|Type|Description|Required or Optional|Available Version| |----|----|-----------|--------------------|-----------------| |`input`|[GetAllConfigurationItemTagsInput](#getalltagsinput)|The pagination parameters used to retrieve configuration item (CI) tags.|Required|67.0| ## GetAllTagsInput ### Properties |Name|Type|Description|Required or Optional|Available Version| |----|----|-----------|--------------------|-----------------| |`nextPageCursor`|String|The pagination cursor. Omit this field or set it to `null` to retrieve the first page. To retrieve subsequent pages, specify the `nextPointer` value returned in the previous response.|Optional|67.0| |`pageSize`|Integer|The number of tags to return per page. Defaults to `10` if not specified. Valid values are `1` through `200`.|Optional|67.0| ## Response ### JSON example This example is a sample response from the `getAllConfigurationItemTags` query. ```nolang { "data": { "getAllConfigurationItemTags": { "cnfgItemTags": [ { "type": "KEY_VALUE", "key": "Environment", "keyId": 764952, "value": "Production", "valueId": 859952 }, { "type": "KEY_ONLY", "key": "Critical", "keyId": 764953, "value": null, "valueId": null } ], "pageSize": 10, "nextPageCursor": "539953", "hasMoreTags": true } } } ``` ### Properties |Name|Type|Description|Available Version| |----|----|-----------|-----------------| |`hasMoreTags`|Boolean|Indicates whether more tags are available (`true`) or not (`false`).|67.0| |`nextPageCursor`|String|The cursor for retrieving the next page of results. This field is `null` when no additional pages are available.|67.0| |`pageSize`|Integer|The number of tags per page.|67.0| |`totalTags`|Integer|The total number of tags.|67.0| ## CnfgItemTags Configuration item tags returned when requested in the query. ### Properties |Name|Type|Description|Available Version| |----|----|-----------|-----------------| |`key`|BigInteger|The tag key name.|67.0| |`keyId`|BigInteger|The unique identifier of the tag key.|67.0| |`type`|String|The tag type: `KEY_VALUE` (key and value) or `KEY_ONLY` (key only).|67.0| |`value`|String|The tag value. This field is null for `KEY_ONLY` tags.|67.0| |`valueId`|String|The unique identifier of the tag value. This field is null for `KEY_ONLY` tags.|67.0| # Get Configuration Item Tags Retrieve Returns a paginated list of configuration item (CI) tags. Tags can be of type `KEY_VALUE` (key and value) or`KEY_ONLY` (key only). ## Special Access Rules To query configuration item tags, you must have the following user permissions: - IT Service Configuration Item Type Manager - IT Service Configuration Item Owner - IT Service Configuration Item Type Reader ## Request ### JSON example This example shows a sample request to get configuration item tags. ```nolang query GetAllConfigurationItemTags { getAllConfigurationItemTags( input: { pageSize: 10 } ) { pageSize nextPointer hasMore ciTags { type key keyId valueId value } } } ``` ### Properties |Name|Type|Description|Required or Optional|Available Version| |----|----|-----------|--------------------|-----------------| |`input`|[GetAllTagsInput](#getalltagsinput)|The pagination parameters used to retrieve configuration item (CI) tags.|Required|67.0| ## GetAllTagsInput ### Properties |Name|Type|Description|Required or Optional|Available Version| |----|----|-----------|--------------------|-----------------| |`nextPointer`|String|The pagination cursor. Omit this field or set it to `null` to retrieve the first page. To retrieve subsequent pages, specify the `nextPointer` value returned in the previous response.|Optional|67.0| |`pageSize`|Integer|The number of tags to return per page. Defaults to `10` if not specified. Valid values are `1` through `200`.|Optional|67.0| ## Response ### JSON example This example is a sample response from the `getAllConfigurationItemTags` query. ```nolang { "data": { "getAllTags": { "ciTags": [ { "type": "KEY_VALUE", "key": "Environment", "keyId": 764952, "valueId": 859952, "value": "Production" }, { "type": "KEY_ONLY", "key": "Critical", "keyId": 764953, "valueId": null, "value": null } ], "pageSize": 10, "nextPointer": "539953", "hasMore": true } } } ``` ### Properties |Name|Type|Description|Available Version| |----|----|-----------|-----------------| |`hasMore`|Boolean|Indicates whether more pages of tags are available after this page (`true`) or not (`false`).|67.0| |`nextPointer`|String|The cursor for retrieving the next page of results. This field is `null` when no additional pages are available.|67.0| |`pageSize`|Integer|The page size applied to this response.|67.0| ## CnfgItemTags Configuration item tags returned when requested in the query. ### Properties |Name|Type|Description|Available Version| |----|----|-----------|-----------------| |`key`|BigInt|The tag key name.|67.0| |`keyId`|BigInt|The unique identifier of the tag key.|67.0| |`type`|String|The tag type: `KEY_VALUE` (key and value) or `KEY_ONLY` (key only).|67.0| |`value`|String|The tag value. This field is null for KEY_ONLY tags.|67.0| |`valueId`|String|The unique identifier of the tag value. This field is null for KEY_ONLY tags.|67.0| # Get Current Time Gets the current time for a given time zone. This action is available in API version 65.0 and later. ## Supported REST HTTP Methods **URI:** `/services/data/vXX.X/actions/standard/getCurrentTime` Where `XX.X` is the latest API version. **Formats:** JSON, XML **HTTP Methods:** POST **Authentication:** `Authorization: Bearer TOKEN` Where `TOKEN` is a variable. ## Inputs |Input|Type|Description| |-----|----|-----------| |`timeZone`|string|Optional. The text representation of the time zone.| ## Outputs |Output|Type|Description| |------|----|-----------| |`currentTime`|string|The current time in the given time zone.| ## Example Sample request body: ```nolang { "inputs" : [{ "timeZone" : "America/Los_Angeles" }] } ``` Sample response body: ```nolang { "actionName" : "getCurrentTime", "errors" : null, "isSuccess" : true, "outputValues" : { "currentTime" : "2025-02-24 14:30:15" } } ``` # Get Deployment Configuration Details in Custom Lightning Web Components Use code snippets to get Enhanced Web Chat deployment details in your custom Lightning web components. ## language To get the language code for your client, use the following snippet in your custom component. ### Example ```javascript const language = this.configuration.language; ``` ## termsAndConditions To get the Terms and Conditions settings for your client, use the following snippet in your custom component. ### Example ```javascript if (this.configuration.termsAndConditions.isTermsAndConditionsEnabled) { const isTermsAndConditionsRequired = this.configuration.termsAndConditions .isTermsAndConditionsRequired; const termsAndConditionsLabel = this.configuration.termsAndConditions.label; } ``` ## customLabels To get the customized labels in Embedded Service deployment setup in the language configured on the client, use the following snippet in your custom component. This example shows how to get the customized label for End Conversation Header text. ### Example ```javascript const endConversationLabelObj = this.configuration.customLabels.filter( (label) => label.sectionName === "EmbeddedMessagingChatHeader" && label.labelName === "CloseConversation", )[0] || {}; const endConversationLabel = endConversationLabelObj.labelValue || "End Conversation"; ``` # Get Dummy Service Resource Show your users the dummy resource and its availability based on the selected work type group and service territory. 1. Create a page to show your users dummy service resources. 2. Make a `POST` request on the [`getAppointmentCandidates`](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/requests_ls_getappointmentcandidates.htm) REST API by passing the required `workTypeGroupId` and `territoryIds` parameters. Set `allowConcurrentScheduling` to `true` to get concurrent time slots for the dummy resource. **note:** Specify the operating hour scheduling policy ID to show only the dummy resource who’s defined with operating hours for concurrent scheduling. See [Configure Scheduling Policy to Enforce Operating Hours](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc11-assign-scheduling-policy-to-dummy-resource.md). **Resource URI** ```nolang https://YOUR_INSTANCE.salesforce.com/services/data/v68.0/scheduling/getAppointmentCandidates ``` Where `YOUR_INSTANCE` is a variable. **Sample Request** ```nolang { "startTime": "2022-10-01T00:00:00.000Z", "endTime": "2022-10-08T20:00:00.000Z", "allowConcurrentScheduling": true, "schedulingPolicyId": "0VrS7000000004XKAQ", "filterByResources": [ "0HnS70000004EFyKAM" ], "workTypeGroupId": "0VSS70000004DvWOAU", "territoryIds": [ "0HhS70000004F9zKAE" ] } ``` **Sample Response** The API returns the service resources and available time slots. ```nolang { "candidates": [ { "endTime": "2022-10-03T16:30:00.000+0000", "resources": [ "0HnS70000004EFyKAM" ], "startTime": "2022-10-03T16:00:00.000+0000", "territoryId": "0HhS70000004F9zKAE" }, { "endTime": "2022-10-03T17:00:00.000+0000", "resources": [ "0HnS70000004EFyKAM" ], "startTime": "2022-10-03T16:30:00.000+0000", "territoryId": "0HhS70000004F9zKAE" }, { "endTime": "2022-10-03T17:30:00.000+0000", "resources": [ "0HnS70000004EFyKAM" ], "startTime": "2022-10-03T17:00:00.000+0000", "territoryId": "0HhS70000004F9zKAE" }, { "endTime": "2022-10-03T18:00:00.000+0000", "resources": [ "0HnS70000004EFyKAM" ], "startTime": "2022-10-03T17:30:00.000+0000", "territoryId": "0HhS70000004F9zKAE" }, { "endTime": "2022-10-03T18:30:00.000+0000", "resources": [ "0HnS70000004EFyKAM" ], "startTime": "2022-10-03T18:00:00.000+0000", "territoryId": "0HhS70000004F9zKAE" }, { "endTime": "2022-10-03T19:00:00.000+0000", "resources": [ "0HnS70000004EFyKAM" ], "startTime": "2022-10-03T18:30:00.000+0000", "territoryId": "0HhS70000004F9zKAE" }, { "endTime": "2022-10-03T19:30:00.000+0000", "resources": [ "0HnS70000004EFyKAM" ], "startTime": "2022-10-03T19:00:00.000+0000", "territoryId": "0HhS70000004F9zKAE" }, { "endTime": "2022-10-03T20:00:00.000+0000", "resources": [ "0HnS70000004EFyKAM" ], "startTime": "2022-10-03T19:30:00.000+0000", "territoryId": "0HhS70000004F9zKAE" }, { "endTime": "2022-10-03T20:30:00.000+0000", "resources": [ "0HnS70000004EFyKAM" ], "startTime": "2022-10-03T20:00:00.000+0000", "territoryId": "0HhS70000004F9zKAE" }, { "endTime": "2022-10-03T21:00:00.000+0000", "resources": [ "0HnS70000004EFyKAM" ], "startTime": "2022-10-03T20:30:00.000+0000", "territoryId": "0HhS70000004F9zKAE" }, { "endTime": "2022-10-03T21:30:00.000+0000", "resources": [ "0HnS70000004EFyKAM" ], "startTime": "2022-10-03T21:00:00.000+0000", "territoryId": "0HhS70000004F9zKAE" }, { "endTime": "2022-10-03T22:00:00.000+0000", "resources": [ "0HnS70000004EFyKAM" ], "startTime": "2022-10-03T21:30:00.000+0000", "territoryId": "0HhS70000004F9zKAE" }, { "endTime": "2022-10-03T22:30:00.000+0000", "resources": [ "0HnS70000004EFyKAM" ], "startTime": "2022-10-03T22:00:00.000+0000", "territoryId": "0HhS70000004F9zKAE" }, { "endTime": "2022-10-03T23:00:00.000+0000", "resources": [ "0HnS70000004EFyKAM" ], "startTime": "2022-10-03T22:30:00.000+0000", "territoryId": "0HhS70000004F9zKAE" }, { "endTime": "2022-10-03T23:30:00.000+0000", "resources": [ "0HnS70000004EFyKAM" ], "startTime": "2022-10-03T23:00:00.000+0000", "territoryId": "0HhS70000004F9zKAE" }, { "endTime": "2022-10-04T00:00:00.000+0000", "resources": [ "0HnS70000004EFyKAM" ], "startTime": "2022-10-03T23:30:00.000+0000", "territoryId": "0HhS70000004F9zKAE" }, { "endTime": "2022-10-04T00:30:00.000+0000", "resources": [ "0HnS70000004EFyKAM" ], "startTime": "2022-10-04T00:00:00.000+0000", "territoryId": "0HhS70000004F9zKAE" }, { "endTime": "2022-10-04T01:00:00.000+0000", "resources": [ "0HnS70000004EFyKAM" ], "startTime": "2022-10-04T00:30:00.000+0000", "territoryId": "0HhS70000004F9zKAE" }, { "endTime": "2022-10-04T01:30:00.000+0000", "resources": [ "0HnS70000004EFyKAM" ], "startTime": "2022-10-04T01:00:00.000+0000", "territoryId": "0HhS70000004F9zKAE" }, { "endTime": "2022-10-04T02:00:00.000+0000", "resources": [ "0HnS70000004EFyKAM" ], "startTime": "2022-10-04T01:30:00.000+0000", "territoryId": "0HhS70000004F9zKAE" }, { "endTime": "2022-10-04T02:30:00.000+0000", "resources": [ "0HnS70000004EFyKAM" ], "startTime": "2022-10-04T02:00:00.000+0000", "territoryId": "0HhS70000004F9zKAE" }, { "endTime": "2022-10-04T03:00:00.000+0000", "resources": [ "0HnS70000004EFyKAM" ], "startTime": "2022-10-04T02:30:00.000+0000", "territoryId": "0HhS70000004F9zKAE" }, { "endTime": "2022-10-04T03:30:00.000+0000", "resources": [ "0HnS70000004EFyKAM" ], "startTime": "2022-10-04T03:00:00.000+0000", "territoryId": "0HhS70000004F9zKAE" }, { "endTime": "2022-10-04T04:00:00.000+0000", "resources": [ "0HnS70000004EFyKAM" ], "startTime": "2022-10-04T03:30:00.000+0000", "territoryId": "0HhS70000004F9zKAE" }, { "endTime": "2022-10-04T16:30:00.000+0000", "resources": [ "0HnS70000004EFyKAM" ], "startTime": "2022-10-04T16:00:00.000+0000", "territoryId": "0HhS70000004F9zKAE" }, { "endTime": "2022-10-04T17:00:00.000+0000", "resources": [ "0HnS70000004EFyKAM" ], "startTime": "2022-10-04T16:30:00.000+0000", "territoryId": "0HhS70000004F9zKAE" }, { "endTime": "2022-10-04T17:30:00.000+0000", "resources": [ "0HnS70000004EFyKAM" ], "startTime": "2022-10-04T17:00:00.000+0000", "territoryId": "0HhS70000004F9zKAE" }, { "endTime": "2022-10-04T18:00:00.000+0000", "resources": [ "0HnS70000004EFyKAM" ], "startTime": "2022-10-04T17:30:00.000+0000", "territoryId": "0HhS70000004F9zKAE" }, { "endTime": "2022-10-04T18:30:00.000+0000", "resources": [ "0HnS70000004EFyKAM" ], "startTime": "2022-10-04T18:00:00.000+0000", "territoryId": "0HhS70000004F9zKAE" }, { "endTime": "2022-10-04T19:00:00.000+0000", "resources": [ "0HnS70000004EFyKAM" ], "startTime": "2022-10-04T18:30:00.000+0000", "territoryId": "0HhS70000004F9zKAE" }, { "endTime": "2022-10-04T19:30:00.000+0000", "resources": [ "0HnS70000004EFyKAM" ], "startTime": "2022-10-04T19:00:00.000+0000", "territoryId": "0HhS70000004F9zKAE" }, { "endTime": "2022-10-04T20:00:00.000+0000", "resources": [ "0HnS70000004EFyKAM" ], "startTime": "2022-10-04T19:30:00.000+0000", "territoryId": "0HhS70000004F9zKAE" }, { "endTime": "2022-10-04T20:30:00.000+0000", "resources": [ "0HnS70000004EFyKAM" ], "startTime": "2022-10-04T20:00:00.000+0000", "territoryId": "0HhS70000004F9zKAE" }, { "endTime": "2022-10-04T21:00:00.000+0000", "resources": [ "0HnS70000004EFyKAM" ], "startTime": "2022-10-04T20:30:00.000+0000", "territoryId": "0HhS70000004F9zKAE" }, { "endTime": "2022-10-04T21:30:00.000+0000", "resources": [ "0HnS70000004EFyKAM" ], "startTime": "2022-10-04T21:00:00.000+0000", "territoryId": "0HhS70000004F9zKAE" }, { "endTime": "2022-10-04T22:00:00.000+0000", "resources": [ "0HnS70000004EFyKAM" ], "startTime": "2022-10-04T21:30:00.000+0000", "territoryId": "0HhS70000004F9zKAE" }, { "endTime": "2022-10-04T22:30:00.000+0000", "resources": [ "0HnS70000004EFyKAM" ], "startTime": "2022-10-04T22:00:00.000+0000", "territoryId": "0HhS70000004F9zKAE" }, { "endTime": "2022-10-04T23:00:00.000+0000", "resources": [ "0HnS70000004EFyKAM" ], "startTime": "2022-10-04T22:30:00.000+0000", "territoryId": "0HhS70000004F9zKAE" }, { "endTime": "2022-10-04T23:30:00.000+0000", "resources": [ "0HnS70000004EFyKAM" ], "startTime": "2022-10-04T23:00:00.000+0000", "territoryId": "0HhS70000004F9zKAE" }, { "endTime": "2022-10-05T00:00:00.000+0000", "resources": [ "0HnS70000004EFyKAM" ], "startTime": "2022-10-04T23:30:00.000+0000", "territoryId": "0HhS70000004F9zKAE" }, { "endTime": "2022-10-05T00:30:00.000+0000", "resources": [ "0HnS70000004EFyKAM" ], "startTime": "2022-10-05T00:00:00.000+0000", "territoryId": "0HhS70000004F9zKAE" }, { "endTime": "2022-10-05T01:00:00.000+0000", "resources": [ "0HnS70000004EFyKAM" ], "startTime": "2022-10-05T00:30:00.000+0000", "territoryId": "0HhS70000004F9zKAE" }, { "endTime": "2022-10-05T01:30:00.000+0000", "resources": [ "0HnS70000004EFyKAM" ], "startTime": "2022-10-05T01:00:00.000+0000", "territoryId": "0HhS70000004F9zKAE" }, { "endTime": "2022-10-05T02:00:00.000+0000", "resources": [ "0HnS70000004EFyKAM" ], "startTime": "2022-10-05T01:30:00.000+0000", "territoryId": "0HhS70000004F9zKAE" }, { "endTime": "2022-10-05T02:30:00.000+0000", "resources": [ "0HnS70000004EFyKAM" ], "startTime": "2022-10-05T02:00:00.000+0000", "territoryId": "0HhS70000004F9zKAE" }, { "endTime": "2022-10-05T03:00:00.000+0000", "resources": [ "0HnS70000004EFyKAM" ], "startTime": "2022-10-05T02:30:00.000+0000", "territoryId": "0HhS70000004F9zKAE" }, { "endTime": "2022-10-05T03:30:00.000+0000", "resources": [ "0HnS70000004EFyKAM" ], "startTime": "2022-10-05T03:00:00.000+0000", "territoryId": "0HhS70000004F9zKAE" }, { "endTime": "2022-10-05T04:00:00.000+0000", "resources": [ "0HnS70000004EFyKAM" ], "startTime": "2022-10-05T03:30:00.000+0000", "territoryId": "0HhS70000004F9zKAE" } ] } ``` 3. Parse the JSON response, and show the dummy resource on a page that you created. Your users can select the dummy resource for the appointment. On the next page, you can show the appointment details for the user to review and create the appointment. # Get Engagement Channels An engagement channel is a medium, such as Phone, Video, and In Person that service resources use to meet customers. Before using engagement channels for scheduling appointments: - Enable engagement channels in the Salesforce Scheduler Settings of your instance. See [ Enable the Scheduling Appointments Using Engagement Channels Setting](https://help.salesforce.com/s/articleView?id=platform.ls_enable_schedule_appnt_using_engage_channels_setting.htm&type=5). - Set up engagement channels, including setting the required access and creating engagement channels. See [Engagement Channels](https://help.salesforce.com/s/articleView?id=platform.ls_engagement_channels.htm&type=5). - Create the Shift Engagement Channel and Engagement Channel Work Type records for the applicable shifts. - Define Shift Rules in the scheduling policy. See [Define Shift Rules in Scheduling Policy](https://help.salesforce.com/s/articleView?id=platform.ls_use_shifts_to_determine_time_slots.htm&type=5). 1. Create a page to show the engagement channel types. Salesforce Scheduler shows service resources and resource time slots based on the channel that a user selects when creating an appointment. 2. Make a `GET` request on the [`engagement-channel-types`](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_resources_engagement_channel_types.htm) Connect API. **Sample Request** Filter the engagement channel types by the `workTypeGroupId` selected in the previous step. ```nolang https://YOUR_INSTANCE.salesforce.com/services/data/v68.0/connect/scheduling​/engagement-channel-types?workTypeGroupIds=0VSS700000000sVOAQ ``` Where `YOUR_INSTANCE` is a variable. **note:** You can filter the engagement channel type results by `workTypeGroupIds` or `workTypeIds`. **Sample Response** The request returns the engagement channels for the `workTypeGroupId` specified in the request. ```nolang { "result": { "engagementChannelTypes": [ { "contactPointType": "InPerson", "id": "0eFS70000004CG5MAM", "name": "EngagementChannel1", "workTypeGroupIds": [ "0VSS700000000sVOAQ" ], "workTypeIds": [] }, { "contactPointType": "Video", "id": "0eFS70000004CGFMA2", "name": "EngagementChannel3", "workTypeGroupIds": [ "0VSS700000000sVOAQ" ], "workTypeIds": [] } ] } } ``` 3. Parse the JSON response, and show the engagement channel types on the page that you created. Your users can select an engagement channel type for the appointment from the page. # Get Engagement Channels An engagement channel is a medium, such as Phone, Video, and In Person that service resources use to meet customers. Before using engagement channels for scheduling appointments: - Enable engagement channels in the Salesforce Scheduler Settings of your instance. See [ Enable the Scheduling Appointments Using Engagement Channels Setting](https://help.salesforce.com/s/articleView?id=platform.ls_enable_schedule_appnt_using_engage_channels_setting.htm&type=5). - Set up engagement channels, including setting the required access and creating engagement channels. See [Engagement Channels](https://help.salesforce.com/s/articleView?id=platform.ls_engagement_channels.htm&type=5). - Create the Shift Engagement Channel and Engagement Channel Work Type records for the applicable shifts. - Define Shift Rules in the scheduling policy. See [Define Shift Rules in Scheduling Policy](https://help.salesforce.com/s/articleView?id=platform.ls_use_shifts_to_determine_time_slots.htm&type=5). 1. Create a page to show the engagement channel types. Salesforce Scheduler shows service resources and resource time slots based on the channel that a user selects when creating an appointment. 2. Make a `GET` request on the [`engagement-channel-types`](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_resources_engagement_channel_types.htm) Connect API. **Sample Request** Filter the engagement channel types by the `workTypeGroupId` selected in the previous step. ```nolang https://YOUR_INSTANCE.salesforce.com/services/data/v68.0/connect/scheduling​/engagement-channel-types?workTypeGroupIds=0VSS700000000sVOAQ ``` Where `YOUR_INSTANCE` is a variable. **note:** You can filter the engagement channel type results by `workTypeGroupIds` or `workTypeIds`. **Sample Response** The request returns the engagement channels for the `workTypeGroupId` specified in the request. ```nolang { "result" : { "engagementChannelTypes" : [ { "contactPointType" : "Video", "id" : "0eFS70000004CGAMA2", "name" : "EngagementChannel2", "workTypeGroupIds" : [ ], "workTypeIds" : [ ] }, { "contactPointType" : "InPerson", "id" : "0eFS70000004CG5MAM", "name" : "EngagementChannel1", "workTypeGroupIds" : [ ], "workTypeIds" : [ ] }, { "contactPointType" : "Video", "id" : "0eFS70000004CGFMA2", "name" : "EngagementChannel3", "workTypeGroupIds" : [ ], "workTypeIds" : [ ] } ] } } ``` 3. Parse the JSON response, and show the engagement channel types on the page that you created. Your users can select an engagement channel type for the appointment from the page. # Get Engagement Channels An engagement channel is a medium, such as Phone, Video, and In Person that service resources use to meet customers. Before using engagement channels for scheduling appointments: - Enable engagement channels in the Salesforce Scheduler Settings of your instance. See [ Enable the Scheduling Appointments Using Engagement Channels Setting](https://help.salesforce.com/s/articleView?id=platform.ls_enable_schedule_appnt_using_engage_channels_setting.htm&type=5). - Set up engagement channels, including setting the required access and creating engagement channels. See [Engagement Channels](https://help.salesforce.com/s/articleView?id=platform.ls_engagement_channels.htm&type=5). - Create the Shift Engagement Channel and Engagement Channel Work Type records for the applicable shifts. - Define Shift Rules in the scheduling policy. See [Define Shift Rules in Scheduling Policy](https://help.salesforce.com/s/articleView?id=platform.ls_use_shifts_to_determine_time_slots.htm&type=5). 1. Create a page to show the engagement channel types. Salesforce Scheduler shows service resources and resource time slots based on the channel that a user selects when creating an appointment. 2. Make a `GET` request on the [`engagement-channel-types`](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_resources_engagement_channel_types.htm) Connect API. **Sample Request** Filter the engagement channel types by the `workTypeGroupId` selected in the previous step. ```nolang https://YOUR_INSTANCE.salesforce.com/services/data/v68.0/connect/scheduling​/engagement-channel-types?workTypeGroupIds=0VSS700000000sVOAQ ``` Where `YOUR_INSTANCE` is a variable. **note:** You can filter the engagement channel type results by `workTypeGroupIds` or `workTypeIds`. **Sample Response** The request returns the engagement channels for the `workTypeGroupId` specified in the request. ```nolang { "result": { "engagementChannelTypes": [ { "contactPointType": "InPerson", "id": "0eFS70000004CG5MAM", "name": "EngagementChannel1", "workTypeGroupIds": [ "0VSS700000000sVOAQ" ], "workTypeIds": [] }, { "contactPointType": "Video", "id": "0eFS70000004CGFMA2", "name": "EngagementChannel3", "workTypeGroupIds": [ "0VSS700000000sVOAQ" ], "workTypeIds": [] } ] } } ``` 3. Parse the JSON response, and show the engagement channel types on the page that you created. Your users can select an engagement channel type for the appointment from the page. # Get Engagement Topics Retrieves a list of pairs from the engagement topics of the object ID (from the TopicId field) and its object name for the current messaging session. This action is available in API version 68.0 and later. ## Supported REST HTTP Methods **URI:** `/services/data/vXX.X/actions/standard/getEngagementTopics` Where `XX.X` is the latest API version. **Formats:** JSON, XML **HTTP Methods:** POST **Authentication:** `Authorization: Bearer TOKEN` Where `TOKEN` is a variable. ## Inputs |Input|Type|Description| |-----|----|-----------| |`salesforceInternal`|string|Optional. For internal use only.| ## Outputs |Output|Type|Description| |------|----|-----------| |`topicIdsAndObjectNames`|string|A list of pairs from the engagement topics of the object ID (from the TopicId field) and its object name for the current messaging session.| ## Example Sample request body: ```nolang { "inputs" : [{ "salesforceInternal" : "internal" }] } ``` Sample response body: ```nolang { "actionName" : "getEngagementTopics", "errors" : null, "isSuccess" : true, "outputValues" : { "topicIdsAndObjectNames" : "[{\"TopicId\":\"08pRZ0000008iPeYAI\",\"ObjectName\":\"ServiceAppointment\"},{\"TopicId\":\"02iRZ0000006AeDYAU\",\"ObjectName\":\"Asset\"}]" } } ``` # Get Field Service Object Field Retrieves the value of an object’s field according to the value of another field. Relevant for Field Service objects only. For example, returns the ID of a Scheduling Policy according to a specific policy’s name. This action is available in API version 65.0 and later. ## Supported REST HTTP Methods **URI:** `/services/data/vXX.X/actions/standard/getFieldServiceObjectProperty` Where `XX.X` is the latest API version. **Formats:** JSON, XML **HTTP Methods:** POST **Authentication:** `Authorization: Bearer TOKEN` Where `TOKEN` is a variable. ## Inputs |Input|Type|Description| |-----|----|-----------| |`objectName`|string|Required. The developer name of the Field Service object. For example, SchedulingPolicy.| |`fieldName`|string|Required. The name of the object’s field used to find the relevant object. For example Name.| |`fieldValue`|string|Required. The value of the specific field used to find the relevant object. For example, Customer First.| |`fieldToReturn`|string|Required. The name of the field whose value you want to return. For example, Id.| |`isCustomObject`|boolean|Required. Indicates whether the object is a custom object (`true`) or a standard object (`false`).| ## Outputs |Output|Type|Description| |------|----|-----------| |`fieldServiceStandardVariable`|string|Returns the value of an object’s field as an Apex object, which contains a `textValue`, `integerValue`, or `booleanValue`.| ## Example Sample request body: ```nolang { "inputs" : [{ "objectName" : "SchedulingPolicy", "fieldName" : "Name", "fieldValue" : "Customer First", "fieldToReturn" : "Id", "isCustomObject" : false }] } ``` Sample response body: ```nolang { "actionName" : "getFieldServiceObjectProperty", "errors" : null, "isSuccess" : true, "outputValues" : { "fieldServiceStandardVariable" : { "textValue" : "0Vr000000000001AAA", "integerValue" : null, "booleanValue" : null } } } ``` # Get Knowledge Language Settings Gets the existing Knowledge language settings, including the default knowledge language and a list of supported Knowledge language information. This resource can be used in API version 31.0 and later. Salesforce Knowledge must be enabled in your organization. It gets the Knowledge language settings, including the default knowledge language and a list of supported Knowledge language information. ## URI `/services/data/v{XX.X}/knowledgeManagement/settings` ## Formats JSON, XML ## HTTP Methods GET ## Authentication `Authorization: Bearer {token}` ## Request Body None required ## Request Parameters None ## Example Request ```nolang curl https://MYDOMAINNAME.my.salesforce.com/services/data/v66.0/knowledgeManagement/settings -H "Authorization: Bearer token" ``` ## Example Response Body ```nolang { "defaultLanguage" : "en_US", "knowledgeEnabled" : true, "languages" : [ { "active" : true, "name" : "en_US" }, { "active" : true, "name" : "it" }, { "active" : true, "name" : "zh_CN" }, { "active" : true, "name" : "fr" } ] } ``` # Get Operation Status Retrieve the status of a previously submitted asynchronous job. For example, `upsertCI` a bulk upsert operation. Use this query to check the progress and completion status of the asynchronous operations. ## Special Access Rules To query an operation status, you must have the following user permissions: - IT Service Configuration Item Type Manager - IT Service Configuration Item Owner ## Request ### JSON example This example shows a sample request to get the status of an asynchronous job. ```nolang query GetOperationStatus { getOperationStatus(id: 108) { id status lastModifiedOn totalRecordCount successRecordCount failureRecordCount details } } ``` ### Properties |Name|Type|Description|Required or Optional|Available Version| |----|----|-----------|--------------------|-----------------| |`id`|Integer|The unique identifier of the asynchronous job. This ID is returned by mutations such as `upsertCI` when an asynchronous operation is initiated.|Required|67.0| ## Response ### JSON example This example is a sample response from the `getStatus` query. ```nolang { "data": { "getOperationStatus": { "id": 108, "status": "Completed", "lastModifiedOn": "2025-11-14T10:16:05.123456Z", "details": "Job completed - Upsert CI - Canonical API (5 items)", "totalRecordCount": 5, "successRecordCount": 5, "failureRecordCount": 0 } } } ``` ### Properties |Name|Type|Description|Available Version| |----|----|-----------|-----------------| |`id`|Integer|The ID of the job or operation.|67.0| |`status`|String|The current status of the job.|67.0| |`lastModifiedOn`|String|The date and time when the job status was last updated. Valid format: `YYYY-MM-DDTHH:MM:SSZ`.|67.0| |`details`|String|User message that provides additional context about the job status or completion.|67.0| |`totalRecordCount`|Integer|The total number of records processed in the job.|67.0| |`successRecordCount`|Integer|The number of records that were successfully processed.|67.0| |`failureRecordCount`|Integer|The number of records that failed to process.|67.0| # Get Ready to Develop with Field Service To prepare to work programmatically with field service features, verify that Field Service is enabled in your org. 1. From Setup, enter `Field Service Settings` in the Quick Find box, then select **Field Service Settings**. 2. Verify that Field Service is enabled. 3. Click **Save**. You now have access to Salesforce’s standard field service objects, which are listed in this guide. However, that’s just the beginning! To get your feet wet before you start working programmatically with Field Service, it’s a good idea to walk through the setup tasks outlined in [Set Up Field Service](https://help.salesforce.com/articleView?id=fs_set_up.htm). # Get Service Appointment Details A service appointment represents an appointment booked through Salesforce Scheduler. 1. Create a page to show the details of a service appointment record that the user selects. 2. Make a `GET` request on the ServiceAppointment object. **Sample Request** Here’s a sample `GET` request to retrieve the service appointment details. ```nolang https://yourInstance.salesforce.com/services/data/v68.0/sobjects/ServiceAppointment/08pS7000000019BIAQ ``` **Sample Response** The method returns the service appointment details. ```nolang { "attributes": { "type": "ServiceAppointment", "url": "/services/data/v57.0/sobjects/ServiceAppointment/08pS7000000019BIAQ" }, "Id": "08pS7000000019BIAQ", "OwnerId": "005S7000000Ipe4IAC", "IsDeleted": false, "AppointmentNumber": "SA-0004", "CreatedDate": "2023-03-13T17:31:23.000+0000", "CreatedById": "005S7000000Ipe4IAC", "LastModifiedDate": "2023-03-13T17:31:23.000+0000", "LastModifiedById": "005S7000000Ipe4IAC", "SystemModstamp": "2023-03-13T17:31:28.000+0000", "LastViewedDate": "2023-03-13T17:31:23.000+0000", "LastReferencedDate": "2023-03-13T17:31:23.000+0000", "ParentRecordId": "001S7000001pFlJIAU", "ParentRecordType": "Account", "AccountId": "001S7000001pFlJIAU", "WorkTypeId": "08qS70000004DQsIAM", "ContactId": null, "Street": "121 Spear Street", "City": "Charlotte", "State": "VT", "PostalCode": "05445", "Country": "United States", "Latitude": 44.356843, "Longitude": -73.194897, "GeocodeAccuracy": "Block", "Address": { "city": "Charlotte", "country": "United States", "geocodeAccuracy": "Block", "latitude": 44.356843, "longitude": -73.194897, "postalCode": "05445", "state": "VT", "street": "121 Spear Street" }, "Description": null, "EarliestStartTime": "2023-03-13T17:31:23.000+0000", "DueDate": "2023-03-20T17:31:23.000+0000", "Duration": null, "ArrivalWindowStartTime": "2023-03-15T18:00:00.000+0000", "ArrivalWindowEndTime": "2023-03-15T19:00:00.000+0000", "Status": "Scheduled", "SchedStartTime": "2023-03-15T18:00:00.000+0000", "SchedEndTime": "2023-03-15T19:00:00.000+0000", "ActualStartTime": null, "ActualEndTime": null, "ActualDuration": null, "DurationType": "Hours", "DurationInMinutes": null, "ServiceTerritoryId": "0HhS700000001DYKAY", "Subject": null, "ParentRecordStatusCategory": null, "StatusCategory": "Scheduled", "ServiceNote": null, "AppointmentType": null, "Email": null, "Phone": null, "CancellationReason": null, "AdditionalInformation": null, "Comments": null, "IsAnonymousBooking": false, "IsOffsiteAppointment": false, "ApptBookingInfoUrl": null, "AppointmentInvitationId": null, "EngagementChannelTypeId": "0eFS70000004CG5MAM" } ``` 3. Parse the JSON response, and show the service appointments details on the page that you created. On the next page, you can let users to modify an engagement channel type, a service resource, or a time slot depending on what the user chooses to change. # Get Service Appointment Details A service appointment represents an appointment that’s booked via Salesforce Scheduler. Use a GET method to fetch the details of a service appointment record. This task helps you retrieve additional details of each service appointment that you listed in the previous task. **Sample Request** Here’s a sample GET request to retrieve the details of a service appointment. ```nolang https://YOUR_INSTANCE.salesforce.com/services/data/vXX.X/query/?q=SELECT+Id,SchedEndTime,SchedStartTime,ServiceTerritoryId,WorkTypeId+FROM+ServiceAppointment+WHERE+id+=+'08pB0000000aKf2IAE' ``` Where `YOUR_INSTANCE` is a variable. **Sample Response** The request returns the details of an anonymous service appointment. ```nolang { "totalSize": 1, "done": true, "records": [ { "attributes": { "type": "ServiceAppointment", "url": "/services/data/v53.0/sobjects/ServiceAppointment/08pB0000000aKf2IAE" }, "Id": "08pB0000000aKf2IAE", "SchedEndTime": "2021-10-25T18:30:00.000+0000", "SchedStartTime": "2021-10-25T17:30:00.000+0000", "ServiceTerritoryId": "0HhB0000000TaHOKA0", "WorkTypeId": "08qB0000000UF63IAG" } ] } ``` Use a `collection` object to capture all the details of service appointments. # Get Service Appointment Details A service appointment represents an appointment booked through Salesforce Scheduler. Use the GET method on the Service Appointment object to fetch the details of a service appointment record. Create a page where you can show the details of a multi-resource service appointment record that the user selects. **Sample Request** Here’s a sample GET request to retrieve the service appointment details. ```nolang https://YOUR_INSTANCE.salesforce.com/services/data/vXX.X/query/?q=SELECT+Id,SchedEndTime,SchedStartTime,ServiceTerritoryId,WorkTypeId+FROM+ServiceAppointment+WHERE+id+=+'08pB0000000aJKhIAM' ``` Where `YOUR_INSTANCE` is a variable. **Sample Response** The method returns the service appointment details. ```nolang { "totalSize" : 1, "done" : true, "records" : [ { "attributes" : { "type" : "ServiceAppointment", "url" : "/services/data/v53.0/sobjects/ServiceAppointment/08pB0000000aKf7IAE" }, "Id" : "08pB0000000aKf7IAE", "SchedEndTime" : "2021-10-22T15:45:00.000+0000", "SchedStartTime" : "2021-10-22T15:00:00.000+0000", "ServiceTerritoryId" : "0HhB0000000TakhKAC", "WorkTypeId" : "08qB0000000Tf1FIAS" } ] } ``` Parse the JSON response, and display the service appointments details on a page so that the user can change the multi-resource service appointment as needed. On the next page, you can show the user an option to select a different service resource of an existing multi-resource appointment. # Get Service Appointment Time Slots Retrieves available service appointment time slots based on the time zone, operating hours, scheduling policy and time zone name parameters. This action is available in API version 62.0 and later. ## Supported REST HTTP Methods **URI:** `/services/data/vXX.X/actions/standard/getAppointmentBookingSlots` Where `XX.X` is the latest API version. **Formats:** JSON, XML **HTTP Methods:** POST **Authentication:** `Authorization: Bearer TOKEN` Where `TOKEN` is a variable. ## Inputs |Input|Type|Description| |-----|----|-----------| |`serviceAppointmentId`|string|Required. The ID of the service appointment to get available time slots for.| |`operatingHoursId`|string|Required. The operating hours ID of the appointment to get time slots for.| |`schedulingPolicyId`|string|Required. The scheduling policy ID of the appointment to get time slots for.| |`timeZoneName`|string|Required. The name of the time zone to use when searching for and showing time slots.| ## Outputs |Output|Type|Description| |------|----|-----------| |`availableSlots`|string|The available time slots for the service appointment.| ## Example Sample request body: ```nolang { "inputs" : [{ "serviceAppointmentId" : "08p000000000001AAA", "operatingHoursId" : "0OH000000000001AAA", "schedulingPolicyId" : "0Vr000000000001AAA", "timeZoneName" : "America/Los_Angeles" }] } ``` Sample response body: ```nolang { "actionName" : "getAppointmentBookingSlots", "errors" : null, "isSuccess" : true, "outputValues" : { "availableSlots" : "[{\"startTime\":\"2026-08-28T17:00:00.000Z\",\"endTime\":\"2026-08-28T18:00:00.000Z\"}]" } } ``` # Get Service Appointments A service appointment represents an appointment booked through Salesforce Scheduler. 1. Create a page to show the service appointments. 2. Use the [`Query()`](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_query.htm) request on the ServiceAppointment object to retrieve the list of service appointments associated with an account. **Sample Request** ```nolang https://yourInstance.salesforce.com/services/data/v68.0/query/?q=​SELECT+AppointmentNumber,+Status,+SchedStartTime,+SchedEndTime,+ServiceTerritoryId,+WorkTypeId+From+ServiceAppointment+WHERE+AccountId+=+'001S7000001pFlJIAU' ``` **Sample Response** The method returns the available service appointments. ```nolang { "totalSize": 3, "done": true, "records": [ { "attributes": { "type": "ServiceAppointment", "url": "/services/data/v57.0/sobjects/ServiceAppointment/08pS70000000196IAA" }, "AppointmentNumber": "SA-0003", "Status": "Scheduled", "SchedStartTime": "2023-03-15T16:00:00.000+0000", "SchedEndTime": "2023-03-15T17:00:00.000+0000", "ServiceTerritoryId": "0HhS700000001DYKAY", "WorkTypeId": null }, { "attributes": { "type": "ServiceAppointment", "url": "/services/data/v57.0/sobjects/ServiceAppointment/08pS7000000018wIAA" }, "AppointmentNumber": "SA-0001", "Status": "Scheduled", "SchedStartTime": "2023-02-15T17:00:00.000+0000", "SchedEndTime": "2023-02-15T18:00:00.000+0000", "ServiceTerritoryId": "0HhS700000001DYKAY", "WorkTypeId": null }, { "attributes": { "type": "ServiceAppointment", "url": "/services/data/v57.0/sobjects/ServiceAppointment/08pS7000000019BIAQ" }, "AppointmentNumber": "SA-0004", "Status": "Scheduled", "SchedStartTime": "2023-03-15T18:00:00.000+0000", "SchedEndTime": "2023-03-15T19:00:00.000+0000", "ServiceTerritoryId": "0HhS700000001DYKAY", "WorkTypeId": null } ] } ``` 3. Parse the JSON response, and show the service appointments on a page that you created. Your users can select a service appointment to modify from the page. # Get Service Appointments The `AssignedResource` object represents a service resource who is assigned to a service appointment in Salesforce Scheduler. Retrieve service appointment IDs of all scheduled appointments associated with specific resources by using the `query` request on the `AssignedResource` object. **Sample Request** This sample REST API call uses the `query` request to retrieve the anonymous service appointments that are associated with unavailable resources. ```nolang https://YOUR_INSTANCE.salesforce.com/services/data/vXX.X/query/?q=SELECT+ServiceAppointmentId,ServiceResourceId+FROM+AssignedResource+WHERE+ServiceResourceId+=+'SERVICE_RESOURCE_ID'+AND+ServiceAppointment.IsAnonymousBooking+=+TRUE ``` Where `YOUR_INSTANCE` and `SERVICE_RESOURCE_ID` are variables. For more information, see [Execute a SOQL Query](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_query.htm). Ensure that the filter falls within the query limits. **Sample Response** The method retrieves the list of anonymous appointments that are associated with specific resources. ```nolang { "totalSize" : 2, "done" : true, "records" : [ { "attributes" : { "type" : "AssignedResource", "url" : "/services/data/v53.0/sobjects/AssignedResource/03rB0000000cBVOIA2" }, "ServiceAppointmentId" : "08pB0000000aKeYIAU", "ServiceResourceId" : "0HnB0000000Tav3KAC" }, { "attributes" : { "type" : "AssignedResource", "url" : "/services/data/v53.0/sobjects/AssignedResource/03rB0000000cBVsIAM" }, "ServiceAppointmentId" : "08pB0000000aKf2IAE", "ServiceResourceId" : "0HnB0000000Tav3KAC" } ] } ``` Use a `collection` object to capture all appointment IDs that the GET request retrieved. If you call multiple GET requests, include in the `collection` object the appointment IDs that each request returned.. This task helps you create a list of service appointments that you must update with new resources. # Get Service Appointments A service appointment represents an appointment booked through Salesforce Scheduler. Use the `query` request on the `ServiceAppointment` object to retrieve a list of service appointments. Create a page where you can show the service appointments for a logged in user. **Sample Request** This sample REST API call uses the `query` resource to retrieve service appointments. ```nolang https://yourInstance.salesforce.com/services/data/vXX.X/query/?q=SELECT+AppointmentNumber, +Id,+Status,+SchedStartTime,+SchedEndTime,+ServiceTerritoryId,+WorkTypeId+From+ServiceAppointment+WHERE+AccountId+=+'001B000001McLhMIAV' ``` For more information, see [Execute a SOQL Query](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_query.htm). **Sample Response** The method returns the available service appointments. ```nolang { "totalSize" : 5, "done" : true, "records" : [ { "attributes" : { "type" : "ServiceAppointment", "url" : "/services/data/v53.0/sobjects/ServiceAppointment/08pB0000000aKe4IAE" }, "AppointmentNumber" : "SA-41906", "Id" : "08pB0000000aKe4IAE", "Status" : "Scheduled", "SchedStartTime" : "2021-10-25T15:00:00.000+0000", "SchedEndTime" : "2021-10-25T16:00:00.000+0000", "ServiceTerritoryId" : "0HhB0000000TakhKAC", "WorkTypeId" : null }, { "attributes" : { "type" : "ServiceAppointment", "url" : "/services/data/v53.0/sobjects/ServiceAppointment/08pB0000000aKesIAE" }, "AppointmentNumber" : "SA-41911", "Id" : "08pB0000000aKesIAE", "Status" : "Scheduled", "SchedStartTime" : "2021-10-25T15:00:00.000+0000", "SchedEndTime" : "2021-10-25T16:00:00.000+0000", "ServiceTerritoryId" : "0HhB0000000TaHOKA0", "WorkTypeId" : null }, { "attributes" : { "type" : "ServiceAppointment", "url" : "/services/data/v53.0/sobjects/ServiceAppointment/08pB0000000aKexIAE" }, "AppointmentNumber" : "SA-41912", "Id" : "08pB0000000aKexIAE", "Status" : "Scheduled", "SchedStartTime" : "2021-10-22T16:30:00.000+0000", "SchedEndTime" : "2021-10-22T18:00:00.000+0000", "ServiceTerritoryId" : "0HhB0000000TakhKAC", "WorkTypeId" : null }, { "attributes" : { "type" : "ServiceAppointment", "url" : "/services/data/v53.0/sobjects/ServiceAppointment/08pB0000000aKf2IAE" }, "AppointmentNumber" : "SA-41913", "Id" : "08pB0000000aKf2IAE", "Status" : "Scheduled", "SchedStartTime" : "2021-10-25T17:30:00.000+0000", "SchedEndTime" : "2021-10-25T18:30:00.000+0000", "ServiceTerritoryId" : "0HhB0000000TaHOKA0", "WorkTypeId" : "08qB0000000UF63IAG" }, { "attributes" : { "type" : "ServiceAppointment", "url" : "/services/data/v53.0/sobjects/ServiceAppointment/08pB0000000aKf7IAE" }, "AppointmentNumber" : "SA-41914", "Id" : "08pB0000000aKf7IAE", "Status" : "Scheduled", "SchedStartTime" : "2021-10-22T15:00:00.000+0000", "SchedEndTime" : "2021-10-22T15:45:00.000+0000", "ServiceTerritoryId" : "0HhB0000000TakhKAC", "WorkTypeId" : null } ] } ``` Parse the JSON response, and display the service appointments on a page in your app so that users can select an appointment record to modify. Here’s how that page can look. ![A representation of the Select Service Appointment screen.](https://developer.salesforce.com/media/salesforce-scheduler-dev-guide/screen_service_appointments.png) On the next page, you can provide users an option to select a service appointment to modify. # Get Service Appointments Assigned to the Dummy Resource Show your users the service appointments—appointments booked through Salesforce Scheduler—scheduled against the dummy resource by retrieving the list of service appointments. Branch managers or administrators can reassign the appointments to the actual resources. For the list of AppointmentInvitation object fields, see [ServiceAppointment](https://developer.salesforce.com/docs/atlas.en-us.salesforce_scheduler_developer_guide.meta/salesforce_scheduler_developer_guide/sforce_api_objects_serviceappointment.htm). 1. Create a page to show the service appointments scheduled against the dummy resource. 2. To retrieve the list of service appointments, make a [`Query()`](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_query.htm) request on the ServiceAppointment object. - To choose additional columns from the ServiceAppointment object, such as lead and parent record IDs, modify the query. - To see upcoming appointments first, sort appointments by start time ascending. - To avoid past appointments, add *where currentTime is greater than start time*. **Sample REST API Request** ```nolang https://YOUR_INSTANCE.salesforce.com//services/data/v68.0/query/?q=​SELECT+ServiceAppointmentId,ServiceResourceId,ServiceAppointment.SchedEndTime,ServiceAppointment.SchedStartTime,ServiceAppointment.ServiceTerritoryId,ServiceAppointment.Id+​FROM+AssignedResource+WHERE+ServiceResourceId+=+'0HnS70000004EFyKAM'+ORDER+BY+createdDate+DESC+limit+5 ``` Where `YOUR_INSTANCE` is a variable. **Sample Response** ```nolang { "totalSize": 5, "done": true, "records": [ { "attributes": { "type": "AssignedResource", "url": "/services/data/v56.0/sobjects/AssignedResource/03rS70000000401IAA" }, "ServiceAppointmentId": "08pS70000000CxOIAU", "ServiceResourceId": "0HnS70000004EFyKAM", "ServiceAppointment": { "attributes": { "type": "ServiceAppointment", "url": "/services/data/v56.0/sobjects/ServiceAppointment/08pS70000000CxOIAU" }, "SchedEndTime": "2022-10-03T17:00:00.000+0000", "SchedStartTime": "2022-10-03T16:30:00.000+0000", "ServiceTerritoryId": "0HhS70000004F9zKAE", "Id": "08pS70000000CxOIAU" } }, { "attributes": { "type": "AssignedResource", "url": "/services/data/v56.0/sobjects/AssignedResource/03rS700000003zwIAA" }, "ServiceAppointmentId": "08pS70000000CxJIAU", "ServiceResourceId": "0HnS70000004EFyKAM", "ServiceAppointment": { "attributes": { "type": "ServiceAppointment", "url": "/services/data/v56.0/sobjects/ServiceAppointment/08pS70000000CxJIAU" }, "SchedEndTime": "2022-10-03T17:00:00.000+0000", "SchedStartTime": "2022-10-03T16:30:00.000+0000", "ServiceTerritoryId": "0HhS70000004F9zKAE", "Id": "08pS70000000CxJIAU" } }, { "attributes": { "type": "AssignedResource", "url": "/services/data/v56.0/sobjects/AssignedResource/03rS700000003zrIAA" }, "ServiceAppointmentId": "08pS70000000CxEIAU", "ServiceResourceId": "0HnS70000004EFyKAM", "ServiceAppointment": { "attributes": { "type": "ServiceAppointment", "url": "/services/data/v56.0/sobjects/ServiceAppointment/08pS70000000CxEIAU" }, "SchedEndTime": "2022-10-03T17:00:00.000+0000", "SchedStartTime": "2022-10-03T16:30:00.000+0000", "ServiceTerritoryId": "0HhS70000004F9zKAE", "Id": "08pS70000000CxEIAU" } }, { "attributes": { "type": "AssignedResource", "url": "/services/data/v56.0/sobjects/AssignedResource/03rS70000004D3WIAU" }, "ServiceAppointmentId": "08pS70000004F3xIAE", "ServiceResourceId": "0HnS70000004EFyKAM", "ServiceAppointment": { "attributes": { "type": "ServiceAppointment", "url": "/services/data/v56.0/sobjects/ServiceAppointment/08pS70000004F3xIAE" }, "SchedEndTime": "2022-10-03T17:00:00.000+0000", "SchedStartTime": "2022-10-03T16:30:00.000+0000", "ServiceTerritoryId": "0HhS70000004F9zKAE", "Id": "08pS70000004F3xIAE" } }, { "attributes": { "type": "AssignedResource", "url": "/services/data/v56.0/sobjects/AssignedResource/03rS700000003zmIAA" }, "ServiceAppointmentId": "08pS70000000Cx9IAE", "ServiceResourceId": "0HnS70000004EFyKAM", "ServiceAppointment": { "attributes": { "type": "ServiceAppointment", "url": "/services/data/v56.0/sobjects/ServiceAppointment/08pS70000000Cx9IAE" }, "SchedEndTime": "2022-10-03T17:00:00.000+0000", "SchedStartTime": "2022-10-03T16:30:00.000+0000", "ServiceTerritoryId": "0HhS70000004F9zKAE", "Id": "08pS70000000Cx9IAE" } } ] } ``` 3. Parse the JSON response, and show the service appointments on a page that you created. Branch managers or administrators can reassign the appointments to the actual resources. # Get Service Resources A service resource represents an employee from your organization, such as a loan officer, investment advisor, doctor, nurse practitioner, or retail store specialist, who attends appointments with clients. 1. Create a page to show the available service resources. 2. Make a `POST` request on the [`getAppointmentCandidates`](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/requests_ls_getappointmentcandidates.htm) REST API by passing the required `workTypeGroupId` and `territoryIds` parameters. **Resource URI** ```nolang https://YOUR_INSTANCE.salesforce.com/services/data/v68.0/scheduling/getAppointmentCandidates ``` Where `YOUR_INSTANCE` is a variable. **Sample Request** To consider an existing user’s preferred visiting hours, pass `accountId` in the input request body. The preference is enforced when the Include Only Required Service Resources and Ignore Excluded Service Resources policy rules are enabled. For more information, see [Add Service Resource Preferences to Accounts for Salesforce Scheduler](https://help.salesforce.com/s/articleView?id=platform.ls_add_service_resource_preferences_to_accounts.htm&type=5). ```nolang { "startTime": "2023-02-15T09:00:00.000+0000", "endTime": "2023-02-15T19:00:00.000+0000", "accountId": "001S7000001pFlJIAU", "workTypeGroupId": "0VSS700000000sVOAQ", "territoryIds": [ "0HhS700000001DYKAY" ], "engagementChannelTypeIds": [ "0eFS70000004CG5MAM" ] } ``` **Sample Response** The API returns the service resources available for the specified time slots. ```nolang { "candidates" : [ { "endTime" : "2023-02-15T18:00:00.000+0000", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-02-15T17:00:00.000+0000", "territoryId" : "0HhS700000001DYKAY" }, { "endTime" : "2023-02-15T18:15:00.000+0000", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-02-15T17:15:00.000+0000", "territoryId" : "0HhS700000001DYKAY" }, { "endTime" : "2023-02-15T18:30:00.000+0000", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-02-15T17:30:00.000+0000", "territoryId" : "0HhS700000001DYKAY" }, { "endTime" : "2023-02-15T18:45:00.000+0000", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-02-15T17:45:00.000+0000", "territoryId" : "0HhS700000001DYKAY" }, { "endTime" : "2023-02-15T19:00:00.000+0000", "engagementChannelTypeIds" : [ "0eFS70000004CG5MAM" ], "resources" : [ "0HnS700000002jAKAQ" ], "startTime" : "2023-02-15T18:00:00.000+0000", "territoryId" : "0HhS700000001DYKAY" } ] } ``` 3. Parse the JSON response, and show the actual service resources on a page. Your users can select a service resource for the appointment from the page. # Get Service Resources Retrieve the available service resources based on the selected work type group or work type, and service territory. A service resource is an employee from your organization, such as a loan officer, investment advisor, doctor, nurse practitioner, or retail store specialist, who attends appointments with clients. Create a page in your app where you can show the available service resources based on the work type group or work type, and service territory. 1. Make a POST request on the [`getAppointmentCandidates`](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/requests_ls_getappointmentcandidates.htm) REST API by passing the required `workTypeGroupId` or `workTypeId`, and `territoryIds` parameters. **Resource URI** ```nolang https://YOUR_INSTANCE.salesforce.com/services/data/vXX.X/scheduling/getAppointmentCandidates ``` Where `YOUR_INSTANCE` is a variable. **For an Existing User (Account)** To consider an existing user’s preferred visiting hours, pass `accountId` in the input request body. The preference is enforced when the Include Only Required Service Resources and Ignore Excluded Service Resources policy rules are enabled. **Sample Request** Using `workTypeGroupId`: ```nolang { "accountId": "001x0000005DLxpAAG", "startTime": "2022-04-19T10:30:00.000+0000", "endTime": "2022-04-19T10:40:00.000+0000", "workTypeGroupId": "0VSx000000014DmGAI", "territoryIds": [ "0Hhx000000012oSCAQ" ] } ``` Using `workTypeId`: ```nolang { "accountId" : "001x0000005DLxpAAG", "startTime" : "2022-04-19T10:30:00.000+0000", "endTime" : "2022-04-19T10:40:00.000+0000", "workType" : { "id" : "08qx000000014fnAAA" }, "territoryIds" : ["0Hhx000000012oSCAQ"] } ``` **Sample Response** The API returns the service resources and their available time slots. ```nolang { "candidates": [ { "endTime": "2022-04-19T10:40:00.000+0000", "resources": [ "0Hnx000000006GcCAI" ], "startTime": "2022-04-19T10:30:00.000+0000", "territoryId": "0Hhx000000012oSCAQ" }, { "endTime": "2022-04-19T10:40:00.000+0000", "resources": [ "0Hnx000000006GfCAI" ], "startTime": "2022-04-19T10:30:00.000+0000", "territoryId": "0Hhx000000012oSCAQ" }, { "endTime": "2022-04-19T10:40:00.000+0000", "resources": [ "0Hnx000000006GbCAI" ], "startTime": "2022-04-19T10:30:00.000+0000", "territoryId": "0Hhx000000012oSCAQ" }, { "endTime": "2022-04-19T10:40:00.000+0000", "resources": [ "0Hnx000000006GwCAI" ], "startTime": "2022-04-19T10:30:00.000+0000", "territoryId": "0Hhx000000012oSCAQ" }, { "endTime": "2022-04-19T10:40:00.000+0000", "resources": [ "0Hnx000000006GyCAI" ], "startTime": "2022-04-19T10:30:00.000+0000", "territoryId": "0Hhx000000012oSCAQ" }, { "endTime": "2022-04-19T10:40:00.000+0000", "resources": [ "0Hnx000000006GuCAI" ], "startTime": "2022-04-19T10:30:00.000+0000", "territoryId": "0Hhx000000012oSCAQ" }, { "endTime": "2022-04-19T10:40:00.000+0000", "resources": [ "0Hnx000000006GtCAI" ], "startTime": "2022-04-19T10:30:00.000+0000", "territoryId": "0Hhx000000012oSCAQ" }, { "endTime": "2022-04-19T10:40:00.000+0000", "resources": [ "0Hnx000000006GsCAI" ], "startTime": "2022-04-19T10:30:00.000+0000", "territoryId": "0Hhx000000012oSCAQ" }, { "endTime": "2022-04-19T10:40:00.000+0000", "resources": [ "0Hnx000000006GmCAI" ], "startTime": "2022-04-19T10:30:00.000+0000", "territoryId": "0Hhx000000012oSCAQ" }, { "endTime": "2022-04-19T10:40:00.000+0000", "resources": [ "0Hnx000000006GnCAI" ], "startTime": "2022-04-19T10:30:00.000+0000", "territoryId": "0Hhx000000012oSCAQ" }, { "endTime": "2022-04-19T10:40:00.000+0000", "resources": [ "0Hnx000000006GlCAI" ], "startTime": "2022-04-19T10:30:00.000+0000", "territoryId": "0Hhx000000012oSCAQ" }, { "endTime": "2022-04-19T10:40:00.000+0000", "resources": [ "0Hnx000000006H4CAI" ], "startTime": "2022-04-19T10:30:00.000+0000", "territoryId": "0Hhx000000012oSCAQ" }, { "endTime": "2022-04-19T10:40:00.000+0000", "resources": [ "0Hnx000000006H2CAI" ], "startTime": "2022-04-19T10:30:00.000+0000", "territoryId": "0Hhx000000012oSCAQ" }, { "endTime": "2022-04-19T10:40:00.000+0000", "resources": [ "0Hnx000000006H3CAI" ], "startTime": "2022-04-19T10:30:00.000+0000", "territoryId": "0Hhx000000012oSCAQ" } ] } ``` **For a Guest User (Lead)** **Sample Request** Using `workTypeGroupId`: ```nolang { "startTime": "2022-04-19T10:30:00.000+0000", "endTime": "2022-04-19T10:40:00.000+0000", "workTypeGroupId": "0VSx000000014DmGAI", "territoryIds": [ "0Hhx000000012oSCAQ" ] } ``` Using `workTypeId`: ```nolang { "startTime": "2022-04-19T10:30:00.000+0000", "endTime": "2022-04-19T10:40:00.000+0000", "workType": { "id": "08qx000000014fnAAA" }, "territoryIds": [ "0Hhx000000012oSCAQ" ] } ``` **Sample Response** The API returns the service resources and their available time slots. ```nolang { "candidates": [ { "endTime": "2022-04-19T10:40:00.000+0000", "resources": [ "0Hnx000000006GcCAI" ], "startTime": "2022-04-19T10:30:00.000+0000", "territoryId": "0Hhx000000012oSCAQ" }, { "endTime": "2022-04-19T10:40:00.000+0000", "resources": [ "0Hnx000000006GfCAI" ], "startTime": "2022-04-19T10:30:00.000+0000", "territoryId": "0Hhx000000012oSCAQ" }, { "endTime": "2022-04-19T10:40:00.000+0000", "resources": [ "0Hnx000000006GbCAI" ], "startTime": "2022-04-19T10:30:00.000+0000", "territoryId": "0Hhx000000012oSCAQ" }, { "endTime": "2022-04-19T10:40:00.000+0000", "resources": [ "0Hnx000000006GwCAI" ], "startTime": "2022-04-19T10:30:00.000+0000", "territoryId": "0Hhx000000012oSCAQ" }, { "endTime": "2022-04-19T10:40:00.000+0000", "resources": [ "0Hnx000000006GyCAI" ], "startTime": "2022-04-19T10:30:00.000+0000", "territoryId": "0Hhx000000012oSCAQ" }, { "endTime": "2022-04-19T10:40:00.000+0000", "resources": [ "0Hnx000000006GuCAI" ], "startTime": "2022-04-19T10:30:00.000+0000", "territoryId": "0Hhx000000012oSCAQ" }, { "endTime": "2022-04-19T10:40:00.000+0000", "resources": [ "0Hnx000000006GtCAI" ], "startTime": "2022-04-19T10:30:00.000+0000", "territoryId": "0Hhx000000012oSCAQ" }, { "endTime": "2022-04-19T10:40:00.000+0000", "resources": [ "0Hnx000000006GsCAI" ], "startTime": "2022-04-19T10:30:00.000+0000", "territoryId": "0Hhx000000012oSCAQ" }, { "endTime": "2022-04-19T10:40:00.000+0000", "resources": [ "0Hnx000000006GmCAI" ], "startTime": "2022-04-19T10:30:00.000+0000", "territoryId": "0Hhx000000012oSCAQ" }, { "endTime": "2022-04-19T10:40:00.000+0000", "resources": [ "0Hnx000000006GnCAI" ], "startTime": "2022-04-19T10:30:00.000+0000", "territoryId": "0Hhx000000012oSCAQ" }, { "endTime": "2022-04-19T10:40:00.000+0000", "resources": [ "0Hnx000000006GlCAI" ], "startTime": "2022-04-19T10:30:00.000+0000", "territoryId": "0Hhx000000012oSCAQ" }, { "endTime": "2022-04-19T10:40:00.000+0000", "resources": [ "0Hnx000000006H4CAI" ], "startTime": "2022-04-19T10:30:00.000+0000", "territoryId": "0Hhx000000012oSCAQ" }, { "endTime": "2022-04-19T10:40:00.000+0000", "resources": [ "0Hnx000000006H2CAI" ], "startTime": "2022-04-19T10:30:00.000+0000", "territoryId": "0Hhx000000012oSCAQ" }, { "endTime": "2022-04-19T10:40:00.000+0000", "resources": [ "0Hnx000000006H3CAI" ], "startTime": "2022-04-19T10:30:00.000+0000", "territoryId": "0Hhx000000012oSCAQ" } ] } ``` Parse the JSON response, and display the available service resources on web page so that users can select a service resource for the appointment. Here’s how that page can look. ![A representation of the Select Service Resource screen.](https://developer.salesforce.com/media/salesforce-scheduler-dev-guide/uc9_select_service_resource.png) When users select a resource, show the available time slots for the selected resource. Here’s how a page showing the available time slots can look. ![A representation of the Select Service Appointment Time screen.](https://developer.salesforce.com/media/salesforce-scheduler-dev-guide/uc9_select_appointment_time.png) On the next page in your app, you can show the appointment details for the user to review and create the appointment. # Get Service Territories A service territory represents a branch or office location where your service resources (appointment attendees) operate from or meet customers. Show your users your available service territorieson the next page on your website by retrieving a list of active service territories from your Salesforce instance. Your users can search for service territories based on user-entered name, city, postal code, or state. Users can also view the distance between two locations, such as between a service territory and the user's current location. 1. Create a page for users to search for service territories. Here’s how a Select Service Territory page can look. ![A representation of the Select Service Territory screen.](https://developer.salesforce.com/media/salesforce-scheduler-dev-guide/concurrent-serviceTerritory.png) 2. To retrieve a list of active service territories from your Salesforce instance, use the `service-territories` Connect API request. **Sample Request** This sample REST API call uses the [`service-territories`](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_resources_service_territories.htm) request to retrieve service territories within a range of 10 miles from your current location. The default value is 5 miles. ```nolang https://YOUR_INSTANCE.salesforce.com/services/data/v68.0/connect/scheduling​​​/service-territories?workTypeGroupId=0VSS70000004DvWOAU ``` Where `YOUR_INSTANCE` is a variable. **Sample Response** The request returns the service territory records. ```nolang { "result": { "serviceTerritories": [ { "city": "Hyderabad", "country": "India", "id": "0HhS70000004F9zKAE", "name": "ServiceTerritory1", "operatingHoursId": "0OHS70000004FIxOAM", "postalCode": "500032", "state": "TG" } ] } } ``` 3. Parse the JSON response, and show the available service territories on a page that you created. Your users can select a service territory for the appointment. # Get Service Territories A service territory represents a branch or office location where your service resources (appointment attendees) operate from or meet customers. Show your users your available service territories on the next page on your website by retrieving a list of active service territories from your Salesforce instance. Your users can search for service territories based on user-entered name, city, postal code, or state. Users can also view the distance between two locations, such as between a service territory and the user's current location. 1. Create a page for users to search for service territories. Here’s how a Select Service Territory page can look. ![A representation of the Select Service Territory screen.](https://developer.salesforce.com/media/salesforce-scheduler-dev-guide/concurrent-serviceTerritory.png) 2. To retrieve a list of active service territories from your Salesforce instance, use the `service-territories` Connect API request. **Sample Request** This sample REST API call uses the [`service-territories`](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_resources_service_territories.htm) request to retrieve service territories within a range of 10 miles from your current location. The default value is 5 miles. ```nolang https://YOUR_INSTANCE.salesforce.com/services/data/v68.0/connect/scheduling​​​/service-territories?workTypeGroupId=0VSS700000000sVOAQ ``` Where `YOUR_INSTANCE` is a variable. **Sample Response** The request returns the service territory records. ```nolang { "result": { "serviceTerritories": [ { "city": "Charlotte", "country": "United States", "id": "0HhS700000001DYKAY", "name": "Spear Street Branch", "operatingHoursId": "0OHS700000001HlOAI", "postalCode": "05445", "state": "VT", "street": "121 Spear Street" } ] } } ``` 3. Parse the JSON response, and show the available service territories on a page that you created. Your users can select a service territory for the appointment from the page. # Get Service Territories A service territory represents a branch or office location where your service resources (appointment attendees) operate from or meet customers. Use the `service-territories` Connect API to fetch a list of service territories based on a work type group or work type. 1. Create a page where you can provide users an option to search for service territories. Here’s how a Select Service Territory page can look. ![A representation of the Select Service Territory screen.](https://developer.salesforce.com/media/salesforce-scheduler-dev-guide/screen_service_territory1.png) 2. Make a GET request on the [`service-territories`](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_resources_service_territories.htm) Connect API by passing the user-entered search values and the selected work type group ID as the input parameters in the query string. You can also use a combination of the radius, latitude, longitude, sortBy, and sortOrder parameters to filter and sort the service territories. **Resource URI** ```nolang https://yourInstance.salesforce.com/services/data/vXX.X/connect/scheduling/service-territories ``` **Sample Request** This sample GET request specifies the query string on the service territories Connect API. ```nolang https://yourInstance.salesforce.com/services/data/vXX.X/connect/scheduling/service-territories?workTypeGroupId=0VSS700000000sVOAQ &latitude=44.357422&longitude=-73.193952&radius=5&radiusUnit=mi&sortBy=Distance&sortOrder=asc ``` **Sample Response** The API returns the available service territories based on the passed work type group ID and search criteria. ```nolang { "result": { "serviceTerritories": [ { "city": "Charlotte", "country": "United States", "id": "0HhS700000001DYKAY", "latitude": 44.357422, "longitude": -73.193952, "name": "Spear Street Branch", "operatingHoursId": "0OHS700000001HlOAI", "postalCode": "05445", "state": "VT", "street": "121 Spear Street" } ] } } ``` 3. Parse the JSON response, and show the available service territories on the Select Service Territory page so that the user can select a service territory. Here’s a Select Service Territory page showing the available service territories. ![A representation of the Select Service Territory screen.](https://developer.salesforce.com/media/salesforce-scheduler-dev-guide/screen_service_territory3.png) Here’s how the service territory details are displayed when the user selects a service territory. ![A representation of the Select Service Territory screen.](https://developer.salesforce.com/media/salesforce-scheduler-dev-guide/screen_service_territory2.png) On the next page in your app, you can show the available time slots for the appointment. # Get Service Territories A service territory represents a branch or office location where your service resources (appointment attendees) operate from or meet customers. Use the `service-territories` Connect API to fetch a list of service territories based on a work type group or work type. 1. Create a page where you can provide users an option to search for service territories. Here’s how a Select Service Territory page can look. ![A representation of the Select Service Territory screen.](https://developer.salesforce.com/media/salesforce-scheduler-dev-guide/screen_service_territory1.png) 2. Make a GET request on the [`service-territories`](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_resources_service_territories.htm) Connect API by passing the user-entered search values and the selected work type group ID as the input parameters in the query string. You can also use a combination of the radius, latitude, longitude, sortBy, and sortOrder parameters to filter and sort the service territories. **Resource URI** ```nolang https://yourInstance.salesforce.com/services/data/vXX.X/connect/scheduling/service-territories ``` **Sample Request** This sample GET request specifies the query string on the service territories Connect API. ```nolang https://yourInstance.salesforce.com/services/data/vXX.X/connect/scheduling/service-territories?workTypeGroupId=0VSS700000000sVOAQ &latitude=44.357422&longitude=-73.193952&radius=5&radiusUnit=mi&sortBy=Distance&sortOrder=asc ``` **Sample Response** The API returns the available service territories based on the passed work type group ID and search criteria. ```nolang { "result": { "serviceTerritories": [ { "city": "Charlotte", "country": "United States", "id": "0HhS700000001DYKAY", "latitude": 44.357422, "longitude": -73.193952, "name": "Spear Street Branch", "operatingHoursId": "0OHS700000001HlOAI", "postalCode": "05445", "state": "VT", "street": "121 Spear Street" } ] } } ``` 3. Parse the JSON response, and show the available service territories on the Select Service Territory page so that the user can select a service territory. Here’s a Select Service Territory page showing the available service territories. ![A representation of the Select Service Territory screen.](https://developer.salesforce.com/media/salesforce-scheduler-dev-guide/screen_service_territory3.png) Here’s how the service territory details are displayed when the user selects a service territory. ![A representation of the Select Service Territory screen.](https://developer.salesforce.com/media/salesforce-scheduler-dev-guide/screen_service_territory2.png) On the next page in your app, you can show the available service resources so that the user can select a primary resource for the appointment. # Get Service Territories Get a service territory based on the work type group that is selected in the previous step. A service territory represents a branch or office location where your service resources (appointment attendees) operate from or meet customers. Create a page where you can provide users an option to search for service territories. Here’s how a Select Service Territory page can look. ![A representation of the Select Service Territory screen.](https://developer.salesforce.com/media/salesforce-scheduler-dev-guide/concurrent-serviceTerritory.png) Make a GET request on the [`service-territories`](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_resources_service_territories.htm) Connect API by passing the user-entered search values and the selected work type group ID as the input parameters in the query string. You can also use a combination of the radius, latitude, longitude, sortBy, and sortOrder parameters to filter and sort the service territories. **Resource URI** ```nolang https://yourInstance.salesforce.com/services/data/vXX.X/connect/scheduling/service-territories ``` **Sample Request** Here’s a sample GET request with the query string on the service territories Connect API. ```nolang https://yourInstance.salesforce.com/services/data/vXX.X/connect/scheduling/service-territories ?workTypeGroupId=0VSB0000000TbhWOAS ``` **Sample Response** The API returns the available service territories based on the passed work type group ID and search criteria. ```nolang { "result" : { "serviceTerritories" : [ { "city" : "San Francisco", "country" : "United States", "id" : "0HhB00000001P0PKAU", "latitude" : 37.794928, "longitude" : -122.394514, "name" : "LSConcurrent Service Territory", "operatingHoursId" : "0OHB0000000LWkUOAW", "postalCode" : "90011", "state" : "CA", "street" : "2 Market Street" } ] } } ``` Parse the JSON response, and show the available service territories on the Select Service Territory page so that the user can select a service territory. Here’s a Select Service Territory page showing the available service territories. ![A representation of the Select Service Territory screen.](https://developer.salesforce.com/media/salesforce-scheduler-dev-guide/concurrent-serviceTerritory1.png) Here’s how the service territory details are displayed when the user selects a service territory. ![A representation of the Select Service Territory screen.](https://developer.salesforce.com/media/salesforce-scheduler-dev-guide/concurrent-serviceTerritory2.png) After you get a work type group and service territory for the appointment, you must get a work type that is associated with both the work type group and service territory you have selected in the previous steps. # Get Service Territories Display the available service territories on the first screen of your appointment scheduling app. A service territory represents a branch or office location where your service resources (appointment attendees) operate from or meet customers. Create a page where you can provide users an option to search for service territories. Here’s how a Select Service Territory page can look. ![A representation of the Select Service Territory screen.](https://developer.salesforce.com/media/salesforce-scheduler-dev-guide/concurrent-serviceTerritory.png) You can search for service territories based on the user-entered name, city, postal code, or state. You can also calculate the distance between two location values, such as between a service territory and the user's current location. You can Retrieve records with locations within or outside of a certain radius with distance conditions in the WHERE clause of the query. For more information, see the WHERE clause section in [Location-Based SOQL Queries](https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_geolocate.htm). 1. Use the `Query()` request on the ServiceTerritory object to retrieve a list of active service territories from your Salesforce org. **Sample Request** This sample REST API call uses the `Query()` request to retrieve service territories within a range of 1 mile from your current location. Default value is 5 miles. For more information on using `Query()` request, see [Execute a SOQL Query](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_query.htm). ```nolang https://YOUR_INSTANCE.salesforce.com/services/data/vXX.X/query/?q= SELECT City,Country,Id,Name,State FROM ServiceTerritory WHERE DISTANCE(Address, GEOLOCATION(17.4358411,78.3467857), 'mi') < 1 ``` Where `YOUR_INSTANCE` is a variable. **Sample Response** The request returns the service territory records. ```nolang { "totalSize": 4, "done": true, "records": [ { "attributes": { "type": "ServiceTerritory", "url": "/services/data/v55.0/sobjects/ServiceTerritory/0Hhx000000012oOCAQ" }, "City": "Hyderabad", "Country": "India", "Id": "0Hhx000000012oOCAQ", "Name": "Apollo Hyderabad", "State": "TG" }, { "attributes": { "type": "ServiceTerritory", "url": "/services/data/v55.0/sobjects/ServiceTerritory/0Hhx000000012oRCAQ" }, "City": "Nanakaramguda", "Country": "India", "Id": "0Hhx000000012oRCAQ", "Name": "Somewhere", "State": "TG" }, { "attributes": { "type": "ServiceTerritory", "url": "/services/data/v55.0/sobjects/ServiceTerritory/0Hhx000000012oQCAQ" }, "City": "Hyderabad", "Country": "India", "Id": "0Hhx000000012oQCAQ", "Name": "Partner Service Territory", "State": "TG" }, { "attributes": { "type": "ServiceTerritory", "url": "/services/data/v55.0/sobjects/ServiceTerritory/0Hhx000000012oSCAQ" }, "City": "Hyderabad", "Country": "India", "Id": "0Hhx000000012oSCAQ", "Name": "JPMC Bank, Hyderabad", "State": "TG" } ] } ``` Parse the JSON response, and show the available service territories on the Select Service Territory page so that the user can select a service territory. Here’s how the service territories are listed based on the users' search. ![A representation of the Select Service Territory screen.](https://developer.salesforce.com/media/salesforce-scheduler-dev-guide/uc9_service_territory_list.png) On the next page in your app, you can show the work type groups. # Get Started Bring Your Own Channel for Messaging and Bring Your Own Channel for Contact Center as a Service (CCaaS) integrate external messaging services with Salesforce. The Interaction Service API helps you shape and extend the Bring Your Own Channel experience for your reps. To learn more about Bring Your Own Channel for Messaging and Bring Your Own Channel for CCaaS, visit our [learning map](https://help.salesforce.com/s/articleView?id=service.byoc_byoccaas_intro.htm) in Salesforce Help. ## Before You Begin Before you can start sending API calls, you must prepare your environment. - [Enable Bring Your Own Channel for Messaging](https://developer.salesforce.com/docs/service/messaging-partner/guide/messaging-partner-setup.html) or [enable Bring Your Own Channel for CCaaS](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/enable-messaging-byoc-ccaas.html). - Generate the access token for the Interaction Service API. When you enable Bring Your Own Channel for Messaging or Bring Your Own Channel for CCaaS, during the process, you'll also generate an access token, which you or your customer will use as the bearer token to make requests to the Interaction Service APIs. If Bring Your Own Channel for Messaging or Bring Your Own Channel for CCaaS is already enabled and you don't have an access token, create one by following the steps in the [Authorization](https://developer.salesforce.com/docs/service/interaction-service-api/guide/authorization.md) page. ## Next Steps After you prepare your environment, you're ready to start making requests to the Interaction Service API. See the [Interaction Service API Reference](https://developer.salesforce.com/docs/service/interaction-service-api/references/interaction-service-reference/api-interaction-api.html) section for a list of available Interaction Service APIs. **See Also** - _Bring Your Own Channel for Messaging:_ [Enable Bring Your Own Channel for Messaging](https://developer.salesforce.com/docs/service/messaging-partner/guide/messaging-partner-setup.html) - _Bring Your Own Channel for Contact Center as a Service:_ [Enable Bring Your Own Channel for CCaaS](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/enable-messaging-byoc-ccaas.html) # Get Started Before you can start sending API calls, you must prepare your environment. - Set up Enhanced Chat with a custom client implementation. See [Configure a Custom Client Deployment for Enhanced Chat](https://help.salesforce.com/s/articleView?id=service.miaw_deployment_custom.htm). - Publish a deployment. - Optionally customize your deployment. - Reference the deployment name as the `esDeveloperName` value when invoking an Enhanced Chat API endpoint. - If you are implementing user verification, create a signed JSON Web Token (JWT) to authenticate API requests. See [Authorization](https://developer.salesforce.com/docs/service/messaging-api/guide/authorization.md). ### See also - Salesforce Help: [Understanding User Verification](https://help.salesforce.com/s/articleView?id=service.user_verification_overview.htm) - Salesforce Help: [Add User Verification](https://help.salesforce.com/s/articleView?id=service.user_verification.htm) # Get Started Bring Your Own Bot (BYOB) APIs integrate third-party messaging bots with Enhanced Messaging channels. This guide provides the steps to enable Bring Your Own Bot for Messaging. :**note:** Bring Your Own Bot (BYOB) is designed to integrate third-party or custom bots into the Agentforce Service platform for automated customer engagement within messaging conversations. This feature is intended solely for bot-to-customer interactions and does not constitute a general-purpose AI or conversational tool. The integration doesn't support or permit the use of external reps or representatives operating outside the Salesforce Platform. The routing and handoff capabilities are limited to transfers between external bots and Salesforce-licensed service reps operating within Agentforce.: To get started, prepare your environment before you enable Bring Your Own Bot for Messaging. - Make sure that you have the Agentforce Contact Center Digital SKU with the Partner Messaging Bot add-on license. - Make sure that your org has the SCRT2 Integration User (`sfdc_scrt2`) permission set. - Make sure that you can access the GitHub repository. You can access a sample implementation of the interactive Demo UI for API testing at [byo-demo-connector](https://github.com/salesforce-misc/byo-demo-connector). - Enable Omni-Channel Settings. Make sure Omni-Channel settings are enabled for your org, and proper configuration of Omni-Channel routing is done. For more information, see [Enable and Configure Omni-Channel](https://help.salesforce.com/s/articleView?id=service.omnichannel_enable.htm&type=5). - Configure a fallback queue. Make sure a fallback queue is configured for Omni-Channel flows to catch conversations if routing is unsuccessful. For more information, see [Routing Work with Omni-Channel Fallback Mode](https://help.salesforce.com/s/articleView?id=002186102&type=1). ## Next Steps After you understand the BYOB feature and prepare your environment, review the [BYOB Setup Entities](https://developer.salesforce.com/docs/service/messaging-byob/references/byob-reference/byob-setup-entities.html). Then integrate your bot with Service Cloud, starting with [Step 1: Create an External Client App and Configure Policies](https://developer.salesforce.com/docs/service/messaging-byob/guide/create-external-client-app.md). **See Also** - _Interaction Service API:_ [Get Started](https://developer.salesforce.com/docs/service/interaction-service-api/guide/get-started.html) - [Interaction Service APIs (GitHub)](https://github.com/salesforce-misc/interaction-service-apis) - _Interaction Service API:_ [Generate an Access Token](https://developer.salesforce.com/docs/service/interaction-service-api/guide/authorization.html) - _Interaction Service API:_ [Route a Conversation](https://developer.salesforce.com/docs/service/interaction-service-api/references/interaction-service-reference/api-route.html) # Get started With APIs for Enhanced Web Chat To use the JavaScript APIs for Enhanced Web Chat, add the code snippet provided by Salesforce from your deployment settings to your web page. See [Enhanced Web Chat Reference](/docs/service/messaging-web/references) for more details on the APIs. Here are the steps to configure your web page to use the Enhanced Web Chat APIs. 1. From Setup, in the Quick Find box, enter `Embedded Service Deployments`, and select **Embedded Service Deployments**. See [Configure an Enhanced Web Chat Deployment](https://help.salesforce.com/s/articleView?id=service.miaw_configure_web_deployment_1.htm) in Salesforce Help. 2. Click **Code Snippet**. ![Enhanced Web Chat Code Snippet](https://developer.salesforce.com/docs/media/messaging-web/setup-code-snippet-ui1.png) 3. To retrieve the code snippet, follow the on-screen instructions. ![Enhanced Web Chat Code Snippet](https://developer.salesforce.com/docs/media/messaging-web/setup-code-snippet-ui2.png) 4. Add the code snippet to your web page. Here’s an example of a code snippet. ```javascript ``` 5. Add the Enhanced Web Chat APIs to your web page. You can call the APIs inside or outside the code snippet, but call them after the client dispatches the [`onEmbeddedMessagingReady`](/docs/service/messaging-web/guide/event-listeners.html) event. If you call the APIs before receiving this event, they don't execute. **note:** If your Enhanced Web Chat deployment is on an Experience Cloud site, follow the instructions in _Salesforce Help_ to add JavaScript code to the head markup section of your site. See [Configure an Enhanced Web Chat Deployment in an Experience Builder Site](https://help.salesforce.com/s/articleView?id=service.miaw_deployment_experience_builder.htm) in _Salesforce Help_. 6. To ensure that Enhanced Web Chat works optimally, always republish your deployment after testing newly added features and bug fixes. See [Configure an Enhanced Web Chat Deployment](https://help.salesforce.com/s/articleView?id=service.miaw_configure_web_deployment_1.htm) in Salesforce Help. # Get Started with Bring Your Own Channel for CCaaS Bring Your Own Channel for Contact Center as a Service (CCaaS) lets customers connect a third party contact center vendor to Salesforce. This guide provides steps for partner developers to create a solution that integrates Service Cloud with a CCaaS system and package it for distribution on AppExchange. Salesforce admins install the managed package. They then create and maintain a partner contact center with integrated messaging and voice capabilities, add a Messaging channel to a partner telephony contact center, or create a messaging-only partner contact center. To learn more about Bring Your Own Channel for CCaaS, visit our [learning map](https://help.salesforce.com/s/articleView?id=service.byoc_byoccaas_intro.htm) in Salesforce Help. **note:** Bring Your Own Channel for CCaaS has a similar name to another Salesforce product named Bring Your Own Channel for Messaging, which lets customers connect third party messaging services to Salesforce. To set up Bring Your Own Channel for Messaging, visit our [learning map](https://help.salesforce.com/s/articleView?id=service.byoc_byoccaas_intro.htm) in Salesforce Help. To get started, prepare your environment before you enable Bring Your Own Channel for CCaaS. 1. Verify that you have the Digital Engagement SKU with the Partner Messaging add-on license. 2. Verify that your org has the SCRT2 Integration User (API name: sfdc_scrt2) permission set. 3. If you’re using a scratch org to test the managed package, include the [BYOCCaaS](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_scratch_orgs_def_file_config_values.htm#so_byoccaas) add-on feature to the scratch org definition file. 4. Verify that you can access the GitHub repos: - [https://github.com/salesforce-misc/byo-demo-connector](https://github.com/salesforce-misc/byo-demo-connector) to access a sample implementation of the interactive Demo UI, which you’ll set up and use to test the APIs. When you try to access the repos for the first time, you’ll need to set up two-factor authentication access. 5. Determine the contact email address to use for the external client app (ECA). This is the person who will receive notifications about the external client app, such as when a Salesforce administrator views the consumer secret of the ECA. This can be your email address. 6. Configure single sign-on. Set Up Single Sign-On (SSO) between Salesforce and your partner system using Salesforce as your Identity Provider (IdP) provider. 7. [Create a Salesforce DX Project](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_ws_create_new.htm) to manage and develop your app. You're ready to [Enable Bring Your Own Channel for CCaaS](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/enable-messaging-byoc-ccaas.md). # Get Started with Bring Your Own Channel for Messaging Bring Your Own Channel for Messaging integrates external messaging services with Salesforce. Before Salesforce users can [set up](https://help.salesforce.com/s/articleView?id=service.partner_messaging_setup_steps.htm) and use Bring Your Own Channel for Messaging in their orgs, Salesforce messaging partners must first enable the feature. This guide provides steps to enable Bring Your Own Channel for Messaging. To learn more about Bring Your Own Channel, visit our [learning map](https://help.salesforce.com/s/articleView?id=service.byoc_byoccaas_intro.htm) in Salesforce Help. **important:** - Most content in this guide is for Messaging providers who are creating a solution that integrates Service Cloud with their Messaging system and packaging it for distribution on AppExchange. To create your own integration, follow the steps in [Create Your Own Messaging Provider Integration](https://developer.salesforce.com/docs/service/messaging-partner/guide/create-your-own-integration.md). To set up Bring Your Own Channel for Messaging as an admin, see the [Salesforce Help](https://help.salesforce.com/s/articleView?id=service.partner_messaging_intro.htm). - Bring Your Own Channel for Messaging has a similar name to another Salesforce product named Bring Your Own Channel for Contact Center as a Service (CCaaS), which lets customers connect a third party contact center vendor to Salesforce. To set up Bring Your Own Channel for CCaaS, visit our [learning map](https://help.salesforce.com/s/articleView?id=service.byoc_byoccaas_intro.htm) in Salesforce Help. To get started, prepare your environment before you enable Bring Your Own Channel for Messaging. 1. Verify that you have the Digital Engagement SKU with the Partner Messaging add-on license. 2. Verify that your org has the SCRT2 Integration User (`sfdc_scrt2`) permission set. 3. If you’re using a scratch org to test the managed package, include the [BYOOTT](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_scratch_orgs_def_file_config_values.htm#so_byoott) add-on feature to the scratch org definition file. 4. Verify that you can access the GitHub repos: - to reference the schemas for the interaction service inbound APIs and outbound events schema. - to access a sample implementation of the interactive Inbound/Outbound Message Demo UI, which you’ll set up and use to test the inbound API. 5. Identify a contact email address for the external client app (ECA). This address receives notifications about the app, such as when a Salesforce administrator views the consumer secret of the ECA. 6. [Create a Salesforce DX Project](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_ws_create_new.htm) to manage and develop your app. You're ready to [Enable Bring Your Own Channel for Messaging](https://developer.salesforce.com/docs/service/messaging-partner/guide/messaging-partner-setup.md). # Get Started with Chat Get rolling quickly with chat sessions between your customers and your agents. ## Before You Begin **important:** 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](https://help.salesforce.com/s/articleView?id=service.miaw_intro_landing.htm&type=5) before that date. Messaging offers many of the [chat features](https://help.salesforce.com/s/articleView?id=service.miaw_chat_vs_messaging.htm&type=5) that you love plus asynchronous conversations that can be picked back up at any time. Learn about chat retirement in [Help](https://help.salesforce.com/s/articleView?id=001790618&type=1). 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](https://developer.salesforce.com/docs/service/service-sdk-android/guides/shared/live-agent-cloud-setup.md) for more information. This tutorial shows you how to get Chat into your iOS app. 1. Create an Xcode project. For this example, let’s make a Single View Application. Name it `HelloChat`. ![Single view application](https://developer.salesforce.com/docs/media/service-sdk/quickstart-knowledge-ios-singleviewcontroller.png '{"class": "image-xl"}') ![Hello chat setup](https://developer.salesforce.com/docs/media/service-sdk/quickstart-lac-ios-hellolac.png '{"class": "image-xl"}') 2. Install the SDK as described in [Install the Service Chat SDK for iOS](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/ios-sdk-install-overview.md). 3. Go to your storyboard and place a button somewhere on the view. Name it `Chat`. ![Place button](https://developer.salesforce.com/docs/media/service-sdk/quickstart-knowledge-ios-button.png '{"class": "image-lg"}') 4. Add a `Touch Up Inside` action to your `UIViewController` implementation. Name it `launchChat`. ![Button action](https://developer.salesforce.com/docs/media/service-sdk/quickstart-lac-ios-action.png '{"class": "image-lg"}') ![showSOS action](https://developer.salesforce.com/docs/media/service-sdk/quickstart-lac-ios-showchat.png '{"class": "image-md"}') 5. Import the SDK. Wherever you intend to use the Chat SDK, be sure to import the ServiceCore framework and the ServiceChat framework. In Swift: ```java import ServiceCore import ServiceChat ``` In Objective-C: ```java @import ServiceCore; @import ServiceChat; ``` 6. Launch a chat session from within the `launchChat` method. From the button action implementation, launch chat using the [`showChat(with:showPrechat:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSChatInterface.html#/c:objc(cs)SCSChatInterface(im)showChatWithConfiguration:showPrechat:>) method on [`SCSChatInterface`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSChatInterface.html). In Swift: ```java @IBAction func launchChat(sender: AnyObject) { // Create configuration object if let config = SCSChatConfiguration(liveAgentPod: "YOUR_POD_NAME", orgId: "YOUR_ORG_ID", deploymentId: "YOUR_DEPLOYMENT_ID", buttonId: "YOUR_BUTTON_ID") { // Start the session ServiceCloud.shared().chatUI.showChat(with: config) } } ``` In Objective-C: ```java - (IBAction)launchChat:(id)sender { SCSChatConfiguration *config = [[SCSChatConfiguration alloc] initWithLiveAgentPod:@"YOUR_POD_NAME" orgId:@"YOUR_ORG_ID" deploymentId:@"YOUR_DEPLOYMENT_ID" buttonId:@"YOUR_BUTTON_ID"]; // Start the session [[SCServiceCloud sharedInstance].chatUI showChatWithConfiguration:config]; } ``` 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.init` function with the **pod**, the **deploymentId**, and **orgId** as arguments. Copy the **deploymentId** value. ![Deployment ID](https://developer.salesforce.com/docs/media/service-sdk/chat_org_deployment_id.png '{"class": "image-xl"}') For instance, if the deployment code contains the following information: ```html ``` The deployment ID value is: ```java 573B00000005KXz ``` 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 `id` for the button from the JavaScript snippet. ![Button ID](https://developer.salesforce.com/docs/media/service-sdk/chat_org_button_id.png '{"class": "image-xl"}') For instance, if your chat button code contains the following information: ```html ``` The button ID value is: ```java 575C00000004h3m ``` Be sure to omit the `liveagent_button_online_` text from the ID when using it in the SDK. 7. Launch **Service Cloud Console**. From the **Omni-Channel** widget, ensure that an agent is online. ![Omni-channel online](https://developer.salesforce.com/docs/media/service-sdk/quickstart-lac-ios-omnichannel.png '{"class": "image-md"}') 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. ![Chat publisher](https://developer.salesforce.com/docs/media/service-sdk/lac-chat-publisher-ios.png '{"class": "image-sm"}') # Get Started with Conversation Data API Use the Conversation Data API to manage enhanced messaging conversations, such as retrieving conversation entry data and deleting messaging end user information. ## Enable Conversation Data API 1. From Setup, in the Quick Find box, enter Conversation Service API, and click **Conversation Service API**. 2. Click the toggle to **On**. ## Configure an External Client App 1. Configure an [External Client App](https://help.salesforce.com/s/articleView?id=xcloud.external_client_apps.htm) and [Enable OAuth Settings for API Integration](https://help.salesforce.com/s/articleView?id=xcloud.connected_app_create_api_integration.htm). 1. From Setup, enter `App` in the Quick Find box, and select **External Client App Manager**. 2. Click **New External Client App**. 3. Enter the external client app name, API name, and contact email fields. 4. For distribution state, select **Local**. 5. In the OAuth Settings area of the page, select **Enable OAuth**. 6. For callback URL, enter any valid URL. For example: `https://login.salesforce.com/services/oauth2/success`. 7. For OAuth scopes, select **Access the Salesforce API Platform (sfap_api)**. 8. Enable **Enable Client Credentials Flow**. 9. Disable **Require Proof Key for Code Exchange (PKCE) Extension for Supported Authorization Flows**. 10. Disable **Require Secret for Web Server**. 11. Disable **Require Secret for Refresh Token**. 12. Enable **Issue JSON Web Token (JWT)-based access tokens for named users**. 13. Save the new external client app. 2. [Configure External Client App OAuth Policies](https://help.salesforce.com/s/articleView?id=xcloud.configure_external_client_app_policies.htm). 1. Navigate to the **Policies** tab of your newly created external client app, expand the **OAuth Policies** dropdown, and click **Edit**. 2. Enable **Enable Client Credentials Flow**. 3. To allow Salesforce to return access tokens, you must select an execution user for the flow. This user must have the API Only User permission. We recommend creating a user specifically for this integration. Set **Run As** to select the user that you want to assign the client credentials flow. 4. Under **Named User JWT-Based Access Token Settings**, select a token timeout time that meets your needs. 5. (Optional) Under **App Authorization**, relax IP restrictions if your integration is calling from outside trusted Salesforce IP ranges. 6. Save your changes. 3. Retrieve Your Credentials. 1. Navigate to the **Settings** tab of your external client app, expand the OAuth Settings dropdown and click **Consumer Key and Secret**. 2. Copy your **Consumer Key** (client ID) and **Consumer Secret**. 4. Use the Consumer Key and Consumer Secret to follow the steps outlined in [OAuth 2.0 Client Credentials Flow for Server-to-Server Integration](https://help.salesforce.com/s/articleView?id=xcloud.remoteaccess_oauth_client_credentials_flow.htm) to obtain an access token. ## Call Conversation Data API Use the access token you generated to call the Conversation Data API by setting the Authorization header to `Bearer YOUR_ACCESS_TOKEN`. See Also [External Client Apps](https://help.salesforce.com/s/articleView?id=xcloud.external_client_apps.htm) # Get Started with Enhanced In-App Chat We provide a UI SDK and a Core SDK for both [iOS](https://developer.salesforce.com/docs/service/messaging-in-app/guide/ios-guidelines.md) and [Android](https://developer.salesforce.com/docs/service/messaging-in-app/guide/android-guidelines.md). The UI SDK gives you a ready-to-use messaging user interface. You can use the default colors, UI text, and icons, or you can customize the UI so that it looks and feels like the rest of your mobile app. The Core SDK gives you access to the lower-level APIs without any UI elements. With the Core SDK, developers can build the UI experience to their specifications. For most customers, using the UI SDK with some customizations is the best balance between implementation effort and a customized interface. **Note:** the UI SDK is in maintenance mode. We continue to support existing implementations with critical updates. New features are released only in the [Agentforce Mobile SDK](https://developer.salesforce.com/docs/ai/agentforce-mobile-sdk/guide/agentforce-mobile-sdk.html). ![Enhanced In-App Chat Effort vs Customization](https://developer.salesforce.com/docs/media/messaging-in-app/messaging-effort-vs-customize.png) ## UI SDK (+ Core SDK) If you want to take advantage of our out-of-the-box user interface and user experience, try the Enhanced In-App Chat UI SDK ([iOS](https://developer.salesforce.com/docs/service/messaging-in-app/guide/ios-ui-sdk.md), [Android](https://developer.salesforce.com/docs/service/messaging-in-app/guide/android-ui-sdk.md)). To build a UI SDK app, add the In-App Messaging view to your app. With the UI SDK, you get all the latest Enhanced In-App Chat features built right into the user interface, including [bot support](https://help.salesforce.com/s/articleView?id=service.messaging_considerations_bots.htm), [pre-chat forms](https://help.salesforce.com/s/articleView?id=service.miaw_custom_prechat_2.htm), [sending and receiving photos and files](https://help.salesforce.com/s/articleView?id=service.livemessage_agent_send_files.htm), [push notifications](https://help.salesforce.com/s/articleView?id=service.miaw_inapp_push.htm), [estimated wait time](https://help.salesforce.com/s/articleView?id=service.miaw_estimated_wait_time.htm). In addition, you can customize the colors, the UI text, and the icons. ![Enhanced In-App Chat iOS Example](https://developer.salesforce.com/docs/media/messaging-in-app/messaging-ios-device-small.png) ## Core SDK Only To create your own UI from scratch, use the Core SDK ([iOS](https://developer.salesforce.com/docs/service/messaging-in-app/guide/ios-core-sdk.md), [Android](https://developer.salesforce.com/docs/service/messaging-in-app/guide/android-core-sdk.md)), which provides you with all the basic messaging functionality without any user interface elements. **note:** ​​The UI SDK also includes the Core SDK. ## Next Steps Before setting up the SDK, review the [Before You Begin](https://developer.salesforce.com/docs/service/messaging-in-app/guide/before-you-begin.md) content and then [set up your Salesforce org](https://developer.salesforce.com/docs/service/messaging-in-app/guide/org-setup-overview.md) to use Enhanced In-App Chat. From there, you can get started with your [iOS](https://developer.salesforce.com/docs/service/messaging-in-app/guide/ios-guidelines.md) or [Android](https://developer.salesforce.com/docs/service/messaging-in-app/guide/android-guidelines.md) app. To learn more about Enhanced Chat, visit our [learning map](https://help.salesforce.com/s/articleView?id=service.miaw_intro_landing.htm). For additional capabilities across Enhanced Chat, see the [Enhanced Chat API Developer Guide](https://developer.salesforce.com/docs/service/messaging-api/overview). # Get Started with Enhanced Web Chat This guide provides information about using JavaScript APIs and Lightning Web Components (LWC) to customize your Enhanced Web Chat experience. For example, we describe how authenticated users can have a personalized conversation with a rep by using the User Verification API. We show you how to send customer data to a rep by using the Hidden Pre-Chat API and how to show an auto-response component to your customer, such as a survey. We explain how to build a custom pre-chat form with LWC. And there is so much more. To learn more about Enhanced Chat, visit our [learning map](https://help.salesforce.com/s/articleView?id=service.miaw_intro_landing.htm) in Salesforce Help. For additional capabilities across Enhanced Chat, see the [Enhanced Chat API Developer Guide](https://developer.salesforce.com/docs/service/messaging-api/overview). # Get Started With Lightning Web Components for Enhanced Web Chat Build Lightning Web Components (LWC) to customize your UI for Enhanced Web Chat. With LWC, leverage HTML and JavaScript for a modern experience. Before you create a custom LWC, get familiar with building LWC, deploying them to your org, and adding them to your Embedded Service Deployment. - [_Salesforce Trailhead_: Build Lightning Web Components](https://trailhead.salesforce.com/content/learn/trails/build-lightning-web-components) - [_Lightning Web Components Developer Guide_: Get Started with Lightning Web Components](https://developer.salesforce.com/docs/platform/lwc/guide) - [_Salesforce Help_: Customize Your UI with Lightning Web Components](https://help.salesforce.com/s/articleView?id=service.messaging_lightning_web_components.htm). # Get Started with Open CTI Build and integrate third-party computer-telephony integration (CTI) systems with Salesforce Call Center using a browser-based JavaScript API. | Supported Editions | | -------------------------------------------------------------------------------------------------------------------------- | | Available in: Salesforce Classic (not available in all orgs) and Lightning Experience | | Available in: **Essentials**, **Professional**, **Enterprise**, **Performance**, **Unlimited**, and **Developer** Editions | **important:** Open CTI is in maintenance mode and is scheduled for retirement in February 2028. No new features or enhancements are being added to Open CTI. Effective immediately, Open CTI is deprecated and unavailable for newly created Agentforce Service orgs. To ensure long-term compatibility and access to the latest innovations, we recommend transitioning your development efforts to Salesforce Voice. For more information, see this [Knowledge Article](https://help.salesforce.com/s/articleView?id=005306437&type=1), [learning map](https://help.salesforce.com/s/articleView?id=service.cti_migrate_map.htm), and [developer migration guide](/docs/service/api-cti/guide/migrate-cti.html). To display CTI functionality in Salesforce, Open CTI uses browsers as clients. With Open CTI, you can make calls from a softphone directly in Salesforce without installing CTI adapters on your machines. After you develop an Open CTI implementation, you can integrate it with Salesforce using Salesforce Call Center. **note:** The way you implement Open CTI depends on your org’s user interface. There are separate Open CTI APIs for Salesforce Classic and Lightning Experience. You can’t swap the two Open CTI APIs in custom JavaScript code because they behave and function differently. Make sure that you think about where you want to implement your CTI system before you begin developing. ![Architecture Overview](https://developer.salesforce.com/docs/media/CTI_arch_overview.png) With Open CTI, you can: - Build CTI systems that integrate with Salesforce without the use of CTI adapters. - Create customizable softphones (call-control tools) that function as fully integrated parts of Salesforce and the Salesforce console. - Provide users with CTI systems that are browser and platform agnostic, for example, CTI for Microsoft® Internet Explorer®, Mozilla® Firefox®, Apple® Safari®, or Google Chrome™ on Mac, Linux, or Windows machines. To implement Open CTI, it helps if you have a basic familiarity with: CTI, JavaScript, Visualforce, web services, software development, the Salesforce console, and the Salesforce Call Center. Keep in mind that Open CTI is only available for use with JavaScript pages. The examples in this guide are in JavaScript. You can use Open CTI in JavaScript to embed API calls and processes. - **[Why Your UI Matters—Open CTI for Salesforce Classic vs. Lightning Experience](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-intro-lightning-vs-classic.md)** The way you implement Open CTI depends on your org’s user interface. There are separate Open CTI APIs for Salesforce Classic and Lightning Experience. - **[Method Parity Between Open CTI for Salesforce Classic and Lightning Experience](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-intro-lightning-vs-classic-methods.md)** The methods provided in the two APIs aren’t always the same. Some Salesforce Classic methods aren’t available in Lightning Experience and some have been renamed. - **[Open CTI and Other Voice Solutions](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-when-to-use.md)** Open CTI integrates third-party CTI systems with Salesforce. But do you wonder what came before? Or what the difference is between Open CTI and Sales Dialer? - **[Customize Open CTI Functionality](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-intro-customize.md)** Your organization may have complex business processes that are unsupported by Open CTI functionality. Not to worry. When this is the case, the Lightning platform offers advanced administrators and developers several ways to implement custom functionality. - **[Open CTI Support Policy](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-support.md)** Open CTI is in maintenance mode and is scheduled for retirement in February 2028. No new features or enhancements are being added to Open CTI. Effective immediately, Open CTI is deprecated and unavailable for newly created Agentforce Service orgs. To ensure long-term compatibility and access to the latest innovations, we recommend transitioning your development efforts to Salesforce Voice with Partner Telephony. # Get Started with the Service Connector API The Connector API is the interface between your Contact Center as a Service (CCaaS) or telephony system and your Salesforce org. This API allows you to pass information to Salesforce and receive events back from Salesforce. **important:** The Connector API is for partners who are implementing Bring Your Own Channel for CCaaS or Salesforce Voice with Partner Telephony. ## The Basics To use the Connector API, you must call `initializeConnector()` (imported from Github) as the first step during the window load process. This function is part of the [Base Connector API](/docs/service/service-connector-api/references/connector-api-262/service-connector-api-base.html) and ensures that Salesforce can reliably establish two-way communication with the connector without any timing issues. The [`initializeConnector()`](/docs/service/service-connector-api/references/connector-api-262/service-connector-base-initializeconnector.html) function takes your Connector API interface implementation as a parameter. Salesforce holds onto the `connector` implementation object during the entire session and this object must implement the required [Connector API Methods](/docs/service/service-connector-api/references/connector-api-262/service-connector-api-interface.html). If the connector requires loading any resources, we recommend that you do this outside of the connector object, so that they can be loaded asynchronously without delaying the call to `initializeConnector()`. After you call `initializeConnector()`, Salesforce calls the `init()` method on the Connector API interface with call center configuration information. This method returns a promise and can asynchronously load any resources before resolving the promise. ```html ``` ```javascript import { initializeConnector } from "scv-connector-base"; import { Sdk } from "./vendor-sdk"; const connector = new PartnerConnectorInterfaceImplementation(); // Calling the Connector API Base window.addEventListener("load", () => { /** * initializeConnector should be called as early as possible * to allow Salesforce to reliably establish communication * with the connector */ initializeConnector(connector); }); // Connector API interface implementation export class PartnerConnectorInterfaceImplementation { constructor(state) { this.sdk = new Sdk(state); } /** * Called by Salesforce to initialize the connector * @param {object} callCenterConfig - SFDC Contact Center Settings */ init(callCenterConfig) { return new Promise((resolve, reject) => { this.sdk.performSSO(callCenterConfig).then((success) => { if (success) resolve(new InitResult({})); else reject("Failed to perform SSO"); }); }); } } ``` ## Best Practices Returning JavaScript promises in the connector greatly reduces the need to produce events or errors. Instead, the connector simply returns a resolved or rejected promise. A Connector API interface implementation must return a promise that resolves to a value of a specific type. Here are some sample promises along with type checking. ```javascript // Base connector try { const result = await vendorConnector.setAgentStatus(agentStatus); // Validate result is of type GenericResult else throw error dispatchEvent(constants.EVENT_TYPE.SET_AGENT_STATUS_RESULT, { success }); } catch (e) { dispatchError(constants.ERROR_TYPE.CAN_NOT_SET_AGENT_STATUS, e); } // Connector setAgentStatus(agentStatus) { return this.sdk.setAgentStatus(agentStatus).then((success) => { return new GenericResult({success}); }); } // Vendor setAgentStaus(agentStatus) { return new Promise((resolve, reject) => { // Perform backend operations if (success) { resolve(); } else { reject(); } }); } ``` For telephony systems, if you’re using callbacks, you can convert them to promises as shown here: ```javascript // Callback function setAgentStatus(agentStatus) { getAgent().setAgentStatus(agentStatus, { success: (success) => { getTelephonyEventEmitter().emit(Constants.EVENT_TYPE.SET_AGENT_STATUS_RESULT, { success }); }, failure: (response) => { getTelephonyEventEmitter().emit(Constants.EVENT_TYPE.SET_AGENT_STATUS_RESULT, { success: false, }); }, }); } // Promise function setAgentStatus(agentStatus) { return new Promise((resolve, reject) => { getAgent().setAgentStatus(agentStatus, { success: (success) => { resolve({ success }); }, failure: (response) => { reject(); }, }); }); } ``` **See Also** - [Service Base Connector API](/docs/service/service-connector-api/references/connector-api-262/service-connector-api-base.html) - [Service Connector API Methods](/docs/service/service-connector-api/references/connector-api-262/service-connector-api-interface.html) # Get Status of Operation Retrieve the status of a previously submitted asynchronous job. For example, `upsertCI` a bulk upsert operation. Use this query to check the progress and completion status of the asynchronous operations. ## Special Access Rules To query an operation status, you must have the following user permissions: - IT Service Configuration Item Type Manager - IT Service Configuration Item Owner ## Request ### JSON example This example shows a sample request to get the status of an asynchronous job. ```nolang query GetStatus { getStatus(id: 108) { id status updatedAt totalRecordCount successRecordCount failureRecordCount details } } ``` ### Properties |Name|Type|Description|Required or Optional|Available Version| |----|----|-----------|--------------------|-----------------| |`id`|Integer|The unique identifier of the asynchronous job. This ID is returned by mutations such as `upsertCI` when an asynchronous operation is initiated.|Required|66.0| ## Response ### JSON example This example is a sample response from the `getStatus` query. ```nolang { "data": { "getStatus": { "id": 108, "status": "Completed", "updatedAt": "2025-11-14T10:16:05.123456Z", "details": "Job completed - Upsert CI - Canonical API (5 items)", "totalRecordCount": 5, "successRecordCount": 5, "failureRecordCount": 0 } } } ``` ### Properties |Name|Type|Description|Available Version| |----|----|-----------|-----------------| |`id`|Integer|The ID of the job or operation.|66.0| |`status`|String|The current status of the job.|66.0| |`updatedAt`|String|The date and time when the job status was last updated, in YYYY-MM-DDTHH:MM:SSZ format.|66.0| |`details`|String|User message that provides additional context about the job status or completion.|66.0| |`totalRecordCount`|Integer|The total number of records processed in the job.|66.0| |`successRecordCount`|Integer|The number of records that were successfully processed.|66.0| |`failureRecordCount`|Integer|The number of records that failed to process.|66.0| # Get the Appointment Invitation Details An appointment invitation has information that users can use for booking appointments. Use the `Query()` request to run Salesforce Query Language (SOQL) on the AppointmentInvitation object to retrieve the appointment invitation details, such as the appointment invitation ID, appointment topic ID (work type group ID), appointment topic type, service territory ID, availability start date, and availability end date. For a complete list of AppointmentInvitation object fields, see [AppointmentInvitation](https://developer.salesforce.com/docs/atlas.en-us.salesforce_scheduler_developer_guide.meta/salesforce_scheduler_developer_guide/sforce_api_objects_appointmentinvitation.htm). 1. Make a [`Query()`](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_query.htm) request on the AppointmentInvitation object. **Sample REST API Request** **note:** To ensure that the invitation URL is active, set the value of the `IsActive` query parameter to true. ```nolang https://yourInstance.salesforce.com//services/data/vXX.X/query/?q=​SELECT+AppointmentTopicId,AppointmentTopicType,BookingEndDate,BookingStartDate,​Id,ServiceTerritoryId+FROM+AppointmentInvitation+​WHERE+InvitationIdentifier+=+'f482d103-4792-40ac-864a-57db0c13161b'+AND+IsActive+=+true ``` **Sample Response** ```nolang { "totalSize" : 1, "done" : true, "records" : [ { "attributes" : { "type" : "AppointmentInvitation", "url" : "/services/data/v55.0/sobjects/AppointmentInvitation/1S8x000000000oHCAQ" }, "AppointmentTopicId" : "0VSx00000002Uh4GAE", "AppointmentTopicType" : "WorkTypeGroup", "BookingEndDate" : "2022-06-30", "BookingStartDate" : "2022-06-14", "Id" : "1S8x000000000oHCAQ", "ServiceTerritoryId" : "0Hhx00000002LzGCAU" } ] } ``` 2. Parse the response to save the values. You need these values to fetch the invitation availability time slots. After you fetch the invitation details, retrieve the service resources associated with the invitation URL. # Get the Appointment Invitee Details An appointment invitee has information about the participant and the resources required for creating an appointment invitation URL. Use the `Query()` request to run Salesforce Query Language (SOQL) on the AppointmentInvitee object to retrieve the appointment invitee details, such as the service territory ID, appointment topic ID, service resource ID, and available booking start and end dates, which you need for retrieving the calendar availability for the invitation URL. You can also retrieve additional details that you need when creating an appointment, such as whether the resources are primary or required. For a complete list of AppointmentInvitee object fields, see [AppointmentInvitee](https://developer.salesforce.com/docs/atlas.en-us.salesforce_scheduler_developer_guide.meta/salesforce_scheduler_developer_guide/sforce_api_objects_appointmentinvitee.htm). 1. Make a [`Query()`](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_query.htm) request on the AppointmentInvitee object. **Sample REST API Request** ```nolang https://yourInstance.salesforce.com/services/data/vXX.X/query/?q=​SELECT+AppointmentInvitationId,Id,IsPrimaryResource,IsRequiredResource,​Name,ParticipantServiceResourceId+FROM+AppointmentInvitee+​WHERE+AppointmentInvitationId+=+'1S8x000000000oHCAQ' ``` **Sample Response** ```nolang { "totalSize" : 1, "done" : true, "records" : [ { "attributes" : { "type" : "AppointmentInvitee", "url" : "/services/data/v55.0/sobjects/AppointmentInvitee/0y6x000000000pFAAQ" }, "AppointmentInvitationId" : "1S8x000000000oHCAQ", "Id" : "0y6x000000000pFAAQ", "IsPrimaryResource" : true, "IsRequiredResource" : true, "Name" : "AITE-0247", "ParticipantServiceResourceId" : "0Hnx000000007d7CAA" } ] } ``` 2. Parse the response to save the values. You need these values to fetch the invitation availability time slots. After you fetch the appointment invitation and appointment invitee details, create a page on your website to show the calendar availability of the service resources associated with the invitation. # Get the Translated Values of Multiple Survey Fields in One or More Languages After survey fields are translated into one or more languages, you can view the translated values of multiple survey fields in the translated languages. This resource is available in REST API versions 48.0 and later. **note:** This URI can only be used for the flow process type `Survey`. ## Syntax **URI:** `/services/data/vXX.X/localizedvalue/records/get` **Formats:** JSON **HTTP methods:** POST **Request body JSON example** ```nolang [ { "developerName": "Flow.Flow.MyFlow.1.Choice.Choice_1_Master.InputLabel", "language": "en_US" }, { "developerName": "Flow.Flow.MyFlow.1.Choice.Choice_1_Master.InputLabel", "language": "zh_CN" } ] ``` **Request parameters** |Parameter|Description| |---------|-----------| |`developerName`|Required. Developer name of the flow field.| |`language`|Required. Language into which the flow field was translated.| **Response parameters** |Parameter|Description| |---------|-----------| |`createdBy`|ID of the user who translated the flow field.| |`createdDate`|Date and time the flow field was translated.| |`developerName`|Developer name of the flow field.| |`language`|Language into which the flow field was translated.| |`value`|Translated value of the flow field.| |`isOutofDate`|Indicates if the flow field is out of date.| ## Example ```nolang [ { "createdBy": "005xxx", "createdDate": "2018-09-14T00:10:30Z", "developerName": "Flow.Flow.MyFlow.1.Choice.Choice_1_Master.InputLabel", "language": "en_US", "value": "China", "isOutOfDate": true }, { "createdBy": "005xxx", "createdDate": "2018-09-14T00:10:30Z", "developerName": "Flow.Flow.MyFlow.1.Choice.Choice_1_Master.InputLabel", "language": "zh_CN", "value": "中國", "isOutOfDate": true } ] ``` # Get to Know Lightning Console Get started with the Salesforce console in Lightning Experience. Use workspace API methods from Lightning pages either in the utility bar or in a Lightning console app. Here’s how a Lightning console app works: ![Screen shot of a custom Lightning console app.](https://developer.salesforce.com/media/api-console/console_lex.png "Lightning Console App User Interface") - The App Launcher (1) lets you switch between apps. To switch to another console app or back to a standard app, use the App Launcher. The name of the app you’re currently in is displayed next to the App Launcher. - The navigation menu (2) displays the navigation item you currently have selected. To open the navigation menu, click . From there, you can view or edit your navigation items. Selecting a navigation item opens the navigation item’s home page. Objects open in table view. Opening a record changes the view to split view. Once in split view, click the navigation item again to switch back to table view, or use the **Display as** dropdown. - Records open in workspace tabs, and related records opened from inside a workspace tab open in subtabs (3). You can refresh, pin, customize, and close a tab using the tab menu. You can also open navigation items in a new workspace tab by using **Ctrl+click** or **Cmd+click**. - The split view panel (4) can be hidden with. Records opened from the split view panel open in new workspace tabs. - The utility bar (5) lets you access common processes and tools like History and Notes. # Get to Know the Utility Bar The utility bar is a specialized type of Lightning page that gives your users quick access to common productivity tools. Utility bars are supported in Lightning Experience for desktop only. A utility is broadly defined as a single-column Lightning page. Salesforce provides you with several ready-to-use utilities, such as Recent Items, History, and Notes. You can also make your own, and customize the utility bar in Setup. From Setup, enter `App Manager` in the Quick Find box, then select **App Manager**. Either click **New Lightning App** to create an app, or click **Edit** next to an existing Lightning app to add a utility bar or edit the existing one. The utility bar API includes a set of methods for working with utilities and the utility bar. To add a utility bar, add at least one utility item that isn’t a background utility item. To remove a utility bar, remove all non-background utility items from your app. ![A guided tour of the utility bar.](https://developer.salesforce.com/media/api-console/api_console_utility_bar.png) 1. The utility bar. This utility bar includes four utilities: Chatter Feed, Quip, History, and Notes. Each utility has an icon and label. 2. The selected utility. The selected utility opens in a panel. 3. The panel header, showing the panel icon and label. **See Also** - [*Salesforce Help*: Add a Utility Bar to Lightning Apps](https://help.salesforce.com/articleView?id=apps_lightning_utilities.htm) - [Methods for the Utility Bar in Lightning Experience](https://developer.salesforce.com/docs/service/api-console/guide/utilitybarapi/sforce-api-console-methods-lightning-utilitybarapi.md) - [Using Background Utility Items](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-js-lightning-background-utility-item.md) # Get Translated Value of a Survey Field After a survey field is translated into a particular language, you can use this resource to get the translated value of the survey field. This resource is available in REST API version 48.0 and later. **note:** This URI can only be used for the flow process type `Survey`. ## Syntax **URI:** `/services/data/vXX.X/localizedvalue/record/developerName/language` **Formats:** JSON **HTTP methods:** GET **Authentication:** `Authorization: Bearer token` **Request body:** None **Request parameters** |Path Parameter|Description| |--------------|-----------| |`developerName`|Required. The developer name of the flow field. For example, `Flow.Flow.MyFlow.1.Choice.Choice_1_Master.InputLabel`| |`language`|Required. Language of the translated field. Possible values are `da`, `nl_NL`, `fi`, `fr`, or `de`.| **Response parameters** |Parameter|Description| |---------|-----------| |`createdBy`|ID of the user who translated the flow field.| |`createdDate`|Date and time the flow field was translated.| |`developerName`|Developer name of the flow field.| |`language`|Language into which the flow field was translated.| |`value`|Translated value of the flow field.| |`isOutofDate`|Indicates if the flow field is out of date.| ## Example ```nolang { "createdBy": "005xxx", "createdDate": "2018-09-14T00:10:30Z", "developerName": "Flow.Flow.MyFlow.1.Choice.Choice_1_Master.InputLabel", "language": "zh_CN", "value": "中國", "isOutOfDate": true } ``` # Get Work Type Default to the work type that is associated with the service territory and work type group. A work type group represents a general appointment category or topic, such as a home loan or investment. 1. Use the `Query()` request on the `WorkTypeGroupMember` object to retrieve the work types associated with the work type group selected on the Select Work Type Group screen. **Sample Request** This sample REST API call uses the `Query()` request to retrieve the work types. ```nolang https://YOUR_INSTANCE.salesforce.com/services/data/vXX.X/query/?q= SELECT+WorkTypeId,WorkType.Name+FROM+WorkTypeGroupMember+WHERE+WorkTypeGroupId+=+'0VSx000000014DmGAI' ``` Where `YOUR_INSTANCE` is a variable. **Sample Response** The request returns the work type records. ```nolang { "totalSize": 2, "done": true, "records": [ { "attributes": { "type": "WorkTypeGroupMember", "url": "/services/data/v55.0/sobjects/WorkTypeGroupMember/0Wzx000000013tICAQ" }, "WorkTypeId": "08qx000000014fnAAA", "WorkType": { "attributes": { "type": "WorkType", "url": "/services/data/v55.0/sobjects/WorkType/08qx000000014fnAAA" }, "Name": "WT 3" } }, { "attributes": { "type": "WorkTypeGroupMember", "url": "/services/data/v55.0/sobjects/WorkTypeGroupMember/0Wzx000000013tJCAQ" }, "WorkTypeId": "08qx000000014fwAAA", "WorkType": { "attributes": { "type": "WorkType", "url": "/services/data/v55.0/sobjects/WorkType/08qx000000014fwAAA" }, "Name": "WT 4" } } ] } ``` 2. Use the `Query()` request on the `ServiceTerritoryWorkType` object by specifying the work type records retrieved in the previous step to default the work type based on the selected service territory and work type group. **Sample Request** This sample REST API call uses the `Query()` request to default the work type. ```nolang https://YOUR_INSTANCE.salesforce.com/services/data/vXX.X/query/?q= SELECT+WorkTypeId,WorkType.Name+FROM+ServiceTerritoryWorkType+WHERE+ServiceTerritoryId+=+'0Hhx000000012oSCAQ'+AND+WorkTypeId+IN+('08qx000000014fnAAA','08qx000000014fwAAA') ``` Where `YOUR_INSTANCE` is a variable. **Sample Response** The request returns the work type records. ```nolang { "totalSize": 1, "done": true, "records": [ { "attributes": { "type": "ServiceTerritoryWorkType", "url": "/services/data/v55.0/sobjects/ServiceTerritoryWorkType/0VEx00000001Ag4GAE" }, "WorkTypeId": "08qx000000014fnAAA", "WorkType": { "attributes": { "type": "WorkType", "url": "/services/data/v55.0/sobjects/WorkType/08qx000000014fnAAA" }, "Name": "WT 3" } } ] } ``` On the next page in your app, you can show the service resources and their availability. # Get Work Type Groups A work type group represents a general appointment category or topic, such as a home loan or investment. Show your users your work type groupson the landing page of your app by retrieving the list of work type groups from your Salesforce instance. Your users can select a work type group from the list while booking appointments. 1. Create a page to show your work type groups. 2. To retrieve the list of work type groups from your Salesforce instance, use the `Query()` request on the `WorkTypeGroup` object. **Sample Request** ```nolang https://YOUR_INSTANCE.salesforce.com/services/data/v68.0/query/?q= SELECT+Id,+Name+From+WorkTypeGroup+Where+isActive+=+true+ORDER+BY+NAME ``` Where `YOUR_INSTANCE` is a variable. **Sample Response** The request returns the work type group records. ```nolang { "totalSize": 13, "done": true, "records": [ { "attributes": { "type": "WorkTypeGroup", "url": "/services/data/v56.0/sobjects/WorkTypeGroup/0VSS700000009NdOAI" }, "Id": "0VSS700000009NdOAI", "Name": "Create Account" }, { "attributes": { "type": "WorkTypeGroup", "url": "/services/data/v56.0/sobjects/WorkTypeGroup/0VSS700000009YmOAI" }, "Id": "0VSS700000009YmOAI", "Name": "Parent 1" }, { "attributes": { "type": "WorkTypeGroup", "url": "/services/data/v56.0/sobjects/WorkTypeGroup/0VSS70000004DuiOAE" }, "Id": "0VSS70000004DuiOAE", "Name": "Parent topic Create" }, { "attributes": { "type": "WorkTypeGroup", "url": "/services/data/v56.0/sobjects/WorkTypeGroup/0VSS700000009YwOAI" }, "Id": "0VSS700000009YwOAI", "Name": "test" }, { "attributes": { "type": "WorkTypeGroup", "url": "/services/data/v56.0/sobjects/WorkTypeGroup/0VSS700000009Z1OAI" }, "Id": "0VSS700000009Z1OAI", "Name": "test 32" }, { "attributes": { "type": "WorkTypeGroup", "url": "/services/data/v56.0/sobjects/WorkTypeGroup/0VSS70000004DunOAE" }, "Id": "0VSS70000004DunOAE", "Name": "test 32" }, { "attributes": { "type": "WorkTypeGroup", "url": "/services/data/v56.0/sobjects/WorkTypeGroup/0VSS700000009ZaOAI" }, "Id": "0VSS700000009ZaOAI", "Name": "Virtual WTG" }, { "attributes": { "type": "WorkTypeGroup", "url": "/services/data/v56.0/sobjects/WorkTypeGroup/0VSS70000004DvWOAU" }, "Id": "0VSS70000004DvWOAU", "Name": "WorkTypeGrp1" }, { "attributes": { "type": "WorkTypeGroup", "url": "/services/data/v56.0/sobjects/WorkTypeGroup/0VSS700000009TvOAI" }, "Id": "0VSS700000009TvOAI", "Name": "Work_Type_Group_48368" }, { "attributes": { "type": "WorkTypeGroup", "url": "/services/data/v56.0/sobjects/WorkTypeGroup/0VSS700000009TqOAI" }, "Id": "0VSS700000009TqOAI", "Name": "Work_Type_Group_67304" }, { "attributes": { "type": "WorkTypeGroup", "url": "/services/data/v56.0/sobjects/WorkTypeGroup/0VSS700000009ZVOAY" }, "Id": "0VSS700000009ZVOAY", "Name": "Work_Type_Group_96227" }, { "attributes": { "type": "WorkTypeGroup", "url": "/services/data/v56.0/sobjects/WorkTypeGroup/0VSS700000009O7OAI" }, "Id": "0VSS700000009O7OAI", "Name": "WTG Block Time" }, { "attributes": { "type": "WorkTypeGroup", "url": "/services/data/v56.0/sobjects/WorkTypeGroup/0VSS700000009Z6OAI" }, "Id": "0VSS700000009Z6OAI", "Name": "ytre" } ] } ``` 3. Parse the JSON response, and display the work type groups on a page that you created. Your users can select a work type group for the appointment. # Get Work Type Groups A work type group represents a general appointment category or topic, such as a home loan or investment. Show your users your work type groups on the landing page by retrieving the list of work type groups from your Salesforce instance. Your users can select a work type group from the list while booking appointments. 1. Create a page to show your work type groups. 2. Use the `Query()` request on the WorkTypeGroup object to retrieve the list of work type groups from your Salesforce instance. **Sample Request** ```nolang https://YOUR_INSTANCE.salesforce.com/services/data/v68.0/query/?q=SELECT+Id,+Name+From+WorkTypeGroup​+Where+isActive+=+true+ORDER+BY+NAME ``` Where `YOUR_INSTANCE` is a variable. **Sample Response** The request returns the work type group records. ```nolang { "totalSize": 3, "done": true, "records": [ { "attributes": { "type": "WorkTypeGroup", "url": "/services/data/v57.0/sobjects/WorkTypeGroup/0VSS700000000sLOAQ" }, "Id": "0VSS700000000sLOAQ", "Name": "Wealth Management" }, { "attributes": { "type": "WorkTypeGroup", "url": "/services/data/v57.0/sobjects/WorkTypeGroup/0VSS700000000sQOAQ" }, "Id": "0VSS700000000sQOAQ", "Name": "Loans" }, { "attributes": { "type": "WorkTypeGroup", "url": "/services/data/v57.0/sobjects/WorkTypeGroup/0VSS700000000sVOAQ" }, "Id": "0VSS700000000sVOAQ", "Name": "Banking" } ] } ``` 3. Parse the JSON response, and display the work type groups on a page that you created. Your users can select a work type group for the appointment from the page. # Get Work Type Groups A work type group represents a general appointment category or topic, such as a home loan or investment. Use the `Query()` method on the WorkTypeGroup object to retrieve a list of work type groups. 1. Create a page in your app where you can show the work type groups from your org. 2. Use the `Query()` request to retrieve work type groups. For more information, see [Execute a SOQL Query](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_query.htm). **Sample Request** ```nolang https://yourInstance.salesforce.com/services/data/vXX.X/query/?q=SELECT+Id,+Name+From+WorkTypeGroup +Where+isActive+=+true+ORDER+BY+NAME+DESC ``` You can use the `toLabel` method to translate the SOQL query results in the language of the user. For more information, see [Translate SOQL Query Results](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/salesforce-scheduler-soql-select-tolabel.md). **Sample Response** The method returns the available work type groups from your org. ```nolang { "totalSize" : 3, "done" : true, "records" : [ { "attributes" : { "type" : "WorkTypeGroup", "url" : "/services/data/v59.0/sobjects/WorkTypeGroup/0VSS700000000sLOAQ" }, "Id" : "0VSS700000000sLOAQ", "Name" : "Wealth Management" }, { "attributes" : { "type" : "WorkTypeGroup", "url" : "/services/data/v59.0/sobjects/WorkTypeGroup/0VSS700000000sQOAQ" }, "Id" : "0VSS700000000sQOAQ", "Name" : "Loans" }, { "attributes" : { "type" : "WorkTypeGroup", "url" : "/services/data/v59.0/sobjects/WorkTypeGroup/0VSS700000000sVOAQ" }, "Id" : "0VSS700000000sVOAQ", "Name" : "Banking" } ] } ``` 3. Parse the JSON response, and display the work type groups on a page in your app so that users can select a work type group during appointment scheduling. Here’s how that page can look. ![A representation of the Select Work Type Group screen.](https://developer.salesforce.com/media/salesforce-scheduler-dev-guide/screen_work_type_groups.png) On the next page in your app, you can provide users an option to search for service territories. # Get Work Type Groups A work type group represents a general appointment category or topic, such as a home loan or investment. Use the `Query()` method on the WorkTypeGroup object to retrieve a list of work type groups. 1. Create a page in your app where you can show the work type groups from your org. 2. Use the `Query()` method to retrieve work type groups. For more information, see [Execute a SOQL Query](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_query.htm). **Sample Request** ```nolang https://yourInstance.salesforce.com/services/data/vXX.X/query/?q=SELECT+Id,+Name+From+WorkTypeGroup +Where+isActive+=+true+ORDER+BY+NAME+DESC ``` You can use the `toLabel` method to translate the SOQL query results in the language of the user. For more information, see [Translate SOQL Query Results](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/salesforce-scheduler-soql-select-tolabel.md). **Sample Response** The method returns the available work type groups from your org. ```nolang { "totalSize" : 3, "done" : true, "records" : [ { "attributes" : { "type" : "WorkTypeGroup", "url" : "/services/data/v59.0/sobjects/WorkTypeGroup/0VSS700000000sLOAQ" }, "Id" : "0VSS700000000sLOAQ", "Name" : "Wealth Management" }, { "attributes" : { "type" : "WorkTypeGroup", "url" : "/services/data/v59.0/sobjects/WorkTypeGroup/0VSS700000000sQOAQ" }, "Id" : "0VSS700000000sQOAQ", "Name" : "Loans" }, { "attributes" : { "type" : "WorkTypeGroup", "url" : "/services/data/v59.0/sobjects/WorkTypeGroup/0VSS700000000sVOAQ" }, "Id" : "0VSS700000000sVOAQ", "Name" : "Banking" } ] } ``` 3. Parse the JSON response, and display the work type groups on a page in your app so that users can select a work type group during appointment scheduling. Here’s how that page can look. ![A representation of the Select Work Type Group screen.](https://developer.salesforce.com/media/salesforce-scheduler-dev-guide/screen_work_type_groups.png) On the next page in your app, you can provide users an option to search for service territories. # Get Work Type Groups After authentication, you need to show the work type groups for the user to select. A work type group represents a general appointment category or topic, such as a home loan or investment. Create a page in your app where you can show the work type groups from your org. Use the `Query()` method on the WorkTypeGroup object to retrieve a list of work type groups. **Sample Request** This sample REST API call uses the `Query()` request to retrieve work type groups. For more information, see [Execute a SOQL Query](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_query.htm). ```nolang https://yourInstance.salesforce.com/services/data/vXX.X/query/?q=SELECT+Id,+Name+From+WorkTypeGroup +Where+isActive+=+true+ORDER+BY+NAME ``` You can use the `toLabel` method to translate the SOQL query results in the language of the user. For more information, see [Translate SOQL Query Results](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/salesforce-scheduler-soql-select-tolabel.md). **Sample Response** The request returns the available work type groups from your org. ```nolang { "totalSize": 6, "done": true, "records": [ { "attributes": { "type": "WorkTypeGroup", "url": "/services/data/vXX.X/sobjects/WorkTypeGroup/0VSB0000000L6XeOAK" }, "Id": "0VSB0000000L6XeOAK", "Name": "General Banking Group" }, { "attributes": { "type": "WorkTypeGroup", "url": "/services/data/vXX.X/sobjects/WorkTypeGroup/0VSB0000000L6XyOAK" }, "Id": "0VSB0000000L6XyOAK", "Name": "Insurance Management" }, { "attributes": { "type": "WorkTypeGroup", "url": "/services/data/vXX.X/sobjects/WorkTypeGroup/0VSB0000000L71HOAS" }, "Id": "0VSB0000000L71HOAS", "Name": "Investments" }, { "attributes": { "type": "WorkTypeGroup", "url": "/services/data/vXX.X/sobjects/WorkTypeGroup/0VSB0000000L6Y3OAK" }, "Id": "0VSB0000000L6Y3OAK", "Name": "Loan Planning" }, { "attributes": { "type": "WorkTypeGroup", "url": "/services/data/vXX.X/sobjects/WorkTypeGroup/0VSB0000000TbhWOAS" }, "Id": "0VSB0000000TbhWOAS", "Name": "LSConcurrent Work Type Group" }, { "attributes": { "type": "WorkTypeGroup", "url": "/services/data/vXX.X/sobjects/WorkTypeGroup/0VSB0000000L6Y4OAK" }, "Id": "0VSB0000000L6Y4OAK", "Name": "Wealth Planning" } ] } ``` Parse the JSON response, and display the work type groups on a page in your app so that users can select a work type group for the appointment. Here’s how that page can look. ![A representation of the Select Work Type Group screen.](https://developer.salesforce.com/media/salesforce-scheduler-dev-guide/concurrent-workTypeGroups.png) On the next page in your app, you can provide users an option to search for service territories. # Get Work Type Groups Display the work type groups for the appointment. A work type group represents a general appointment category or topic, such as a home loan or investment. Create a page in your app where you can show the work type groups from your org. 1. Use the `Query()` request on the `ServiceTerritoryWorkType` object to retrieve the work types associated with the service territory selected on the Select Service Territory screen. **Sample Request** This sample REST API call uses the `Query()` request to retrieve the work type records. For more information on using `Query()` request, see [Execute a SOQL Query](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_query.htm). ```nolang https://YOUR_INSTANCE.salesforce.com/services/data/vXX.X/query/?q= SELECT+Id,WorkTypeId,WorkType.Name+FROM+ServiceTerritoryWorkType+WHERE+ServiceTerritoryId+=+'0Hhx000000012oSCAQ' ``` Where `YOUR_INSTANCE` is a variable. **Sample Response** The request returns the work type records. ```nolang { "totalSize": 2, "done": true, "records": [ { "attributes": { "type": "ServiceTerritoryWorkType", "url": "/services/data/v55.0/sobjects/ServiceTerritoryWorkType/0VEx00000001CTGGA2" }, "Id": "0VEx00000001CTGGA2", "WorkTypeId": "08qx000000014fvAAA", "WorkType": { "attributes": { "type": "WorkType", "url": "/services/data/v55.0/sobjects/WorkType/08qx000000014fvAAA" }, "Name": "WT 2" } }, { "attributes": { "type": "ServiceTerritoryWorkType", "url": "/services/data/v55.0/sobjects/ServiceTerritoryWorkType/0VEx00000001Ag4GAE" }, "Id": "0VEx00000001Ag4GAE", "WorkTypeId": "08qx000000014fnAAA", "WorkType": { "attributes": { "type": "WorkType", "url": "/services/data/v55.0/sobjects/WorkType/08qx000000014fnAAA" }, "Name": "WT 3" } } ] } ``` 2. Use the `Query()` request on the `WorkTypeGroupMember` object to retrieve the work type groups by work types retrieved in the previous step. **Sample Request** This sample REST API call uses the `Query()` request to retrieve work type groups. For more information on using `Query()` request, see [Execute a SOQL Query](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_query.htm). ```nolang https://YOUR_INSTANCE.salesforce.com/services/data/vXX.X/query/?q= SELECT Id,WorkTypeGroupId,WorkTypeId,WorkTypeGroup.Name FROM WorkTypeGroupMember WHERE WorkTypeId in ('08qx000000014fnAAA','08qx000000014fvAAA') ``` Where `YOUR_INSTANCE` is a variable. **note:** You can use the `toLabel` method to translate the SOQL query results in the language of the user. For more information, see [Translate SOQL Query Results](https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_select_tolabel.htm). **Sample Response** The request returns the work type group records. ```nolang { "totalSize": 2, "done": true, "records": [ { "attributes": { "type": "WorkTypeGroupMember", "url": "/services/data/v55.0/sobjects/WorkTypeGroupMember/0Wzx000000013tICAQ" }, "Id": "0Wzx000000013tICAQ", "WorkTypeGroupId": "0VSx000000014DmGAI", "WorkTypeId": "08qx000000014fnAAA", "WorkTypeGroup": { "attributes": { "type": "WorkTypeGroup", "url": "/services/data/v55.0/sobjects/WorkTypeGroup/0VSx000000014DmGAI" }, "Name": "WTG 2" } }, { "attributes": { "type": "WorkTypeGroupMember", "url": "/services/data/v55.0/sobjects/WorkTypeGroupMember/0Wzx000000013tHCAQ" }, "Id": "0Wzx000000013tHCAQ", "WorkTypeGroupId": "0VSx000000014DkGAI", "WorkTypeId": "08qx000000014fvAAA", "WorkTypeGroup": { "attributes": { "type": "WorkTypeGroup", "url": "/services/data/v55.0/sobjects/WorkTypeGroup/0VSx000000014DkGAI" }, "Name": "WTG 1" } } ] } ``` Parse the JSON response, and display the work type groups on web page so that users can select a work type group for the appointment. Here’s how that page can look. ![A representation of the Select Work Type Group screen.](https://developer.salesforce.com/media/salesforce-scheduler-dev-guide/uc9_work_type_groups.png) Default to the work type that is associated with the service territory selected on the Select Service Territory screen and the work type group selected on the Select Work Type Group screen. # Get Work Types Get the correct work type record that represents the work type group and service territory that are selected in the previous step. A work type represents a type of work to be performed in Salesforce Scheduler. A work type is a template representing an appointment topic (work type group) with an appointment location (service territory). It defines key appointment parameters such as appointment duration, preparation and wrap-up buffers, and availability timings. 1. Use the `Query()` request on the WorkTypeGroupMember object to retrieve a work type for the work type group selected in the Get Work Type Groups step. **Sample Request** This sample REST API call uses the `Query()` request retrieve work type records that are associated with the selected work type group. ```nolang https://yourInstance.salesforce.com/services/data/vXX.X/query/?q=SELECT+Id,Name, WorkTypeGroupId,WorkTypeId+FROM+WorkTypeGroupMember+WHERE+WorkTypeGroupId+=+'0VSB0000000TbhWOAS' ``` **Sample Response** The request returns the work type records. ```nolang { "totalSize" : 2, "done" : true, "records" : [ { "attributes" : { "type" : "WorkTypeGroupMember", "url" : "/services/data/v53.0/sobjects/WorkTypeGroupMember/0WzB0000000TbZcKAK" }, "Id" : "0WzB0000000TbZcKAK", "Name" : "00000047", "WorkTypeGroupId" : "0VSB0000000TbhWOAS", "WorkTypeId" : "08qB00000002ocgIAA" }, { "attributes" : { "type" : "WorkTypeGroupMember", "url" : "/services/data/v53.0/sobjects/WorkTypeGroupMember/0WzB0000000Tbm5KAC" }, "Id" : "0WzB0000000Tbm5KAC", "Name" : "00000048", "WorkTypeGroupId" : "0VSB0000000TbhWOAS", "WorkTypeId" : "08qB0000000UF63IAG" } ] } ``` 2. Use the `Query()` request on the ServiceTerritoryWorkType object to filter the correct work type for the selected service territory selected in the Get Service Territories step. **Sample Request** This sample REST API call uses the `Query()` request to find the correct work type for the selected service territory. ```nolang https://yourInstance.salesforce.com/services/data/vXX.X/query/?q=SELECT+Id,Name, ServiceTerritoryId,WorkTypeId+FROM+ServiceTerritoryWorkType+WHERE+WorkTypeId+=+'08qB00000002ocgIAA'+AND+ ServiceTerritoryId+=+'0HhB00000001P0PKAU' ``` **Sample Response** The request returns the work type records. ```nolang { "totalSize" : 1, "done" : true, "records" : [ { "attributes" : { "type" : "ServiceTerritoryWorkType", "url" : "/services/data/v53.0/sobjects/ServiceTerritoryWorkType/0VEB0000000TbbrOAC" }, "Id" : "0VEB0000000TbbrOAC", "Name" : "00000063", "ServiceTerritoryId" : "0HhB00000001P0PKAU", "WorkTypeId" : "08qB00000002ocgIAA" } ] } ``` On the next page in your app, you can show the service resources and their availability. # getAgentInput() Returns the string of text which is currently in the agent’s text input area in the chat log of a chat with a specific chat key. Available in API version 29.0 or later. ## Syntax ```javascript sforce.console.chat.getAgentInput(chatKey:String, callback:Function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`chatKey`|String|The `chatKey` associated with the chat for which to retrieve the agent’s input text.| |`callback`|function|JavaScript method called upon completion of the method.| ## Sample Code–Visualforce ```apex_page Get Agent Input ``` ## Response This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following properties: |Name|Type|Description| |----|----|-----------| |`text`|String|The text that is currently in an agent’s text input area.| |`success`|Boolean|`true` if getting the agent’s input was successful; `false` if getting the agent’s input wasn’t successful.| # getAgentState() Returns the agent's current Chat status, such as Online, Away, or Offline. Available in API version 29.0 or later. ## Syntax ```javascript sforce.console.chat.getAgentState(callback:Function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`callback`|function|JavaScript method called upon completion of the method.| ## Sample Code–Visualforce ```apex_page Get Agent State ``` ## Response This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following properties: |Name|Type|Description| |----|----|-----------| |`state`|String|String representing the current agent state—for example, Online, Away, or Offline.| |`success`|Boolean|`true` if getting the agent’s Chat status was successful; `false` if getting the agent’s Chat status wasn’t successful.| # `getAgentWorkload` In API version 35.0 and later, we can retrieve an agent’s currently assigned workload. Use this method for rerouting work to available agents. ## Syntax ```javascript sforce.console.presence.getAgentWorkload(callback:function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`callback`|function|JavaScript method to call when the agent’s configured capacity and work is retrieved.| ## Sample Code–Visualforce ```apex_page Get Agent’s configured capacity and current workload ``` ## Response This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following properties: |Name|Type|Description| |----|----|-----------| |`success`|Boolean|`true` if retrieving the agent’s work items was successful; `false` if retrieving the agent’s work items wasn’t successful.| |`configuredCapacity`|Number|Indicates the agent’s configured primary capacity (work that’s assigned to the current user) through Presence Configuration.| |`currentWorkload`|Number|Indicates the agent’s currently assigned primary workload.| |`configuredInterruptibleCapacity`|Number|Indicates the agent’s configured interruptible capacity (work that’s assigned to the current user) through Presence Configuration.| |`currentInterruptibleWorkload`|Number|Indicates the agent’s currently assigned interruptible workload.| # `getAgentWorkload for Lightning Experience` Retrieves an agent’s currently assigned workload. Use this method to reroute work to available agents. ## Sample Code Component code: ```html ``` Controller code: ```javascript ({ getAgentWorkload: function(cmp, evt, hlp) { var omniAPI = cmp.find("omniToolkit"); omniAPI.getAgentWorkload().then(function(result) { console.log('Retrieved Agent Configured Capacity and Current Workload successfully'); console.log('Agent\'s configured capacity is: ' + result.configuredCapacity); console.log('Agent\'s currently assigned workload is: ' + result.currentWorkload); }).catch(function(error) { console.log(error); }); } }) ``` ## Response This method returns a promise that, upon success, resolves to an object containing the following fields. |Name|Type|Description| |----|----|-----------| |`configuredCapacity`|number|The agent’s configured primary capacity (work that’s assigned to the current user) through Presence Configuration.| |`currentWorkload`|number|The agent’s currently assigned primary workload.| |`configuredInterruptibleCapacity`|Number|Indicates the agent’s configured interruptible capacity (that is, work that’s assigned to the current user) through Presence Configuration.| |`currentInterruptibleWorkload`|Number|Indicates the agent’s currently assigned interruptible workload.| # getAgentWorks Returns a list of work items that are currently assigned to an agent and open in the agent’s workspace. Available in API versions 32.0 and later. ## Syntax ```javascript sforce.console.presence.getAgentWorks(callback:function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`callback`|function|JavaScript method to call when the list of an agent’s work items is retrieved.| ## Sample Code–Visualforce ```apex_page Get Agent’s Current Work Items ``` ## Response This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following properties: |Name|Type|Description| |----|----|-----------| |`success`|Boolean|`true` if retrieving the agent’s work items was successful; `false` if retrieving the agent’s work items wasn’t successful.| |`works`|JSON string of [`work` objects](#work)|A JSON string of `work` objects that represents the work items assigned to the agent that are open in the agent’s workspace.| ## `work` The `work` object contains the following properties: |Name|Type|Description| |----|----|-----------| |`workItemId`|String|The ID of the object that’s routed through Omni-Channel. This object becomes a work assignment with a `workId` when it’s assigned to an agent.| |`workId`|String|The ID of a work assignment that’s routed to an agent.| |`isEngaged`|Boolean|Indicates whether an agent is working on a work item that’s been assigned to them (`true`) or not (`false`).| # getAgentWorks for Lightning Experience Returns a list of work items that are assigned to an agent and open in the agent’s workspace. ## Sample Code Component code: ```html ``` Controller code: ```javascript ({ getAgentWorks: function(cmp, evt, hlp) { var omniAPI = cmp.find("omniToolkit"); omniAPI.getAgentWorks().then(function(result) { var works = JSON.parse(result.works); console.log('First Agent Work ID is: ' + works[0].workId); console.log('Assigned Entity Id of the first Agent Work is: ' + works[0].workItemId); console.log('Is first Agent Work Engaged: ' + works[0].isEngaged); }).catch(function(error) { console.log(error); }); } }) ``` ## Response This method returns a promise that, upon success, resolves to an array of `work` objects, containing the following fields. |Name|Type|Description| |----|----|-----------| |`workItemId`|String|The ID of the object that’s routed through Omni-Channel. This object becomes a work assignment with a `workId` when it’s assigned to an agent.| |`workId`|String|The ID of a work assignment that’s routed to an agent.| |`isEngaged`|Boolean|Indicates whether an agent is working on a work item that’s been assigned to them (`true`) or not (`false`).| # getAllTabInfo() for Lightning Experience Returns information about all open tabs. This method works only in Lightning console apps. ## Arguments None. ## LWC Sample Code This component has a function that returns the information on all tabs. ```javascript import { LightningElement, wire } from 'lwc'; import { IsConsoleNavigation, getAllTabInfo } from 'lightning/platformWorkspaceApi'; export class GetAllTabInfoExample extends LightningElement { @wire(IsConsoleNavigation) isConsoleNavigation; async handleOpen() { if (!this.isConsoleNavigation) { return; } try { const tabInfo = await getAllTabInfo(); //do something with tabInfo } catch (error) { console.log(error); } } } ``` For another example that uses `getAllTabInfo()`, see [focusTab()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-lightning-focustab.md). To make your component available for use in a Lightning console app, specify the `lightning__AppPage` target in the [component’s configuration file](https://developer.salesforce.com/docs/platform/lwc/guide/use-config-for-console-app.html). ## Aura Components Sample Code This component has a button that, when pressed, gets the info of all open tabs and prints the resulting `tabInfo` object. Component code: ```html ``` Controller code: ```javascript ({ handleGetAllTabInfo : function(component, event, helper) { var workspaceAPI = component.find("workspace"); workspaceAPI.getAllTabInfo().then(function(response) { console.log(response); }) .catch(function(error) { console.log(error); }); } }) ``` ## Response This method returns a promise that, upon success, resolves to an array of `tabInfo` objects. A `tabInfo` object is a JSON array of information about a workspace tab, with nested arrays of information on each subtab. This is the structure of a `tabInfo` object. ```javascript { tabId: string, url: string (URL), pinned: boolean, closeable: boolean, title: string, icon: string (SLDS iconKey), iconAlt: string, customTitle: string (optional), customIcon: string (optional), customIconAlt: string (optional), highlighted: boolean, pageReference: object, isSubtab: boolean, parentTabId: string, subtabs: [ { tabId: string, url: string (URL), pinned: boolean, closeable: boolean, title: string, icon: string (SLDS iconKey), iconAlt: string, customTitle: string (optional), customIcon: string (optional), customIconAlt: string (optional), highlighted: boolean, pageReference: object, isSubtab: boolean, parentTabId: string, focused: boolean, recordId: string, }, ... ], focused: boolean, recordId: string } ``` # getAllUtilityInfo() for Lightning Experience Returns the state of all utilities as an array of `utilityInfo` objects. ## Arguments None. ## LWC Sample Code This component returns the number of utilities in the utility bar using the `utilityInfo` object. ```javascript import { LightningElement, wire } from 'lwc'; import { getAllUtilityInfo } from 'lightning/platformUtilityBarApi'; export default class UtilityInfoExample extends LightningElement { utilityCount = 0; async handleGetAllUtilityInfo() { try { const utilityInfo = await getAllUtilityInfo(); this.utilityCount = utilityInfo.length; } catch (error) { // return error } } } ``` To make your component available for use in a utility bar, specify the `lightning__UtilityBar` target in the [component’s configuration file](https://developer.salesforce.com/docs/platform/lwc/guide/use-config-for-utility-bar.html). ## Aura Components Sample Code This component has a button that, when pressed, retrieves all `utilityInfo` objects and opens the first utility, ordered by ID. Component code: ```html ``` Controller code: ```javascript ({ handleGetAllUtilityInfo : function(component, event, helper) { var utilityBarAPI = component.find("utilitybar"); utilityBarAPI.getAllUtilityInfo().then(function(response) { var myUtilityInfo = response[0]; utilityBarAPI.openUtility({ utilityId: myUtilityInfo.id }); }) .catch(function(error) { console.log(error); }); } }) ``` ## Response For both LWC and Aura Components, this method returns a promise that resolves to an array of `utilityInfo` objects, containing the following fields. The promise is rejected on error. |Name|Type|Description| |----|----|-----------| |`id`|string|The ID of the utility.| |`isLoaded`|boolean|Whether the utility is loaded.| |`utilityLabel`|string|The label of the utility.| |`utilityIcon`|string|The SLDS icon ID of the utility’s icon.| |`utilityIconVariant`|string|The SLDS icon variant of the utility’s icon.| |`utilityHighlighted`|boolean|Whether the utility is highlighted.| |`utilityVisible`|boolean|Whether the utility is visible.| |`utilityPoppedOut`|boolean|Whether the utility is popped out.| |`panelHeaderLabel`|string|The label of the utility panel.| |`panelHeaderIcon`|string|The SLDS icon ID of the utility panel’s icon.| |`panelHeaderIconVariant`|string|The SLDS icon variant of the utility panel’s icon.| |`panelHeight`|integer|The height of the utility panel in pixels.| |`panelWidth`|integer|The width of the utility panel in pixels| **See Also** - [*MDN Web Docs*: async function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function) # getAppViewInfo() for Lightning Experience ## Usage Returns information about the current application view. This method is available in API version 38.0 or later. ## Syntax ```javascript sforce.opencti.getAppViewInfo({ callback: FUNCTION }); ``` ## Arguments |Name|Type|Description| |------|------|-------------| |`callback`|function|JavaScript method executed when the API method call is completed.| ## Sample Code–HTML and JavaScript ```html ``` ## Response This method is asynchronous. The response is returned in an object passed to a callback method. When you switch from a record detail page to a list view, this method returns: - In Lightning Experience, only the `url` - In Lightning Experience console apps, nothing is returned because the listener isn’t invoked - `success` (boolean) - : Returns `true` if the API method call was invoked successfully, `false` otherwise. - `returnValue` (object) - : Returns the URL of the current application view and includes any applicable record ID, record name, and object type. For example: ```javascript { "url": "https://MYDOMAINNAMEmy.salesforce.com/lightning/r/Case/500D0000003tcchIAA/view?t=1459806689555", "recordId": "001x0000003DGQR", "recordName": "Acme", "objectType": "Account" } ``` Invoking this API method on a person account object returns the following additional information. - `accountId` or `contactId`—The associated account or contact ID. - `personAccount`—Which is `true` if person accounts are enabled in your org, `false` otherwise. For example: ```javascript { "url": "https://MYDOMAINNAMEmy.salesforce.com/lightning/r/Account/001x0000003DGQR/view", "recordId": "001x0000003DGQR", "recordName": "Acme Person Account", "objectType": "Account", "contactId": "003D000000QOMqg", "personAccount": true } ``` Since the URL structure of the `returnValue` can change in the future, we recommend that you don’t build any logic based on it. - `error` (array) - : If the API call was successful, this variable is `null`. If the API call failed, this variable returns an array of [error messages](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-error-messages-lightning.md). # getCallAttachedData() Returns the attached data of a call represented by the call object ID or null if there isn’t an active call. The data is returned in JSON format. This method is for computer-telephony integration (CTI); it’s only available in API version 24.0 or later. ## Syntax ```javascript sforce.console.cti.getCallAttachedData( callObjectId, getCallType, (optional) callback:Function ) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`callObjectId`|string|The call object ID of the call that retrieves the attached data.| |`getCallType`|boolean|`true` if the type of call is returned as either ‘INTERNAL,’ ‘INBOUND,’ or ‘OUTBOUND’; `false` otherwise. This field is only available in API version 29.0 or later.| |`callback`|function|JavaScript method called upon completion of the method.| ## Sample Code–Visualforce ```apex_page

CTI

``` ## Response This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following fields: |Name|Type|Description| |----|----|-----------| |`data`|string|The attached data of a call in JSON format.| |`success`|boolean|`true` if returning the attached data was successful; `false` if returning the attached data wasn’t successful.| |`type`|string|The type of call. Possible values are 'INTERNAL', 'INBOUND', and 'OUTBOUND'.| # getCallCenterSettings() for Lightning Experience ## Usage Returns the call center settings associated with the current user. This method is available in API version 38.0 or later. ## Syntax ```javascript sforce.opencti.getCallCenterSettings({ callback: FUNCTION }); ``` ## Arguments |Name|Type|Description| |------|------|-------------| |`callback`|function|JavaScript method executed when the API method call is completed.| ## Sample Code–HTML and JavaScript ```html ``` ## Response This method is asynchronous. The response is returned in an object passed to a callback method. The response object contains the following fields. |Name|Type|Description| |------|------|-------------| |`success`|boolean|Returns `true` if the API method call was invoked successfully, `false` otherwise.| |`returnValue`|object|If the API call is successful, the call center settings are returned. If the API call fails, `null` is returned.| |`error`|array|If the API call was successful, this variable is `null`. If the API call failed, this variable returns an array of [error messages](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-error-messages-lightning.md).| Example `returnValue`: ```javascript { "/displayNameLabel":"Display Name", "/internalNameLabel":"InternalName", "/label":"Demo Call Center Adapter", "/reqDialingOptions/label":"Dialing Options", "/reqDialingOptions/reqInternationalPrefix":"01", "/reqDialingOptions/reqInternationalPrefix/label":"International Prefix", "/reqDialingOptions/reqInternationalPrefix/sortOrder":"2.0", "/reqDialingOptions/reqLongDistPrefix":"1", "/reqDialingOptions/reqLongDistPrefix/label":"Long Distance Prefix", "/reqDialingOptions/reqLongDistPrefix/sortOrder":"1.0", "/reqDialingOptions/reqOutsidePrefix":"9", "/reqDialingOptions/reqOutsidePrefix/label":"Outside Prefix", "/reqDialingOptions/reqOutsidePrefix/sortOrder":"0.0", "/reqDialingOptions/sortOrder":"1.0", "/reqGeneralInfo/label":"General Information", "/reqGeneralInfo/reqAdapterUrl":"/apex/ContactCenter", "/reqGeneralInfo/reqAdapterUrl/label":"CTI Adapter URL", "/reqGeneralInfo/reqAdapterUrl/sortOrder":"2.0", "/reqGeneralInfo/reqDisplayName":"Demo Call Center Adapter", "/reqGeneralInfo/reqInternalName":"OpenCTI", "/reqGeneralInfo/reqSalesforceCompatibilityMode":"Classic_and_Lightning", "/reqGeneralInfo/reqSalesforceCompatibilityMode/label":"Salesforce Compatibility Mode", "/reqGeneralInfo/reqSalesforceCompatibilityMode/sortOrder":"8.0", "/reqGeneralInfo/reqSoftphoneHeight":"550", "/reqGeneralInfo/reqSoftphoneHeight/label":"Softphone Height", "/reqGeneralInfo/reqSoftphoneHeight/sortOrder":"6.0", "/reqGeneralInfo/reqSoftphoneWidth":"400", "/reqGeneralInfo/reqSoftphoneWidth/label":"Softphone Width", "/reqGeneralInfo/reqSoftphoneWidth/sortOrder":"7.0", "/reqGeneralInfo/reqStandbyUrl":"/apex/ContactCenter", "/reqGeneralInfo/reqStandbyUrl/label":"CTI Adapter URL2", "/reqGeneralInfo/reqStandbyUrl/sortOrder":"3.0", "/reqGeneralInfo/reqTimeout":"10000", "/reqGeneralInfo/reqTimeout/label":"Timeout", "/reqGeneralInfo/reqTimeout/sortOrder":"4.0", "/reqGeneralInfo/reqUseApi":"true", "/reqGeneralInfo/reqUseApi/label":"Use CTI API", "/reqGeneralInfo/reqUseApi/sortOrder":"5.0", "/reqGeneralInfo/sortOrder":"0.0", "/reqPhoneDemoSettings/label":"Phone Demo Settings", "/reqPhoneDemoSettings/reqIncomingNumber":"(415) 555-1212 (tel:4155551212)", "/reqPhoneDemoSettings/reqIncomingNumber/label":"Simulated Incoming Phone Number", "/reqPhoneDemoSettings/reqIncomingNumber/sortOrder":"0.0", "/reqPhoneDemoSettings/reqProvider":"DummyProvider", "/reqPhoneDemoSettings/reqProvider/label":"CTI Provider", "/reqPhoneDemoSettings/reqProvider/sortOrder":"1.0", "/reqPhoneDemoSettings/reqProviderAccount":"AXXXXXXXXXXXXXXXXX", "/reqPhoneDemoSettings/reqProviderAccount/label":"Provider Account", "/reqPhoneDemoSettings/reqProviderAccount/sortOrder":"2.0", "/reqPhoneDemoSettings/reqProviderAuthToken":"YYYYYYYYYYYYYYYYYY", "/reqPhoneDemoSettings/reqProviderAuthToken/label":"Provider Auth Token", "/reqPhoneDemoSettings/reqProviderAuthToken/sortOrder":"3.0", "/reqPhoneDemoSettings/reqProviderCallerNumber":"415555555", "/reqPhoneDemoSettings/reqProviderCallerNumber/label":"Provider Caller Number", "/reqPhoneDemoSettings/reqProviderCallerNumber/sortOrder":"4.0", "/reqPhoneDemoSettings/sortOrder":"2.0" } ``` # getCallCenterSettings() for Salesforce Classic ## Usage Returns the call center settings in the call center definition file as a JSON string. For more information, see [Call Center Definition Files](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-call-def-file.md). ## Syntax ```javascript sforce.interaction.cti.getCallCenterSettings(callback:function) ``` ## Arguments |Name|Type|Description| |------|------|-------------| |`callback`|function|JavaScript method executed when the API method call is completed.| ## Sample Code–JavaScript ```javascript ``` ## Response This method is asynchronous. The response is returned in an object passed to a callback method. The response object contains the following fields. |Name|Type|Description| |------|------|-------------| |`result`|string|If the API call was successful, the call center settings definition is returned as a JSON string. If the API call failed, null is returned.| |`error`|string|If the API call was successful, this variable is undefined. If the API call failed, this variable returns an error message.| # getCallObjectIds() Returns any active call object IDs in the order in which they arrived or null if there aren’t any active calls. This method is for computer-telephony integration (CTI); it’s only available in API version 24.0 or later. ## Syntax ```javascript sforce.console.cti.getCallObjectIds( (optional) callback:Function ) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`callback`|function|JavaScript method called upon completion of the method.| ## Sample Code–Visualforce ```apex_page ``` ## Response This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following fields: |Name|Type|Description| |----|----|-----------| |`ids`|string|The call object IDs of active calls or null if no call is active.| |`success`|boolean|`true` if returning the active call object IDs was successful; `false` if returning the active call object IDs wasn’t successful.| # getChatLog() Returns the chat log of a chat associated with a specific chat key. Available in API version 29.0 or later. ## Syntax ```javascript sforce.console.chat.getChatLog(chatKey:String, callback:Function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`chatKey`|String|The `chatKey` associated with the chat for which to retrieve the chat log.| |`callback`|function|JavaScript method called upon completion of the method.| ## Sample Code–Visualforce ```apex_page Get Chat Log ``` ## Response This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following fields: |Name|Type|Description| |----|----|-----------| |`customEvents`|Array of [`customEvent`](#customevent) objects|An array of custom event objects representing the custom events that occurred during a chat.| |`messages`|Array of [`message`](#message) objects|An array of chat message objects containing all of the chat messages from the chat log.| |`success`|Boolean|`true` if getting the chat log was successful; `false` if getting the chat log wasn’t successful.| ## `customEvent` The `customEvent` object contains a single event from the chat log and the following properties: |Property|Type|Description| |--------|----|-----------| |`source`|String|The person who initiated the custom event, either the chat visitor or the agent.| |`type`|String|The type of custom event that occurred.| |`data`|String|The data of the custom event that was sent to the chat; corresponds to the `data` argument of the `liveagent.chasitor.sendCustomEvent()` method used to send this event from the chat window.| |`timestamp`|Date/Time|The date and time a custom event was received.| ## `message` The `message` object contains a single chat message from the chat log and the following properties: |Property|Type|Description| |--------|----|-----------| |`content`|String|The text content of a message in the chat log.| |`name`|String|The name of the user who sent the message in the chat log. This appears exactly as it is displayed in the chat log.| |`type`|String|The type of message that was received, such as Agent or Visitor.| |`timestamp`|Date/Time|The date and time the chat message was received.| # getChatLog() for Lightning Experience Returns the chat log of a chat associated with a specific recordId. This method works only in Lightning console apps. ## Arguments |Name|Type|Description| |----|----|-----------| |`argumentObj`|Object|An object containing all the arguments to be passed into this method.| ## `argumentObj` |Name|Type|Description| |----|----|-----------| |`recordId`|String|The ID of the work associated with the current chat.| ## Sample Code This example retrieves the chat log for the given chat, logs the result, and if successful, saves the result to a variable. Component Code: ```apex_page ``` Controller Code: ```javascript ({ getChatLog: function(cmp, evt, helper) { var conversationKit = cmp.find("conversationKit"); var recordId = cmp.get("v.recordId"); conversationKit.getChatLog({ recordId: recordId }) .then(function(result){ if (result) { console.log("Successfully retrieved chat log"); cmp.set("v.chatLog", result); } else { console.log("Failed to retrieve chat log"); } }); } }) ``` ## Response Returns a Promise. Success resolves to a response object containing the `messages` and `customEvents` properties. The Promise is rejected if there's an error. |Name|Type|Description| |----|----|-----------| |`customEvents`|Array of [`customEvent`](#customevent) objects.|An array of custom event objects representing the custom events that occurred during a chat.| |`messages`|Array of [`message`](#message) objects.|An array of chat message objects containing all of the chat messages from the chat log.| |`success`|Boolean|`true` if getting the chat log was successful; `false` if getting the chat log wasn’t successful.| ## `customEvent` The `customEvent` object contains a single event from the chat log and the following properties: |Property|Type|Description| |--------|----|-----------| |`source`|String|The person who initiated the custom event, either the chat visitor or the agent.| |`type`|String|The type of custom event that occurred.| |`data`|String|The data of the custom event that was sent to the chat; corresponds to the `data` argument of the `liveagent.chasitor.sendCustomEvent()` method used to send this event from the chat window.| |`timestamp`|Date/Time|The date and time a custom event was received.| ## `message` The `message` object contains a single chat message from the chat log and the following properties: |Property|Type|Description| |--------|----|-----------| |`content`|String|The text content of a message in the chat log.| |`name`|String|The name of the user who sent the message in the chat log. This name appears exactly as it is displayed in the chat log.| |`type`|String|The type of message that was received, such as Agent or Visitor.| |`timestamp`|Date/Time|The date and time the chat message was received.| # getChatLog() for Lightning Experience Returns the chat log of an Enhanced Messaging chat associated with a specific recordId. This method works only in Lightning console apps. ## Arguments |Name|Type|Description| |----|----|-----------| |`argumentObj`|Object|An object containing all the arguments to be passed into this method.| ## `argumentObj` |Name|Type|Description| |----|----|-----------| |`recordId`|String|The ID of the work associated with the current chat.| ## Sample Code This example retrieves the chat log for the given chat, logs the result, and if successful, saves the result to a variable. Component Code: ```apex_page ``` Controller Code: ```javascript ({ getChatLog: function(cmp, evt, helper) { var conversationKit = cmp.find("conversationKit"); var recordId = cmp.get("v.recordId"); conversationKit.getChatLog({ recordId: recordId }) .then(function(result){ if (result) { console.log("Successfully retrieved chat log"); cmp.set("v.chatLog", result); } else { console.log("Failed to retrieve chat log"); } }); } }) ``` ## Response Returns a Promise. Success resolves to a response object containing the `messages`. The Promise is rejected if there's an error. |Name|Type|Description| |----|----|-----------| |`messages`|Array of [`message`](#message) objects.|An array of chat message objects containing all of the chat messages from the chat log.| ## `message` The `message` object contains a single chat message from the chat log and the following properties: |Property|Type|Description| |--------|----|-----------| |`content`|String|The text content of a message in the chat log.| |`name`|String|The name of the user who sent the message in the chat log. This name appears exactly as it is displayed in the chat log.| |`type`|String|The type of message that was received, such as Agent or Visitor.| |`timestamp`|Date/Time|The date and time the chat message was received.| # getChatRequests() Returns the chat keys of the chat requests that have been assigned to an agent. Available in API version 29.0 or later. ## Syntax ```javascript sforce.console.chat.getChatRequests(callback:Function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`callback`|function|JavaScript method called upon completion of the method.| ## Sample Code–Visualforce ```apex_page Get Chat Requests ``` ## Response This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following properties: |Name|Type|Description| |----|----|-----------| |`chatKey`|Array|Array of `chatKey` values, one for each of the current chat requests.| |`success`|Boolean|`true` if getting chat requests was successful; `false` if getting chat requests wasn’t successful.| # getConversationLog() for LWC for Lightning Experience Retrieves the conversation log. This method works only in Lightning console apps. This method returns up to 200 entries from the point the user scrolled to in the transcript. Rich content from bots, for example, messaging components with a question with choices, are not supported. ## Arguments |Name|Type|Description| |----|----|-----------| |`recordId`|String|The ID of the record for the Messaging session.| ## Response Returns a Promise. Success resolves to a `messages` response object. The Promise is rejected if there's an error. |Name|Type|Description| |----|----|-----------| |`messages`|Array of `message` objects.|An array of message objects containing all of the messages from the conversation log.| ## message The message object containing a single message from the conversation log. |Name|Type|Description| |----|----|-----------| |`content`|String|The text content of a message in the conversation log.| |`name`|String|The name of the user who sent the message in the conversation log. This name appears exactly as it is displayed in the conversation.| |`type`|String|The type of message that was received, such as `AGENT` or `END_USER`.| |`timestamp`|String|The date and time the message was received.| # getDetailsByChatKey() Returns the details of the chat associated with a specific chat key. Available in API version 29.0 or later. ## Syntax ```javascript sforce.console.chat.getDetailsByChatKey(chatKey:String, callback:Function) ``` ## Arguments | Name | Type | Description | | ---------- | -------- | --------------------------------------------------------------------- | | `chatKey` | String | The `chatKey` associated with the chat for which to retrieve details. | | `callback` | function | JavaScript method called upon completion of the method. | ## Sample Code–Visualforce ```apex_page Get Chat Details ``` ## Response This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following properties: | Name | Type | Description | | --------------------- | ------- | ----------------------------------------------------------------------------------------------------- | | `primaryTabId` | String | The ID of the primary tab associated with the chat. | | [`details`](#details) | Object | An object that contains all the details for a chat associated with a particular primary tab. | | `success` | Boolean | `true` if retrieving the details was successful; `false` if retrieving the details wasn’t successful. | ## `details` The `details` object contains the following properties: | Property | Type | Description | | ----------------------------- | ------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------- | | `acceptTime` | Date/Time | The date and time an agent accepted the chat request. | | `breadcrumbs` | Array of [`breadcrumb`](#breadcrumb) objects | An array of `breadcrumb` objects representing a list of Web pages visited by the visitor before and during the chat. | | `chatKey` | String | The chat key associated with the chat. | | `customDetails` | Array of [`customDetail`](#customdetail) objects | An array of `customDetail` objects that represent custom details that have been passed in to this chat via the Deployment API or Pre-Chat Form API. | | [`geoLocation`](#geolocation) | Object | An object representing the details of a chat visitor’s location, derived from a geoIP lookup on the chat visitor's IP address. | | `ipAddress` | String | The IP address of the chat visitor in dot-decimal format. | | `isEnded` | Boolean | Specifies whether a chat has ended (`true`) or not (`false`). | | `isEngaged` | Boolean | Specifies whether a chat is currently engaged (`true`) or not (`false`). | | `isPushRequest` | Boolean | Specifies whether a chat was routed to an agent through a push-based routing method such as Least Active or Most Available (`true`) or not (`false`). | | `isTransferringOut` | Boolean | Specifies whether a chat is currently in the process of being transferred to another agent (`true`) or not (`false`). | | `liveChatButtonId` | String | The 15-digit record ID for the chat button from which the chat request originated. | | `liveChatDeploymentId` | String | The 15-digit record ID for the deployment from which the chat request originated. | | `name` | String | The name of the chat visitor. | | `requestTime` | Date/Time | The date and time the chat was requested. | | [`visitorInfo`](#visitorinfo) | Object | An object containing information about the visitor's web browser. | ## `breadcrumb` A breadcrumb represents a Web page viewed by a chat visitor. The `breadcrumb` object contains the following properties: | Property | Type | Description | | ---------- | --------- | ------------------------------------------------------------------- | | `location` | String | The URL of a Web page viewed by a chat visitor. | | `time` | Date/Time | The date and time a chat visitor visited a specific breadcrumb URL. | ## `customDetail` Custom details are details have been passed into the chat through the Deployment API or Pre-Chat Form API. The `customDetail` object contains the following properties: | Property | Type | Description | | ------------------ | ------------------------------------------ | --------------------------------------------------------------------------------------- | | _`label`_ | String | The name of the custom detail as specified in the Deployment API or Pre-Chat Form API. | | _`value`_ | String | The value of the custom detail as specified in the Deployment API or Pre-Chat Form API. | | `transcriptFields` | Array of Strings | The names of fields where the customer’s details on the chat transcript are saved. | | `entityMaps` | Array of [`entityMap`](#entitymap) objects | An array of pre-created records used for mapping custom detail information. | ## `entityMap` Entities are records that are created when a customer starts a chat with an agent. You can use the API to auto-populate these records with customer details. The `entityMap` object contains the following properties: | Property | Type | Description | | ------------------ | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `entityName` | String | The record to search for or create. | | `fieldName` | String | The name of the field associated with the details. | | `isFastFillable` | Boolean | Specifies whether the value can be used to populate the field when an agent creates or edits a record (`true`) or not (`false`) (Live Agent console only).   | | `isAutoQueryable` | Boolean | If you’re using the Live Agent console, specifies whether to perform a a SOSL query (in the Live Agent console) (`true`) or not (`false`) to find records with a `fieldName` containing the value. If you’re using the Salesforce console, specifies whether to perform a SOQL query (in the Salesforce console) (`true`) or not (`false`) to find records with a `fieldName` containing the value. | | `isExactMatchable` | Boolean | Specifies whether to only search for records that have fields exactly matching the field `fieldName` (`true`) or not (`false`). | ## `geoLocation` The `geoLocation` object represents the details of a chat visitor’s location. It contains the following properties: | Property | Type | Description | | -------------- | ------ | ---------------------------------------------------------------------- | | `city` | String | The name of the chat visitor’s city. | | `countryCode` | String | The two-digit ISO-3166 country code for the chat visitor's country. | | `countryName` | String | The name of chat visitor’s country. | | `latitude` | String | The chat visitor's approximate latitude. | | `longitude` | String | The chat visitor's approximate longitude. | | `organization` | String | The organization name of the chat visitor's internet service provider. | | `region` | String | The chat visitor’s region, such as state or province. | ## `visitorInfo` The `visitorInfo` object represents information about the visitor's web browser. It contains the following properties: | Property | Type | Description | | ------------------ | ------ | ------------------------------------------------------------------------------------------------------------------------------------------- | | `browserName` | String | The name and version of the chat visitor's web browser. | | `language` | String | The language of the chat visitor's web browser. | | `originalReferrer` | String | The original URL of the Web page from which the chat visitor requested a chat. | | `screenResolution` | String | The screen resolution of the chat visitor's computer, as passed by the chat visitor’s browser. | | `sessionKey` | String | the sessionKey of the visitor which will ultimately be stored on the LiveChatVisitor record as a unique reference to this live chat visitor | # getDetailsByPrimaryTabId() Returns the details of the chat associated with a specific primary tab ID. Available in API version 29.0 or later. ## Syntax ```javascript sforce.console.chat.getDetailsByPrimaryTabId(primaryTabId:String, callback:Function) ``` ## Arguments | Name | Type | Description | | -------------- | -------- | --------------------------------------------------------------------------------- | | `primaryTabId` | String | The ID of the primary tab associated with the chat for which to retrieve details. | | `callback` | function | JavaScript method called upon completion of the method. | ## Sample Code–Visualforce ```apex_page Get Chat Details ``` ## Response This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following properties: | Name | Type | Description | | --------------------- | ------- | ----------------------------------------------------------------------------------------------------- | | `primaryTabId` | String | The ID of the primary tab associated with the chat. | | [`details`](#details) | Object | An object that contains all the details for a chat associated with a particular primary tab. | | `success` | Boolean | `true` if retrieving the details was successful; `false` if retrieving the details wasn’t successful. | ## `details` The `details` object contains the following properties: | Property | Type | Description | | ----------------------------- | ------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------- | | `acceptTime` | Date/Time | The date and time an agent accepted the chat request. | | `breadcrumbs` | Array of [`breadcrumb`](#breadcrumb) objects | An array of `breadcrumb` objects representing a list of Web pages visited by the visitor before and during the chat. | | `chatKey` | String | The chat key associated with the chat. | | `customDetails` | Array of [`customDetail`](#customdetail) objects | An array of `customDetail` objects that represent custom details that have been passed in to this chat via the Deployment API or Pre-Chat Form API. | | [`geoLocation`](#geolocation) | Object | An object representing the details of a chat visitor’s location, derived from a geoIP lookup on the chat visitor's IP address. | | `ipAddress` | String | The IP address of the chat visitor in dot-decimal format. | | `isEnded` | Boolean | Specifies whether a chat has ended (`true`) or not (`false`). | | `isEngaged` | Boolean | Specifies whether a chat is currently engaged (`true`) or not (`false`). | | `isPushRequest` | Boolean | Specifies whether a chat was routed to an agent through a push-based routing method such as Least Active or Most Available (`true`) or not (`false`). | | `isTransferringOut` | Boolean | Specifies whether a chat is currently in the process of being transferred to another agent (`true`) or not (`false`). | | `liveChatButtonId` | String | The 15-digit record ID for the chat button from which the chat request originated. | | `liveChatDeploymentId` | String | The 15-digit record ID for the deployment from which the chat request originated. | | `name` | String | The name of the chat visitor. | | `requestTime` | Date/Time | The date and time the chat was requested. | | [`visitorInfo`](#visitorinfo) | Object | An object containing information about the visitor's web browser. | ## `breadcrumb` A breadcrumb represents a Web page viewed by a chat visitor. The `breadcrumb` object contains the following properties: | Property | Type | Description | | ---------- | --------- | ------------------------------------------------------------------- | | `location` | String | The URL of a Web page viewed by a chat visitor. | | `time` | Date/Time | The date and time a chat visitor visited a specific breadcrumb URL. | ## `customDetail` Custom details are details that have been passed into the chat through the Deployment API or Pre-Chat Form API. The `customDetail` object contains the following properties: | Property | Type | Description | | ------------------ | ------------------------------------------ | --------------------------------------------------------------------------------------- | | _`label`_ | String | The name of the custom detail as specified in the Deployment API or Pre-Chat Form API. | | _`value`_ | String | The value of the custom detail as specified in the Deployment API or Pre-Chat Form API. | | `transcriptFields` | Array of Strings | The names of fields where the customer’s details on the chat transcript are saved. | | `entityMaps` | Array of [`entityMap`](#entitymap) objects | An array of pre-created records used for mapping the custom detail information. | ## `entityMap` Entities are records that are created when a customer starts a chat with an agent. You can use the API to auto-populate these records with customer details. The `entityMap` object contains the following properties: | Property | Type | Description | | ------------------ | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `entityName` | String | The record to search for or create. | | `fieldName` | String | The name of the field associated the details. | | `isFastFillable` | Boolean | Specifies whether the value can be used to populate the field when an agent creates or edits a record (`true`) or not (`false`) (Live Agent console only).   | | `isAutoQueryable` | Boolean | If you’re using the Live Agent console, specifies whether to perform a a SOSL query (in the Live Agent console) (`true`) or not (`false`) to find records with a `fieldName` containing the value. If you’re using the Salesforce console, specifies whether to perform a SOQL query (in the Salesforce console) (`true`) or not (`false`) to find records with a `fieldName` containing the value. | | `isExactMatchable` | Boolean | Specifies whether to only search for records that have fields exactly matching the field `fieldName` (`true`) or not (`false`). | ## `geoLocation` The `geoLocation` object represents the details of a chat visitor’s location. It contains the following properties: | Property | Type | Description | | -------------- | ------ | ---------------------------------------------------------------------- | | `city` | String | The name of the chat visitor’s city. | | `countryCode` | String | The two-digit ISO-3166 country code for the chat visitor's country. | | `countryName` | String | The name of chat visitor’s country. | | `latitude` | String | The chat visitor's approximate latitude. | | `longitude` | String | The chat visitor's approximate longitude. | | `organization` | String | The organization name of the chat visitor's internet service provider. | | `region` | String | The chat visitor’s region, such as state or province. | ## `visitorInfo` The `visitorInfo` object represents information about the visitor's web browser. It contains the following properties: | Property | Type | Description | | ------------------ | ------ | ------------------------------------------------------------------------------------------------------------------------------------------- | | `browserName` | String | The name and version of the chat visitor's web browser. | | `language` | String | The language of the chat visitor's web browser. | | `originalReferrer` | String | The original URL of the Web page from which the chat visitor requested a chat. | | `screenResolution` | String | The screen resolution of the chat visitor's computer, as passed by the chat visitor’s browser. | | `sessionKey` | String | the sessionKey of the visitor which will ultimately be stored on the LiveChatVisitor record as a unique reference to this live chat visitor | # getDirectoryNumbers() for Salesforce Classic ## Usage Returns the list of phone numbers from the call center's directory. This method is only available in API version 31.0 or later. ## Syntax ```javascript sforce.interaction.cti.getDirectoryNumbers(isGlobal:boolean, callCenterName:String, (optional) callback:function, (optional) resultSetPage:Integer, (optional) resultSetPageSize:Integer) ``` ## Arguments |Name|Type|Description| |------|------|-------------| |`isGlobal`|boolean|Set to `true` to return directory numbers from the global call center, or `false` to return directory numbers specific to a call center.| |`callCenterName`|string|Specifies the call center name on which to return directory numbers. If `isGlobal` is `false` and this field is not specified, all directory numbers are returned.| |`callback`|function|JavaScript method executed when the API method call is completed.| |`resultSetPage`|integer|Represents the page number of the list of results to return. This number starts at 0.| |`resultSetPageSize`|integer|Sets the maximum number of phone numbers to retrieve. Defaults to 5000; maximum is 10000. If `hasNext` returns `true` in the `callback`, use this argument with `resultSetPage` to get the next page of results. For example, if `resultSetPageSize` is 5000 and `resultSetPage` is 0, the first 5000 phone numbers are returned; if `resultSetPage` is 1, the next 5000 are returned.| ## Sample Code–JavaScript ```javascript ``` ## Response |Name|Type|Description| |------|------|-------------| |`result`|string|Returns a JSON string that represents the list of phone numbers from the specified call center name. Each phone number element contains a call center name, phone, and description.| |`error`|string|If the API call was successful, this variable is undefined. If the API call failed, this variable returns an error message.| Example `result`: ```javascript { directoryNumbers: [ {callCenterName:'Demo Call Center', name:'Sales Cloud', phone:'415-555-1212', description:'Sales Cloud additional number'}, {callCenterName:'Demo Call Center 2', name:'Service Cloud', phone:'415-555-3434', description:'Service Cloud additional number'}, ], hasNext: false } ``` # getEnclosingPrimaryTabId() Returns the ID of the current primary tab. This method works within a primary tab or subtab, not within the navigation tab or custom console components. This method is only available in API version 20.0 or later. ## Syntax ```javascript sforce.console.getEnclosingPrimaryTabId((optional)callback:function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`callback`|function|JavaScript method that’s called upon completion of the method.| ## Sample Code–Visualforce ```apex_page Click here to close this primary tab ``` **note:** To see this example in action, click the custom link on a case. For more information, see [Define Custom Buttons and Links](https://help.salesforce.com/s/articleView?id=defining_custom_links.htm) in Salesforce Help. ## Response This method is asynchronous, so it returns its response in an object in a callback method. The response object contains the following field: |Name|Type|Description| |----|----|-----------| |`id`|string|The ID of the current primary tab that contains this tab.| # getEnclosingPrimaryTabObjectId() Returns the object ID of the current primary tab, which contains a subtab. For example, a case ID or account ID. This method works within a primary tab or subtab. This method is only available in API version 24.0 or later. ## Syntax ```javascript sforce.console.getEnclosingPrimaryTabObjectId((optional)callback:Function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`callback`|function|JavaScript method that’s called upon completion of the method.| ## Sample Code–Visualforce ```apex_page Click here to get enclosing primary tab object ID ``` **note:** To see this example in action, click the custom link on a case. For more information, see [Define Custom Buttons and Links](https://help.salesforce.com/s/articleView?id=defining_custom_links.htm) in Salesforce Help. ## Response This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following fields: |Name|Type|Description| |----|----|-----------| |`id`|string|The ID of the current primary tab that contains this subtab.| |`success`|boolean|`true` if returning the enclosing primary tab was successful; `false` if returning the enclosing primary tab wasn't successful.| # getEnclosingTabId() Returns the ID of the tab that contains the current Visualforce page, which may be a primary tab or subtab. This method will work if the call is made within a component enclosed within a subtab. This method is only available in API version 20.0 or later. ## Syntax ```javascript sforce.console.getEnclosingTabId() ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`callback`|function|JavaScript method that’s called upon completion of the method.| ## Sample Code–Visualforce ```apex_page Click here to close this tab ``` **note:** To see this example in action, click the custom link on a case. For more information, see [Define Custom Buttons and Links](https://help.salesforce.com/s/articleView?id=defining_custom_links.htm) in Salesforce Help. ## Response This method is asynchronous, so it returns its response in an object in a callback method. The response object contains the following field: |Name|Type|Description| |----|----|-----------| |`id`|string|The ID of the current primary tab or subtab.| # `getEnclosingTabId()` for Lightning Experience Returns the ID of the enclosing tab. This method isn’t supported for Lightning Web Components (LWC). To retrieve the enclosing tab ID with LWC, see [EnclosingTabId context wire adapter](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-lwc-enclosingtabid.md). **tip:** To retrieve information about the tab or the subtab that a component is rendered in, first use `getEnclosingTabId()` instead of [`getFocusedTabInfo()`](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-lightning-getfocusedtabinfo.md). Then call [`getTabInfo()`](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-lightning-gettabinfo.md) and use the enclosing tab’s ID as the argument. By using `getEnclosingTabId()`, you make sure that the correct tab ID is returned when you work with lifecycle hooks such as `renderedCallback()` or `connectedCallback()`. ## Arguments None. ## Aura Components Sample Code This component has a button that, when clicked, retrieves the enclosing tab ID. This is the component code. The `lightning:workspaceAPI` component provides access to Lightning console methods. When clicked, the `lightning:button` base component executes the `handleGetEnclosingTabId` action in the component’s client-side controller. ```html ``` This is the controller code. The `handleGetEnclosingTabId` action returns the ID of the enclosing workspace tab. ```javascript ({ handleGetEnclosingTabId : function(component, event, helper) { var workspaceAPI = component.find("workspace"); workspaceAPI.getEnclosingTabId().then(function(tabId) { console.log(tabId); }) .catch(function(error) { console.log(error); }); } }) ``` ## Response This method returns a promise that, upon success, resolves to the `tabId` of the enclosing tab, if within a tab. If not within a tab, the method resolves to `false` upon success. # getEnclosingUtilityId() for Lightning Experience Returns the ID of the enclosing utility, or false if not within a utility. This method isn’t supported for Lightning Web Components (LWC). For LWC usage, see [EnclosingUtilityId context wire adapter](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-lwc-enclosingutilityid.md). ## Arguments None. ## Aura Components Sample Code This component has a button that, when pressed, retrieves the enclosing utility’s ID. Component code: ```html ``` Controller code: ```javascript ({ handleGetEnclosingUtilityId : function(component, event, helper) { var utilityAPI = component.find("utilitybar"); utilityAPI.getEnclosingUtilityId().then(function(utilityId) { console.log(utilityId); }) .catch(function(error) { console.log(error); }); } }) ``` ## Response This method returns a promise that, upon success, resolves to the `utilityId` of the enclosing utility or `false` if not within a utility. # getEngagedChats() Returns the chat keys of the chats in which the agent is currently engaged. Available in API version 29.0 or later. ## Syntax ```javascript sforce.console.chat.getEngagedChats(callback:Function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`callback`|function|JavaScript method called upon completion of the method.| ## Sample Code–Visualforce ```apex_page Get Engaged Chats ``` ## Response This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following properties: |Name|Type|Description| |----|----|-----------| |`chatKey`|array|Array of `chatKey` values, one for each of the currently engaged chats.| |`success`|boolean|`true` if getting engaged chats was successful; `false` if getting engaged chats wasn’t successful.| # getEnhancedConversationLog() for LWC for Lightning Experience Retrieves a full conversation log for a Messaging session. This method works only in Lightning console apps where the conversation component is rendered. This method returns conversation entries in a Messaging session. If a conversation was closed and reopened later, the method fetches entries from the previous session and the current session, as they belong to the same conversation. Use this method to capture transcripts that might otherwise be lost during network interruptions. Supported conversation entry types include outbound messages, inbound messages, messaging components, attachments, notes (whisper messages) and events (Consult Conversation Info, End User Consent Updated, Flag Raised and Flag Lowered, Message Delivery Failed, Participant Changed, Routing Result, Session Status Changed). **note:** This method returns conversation entries that are currently loaded in the rendered conversation component in a Lightning app page. It queries the in-memory state of the UI component and doesn't fetch the complete conversation history directly from Salesforce. Because the conversation component implements pagination with scroll-based lazy loading, this method may not fetch the complete conversation history when the conversation is more than 200 entries long. ## Arguments |Name|Type|Description| |----|----|-----------| |`recordId`|String|The ID of the record for the Messaging session.| ## Response Returns a Promise. Success resolves to a detailed `entries` response object. The Promise is rejected if there's an error. |Name|Type|Description| |----|----|-----------| |`entries`|Array of `entry` objects.|An array of entry objects containing all of the available conversation entries (messages from the conversation log).| ## `entry` The entry object that contains a message from the conversation log. |Name|Type|Description| |----|----|-----------| |`entryPayload`|Object|A JSON payload whose structure depends on the entry type. For more information, see [Conversation Entry Payload Schema](https://developer.salesforce.com/docs/service/messaging-object-model/references/messaging-object-model-conversationEntry/messaging-object-model-conversationentry.html#conversationentry-payload-schema) in the *Messaging Object Model and Data Access Guide*.| |`identifier`|String|The ID of the conversation entry.| |`sender`|Object|The JSON serialized payload with data that contains the participant that sent the message, including this information:
  • `role`: Indicates who sent the entry (agent, end user, etc.)
  • `app`: Indicates the channel where the entry was sent (agent, chatbot, whatsapp, etc.)
  • `subject`: Specifies the ID of the sender
| |`senderDisplayName`|String|The name of the user who sent the message in the conversation log. This name appears exactly as it is displayed in the conversation.| |`transcriptedTimestamp`|String|The date and time when a conversation entry was persisted in the Salesforce conversation transcript. Stored as a Unix epoch timestamp in milliseconds. This value is different from the `clientTimestamp` when the message was originally created. If `clientTimestamp` is not provided, it defaults to `transcriptedTimestamp`.| ## Example Response ```json { "identifier": "eead2391-d62e-451b-bfce-188dc8b2fd72", "senderDisplayName": "bob", "sender": { "app": "AGENT", "subject": "005SG00000PciMc", "role": "AGENT" }, "entryPayload": { "entryType": "Message", "id": "eead2391-d62e-451b-bfce-188dc8b2fd72", "abstractMessage": { "messageType": "StaticContentMessage", "inReplyToMessageId": null, "customHandlingType": null, "id": "eead2391-d62e-451b-bfce-188dc8b2fd72", "references": [], "contentCategory": null, "staticContent": { "formatType": "Text", "text": "hello", "citationContent": null } }, "messageReason": null, "wasRevised": null }, "transcriptedTimestamp": 1782923105953 } ``` ## Error Codes The Promise can be rejected in these scenarios. |Scenario|error|error message| |--------|-----|-------------| |`recordId` isn't a valid Messaging Session record.|Rejected Promise|`Not a supported conversation type for record .`| |The conversation body component isn't rendered on the page.|Rejected Promise|`No active conversation for record .`| In each error message, \ is replaced with the value passed to the method. # getFocusedPrimaryTabId() Returns the ID of the primary tab on which the browser is focused. This method is only available in API version 25.0 or later. ## Syntax ```javascript sforce.console.getFocusedPrimaryTabId((optional) callback:Function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`callback`|function|JavaScript method that’s called upon completion of the method.| ## Sample Code–Visualforce ```apex_page Click here to get the focused primary tab ID ``` ## Response This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following fields: |Name|Type|Description| |----|----|-----------| |`id`|string|The ID of the primary tab on which the browser is focused. If no primary tab is open, the ID is null.| |`success`|boolean|`true` if returning the primary tab ID on which the browser is focused was successful; `false` if returning the primary tab ID on which the browser is focused wasn't successful.| # getFocusedPrimaryTabObjectId() Returns the object ID of the primary tab on which the browser is focused. This method is only available in API version 25.0 or later. ## Syntax ```javascript sforce.console.getFocusedPrimaryTabObjectId((optional) callback:Function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`callback`|function|JavaScript method that’s called upon completion of the method.| ## Sample Code–Visualforce ```apex_page Click here to get the focused primary tab object ID ``` ## Response This method is asynchronous, so it returns its response in an object in a callback method. The response object contains the following field: |Name|Type|Description| |----|----|-----------| |`id`|string|The object ID of the primary tab on which the browser is focused. If there is no primary tab open, the ID is null.| |`success`|boolean|`true` if returning the primary tab object ID on which the browser is focused was successful; `false` if returning the primary tab object ID on which the browser is focused wasn't successful.| # getFocusedSubtabId() Returns the ID of the subtab on which the browser is focused. For example, a case ID or account ID. This method is only available in API version 25.0 or later. ## Syntax ```javascript sforce.console.getFocusedSubtabId((optional)callback:Function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`callback`|function|JavaScript method that’s called upon completion of the method.| ## Sample Code–Visualforce ```apex_page Click here to get the ID of the focused subtab ``` ## Response This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following fields: |Name|Type|Description| |----|----|-----------| |`id`|string|The ID of the subtab on which the browser is focused. If no subtab is open, the ID is null.| |`success`|boolean|`true` if returning the ID of the focused subtab was successful; `false` if returning the ID of the focused subtab wasn't successful.| # getFocusedSubtabObjectId() Returns the object ID of the subtab on which the browser is focused. For example, a case ID or account ID. This method is only available in API version 24.0 or later. ## Syntax ```javascript sforce.console.getFocusedSubtabObjectId((optional)callback:Function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`callback`|function|JavaScript method that’s called upon completion of the method.| ## Sample Code–Visualforce ```apex_page Click here to get the object ID of the focused subtab ``` **note:** To see this example in action, click the custom link on a case. For more information, see [Define Custom Buttons and Links](https://help.salesforce.com/s/articleView?id=defining_custom_links.htm) in Salesforce Help. ## Response This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following fields: |Name|Type|Description| |----|----|-----------| |`id`|string|The object ID of the subtab on which the browser is focused. If no subtab is open, the ID is null.| |`success`|boolean|`true` if returning the object ID of the focused subtab was successful; `false` if returning the object ID of the focused subtab wasn't successful.| # `getFocusedTabInfo()` for Lightning Experience Returns information about the focused workspace tab or subtab. This method works only in Lightning console apps. **note:** To retrieve information about the workspace tab or the subtab that a component is rendered in, don’t use `getFocusedTabInfo()`. When lifecycle hooks such as `renderedCallback()` or `connectedCallback()` are invoked for the component, the tab enclosing that component isn’t guaranteed to be in focus, so `getFocusedTabInfo()` sometimes doesn’t return that tab’s information. Instead, first use [`getEnclosingTabId()`](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-lightning-getenclosingtabid.md) for Aura components or the [`EnclosingTabId`](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-lwc-enclosingtabid.md) wire adaptor for LWC. Then call [`getTabInfo()`](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-lightning-gettabinfo.md) and use the enclosing tab’s ID as the argument. We recommend that you continue to use `getFocusedTabInfo()` with components in the utility bar, because the utility bar doesn’t have an enclosing tab ID. ## Arguments None. ## LWC Sample Code This component checks if it’s in a Lightning console app, using the `IsConsoleNavigation` wire adapter, and returns information about the focused tab or subtab. It uses the `tabId` and `highlighted` properties from the `tabInfo` return object to toggle highlighting on the tab. ```javascript import { LightningElement, wire } from 'lwc'; import { IsConsoleNavigation, getFocusedTabInfo, setTabHighlighted } from 'lightning/platformWorkspaceApi'; export class FocusedTabInfoExample extends LightningElement { @wire(IsConsoleNavigation) isConsoleNavigation; async handleFocusToggleHighlight() { if (!this.isConsoleNavigation) { return; } try { let { tabId, highlighted } = await getFocusedTabInfo(); highlighted = highlighted ? false : true; setTabHighlighted(tabId, highlighted); } catch (error) { console.log(error); } } } ``` For another example, see [closeTab()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-lightning-closetab.md). To make your component available for use in a Lightning console app, specify the `lightning__AppPage` target in the [component’s configuration file](https://developer.salesforce.com/docs/platform/lwc/guide/use-config-for-console-app.html). ## Aura Components Sample Code This component has a button that, when clicked, closes the currently focused tab. This is the component code. The `lightning:workspaceAPI` component provides access to Lightning console methods. When clicked, the `lightning:button` base component executes the `closeFocusedTab` action in the component’s client-side controller. ```html ``` This is the client-side controller code. The `closeFocusedTab` action retrieves the tab ID of the tab in focus, and then closes the tab with that ID. ```javascript ({ closeFocusedTab : function(component, event, helper) { var workspaceAPI = component.find("workspace"); workspaceAPI.getFocusedTabInfo().then(function(response) { var focusedTabId = response.tabId; workspaceAPI.closeTab({tabId: focusedTabId}); }) .catch(function(error) { console.log(error); }); } }) ``` ## Response This method returns a promise that, upon success, resolves to a `tabInfo` object that represents the focused tab. A `tabInfo` object is a JSON array of information about a workspace tab, with nested arrays of information on each subtab. This is the structure of a `tabInfo` object. ```javascript { tabId: string, url: string (URL), pinned: boolean, closeable: boolean, title: string, icon: string (SLDS iconKey), iconAlt: string, customTitle: string (optional), customIcon: string (optional), customIconAlt: string (optional), highlighted: boolean, pageReference: object, isSubtab: boolean, parentTabId: string, subtabs: [ { tabId: string, url: string (URL), pinned: boolean, closeable: boolean, title: string, icon: string (SLDS iconKey), iconAlt: string, customTitle: string (optional), customIcon: string (optional), customIconAlt: string (optional), highlighted: boolean, pageReference: object, isSubtab: boolean, parentTabId: string, focused: boolean, recordId: string, }, ... ], focused: boolean, recordId: string } ``` # getInfo() for Lightning Experience Returns the state of the current utility as a `utilityInfo` object. This method is available for Lightning Web Components (LWC) only. ## Arguments |Name|Type|Description| |----|----|-----------| |`utilityId`|string|The ID of the utility for which to retrieve the state.| ## LWC Sample Code This component retrieves the `utilityInfo` object. ```javascript import { LightningElement, wire } from 'lwc'; import { EnclosingUtilityId, getInfo } from 'lightning/platformUtilityBarApi'; export default class UtilityInfoExample extends LightningElement { @wire(EnclosingUtilityId) utilityId; async handleGetUtilityInfo() { try { if (!this.utilityId) { return; } const utilityInfo = await getInfo(this.utilityId); console.log(utilityInfo); } catch (error) { // handle error } } } ``` To make your component available for use in a utility bar, specify the `lightning__UtilityBar` target in the [component’s configuration file](https://developer.salesforce.com/docs/platform/lwc/guide/use-config-for-utility-bar.html). ## Response This method returns a promise that resolves to a `utilityInfo` object representing the enclosing utility, containing the following fields. The promise is rejected on error. |Name|Type|Description| |----|----|-----------| |`id`|string|The ID of the utility.| |`isLoaded`|boolean|Whether the utility is loaded.| |`utilityLabel`|string|The label of the utility.| |`utilityIcon`|string|The SLDS icon ID of the utility’s icon.| |`utilityIconVariant`|string|The SLDS icon variant of the utility’s icon.| |`utilityHighlighted`|boolean|Whether the utility is highlighted.| |`utilityVisible`|boolean|Whether the utility is visible.| |`utilityPoppedOut`|boolean|Whether the utility is popped out.| |`panelHeaderLabel`|string|The label of the utility panel.| |`panelHeaderIcon`|string|The SLDS icon ID of the utility panel’s icon.| |`panelHeaderIconVariant`|string|The SLDS icon variant of the utility panel’s icon.| |`panelHeight`|integer|The height of the utility panel in pixels.| |`panelWidth`|integer|The width of the utility panel in pixels| **See Also** - [*MDN Web Docs*: async function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function) # getMaxCapacity() Returns the maximum chat capacity for the current agent, as specified in the agent's assigned agent configuration. Available in API version 29.0 or later. ## Syntax ```javascript sforce.console.chat.getMaxCapacity(callback:Function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`callback`|function|JavaScript method called upon completion of the method.| ## Sample Code–Visualforce ```apex_page Get Max Capacity ``` ## Response This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following properties: |Name|Type|Description| |----|----|-----------| |`count`|integer|Agent's current, maximum chat capacity.| |`success`|boolean|`true` if getting the agent’s capacity was successful; `false` if getting the agent’s capacity wasn’t successful.| # getNavigationItems() for Lightning Experience Returns information about all the items in the navigation menu. This method works only in Lightning console apps. ## Arguments None ## LWC Sample Code This example retrieves and inspects all available items within a Lightning console app's navigation menu. ```javascript import { LightningElement } from 'lwc'; import { getNavigationItems } from 'lightning/platformNavigationItemApi'; export default class MyComponent extends LightningElement { navigationItems = []; async connectedCallback() { try { this.navigationItems = await getNavigationItems(); console.log('Available navigation items:', this.navigationItems.length); // Display each item this.navigationItems.forEach(item => { console.log(`${item.label} (${item.developerName})`, item.selected ? '- SELECTED' : ''); }); } catch (error) { console.error('Failed to load navigation items:', error); } } } ``` This example enables users to select a navigation item from a list using both `getNavigationItems()` and [`setSelectedNavigationItem()`](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-lightning-setselectednavigationitem.md). ```javascript import { LightningElement } from 'lwc'; import { getNavigationItems, setSelectedNavigationItem } from 'lightning/platformNavigationItemApi'; export default class NavigationSwitcher extends LightningElement { navItems = []; selectedDeveloperName; async connectedCallback() { await this.loadNavigationItems(); } async loadNavigationItems() { try { // Identify which item is currently selected this.navItems = await getNavigationItems(); const selected = this.navItems.find(item => item.selected); this.selectedDeveloperName = selected?.developerName; } catch (error) { console.error('Failed to load navigation items:', error); } } async handleNavigationChange(event) { const newDeveloperName = event.target.value; try { // Update the active page await setSelectedNavigationItem(newDeveloperName); // Update the current navigation state this.selectedDeveloperName = newDeveloperName; } catch (error) { console.error('Navigation change failed:', error); } } } ``` ## Aura Components Sample Code This component has a button that, when pressed, returns information about the navigation items in a console app. Component code: ```html ``` Controller code: ```javascript ({ getNavigationItems : function(component, event, helper) { var navigationItemAPI = component.find("navigationItemAPI"); navigationItemAPI.getNavigationItems().then(function(response) { console.log(response); }) .catch(function(error) { console.log(error); }); } }) ``` ## Response This method returns a promise that, upon success, resolves to an array of `navigationItemInfo` objects. The promise is rejected on error. The `navigationItemInfo` object contains the following fields. |Name|Type|Description| |----|----|-----------| |`developerName`|string|The navigation item’s developer name that uniquely identifies the item. For example, `Salesforce_Account` or `Your_VF_Page_Name`.| |`label`|string|The navigation item’s label, such as `Account` or `Case`.| |`pageReference`|object|The representation of the current page. The object returns information such as: page type (for example `standard__objectPage` or `standard__navItemPage`), object API name, and state information for the page.| |`selected`|boolean|True if the tab is currently selected, false otherwise.| Here’s the structure of a `navigationItemInfo` object. ```javascript { developerName : string, label : string, pageReference: object, selected : boolean } ``` The `PageReference` structure looks like this. ```javascript { type: 'standard__objectPage', attributes: { objectApiName: 'Account', actionName: 'home' }, state: { // Optional state parameters } } ``` # getNavigationTabs() Returns all of the objects in the navigation tab. This method is only available in API version 31.0 or later. ## Syntax ```javascript sforce.console.getNavigationTabs((optional)callback:Function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`callback`|function|JavaScript method that’s called upon completion of the method.| ## Sample Code–Visualforce ```apex_page ``` ## Response This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following fields: |Name|Type|Description| |----|----|-----------| |`menuItems`|object|The IDs of objects in the navigation tab.| |`success`|boolean|`true` if returning the IDs of objects in the navigation tab was successful, `false` otherwise.| # getPageInfo() Returns page information for the specified tab after its content has loaded. If the tab ID is null, it returns page information for the enclosing primary tab or subtab. Note that to get the page information from a custom console component, a `tabId` must be passed as the first parameter to this method.This method is only available in API version 26.0 or later. ## Syntax ```javascript sforce.console.getPageInfo(tabId:String, (optional)callback:Function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`tabId`|string|ID of the tab from which page information is returned.| |`callback`|function|JavaScript method that’s called upon completion of the method.| ## Sample Code–Visualforce ```apex_page Click here to get page information ``` ## Response This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following fields: |Name|Type|Description| |----|----|-----------| |`pageInfo`|string|Returns the URL of the current page as a JSON string, and includes any applicable object ID, object name, object type, and for API version 33.0 or later, the object tab name. For API version 31.0 and later, invoking this API method on a PersonAccount object returns the following additional information.
  • accountId or contactId, the associated account or contact ID
  • personAccount, which is `true` if the object is a PersonAccount and `false` otherwise
| |`callback`|function|JavaScript method that’s called upon completion of the method.| For example, a response for a current page: ```javascript {"url":"https://MY_DOMAIN_NAME.my.salesforce.com/001x0000003DGQR", "objectId":"001x0000003DGQR","objectName":"Acme","object":"Account","displayName":"Company" ``` Where `MY_DOMAIN_NAME` is a variable. For example, a response for a PersonAccount: ```javascript {"url":"https://MY_DOMAIN_NAME.my.salesforce.com/001x0000003DGQR", "objectId":"001x0000003DGQR","objectName":"Acme Person Account", "object":"Account", "contactId":"003D000000QOMqg", "personAccount":true} ``` Where `MY_DOMAIN_NAME` is a variable. # getPageInfo() for Salesforce Classic ## Usage Returns information about the current page. ## Syntax ```javascript sforce.interaction.getPageInfo(callback:function); ``` ## Arguments |Name|Type|Description| |------|------|-------------| |`callback`|function|JavaScript method executed when the API method call is completed.| ## Sample Code–JavaScript ```javascript ``` ## Response |Name|Type|Description| |------|------|-------------| |`result`|string|Returns the URL of the current page as a JSON string, including any applicable object ID, object name, object type, and for API version 33.0 or later, the object tab name. For API version 31.0 and later, invoking this method on a PersonAccount object also returns `accountId` or `contactId`, and `personAccount` (`true` if the object is a PersonAccount, `false` otherwise).| |`error`|string|If the API call was successful, this variable is undefined. If the API call failed, this variable returns an error message.| Example `result`: ```javascript {"url":"https://MYDOMAINNAME.my.salesforce.com/001x0000003DGQR", "objectId":"001x0000003DGQR","objectName":"Acme", "object":"Account","displayName":"Company"} ``` Example `result` for a PersonAccount object (API version 31.0 and later): ```javascript {"url":"https://MYDOMAINNAME.my.salesforce.com/001x0000003DGQR", "objectId":"001x0000003DGQR","objectName":"Acme Person Account", "object":"Account", "contactId":"003D000000QOMqg", "personAccount":true} ``` # getPrimaryTabIds() Returns all of the IDs of open primary tabs. This method is only available in API version 26.0 or later. ## Syntax ```javascript sforce.console.getPrimaryTabIds((optional) callback:Function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`callback`|function|JavaScript method that’s called upon completion of the method.| ## Sample Code–Visualforce ```apex_page Click here to get the primary tab IDs ``` ## Response This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following fields: |Name|Type|Description| |----|----|-----------| |`ids`|string|An array of open primary tab IDs , in order of appearance.| |`success`|boolean|`true` if returning the IDs of open primary tabs was successful; `false` if returning the IDs of open primary tabs wasn't successful.| # getSelectedNavigationItem() for Lightning Experience Returns information about the selected navigation item. This method works only in Lightning console apps. ## Arguments None ## LWC Sample Code This example identifies the specific navigation menu item currently active in a Lightning console app. ```javascript import { LightningElement } from 'lwc'; import { getSelectedNavigationItem } from 'lightning/platformNavigationItemApi'; export default class MyComponent extends LightningElement { selectedItem; async loadSelectedItem() { try { this.selectedItem = await getSelectedNavigationItem(); console.log('Current navigation item:', this.selectedItem.label); console.log('Developer name:', this.selectedItem.developerName); console.log('Page reference:', this.selectedItem.pageReference); } catch (error) { console.error('No selected navigation item:', error); } } } ``` This example checks if a specific object is the current navigation item. ```javascript import { LightningElement } from 'lwc';i mport { getSelectedNavigationItem } from 'lightning/platformNavigationItemApi'; export default class MyComponent extends LightningElement { async isCurrentlyOnAccounts() { try { const selectedItem = await getSelectedNavigationItem(); return selectedItem.pageReference?.attributes?.objectApiName === 'Account'; } catch (error) { console.error('Error checking navigation:', error); return false; } } } ``` ## Aura Components Sample Code This component has a button that, when pressed, returns information about the selected navigation item. Component code: ```html ``` Controller code: ```javascript ({ getSelectedNavigationItem : function(component, event, helper) { var navigationItemAPI = component.find("navigationItemAPI"); navigationItemAPI.getSelectedNavigationItem().then(function(response) { console.log(response); }) .catch(function(error) { console.log(error); }); } }) ``` ## Response This method returns a promise that, upon success, resolves to a `navigationItemInfo` object. The promise is rejected on error. The `navigationItemInfo` object has the following fields. |Name|Type|Description| |----|----|-----------| |`label`|string|The navigation item’s label, such as `Account` or `Case`.| |`developerName`|string|The navigation item’s developer name that uniquely identifies the item. For example, `Salesforce_Account` or `Your_VF_Page_Name`.| |`selected`|boolean|True if the tab is currently selected, false otherwise.| |`pageReference`|object|The representation of the current page. The object returns information such as: page type (for example `standard__objectPage` or `standard__navItemPage`), object API name, and state information for the page.| Here’s the structure of a `navigationItemInfo` object. ```javascript { developerName : string, label : string, pageReference: object, selected : boolean } ``` The `PageReference` structure looks like this. ```javascript { type: 'standard__objectPage', attributes: { objectApiName: 'Account', actionName: 'home' }, state: { // Optional state parameters } } ``` # getSelectedNavigationTab() Returns the selected object in the navigation tab. This method is only available in API version 31.0 or later. ## Syntax ```javascript sforce.console.getSelectedNavigationTab((optional)callback:Function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`callback`|function|JavaScript method that’s called upon completion of the method.| ## Sample Code–Visualforce ```apex_page ``` ## Response This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following fields: |Name|Type|Description| |----|----|-----------| |`navigationTabId`|string|The object ID of the selected object.| |`listViewUrl`|object|The list view URL of the selected object.| |`label`|object|The label of the selected object.| |`selected`|boolean|`true` if returning the selected field of the object was successful, `false` otherwise.| |`success`|boolean|`true` if returning the object IDs was successful, `false` otherwise.| # getServicePresenceStatusChannels Retrieves the service channels that are associated with an Omni-Channel user’s current presence status. Available in API versions 32.0 and later. ## Syntax ```javascript sforce.console.presence.getServicePresenceStatusChannels(callback:function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`callback`|function|JavaScript method to call when the channels associated with a presence status are retrieved.| ## Sample Code–Visualforce ```apex_page Get Channels Associated with a Presence Status ``` ## Response This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following properties: |Name|Type|Description| |----|----|-----------| |`success`|Boolean|`true` if retrieving the current presence status channels was successful; `false` if the retrieving the current presence status channels wasn’t successful.| |`channels`|JSON string of `channel` objects|Returns the IDs and API names of the channels associated with the presence status.| # getServicePresenceStatusChannels for Lightning Experience Retrieves the service channels that are associated with an Omni-Channel user’s current presence status. ## Sample Code Component code: ```html ``` Controller code: ```javascript ({ getStatusChannels: function(cmp, evt, hlp) { var omniAPI = cmp.find("omniToolkit"); omniAPI.getServicePresenceStatusChannels().then(function(result) { var channels = JSON.parse(result.channels); //For example purposes, just retrieve the first channel console.log('First channel ID is: ' + channels[0].channelId); console.log('First channel developer name is: ' + channels[0].developerName); }).catch(function(error) { console.log(error); }); } }) ``` ## Response This method returns a promise that, upon success, resolves to an array of `channel` objects, containing the following fields. |Name|Type|Description| |----|----|-----------| |`channelId`|String|The ID of the channel.| |`developerName`|String|The name of the channel.| # getServicePresenceStatusId Retrieves an agent’s current presence status. Available in API versions 32.0 and later. ## Syntax ```javascript sforce.console.presence.getServicePresenceStatusId(callback:function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`callback`|function|JavaScript method to call when the agent’s presence status is retrieved.| ## Sample Code–Visualforce ```apex_page Get Omni-Channel Status ID ``` ## Response This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following properties: |Name|Type|Description| |----|----|-----------| |`success`|Boolean|`true` if retrieving the presence status ID was successful; `false` if the retrieving the presence status ID wasn’t successful.| |`statusName`|String|The name of the agent’s current presence status.| |`statusApiName`|String|The API name of the agent’s current presence status.| |`statusId`|String|The ID of the agent’s current presence status.| # getServicePresenceStatusId for Lightning Experience Retrieves an agent’s current presence status. ## Sample Code Component code: ```html ``` Controller code: ```javascript ({ getStatus: function(cmp, evt, hlp) { var omniAPI = cmp.find("omniToolkit"); omniAPI.getServicePresenceStatusId().then(function(result) { console.log('Status Id is: ' + result.statusId); }).catch(function(error) { console.log(error); }); } }) ``` ## Response This method returns a promise that, upon success, resolves to an object, containing the following fields. |Name|Type|Description| |----|----|-----------| |`statusName`|string|The name of the agent’s current presence status.| |`statusApiName`|string|The API name of the agent’s current presence status.| |`statusId`|string|The ID of the agent’s current presence status.| # getSoftphoneLayout() for Lightning Experience ## Usage Returns the softphone layout of the current user. This method is available in API version 38.0 or later. The Open CTI for Lightning Experience methods `screenPop()` and `searchAndScreenPop()` don't support `screenPopSettings`. ## Syntax ```javascript sforce.opencti.getSoftphoneLayout({ callback: FUNCTION, }); ``` ## Arguments | Name | Type | Description | | ---------- | -------- | ----------------------------------------------------------------- | | `callback` | function | JavaScript method executed when the API method call is completed. | ## Sample Code–HTML and JavaScript ```html ``` ## Response This method is asynchronous. The response is returned in an object passed to a callback method. The response object contains the following fields. | Name | Type | Description | | ------------- | ------- | -------------------------------------------------------------------------------------------------------------------------- | | `success` | boolean | `true` if the API call succeeded and the softphone layout definition is returned in `returnValue`; `false` otherwise. | | `returnValue` | object | The softphone layout definition if the call succeeded; `null` if it failed. See [returnValue Fields](#returnvalue-fields). | | `errors` | array | `null` if the call succeeded. Otherwise, an array of [error messages](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-error-messages-lightning.md). | ## returnValue Fields The returned object contains three keys, `"Internal"`, `"Inbound"`, and `"Outbound"`, one for each call type. Each call-type object has the these fields. - `callRelatedFields` - : An array of call-related fields selected to display. Possible values are `"ANI"`, `"DNIS"`, `"SEGMENT"`, and `"QUEUE"`. * `objects` - : The set of Salesforce objects selected to display, along with the `Field Label` and `Field Name` (API name) selected to display from each object. - `screenPopSettings` - : Contains a `screenPopsOpenWithin` field with a value of either `"ExistingWindow"` or `"NewWindow"`. Also contains settings for each screen pop match type: `"NoMatch"`, `"SingleMatch"`, and `"MultipleMatches"`. Each match type has a `screenPopType` field and an optional `screenPopData` field. | screenPopType value | screenPopData value | | -------------------- | ------------------------------------ | | `"PopToEntity"` | Name of the target object. | | `"PopToVisualforce"` | Name of the target Visualforce page. | | `"PopToSearch"` | Not present. | | `"PopToFlow"` | Name of the target flow. | ## Example returnValue ```javascript { "Internal" : { "callRelatedFields" : ["ANI", "DNIS"], "objects" : { "User" : [{ "displayName" : "Name", "apiName" : "Name" }] }, "screenPopSettings" : {} }, "Inbound" : { "callRelatedFields" : ["ANI", "DNIS", "SEGMENT", "QUEUE"], "objects" : { "Account" : [{ "displayName" : "Account Name", "apiName" : "Name" }] }, "screenPopSettings" : { "NoMatch" : { "screenPopType" : "PopToEntity", "screenPopData" : "Contact" }, "SingleMatch" : { "screenPopType" : "PopToVisualforce", "screenPopData" : "Visualforce_Page_Name" }, "MultipleMatches" : { "screenPopType" : "PopToSearch" } } }, "Outbound" : { "callRelatedFields" : ["DNIS"], "objects" : { "Account" : [{ "displayName" : "Account Name", "apiName" : "Name" }] }, "screenPopSettings" : {} } } ``` # getSoftphoneLayout() for Salesforce Classic ## Usage Returns the softphone layout as a JSON string. This method is only available in API version 27.0 or later. ## Syntax ```javascript sforce.interaction.cti.getSoftphoneLayout(callback:function); ``` ## Arguments |Name|Type|Description| |------|------|-------------| |`callback`|function|JavaScript method executed when the API method call is completed.| ## Sample Code–JavaScript ```javascript ``` ## Response This method is asynchronous. The response is returned in an object passed to a callback method. The response object contains the following fields. |Name|Type|Description| |------|------|-------------| |`result`|string|If the API call was successful, the softphone layout definition is returned as a JSON string. If the API call failed, `null` is returned.| |`error`|string or undefined|If the API call was successful, this variable is undefined. If the API call failed, this variable returns an error message.| The returned JSON string contains three elements, one for each call type: - `"Internal"` - `"Inbound"` - `"Outbound"` Each call type contains three subsections: - `"callRelatedFields"`—An array of call-related fields selected to display. Possible values are `"ANI"`, `"DNIS"`, `"SEGMENT"`, and `"QUEUE"`. - `"objects"`—The set of Salesforce objects selected to display, along with the `Field Label` and `Field Name` (API name) selected to display from each object. - `"screenPopSettings"`—Contains a `"screenPopsOpenWithin"` field with a value of either `"ExistingWindow"` or `"NewWindow"`, and settings for each screen pop match type: `"NoMatch"`, `"SingleMatch"`, and `"MultipleMatches"`. Each match type contains a `"screenPopType"` field and may also contain a `"screenPopData"` field. If `"screenPopType"` is `"PopToEntity"`, then `"screenPopData"` contains the target object name. If it is `"PopToVisualforce"`, then `"screenPopData"` contains the target Visualforce page name. If it is `"PopToSearch"`, there is no `"screenPopData"` field. Example `result`: ```javascript "Internal" : { "callRelatedFields" : [ "ANI", "DNIS", ] "objects" : { "User" : [ { "displayName" : "Name", "apiName" : "Name" } ] }, "screenPopSettings" : {} }, "Inbound" : { "callRelatedFields" : [ "ANI", "DNIS", "SEGMENT", "QUEUE" ], "objects" : { "Account" : [ { "displayName" : "Account Name", "apiName" : "Name" } ] }, "screenPopSettings" : { "NoMatch" : { "screenPopType" : "PopToEntity", "screenPopData" : "Contact" }, "SingleMatch" : { "screenPopType" : "PopToVisualforce", "screenPopData" : "Visualforce_Page_Name" }, "MultipleMatches" : { "screenPopType" : "PopToSearch" } } }, "Outbound" : { "callRelatedFields" : [ "DNIS" ], "objects" : { "Account" : [ { "displayName" : "Account Name", "apiName" : "Name" } ] }, "screenPopSettings" : {} } } ``` # getSubtabIds() Returns all of the IDs of the subtabs on the primary tab specified by a primary tab ID. If the primary tab ID is null, it returns the IDs of the subtabs on the current primary tab. This method can only be called from a custom console component or a detail page overwritten by a Visualforce page. This method is only available in API version 26.0 or later. ## Syntax ```javascript sforce.console.getSubtabIds( (optional) primaryTabId:String, (optional) callback:Function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`primaryTabId`|string|ID of the primary tab from which the subtab IDs are returned.| |`callback`|function|JavaScript method that’s called upon completion of the method.| ## Sample Code–Visualforce ```apex_page Click here to get the subtab IDs ``` ## Response This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following fields: |Name|Type|Description| |----|----|-----------| |`ids`|string|An array of open subtab IDs.| |`success`|boolean|`true` if firing the event was successful; `false` if firing the event wasn't successful.| # getTabInfo() for Lightning Experience Returns information about the specified tab. This method works only in Lightning console apps. ## Arguments The method provides the same argument for both Aura Components and Lightning Web Components (LWC). |Name|Type|Description| |----|----|-----------| |`tabId`|string|ID of the tab for which to retrieve the information.| ## LWC Sample Code This component has a function that returns the tab information. ```javascript import { LightningElement, wire } from 'lwc'; import { EnclosingTabId, getTabInfo } from 'lightning/platformWorkspaceApi'; export default class ConsoleNavExample extends LightningElement { @wire(EnclosingTabId) enclosingTabId; handleClick() { if (this.enclosingTabId) { getTabInfo(this.enclosingTabId).then((tabInfo) => { // do something with it }).catch((error) => { console.log(error); }); } } } ``` To make your component available for use in a Lightning console app, specify the `lightning__AppPage` target in the [component’s configuration file](https://developer.salesforce.com/docs/platform/lwc/guide/use-config-for-console-app.html). ## Aura Components Sample Code This component has a button that, when pressed, opens a tab and uses the `getTabInfo()` method to print the new tab’s `tabInfo` to the developer console. Component code: ```html ``` Controller code: ```javascript ({ getOpenedTabInfo : function(component, event, helper) { var workspaceAPI = component.find("workspace"); workspaceAPI.openTab({ url: '/lightning/r/Account/001xx000003DI05AAG/view', focus: true }).then(function(response) { workspaceAPI.getTabInfo({ tabId: response }).then(function(response) { console.log(response); }); }) .catch(function(error) { console.log(error); }); } }) ``` **note:** The relative URL used in this example is a placeholder. To try this example yourself, use a relative URL with a record ID from your org. ## Response This method returns a promise that, upon success, resolves to a `tabInfo` object representing the specified tab. A `tabInfo` object is a JSON array of information about a workspace tab, with nested arrays of information on each subtab. This is the structure of a `tabInfo` object. ```javascript { tabId: string, url: string (URL), pinned: boolean, closeable: boolean, title: string, icon: string (SLDS iconKey), iconAlt: string, customTitle: string (optional), customIcon: string (optional), customIconAlt: string (optional), highlighted: boolean, pageReference: object, isSubtab: boolean, parentTabId: string, subtabs: [ { tabId: string, url: string (URL), pinned: boolean, closeable: boolean, title: string, icon: string (SLDS iconKey), iconAlt: string, customTitle: string (optional), customIcon: string (optional), customIconAlt: string (optional), highlighted: boolean, pageReference: object, isSubtab: boolean, parentTabId: string, focused: boolean, recordId: string, }, ... ], focused: boolean, recordId: string } ``` # getTabLink() Retrieves the URL to a tab, or group of related tabs, from the Salesforce console. This method is only available in API version 28.0 or later. ## Syntax ```javascript sforce.console.getTabLink(level:String, (optional)tabId:String, (optional)callback:Function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`level`|string|Level that matches one of the Link to Share options in the Salesforce console user interface. The options are:
  • All primary tabs and subtabs — `sforce.console.TabLink.PARENT_AND_CHILDREN`.
  • Only the specified tab — `sforce.console.TabLink.TAB_ONLY`
  • A standard Salesforce URL — `sforce.console.TabLink.SALESFORCE_URL`
| |`tabId`|string|Optional tab ID of the tab from which you’re retrieving the URL. If you do not pass a tab ID, the URL to the current tab is returned.| |`callback`|function|JavaScript method that’s called upon completion of the method.| ## Sample Code–Visualforce ```apex_page Click here to get tab link ``` ## Response This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following fields: |Name|Type|Description| |----|----|-----------| |`tabLink`|string|The retrieved URL.| |`success`|boolean|`true` if the link was retrieved successfully, `false` if retrieving was unsuccessful.| |`callback`|function|JavaScript method that’s called upon completion of the method.| # getTabURL() for Lightning Experience Returns the URL of the specified tab. This method works only in Lightning console apps. This method isn’t supported for Lightning Web Components (LWC). To retrieve the URL of a specified tab in LWC, use [getTabInfo()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-lightning-gettabinfo.md). ## Arguments |Name|Type|Description| |----|----|-----------| |`tabId`|string|ID of the tab for which to retrieve the URL.| ## Aura Components Sample Code This component has a button that, when pressed, opens a tab and uses the `getTabURL()` method to print the new tab’s URL to the developer console. Component code: ```html ``` Controller code: ```javascript ({ getOpenedTabURL : function(component, event, helper) { var workspaceAPI = component.find("workspace"); workspaceAPI.openTab({ url: '/lightning/r/Account/001xx000003DI05AAG/view', focus: true }).then(function(response) { workspaceAPI.getTabURL({ tabId: response }).then(function(response) { console.log(response); }); }) .catch(function(error) { console.log(error); }); } }) ``` **note:** The relative URL used in this example is a placeholder. To try this example yourself, use a relative URL with a record ID from your org. ## Response This method returns a promise that, upon success, resolves to the URL of the specified tab. # getUtilityInfo() for Lightning Experience Returns the state of the current utility as a `utilityInfo` object. This method isn’t supported for Lightning Web Components (LWC). For LWC usage, see [getInfo()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-lwc-getinfo.md). ## Arguments |Name|Type|Description| |----|----|-----------| |`utilityId`|string|The ID of the utility for which to retrieve the state.| ## Aura Components Sample Code This component has a button that, when pressed, retrieves the enclosing utility’s info and opens it if it’s not currently visible, and closes it otherwise. Component code: ```html ``` Controller code: ```javascript ({ handleGetUtilityInfo : function(component, event, helper) { var utilityBarAPI = component.find("utilitybar"); utilityBarAPI.getUtilityInfo().then(function(response) { if (response.utilityVisible) { utilityBarAPI.minimizeUtility(); } else { utilityBarAPI.openUtility(); } }) .catch(function(error) { console.log(error); }); } }) ``` ## Response This method returns a promise that resolves to a `utilityInfo` object representing the enclosing utility, containing the following fields. The promise is rejected on error. |Name|Type|Description| |----|----|-----------| |`id`|string|The ID of the utility.| |`isLoaded`|boolean|Whether the utility is loaded.| |`utilityLabel`|string|The label of the utility.| |`utilityIcon`|string|The SLDS icon ID of the utility’s icon.| |`utilityIconVariant`|string|The SLDS icon variant of the utility’s icon.| |`utilityHighlighted`|boolean|Whether the utility is highlighted.| |`utilityVisible`|boolean|Whether the utility is visible.| |`utilityPoppedOut`|boolean|Whether the utility is popped out.| |`panelHeaderLabel`|string|The label of the utility panel.| |`panelHeaderIcon`|string|The SLDS icon ID of the utility panel’s icon.| |`panelHeaderIconVariant`|string|The SLDS icon variant of the utility panel’s icon.| |`panelHeight`|integer|The height of the utility panel in pixels.| |`panelWidth`|integer|The width of the utility panel in pixels| # Handle Custom URLs in Chat Have your agents pass along custom URLs to perform specific actions in your mobile app. **important:** 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](https://help.salesforce.com/s/articleView?id=service.miaw_intro_landing.htm&type=5) before that date. Messaging offers many of the [chat features](https://help.salesforce.com/s/articleView?id=service.miaw_chat_vs_messaging.htm&type=5) that you love plus asynchronous conversations that can be picked back up at any time. Learn about chat retirement in [Help](https://help.salesforce.com/s/articleView?id=001790618&type=1). When an agent sends a standard link to a user in your app, a preview tile appears that the user can tap to view in a browser. However, you can come up with your own URL scheme that displays a custom tile and performs a custom action within your app. 1. Create a custom URL scheme and expression. Create a URL scheme using the [`AppEventList`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/model/AppEventList.html) class. This class allows you to add URLs either for specific paths (such as `action/settings`) or using regular expressions (such as `action\\/a.*`). Patterns are matched in the order that you add them to the [`AppEventList`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/model/AppEventList.html) object. Be sure to add items starting with the most specific and ending with the most generic. ```java // Create an app event list // TO DO: Replace "servicesdk" with your own unique scheme AppEventList appEventList = new AppEventList("servicesdk"); // Add a regular expression for a path appEventList.addDescriptionForPath("action/settings", "Tap for regex action"); // Add a custom path for a specific path appEventList.addDescriptionForExpression("action\\/a.*", "Tap for path action"); ``` 2. Implement the [`AppLinkClickListener`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/ui/AppLinkClickListener.html) so that you can handle when the user taps on the URL. **note:** In order to minimize or maximize the chat window, you need access to the [`ChatUIClient`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/ui/ChatUIClient.html) that you used when creating the chat UI. ```java public static class ChatAppLinkClickListener implements AppLinkClickListener { private final Activity mActivity; private final ChatUIClient mUIClient; // Constructor requires the chat UI client and the activity public ChatAppLinkClickListener(ChatUIClient uiClient, Activity activity) { mActivity = activity; mUIClient = uiClient; } @Override public void didReceiveAppEventWithURL(@NonNull String url) { if (url.contains("settings")) { // Minimize chat window mUIClient.minimize(); // TO DO: Perform some action for this url. For example: Intent intent = new Intent(mActivity, ChatSettingsActivity.class); mActivity.startActivity(intent); } if (url.contains("alert")) { // TO DO: Perform some action for this url. For example: Toast.makeText( mActivity.getApplicationContext(), "An example of an alert", Toast.LENGTH_SHORT) .show(); } // NOTE: You can maximize the chat window using // mUIClient.maximize(); } } ``` 3. Configure the chat SDK using the [`ChatUIConfiguration`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/ui/ChatUIConfiguration.html) builder. Add the [`AppEventList`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/model/AppEventList.html) object and the [`AppLinkClickListener`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/ui/AppLinkClickListener.html). ```java new ChatUIConfiguration.Builder() // … other ChatUIConfiguration details .chatUIConfigurationBuilder.appEventList(appEventList) .appLinkClickListener(new ChatAppLinkClickListener(context)) ``` # Handle Custom URLs in Chat Have your agents pass along custom URLs to perform specific actions in your mobile app. **important:** 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](https://help.salesforce.com/s/articleView?id=service.miaw_intro_landing.htm&type=5) before that date. Messaging offers many of the [chat features](https://help.salesforce.com/s/articleView?id=service.miaw_chat_vs_messaging.htm&type=5) that you love plus asynchronous conversations that can be picked back up at any time. Learn about chat retirement in [Help](https://help.salesforce.com/s/articleView?id=001790618&type=1). When an agent sends a standard link to a user in your app, a preview tile appears that the user can tap to view in a browser. However, you can come up with your own URL scheme that displays a custom tile and performs a custom action within your app. 1. Create a custom URL scheme and expression. Create a URL scheme using the [`SCSAppEventList`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSAppEventList.html) class. This class allows you to add URLs either for specific paths (such as `action/settings`) or using regular expressions (such as `action\\/a.*`). Patterns are matched in the order that you add them to the [`SCSAppEventList`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSAppEventList.html) object. Be sure to add items starting with the most specific and ending with the most generic. ```java // Create an app event list // TO DO: Replace "servicesdk" with your own unique scheme let eventList = SCSAppEventList(scheme: "servicesdk") // Add a regular expression for a path eventList.addDescription("Tap for regex action", withExpression: "action\\/a.*") // Add a custom path for a specific path eventList.addDescription("Tap for path action", forPath: "action/settings") ``` 2. Add the event list to your [`SCSChatConfiguration`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSChatConfiguration.html) object. ```java // Create a chat config object let config = SCSChatConfiguration(liveAgentPod: "YOUR_POD_NAME", orgId: "YOUR_ORG_ID", deploymentId: "YOUR_DEPLOYMENT_ID", buttonId: "YOUR_BUTTON_ID") // … Perform other chat configuration setup … // Add event list to chat configuration config.eventList = eventList ``` 3. Implement the [`SCSChatInterfaceDelegate`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSChatInterfaceDelegate.html) delegate so that you can handle when the user taps on the URL. ```java class MyChatDelegate: SCSChatInterfaceDelegate { func interface(_ interface: SCSChatInterface!, didReceiveAppEventWith URL: URL!) // Get path guard let fullPath = (URL as NSURL).resourceSpecifier else { return } // Minimize chat window ServiceCloud.shared().chatUI.minimize() if fullPath.contains("action/settings") { // TO DO: Perform some action for this url return } if fullPath.contains("action/alert") { // TO DO: Perform some action for this url return } // NOTE: You can maximize the chat window using // ServiceCloud.shared().chatUI.maximize() } } ``` 4. Add your delegate to the chat interface. ```java ServiceCloud.shared().chatUI.delegate = myChatDelegate ``` # Hard Disk Represents a Hard Disk configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. ## Configuration Item Type Definition ||| |-|-| |Name|Hard Disk| |Developer Name|`SD_HaDi`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Network Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-network-device.md)| |Rule Name|Default rule for all Azure App Services| |Identifier(s)|Asset Name Subscription Id Resource Group| ## Attributes No associated attributes for this configuration item type. # Hardware and Network Represents the Hardware and Network attribute set in the Configuration Management Database (CMDB). This attribute set groups related attributes for configuration items. ## Configuration Item Attribute Set Definition ||| |-|-| |Display Name|Hardware and Network| |Developer Name|`SD_HaAnNe`| |Master Label|Hardware_and_Network| ## Attributes ### Available Memory(GB) - **Type**: double - **Developer Name**: `SD_AvMe` - **Description**: Describes the Available Memory(GB) for configuration items. - **Required**: Optional ### BIOS Build Number - **Type**: text - **Developer Name**: `SD_BiBuNu` - **Description**: Describes the BIOS Build Number for configuration items. - **Required**: Optional ### BIOS Manufacturer - **Type**: text - **Developer Name**: `SD_BiMa` - **Description**: Describes the BIOS Manufacturer for configuration items. - **Required**: Optional ### BIOS Serial Number - **Type**: text - **Developer Name**: `SD_BiSeNu` - **Description**: Describes the BIOS Serial Number for configuration items. - **Required**: Optional ### Device Type - **Type**: text - **Developer Name**: `SD_DeTy` - **Description**: Describes the Device Type for configuration items. - **Required**: Optional ### DNS Domain - **Type**: text - **Developer Name**: `SD_DnDo` - **Description**: Describes the DNS Domain for configuration items. - **Required**: Optional ### Domain - **Type**: text - **Developer Name**: `SD_Do` - **Description**: Describes the Domain for configuration items. - **Required**: Optional ### Fully Qualified Domain Names - **Type**: text - **Developer Name**: `SD_FuQuDoN` - **Description**: Describes the Fully Qualified Domain Names for configuration items. - **Required**: Optional ### Hardware Model - **Type**: text - **Developer Name**: `SD_HaMo` - **Description**: Describes the Hardware Model for configuration items. - **Required**: Optional ### Hardware Vendor - **Type**: text - **Developer Name**: `SD_HaVe` - **Description**: Describes the Hardware Vendor for configuration items. - **Required**: Optional ### Hardware Version - **Type**: text - **Developer Name**: `SD_HaVe1` - **Description**: Describes the Hardware Version for configuration items. - **Required**: Optional ### Host Id - **Type**: text - **Developer Name**: `SD_HoId` - **Description**: Describes the Host Id for configuration items. - **Required**: Optional ### IP Address - **Type**: text - **Developer Name**: `SD_IpAd` - **Description**: Describes the IP Address for configuration items. - **Required**: Optional ### Memory(GB) - **Type**: double - **Developer Name**: `SD_Me` - **Description**: Describes the Memory(GB) for configuration items. - **Required**: Optional ### NIS/Windows Domain - **Type**: text - **Developer Name**: `SD_NiDo` - **Description**: Describes the NIS/Windows Domain for configuration items. - **Required**: Optional ### Uptime - **Type**: text - **Developer Name**: `SD_Up` - **Description**: Describes the Uptime for configuration items. - **Required**: Optional ### Uptime Days - **Type**: text - **Developer Name**: `SD_UpDa` - **Description**: Describes the Uptime Days for configuration items. - **Required**: Optional ### Users - **Type**: text - **Developer Name**: `SD_Us` - **Description**: Describes the Users for configuration items. - **Required**: Optional ### Virtual IP Address - **Type**: text - **Developer Name**: `SD_ViIpAd1` - **Description**: Describes the Virtual IP Address for configuration items. - **Required**: Optional ### Zone Name - **Type**: text - **Developer Name**: `SD_ZoNa` - **Description**: Describes the Zone Name for configuration items. - **Required**: Optional # Hidden Pre-Chat for Android Use hidden pre-chat fields to capture valuable information without asking the customer directly for it. **important:** This feature requires version 1.2.0 or later of the Enhanced In-App Chat SDK. This article applies to the following implementations: | UI SDK | Core SDK | | :----: | :------: | | ✅ | ✅ | After you [set up pre-chat in Salesforce](https://help.salesforce.com/s/articleView?id=service.miaw_custom_prechat_2.htm), the UI SDK automatically presents the pre-chat form to the user and passes this information to Salesforce. If you're not using the UI SDK, the [Core SDK documentation](https://developer.salesforce.com/docs/service/messaging-in-app/guide/android-core-sdk.md) describes how to perform this process programmatically. To use hidden pre-chat fields, use the Core SDK. If you want to use this feature with the UI SDK, use the Core SDK with your UI SDK. This article describes the steps that you must take from your app to send any user data _not_ visible in the pre-chat form. This data is also described as hidden pre-chat fields. To learn about and set up pre-chat, see [Customize Pre-Chat for Enhanced Chat](https://help.salesforce.com/s/articleView?id=service.miaw_custom_prechat_2.htm). After you set up hidden pre-chat fields in Salesforce, you can populate these values using the SDK. 1. Implement the [`PreChatValuesProvider`](https://salesforce-async-messaging.github.io/messaging-in-app-android/sdk/core/com.salesforce.android.smi.core/-pre-chat-values-provider/index.html) interface. This provider contains the `setValues` method, which the SDK calls when it needs pre-chat values. 2. Add your provider to the SDK using the `CoreClient.registerHiddenPreChatValuesProvider` property. See the [`CoreClient`](https://salesforce-async-messaging.github.io/messaging-in-app-android/sdk/core/com.salesforce.android.smi.core/-core-client/index.html) reference documentation. **note:** This sample code requires the configuration object that you created when setting up the UI SDK or the Core SDK. See [Build a UI SDK App](https://developer.salesforce.com/docs/service/messaging-in-app/guide/android-ui-sdk.md) or [Build a Core SDK App](https://developer.salesforce.com/docs/service/messaging-in-app/guide/android-core-sdk.md) for more information. ``` // Create a core client from a config val coreClient = CoreClient.Factory.create(myContext, config) // Register a provider coreClient.registerHiddenPreChatValuesProvider( object : PreChatValuesProvider { // Implement the setValues method override suspend fun setValues(input: List): List { // Iterate through all the pre-chat fields input.forEach { // Specify the value for each field mapping if (it.name == PRECHAT_FIELD_NAME) { it.userInput = "My hidden pre-chat value" } } // Return the same list, but with updated values set return input } }) ``` After you register your provider, the SDK automatically calls your `setValues` method before a conversation begins. # Hidden Pre-Chat for iOS Use hidden pre-chat fields to capture valuable information without asking the customer directly for it. **important:** This feature requires version 1.2.0 or later of the Enhanced In-App Chat SDK. This article applies to the following implementations: | UI SDK | Core SDK | | :----: | :------: | | ✅ | ✅ | After you [set up pre-chat in Salesforce](https://help.salesforce.com/s/articleView?id=service.miaw_custom_prechat_2.htm), the UI SDK automatically presents the pre-chat form to the user and passes this information to Salesforce. If you're not using the UI SDK, the [Core SDK documentation](https://developer.salesforce.com/docs/service/messaging-in-app/guide/ios-core-sdk.md) describes how to perform this process programmatically. To use hidden pre-chat fields, use the Core SDK. If you want to use this feature with the UI SDK, use the Core SDK with your UI SDK. This article describes the steps that you must take from your app to send any user data _not_ visible in the pre-chat form. This data is also described as hidden pre-chat fields. To learn about and set up pre-chat, see [Customize Pre-Chat for Enhanced Chat](https://help.salesforce.com/s/articleView?id=service.miaw_custom_prechat_2.htm). After you set up hidden pre-chat fields in Salesforce, you can populate these values using the SDK. 1. Implement the [`HiddenPreChatDelegate`](https://salesforce-async-messaging.github.io/messaging-in-app-ios/documentation/smiclientcore/hiddenprechatdelegate) interface. This delegate contains the `didRequestPrechatValues` method, which the SDK calls when it needs pre-chat values. 2. Add your delegate to the SDK using the `CoreClient.preChatDelegate` property. See the [`CoreClient`](https://salesforce-async-messaging.github.io/messaging-in-app-ios/documentation/smiclientcore/coreclient) reference documentation. ``` class HiddenPrechatDelegateImplementation: HiddenPreChatDelegate { func core(_ core: CoreClient!, conversation: Conversation!, didRequestPrechatValues hiddenPreChatFields: [HiddenPreChatField]!, completionHandler: HiddenPreChatValueCompletion!) { // Use the conversation object to inspect info about the conversation // Fill in all the hidden pre-chat fields for preChatField in hiddenPreChatFields { // preChatField.label contains the label // preChatField.identifier contains the conversation identifier // preChatField.value is where you populate the field with a value preChatField.value = "My hidden pre-chat value" } // Pass pre-chat fields back to SDK completionHandler(hiddenPreChatFields) } } ``` **note:** This sample code requires the configuration object that you created when setting up the UI SDK or the Core SDK. See [Build a UI SDK App](https://developer.salesforce.com/docs/service/messaging-in-app/guide/ios-ui-sdk.md) or [Build a Core SDK App](https://developer.salesforce.com/docs/service/messaging-in-app/guide/ios-core-sdk.md) for more information. ``` // Create an instance of the hidden pre-chat delegate let myPreChatDelegate = HiddenPrechatDelegateImplementation() // Create a core client from a config let coreClient = CoreFactory.create(withConfig: config) // Assign the hidden pre-chat delegate coreClient.preChatDelegate = myPreChatDelegate ``` After you register your delegate, the SDK automatically calls your `didRequestPrechatValues` method before a conversation begins. # Hidden Pre-Chat in Enhanced Web Chat To learn about and set up hidden pre-chat, see [Customize Pre-Chat for Enhanced Chat](https://help.salesforce.com/s/articleView?id=service.miaw_custom_prechat_2.htm). This section describes the steps you must take from your web client to send user data, also known as hidden pre-chat data, to Salesforce. See the associated documentation for each step of this sequence. ![Hidden pre-chat sequence](https://developer.salesforce.com/docs/media/messaging-web/hidden-pre-chat-sequence.png) 1. Before you initialize the API from the code snippet that we provide, add an event listener for [`onEmbeddedMessagingReady`](/docs/service/messaging-web/guide/event-listeners.html). This method notifies you when the API is ready for requests. 2. At some point after the `onEmbeddedMessagingReady` event is dispatched, pass hidden pre-chat fields to Salesforce by using `setHiddenPrechatFields` and `removeHiddenPrechatFields`. This sample code illustrates how you can implement the key steps of this sequence. ```javascript window.addEventListener("onEmbeddedMessagingReady", () => { console.log("Received the onEmbeddedMessagingReady event…"); // Send data to Salesforce embeddedservice_bootstrap.prechatAPI.setHiddenPrechatFields({"Order_Number" : "867-5309", "Customer_ID" : "11098324"}); // Remove any items from the previous list that you don't want to send embeddedservice_bootstrap.prechatAPI.removeHiddenPrechatFields(["Customer_ID"]); }); embeddedservice_bootstrap.init(…) ``` The Enhanced Web Chat [reference documentation](/docs/service/messaging-web/references/m4w-reference/prechatAPI.html) describes these methods in detail. **note:** If your Enhanced Web Chat deployment is on an Experience Cloud site, follow the instructions in _Salesforce Help_ to add JavaScript code to the head markup section of your site. See [Configure an Enhanced Web Chat Deployment in an Experience Builder Site](https://help.salesforce.com/s/articleView?id=service.miaw_deployment_experience_builder.htm) in _Salesforce Help_. # Hide Attachments Use the [`AttachmentConfiguration` parameter in the `UIConfiguration` class](https://salesforce-async-messaging.github.io/messaging-in-app-android/sdk/core/com.salesforce.android.smi.core.data.domain.remoteConfiguration/-attachment-configuration/index.html) to hide the attachment option from the input options. This article applies to the following implementations: | UI SDK | Core SDK | | :----: | :------: | | ✅ | | **important:** This feature requires version 1.7.0 or later of the Enhanced In-App Chat SDK. ``` // Hide the attachment option from the input options. Setting the endUserToAgent property to true hides the attachment option from the end user. @Parcelize data class AttachmentConfiguration( val endUserToAgent: Boolean = true ) : Parcelable ``` # Hide Attachments Use the UIConfiguration object to hide the attachment menu in the input bar. This article applies to the following implementations: | UI SDK | Core SDK | | :----: | :------: | | ✅ | | **important:** This feature requires version 1.7.0 or later of the Enhanced In-App Chat SDK. ``` /** * Create a UIConfiguration object and set the attachmentConfiguration * value to false to hide it. */ let configuration = UIConfiguration(serviceAPI: , organizationId: , developerName: , conversationId: ) configuration.attachmentConfiguration = AttachmentConfiguration(endUserToAgent: false) ``` # Hide End Chat Set the `allowEndSession` parameter in the `UIConfiguration` object to `true` to hide the End Chat button from the messaging conversation menu. **important:** This feature requires version 1.9.0 or later of the Enhanced In-App Chat SDK. This article applies to the following implementations: | UI SDK | Core SDK | | :----: | :------: | | ✅ | | ``` /** * Represents conversation options configuration information. * * @property allowEndSession */ @Parcelize data class ConversationOptionsConfiguration( val allowEndSession: Boolean = false // set this to true to show the end chat button ) : Parcelable ``` # Hide End Chat Set the `allowEndChat` parameter in the `UIConfiguration` object to `false` to hide the End Chat button from the messaging conversation menu. **important:** This feature requires version 1.9.0 or later of the Enhanced In-App Chat SDK. This article applies to the following implementations: | UI SDK | Core SDK | | :----: | :------: | | ✅ | | ``` /** * Create a UIConfiguration object and set the value allowEndChat in the conversationOptionsConfiguration to false to hide it. */ let configuration = UIConfiguration(serviceAPI: , organizationId: , developerName: , conversationId: ) configuration.conversationOptionsConfiguration = ConversationOptionsConfiguration(allowEndChat: false) ``` # Hide or Replace Messages in a Chat Feed Configure how each individual message in a chat feed is rendered in the Chat UI using custom logic and by extending the OverridableUI class. Configure the `renderMode` function with your custom logic. This function is invoked per message to determine its UI representation, which can be hidden, default, or custom. Using the sample code, set the `EntryRenderMode` enum value for each ChatFeedEntry of the ViewComponents interface. - To hide a chat message, have your `renderMode` function return `EntryRenderMode.None` for that specific entry. - To use the default built-in UI to display chat entries, set `EntryRenderMode.Existing`. - To use a customized UI to display chat entries using the composable CustomEntryContainer, set `EntryRenderMode.Replace`. ``` open class OverridableUI { open fun renderMode(entry: ChatFeedEntry): EntryRenderMode = EntryRenderMode.Existing inner class CustomViewComponents(private val conversationClient: ConversationClient) : ViewComponents { @Composable override fun ChatFeedEntry(entry: ChatFeedEntry, content: @Composable () -> Unit) { when (renderMode(entry)) { EntryRenderMode.None -> Unit EntryRenderMode.Existing -> content() EntryRenderMode.Replace -> CustomEntryContainer(entry, conversationClient) } } } } ``` **note:** You must provide replacements for the entries that you replace. See the [​Sample Code for Defining Your Own UI for the Text Message Entry Type](https://developer.salesforce.com/docs/service/messaging-in-app/guide/android-define-ui.md#sample-code-for-defining-your-own-ui-for-the-text-message-entry-type) and [Sample Code for Defining Your Own UI for the Choices message Entry Type​](https://developer.salesforce.com/docs/service/messaging-in-app/guide/android-define-ui.md#sample-code-for-defining-your-own-ui-for-the-choices-message-entry-type) sections for examples. # Hide Transcripts Use the [`TranscriptConfiguration` parameter in the `UIConfiguration` class](https://salesforce-async-messaging.github.io/messaging-in-app-android/sdk/core/com.salesforce.android.smi.core.data.domain.remoteConfiguration/-transcript-configuration/index.html?query=typealias%20TranscriptConfiguration%20=%20com.salesforce.android.smi.network.internal.dto.response.remoteconfig.TranscriptConfiguration) to hide the transcript button in the participant client menu. This article applies to the following implementations: | UI SDK | Core SDK | | :----: | :------: | | ✅ | | **important:** This feature requires version 1.7.0 or later of the Enhanced In-App Chat SDK. ``` // Hide the transcript option from the menu. Setting the allowTranscriptDownload property to true hides the transcript option from the end user. @Parcelize data class TranscriptConfiguration( val allowTranscriptDownload: Boolean = true ) : Parcelable ``` # Hide Transcripts Use the UIConfiguration object to hide the transcript button from the conversations menu. This article applies to the following implementations: | UI SDK | Core SDK | | :----: | :------: | | ✅ | | **important:** This feature requires version 1.7.0 or later of the Enhanced In-App Chat SDK. ``` ​​/** * Create a UIConfiguration object and set the transcriptConfiguration * value to false to hide it. */ let configuration = UIConfiguration(serviceAPI: , organizationId: , developerName: , conversationId: ) configuration.transcriptConfiguration = TranscriptConfiguration(allowTranscriptDownload: false) ``` # Holiday Represents the fields in the Holiday object that are used by Salesforce Scheduler. A holiday is a period during which your service resource is unavailable for appointment scheduling. ## Supported Calls `create()`, `delete()`, `describeSObjects()`, `getDeleted()`, `getUpdated()`, `query()`, `retrieve()`, `update()`, `upsert()` ## Fields ### ActivityDate - **Type**: date - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: If the Holiday `IsAllDay` flag is set to `true` (indicating that it is an all-day holiday), then the holiday due date information is contained in the `ActivityDate` field. This field is a date field with a timestamp that is always set to midnight in the Coordinated Universal Time (UTC) time zone. The timestamp is not relevant, and you must not attempt to alter it to account for any time zone differences. ### Description - **Type**: string - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: Text description of the holiday. ### EndTimeInMinutes - **Type**: int - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The end time of the holiday in minutes. ### IsAllDay - **Type**: boolean - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: Indicates whether the duration of the holiday is all day (`true`) or not (`false`). ### Name - **Type**: string - **Properties**: Create, Filter, Group, idLookup, Sort, Update - **Description**: The name of the holiday. ### StartTimeInMinutes - **Type**: int - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The start time of the holiday in minutes. # Hosted On Represents the Hosted On relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. ## Relationship Type Definition ||| |-|-| |Developer Name|`SD_HoOn`| |Description|Defines the Hosted On relationship between configuration items in the CMDB.| |Master Label|Hosted On| |Direct Relationship|Hosted On| |Inverse Relationship|Hosts| |Line Stroke|Solid| |Color Code|`#808033`| # Hosts Represents the Hosts relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. ## Relationship Type Definition ||| |-|-| |Developer Name|`SD_Hosxx`| |Description|Defines the Hosts relationship between configuration items in the CMDB.| |Master Label|Hosts| |Direct Relationship|Hosts| |Inverse Relationship|Hosted On| |Line Stroke|Solid| |Color Code|`#ffff00`| # How are the Classic and Lightning Console APIs Different? The user interface of your org dictates which development tools you can use with the Salesforce console. ## Console Integration Toolkit versus Lightning Console JavaScript API Both the Lightning Console JavaScript API and the Salesforce Console Integration Toolkit are JavaScript APIs that allow you to interact with Classic or Lightning console apps. Methods are implemented differently in each API, however. Here’s what’s different between the Lightning Console JavaScript API and the Salesforce Console Integration Toolkit. - You Use the Methods in Different Places - : - In Aura components, use the Lightning Console JavaScript API methods in the JavaScript controller of a Lightning component. - In Lightning web components, you can use only the utility bar and workspace API methods, wire adapters, and Lightning message channels. Lightning web components don’t currently support working with navigation items. - Visualforce or iframed, third-party pages work in both Lightning Experience and Salesforce Classic. For Visualforce and iframe pages, use the Classic methods from the Salesforce Console Integration Toolkit. However, there are limitations regarding which methods you can use. [Classic Console API Methods Supported in the Lightning Console API](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-lightning-classic-bridge-methods.md#classic-console-api-methods-supported-in-the-lightning-console-api), provides details on the supported methods. When you are using the Salesforce Console Integration Toolkit in Salesforce Classic, you use methods within ` ``` ## Response This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following properties: |Name|Type|Description| |----|----|-----------| |`success`|Boolean|`true` if the request to transfer a file was sent successfully; `false` if the request wasn’t sent successfully. A value of `true` doesn’t necessarily mean that the file was successfully transferred to an agent. Rather, it indicates that the request to begin a file transfer was sent successfully.| # Install the Android SDK To get started, install the SDK and then update some of the settings in your project. ## Add Maven Repository Add the following maven repository to your `build.gradle` or `build.gradle.kts` file. ```kotlin maven { url "https://s3.amazonaws.com/inapp.salesforce.com/public/android" } ``` ```kotlin maven { url = uri("https://s3.amazonaws.com/inapp.salesforce.com/public/android") } ``` ## Add Dependency Add the following dependency to your `build.gradle` or `build.gradle.kts` file. ```kotlin dependencies { implementation "com.salesforce.service:messaging-inapp-ui:" } ``` ```kotlin dependencies { implementation("com.salesforce.service:messaging-inapp-ui:") } ``` **tip:** To get the latest version information, refer to the [Enhanced In-App Chat release notes](https://github.com/Salesforce-Async-Messaging/messaging-in-app-android/releases). **note:** If you plan to use the [Core SDK](https://developer.salesforce.com/docs/service/messaging-in-app/guide/android-core-sdk.md) (and not the UI SDK), use the following dependency instead of `messaging-inapp-ui`: `com.salesforce.service:messaging-inapp-core:`. ## Update Other Settings Turn on the `dataBinding` feature in the Android section of your `build.gradle` file. ```kotlin buildFeatures { dataBinding true } ``` ```kotlin buildFeatures { dataBinding = true } ``` # Install the iOS SDK To get started, install the SDK and then update some of the properties in your project. ## Install the Frameworks You can install the SDK using Swift Package Manager, CocoaPods, or you can download and install the frameworks manually. ### OPTION 1: Install with Swift Package Manager To add the frameworks using Swift Package Manager, add a package dependency to your app using this public URL: `https://github.com/Salesforce-Async-Messaging/Swift-Package-InAppMessaging`. To learn more about package dependencies, see [Adding Package Dependencies to Your App](https://developer.apple.com/documentation/swift_packages/adding_package_dependencies_to_your_app) in Apple's Developer Documentation. ### OPTION 2: Install with CocoaPods If you haven't already done so, install the [CocoaPods](https://cocoapods.org/) gem, and initialize the CocoaPods main repository. ``` sudo gem install cocoapods pod setup ``` If you already have CocoaPods installed, update your pods to the latest version. ``` pod update ``` To create a Podfile, change to the root directory of your application project. Then create or edit the file named Podfile. ``` platform :ios, '14.0' target 'MyApp' do use_frameworks! # Pod for Enhanced In-App Chat UI and Core SDK pod 'Messaging-InApp-UI' end ``` **note:** If you plan to use the [Core SDK](https://developer.salesforce.com/docs/service/messaging-in-app/guide/ios-core-sdk.md) (and not the UI SDK), use the following pod instead of `Messaging-InApp-UI`: `Messaging-InApp-Core`. Run the CocoaPods installer. If you’re adding a new pod to your project, use this command: ``` pod install ``` If you’re updating your pod to a newer version, use this command: ``` pod update ``` Open the `.xcworkspace` file that CocoaPods generated to use the SDK in your app. ### OPTION 3: Install Frameworks Manually To install the XCFramework files manually, get the framework files (`SMIClientUI`, `SMIClientCore`) from [the release notes page](https://github.com/Salesforce-Async-Messaging/messaging-in-app-ios/releases) and embed them into your project. If you aren't using our UI SDK, you don’t need to embed the `SMIClientUI` framework file. ## Update Your Info Properties Several features of the SDK require you to add values to your project’s information property list (`Info.plist`). ### Camera and Photos Add descriptions for why the app wants to access the device's camera and photo library. This functionality is necessary when a customer attempts to send an image attachment to a rep. Add string values for "Privacy - Camera Usage Description" (`NSCameraUsageDescription`) and "Privacy - Photo Library Usage Description" (`NSPhotoLibraryUsageDescription`) in your project's Info properties (`Info.plist` file). For example: ``` NSCameraUsageDescription Used when sending an image to a rep. NSPhotoLibraryUsageDescription Used when sending an image to a rep. ``` ### Access to Files Allow the app to access files on the device so that a customer can share a file with the rep. Set "Supports opening documents in place" (`LSSupportsOpeningDocumentsInPlace`) and "Application supports iTunes file sharing" (`UIFileSharingEnabled`) to "YES". ``` ​​LSSupportsOpeningDocumentsInPlace UIFileSharingEnabled ``` ## Notifications If you want to take advantage of push notifications for messaging events, make sure that your app supports the "Push Notifications" capability from your project's Capabilities settings. # Install the Service Chat SDK for iOS Before you can use the iOS SDK, install the SDK and configure your project. **important:** 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](https://help.salesforce.com/s/articleView?id=service.miaw_intro_landing.htm&type=5) before that date. Messaging offers many of the [chat features](https://help.salesforce.com/s/articleView?id=service.miaw_chat_vs_messaging.htm&type=5) that you love plus asynchronous conversations that can be picked back up at any time. Learn about chat retirement in [Help](https://help.salesforce.com/s/articleView?id=001790618&type=1). 1. Add the SDK frameworks to your project. You can add the frameworks using [Swift Package Manager](https://developer.apple.com/documentation/swift_packages), using [CocoaPods](https://cocoapods.org/), or by downloading and adding the frameworks manually. To add the frameworks using Swift Package Manager, add a package dependency to your app using the following public URL: `https://github.com/Salesforce-Async-Messaging/Swift-Package-ServiceChat`. To learn more about package dependencies, see [Adding Package Dependencies to Your App](https://developer.apple.com/documentation/swift_packages/adding_package_dependencies_to_your_app) in Apple's Developer Documentation. **important:** The Swift Package Manager installation method is only supported for the Service Chat feature. To install the SDK for Knowledge or Case Management, use one of the other installation methods. Alternatively, you can [add the frameworks files manually](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/ios-install-sdk-manually.md) or [install the frameworks using CocoaPods](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/ios-install-sdk-cocoapods.md). 2. Add descriptions for why the app needs access to the device's camera and photo library. Add string values for "Privacy - Camera Usage Description" and "Privacy - Photo Library Usage Description" in your `Info.plist` file. To learn more about these properties, see [Cocoa Keys](https://developer.apple.com/library/prerelease/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html) in Apple's reference documentation. Sample values for these keys: ```xml NSCameraUsageDescription Used when sending an image to an agent. NSPhotoLibraryUsageDescription Used when sending an image to an agent. ``` You're now ready to get started using the SDK! # Install the Service SDK for Android Install the Service SDK for Android using Gradle. ## Before You Begin Before running through these steps, be sure you’ve checked the [Requirements for the Service Chat SDK for Android](https://developer.salesforce.com/docs/service/service-sdk-android/guide/android-sdk-prereqs.md). **important:** 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](https://help.salesforce.com/s/articleView?id=service.miaw_intro_landing.htm&type=5) before that date. Messaging offers many of the [chat features](https://help.salesforce.com/s/articleView?id=service.miaw_chat_vs_messaging.htm&type=5) that you love plus asynchronous conversations that can be picked back up at any time. Learn about chat retirement in [Help](https://help.salesforce.com/s/articleView?id=001790618&type=1). To get started with the Service SDK for Android: 1. Install the SDK using [Gradle](https://gradle.org/). The Service SDK is hosted in a maven repository. | Feature | Dependency Name | Maven Repository URL | | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------ | | All Features | `com.salesforce.service:servicesdk:`Service Chat SDK | `https://s3.amazonaws.com/salesforcesos.com/android/maven/release` | | Chat | `com.salesforce.service:chat-ui:`Service Chat SDK (if you're only using Chat Core, then use `com.salesforce.service:chat-core:`Service Chat SDK) | `https://s3.amazonaws.com/salesforcesos.com/android/maven/release` | To install **all** the Service SDK features, add the following maven repositories to your project's `build.gradle` file. ```java allprojects { repositories { google() mavenCentral() maven { url 'https://s3.amazonaws.com/salesforcesos.com/android/maven/release' } } } ``` **note:** Be sure to put the `repositories` list in the `allprojects` section. And add the following dependency to your module's `build.gradle` file. ```java dependencies { implementation 'com.salesforce.service:servicesdk:224.2.6' } ``` 2. Declare permissions. You must declare the following permissions in your `AndroidManifest.xml`. ```java ``` You can now start using the Service SDK for Android. # Installed On Represents the Installed On relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. ## Relationship Type Definition ||| |-|-| |Developer Name|`SD_InOn`| |Description|Defines the Installed On relationship between configuration items in the CMDB.| |Master Label|Installed On| |Direct Relationship|Installed On| |Inverse Relationship|Installed By| |Line Stroke|Solid| |Color Code|`#FF6600`| # Installed Software Details Represents the Installed Software Details attribute set in the Configuration Management Database (CMDB). This attribute set groups related attributes for configuration items. ## Configuration Item Attribute Set Definition ||| |-|-| |Display Name|Installed Software Details| |Developer Name|`SD_InSoDe`| |Master Label|Installed_Software_Details| ## Attributes ### Software Install Date - **Type**: text - **Developer Name**: `SD_SoInDa` - **Description**: Describes the Software Install Date for configuration items. - **Required**: Optional ### Software Install Location - **Type**: text - **Developer Name**: `SD_SoInLo` - **Description**: Describes the Software Install Location for configuration items. - **Required**: Optional ### Software Name - **Type**: text - **Developer Name**: `SD_SoNa` - **Description**: Describes the Software Name for configuration items. - **Required**: Optional ### Software Publisher - **Type**: text - **Developer Name**: `SD_SoPu` - **Description**: Describes the Software Publisher for configuration items. - **Required**: Optional ### Software Version - **Type**: text - **Developer Name**: `SD_SoVe` - **Description**: Describes the Software Version for configuration items. - **Required**: Optional # Instance Details Represents the Instance Details attribute set in the Configuration Management Database (CMDB). This attribute set groups related attributes for configuration items. ## Configuration Item Attribute Set Definition ||| |-|-| |Display Name|Instance Details| |Developer Name|`SD_InDe`| |Master Label|Instance_Details| ## Attributes ### AMI Launch Index - **Type**: int - **Developer Name**: `SD_AmLaIn` - **Description**: Describes the AMI Launch Index for configuration items. - **Required**: Optional ### Certificate - **Type**: text - **Developer Name**: `SD_Ce` - **Description**: Describes the Certificate for configuration items. - **Required**: Optional ### Image Id - **Type**: text - **Developer Name**: `SD_ImId` - **Description**: Describes the Image Id for configuration items. - **Required**: Optional ### Instance Id - **Type**: text - **Developer Name**: `SD_InId1` - **Description**: Describes the Instance Id for configuration items. - **Required**: Optional ### Instance Life Cycle - **Type**: text - **Developer Name**: `SD_InLiCy` - **Description**: Describes the Instance Life Cycle for configuration items. - **Required**: Optional ### Instance Port - **Type**: text - **Developer Name**: `SD_InPo` - **Description**: Describes the Instance Port for configuration items. - **Required**: Optional ### Instance Protocol - **Type**: text - **Developer Name**: `SD_InPr` - **Description**: Describes the Instance Protocol for configuration items. - **Required**: Optional ### Instance State - **Type**: text - **Developer Name**: `SD_InSt` - **Description**: Describes the Instance State for configuration items. - **Required**: Optional ### Instance tenancy - **Type**: text - **Developer Name**: `SD_InTe` - **Description**: Describes the Instance tenancy for configuration items. - **Required**: Optional ### Instance Type - **Type**: text - **Developer Name**: `SD_InTy` - **Description**: Describes the Instance Type for configuration items. - **Required**: Optional ### Instances - **Type**: text - **Developer Name**: `SD_In` - **Description**: Describes the Instances for configuration items. - **Required**: Optional ### Launch Time - **Type**: text - **Developer Name**: `SD_LaTi` - **Description**: Describes the Launch Time for configuration items. - **Required**: Optional ### Load Balancer Protocol - **Type**: text - **Developer Name**: `SD_LoBaPr` - **Description**: Describes the Load Balancer Protocol for configuration items. - **Required**: Optional ### Private DNS Name - **Type**: text - **Developer Name**: `SD_PrDnNa` - **Description**: Describes the Private DNS Name for configuration items. - **Required**: Optional ### Private IP Address - **Type**: text - **Developer Name**: `SD_PrIpAd` - **Description**: Describes the Private IP Address for configuration items. - **Required**: Optional ### Public DNS Name - **Type**: text - **Developer Name**: `SD_PuDnNa` - **Description**: Describes the Public DNS Name for configuration items. - **Required**: Optional ### Public IP Address - **Type**: text - **Developer Name**: `SD_PuIpAd` - **Description**: Describes the Public IP Address for configuration items. - **Required**: Optional # Instantiated By Represents the Instantiated By relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. ## Relationship Type Definition ||| |-|-| |Developer Name|`SD_InBy`| |Description|Defines the Instantiated By relationship between configuration items in the CMDB.| |Master Label|Instantiated By| |Direct Relationship|Instantiated By| |Inverse Relationship|Instantiates| |Line Stroke|Solid| |Color Code|`#333333`| # Instantiates Represents the Instantiates relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. ## Relationship Type Definition ||| |-|-| |Developer Name|`SD_Insxx`| |Description|Defines the Instantiates relationship between configuration items in the CMDB.| |Master Label|Instantiates| |Direct Relationship|Instantiates| |Inverse Relationship|Instance Of| |Line Stroke|Solid| |Color Code|`#995229`| # Integrate Chat with Lightning Flow for Service Customers who chat with you are often looking for quick and immediate resolutions to their problems. Lightning Flow for Service helps your agents provide consistent and efficient service. Agents can view your business processes in context of the customer chat because actions are presented as subtabs of the Chat Transcript primary tab. Agents see the appropriate actions to take right up front, without having to manually search for them. Lightning Flow for Service supports Chat in Lightning Experience, which uses Omni-Channel routing. ## Steps 1. Set up your actions. Use Flow Builder to create individual flows. Create quick actions, and add them to the record page layout so that they can appear in the component. 2. Create an Actions & Recommendations deployment. In the settings for the Chat channel, specify the actions that agents see by default. Specify which actions you want agents to complete first and last, and whether to auto-launch the first flow in the list. Optionally, select the actions that you want agents to see when they click **Add**. 3. Create a Lightning console record page. 1. In Lightning App Builder, create a record page for the Chat Transcript object using the Console: Pinned Left and Right Sidebars page template. 2. Add the Actions & Recommendations component to the left column, and specify the deployment name in component properties. 3. Place the Chat Body component in the right column. ## Example This Chat Transcript page displays the Actions & Recommendations and Chat Body components. ![Screen shot of the Service Console set up with Lightning Flow for Service and Live Agent.](https://developer.salesforce.com/docs/media/guided_engagement_live_agent_runtime.png) **See Also** - [_Salesforce Help_: Set Up Chat in Lightning Experience](https://help.salesforce.com/articleView?id=live_agent_intro_lightning.htm) # Integrate Open CTI with Lightning Flow for Service Open CTI provides a set of APIs that enables third-party telephony services to integrate with Salesforce. Lightning Flow for Service takes advantage of three Open CTI methods: `getSoftphoneLayout()`, `screenPop()`, and `searchAndScreenPop()`. 1. Update your Open CTI implementation to allow incoming calls to screen-pop to flows. You can also pass call data, such as the phone number or customer name, directly to a flow when it’s screen-popped. Use Open CTI API version 42.0 and later with the following methods. - [getSoftphoneLayout()](https://developer.salesforce.com/docs/atlas.en-us.api_cti.meta/api_cti/sforce_api_cti_getsoftphonelayout_lex.htm) - [screenPop()](https://developer.salesforce.com/docs/atlas.en-us.api_cti.meta/api_cti/sforce_api_cti_screenpop_lex.htm) - [searchAndScreenPop()](https://developer.salesforce.com/docs/atlas.en-us.api_cti.meta/api_cti/sforce_api_cti_searchandscreenpop_lex.htm) **note:** Before updating your implementation, make sure that you understand how Open CTI arguments are passed. Flows can accept input variables, which are also called arguments. The Actions & Recommendations component on a record page automatically attempts to pass the parent record ID to the flow. To use this information, the flow defines an input variable called `recordId` of type `Text`. The Open CTI API allows for more complex variable passing. Single variables and collection variables, like lists and arrays, can be passed through the `flowArgs` parameter available in the `screenPop` and `searchAndScreenPop` methods. 2. [Create flows](https://developer.salesforce.com/docs/service/salesforce-guided-engagement/guide/guided-engagement-setup-flow.md). For example, create an Unknown Caller screen flow for when there’s an incoming call and there’s no match in Salesforce for the caller. In Flow Builder, create a screen flow to verify the caller. - Add a screen with input components First Name, Last Name, Phone Number, and Address. - Add the Create Records element to create a contact and set the contact fields using the screen input components. - Connect the start element to the Unknown Caller screen. In addition to the Unknown Caller flow, create other flows and actions that you want your agents to use when talking to customers on the phone. 3. Configure screen-pop settings in the softphone layout. From Setup, go to the Softphone Layouts page. For No matching records, select **Pop to flow**. Then select the flow you created for Unknown Callers. **note:** When you use the Pop to flow option, flows open as primary tabs in the console. For Single-matching records, select **Pop detail page**. This setting allows the contact record page, for example, to be popped. ![Screen shot of the Screen Pop Settings page.](https://developer.salesforce.com/docs/media/guided_engagement_open_cti_pop_settings.png) 4. Create an Actions & Recommendations deployment and configure default actions for the phone channel. 5. [Customize the record page](https://developer.salesforce.com/docs/service/salesforce-guided-engagement/guide/guided-engagement-setup-component.md). Add the Actions & Recommendations component to a record page, such as the contact page. Select the deployment in the component properties. When calls match a Salesforce record and users get popped to that page, they can see which actions to complete for the call. **See Also** - [*Open CTI Developer Guide*](https://developer.salesforce.com/docs/atlas.en-us.api_cti.meta/api_cti/sforce_api_cti_intro.htm) - [*Salesforce Help*: Designing a Custom Softphone Layout](https://help.salesforce.com/articleView?id=cti_admin_phonelayoutscreate.htm) - [*Salesforce Help*: Assigning a Softphone Layout to a User Profile](https://help.salesforce.com/articleView?id=cti_admin_phonelayoutsassign.htm) - [*Lightning Components Developer Guide*: Set Flow Variable Values from a Lightning Component](https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/components_using_flow_inputs_set.htm) # Integrate Salesforce Scheduler with External Calendars Salesforce Scheduler provides developer resources that you can use to write appointments directly to, and read events from, external calendars. For example, use the `LxScheduler.ServiceResourceScheduleHandler` Apex interface to write a custom Apex class to read external calendar events. Then, associate the Apex class with Salesforce Scheduler flows or API calls through the Read External System Events scheduling policy rule. To write appointments to external calendars, first enable the Publish Appointments as Platform Events setting, and subscribe to the new `AppointmentSchedulingEvent` platform event to receive event notifications when users create, modify, or delete appointments. Then, use an API to write the platform events to an external calendar. The subsequent topics in this section list the provided developer resources for your reference. For detailed instructions about how to use these resources to integrate Salesforce Scheduler with external calendars, see these topics in Salesforce Scheduler help. - **[Apex Classes for External Calendars](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/salesforce-scheduler-apex-classes-for-ext-calendars.md)** The LxScheduler namespace provides an interface and classes for integrating Salesforce Scheduler with external calendars and determine the availability of service resources. - **[Platform Events for External Calendars](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/salesforce-scheduler-platform-events.md)** Use the AppointmentSchedulingEvent to notify subscribers when an appointment schedule is added, updated, or deleted. **See Also** - [Salesforce Help: Check External Calendars to Determine Resource Availability](https://help.salesforce.com/apex/HTViewHelpDoc?id=ls_read_external_calendar.htm) - [Salesforce Help: Write Salesforce Scheduler Appointments to External Calendars](https://help.salesforce.com/articleView?id=platform.ls_ext_cal_update.htm&type=5) # Integrate Your Bot with Service Cloud This section provides a detailed, step-by-step guide for setting up and integrating your external chatbot with Salesforce Service Cloud using the Bring Your Own Bot (BYOB) feature. To integrate your bot with Salesforce. - [Step 1: Create an External Client App and Configure Policies](https://developer.salesforce.com/docs/service/messaging-byob/guide/create-external-client-app.md) - [Step 2: Generate an Access Token](https://developer.salesforce.com/docs/service/messaging-byob/guide/generate-access-token.md) - [Step 3: Create a Platform Event and Assign Permissions](https://developer.salesforce.com/docs/service/messaging-byob/guide/create-platform-event.md) - [Step 4: Create Entity Records](https://developer.salesforce.com/docs/service/messaging-byob/guide/create-entity-records.md) - [Step 5: Configure Salesforce Flow with RouteWork Action](https://developer.salesforce.com/docs/service/messaging-byob/guide/configure-flow-routework.md) - [Step 6: Configure Messaging Channel](https://developer.salesforce.com/docs/service/messaging-byob/guide/configure-messaging-channel.md) # Interaction Service API Release Notes This section describes recent changes that have been made to this guide. To see the latest feature updates for Bring Your Own Channel for Messaging and Bring Your Own Channel for CCaaS, visit [Bring Your Own Channel release notes](https://help.salesforce.com/s/articleView?id=release-notes.rn_messaging_byoc.htm). ## Updates for Summer ’26 - Extended [Update an AgentWork Record](/docs/service/interaction-service-api/references/interaction-service-reference/api-agentWork-patch.html) so that partners can close an AgentWork record. - Added content for Bring Your Own Bot for Messaging: - Added a Bring Your Own Bot (BYOB) sample payload to [Update an AgentWork Record](/docs/service/interaction-service-api/references/interaction-service-reference/api-agentWork-patch.html) for the Accept, Decline, and Close bot actions. - Added [Bring Your Own Bot Setup Entities](/docs/service/interaction-service-api/references/interaction-service-reference/byob-setup-entities.html) reference documentation, including `ExtConvParticipantIntegDef` and `ExternalConversationBotDef`. - Added a Bring Your Own Bot (BYOB) sample payload to [Send a Message Through a Chatbot](/docs/service/interaction-service-api/references/interaction-service-reference/api-conversationEntry-post.html), including typing started and typing stopped indicators. - Added a Bring Your Own Bot (BYOB) sample payload to [Retrieve Conversation Entries](/docs/service/interaction-service-api/references/interaction-service-reference/api-conversationEntry-get.html). - Added Bring Your Own Bot (BYOB) sample payloads to [Route a Conversation](/docs/service/interaction-service-api/references/interaction-service-reference/api-route.html) for initial routing with flow and transfer-to-queue scenarios. - Added `StaticContentMessage`, `ChoicesResponseMessage`, and `FormResponseMessage` Bring Your Own Bot (BYOB) sample payloads to [Register Capabilities](/docs/service/interaction-service-api/references/interaction-service-reference/api-capabilities.html). ## Updates for Spring ’26 - Updated [Generate an Access Token](https://developer.salesforce.com/docs/service/interaction-service-api/guide/authorization.md) to provide instructions for integrations that use an external client app (ECA) instead of a connected app. ## Updates for Winter ’26 - Added [End or Inactivate a Messaging Session API](/docs/service/interaction-service-api/references/interaction-service-reference/api-messagingsession.html). - Added [Remove Participant API](/docs/service/interaction-service-api/references/interaction-service-reference/api-participant.html). - Added [Register Capabilities API](/docs/service/interaction-service-api/references/interaction-service-reference/api-capabilities.html). - Added maximum length information for the value of `routingAttributes` key/value pair in [Route API](/docs/service/interaction-service-api/references/interaction-service-reference/api-route.html) and [Message Interaction API](/docs/service/interaction-service-api/references/interaction-service-reference/interaction-type-message.html). ## Updates for Summer ’25 - Added [rate limits](https://developer.salesforce.com/docs/service/interaction-service-api/guide/rate-limits.md) information. - Added Conference value for `agentActionVisibilities` in [Create AgentWork API](/docs/service/interaction-service-api/references/interaction-service-reference/api-agentWork.html). - Added Conference value for `routingType` in [Route API](/docs/service/interaction-service-api/references/interaction-service-reference/api-route.html). - Added `cancelReason` to [Clear Routing API](/docs/service/interaction-service-api/references/interaction-service-reference/api-route-delete.html). # InternalOrganizationUnit Represents an organization that an Employee belongs to. This object is available in API version 48.0 and later. In API version 49.0 and later, this object supports reports, criteria-based sharing rules, and history tracking, plus you can exclude individual fields from custom page layouts. ## Supported Calls `create()`, `delete()`, `describeLayout()`, `describeSObjects()`, `getDeleted()`, `getUpdated()`, `query()`, `retrieve()`, `undelete()`, `update()`, `upsert()` ## Special Access Rules To access this object, you have either a Workplace Command Center permission set license and the Provides access to Workplace Command Center features system permission, or the Employee Management and Employee User add-on licenses. This object is also available with the Referral Marketing license. ## Fields |Field|Type|Properties|Description| |-----|----|----------|-----------| |Description|string|Create, Filter, Group, Nillable, Sort, Update|A description of the organization the Employee is working in.| |LastReferencedDate|dateTime|Filter, Nillable, Sort|The timestamp for when the current user last viewed a record related to this record.| |LastViewedDate|dateTime|Filter, Nillable, Sort|The timestamp for when the current user last viewed this record. If this value is null, this record might only have been referenced (LastReferencedDate) and not viewed.| |OrganizationCode|string|Create, Filter, Group, idLookup, Sort, Update|Required. The code of the organization the Employee is working in.| |OrganizationName|string|Create, Filter, Group, Nillable, Sort, Update|The name of the organization the Employee is working in.| |OwnerId|reference|Create, Defaulted on create, Filter, Group, Sort, Update|The ID of the user who currently owns this record. Default value is the user logged in to the API to perform the create operation.| |ParentOrganizationId|reference|Create, Filter, Group, Nillable, Sort, Update|A reference to the parent organization.| |Type|picklist|Create, Filter, Group, Nillable, Restricted picklist, Sort, Update|Specifies whether the record is for an internal or an external organization. This field is available in API version 60.0 and later. Possible values are:
  • `EXTERNAL_BUSINESS_UNIT`
  • `INTERNAL_ORGANIZATION`
| ## Associated Objects This object has the following associated objects. Unless noted, they are available in the same API version as this object. - InternalOrganizationUnitHistory (API version 49.0) - : History is available for tracked fields of the object. - InternalOrganizationUnitOwnerSharingRule - : Sharing rules are available for the object. - InternalOrganizationUnitShare (API version 49.0) - : Sharing is available for the object. # Introduction to Salesforce Feedback Management Gather customer feedback and gain deeper insights about your products or services through Surveys. Salesforce Feedback Management (SFM) gives you the tools and developer resources to create engaging, personalized surveys. The developer resources include Connect REST APIs to build surveys, Apex classes to send survey invitations, and REST APIs to translate surveys. With SFM, you can: - Create surveys with a wide range of question types. - Achieve faster response times with retained application context as users don’t have to switch between multiple applications to complete the survey. - Define survey user experience with your company’s branding and theme. - Translate surveys and get feedback from a global audience. **See Also** - [Salesforce Help: Salesforce Feedback Management](https://help.salesforce.com/s/articleView?id=xcloud.concept_salesforce_surveys.htm&type=5) # Introduction to Salesforce Scheduler Salesforce Scheduler (formerly known as Lightning Scheduler) gives you the tools and developer resources you need to simplify appointment scheduling in Salesforce. Create a personalized experience by scheduling customer appointments—in person, or by phone or video—with the right person at the right place and time. With Salesforce Scheduler developer resources, it’s easy to build seamless appointment scheduling applications. These resources include REST APIs, Connect REST APIs, Salesforce Platform Events, and Apex classes. Appointment scheduling involves numerous resources such as appointment attendees, appointment locations, appointment topics, appointment timings, appointment duration, and so on. With Salesforce Scheduler, you get the tools that you can use to manage these resources. Before using the Scheduler resources, you must configure Scheduler with the following items: - Create service resources that represent your appointment attendees, and add details about their areas of expertise (skills), location, and availability. - Set up service territories that represent the branch or office locations where your appointment attendees operate from or meet customers. - Create work type groups that represent appointment topics such as home loan or investment. - Create work types that represent appointment templates that link appointment topics with particular locations and define key parameters such as appointment duration, preparation and wrap-up buffers, and availability timings. - Schedule customer appointments with defined topics, attendees, duration, and location. **See Also** - [Salesforce Scheduler: Set Up Salesforce Scheduler](https://help.salesforce.com/s/articleView?id=platform.ls_help_learning_map.htm&type=5) # Invite Users to Chat in Enhanced Web Chat You can add an invitation that appears above the floating action button before a chat session begins. Create invitation conditions associated with your embedded service deployment in Setup. For more information on creating invitations in Setup, see [Set Up and Customize an Automated Invitation](https://help.salesforce.com/s/articleView?id=service.miaw_chat_invitations.htm). To invoke automated invitations based on custom variables, use the `invitationAPI.setCustomVariables` method. ## Invoke Invitations with Custom Conditions The invitation conditions created in Setup are custom variables that determine when to show an invitation. This example snippet populates the invitation condition variables. ```javascript embeddedservice_bootstrap.invitationAPI.setCustomVariables( {"Cart_Total" : "300", "Cart_Items" : "6"} ); ``` **note:** The values of the invitation variables are strings. This example snippet removes the invitation condition variables. ```javascript embeddedservice_bootstrap.invitationAPI.removeCustomVariables(["Cart_Total","Cart_Items" ]); ``` ## Event Listeners Event listeners fire at various stages of the invitation process. There are three event listeners related to invitations. - `onEmbeddedMessagingInvitationAccepted` - `onEmbeddedMessagingInvitationRejected` - `onEmbeddedMessagingInvitationShown` See [Event Listeners](https://developer.salesforce.com/docs/service/messaging-web/guide/event-listeners.md) for more information. # Invocable Actions for Lightning Knowledge Actions for Lightning Knowledge can be invoked from a REST endpoint. Use these actions to manage your articles and article versions. To learn more about how to use invocable actions, see the [Actions Developer Guide](https://developer.salesforce.com/docs/atlas.en-us.api_action.meta/api_action/actions_intro.htm). **important:** Where possible, we changed noninclusive terms to align with our company value of Equality. We maintained certain terms to avoid any effect on customer implementations. The Assign and Publish actions are available in API version 44.0 and later. All the other actions are available in API version 45.0 and later. Lightning Knowledge must be set up in your org. The user must have permissions to manage articles. You can use multiple inputs to an invocable action. This technique is useful for actions that don't take lists, such as `restoreKnowledgeArticleVersion`. ## Supported REST HTTP Methods | Action | URI | | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------- | | [Archive Knowledge articles](#archive-knowledge-articles) | `/services/data/v{XX.X}/actions/standard/archiveKnowledgeArticles` | | [Assign Knowledge articles](#assign-knowledge-articles) | `/services/data/v{XX.X}/actions/standard/assignKnowledgeArticles` | | [Create draft from online Knowledge articles](#create-draft-from-online-knowledge-article) | `/services/data/v{XX.X}/actions/standard/createDraftFromOnlineKnowledgeArticle` | | [Delete Knowledge articles](#delete-knowledge-articles) | `/services/data/v{XX.X}/actions/standard/deleteKnowledgeArticles` | | [Publish Knowledge articles](#publish-knowledge-articles) | `/services/data/v{XX.X}/actions/standard/publishKnowledgeArticles` | | [Restore Knowledge article version](#restore-knowledge-article-version) | `/services/data/v{XX.X}/actions/standard/restoreKnowledgeArticleVersion` | | [Retrieve Smart Link URL](#retrieve-smart-link-url) | `/services/data/v{XX.X}/actions/standard/getArticleSmartLinkUrl` | | [Submit Knowledge article for translation](#submit-knowledge-article-for-translation) | `/services/data/v{XX.X}/actions/standard/submitKnowledgeArticleForTranslation` | | Property | Value | | ----------------- | --------------------------------------------- | | Formats | JSON, XML | | HTTP Methods | GET, HEAD, POST | | Authentication | `Authorization: Bearer {token}` | | Other Information | [Error Response Types](#error-response-types) | ## Archive Knowledge Articles URI: `/services/data/v{XX.X}/actions/standard/archiveKnowledgeArticles` | Input | Type | Description | | -------------------- | ------ | -------------------------------------------------- | | articleVersionIdList | string | Required. Comma-separated article version ID list. | **Sample Input** The following code sample archives two articles: ```apex { "inputs" : [ { "articleVersionIdList" : [ "ka0RM00000004VeYAI", "ka0RM00000003doYAA" ] } ] } ``` **Sample Output** The following code sample illustrates a response after a successful request. ```apex [ { "actionName" : "archiveKnowledgeArticles", "errors" : null, "isSuccess" : true, "outputValues" : { "ka0RM00000004Ve" : "Success", "ka0RM00000003do" : "Success" } } ] ``` The following code sample illustrates a response with one success and one failure: ```apex [ { "actionName" : "archiveKnowledgeArticles", "errors" : null, "isSuccess" : false, "outputValues" : { "ka0RM00000004Ve" : "You can't perform this action. Be sure the action is valid for the current state of the article, and that you have permission to perform it.", "ka0RM00000003do" : "Success" } } ] ``` ## Assign Knowledge Articles URI: `/services/data/v{XX.X}/actions/standard/assignKnowledgeArticles` | Input | Type | Description | | --------------------- | ------- | ------------------------------------------------------------------------------------------------ | | articleVersionIdList | string | Required. Comma-separated article version ID list. | | assigneeId | ID | Required. ID of the assigned user. | | assignAction | string | Required. Assign action. Valid actions are: `ASSIGN_DRAFT_MASTER` or `ASSIGN_DRAFT_TRANSLATION`. | | dueDate | string | Optional. Assigned due date. | | instruction | string | Optional. Instructions for the assignee. | | sendEmailNotification | boolean | Optional. Indicates whether to send an email notification. Defaults to `false`. | **Sample Input** The following code sample assigns two articles for translation: ```apex { "inputs" : [ { "articleVersionIdList" : [ "ka0RM00000004VeYAI", "ka0RM00000003doYAA" ] "assigneeId" : "005RM00000AAAAAYA4", "assignAction" : "ASSIGN_DRAFT_TRANSLATION" } ] } ``` **Sample Output** The following code sample illustrates a response after a successful request. ```apex [ { "actionName" : "assignKnowledgeArticles", "errors" : null, "isSuccess" : true, "outputValues" : { "ka0RM00000004Ve" : "Success", "ka0RM00000003do" : "Success" } } ] ``` ## Create Draft from Online Knowledge Article URI: `/services/data/v{XX.X}/actions/standard/createDraftFromOnlineKnowledgeArticle` | Input | Type | Description | | ---------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | action | string | Required. Edit action for primary language or translation articles. Valid actions are: `EDIT_AS_DRAFT_ARTICLE` or `EDIT_AS_DRAFT_TRANSLATION`. | | unpublish | boolean | Required. Indicates whether to keep the article published (`false`) or archive the published article (`true`). Use `false` to keep the current article version online and create a draft. Use `true` to archive the current online version, which removes it from the knowledge base, and creates a draft. | | articleVersionId | string | Article version ID. Required to create a draft from an online (published) translation. Optional to create a draft from the online primary article if the Article ID is provided. | | articleId | string | Article ID. Required when creating a draft from the online (published) primary article if the Article Version ID isn't provided. | **Sample Input** The following code sample creates a draft from a primary article and archives the original article: ```apex { "inputs" : [ { "action" : "EDIT_AS_DRAFT_ARTICLE", "unpublish" : true, "articleId" : "kA0RM00000004pP0AQ" } ] } ``` **Sample Output** The following code sample illustrates a response after a successful request. ```apex [ { "actionName" : "createDraftFromOnlineKnowledgeArticle", "errors" : null, "isSuccess" : true, "outputValues" : { "kA0RM00000004pP0AQ" : "Success" } } ] ``` ## Delete Knowledge Articles URI: `/services/data/v{XX.X}/actions/standard/deleteKnowledgeArticles` | Input | Type | Description | | -------------------- | ------ | -------------------------------------------------- | | articleVersionIdList | string | Required. Comma-separated article version ID list. | **Sample Input** The following code sample deletes two articles: ```apex { "inputs" : [ { "articleVersionIdList" : [ "ka0RM00000004VeYAI", "ka0RM00000003doYAA" ] } ] } ``` **Sample Output** The following code sample illustrates a response after a successful request. ```apex [ { "actionName" : "deleteKnowledgeArticles", "errors" : null, "isSuccess" : true, "outputValues" : { "ka0RM00000004Ve" : "Success", "ka0RM00000003do" : "Success" } } ] ``` ## Publish Knowledge Articles URI: `/services/data/v{XX.X}/actions/standard/publishKnowledgeArticles` | Input | Type | Description | | -------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | articleVersionIdList | string | Required. Comma-separated article version ID list. | | pubAction | string | Required. Publish action. Valid actions are: `PUBLISH_ARTICLE` (which replaces the latest version), `PUBLISH_ARTICLE_NEW_VERSION` (which creates a new version), `SCHEDULE_ARTICLE_FOR_PUBLICATION`, or `PUBLISH_TRANSLATION`. | | pubDate | string | Optional. Scheduled publish date in ISO 8601 format `yyyy-MM-dd\'T\'HH:mm:ss.SSSZ`. For example, for February 8, 2023, 1:40 pm UTC+01:00 use `2023-02-08T13:40:00.000+0100`. | **Sample Input** The following code sample publishes two articles: ```apex { "inputs" : [ { "articleVersionIdList" : [ "ka0RM00000004VeYAI", "ka0RM00000003doYAA" ], "pubAction" : "PUBLISH_ARTICLE" } ] } ``` **Sample Output** The following code sample illustrates a response after a successful request. ```apex [ { "actionName" : "publishKnowledgeArticles", "errors" : null, "isSuccess" : true, "outputValues" : { "ka0RM00000004Ve" : "Success", "ka0RM00000003do" : "Success" } } ] ``` ## Restore Knowledge Article Version URI: `/services/data/v{XX.X}/actions/standard/restoreKnowledgeArticleVersion` | Input | Type | Description | | ------------- | ------- | ------------------------------------------------------------------------------------------------------------ | | action | string | Required. The only valid action is: RESTORE_KNOWLEDGE_ARTICLE_VERSION | | articleId | string | Required. Article ID. | | versionNumber | integer | Optional. Version number of the archived article version to restore. Default is the latest archived version. | **Sample Input** The following code restores the latest archived version: ```apex { "inputs" : [ { "action" : "RESTORE_KNOWLEDGE_ARTICLE_VERSION", "articleId" : "kA0RM00000004pP0AQ" } ] } ``` The following code restores a past archived version of a published article: ```apex { "inputs" : [ { "action" : "RESTORE_KNOWLEDGE_ARTICLE_VERSION", "versionNumber":3, "articleId" : "kA0RM00000004pP0AQ" } ] } ``` The following code restores two archived articles: ```apex { "inputs" : [ { "action" : "RESTORE_KNOWLEDGE_ARTICLE_VERSION", "articleId" : "kA0RM00000004pP0AQ" }, { "action" : "RESTORE_KNOWLEDGE_ARTICLE_VERSION", "articleId" : "kA0RM00000004pP0AB" } ] } ``` **Sample Output** The following code sample illustrates a response after a successful request. ```apex [ { "actionName" : "restoreKnowledgeArticleVersion", "errors" : null, "isSuccess" : true, "outputValues" : { "kA0RM00000004pP0AQ" : "Success" } } ] ``` ## Retrieve Smart Link URL URI: `/services/data/v{XX.X}/actions/standard/getArticleSmartLinkUrl` | Input | Type | Description | | ---------------- | ------ | -------------------------------------------------- | | articleVersionId | string | Required. The ID of the Knowledge article version. | **Sample Input** The following code sample retrieves the SmartLink URL of a Knowledge article version: ```apex { "inputs":[ { "articleVersionId":"ka0xx00000000cjAAA" } ] } ``` **Sample Output** The following code sample illustrates a response after a successful request. ```apex [ { "actionName":"getArticleSmartLinkUrl", "errors":null, "isSuccess":true, "outputValues":{ "articleSmartLinkUrl":"https://example.lightning.force.com/lightning/articles/Knowledge/Test-Redirection-1" } } ] ``` ## Submit Knowledge Article for Translation URI: `/services/data/v{XX.X}/actions/standard/submitKnowledgeArticleForTranslation` | Input | Type | Description | | --------------------- | ------- | ------------------------------------------------------------------------------- | | articleId | string | Required. Article ID. | | language | string | Required. Language code for the translation. | | assigneeId | ID | Required. ID of the assigned user. | | dueDate | string | Optional. Assigned due date. | | sendEmailNotification | boolean | Optional. Indicates whether to send an email notification. Defaults to `false`. | | Output | Type | Description | | --------- | ------ | ---------------------------------- | | articleId | ID | Article ID. | | language | string | Language code for the translation. | **Sample Input** The following code sample submits one article for translation into Spanish: ```apex { "inputs" : [ { "articleId" : "kA0RM00000004pP0AQ", "language" : "es", "assigneeId" : "005RM00000AAAAAYA4" } ] } ``` **Sample Output** The following code sample illustrates a response after a successful request. ```apex [ { "actionName" : "submitKnowledgeArticleForTranslation", "errors" : null, "isSuccess" : true, "outputValues" : { "articleId" : "kA0RM00000004pP0AQ", "language" : "es" } } ] ``` ## Error Response Types Knowledge actions can respond with two types of error responses: action-scoped errors and item-scoped errors. Action-scoped errors describe an error about the overall action that you're trying to invoke. Action-scoped errors have a `statusCode` in addition to a `message`. This example illustrates an action-scoped error caused by sending invalid input values. ```apex [ { "actionName" : "restoreKnowledgeArticleVersion", "errors" : [ { "statusCode" : "INVALID_API_INPUT", "message" : "You can't perform this action. Be sure the action is valid for the current state of the article, and that you have permission to perform it.", "fields" : [ ] } ], "isSuccess" : false, "outputValues" : null } ] ``` Item-scoped errors describe a problem with a specific article or article version within the action. For example, this code illustrates an archiveKnowledgeArticles action response with one failed item and one successful item. ```apex [ { "actionName" : "archiveKnowledgeArticles", "errors" : null, "isSuccess" : false, "outputValues" : { "ka0RM00000004Ve" : "You can't perform this action. Be sure the action is valid for the current state of the article, and that you have permission to perform it.", "ka0RM00000003do" : "Success" } } ] ``` If any type of error occurs with an action, the `isSuccess` field is `false`. # Invoke the Conversation History API Before you begin, you must [Configure an Enhanced Web Chat Deployment](https://help.salesforce.com/s/articleView?id=service.miaw_configure_web_deployment_1.htm). 1. Add the developer name of the connected app you created in [Create a Connected App](https://developer.salesforce.com/docs/service/messaging-api/guide/create-connected-app.md) to the [MessagingChannel Metadata Configuration](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_messagingchannel.htm). ``` Auth true false false 360 **ConnectedApp_Developer_name** PublicKeyCertificateSet pcks1 false auth_identifier_one ``` 2. Use the connected app you created in [Create a Connected App](https://developer.salesforce.com/docs/service/messaging-api/guide/create-connected-app.md) to invoke the [Conversation History API](https://developer.salesforce.com/docs/service/interaction-service-api/references/interaction-service-reference/api-conversationHistory.html). 1. In the `AuthorizationContext` API header, provide the `developerName` of the ConnectedApp configured above and set the `AuthorizationContextType` header value to `EmbeddedMessagingChannel`. 2. In the `conversationParticipants.participant` parameter, when the `role` is `EndUser`, set the `appType` to `iamessage`. **See Also** - _Interaction Service API_: [Send Historical Conversation Entries](https://developer.salesforce.com/docs/service/interaction-service-api/references/interaction-service-reference/api-conversationHistory.html) - _GitHub_: [Interaction Service APIs](https://github.com/salesforce-misc/interaction-service-apis) # IO Device Server Represents an IO Device Server configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. ## Configuration Item Type Definition ||| |-|-| |Name|IO Device Server| |Developer Name|`SD_IoDeSe`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Network Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-network-device.md)| |Rule Name|Default rule for all Azure Application Gateways| |Identifier(s)|Asset Name Subscription Id Resource Group| ## Attributes No associated attributes for this configuration item type. # IO Module Represents an IO Module configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Device. ## Configuration Item Type Definition ||| |-|-| |Name|IO Module| |Developer Name|`SD_IoMo`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-device.md)| |Rule Name|Default rule for all AWS Database Clusters| |Identifier(s)|Asset Name| ## Attributes No associated attributes for this configuration item type. # iOS Guidelines These guidelines describe how to use the iOS SDKs (both the [UI SDK](https://developer.salesforce.com/docs/service/messaging-in-app/guide/ios-ui-sdk.md) and the [Core SDK](https://developer.salesforce.com/docs/service/messaging-in-app/guide/ios-core-sdk.md)). To learn how to use the Android SDKs, refer to the [Android Guidelines](https://developer.salesforce.com/docs/service/messaging-in-app/guide/android-guidelines.md). ![Enhanced In-App Chat iOS Example](https://developer.salesforce.com/docs/media/messaging-in-app/messaging-ios-device-small.png) # iOS Sample Apps for Enhanced In-App Chat To view iOS examples, visit our [GitHub repository](https://github.com/Salesforce-Async-Messaging/messaging-in-app-ios/tree/master/examples). # iOS Tutorials & Examples Get going quickly with these short introductory tutorials. **important:** 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](https://help.salesforce.com/s/articleView?id=service.miaw_intro_landing.htm&type=5) before that date. Messaging offers many of the [chat features](https://help.salesforce.com/s/articleView?id=service.miaw_chat_vs_messaging.htm&type=5) that you love plus asynchronous conversations that can be picked back up at any time. Learn about chat retirement in [Help](https://help.salesforce.com/s/articleView?id=001790618&type=1). In addition to these tutorials, check out our [GitHub repository](https://github.com/forcedotcom/ServiceSDK-iOS/tree/master/Examples) ([github.com/forcedotcom/ServiceSDK-iOS](https://github.com/forcedotcom/ServiceSDK-iOS/tree/master/Examples)) for sample apps. # IOT Sensor Represents an IOT Sensor configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Device. ## Configuration Item Type Definition ||| |-|-| |Name|IOT Sensor| |Developer Name|`SD_IoSe`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-device.md)| |Rule Name|Default rule for all Print Servers| |Identifier(s)|MAC address| ## Attributes No associated attributes for this configuration item type. # IP Camera Represents an IP Camera configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. ## Configuration Item Type Definition ||| |-|-| |Name|IP Camera| |Developer Name|`SD_IpCa`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Network Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-network-device.md)| |Rule Name|Default rule for all VMWare ESXi Hosts| |Identifier(s)|Asset Name UUID Virtual IP Address| ## Attributes No associated attributes for this configuration item type. # IP Phone Represents an IP Phone configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Device. ## Configuration Item Type Definition ||| |-|-| |Name|IP Phone| |Developer Name|`SD_IpPh`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-device.md)| |Rule Name|Default rule for all AWS DocumentDB| |Identifier(s)|Asset Name| ## Attributes ### Call Server - **Type**: text - **Developer Name**: `SD_CaSe` - **Attribute Set**: [Device Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-device-details.md) - **Description**: The call server of the IP Phone. - **Required**: Optional ### Configuration Server - **Type**: text - **Developer Name**: `SD_CoSe` - **Attribute Set**: [Device Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-device-details.md) - **Description**: The configuration server of the IP Phone. - **Required**: Optional ### DNS Domain - **Type**: text - **Developer Name**: `SD_DnDo` - **Attribute Set**: [Hardware and Network](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-hardware-and-network.md) - **Description**: The dns domain of the IP Phone. - **Required**: Optional ### Hardware Version - **Type**: text - **Developer Name**: `SD_HaVe1` - **Attribute Set**: [Hardware and Network](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-hardware-and-network.md) - **Description**: The hardware version of the IP Phone. - **Required**: Optional ### IPv4 Netmask - **Type**: text - **Developer Name**: `SD_IpNe` - **Attribute Set**: [IPv4 Address Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-ipv4-address-details.md) - **Description**: The ipv4 netmask of the IP Phone. - **Required**: Optional ### Network Interface Name - **Type**: text - **Developer Name**: `SD_NeInNa` - **Attribute Set**: [Network Interface Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-network-interface-details.md) - **Description**: The network interface name of the IP Phone. - **Required**: Required ### OS Local Date Time - **Type**: text - **Developer Name**: `SD_OsLoDaT` - **Attribute Set**: [Operating System Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-operating-system-details.md) - **Description**: The os local date time of the IP Phone. - **Required**: Optional ### Public DNS Name - **Type**: text - **Developer Name**: `SD_PuDnNa` - **Attribute Set**: [Instance Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-instance-details.md) - **Description**: The public dns name of the IP Phone. - **Required**: Optional ### Software Version - **Type**: text - **Developer Name**: `SD_SoVe` - **Attribute Set**: [Installed Software Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-installed-software-details.md) - **Description**: The software version of the IP Phone. - **Required**: Required # IP Speaker Represents an IP Speaker configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Device. ## Configuration Item Type Definition ||| |-|-| |Name|IP Speaker| |Developer Name|`SD_IpSp`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-device.md)| |Rule Name|Default rule for all AWS DynamoDB| |Identifier(s)|Asset Name| ## Attributes No associated attributes for this configuration item type. # IPv4 Address Details Represents the IPv4 Address Details attribute set in the Configuration Management Database (CMDB). This attribute set groups related attributes for configuration items. ## Configuration Item Attribute Set Definition ||| |-|-| |Display Name|IPv4 Address Details| |Developer Name|`SD_IpAdDe`| |Master Label|IPv4_Address_Details| ## Attributes ### IPv4 Address - **Type**: text - **Developer Name**: `SD_IpAd1` - **Description**: Describes the IPv4 Address for configuration items. - **Required**: Optional ### IPv4 Broadcast Address - **Type**: text - **Developer Name**: `SD_IpBrAd` - **Description**: Describes the IPv4 Broadcast Address for configuration items. - **Required**: Optional ### IPv4 If Index - **Type**: text - **Developer Name**: `SD_IpIfIn` - **Description**: Describes the IPv4 If Index for configuration items. - **Required**: Optional ### IPv4 Netmask - **Type**: text - **Developer Name**: `SD_IpNe` - **Description**: Describes the IPv4 Netmask for configuration items. - **Required**: Optional # IsConsoleNavigation Context Wire Adapter for Lightning Experience Determines whether the app it’s used within uses console navigation. This wire adapter is available for Lightning Web Components (LWC) only. To determine if the component is within a console app, use this wire adapter. If a caller component isn’t using the wire adapter inside a tab or subtab, the enclosing utility tab ID is null. ## LWC Sample Code This component checks if it’s within a Lightning console app and returns the tab information using the `IsConsoleNavigation` wire adapter. ```javascript import { LightningElement, wire } from 'lwc'; import { IsConsoleNavigation, getFocusedTabInfo } from 'lightning/platformWorkspaceApi'; export class ConsoleNavExample extends LightningElement { @wire(IsConsoleNavigation) isConsoleNavigation; async handleFocusTab() { if (!this.isConsoleNavigation) { return; } const { tabId } = await getFocusedTabInfo(); // do something with the tabId }); } } ``` For another example that uses `IsConsoleNavigation`, see [closeTab()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-lightning-closetab.md). To make your component available for use in a Lightning console app, specify the `lightning__AppPage` target in the [component’s configuration file](https://developer.salesforce.com/docs/platform/lwc/guide/use-config-for-console-app.html). ## Response If the current app uses console navigation, this method returns `true`, or `false` otherwise. **See Also** - [*LWC Dev Guide*: Understand the Wire Service](https://developer.salesforce.com/docs/platform/lwc/guide/data-wire-service-about.html) # isConsoleNavigation() for Lightning Experience Determines whether the app it’s used within uses console navigation. This method isn’t supported for Lightning Web Components (LWC). To determine if a component is using console navigation with LWC, see [IsConsoleNavigation context wire adapter](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-lwc-isconsolenavigation.md). ## Arguments None. ## Aura Components Sample Code This component has a button that, when pressed, prints whether the current app is using console navigation. Component code: ```html ``` Controller code: ```javascript ({ handleIsConsoleNavigation : function(component, event, helper) { var workspaceAPI = component.find("workspace"); workspaceAPI.isConsoleNavigation().then(function(response) { console.log(response); }) .catch(function(error) { console.log(error); }); } }) ``` ## Response If the current app uses console navigation, this method returns a promise that resolves to `true` when successful, or `false` otherwise. # isCustomConsoleComponentHidden() Determines if the application-level custom console component window is hidden. This method is available in API version 32.0 and later. In API version 31.0 and earlier, this method was called `isCustomConsoleComponentWindowHidden()`. ## Syntax ```javascript sforce.console.isCustomConsoleComponentHidden((optional) callback:Function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`callback`|function|JavaScript method called upon completion of the method.| ## Sample Code–Visualforce ```apex_page Click here to check if the custom console component window is hidden ``` ## Response This method is asynchronous, so it returns its response in an object in a callback method. The response object contains the following field: |Name|Type|Description| |----|----|-----------| |`hidden`|boolean|`true` if the custom console component window is hidden; `false` if the custom console component window is visible.| |`success`|boolean|`true` if the `isCustomConsoleComponentHidden()` call was successful; `false` if the `isCustomConsoleComponentHidden()` call wasn’t successful.| # isCustomConsoleComponentPoppedOut() Determines if a custom console component is popped out from a browser. To use this method, multi-monitor components must be turned on. This method is only available in API version 30.0 or later. ## Syntax ```javascript sforce.console.isCustomConsoleComponentPoppedOut (callback:Function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`callback`|function|JavaScript method that’s called upon completion of the method.| ## Sample Code–Visualforce ```apex_page Is this component popped out?
``` ## Response This method is asynchronous, so it returns its response in an object in a callback method. The response object contains the following field: |Name|Type|Description| |----|----|-----------| |`success`|boolean|`true` if returning the component’s pop out status was successful; `false` otherwise.| |`poppedOut`|boolean|`true` if the component is popped out; `false` otherwise.| # isCustomConsoleComponentWindowHidden() Determines if the application-level custom console component window is hidden. This method is available in API versions 25.0 through 31.0. **note:** If this method is called from a popped out component in a Salesforce console where multi-montior components is turned on, nothing will happen. Starting in API version 32.0, this method is no longer available and has been replaced by `isCustomConsoleComponentHidden()`. For more information, see “[`isCustomConsoleComponentHidden()`](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-iscustomconsolecomponenthidden.md).” ## Syntax ```javascript sforce.console.isCustomConsoleComponentWindowHidden((optional) callback:Function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`callback`|function|JavaScript method called upon completion of the method.| ## Sample Code–Visualforce ```apex_page Click here to check if the custom console component window is hidden ``` ## Response This method is asynchronous, so it returns its response in an object in a callback method. The response object contains the following field: |Name|Type|Description| |----|----|-----------| |`hidden`|boolean|`true` if the custom console component window is hidden; `false` if the custom console component window is visible.| |`success`|boolean|`true` if returning the custom console component window visibility was successful; `false` if returning the custom console component window visibility wasn't successful.| # isInConsole() Determines if the page is in the Salesforce console. This method is only available in API version 22.0 or later. ## Syntax ```javascript sforce.console.isInConsole() ``` ## Arguments None ## Sample Code–Visualforce ```apex_page Click here to check if the page is in the Service Cloud console ``` **note:** To see this example in action, click the custom link on a case. For more information, see [Define Custom Buttons and Links](https://help.salesforce.com/s/articleView?id=defining_custom_links.htm) in Salesforce Help. ## Response Returns `true` if the page is in the Salesforce console; `false` if the page is not in the Salesforce console. # isInConsole() for Salesforce Classic ## Usage Indicates if the softphone is in the Salesforce console. **note:** If this method is used in a Salesforce console where multi-monitor components is turned on, any popped out softphone components are indicated as in the console. ## Syntax ```javascript sforce.interaction.isInConsole(callback:function) ``` ## Arguments |Name|Type|Description| |------|------|-------------| |`callback`|function|JavaScript method executed when the API method call is completed.| ## Sample Code–JavaScript ```javascript ``` ## Response This method is asynchronous. The response is returned in an object passed to a callback method. The response object contains the following fields. |Name|Type|Description| |------|------|-------------| |`result`|boolean|`true` if the softphone was in the Salesforce console, `false` if the softphone wasn’t in the Salesforce console.| |`error`|string|If the API call was successful, this variable is undefined. If the API call failed, this variable returns an error message.| # isInCustomConsoleComponent() Determines if the page is in an application-level custom console component. This method is only available in API version 25.0 or later. ## Syntax ```javascript sforce.console.isInCustomConsoleComponent((optional) callback:Function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`callback`|function|JavaScript method called upon completion of the method.| ## Sample Code–Visualforce ```apex_page Click here to check if the page is in an app-level custom console component ``` ## Response This method is asynchronous, so it returns its response in an object in a callback method. The response object contains the following field: |Name|Type|Description| |----|----|-----------| |`inCustomConsoleComponent`|boolean|`true` if the page is in a custom console component; `false` if the page isn’t in a custom console component.| |`success`|boolean|`true` if returning the page status was successful; `false` if returning the page status wasn't successful.| # isSoftphonePanelVisible() for Lightning Experience ## Usage Use this method to return the visibility status of the softphone panel. Returns `true` if the softphone panel is visible and `false` if it’s minimized. This method is available in API version 38.0 or later. ## Syntax ```javascript sforce.opencti.isSoftphonePanelVisible({ callback: FUNCTION }); ``` ## Arguments |Name|Type|Description| |------|------|-------------| |`callback`|function|JavaScript method executed when the API method call is completed.| ## Sample Code–HTML and JavaScript with a callback ```html ``` ## Response This method is asynchronous. The response is returned in an object passed to a callback method. The response object contains the following fields. |Name|Type|Description| |------|------|-------------| |`success`|boolean|Returns `true` if the API method call was invoked successfully, `false` otherwise.| |`returnValue`|object|Contains the boolean property `visible` which indicates the visibility status of the softphone panel. It’s `true` if the softphone is visible and `false` if it’s minimized.| |`errors`|array|If the API call was successful, this variable is `null`. If the API call failed, this variable returns an array of [error messages](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-error-messages-lightning.md).| # isSubtab() for Lightning Experience Checks whether a tab is a subtab. This method works only in Lightning console apps. This method isn’t supported for Lightning Web Components (LWC). To check whether a tab is a subtab in LWC, use [getTabInfo()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-lightning-gettabinfo.md). ## Arguments |Name|Type|Description| |----|----|-----------| |`tabId`|string|ID of the tab.| ## Aura Components Sample Code This component has a button that checks whether the focused tab is a subtab and opens a modal with the answer. Component code: ```html ``` Controller code: ```javascript ({ isFocusedTabSubtab : function(component, event, helper) { var workspaceAPI = component.find("workspace"); workspaceAPI.getFocusedTabInfo().then(function(response) { workspaceAPI.isSubtab({ tabId: response.tabId }).then(function(response) { if (response) { confirm("This tab is a subtab."); } else { confirm("This tab is not a subtab."); } }); }) .catch(function(error) { console.log(error); }); } }) ``` ## Response This method returns a promise that, upon success, resolves to `true` if the tab is a subtab, and `false` otherwise. # isUtilityPoppedOut() for Lightning Experience Determines whether the utility is in a popped-out state. This method isn’t supported for Lightning Web Components (LWC). To check if a utility is in a popped-out state with LWC, use [getInfo() for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-lwc-getinfo.md). ## Arguments None ## Sample Code This component has a button that, when pressed, states whether the current utility is popped out or not. Component code: ```html ``` Controller code: ```javascript ({ handleIsUtilityPoppedOut : function(component, event, helper) { var utilityBarAPI = component.find("utilitybar"); utilityBarAPI.isUtilityPoppedOut().then(function(response) { component.find('textarea').set('v.value', response); }) .catch(function(error) { console.log(error); }); } }) ``` ## Response This method returns a promise that, upon success, resolves to `true` if the utility is popped out, and false otherwise. # isVisible() for Salesforce Classic ## Usage Returns `true` if the softphone is visible or `false` if the softphone is hidden. ## Syntax ```javascript sforce.interaction.isVisible(callback:function) ``` ## Arguments |Name|Type|Description| |------|------|-------------| |`callback`|function|JavaScript method executed when the API method call is completed.| ## Sample Code–JavaScript ```javascript ``` ## Response |Name|Type|Description| |------|------|-------------| |`result`|boolean|`true` if the softphone is visible, `false` if the softphone isn’t visible.| |`error`|string|If the API call was successful, this variable is undefined. If the API call failed, this variable returns an error message.| # ItSvcAssetDcvr Namespace Provides classes for IT Service Asset Discovery, including base configuration item types and configuration item tags. The following are the classes in the `ItSvcAssetDcvr` namespace. - **[BaseComponentCnfgItem Class](https://developer.salesforce.com/docs/service/agentforce-it-service/ns-itsvcassetdcvr/basecomponentcnfgitem/apex-class-itsvcassetdcvr-basecomponentcnfgitem.md#basecomponentcnfgitem-class)** Abstract class that represents a base component configuration item in IT Service Asset Discovery. Stores the field labels for the component configuration item. - **[BaseParentCnfgItem Class](https://developer.salesforce.com/docs/service/agentforce-it-service/ns-itsvcassetdcvr/baseparentcnfgitem/apex-class-itsvcassetdcvr-baseparentcnfgitem.md#baseparentcnfgitem-class)** Abstract class that represents a base parent configuration item in IT Service Asset Discovery. Stores the field labels for the parent configuration item. - **[CnfgItemTag Class](https://developer.salesforce.com/docs/service/agentforce-it-service/ns-itsvcassetdcvr/cnfgitemtag/apex-class-itsvcassetdcvr-cnfgitemtag.md#cnfgitemtag-class)** Represents a tag on a configuration item in IT Service Asset Discovery. A tag is a name-value pair that stores additional metadata about the configuration item. # JavaScript Promises Methods in the Lightning Console JavaScript API return results using promises. **note:** Examples in this guide don’t include the `$A.getCallback()` wrapper because the Lightning Console JavaScript API returns promises that already include the `$A.getCallback()` wrapper around callback functions. This is reflected in the sample code throughout this guide. ## Use JavaScript Promises in LWC This example uses the `openTab()` to get the tab ID of the focused tab. Then the function calls `focusTab()` with the `tabId` that’s returned by the `openTab()` method. ```javascript import { LightningElement } from 'lwc'; import { openTab, focusTab } from 'lightning/platformWorkspaceApi'; export default class MyComponent extends LightningElement { focusNewTab(event) { openTab({ url: '/lightning/r/Account/001R0000003HgssIAC/view', label: 'Global Media' }).then((tabId) => { focusTab(tabId); }).catch((error) => { console.log(error); }); } } ``` You can also simplify the JavaScript promise as follows. ```javascript openTab({ url: '/lightning/r/Account/001R0000003HgssIAC/view', label: 'Global Media', focus: true }).catch((error) => { console.log(error); }); ``` ## Use JavaScript Promises in Aura Here’s the same example as using JavaScript promises in LWC, written for Aura components. ```javascript ({ focusNewTab : function(component, event, helper) { var workspaceAPI = component.find("workspace"); workspaceAPI.openTab({ url: '#/sObject/001R0000003HgssIAC/view', label: 'Global Media' }).then(function(response) { workspaceAPI.focusTab({tabId : response}); }) .catch(function(error) { console.log(error); }); } }) ``` # Keep Steps Visible on Your List Hide the remove option for actions that you want agents to complete. Agents can’t remove these steps, so they remain on the list unless they’re completed. By default, steps on the Actions & Recommendations component are removable. However, if you choose, you can hide the remove option from users. ![Remove option on an action.](https://developer.salesforce.com/docs/media/guided_action_remove_pinned.png) Maria, the Salesforce admin at Awesome Bank, wants to make sure that agents complete the Check Credit Score flow. In addition to marking the flow mandatory, she can hide the remove option in one of these ways. - When Maria configures channel defaults in a deployment, she selects the Check Credit Score flow in the preview area and marks it as not removable. - If Maria uses Process Builder and creates RecordActions, she can set the Hide Remove Action in UI attribute in the RecordAction to **True**. - If Maria uses an API to define RecordActions, she can set the attribute in the RecordAction. **note:** Even if you hide the remove option from users, actions can still be removed from the component using an API. # Knowledge Articles and Data Categories in the API Before working with the Knowledge API, learn the basics about knowledge articles and data categories. ## Articles Overview **important:** Where possible, we changed noninclusive terms to align with our company value of Equality. We maintained certain terms to avoid any effect on customer implementations. Articles capture information about your company's products and services that you want to make available in your knowledge base. Articles in the knowledge base can be classified using data categories to make it easy for users to find the articles they need. Administrators can use data categories to control access to articles. - Knowledge Articles vs. Knowledge Article Versions - : When working with articles, keep in mind that the [KnowledgeArticle](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_knowledgearticle.htm) represents the parent record of all article versions. [KnowledgeArticleVersion](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_knowledgearticleversion.htm) records represent each version of a given article. - Record Types vs. Article Types - : The article structure is represented differently between Lightning Experience and Salesforce Classic. In Lightning Knowledge, you use the same record types available in other custom objects (see the RecordTypeId field on [Knowledge\_\_kav](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_knowledge__kav.htm)) to structure different types of articles. For example, you can use different layouts for different record types. In Salesforce Classic, you get this functionality through article types (see the ArticleType field on [KnowledgeArticleVersion](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_knowledgearticleversion.htm)). Each unique type of article has a unique object in Salesforce Classic (for example, FAQ\_\_kav for FAQ article types). Lightning Knowledge does not have a unique object for each type because it is handled using the record type. - Audience Channel - : An audience, sometimes called a channel, refers to the types of users who can access an article. Salesforce Knowledge offers four channels where you can make articles available. - Internal App: Salesforce users can access articles depending on their role visibility. - Customer: Customers can access articles in a community, site, or customer portal. Customer users inherit the role visibility of the manager on the account. In a community, the article is only available to users with Customer Community or Customer Community Plus licenses. - Partner: Partners can access articles in a community, site, or partner portal. Partner users inherit the role visibility of the manager on the account. In a community, the article is only available to users with Partner Community licenses. - Public Knowledge Base: Articles can be made available to anonymous users by creating a public knowledge base. With Lightning Knowledge, most Salesforce orgs use Communities to create a knowledge base. Creating a public knowledge base for Salesforce Knowledge in Salesforce Classic requires Sites and Visualforce. - Publishing Cycle - : Salesforce Knowledge Articles move through a publishing cycle from their creation to their deletion. The publishing cycle includes three different statuses: `Draft` is the stage when a new article is being created or an existing one is being updated. Articles with the `Online` status are draft articles that have been published and are now available to their different channels. Eventually, when a published article is at the end of its life, it can be moved to the `Archived` status or sent back to `Draft` to be updated in a subsequent version. ## Working with Articles in the API Articles are available through the [KnowledgeArticleVersion](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_knowledgearticleversion.htm) and [KnowledgeArticle](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_knowledgearticle.htm) objects in the API. They both represent an article but provide different capabilities. - KnowledgeArticleVersion - : Every new draft article in Salesforce Knowledge has a version number. When an article is published and you want to update it, you can create a new `Draft` with a distinct version number. Each version has its own ID. Once the updated version is ready to be published, it replaces the former one and updates the version number. You can access the content of an article version using the KnowledgeArticleVersion object and filter on its Draft or Online status. For example, the following query returns the title of the Draft version of all the articles across all article types in United States English: ```soql SELECT Title FROM KnowledgeArticleVersion WHERE PublishStatus='Draft' AND language ='en_US' ``` Articles are also auto-assigned an Article Number, which is not a unique identifier to an individual article, but an identifier to a primary article and all of its available translations. Both the primary version (the knowledge article with IsMasterLanguage = 1) and the translations are KnowledgeArticleVersion objects. - KnowledgeArticle - : Unlike KnowledgeArticleVersion, the ID of a KnowledgeArticle record is identical irrespective of the article's version (status). Where the KnowledgeArticleVersion object provides API access to an article's custom field values, the KnowledgeArticle object provides API access to an article's metadata fields. The article record is the parent container of all versions of an article, whatever the publishing status (draft, published, archived) and the language. While KnowledgeArticle and KnowledgeArticleVersion represent any article in the knowledge base, use the concrete representation of these objects for the specific articles. In Lightning Knowledge, these concrete representations default to Knowledge\_\_ka (for the Knowledge article) and Knowledge\_\_kav (for the Knowledge article version). In Salesforce Classic, use \
\_\_ka and \
\_\_kav. The following Lightning Knowledge query returns the title for all the published FAQ articles in United States English: ```sql SELECT Title FROM Knowledge__kav WHERE PublishStatus='online' AND Language = 'en_US' AND RecordTypeId = '' ``` The following Lightning Knowledge query returns the ID, title, URL, and content of articles stored in their rich text area fields: ```soql SELECT ID, Title, UrlName, RTA2__c FROM Knowledge_kav ``` The following Salesforce Classic query returns the title for all the published offers in United States English: ```soql SELECT Title FROM FAQ__kav WHERE PublishStatus='online' AND language ='en_US' ``` ## Data Categories Overview Data categories are organized by category group and let: - Users classify and find records. - Administrators control access to records. Salesforce Knowledge uses data categories to classify articles and make them easier to find. For example, to classify articles by sales regions and products, create two category groups: Sales Regions, Products. The Sales Regions category group could consist of a geographical hierarchy, such as All Sales Regions as the top level and North America, Europe, and Asia at the second level. The Products group could have All Products as the top level and Phones, Computers, and Printers at the second. ## Working with Data Categories in the API The following table lists API resources for working with data categories. | Name | Type | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | [`Knowledge__DataCategorySelection`](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_knowledge__datacategoryselection.htm) | Object | Gives access to article categorization in Lightning Knowledge. | | [`Article Type__DataCategorySelection`](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_articletype__datacategoryselection.htm) | Object | Gives access to article categorization in Knowledge for Salesforce Classic. | | [`QuestionDataCategorySelection`](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_questiondatacategoryselection.htm) | Object | Gives access to question categorization. | | `WITH DATA CATEGORY {filteringExpression}` | SOQL clause | Filters articles depending on their status in the publishing cycle and their data categories. For more information, see the [Salesforce SOQL and SOSL Reference Guide](https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/). | | `WITH DATA CATEGORY {DataCategorySpec}` | SOSL clause | Finds articles based on their categorization. For more information, see the [Salesforce SOQL and SOSL Reference Guide](https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/). | | `describeDataCategoryGroups()` | Call | Retrieves available category groups for objects specified in the request. | | `describeDataCategoryGroupStructures()` | Call | Retrieves available category groups along with their data category structure for objects specified in the request. | | `describeDataCategoryGroups` | Apex method | Returns a list of the category groups associated with the specified objects. See the [Apex Developer Guide](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/). | | `describeDataCategoryGroupStructures` | Apex method | Returns available category groups along with their data category structure for objects specified in the request. See the [Apex Developer Guide](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/). | # Knowledge Object Model The Knowledge object model is slightly different from other feature areas because it exposes a set of abstract Salesforce objects that aren’t directly used when you create articles. These abstract objects then contain concrete derivations that you do use when creating articles. ![Abstract and concrete objects](https://developer.salesforce.com/docs/media/knowledge/knowledge_abstract_concrete.png) This architecture gives more flexibility to search behavior in support of Lightning Knowledge and Salesforce Classic. ## Core Knowledge Objects The core abstract Knowledge objects are for a Knowledge article (KnowledgeArticle), and a set of versions of that article (KnowledgeArticleVersion). These versions can include different translations and historical versions of an article. ![Knowledge inheritance](https://developer.salesforce.com/docs/media/knowledge/knowledge_inheritance.png '{"class": "image-sm"}') - [KnowledgeArticle](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_knowledgearticle.htm)—The abstract Knowledge article object. This object contains metadata about a knowledge article irrespective of the article's version, translation, or status. - [KnowledgeArticleVersion](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_knowledgearticleversion.htm)—The abstract Knowledge article version object. Whenever you create a draft of an article, it gets a new version number and a unique ID. Each translation of an article also has a version and ID. Each version is a KnowledgeArticleVersion record with the KnowledgeArticle record as the parent. When you create knowledge articles, you create records with concrete Salesforce objects. These objects inherit from their abstract counterparts. By default, these concrete objects are named “Knowledge\_\_ka” for knowledge articles and “Knowledge\_\_kav” for knowledge article versions in Lightning Knowledge. ![Knowledge derivations](https://developer.salesforce.com/docs/media/knowledge/knowledge_derivations.png) This diagram shows the default names in Lightning Knowledge for the concrete implementations, but you can change these names. The names always have the suffixes “\_\_ka” for knowledge articles and “\_\_kav” for knowledge article versions. You can change the “Knowledge” prefix by changing the Object Name for the Knowledge\_\_kav object in the Object Manager. The concrete implementation contains any of your custom fields for a knowledge article. The Knowledge\_\_kav object also contains a “RecordTypeId” field, which is a record type used to describe the article structure, such as FAQ or Tutorial. Each record type can contain its own layouts. For example, an FAQ record type can use a special layout that displays custom fields such as “Question\_\_c” and “Answer\_\_c”. In Salesforce Classic, the article structure is determined by the article type. Each knowledge article type has a different concrete implementation, for example FAQ\_\_kav, Tutorial\_\_kav. In Lightning Knowledge, one concrete object is used, for example, Knowledge\_\_kav, and instead the record type is used to associate an article with a unique article structure. ## Complete Knowledge Object Diagram To see the relationship of Knowledge articles to other objects, let’s highlight some of the other important object relationships. In this diagram, the default value “Knowledge” is the article type name to illustrate the object mode. If you change this value in Setup, the prefix for each object with “\_\_” in the name is changed accordingly. ![Knowledge object model](https://developer.salesforce.com/docs/media/knowledge/knowledge_object_model.png) These objects appear in this Knowledge object model. Each object links to its reference documentation for more information. - [Case](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_case.htm)—A case, which is a customer issue or problem. Every article can be associated with a case using the [CaseArticle](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_casearticle.htm) object. - [CaseArticle](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_casearticle.htm)—The association between a [Case](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_case.htm) and a [KnowledgeArticle](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_knowledgearticle.htm). - [FeedComment](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_feedcomment.htm)—A comment added to a feed for a knowledge article. - [Knowledge\_\_DataCategorySelection](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_knowledge__datacategoryselection.htm)—A data category that classifies an article. - [Knowledge\_\_Feed](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_knowledge__feed.htm)—The feed for a knowledge article. - [Knowledge\_\_ka](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_knowledge__ka.htm)—The concrete object of a [KnowledgeArticle](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_knowledgearticle.htm). - [Knowledge\_\_kav](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_knowledge__kav.htm)—The concrete object of a [KnowledgeArticleVersion](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_knowledgearticleversion.htm). - Knowledge\_\_VersionHistory—The concrete object of a [KnowledgeArticleVersionHistory](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_knowledgearticleversionhistory.htm). - Knowledge\_\_ViewStat—The concrete object of a [KnowledgeArticleViewStat](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_knowledgearticleviewstat.htm). - Knowledge\_\_VoteStat—The concrete object of a [KnowledgeArticleVoteStat](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_knowledgearticlevotestat.htm). - [KnowledgeArticle](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_knowledgearticle.htm)—The abstract Knowledge article object. This object contains metadata about a knowledge article irrespective of the article's version, translation, or status. - [KnowledgeArticleVersion](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_knowledgearticleversion.htm)—The abstract Knowledge article version object. Whenever you create a draft of an article, it gets a new version number and a unique ID. Each translation of an article also has a version and ID. Each version is a KnowledgeArticleVersion record with the [KnowledgeArticle](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_knowledgearticle.htm) record as the parent. - [KnowledgeArticleVersionHistory](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_knowledgearticleversionhistory.htm)—Enables read-only access to the full history of an article. - [KnowledgeArticleViewStat](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_knowledgearticleviewstat.htm)—Provides statistics on the number of views for the specified article. - [KnowledgeArticleVoteStat](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_knowledgearticlevotestat.htm)—Provides the weighted rating for the specified article. - [LinkedArticle](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_linkedarticle.htm)—A knowledge article that is attached to a work order, work order line item, or work type. - LinkedArticleFeed—The comment feed on a linked article. - LinkedArticleHistory—The history of changes made to tracked fields on a linked article. - [WorkOrder](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_workorder.htm)—Field service work to be performed for a customer. - [WorkOrderLineItem](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_workorderlineitem.htm)—A subtask on a work order in field service. - [Vote](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_vote.htm)—A vote that a user has made on a knowledge article. - Using Vote is allowed for Knowledge Article objects but not for Knowledge Article Version objects. - Only one vote record can exist per knowledge article per user.Voting isn’t allowed by Site Guest Users. - Vote allows multiple types of values for the "Type" field, but only "Up" and "Down" are allowed for Knowledge Articles. # Last Logged In Information Represents the Last Logged In Information attribute set in the Configuration Management Database (CMDB). This attribute set groups related attributes for configuration items. ## Configuration Item Attribute Set Definition ||| |-|-| |Display Name|Last Logged In Information| |Developer Name|`SD_LaLoInI`| |Master Label|Last_Logged_In_Information| ## Attributes ### Logged In At - **Type**: date - **Developer Name**: `SD_LoInAt` - **Description**: Describes the Logged In At for configuration items. - **Required**: Optional ### Logged In By - **Type**: text - **Developer Name**: `SD_LoInBy` - **Description**: Describes the Logged In By for configuration items. - **Required**: Optional # Launch Chat in Enhanced Web Chat Call Launch Chat API to programmatically launch the web chat client, which loads all the necessary dependencies and bootstraps. The API is a JavaScript API for the Enhanced Web Chat client. You can replace the default chat button with a custom chat button or your own web experience that calls the Launch Chat API to launch the chat client. When Launch Chat API launches the chat client, the client opens as a maximized window in its initial state. For example, the client opens as a pre-chat dialog if prechat is configured in setup or a chat state otherwise. The initial state depends on how you configured the messaging deployment. If you minimized the window and called the API again, the API again maximizes the messaging conversation window. To call this API, add an event listener for the `onEmbeddedMessagingButtonCreated` event and use the `utilAPI.launchChat()` method. Here’s an example code for an Enhanced Web Chat client. To find out how to get to the Code Snippet page that contains the code to initialize the Enhanced Web Chat client, see [Introduction](https://developer.salesforce.com/docs/service/messaging-web/guide/introduction.md). ```javascript // Get this code from the Code Snippet page of an Embedded Messaging deployment. // Without this code, the Enhanced Web Chat client doesn’t load. // Create a custom button or invitation to launch the web chat client. // Call Launch Chat API. ``` Use the event handlers in the `utilAPI.launchChat()` method to perform actions after the chat launches. - `then` event handler—If the client launches successfully, you can use this handler to, for example, hide the chat invitation or custom button. - `catch` event handler—If there’s an error launching the client, you can use this handler to, for example, display an error message. - `finally` event handler—The method runs this handler after the client launches successfully or not. Use this handler to run any clean-up actions. ## Start a New Conversation After the Previous Conversation Ends In Enhanced Web Chat v2 deployments, you can pass an optional `shouldStartNewConversation` parameter to `launchChat`. Set this parameter to `true` to start a new conversation when the current conversation has ended. If the current conversation is still open, `launchChat` ignores the parameter. ```javascript embeddedservice_bootstrap.utilAPI.launchChat({ shouldStartNewConversation: true }); ``` For more details, see the Enhanced Web Chat [Reference Documentation](/docs/service/messaging-web/references/m4w-reference/utilAPI.html). # Let Users Resume Paused Flows from the Actions & Recommendations Component When you configure Process Automation Settings, you can allow users to pause flows. Show agents paused flows associated with the current record page in the Actions & Recommendations component. When there’s a handoff or a customer calls back, the agent can easily find and resume the paused flow. The component shows all paused flows associated with the current record, including flows not started from the list. For example, Erika is a customer at the fictitious Awesome Bank. Erika is completing an online auto loan application that uses a flow. She pauses the flow because she’s missing some required information. She calls the bank later to complete the application. Because the current record variable in the flow is set to Erika’s contact record, when her contact page opens, the agent sees the paused flow in the Actions & Recommendations component. To resume the flow, the agent clicks **Resume Paused Actions** and selects the flow. ![Click Resume Paused Actions to see paused flows.](https://developer.salesforce.com/docs/media/guided_action_paused_flow.png) When an agent resumes a flow, it opens, and the list updates to include it. If the flow was started from a pinned region of the list, it’s added at the end of that region. Otherwise, it’s added to the bottom of the unpinned region. **note:** A flow can use the variable _Flow.CurrentRecord_ to track the current record associated with the flow. Sometimes API or flow logic updates this variable. For example, if a flow is associated with a lead record and the lead is converted to a contact, the record association is updated. When a user pauses a flow, the component checks the currently associated record. If the record context changed, the paused flow doesn’t appear on the record page’s list. Instead, to resume the flow, a message directs the user to the new record that is associated with the flow. **See Also** - [*Salesforce Help*: Let Users Pause Flow Interviews](https://help.salesforce.com/articleView?id=flow_pause.htm) - [*Salesforce Help*: Add Record Context to Your Flows](https://help.salesforce.com/articleView?id=flow_pause_recordassoc.htm) # License Details Represents the License Details attribute set in the Configuration Management Database (CMDB). This attribute set groups related attributes for configuration items. ## Configuration Item Attribute Set Definition ||| |-|-| |Display Name|License Details| |Developer Name|`SD_LiDe`| |Master Label|License_Details| ## Attributes ### Activation Status - **Type**: text - **Developer Name**: `SD_AcSt` - **Description**: Describes the Activation Status for configuration items. - **Required**: Optional ### Build Number - **Type**: text - **Developer Name**: `SD_BuNu` - **Description**: Describes the Build Number for configuration items. - **Required**: Optional ### ISO ID - **Type**: text - **Developer Name**: `SD_IsId` - **Description**: Describes the ISO ID for configuration items. - **Required**: Optional ### ISO Serial Number - **Type**: text - **Developer Name**: `SD_IsSeNu` - **Description**: Describes the ISO Serial Number for configuration items. - **Required**: Optional ### License Type - **Type**: text - **Developer Name**: `SD_LiTy` - **Description**: Describes the License Type for configuration items. - **Required**: Optional ### Major - **Type**: text - **Developer Name**: `SD_Ma1` - **Description**: Describes the Major for configuration items. - **Required**: Optional ### Minor - **Type**: text - **Developer Name**: `SD_Mi` - **Description**: Describes the Minor for configuration items. - **Required**: Optional ### Rights - **Type**: text - **Developer Name**: `SD_Ri` - **Description**: Describes the Rights for configuration items. - **Required**: Optional ### Single or Multi license - **Type**: text - **Developer Name**: `SD_SiOrMuL` - **Description**: Describes the Single or Multi license for configuration items. - **Required**: Optional ### Version - **Type**: text - **Developer Name**: `SD_Ve` - **Description**: Describes the Version for configuration items. - **Required**: Optional # Life Cycle Information Represents the Life Cycle Information attribute set in the Configuration Management Database (CMDB). This attribute set groups related attributes for configuration items. ## Configuration Item Attribute Set Definition ||| |-|-| |Display Name|Life Cycle Information| |Developer Name|`SD_LiCyIn`| |Master Label|Life_Cycle_Information| ## Attributes ### Acquisition Date - **Type**: date - **Developer Name**: `SD_AcDa` - **Description**: Describes the Acquisition Date for configuration items. - **Required**: Optional ### Lifetime In Months - **Type**: int - **Developer Name**: `SD_LiInMo` - **Description**: Describes the Lifetime In Months for configuration items. - **Required**: Optional ### Recycle Date - **Type**: date - **Developer Name**: `SD_ReDa` - **Description**: Describes the Recycle Date for configuration items. - **Required**: Optional # Lightning Console API Lightning console apps allow users to quickly find the information they need, and make edits while viewing multiple records on one screen. The Lightning Console JavaScript API gives you programmatic access to Lightning console apps, so you can fully integrate Lightning console apps with Aura components and Lightning web components while extending them to meet your business needs. |Required Editions| |-----------------| |Available in: Lightning Experience| |Available in: **Essentials**, **Professional**, **Enterprise**, **Performance**, **Unlimited**, and **Developer** Editions Lightning console apps are available for an extra cost to users with Salesforce Platform user licenses for certain products. Some restrictions apply. For pricing details, contact your Salesforce account executive.| The Lightning Console JavaScript API includes three libraries, the navigation item API, the utility bar API, and the workspace API. - The navigation item API provides methods that can be used from Aura components to interact with the console’s navigation menu. This API is used in Lightning console apps only. - The utility bar API provides methods that can be used from Aura components and Lightning web components in the utility bar to open, resize, or minimize a utility. This API is used in Lightning apps with standard or console navigation. - The workspace API provides methods for Aura components and Lightning web components for opening, closing, and getting information about workspace tabs and subtabs. This API is used in Lightning console apps only. For a full list of methods in each API, see [Methods for Lightning Console JavaScript API](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-methods-lightning.md). You can build Lightning components using two programming models: the Lightning Web Components model and Aura Components model. Although both models can coexist and interoperate on a page, we recommend that you build your apps with Lightning Web Components, which use HTML and modern JavaScript. **note:** Only the utility bar and workspace APIs are currently supported for Lightning web components. - **[How are the Classic and Lightning Console APIs Different?](https://developer.salesforce.com/docs/service/api-console/sforce-api-console-js-lightning-ui-matters.md)** The user interface of your org dictates which development tools you can use with the Salesforce console. - **[Lightning Console JavaScript API](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-js-getting-started.md)** Lightning console apps allow users to quickly find the information they need, and make edits while viewing multiple records on one screen. The Lightning Console JavaScript API gives you programmatic access to Lightning console apps, so you can fully integrate Lightning console apps with Aura components and Lightning web components while extending them to meet your business needs. # Lightning Console JavaScript API Lightning console apps allow users to quickly find the information they need, and make edits while viewing multiple records on one screen. The Lightning Console JavaScript API gives you programmatic access to Lightning console apps, so you can fully integrate Lightning console apps with Aura components and Lightning web components while extending them to meet your business needs. |Required Editions| |-----------------| |Available in: Lightning Experience| |Available in: **Essentials**, **Professional**, **Enterprise**, **Performance**, **Unlimited**, and **Developer** Editions Lightning console apps are available for an extra cost to users with Salesforce Platform user licenses for certain products. Some restrictions apply. For pricing details, contact your Salesforce account executive.| The Lightning Console JavaScript API includes three libraries: the navigation item API, the utility bar API, and the workspace API. - The navigation item API provides methods that can be used from Aura components to interact with the console’s navigation menu. This API is used in Lightning console apps only. - The utility bar API provides methods that can be used from Aura components and Lightning web components in the utility bar to open, resize, or minimize a utility. This API is used in Lightning apps with standard or console navigation. - The workspace API provides methods for Aura components and Lightning web components for opening, closing, and getting information about workspace tabs and subtabs. This API is used in Lightning console apps only. For a full list of methods in each API, see [Methods for Lightning Console JavaScript API](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-methods-lightning.md). You can build Lightning components using two programming models: the Lightning Web Components model and Aura Components model. Although both models can coexist and interoperate on a page, we recommend that you build your apps with Lightning Web Components, which use HTML and modern JavaScript. **note:** Only the utility bar and workspace APIs are currently supported for Lightning web components. - **[Lightning Console JavaScript API Syntax](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-js-lightning-syntax.md)** Use Lightning Console JavaScript API methods in the JavaScript file of a Lightning web component or in the JavaScript controller of an Aura component. - **[Using Background Utility Items](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-js-lightning-background-utility-item.md)** Implement the `lightning:backgroundUtilityItem` interface to create a component that fires and responds to events without rendering in the utility bar. - **[Using Pop-Out Utilities](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-lightning-utility-popout.md)** Utilities that support pop-out can be “popped out” of the utility bar and into their own separate child windows. - **[Using Events with the Lightning Console JavaScript API](https://developer.salesforce.com/docs/service/api-console/sforce-api-console-js-events.md)** The Lightning framework uses event-driven programming, which allows you to create handlers to respond to interface events as they occur. The Lightning Console JavaScript API provides several events specific to Lightning console apps. - **[Use Page Context in the Utility Bar API](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-js-lightning-utility-bar-page-context.md)** In both Lightning console apps and standard navigation apps, utilities can respond to the context of the current page. For a Lightning web component, use the `CurrentPageReference` wire adapter. For an Aura component, specify `implements="force:hasRecordId"` to access the `recordId` of the record a user is viewing. - **[Using Page References to Open Console Workspace Tabs and Subtabs](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-lightning-open-pagereference.md)** You can navigate to different page types, including a URL addressable custom component. To make a custom component URL addressable using LWC, use the `lightning__UrlAddressable` target. To make an Aura component URL addressable, implement the `lightning:isUrlAddressable` interface on your custom component. - **[Debugging](https://developer.salesforce.com/docs/service/api-console/sforce-api-console-js-best-practices.md)** Use your browser’s console and JavaScript error messages to debug Lightning pages built with the Lightning Console JavaScript API. Here are several recommendations on debugging your Lightning Console API code. - **[Methods for Lightning Console JavaScript API](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-methods-lightning.md)** If your org is using Lightning Experience, use Lightning Console JavaScript API methods. - **[Events for](https://developer.salesforce.com/docs/service/api-console/guide/events/sforce-api-console-events-lightning.md)** Use events and handlers in your Aura components and controllers to respond to events like workspace tabs opening, closing, or gaining focus. In Lightning web components, subscribe to Aura application events using their corresponding Lightning message channels. **See Also** - [Methods for Lightning Console JavaScript API](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-methods-lightning.md) # Lightning Console JavaScript API Syntax Use Lightning Console JavaScript API methods in the JavaScript file of a Lightning web component or in the JavaScript controller of an Aura component. ## LWC Syntax To use LWC Workspace API, import `lightning/platformWorkspaceApi` in your JavaScript code. The `lightning/platformWorkspaceApi` module gives you access to workspace API methods, wire adapters, and Lightning message channels. [Access Lightning message channels](https://developer.salesforce.com/docs/service/api-console/guide/lwc/sforce-api-console-lwc-intro.md) by importing from `@salesforce/messageChannel/lightning__tab*`. For example, `@salesforce/messageChannel/lightning__tabClosed`. The following example shows a Lightning web component that uses the [`openSubtab` API method](https://developer.salesforce.com/docs/service/api-console/guide/workspaceapi/sforce-api-console-lightning-opensubtab.md) and [`EnclosingTabId` wire adapter](https://developer.salesforce.com/docs/service/api-console/guide/workspaceapi/sforce-api-console-lightning-getenclosingtabid.md). ```javascript import { LightningElement, wire } from 'lwc'; import { EnclosingTabId, openSubtab } from 'lightning/platformWorkspaceApi'; export default class MyComponent extends LightningElement { @wire(EnclosingTabId) tabId; handleClick() { if (!this.tabId) { return; } // Open a record as a subtab of the current tab openSubtab(this.tabId, { recordId: 'YOUR_RECORD_ID', focus: true }); } } ``` Where `YOUR_RECORD_ID` is a variable. Configure the component’s .js-meta.xml file so the component can be accessed in the Lightning App Builder. ```xml 59.0 true lightning__RecordPage lightning__AppPage lightning__HomePage ``` LWC supports Workspace API methods only. Similar to the Aura counterpart, methods in the Workspace API take a JSON object as an argument. The values included in the object depend on the method. For example, `openTab` takes an object that includes the `url` and `focus` (whether the new tab has focus). Check the reference section of this guide before using a method so that you know which arguments to pass to it. ## Example The [lwc-recipes repo](https://github.com/trailheadapps/lwc-recipes/tree/main/force-app/main/default/lwc) contains many LWC Workspace API examples. Look for components that start with workspaceApi, for example, [workspaceAPICloseTab](https://github.com/trailheadapps/lwc-recipes/tree/main/force-app/main/default/lwc/workspaceAPICloseTab) ## Aura Components Syntax To use the Lightning Console JavaScript API, include `lightning:navigationItemAPI`, `lightning:workspaceAPI`, or `lightning:utilityBarAPI` in your Aura component. The `lightning:navigationItemAPI`, `lightning:workspaceAPI`, and `lightning:utilityBarAPI` components give you access to their coordinating APIs. Give each component an `aura:id` so that you can reference it from the component’s controller. The following example shows a simple Aura component that uses the API libraries: ```nolang ``` This component implements `flexipage:availableForAllPageTypes` so that it can be accessed in the Lightning App Builder. The component’s JavaScript controller looks like this. ```javascript ({ openUtilityBar : function(component, event, helper) { var utilityAPI = component.find("utilitybar"); utilityAPI.openUtility(); }, openTab: function(component, event, helper) { var workspaceAPI = component.find("workspace"); workspaceAPI.openTab({ pageReference: { "type": "standard__recordPage", "attributes": { "recordId":"500xx000000Ykt2AAC", "actionName":"view" }, "state": {} }, focus: true }).then(function(response) { workspaceAPI.getTabInfo({ tabId: response }).then(function(tabInfo) { console.log("The recordId for this tab is: " + tabInfo.recordId); }); }).catch(function(error) { console.log(error); }); }, focusNavigationItem : function(component, event, helper) { var navigationItemAPI = component.find("navigationItem"); navigationItemAPI.focusNavigationItem().then(function(response) { console.log(response); }) .catch(function(error) { console.log(error); }); } }) ``` The controller has three functions, each of which uses an API method. To use a method in a controller, use `component.find` with the `aura:id` you gave to the `lightning:navigationItemAPI`, `lightning:workspaceAPI`, or `lightning:utilityBarAPI`. Methods in the Workspace API and the Utility Bar API take a JSON object as an argument. The values included in the object depend on the method. `openTab`, for example, takes an object that includes the `url` and `focus` (whether the new tab has focus). Check the reference section of this guide before using a method so that you know which arguments to pass to it. ## LWC VS Aura Guidelines When working with the Lightning Console JavaScript API, consider these guidelines. - In LWC, required parameters are explicitly passed to the method like `focusTab(tabId);`. In Aura, required parameters are passed to the method in an object like `workspaceAPI.focusTab({tabId : response});`. - In LWC, pass in a URL that matches a Lightning Experience page, for example, `/lightning/r/Account/001R0000003HgssIAC/view` - **[JavaScript Promises](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-js-lightning-promises.md)** Methods in the Lightning Console JavaScript API return results using promises. - **[Error Handling with Promises](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-lightning-error-handling-promises.md)** Promises can simplify code that handles the success or failure of asynchronous calls. To use error handling with promises, use the `catch()` method on the promise that is returned from calling an API method. # Lightning Flow for Service Considerations Learn about how packaging, change sets, and the sharing model can impact your Lightning Flow for Service implementation. - Packaging - : When you package up your implementation, the package includes your Actions & Recommendations deployment settings. Any processes and flows that reference flows through RecordActions are also included in the package. For example, if Flow A creates a RecordAction that references Flow B, adding Flow A to a package also adds Flow B to the package. When you add your app to the package, here’s what’s included: - All the objects in the app - For each object, the associated page layouts, Lightning pages (including the page with the component), active processes, and quick actions. The package includes the Actions & Recommendations deployment and settings defined in the deployment. - If a deployment references flow actions, those flows are included. Make sure that flows in your deployment are active before you create a package. Otherwise, inactive flows in a deployment can cause the package not to install successfully. - If a process includes flow actions, those flows are included. - If an object includes flow quick actions, those flows are included - Change Sets - : You can add the RecordAction Deployment component to your change sets. An option in Process Automation Settings determines whether flows are deployed as active or inactive (see [Deploy Processes and Flows as Active](https://help.salesforce.com/articleView?id=flow_distribute_deploy_active.htm)). Unless the **Deploy processes and flows as active** option is set, your flows are deployed as inactive. After using a change set to move a deployment from a sandbox to production, check to make sure that your flows are active. - Sharing Model - : Access to the RecordAction object is determined by a user’s access to the associated parent record. This sharing model applies to access in the user interface, API, Bulk API, and Bulk API 2.0. - If the user has read access on the record that the action is associated with, the user can perform all operations (create, read, update, and delete) on the corresponding RecordAction. - If the user doesn’t have read access on the record that the flow is associated with, then the user doesn’t have access to the associated RecordAction. When using RecordAction and Salesforce Object Query Language (SOQL), make sure that your queries filter by the parent record. To filter by the parent record, use a where clause for users without Modify All Data permission. Otherwise, the query doesn’t work. If the user has Modify All Data permission, a where clause isn't necessary to filter correctly. Here’s an example of a where clause for RecordAction. `SELECT {fields} FROM RecordAction WHERE RecordId={ENTITY_ID}` # Lightning Flow for Service Developer Guide Previous PDF Versions | API Version | Release | PDF | | ----------- | ---------- | --- | | 67.0 | Summer '26 | [Download PDF](https://resources.docs.salesforce.com/262/latest/en-us/sfdc/pdf/salesforce_guided_engagement.pdf) | | 66.0 | Spring '26 | [Download PDF](https://resources.docs.salesforce.com/260/latest/en-us/sfdc/pdf/salesforce_guided_engagement.pdf) | | 65.0 | Winter '26 | [Download PDF](https://resources.docs.salesforce.com/258/latest/en-us/sfdc/pdf/salesforce_guided_engagement.pdf) | | 64.0 | Summer '25 | [Download PDF](https://resources.docs.salesforce.com/256/latest/en-us/sfdc/pdf/salesforce_guided_engagement.pdf) | # Lightning Flow for Service Example Use Case Lightning Flow for Service can help your agents follow consistent procedures when a customer calls or a support issue comes in. You can associate actions with a new record, such as a case or contact record, and show agents a to-do list for the record page. Let’s look at a fictional Service Cloud customer. Awesome Bank employs 20 agents who handle loan applications. Typically, agents get calls from potential customers applying for a new loan. Agents also take calls from customers that have started the application process online on the bank’s Experience Cloud site. When a customer’s call is routed to the appropriate agent based on the loan type, the agent completes the loan application in the following way. 1. The agent verifies the loan type and gathers basic information, such as the customer’s name and phone number. 2. The agent requests information that’s needed to obtain the customer’s credit score. Obtaining the credit score is a required step. 3. The agent follows a series of other steps to process the loan application. 4. When the application is processed successfully, the agent submits it for approval. 5. When the loan application is approved, the loan is sent for disbursement. 6. The agent wraps up the loan application process, and logs the call. Meet Cyrus, the service team leader. He’s in charge of the customer service department and is looking at ways to improve agent efficiency. He wants to streamline the following. - Common steps that are applicable to all loan types - Unique steps specific to the loan type - A standardized way for agents to complete steps that have been started before, such as when a customer starts an application online and later calls to complete it In addition, Cyrus wants agents to suggest extra products and services to qualified customers. He approaches Maria, the service admin in charge of Salesforce applications for Awesome Bank. With Lightning Flow for Service, Maria can provide Awesome Bank agents: - A method of presenting agents with recommendations, such as a next step or customized offer - A dynamic set of flows and quick actions associated with the record so that agents can see which steps to complete - A simple way for agents to resume paused flows for a record, such as flows that customers have started on an Experience Cloud site page and then paused - An easy way for agents to find another step based on customer needs - A means of seeing which actions have been started and completed on a record - A reminder for agents to complete screen flows that are required, like the credit score check After Maria creates flows and quick actions, she can choose from several methods to set up Lightning Flow for Service. All the methods create RecordActions so that Maria can present a list of steps to agents. - [Associate Actions to Records with a Deployment](https://developer.salesforce.com/docs/service/salesforce-guided-engagement/guide/guided-engagement-setup-associate-deployment.md) - [Associate Actions to Records with Process Builder](https://developer.salesforce.com/docs/service/salesforce-guided-engagement/guide/guided-engagement-setup-process-builder.md) - [Associate Actions to Records with SOAP](https://developer.salesforce.com/docs/service/salesforce-guided-engagement/guide/guided-engagement-setup-process-soap.md) - [Associate Actions to Records with Apex](https://developer.salesforce.com/docs/service/salesforce-guided-engagement/guide/guided-engagement-setup-process-apex.md) Maria decides to configure an Actions & Recommendations deployment in Setup. A deployment lets her set up the component from the user interface rather than using code. She can specify which channel-specific actions appear on which record pages, and give her agents step-by-step guidance. Best of all, she can display special offers that result from applying Next Best Action strategies to a set of recommendations. **note:** To show recommendations from Next Best Action strategies, use a deployment or API. Process Builder lets you show flows and quick actions on record pages when there’s a trigger condition. **See Also** - [Implementing the Example Use Case](https://developer.salesforce.com/docs/service/salesforce-guided-engagement/guide/guided-engagement-sample-implementation.md) - [Trailhead module: Lightning Flow for Service](https://trailhead.salesforce.com/en/content/learn/modules/service_lightning_flow_for_service) # Lightning Flow for Service Implementation Checklist Review the Lightning Flow for Service checklist before you roll out your implementation. **tip:** If you’re new to process automation, we recommend completing [Automate Your Business Processes with Salesforce Flow](https://trailhead.salesforce.com/trails/automate_business_processes) in Trailhead. The [Lightning Flow for Service module in Trailhead](https://trailhead.salesforce.com/en/content/learn/modules/service_lightning_flow_for_service) can also help you prepare. We recommend that you have a working knowledge of the following features and user interfaces. - Process automation tools, like Process Builder and Flow Builder - Einstein Next Best Action, if you plan to show recommendations from action strategies to your users - Lightning App Builder - Lightning console or standard navigation apps ## User Permissions You need the following permissions to complete an end-to-end implementation. - To create flows in Flow Builder: Manage Flow - To create quick actions: Customize Application - To manage deployments in Setup that include flows and quick actions: Customize Application - To manage deployments in Setup that include recommendations: - Modify All Data - OR Manage Next Best Action Strategies - To view Actions & Recommendations deployments in component properties: View Setup and Configuration - To create a process in Process Builder: - Manage Flow - AND View All Data - To create and save pages in the Lightning App Builder: Customize Application - To create or manage Lightning apps: Customize Application - To set up and configure Chat: Customize Application - To set up and configure Open CTI: Manage Call Centers To let your users run flows from an Actions & Recommendations component, make sure that they have the correct flow permissions. For flows that change data, users need permission to create, read, edit, and delete the relevant records and fields. - To run flows: - Flow User - OR Flow User field enabled on the user detail page - OR Manage Flow - OR if **Override default behavior and restrict access to enabled profiles or permission sets** is selected for an individual flow, access to that flow is given to users by profile or permission set To set up recommendations, you need these permissions. - To display Recommendations as a tab: **Default On** for Tab Setting for Recommendations object - To create and manage recommendations: - Modify All Data - OR Manage Next Best Action Recommendations To manage or run action strategies, you need these permissions. - To create or manage action strategies: - Modify All Data - OR Manage Next Best Action Strategies - To run an action strategy: - Run Flows - OR Flow User field enabled on the user detail page ## Tasks Use the following individual setup tasks when implementing Lightning Flow for Service. | Task | Complete If... | | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | [Create Actions to Show](https://developer.salesforce.com/docs/service/salesforce-guided-engagement/guide/guided-engagement-setup-flow.md) | You want to create a flow, quick action, or recommendation that shows in the component. | | [Associate Actions to Records with a Deployment](https://developer.salesforce.com/docs/service/salesforce-guided-engagement/guide/guided-engagement-setup-associate-deployment.md) | You want to define component settings: what type of guidance to show, channel defaults, and additional actions that users can start at run time. You can also create deployments programmatically using the Metadata API. | | [Associate Actions to Records with Process Builder](https://developer.salesforce.com/docs/service/salesforce-guided-engagement/guide/guided-engagement-setup-process-builder.md) | You want to create a process for actions declaratively using Process Builder. With Process Builder, you can automatically associate actions with a record when the record meets criteria that you define. | | [Associate Actions to Records with SOAP](https://developer.salesforce.com/docs/service/salesforce-guided-engagement/guide/guided-engagement-setup-process-soap.md) | You want to associate actions to records programmatically using SOAP API. | | [Associate Actions to Records with Apex](https://developer.salesforce.com/docs/service/salesforce-guided-engagement/guide/guided-engagement-setup-process-apex.md) | You want to associate actions to records programmatically using Apex. | | [Customize Your Lightning Pages with the Actions & Recommendations Component](https://developer.salesforce.com/docs/service/salesforce-guided-engagement/guide/guided-engagement-setup-component.md) | You want to add the component to record pages in your app. | | [Integrate Chat with Lightning Flow for Service](https://developer.salesforce.com/docs/service/salesforce-guided-engagement/guide/guided-engagement-integrate-live-agent.md) | You want to integrate Lightning Flow for Service with Chat. | | [Integrate Open CTI with Lightning Flow for Service](https://developer.salesforce.com/docs/service/salesforce-guided-engagement/guide/guided-engagement-integrate-cti.md) | You want to integrate Lightning Flow for Service with Open CTI and configure your softphone screen pop settings. | # Lightning Message Service Methods for Lightning Experience ## Usage These three methods allow your CTI implementation to communicate with other Visualforce, Aura, and Lightning components that also use the Lightning Message Service. The `subscribe` method attaches a listener function to a specified Lightning Message Channel. The `publish` method lets you send a message on a Lightning Message Channel. The `unsubscribe` method lets you remove listener functions you added with the subscribe method. These methods are available in API version 47.0 or later. **note:** These methods can be used only with Lightning Experience. They can be used in iFrame and Visualforce components. ## Syntax The `subscribe` method allows you to attach a listener function to a specified Lightning Message Channel. Lightning Message Service calls your listener function with the message that a component sends. ```javascript var SAMPLEMC = "SAMPLEMC__c"; var SAMPLEMC_SUBSCRIPTION = null; sforce.opencti.subscribe({channelName: SAMPLEMC, listener: onPublishMessage, callback: subscribeSampleMCCallback}); ``` ## Arguments for `subscribe` |Name|Type|Description| |------|------|-------------| |`channelName`|string|The name of the Message Channel that you can subscribe to.| |`listener`|function|JavaScript method that’s called when a message is sent on the Message Channel.| |`callback`|function|JavaScript method that’s executed when the API method call is completed.| ## Arguments for `unsubscribe` |Name|Type|Description| |------|------|-------------| |`subscription`|object|The subscription from which you can remove the listener function.| |`callback`|function|JavaScript method that’s executed when the API method call is completed.| ## Arguments for `publish` |Name|Type|Description| |------|------|-------------| |`channelName`|string|The name of the Message Channel that you can subscribe to.| |`message`|object|Serializable JSON object that is sent on the Message Channel.| |`callback`|function|JavaScript method that’s executed when the API method call is completed.| # Lightning Web Component Events for Enhanced Messaging JavaScript can be executed when certain types of events occur in a console, such as when a user closes a tab. A few events are specific to Messaging. These events apply to Lightning web components in Lightning Experience only. **note:** Use only rendered components with the Conversation Toolkit APIs. If you use a component that doesn’t have markup or that operates in the background, the APIs don’t work. The conversation component must also be rendered for the APIs to work. - **[lightning__conversationAgentSend](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-events-messaging-lwc-conversationagentsend.md)** Messaging event triggered when an agent sends a message through the Salesforce console. This method intercepts the message before it’s sent to the chat visitor. This event is also triggered when using Enhanced Messaging channels. To work with Enhanced Messaging channels, the session must be active and the Enhanced Conversation Component must be visible on the page. - **[lightning__conversationEnded](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-events-messaging-lwc-conversationchatended.md)** Messaging event triggered when an active chat ends or an agent leaves a chat conference. This event is also triggered when using Enhanced Messaging channels. To work with Enhanced Messaging channels, the session must be active and the Enhanced Conversation Component must be visible on the page. - **[lightning__conversationEndUserMessage](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-events-messaging-lwc-conversationendusermessage.md)** Messaging event triggered when the customer sends a new message. In Enhanced Messaging channels, this event is triggered only for text messages. This event is not triggered for messages with files or rich content. To work with Enhanced Messaging channels, the session must be active and the Enhanced Conversation Component must be visible on the page. # Lightning Web Components for Surveys Lightning Web Components (LWCs) for Surveys provide a variety of question types that you can use in a survey. |Required Editions| |-----------------| |Available in: **Developer**, **Enterprise**, and **Unlimited** Editions| ## LWCs for Surveys Lightning Web Components—a Salesforce recommended framework—enable participants to respond to any type of Feedback Management survey. LWCs can be added to standard or custom lightning pages to show the survey to the participants and to enable the participants to submit their response. Here’s the list of LWCs from the [package](https://resources.docs.salesforce.com/rel1/doc/en-us/static/misc/Survey_Sample_App.zip) that show a specific question type in a survey. |LWC Name|Description| |--------|-----------| |SurveyContainer|Interacts with the Apex class and shows the survey contents.| |SurveyQuestion|Invokes the question-specific component.| |surveyBooleanQuestion|Shows the boolean type of questions| |surveyShortTextQuestion|Shows the short text type of questions.| |surveySingleSelectQuestion|Shows the single selection type of questions.| |surveyMultiSelectQuestion, surveyNpsQuestion, surveyRatingQuestion, and surveyFreeTextQuestion|Shows other supported question types, such as multi-select type of questions, Net Promoter Score (NPS) questions, rating questions, or free-text questions.| **See Also** - [*Lightning Web Components Developer Guide*: Configure a Component for Lightning App Builder](https://developer.salesforce.com/docs/platform/lwc/guide/use-config-for-app-builder.html) # lightning__conversationAgentSend Messaging event triggered when an agent sends a message through the Salesforce console. This method intercepts the message before it’s sent to the chat visitor. This event is also triggered when using Enhanced Messaging channels. To work with Enhanced Messaging channels, the session must be active and the Enhanced Conversation Component must be visible on the page. ## Response |Name|Type|Description| |----|----|-----------| |`recordId`|String|The ID of the work record that’s associated with the current conversation.| |`content`|String|The text of the message in the conversation log.| |`name`|String|The name of the agent who is attempting to send the message. This name matches the agent name displayed in the conversation log.| |`timestamp`|Date/Time|The date and time that the agent attempted to send the message.| ## LWC Sample Code To listen to the `lightning__conversationAgentSend` event, import the Lightning Message Service features from `lightning/messageService` and pass the event to the `subscribe()` method. ```javascript import { LightningElement, wire } from 'lwc'; import { subscribe, unsubscribe, APPLICATION_SCOPE, MessageContext } from 'lightning/messageService'; import ConversationAgentSendChannel from '@salesforce/messageChannel/lightning__conversationAgentSend'; export default class ConversationAgentSendExample extends LightningElement { subscription = null; recordId; // To pass scope, you must get a message context. @wire(MessageContext) messageContext; // Standard lifecycle hook used to subscribe to the message channel connectedCallback() { this.subscribeToMessageChannel(); } // Pass scope to the subscribe() method. subscribeToMessageChannel() { if (!this.subscription) { this.subscription = subscribe( this.messageContext, ConversationAgentSendChannel, (message) => this.handleMessage(message), { scope: APPLICATION_SCOPE } ); } } // Handler for message received by component handleMessage(message) { this.recordId = message.recordId; } } ``` ## Aura Components Sample Code Component code: ```html ``` Controller code: ```javascript ({ onConversationAgentSend: function(cmp, evt, helper) { var recordId = evt.getParam("recordId"); var content = evt.getParam("content"); var name = evt.getParam("name"); var timestamp = evt.getParam("timestamp"); console.log("recordId:" + recordId + " content:" + content + " name:" + name + " timestamp:" + timestamp); } }) ``` # lightning__conversationEnded Messaging event triggered when an active chat ends or an agent leaves a chat conference. This event is also triggered when using Enhanced Messaging channels. To work with Enhanced Messaging channels, the session must be active and the Enhanced Conversation Component must be visible on the page. ## Response |Name|Type|Description| |----|----|-----------| |`recordId`|String|The ID of the work record that’s associated with the current chat.| ## LWC Sample Code To listen to the `lightning__conversationEnded` event, import the Lightning Message Service features from `lightning/messageService` and pass the event to the `subscribe()` method. ```javascript import { LightningElement, wire } from 'lwc'; import { subscribe, unsubscribe, APPLICATION_SCOPE, MessageContext } from 'lightning/messageService'; import ConversationEndedChannel from '@salesforce/messageChannel/lightning__conversationEnded'; export default class ConversationEndedExample extends LightningElement { subscription = null; recordId; // To pass scope, you must get a message context. @wire(MessageContext) messageContext; // Standard lifecycle hook used to subscribe to the message channel connectedCallback() { this.subscribeToMessageChannel(); } // Pass scope to the subscribe() method. subscribeToMessageChannel() { if (!this.subscription) { this.subscription = subscribe( this.messageContext, ConversationEndedChannel, (message) => this.handleMessage(message), { scope: APPLICATION_SCOPE } ); } } // Handler for message received by component handleMessage(message) { this.recordId = message.recordId; } } ``` ## Aura Components Sample Code Component code: ```html ``` Controller code: ```javascript ({ onConversationEndedEvent: function(cmp, evt, helper) { var conversation = cmp.find("conversationKit"); var recordId = evt.getParam("recordId"); console.log("recordId:" + recordId); } }) ``` # lightning__conversationEndUserMessage Messaging event triggered when the customer sends a new message. In Enhanced Messaging channels, this event is triggered only for text messages. This event is not triggered for messages with files or rich content. To work with Enhanced Messaging channels, the session must be active and the Enhanced Conversation Component must be visible on the page. ## Response |Name|Type|Description| |----|----|-----------| |`recordId`|String|The ID of the work record that’s associated with the current conversation.| |`content`|String|The message sent by the customer.| |`name`|String|The name of the user who sent the message. This name matches the username displayed in the conversation log.| |`timestamp`|Date/Time|The date and time the message was received.| ## LWC Sample Code To listen to the `lightning__conversationEndUserMessage` event, import the Lightning Message Service features from `lightning/messageService` and pass the event to the `subscribe()` method. ```javascript import { LightningElement, wire } from 'lwc'; import { subscribe, unsubscribe, APPLICATION_SCOPE, MessageContext } from 'lightning/messageService'; import ConversationEndUserChannel from '@salesforce/messageChannel/lightning__conversationEndUserMessage'; export default class ConversationEndUserExample extends LightningElement { subscription = null; recordId; // To pass scope, you must get a message context. @wire(MessageContext) messageContext; // Standard lifecycle hook used to subscribe to the message channel connectedCallback() { this.subscribeToMessageChannel(); } // Pass scope to the subscribe() method. subscribeToMessageChannel() { if (!this.subscription) { this.subscription = subscribe( this.messageContext, ConversationEndUserChannel, (message) => this.handleMessage(message), { scope: APPLICATION_SCOPE } ); } } // Handler for message received by component handleMessage(message) { this.recordId = message.recordId; } } ``` ## Aura Components Sample Code Component code: ```html ``` Controller code: ```javascript ({ onConversationEndUserMessage: function(cmp, evt, helper) { var recordId = evt.getParam('recordId'); var content = evt.getParam('content'); var name = evt.getParam('name'); var timestamp = evt.getParam('timestamp'); console.log("recordId:" + recordId + " content:" + content + " name:" + name + " timestamp:" + timestamp); } }) ``` # lightning__tabClosed A Lightning message channel that corresponds to the `lightning:tabClosed` Aura app event. ## Response The response is the same as that of the [lightning:tabClosed](https://developer.salesforce.com/docs/service/api-console/events/sforce-api-console-events-tabclosed.md) Aura app event. ## LWC Example Import the `lightning__tabClosed` message channel from the `@salesforce/messageChannel/` scoped module. The event returns the `message` in the response. ```javascript import { LightningElement, wire } from "lwc"; import { MessageContext, subscribe, unsubscribe, APPLICATION_SCOPE } from "lightning/messageService"; import tabClosedChannel from "@salesforce/messageChannel/lightning__tabClosed"; export default class TabClosedExample extends LightningElement { subscription = null; @wire(MessageContext) messageContext; // Encapsulate logic for Lightning message service subscribe and unsubscribe subscribeToMessageChannel() { if (!this.subscription) { this.subscription = subscribe( this.messageContext, tabClosedChannel, (message) => this.handleMessage(message), { scope: APPLICATION_SCOPE } ); } } unsubscribeToMessageChannel() { unsubscribe(this.subscription); this.subscription = null; } // Handler for message received by component handleMessage(message) { // do something console.log("Tab closed: ", message.tabId); } // Standard lifecycle hooks used to subscribe and unsubscribe to the message channel connectedCallback() { this.subscribeToMessageChannel(); } disconnectedCallback() { this.unsubscribeToMessageChannel(); } ``` For more information, see [Subscribe and Unsubscribe from a Message Channel](https://developer.salesforce.com/docs/platform/lwc/guide/use-message-channel-subscribe.html). # lightning__tabCreated A Lightning message channel that corresponds to the `lightning:tabCreated` Aura app event. This message channel is available for Lightning web components used within a Lightning console app. ## Response The response is the same as that of the [lightning:tabCreated](https://developer.salesforce.com/docs/service/api-console/events/sforce-api-console-events-tabcreated.md) Aura app event. ## LWC Example Import the `lightning__tabCreated` message channel from the `@salesforce/messageChannel/` scoped module. The event returns the `message` in the response. ```javascript import { LightningElement, track, wire } from "lwc"; import { MessageContext, subscribe, unsubscribe, APPLICATION_SCOPE } from "lightning/messageService"; import tabCreatedChannel from "@salesforce/messageChannel/lightning__tabCreated"; export default class TabCreatedExample extends LightningElement { subscription = null; @wire(MessageContext) messageContext; // Encapsulate logic for Lightning message service subscribe and unsubscribe subscribeToMessageChannel() { if (!this.subscription) { this.subscription = subscribe( this.messageContext, tabCreatedChannel, (message) => this.handleMessage(message), { scope: APPLICATION_SCOPE } ); } } unsubscribeToMessageChannel() { unsubscribe(this.subscription); this.subscription = null; } // Handler for message received by component handleMessage(message) { // do something } // Standard lifecycle hooks used to subscribe and unsubscribe to the message channel connectedCallback() { this.subscribeToMessageChannel(); } disconnectedCallback() { this.unsubscribeToMessageChannel(); } ``` For more information, see [Subscribe and Unsubscribe from a Message Channel](https://developer.salesforce.com/docs/platform/lwc/guide/use-message-channel-subscribe.html). # lightning__tabFocused A Lightning message channel that corresponds to the `lightning:tabFocused` Aura app event. This message channel is available for Lightning web components used within a Lightning console app. By default, this event is only received when that component's tab comes into focus, not when it leaves focus. To receive all events and minimize performance impact, use a utility item as the only listener. ## Response The response is the same as that of the [lightning:tabFocused](https://developer.salesforce.com/docs/service/api-console/events/sforce-api-console-events-tabfocused.md) Aura app event. ## LWC Example Import the `lightning__tabFocused` message channel from the `@salesforce/messageChannel/` scoped module. The event returns the `message` in the response. ```javascript import { LightningElement, track, wire } from "lwc"; import { MessageContext, subscribe, unsubscribe, APPLICATION_SCOPE } from "lightning/messageService"; import tabFocusedChannel from "@salesforce/messageChannel/lightning__tabFocused"; export default class TabFocusedExample extends LightningElement { subscription = null; @wire(MessageContext) messageContext; // Encapsulate logic for Lightning message service subscribe and unsubscribe subscribeToMessageChannel() { if (!this.subscription) { this.subscription = subscribe( this.messageContext, tabFocusedChannel, (message) => this.handleMessage(message), { scope: APPLICATION_SCOPE } ); } } unsubscribeToMessageChannel() { unsubscribe(this.subscription); this.subscription = null; } // Handler for message received by component handleMessage(message) { // do something } // Standard lifecycle hooks used to subscribe and unsubscribe to the message channel connectedCallback() { this.subscribeToMessageChannel(); } disconnectedCallback() { this.unsubscribeToMessageChannel(); } ``` For more information, see [Subscribe and Unsubscribe from a Message Channel](https://developer.salesforce.com/docs/platform/lwc/guide/use-message-channel-subscribe.html). # lightning__tabRefreshed A Lightning message channel that corresponds to the `lightning:tabRefreshed` Aura app event. This message channel is available for Lightning web components used within a Lightning console app. ## Response The response is the same as that of the [lightning:tabRefreshed](https://developer.salesforce.com/docs/service/api-console/events/sforce-api-console-events-tabrefreshed.md) Aura app event. ## LWC Example Import the `lightning__tabRefreshed` message channel from the `@salesforce/messageChannel/` scoped module. The event returns the `message` in the response. ```javascript import { LightningElement, track, wire } from "lwc"; import { MessageContext, subscribe, unsubscribe, APPLICATION_SCOPE } from "lightning/messageService"; import tabRefreshedChannel from "@salesforce/messageChannel/lightning__tabRefreshed"; export default class TabRefreshedExample extends LightningElement { subscription = null; @wire(MessageContext) messageContext; // Encapsulate logic for Lightning message service subscribe and unsubscribe subscribeToMessageChannel() { if (!this.subscription) { this.subscription = subscribe( this.messageContext, tabRefreshedChannel, (message) => this.handleMessage(message), { scope: APPLICATION_SCOPE } ); } } unsubscribeToMessageChannel() { unsubscribe(this.subscription); this.subscription = null; } // Handler for message received by component handleMessage(message) { // do something } // Standard lifecycle hooks used to subscribe and unsubscribe to the message channel connectedCallback() { this.subscribeToMessageChannel(); } disconnectedCallback() { this.unsubscribeToMessageChannel(); } ``` For more information, see [Subscribe and Unsubscribe from a Message Channel](https://developer.salesforce.com/docs/platform/lwc/guide/use-message-channel-subscribe.html). # lightning__tabReplaced A Lightning message channel that corresponds to the `lightning:tabReplaced` Aura app event. This message channel is available for Lightning web components used within a Lightning console app. ## Response The response is the same as that of the [lightning:tabReplaced](https://developer.salesforce.com/docs/service/api-console/events/sforce-api-console-events-tabreplaced.md) Aura app event. ## LWC Example Import the `lightning__tabReplaced` message channel from the `@salesforce/messageChannel/` scoped module. The event returns the `message` in the response. ```javascript import { LightningElement, wire } from "lwc"; import { MessageContext, subscribe, unsubscribe, APPLICATION_SCOPE } from "lightning/messageService"; import tabReplacedChannel from "@salesforce/messageChannel/lightning__tabReplaced"; export default class TabReplacedExample extends LightningElement { subscription = null; @wire(MessageContext) messageContext; // Encapsulate logic for Lightning message service subscribe and unsubscribe subscribeToMessageChannel() { if (!this.subscription) { this.subscription = subscribe( this.messageContext, tabReplacedChannel, (message) => this.handleMessage(message), { scope: APPLICATION_SCOPE } ); } } unsubscribeToMessageChannel() { unsubscribe(this.subscription); this.subscription = null; } // Handler for message received by component handleMessage(message) { // do something } // Standard lifecycle hooks used to subscribe and unsubscribe to the message channel connectedCallback() { this.subscribeToMessageChannel(); } disconnectedCallback() { this.unsubscribeToMessageChannel(); } ``` For more information, see [Subscribe and Unsubscribe from a Message Channel](https://developer.salesforce.com/docs/platform/lwc/guide/use-message-channel-subscribe.html). # lightning__tabUpdated A Lightning message channel that corresponds to the `lightning:tabUpdated` Aura app event. This message channel is available for Lightning web components used within a Lightning console app. ## Response The response is the same as that of the [lightning:tabUpdated](https://developer.salesforce.com/docs/service/api-console/events/sforce-api-console-events-tabupdated.md) Aura app event. ## LWC Example Import the `lightning__tabUpdated` message channel from the `@salesforce/messageChannel/` scoped module. The event returns the `message` in the response. ```javascript import { LightningElement, track, wire } from "lwc"; import { MessageContext, subscribe, unsubscribe, APPLICATION_SCOPE } from "lightning/messageService"; import tabUpdatedChannel from "@salesforce/messageChannel/lightning__tabUpdated"; export default class TabUpdatedExample extends LightningElement { subscription = null; @wire(MessageContext) messageContext; // Encapsulate logic for Lightning message service subscribe and unsubscribe subscribeToMessageChannel() { if (!this.subscription) { this.subscription = subscribe( this.messageContext, tabUpdatedChannel, (message) => this.handleMessage(message), { scope: APPLICATION_SCOPE } ); } } unsubscribeToMessageChannel() { unsubscribe(this.subscription); this.subscription = null; } // Handler for message received by component handleMessage(message) { // do something } // Standard lifecycle hooks used to subscribe and unsubscribe to the message channel connectedCallback() { this.subscribeToMessageChannel(); } disconnectedCallback() { this.unsubscribeToMessageChannel(); } ``` For more information, see [Subscribe and Unsubscribe from a Message Channel](https://developer.salesforce.com/docs/platform/lwc/guide/use-message-channel-subscribe.html). # lightning:conversationAgentSend Event triggered when an agent sends a chat message through the Salesforce console. This method does not intercept the message before it’s sent to the chat visitor. This event is also triggered when using Enhanced Messaging channels. ## Response |Name|Type|Description| |----|----|-----------| |`recordId`|String|The ID of the work record that’s associated with the current chat.| |`content`|String|The text of the message in the chat log.| |`name`|String|The name of the agent who is attempting to send the message. This name matches the agent name displayed in the chat log.| |`type`|String|The type of message that was received—for example, agent.| |`timestamp`|Date/Time|The date and time that the agent attempted to send the chat message.| ## Example Component code: ```html ``` Controller code: ```javascript ({ onAgentSend: function(cmp, evt, helper) { var recordId = evt.getParam("recordId"); var content = evt.getParam("content"); var name = evt.getParam("name"); var type = evt.getParam("type"); var timestamp = evt.getParam("timestamp"); console.log("recordId:" + recordId + " content:" + content + " name:" + name + " timestamp:" + timestamp); } }) ``` # lightning:conversationAgentSend Messaging event triggered when an agent sends a message through the Salesforce console. This method intercepts the message before it’s sent to the chat visitor. This event is also triggered when using Enhanced Messaging channels. To work with Enhanced Messaging channels, the session must be active and the Enhanced Conversation Component must be visible on the page. ## Response |Name|Type|Description| |----|----|-----------| |`recordId`|String|The ID of the work record that’s associated with the current conversation.| |`content`|String|The text of the message in the conversation log.| |`name`|String|The name of the agent who is attempting to send the message. This name matches the agent name displayed in the conversation log.| |`type`|String|The type of message that was received, such as an Agent or EndUser message.| |`timestamp`|Date/Time|The date and time that the agent attempted to send the message.| ## Example Component code: ```html ``` Controller code: ```javascript ({ onAgentSend: function(cmp, evt, helper) { var recordId = evt.getParam("recordId"); var content = evt.getParam("content"); var name = evt.getParam("name"); var type = evt.getParam("type"); var timestamp = evt.getParam("timestamp"); console.log("recordId:" + recordId + " content:" + content + " name:" + name + " timestamp:" + timestamp); } }) ``` # lightning:conversationChatEnded Event triggered when an active chat ends or an agent leaves a chat conference. This event is also triggered when using Enhanced Messaging channels. ## Response |Name|Type|Description| |----|----|-----------| |`recordId`|String|The ID of the work record that’s associated with the current chat.| ## Example Component code: ```html ``` Controller code: ```javascript ({ onChatEnded: function(cmp, evt, helper) { var conversation = cmp.find("conversationKit"); var recordId = evt.getParam("recordId"); console.log("recordId:" + recordId); } }) ``` # lightning:conversationChatEnded Messaging event triggered when an active chat ends or an agent leaves a chat conference. This event is also triggered when using Enhanced Messaging channels. To work with Enhanced Messaging channels, the session must be active and the Enhanced Conversation Component must be visible on the page. ## Response |Name|Type|Description| |----|----|-----------| |`recordId`|String|The ID of the work record that’s associated with the current chat.| ## Example Component code: ```html ``` Controller code: ```javascript ({ onChatEnded: function(cmp, evt, helper) { var conversation = cmp.find("conversationKit"); var recordId = evt.getParam("recordId"); console.log("recordId:" + recordId); } }) ``` # lightning:conversationCustomEvent Event triggered when a custom event occurs during a chat. ## Response |Name|Type|Description| |----|----|-----------| |`recordId`|String|The ID of the work record that’s associated with the current chat.| |`type`|String|The type of the custom event that was sent to this chat; corresponds to the `type` argument of the `liveagent.chasitor.sendCustomEvent()` method used to send this event from the chat window.| |`data`|String|The data of the custom event that was sent to this chat; corresponds to the `data` argument of the `liveagent.chasitor.sendCustomEvent()` method used to send this event from the chat window.| ## Example Component code: ```html ``` Controller code: ```javascript ({ onCustomEvent: function(cmp, evt, helper) { var conversation = cmp.find("conversationKit"); var data = evt.getParam("data"); var type = evt.getParam("type"); console.log("type:" + type + " data:" + data); } }) ``` # lightning:conversationNewMessage Event triggered when the customer sends a new message. This event is also triggered when using Enhanced Messaging channels. To work with Enhanced Messaging channels, the session must be active and the Enhanced Conversation Component must be visible on the page. ## Response |Name|Type|Description| |----|----|-----------| |`recordId`|String|The ID of the work record that’s associated with the current chat.| |`content`|String|The text sent by the customer.| |`name`|String|The name of the user who sent the message. This name matches the username displayed in the chat log.| |`type`|String|The type of message that was received, such as an Agent or Visitor message.| |`timestamp`|Date/Time|The date and time the message was received.| ## Example Component code: ```html ``` Controller code: ```javascript ({ onNewMessage: function(cmp, evt, helper) { var recordId = evt.getParam('recordId'); var content = evt.getParam('content'); var name = evt.getParam('name'); var type = evt.getParam('type'); var timestamp = evt.getParam('timestamp'); console.log("recordId:" + recordId + " content:" + content + " name:" + name + " timestamp:" + timestamp); } }) ``` # lightning:conversationNewMessage Messaging event triggered when the customer sends a new message. In Enhanced Messaging channels, this event is triggered only for text messages. This event is not triggered for messages with files or rich content. To work with Enhanced Messaging channels, the session must be active and the Enhanced Conversation Component must be visible on the page. ## Response |Name|Type|Description| |----|----|-----------| |`recordId`|String|The ID of the work record that’s associated with the current conversation.| |`content`|String|The message sent by the customer.| |`name`|String|The name of the user who sent the message. This name matches the username displayed in the conversation log.| |`type`|String|The type of message that was received, such as an Agent or Visitor message.| |`timestamp`|Date/Time|The date and time the message was received.| ## Example Component code: ```html ``` Controller code: ```javascript ({ onNewMessage: function(cmp, evt, helper) { var recordId = evt.getParam('recordId'); var content = evt.getParam('content'); var name = evt.getParam('name'); var type = evt.getParam('type'); var timestamp = evt.getParam('timestamp'); console.log("recordId:" + recordId + " content:" + content + " name:" + name + " timestamp:" + timestamp); } }) ``` # lightning:getEnclosingTabId Gets the `tabId` of the enclosing tab. This event is fired from an Aura component, unlike other console navigation events, which are fired by the console app. ## Arguments |Name|Type|Description| |----|----|-----------| |`callback`|function|JavaScript method to call when the event is fired.| ## Response |Name|Type|Description| |----|----|-----------| |`tabId`|string|The ID of the current workspace tab or subtab.| ## Example This example gets and displays the enclosing `tabId`. Component code: ```html ``` Controller code: ```javascript ({ getEnclosingTabId : function(component, event, helper){ $A.get("e.lightning:getEnclosingTabId").setParams({ callback: function(tabId) { alert("TabId: " + tabId); } }).fire(); } }) ``` You could also use this event with a method from the Workspace API. This example closes the enclosing tab. Controller code: ```html ``` Component code: ```javascript ({ closeEnclosingTab : function(component, event, helper){ var workspaceAPI = component.find("workspace"); $A.get("e.lightning:getEnclosingTabId").setParams({ callback: function(tabId) { workspaceAPI.closeTab({tabId: tabId}); } }).fire(); } }) ``` # lightning:getEnclosingUtilityId Gets the `utilityId` of the enclosing utility. This event is fired from an Aura component, unlike other console navigation events, which are fired by the console app. ## Arguments |Name|Type|Description| |----|----|-----------| |`callback`|function|JavaScript method to call when the event is fired.| ## Response |Name|Type|Description| |----|----|-----------| |`utilityId`|string|The ID of the current utility.| ## Example This example, when added to a single-column Lightning page used in a utility bar, displays the enclosing `utilityId`. Component code: ```html ``` Controller code: ```javascript ({ getEnclosingUtilityId : function(component, event, helper){ $A.get("e.lightning:getEnclosingUtilityId").setParams({ callback: function(tabId) { alert("UtilityId: " + tabId); } }).fire(); } }) ``` You could also use this event with a method from the Utility Bar API. This example, when used within a Lightning page in the utility bar, closes the enclosing utility. Controller code: ```html ``` Component code: ```javascript ({ minimizeEnclosingUtility : function(component, event, helper){ var utilityBarAPI = component.find("utilityBar"); $A.get("e.lightning:getEnclosingUtilityId").setParams({ callback: function(tabId) { utilityBarAPI.minimizeUtility({tabId : tabId}); } }).fire(); } }) ``` # lightning:omniChannelConnectionError Indicates that a network connection issue occurred. ## Response |Name|Type|Description| |----|----|-----------| |`error`|object|The network connection error message.| ## Example This example prints a line to the browser’s developer console when a network connection error occurs. Component code: ```html ``` Controller code: ```javascript ({ onConnectionError : function(component, event, helper) { console.log("Network Connection Error."); var error = event.getParam('error'); console.log(error); }, }) ``` # lightning:omniChannelLoginSuccess Indicates that an agent has been logged into Omni-Channel successfully. ## Response |Name|Type|Description| |----|----|-----------| |`statusId`|string|The ID of the agent’s current presence status.| ## Example This example prints a line to the browser’s developer console when an Omni-Channel user logs into Omni-Channel successfully. Component code: ```html ``` Controller code: ```javascript ({ onLoginSuccess : function(component, event, helper) { console.log("Login success."); var statusId = event.getParam('statusId'); console.log(statusId); }, }) ``` # lightning:omniChannelLogout Indicates that an agent has logged out of Omni-Channel. ## Response |Name|Type|Description| |----|----|-----------| |`reason`|string|The reason why the agent is logged out. Possible values are:
  • DuplicateLogin
  • DuplicateLoginInSameBrowser
  • MaintenanceLogout
  • OmniSupervisorLogout
| ## Example This example prints a line to the browser’s developer console when an Omni-Channel user logs out of Omni-Channel. Component code: ```html ``` Controller code: ```javascript ({ onLogout : function(component, event, helper) { console.log("Logout success."); var reason = event.getParam('reason'); console.log(reason); }, }) ``` # lightning:omniChannelStatusChanged Indicates that an agent has changed his or her presence status in Omni-Channel. ## Response |Name|Type|Description| |----|----|-----------| |`statusId`|string|The ID of the agent’s current presence status.| |`channels`|string|JSON string of channel objects.| |`reason`|string|The reason for the user's status change. Possible values are:
  • `OmniToolkitStatusChange`
  • `OmniPushTimeout`
  • `OmniDeclineWork`
  • `OmniManualStatusChange`
  • `OmniSupervisorStatusChange`
  • `OmniLoginStatusChange`
| |`statusName`|string|The name of the agent’s current presence status.| |`statusApiName`|string|The API name of the agent’s current presence status.| ## Example This example prints status details to the browser’s developer console when an Omni-Channel user's presence status is changed. Component code: ```html ``` Controller code: ```javascript ({ onStatusChanged : function(component, event, helper) { console.log("Status changed."); var statusId = event.getParam('statusId'); var channels = event.getParam('channels'); var statusName = event.getParam('statusName'); var statusApiName = event.getParam('statusApiName'); console.log(statusId); console.log(channels); console.log(statusName); console.log(statusApiName); }, }) ``` ## `channel` The `channel` object contains the following properties: |Name|Type|Description| |----|----|-----------| |`channelId`|string|Retrieves the ID of the service channel that’s associated with a presence status.| |`developerName`|string|Retrieves the developer name of the service channel that’s associated with the `channelId`.| # lightning:omniChannelWorkAccepted Indicates that an agent has accepted a work assignment, or that a work assignment has been automatically accepted. ## Response |Name|Type|Description| |----|----|-----------| |`workItemId`|string|The ID of the object that’s routed through Omni-Channel. This object becomes a work assignment with a `workId` when it’s assigned to an agent.| |`workId`|string|The ID of a work assignment that’s routed to an agent.| ## Example This example prints work details to the browser’s developer console when an Omni-Channel user accepts a work assignment, or when a work assignment is automatically accepted. Component code: ```html ``` Controller code: ```javascript ({ onWorkAccepted : function(component, event, helper) { console.log("Work accepted."); var workItemId = event.getParam('workItemId'); var workId = event.getParam('workId'); console.log(workItemId); console.log(workId); }, }) ``` # lightning:omniChannelWorkAssigned Indicates that an agent has been assigned a new work item. ## Response |Name|Type|Description| |----|----|-----------| |`workItemId`|string|The ID of the object that’s routed through Omni-Channel. This object becomes a work assignment with a `workId` when it’s assigned to an agent.| |`workId`|string|The ID of a work assignment that’s routed to an agent.| ## Example This example prints work details to the browser’s developer console when an Omni-Channel user is assigned a new work item. Component code: ```html ``` Controller code: ```javascript ({ onWorkAssigned : function(component, event, helper) { console.log("Work assigned."); var workItemId = event.getParam('workItemId'); var workId = event.getParam('workId'); console.log(workItemId); console.log(workId); }, }) ``` # lightning:omniChannelWorkClosed Indicates that the status of an AgentWork object is changed to Closed. This event fires when a work item is closed through any of the following triggers: - Console tab closure for tab-based capacity models - After Conversation Work (ACW) time elapsed when configured - Status change to Completed for status-based capacity models ## Response |Name|Type|Description| |----|----|-----------| |`workItemId`|string|The ID of the object that’s routed through Omni-Channel. This object becomes a work assignment with a `workId` when it’s assigned to an agent.| |`workId`|string|The ID of a work assignment that’s routed to an agent.| ## Example This example prints work details to the browser’s developer console when a work item is closed. Component code: ```html ``` Controller code: ```javascript ({ onWorkClosed : function(component, event, helper) { console.log("Work closed."); var workItemId = event.getParam('workItemId'); var workId = event.getParam('workId'); console.log(workItemId); console.log(workId); }, }) ``` # lightning:omniChannelWorkDeclined Indicates that an agent has declined a work assignment. ## Response |Name|Type|Description| |----|----|-----------| |`workItemId`|string|The ID of the object that’s routed through Omni-Channel. This object becomes a work assignment with a `workId` when it’s assigned to an agent.| |`workId`|string|The ID of a work assignment that’s routed to an agent.| ## Example This example prints work details to the browser’s developer console when an Omni-Channel user declines a work assignment. Component code: ```html ``` Controller code: ```javascript ({ onWorkDeclined : function(component, event, helper) { console.log("Work declined."); var workItemId = event.getParam('workItemId'); var workId = event.getParam('workId'); console.log(workItemId); console.log(workId); }, }) ``` # lightning:omniChannelWorkFlagUpdated Indicates that an agent’s work item flag has been raised or lowered. ## Response |Name|Type|Description| |----|----|-----------| |`workId`|string|The ID of a work item with the updated flag.| |`isFlagged`|Boolean|Specifies whether the flag is raised or not.| |`message`|string|Optional. A message associated with changing the flag.| |`roleUpdatedBy`|string|The role of the user who triggered this flag change. The value is `AGENT` or `SUPERVISOR`.| |`updatedBy`|string|The ID of the user who triggered this flag change.| ## Example This example prints a line to the browser’s developer console when an agent's work item flag is raised or lowered. Component code: ```html ``` Controller code: ```javascript ({ onChannelWorkFlagUpdated : function(cmp, evt, hlp) { var workId = evt.getParam('workId'); var message = evt.getParam('message'); var isFlagged = evt.getParam('isFlagged'); console.log("WorkFlag event"); console.log(" workId : "+ workId); console.log(" isFlagged : "+ isFlagged); console.log(" message : "+ message); } }) ``` # `lightning:omniChannelWorkloadChanged` Indicates that an agent’s workload has changed. This includes receiving new work items, declining work items, and closing items in the console. It also indicates that there has been a change to an agent’s capacity or presence configuration, or that the agent has gone offline in the Omni-Channel utility. ## Response |Name|Type|Description| |----|----|-----------| |`configuredCapacity`|number|The configured primary capacity for the agent.| |`previousWorkload`|number|The agent’s primary workload before the change.| |`newWorkload`|number|The agent’s new primary workload after the change.| |`configuredInterruptibleCapacity`|number|The configured interruptible capacity for the agent.| |`previousInterruptibleWorkload`|number|The agent’s interruptible workload before the change.| |`newInterruptibleWorkload`|number|The agent’s new interruptible workload after the change.| ## Example This example prints workload details to the browser’s developer console when an agent’s workload changes. Component code: ```html ``` Controller code: ```javascript ({ onWorkloadChanged : function(component, event, helper) { console.log("Workload changed."); var configuredCapacity = event.getParam('configuredCapacity'); var previousWorkload = event.getParam('previousWorkload'); var newWorkload = event.getParam('newWorkload'); console.log(configuredCapacity); console.log(previousWorkload); console.log(newWorkload); }, }) ``` # lightning:tabClosed Indicates that a tab has been closed. ## Response |Name|Type|Description| |----|----|-----------| |`tabId`|string|The ID of the closed tab.| ## Example This example prints a line to the browser’s developer console when a tab is closed. Component code: ```html ``` Controller code: ```javascript ({ onTabClosed : function(component, event, helper) { var tabId = event.getParam('tabId'); console.log("Tab closed: " + tabId); } }) ``` # lightning:tabCreated Indicates that a tab has been created successfully. ## Response |Name|Type|Description| |----|----|-----------| |`tabId`|string|The ID of the new tab.| ## Example This example prints a line to the browser’s developer console when a tab is created, and sets the label of the tab to "New Tab" using the `setTabLabel()` method. Component code: ```html ``` Controller code: ```javascript ({ onTabCreated : function(component, event, helper) { console.log("Tab created."); var newTabId = event.getParam('tabId'); var workspaceAPI = component.find("workspace"); workspaceAPI.setTabLabel({ tabId: newTabId, label: 'New Tab' }); }, }) ``` # lightning:tabFocused Indicates a tab was focused. `lightning:tabFocused` fires whenever a user selects a workspace tab or subtab, so console navigation users frequently trigger this application event in typical use. This event also fires when going from a tab to a navigation item, or going from a navigation item to a tab. Aura application events notify all listeners registered in the default phase, including listeners in background tabs. Multiple listeners responding at the same time can impact performance. To minimize performance impact, use a utility item as the only listener, or use a custom component event instead. ## Response |Name|Type|Description| |----|----|-----------| |`previousTabId`|string|The ID of the previously focused tab.| |`currentTabId`|string|The ID of the currently focused tab.| ## Example This example prints a line to the browser’s developer console when a tab is focused, and then returns that tab’s `tabInfo` object using the `getTabInfo()` method. Component code: ```html ``` Controller code: ```javascript ({ onTabFocused : function(component, event, helper) { console.log("Tab Focused"); var focusedTabId = event.getParam('currentTabId'); var workspaceAPI = component.find("workspace"); workspaceAPI.getTabInfo({ tabId : focusedTabId }).then(function(response) { console.log(response); }); } }) ``` # lightning:tabRefreshed Indicates that a tab has been refreshed. ## Response |Name|Type|Description| |----|----|-----------| |`tabId`|string|The ID of the refreshed tab.| ## Example This example prints a line to the browser’s developer console when a tab is refreshed, and then returns that tab’s `tabInfo` object using the `getTabInfo()` method. Component code: ```html ``` Controller code: ```javascript ({ onTabRefreshed : function(component, event, helper) { console.log("Tab Refreshed"); var refreshedTabId = event.getParam("tabId"); var workspaceAPI = component.find("workspace"); workspaceAPI.getTabInfo({ tabId : refreshedTabId }).then(function(response) { console.log(response); }); } }) ``` # lightning:tabReplaced Indicates that a tab has been replaced successfully. ## Response |Name|Type|Description| |----|----|-----------| |`tabId`|string|The ID of the replaced tab.| ## Example This example prints a line to the browser’s developer console when a tab is replaced, and then returns that tab’s URL using the `getTabURL()` method. Component code: ```html ``` Controller code: ```javascript ({ onTabReplaced : function(component, event, helper) { console.log("Tab Replaced"); var replacedTabId = event.getParam("tabId"); var workspaceAPI = component.find("workspace"); workspaceAPI.getTabURL({ tabId : replacedTabId }).then(function(response) { console.log(response); }); } }) ``` # lightning:tabUpdated Indicates that a tab has been updated successfully. ## Response |Name|Type|Description| |----|----|-----------| |`tabId`|string|The ID of the updated tab.| ## Example This example prints a line to the browser’s developer console when a tab is updated, and then prints that tab’s `tabId`. Component code: ```html ``` Controller code: ```javascript ({ onTabUpdated : function(component, event, helper) { console.log("Tab Updated"); var updatedTabId = event.getParam("tabId"); console.log(updatedTabId); }, }) ``` # Link Employee with Other Objects Connect the Employee object to other objects. Employee has an `Employee.UserId` lookup field to the User object. Also, the Employee object is linked to Individual. PersonAccount, for example, is sometimes used to represent employees. PersonAccount could be linked to an Employee via Individual. Other examples for utilizing Individual’s connection to Work.com include: - Solutions leveraging Contact can tie back via Contact > Individual \< Employee. - Solutions leveraging PersonAccount can tie back via PersonAccount > Individual \< Employee. - Solutions leveraging custom Employee objects can tie back via Employee > Individual \< Custom employee object. Data synchronization is still required, depending on your own data model. The Command Center package ships with triggers that are designed to populate Individuals based on Employees, and associate Individuals to Users based on the Employee Number field. **See Also** - [Synchronize Work.com Data Between Orgs](https://developer.salesforce.com/docs/service/workdotcom-dev/guide/wdc-cc-synch-data-between-orgs.md) # Linux Server Represents a Linux Server configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Server. ## Configuration Item Type Definition ||| |-|-| |Name|Linux Server| |Developer Name|`SD_LiSe`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Server](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-server.md)| |Rule Name|Default rule for all Wireless Controllers| |Identifier(s)|MAC address| ## Attributes ### Host Id - **Type**: text - **Developer Name**: `SD_HoId` - **Attribute Set**: [Hardware and Network](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-hardware-and-network.md) - **Description**: The host id of the Linux Server. - **Required**: Optional ### Threads per Processor Core - **Type**: int - **Developer Name**: `SD_ThPePrC` - **Attribute Set**: [Processor Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-processor-details.md) - **Description**: The threads per processor core of the Linux Server. - **Required**: Optional ### Zone Name - **Type**: text - **Developer Name**: `SD_ZoNa` - **Attribute Set**: [Hardware and Network](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-hardware-and-network.md) - **Description**: The zone name of the Linux Server. - **Required**: Optional # Listen for State Changes and Events You can add listeners for state changes and events during a chat session and respond accordingly. For instance, when the client ends a session, you can display a dialog to the user. **important:** 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](https://help.salesforce.com/s/articleView?id=service.miaw_intro_landing.htm&type=5) before that date. Messaging offers many of the [chat features](https://help.salesforce.com/s/articleView?id=service.miaw_chat_vs_messaging.htm&type=5) that you love plus asynchronous conversations that can be picked back up at any time. Learn about chat retirement in [Help](https://help.salesforce.com/s/articleView?id=001790618&type=1). 1. Create a [`SessionStateListener`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/SessionStateListener.html) implementation to handle session state changes. In Java: ```java public class MySessionStateListener implements SessionStateListener { @Override public void onSessionStateChange (ChatSessionState state) { if (state == ChatSessionState.Disconnected) { // TODO: Handle the disconnected state change } } @Override public void onSessionEnded (ChatEndReason endReason) { if (endReason == ChatEndReason.EndedByAgent) { // TODO: Show a UI telling the user that the agent ended the session } } } ``` In Kotlin: ```java class MySessionStateListener: SessionStateListener { override fun onSessionStateChange(state: ChatSessionState?) { if (state == ChatSessionState.Disconnected) { // TODO: Handle the disconnected state change } } override fun onSessionEnded(endReason: ChatEndReason?) { if (endReason == ChatEndReason.EndedByAgent) { // TODO: Show a UI telling the user that the agent ended the session } } } ``` This implementation handles state changes (`onSessionStateChange`) and why the session ended (`onSessionEnded`). For information on other session states and reasons for ending, see [`ChatSessionState`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/model/ChatSessionState.html) and [`ChatEndReason`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/model/ChatEndReason.html). 2. Create a [`ChatEventListener`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/ui/ChatEventListener.html) implementation if you want to listen for additional events. This listener isn’t required, but it can be used to listen for events such as: when an agent joins (`agentJoined`), when a message is sent (`processedOutgoingMessage`), when a message is received (`didReceiveMessage`). In Java: ```java public class MyEventListener implements ChatEventListener { public void agentJoined (AgentInformation agentInformation) { // Handle agent joined } public void processedOutgoingMessage (String message) { // Handle outgoing message processed } public void didSelectMenuItem (ChatWindowMenu.MenuItem menuItem) { // Handle chatbot menu selected } public void didSelectButtonItem (ChatWindowButtonMenu.Button buttonItem) { // Handle chatbot button selected } public void didSelectFooterMenuItem (ChatFooterMenu.MenuItem footerMenuItem) { // Handle chatboot footer menu selected } public void didReceiveMessage (ChatMessage chatMessage) { // Handle received message } public void transferToButtonInitiated () { // Handle transfer to agent } public void agentIsTyping (boolean isUserTyping) { // Handle typing update } } ``` In Kotlin: ```java class MyEventListener : ChatEventListener { override fun agentJoined(agentInformation: AgentInformation) { // Handle agent joined } override fun processedOutgoingMessage(message: String) { // Handle outgoing message processed } override fun didSelectMenuItem(menuItem: ChatWindowMenu.MenuItem) { // Handle chatbot menu selected } override fun didSelectButtonItem(buttonItem: ChatWindowButtonMenu.Button) { // Handle chatbot button selected } override fun didSelectFooterMenuItem(footerMenuItem: ChatFooterMenu.MenuItem) { // Handle chatboot footer menu selected } override fun didReceiveMessage(chatMessage: ChatMessage) { // Handle received message } override fun transferToButtonInitiated() { // Handle transfer to agent } override fun agentIsTyping(isUserTyping: Boolean) { // Handle typing update } } ``` 3. Create a [`SessionInfoListener`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/SessionInfoListener.html) implementation if you want to get session information. In Java: ```java public class MySessionInfoListener implements SessionInfoListener { public void onSessionInfoReceived (ChatSessionInfo chatSessionInfo) { // TO DO: Do something with the session ID String sessionId = chatSessionInfo.getSessionId(); } ``` In Kotlin: ```java class MySessionInfoListener : SessionInfoListener { override fun onSessionInfoReceived(chatSessionInfo: ChatSessionInfo) { // TO DO: Do something with the session ID val sessionId = chatSessionInfo.getSessionId() } } ``` 4. Instantiate your listener instances from your `Application` class. In Java: ```java private MySessionStateListener mSessionStateListener; private MyEventListener mEventListener; private MySessionInfoListener mSessionInfoListener; @Override public void onCreate () { super.onCreate(); mSessionStateListener = new MySessionStateListener(); mEventListener = new MyEventListener(); mSessionInfoListener = new MySessionInfoListener(); } public SessionStateListener getSessionStateListener () { return mSessionStateListener; } public ChatEventListener getEventListener () { return mEventListener; } public SessionInfoListener getSessionInfoListener () { return mSessionInfoListener; } ``` In Kotlin: ```java val mSessionStateListener = MySessionStateListener() val mEventListener = MyEventListener() val mSessionInfoListener = MySessionInfoListener() ``` **note:** It’s important to have the listener at the `Application` scope to ensure that the session is trackable throughout the lifetime of the application rather than just within an `Activity`. 5. When you configure and start a session, add the listeners that you implemented. Add the event listener ([`ChatEventListener`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/ui/ChatEventListener.html)) to the chat UI configuration object. Add the session info listener ([`SessionInfoListener`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/SessionInfoListener.html)) and the session state listener ([`SessionStateListener`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/SessionStateListener.html)) to the chat UI client. In Java: ```java // Create a UI configuration instance from a core instance // and add our event listener ChatUIConfiguration.Builder uiConfig = new ChatUIConfiguration.Builder() .chatConfiguration(chatConfiguration) .chatEventListener((MyApplication)getApplication()).getEventListener()); // Create a chat session and add our session listener ChatUI.configure(uiConfig.build()) .createClient(getApplicationContext()) .onResult(new Async.ResultHandler() { @Override public void handleResult (Async operation, ChatUIClient chatUIClient) { SessionStateListener sessionStateListener = ((MyApplication)getApplication()).getSessionStateListener(); chatUIClient.addSessionStateListener(sessionStateListener); SessionInfoListener sessionInfoListener = ((MyApplication)getApplication()).getSessionInfoListener(); chatUIClient.addSessionInfoListener(sessionInfoListener); chatUIClient.startChatSession(MainActivity.this); } }); ``` In Kotlin: ```java // Create a UI configuration instance from a core instance // and add our event listener val uiConfig = ChatUIConfiguration.Builder() .chatConfiguration(chatConfiguration) .chatEventListener(mEventListener) // Create a chat session and add our session listener ChatUI.configure(uiConfig.build()) .createClient(applicationContext) .onResult { operation, chatUIClient -> chatUIClient.addSessionStateListener(mSessionStateListener) chatUIClient.addSessionInfoListener(mSessionInfoListener) chatUIClient.startChatSession(this@MainActivity) } ``` **See Also** - [Quick Setup: Chat in the Service Chat SDK](https://developer.salesforce.com/docs/service/service-sdk-android/guide/android-chat-basic-setup.md) # Listen for State Changes and Events Implement `SCSChatSessionDelegate` to be notified about state changes made before, during, and after a chat session. This delegate also allows you to listen for error conditions so you can present alerts to the user when applicable. **important:** 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](https://help.salesforce.com/s/articleView?id=service.miaw_intro_landing.htm&type=5) before that date. Messaging offers many of the [chat features](https://help.salesforce.com/s/articleView?id=service.miaw_chat_vs_messaging.htm&type=5) that you love plus asynchronous conversations that can be picked back up at any time. Learn about chat retirement in [Help](https://help.salesforce.com/s/articleView?id=001790618&type=1). ## Listening to State Changes A chat session can be in one of the following states: - Inactive - : No active session. - Connecting - : A connection with chat servers is being established. - Queued - : A connection has been established, and is now in the queue for next available agent. - Connected - : Connected with an agent . - Ending - : Session is cleaning up the connection at the end of a session. These states are defined in [`SCSChatSessionState`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Enums/SCSChatSessionState.html). Throughout a session, your application might want to know the current state. You can monitor state changes by implementing [`SCSChatSessionDelegate`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSChatSessionDelegate.html). Use the [`add(delegate:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSChat.html#/c:objc(cs)SCSChat(im)addDelegate:>) method on [`SCSChat`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSChat.html) to register your delegate. Use the [`session(didTransitionFrom:to:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSChatSessionDelegate.html#/c:objc(pl)SCSChatSessionDelegate(im)session:didTransitionFromState:toState:>) method to listen for state changes. ## Handling Session Termination and Error Conditions The SDK doesn't present UI alerts for session termination or error conditions so you'll need to listen for these events and decide what to show your users. There are two [`SCSChatSessionDelegate`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSChatSessionDelegate.html) methods for this purpose: 1. To track session termination, use the [`session(didEnd:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSChatSessionDelegate.html#/c:objc(pl)SCSChatSessionDelegate(im)session:didEnd:>) method. Inspect the reason (`SCSChatSessionEndEvent.type`) to determine why the session stopped. Use the [`SCSChatSession`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSChatSession.html) object to get the session ID and other session information. 2. You can track errors with the [`session(didError:fatal:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSChatSessionDelegate.html#/c:objc(pl)SCSChatSessionDelegate(im)session:didError:fatal:>) method. Compare the error code to [`SCSChatErrorCode`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Enums/SCSChatErrorCode.html) to determine what kind of error occurred. ## Example This sample code does the following: - Implements the [`SCSChatSessionDelegate`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSChatSessionDelegate.html) protocol. - Implements the [`session(didTransitionFrom:to:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSChatSessionDelegate.html#/c:objc(pl)SCSChatSessionDelegate(im)session:didTransitionFromState:toState:>) method to listen for state changes. - Implements the [`session(didEnd:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSChatSessionDelegate.html#/c:objc(pl)SCSChatSessionDelegate(im)session:didEnd:>) method and logs a few possible end reasons. - Implements the [`session(didError:fatal:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSChatSessionDelegate.html#/c:objc(pl)SCSChatSessionDelegate(im)session:didError:fatal:>) method to listen for errors. ```java import UIKit import ServiceCore import ServiceChat class MyChatSessionDelegateImplementation: NSObject, SCSChatSessionDelegate { // TO DO: Register this delegate using // ServiceCloud.shared().chatCore.add(delegate: myDelegate) /** Delegate method to handle state change. */ func session(_ session: SCSChatSession!, didTransitionFrom previous: SCSChatSessionState, to current: SCSChatSessionState) { NSLog("Chat state changed...") switch current { case .connecting: NSLog("Chat now connecting...") case .connected: NSLog("Chat connected...") // TO DO: Handle other reasons default: break } } /** Delegate method for session stop event. */ func session(_ session: SCSChatSession!, didEnd endEvent: SCSChatSessionEndEvent!) { var reason = "Unknown" switch endEvent.reason { case .agent: reason = "The agent has ended the session." case .noAgentsAvailable: reason = "No agents were available." default: // TO DO: Handle other reasons break } NSLog("\nChat End Session. Reason: \(reason)") // You can access the session ID from the SCSChatSession object let sessionId = session.sessionId } /** Delegate method for error conditions. */ func session(_ session: SCSChatSession!, didError error: Error!, fatal: Bool) { // TO DO: Handle error condition NSLog("Chat error: \(error.localizedDescription)") } } ``` # Load Balancer For Represents the Load Balancer For relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. ## Relationship Type Definition ||| |-|-| |Developer Name|`SD_LoBaFo`| |Description|Defines the Load Balancer For relationship between configuration items in the CMDB.| |Master Label|Load Balancer For| |Direct Relationship|Load Balancer For| |Inverse Relationship|Load Balanced By| |Line Stroke|Solid| |Color Code|`#21ff97`| # Load Balances Represents the Load Balances relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. ## Relationship Type Definition ||| |-|-| |Developer Name|`SD_LoBa`| |Description|Defines the Load Balances relationship between configuration items in the CMDB.| |Master Label|Load Balances| |Direct Relationship|Load Balances| |Inverse Relationship|Load Balanced By| |Line Stroke|Solid| |Color Code|`#27283b`| # Located At Represents the Located At relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. ## Relationship Type Definition ||| |-|-| |Developer Name|`SD_LoAt`| |Description|Defines the Located At relationship between configuration items in the CMDB.| |Master Label|Located At| |Direct Relationship|Located At| |Inverse Relationship|Houses| |Line Stroke|Solid| |Color Code|`#D9330F`| # Located In Represents the Located In relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. ## Relationship Type Definition ||| |-|-| |Developer Name|`SD_LoIn`| |Description|Defines the Located In relationship between configuration items in the CMDB.| |Master Label|Located In| |Direct Relationship|Located In| |Inverse Relationship|Contains Room| |Line Stroke|Solid| |Color Code|`#CC9900`| # Located in Zone Represents the Located in Zone relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. ## Relationship Type Definition ||| |-|-| |Developer Name|`SD_LoInZo`| |Description|Defines the Located in Zone relationship between configuration items in the CMDB.| |Master Label|Located in Zone| |Direct Relationship|Located in Zone| |Inverse Relationship|Zone contains| |Line Stroke|Solid| |Color Code|`#991466`| # Location Location is used by Work.com to represent a physical location, with a visitor address, with extra custom fields added by Work.com. If location search filtering for all levels is enabled in the org, a location can also be an abstraction. For Work.com, a Location record can have child Location records, which are called sublocations. Use sublocations to create hierarchies that go all the way to an employee work area, for example Building>Floor>Space. Locations have local level information that is set automatically. A top-level, root location is level 1. A child of level 1 is level 2, and so on. By default, a level 1 location must have a visitor address. However, if a Salesforce admin has enabled location search filtering for all levels of the location hierarchy, level 1 locations don't have to have a visitor address. They can be abstractions, like sales regions or city neighborhoods. For details, see Salesforce Help. A location hierarchy, which includes a level 1 location and all its sublocations, can be 13 levels deep and include up to 10,000 locations. Location names have a 40-character limit and names must be unique. Work.com adds the following field customizations on Location. ## Changes to Existing Fields
FieldTypePropertiesDescription
LocationType  

Users see this value in Workplace Command Center.

For Work.com, the set of valid values is:

  • Building

  • Campus

  • Floor

  • Plant

  • Site

  • Space

  • Store

  • Warehouse

The default value is Building.

VisitorAddressId  Users see this value in Workplace Command Center.
## Custom Fields | Field | Type | Properties | Description | | ------------------------------ | -------- | ------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | wkcc\_\_Level2LocationId\_\_c | string | Create, Filter, Group, idLookup, Nillable, Sort, Update | For child locations, this value is the level 2 location in its location hierarchy. For level 1 locations, this value is empty. This value is used to aggregate wellness statuses. | | wkcc\_\_LocationPath\_\_c | string | Create, Filter, Group, idLookup, Nillable, Sort, Update | Updates to this field should be made only by Salesforce. The location hierarchy from the root location to this location. Format is similar to `,,`. This field is unique within your organization. | | wkcc\_\_StatusLastUpdated\_\_c | date | Create, Filter, Group, Nillable, Sort, Update | The date when Status\_\_c was last changed. | | wkcc\_\_Status\_\_c | picklist | Create, Filter, Group, Nillable, Restricted picklist, Sort, Update | The status of the location.Possible values are:
  • `Hard Close`
  • `Open`
  • `Reduced Density`
  • `Soft Close`
| **See Also** - [Understand Location Data](https://developer.salesforce.com/docs/service/workdotcom-dev/guide/wdc-cc-understand-location.md) - [_Object Reference for Salesforce_: Location](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_location.htm) # login Logs an agent into Omni-Channel with a specific presence status. You also can use this method to reconnect to Omni-Channel after a connection error. Available in API versions 32.0 and later. ## Syntax ```javascript sforce.console.presence.login(statusId:String, (optional) callback:function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`statusId`|String|The ID of the presence status. Agents must be given access to this presence status through their associated profile or permission set.| |`callback`|function|JavaScript method to call when the agent is logged in with the presence status associated with `statusId`.| ## Sample Code–Visualforce ```apex_page Log In to Omni-Channel ``` ## Response This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following properties: |Name|Type|Description| |----|----|-----------| |`success`|Boolean|`true` if the login was successful; `false` if the login wasn’t successful.| # login for Lightning Experience Logs an agent in to Omni-Channel with a specific presence status. ## Arguments |Name|Type|Description| |----|----|-----------| |`statusId`|string|The ID of the presence status. Agents must be given access to this presence status through their associated profile or permission set.| ## Sample Code Component code: ```html ``` Controller code: ```javascript ({ login: function(cmp, evt, hlp) { var omniAPI = cmp.find("omniToolkit"); omniAPI.login({statusId: "0N5xx0000000001"}).then(function(result) { if (result) { console.log("Login successful"); } else { console.log("Login failed"); } }).catch(function(error) { console.log(error); }); } }) ``` ## Response This method returns a promise that, upon success, resolves to `true` and is rejected on error. # logout Logs an agent out of Omni-Channel. Available in API versions 32.0 and later. ## Syntax ```javascript sforce.console.presence.logout((optional) callback:function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`callback`|function|JavaScript method to call when the agent is logged out of Omni-Channel.| ## Sample Code–Visualforce ```apex_page Log out of Omni-Channel ``` ## Response This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following properties: |Name|Type|Description| |----|----|-----------| |`success`|Boolean|`true` if the logout was successful; `false` if the logout wasn’t successful.| # logout for Lightning Experience Logs an agent out of Omni-Channel. ## Sample Code Component code: ```html ``` Controller code: ```javascript ({ logout: function(cmp, evt, hlp) { var omniAPI = cmp.find("omniToolkit"); omniAPI.logout().then(function(result) { if (result) { console.log("Logout successful"); } else { console.log("Logout failed"); } }).catch(function(error) { console.log(error); }); } }) ``` ## Response This method returns a promise that, upon success, resolves to `true` and is rejected on error. # lowerAgentWorkFlag for Lightning Experience Lowers a flag for this agent work item. ## Arguments |Name|Type|Description| |----|----|-----------| |`workId`|string|The ID of the work item to lower the flag on.| ## Sample Code Component code: ```html ``` Controller code: ```javascript ({ lowerFlag: function(cmp, evt, hlp) { var omniAPI = cmp.find("omniToolkit"); omniAPI.getAgentWorks().then(function(result) { var works = JSON.parse(result.works); var work = works[0]; omniAPI.lowerAgentWorkFlag({workId: work.workId}).then(function(res) { if (res) { console.log("Flag lowered successfully"); } else { console.log("Flag lower failed"); } }).catch(function(error) { console.log(error); }); }); } }) ``` ## Response This method returns a promise that, upon success, resolves to `true` and is rejected on error. **note:** When Omni-Channel Fallback Mode is enabled, the raise and lower flag feature isn't supported. If this method is used, it doesn’t perform any operations and always resolves to true. **See Also** - [Knowledge Article: Routing Work with Omni-Channel Fallback Mode](https://help.salesforce.com/s/articleView?id=002186102&type=1) # LWC Methods for Enhanced Messaging in Lightning Experience The Conversation Toolkit API for Enhanced Messaging provides methods to interact with a Messaging customer from a Lightning web component (LWC). These methods apply to Lightning web components in Lightning Experience only. The Conversation Toolkit API is designed for Enhanced Messaging channels, which includes Messaging for In-App and Web, Enhanced Apple, Enhanced Facebook Messenger, Enhanced WhatsApp, Enhanced SMS, and Partner Messaging. These methods help developers customize the agent experience and how users and other components interact with the conversation component on a page. For example, if you want to customize how an agent composes a message, you can create a messaging composer to draft and send a message during the conversation. These methods only work with an open Messaging Session record page in the console or standard app. If the record is not open, the methods don’t work. **note:** Use only rendered components with the Conversation Toolkit APIs. If you use a component that doesn’t have markup or that operates in the background, the APIs don’t work. The conversation component must also be rendered for the APIs to work. ## Sample Code This sample code is an example of the .html file of an LWC bundle that uses Conversation Toolkit API. ```html ``` This sample code is an example of the .xml metadata file of the LWC bundle. ```xml 52.0 true lightning__AppPage lightning__RecordPage lightning__HomePage ``` This sample code is an example of the .js file of the LWC bundle. Here is where you use the LWC methods for Enhanced Messaging. ```javascript import { LightningElement, api,track } from 'lwc'; export default class HelloWorld extends LightningElement { @api recordId; @track log = []; @track apiOutput; changeHandler(event) { this.greeting = event.target.value; } async handleButtonClick(event){ this.reset(); const toolKit = this.refs.lwcToolKitApi; let result; switch (event.target.value) { case 'getEnhancedConversationLog': result = await toolKit.getEnhancedConversationLog(this.recordId); break; case 'getConversationLog': result = await toolKit.getConversationLog(this.recordId); for(let i=0;i # LxScheduler Namespace The `LxScheduler` namespace provides an interface and classes for retrieving service resources and time slots to create an appointment. The following are the classes and the interface in the `LxScheduler` namespace. ## Classes - [GetAppointmentCandidatesInput Class](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_lxscheduler_GetAppointmentCandidatesInput.htm) — Contains information about the available service resources (appointment candidates) based on work type group and service territories. - [GetAppointmentCandidatesInputBuilder Class](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_lxscheduler_GetAppointmentCandidatesInputBuilder.htm) — Contains methods to build an instance of the `lxscheduler.GetAppointmentCandidatesInput` class. - [GetAppointmentSlotsInput Class](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_lxscheduler_GetAppointmentSlotsInput.htm) — Contains information about the available appointment time slots for a resource based on given work type group and territories. - [GetAppointmentSlotsInputBuilder Class](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_lxscheduler_GetAppointmentSlotsInputBuilder.htm) — Contains methods to build an instance of the `lxscheduler.GetAppointmentSlotsInput` class. - [SchedulerResources Class](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_lxscheduler_SchedulerResources.htm) — Contains methods that hold the business logic to get resources availability. - [SkillRequirement Class](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_lxscheduler_SkillRequirement.htm) — Contains information about the set of skills that are required to complete a particular task for a work type. - [SkillRequirementBuilder Class](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_lxscheduler_SkillRequirementBuilder.htm) — Contains methods to build an instance of the `lxscheduler.SkillRequirement` class. - [WorkType Class](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_lxscheduler_WorkType.htm) — Contains information about the type of work to be performed. - [WorkTypeBuilder Class](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_lxscheduler_WorkTypeBuilder.htm) — Contains methods to build an instance of the `lxscheduler.WorkType` class. # Mac Host Represents a Mac Host configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Compute. ## Configuration Item Type Definition ||| |-|-| |Name|Mac Host| |Developer Name|`SD_MaHo`| |Component|No| |End User Compute/Unmetered|Yes| |Parent|[Compute](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-compute.md)| |Rule Name|Default rule for all AWS Internet Gateways| |Identifier(s)|Internet Gateway Id| ## Attributes No associated attributes for this configuration item type. # Maintenance And BackUp Information Represents the Maintenance And BackUp Information attribute set in the Configuration Management Database (CMDB). This attribute set groups related attributes for configuration items. ## Configuration Item Attribute Set Definition ||| |-|-| |Display Name|Maintenance And BackUp Information| |Developer Name|`SD_MaAnBaI`| |Master Label|Maintenance_And_BackUp_Information| ## Attributes ### Auto Minor Version Upgrade - **Type**: text - **Developer Name**: `SD_AuMiVeU` - **Description**: Describes the Auto Minor Version Upgrade for configuration items. - **Required**: Optional ### Backup Retention Period - **Type**: text - **Developer Name**: `SD_BaRePe` - **Description**: Describes the Backup Retention Period for configuration items. - **Required**: Optional ### Backup Window - **Type**: text - **Developer Name**: `SD_BaWi` - **Description**: Describes the Backup Window for configuration items. - **Required**: Optional ### Latest Restored Time - **Type**: text - **Developer Name**: `SD_LaReTi` - **Description**: Describes the Latest Restored Time for configuration items. - **Required**: Optional ### Maintenance Window - **Type**: text - **Developer Name**: `SD_MaWi` - **Description**: Describes the Maintenance Window for configuration items. - **Required**: Optional # Manage Conversations This document provides implementation guidelines and best practices for developers on how to generate conversation IDs and use these IDs to create, close, and query conversations. ## Conversations A messaging conversation represents a communication exchange between a messaging user—also known as the customer—and a service rep, an Agentforce agent, an Einstein bot, or a combination of them. ### Lifetime of a Conversation The lifetime of a conversation is broken down into four stages: 1. **Creation**–A new messaging conversation between a messaging user and a service rep, Agentforce agent, or Einstein bot starts. 2. **Session**–One or more messaging sessions occur within that conversation. Ending a session does not end the conversation. For example, clicking the **End Chat** button ends only the current session; it doesn’t end the conversation. See the [Enhanced Chat and Messaging Glossary](https://help.salesforce.com/s/articleView?id=service.miaw_glossary.htm) for precise definitions. 3. **Closing**–The messaging conversation is explicitly closed. When a conversation is closed, the status of the conversation changes to closed and no new messages can be sent. 4. **Persistence**–The conversation history is preserved, and the historical conversation data can be queried at any time for analysis using the [Conversation Query API](https://salesforce-async-messaging.github.io/messaging-in-app-android/sdk/core/com.salesforce.android.smi.core/-conversation-client/index.html#962222010%2FFunctions%2F-1357061740). ## Conversation IDs Each conversation has a unique, randomly-generated ID that persists for the conversation’s entire lifetime and links all messages and participants in that thread. The Enhanced In-App SDK uses these conversation IDs to track and manage message conversations throughout their entire lifecycle. A valid conversation ID must be: - A randomly-generated (version 4\) universally unique identifier (UUID v4). - Completely independent of business logic or customer data. - Used only for conversation tracking and management. Never substitute conversation IDs with customer IDs or any other business identifiers. ### Conversation ID Limitations Consider the following limitations with conversation IDs: - Conversation IDs can’t be moved from a staging org to a production org. - Conversation IDs can’t be transferred between verified and unverified users. - Conversation IDs created in an unverified session can’t be migrated to another device. - Conversation IDs are tied to user verification; if the local database or app is deleted, unverified conversations become inaccessible. ### Generate Conversation IDs The Enhanced In-App SDK can generate UUIDs automatically, or you can manually generate the IDs yourself: ``` // Generate a new UUID for conversation val conversationId = UUID.randomUUID() ``` Follow these guidelines when generating conversation IDs: - The conversation ID must be a randomly-generated (version 4\) universally unique identifier (UUID v4). - The conversation ID must be generated with the system’s UUID mechanism. - The conversation ID must be unique across all conversations. - The conversation ID must be stored and managed by your application. ## Manage Conversations ### Persist a Single Conversation To keep one ongoing conversation, you need: - A valid and unique conversation ID (UUID). - Proper initialization of the conversation object. - Persistent storage for the ID. - Logic to manage conversation state. ### Manage Multiple Conversations Use the [Conversation Query API](https://salesforce-async-messaging.github.io/messaging-in-app-android/sdk/core/com.salesforce.android.smi.core/-conversation-client/index.html#962222010%2FFunctions%2F-1357061740) to access and display multiple conversations. See Conversation Lists for more information. Follow these best practices when generating conversation IDs: - Store and retrieve conversation IDs systematically. - Use pagination for large result sets. - Implement retries and error handling. - Cache conversations when appropriate. - Prefer verified users for multi-conversation workflows. ### Recommended Approach Consider the following recommended approaches when managing conversations. **Developer manages conversation IDs** Follow best practices when managing conversation IDs. Some aspects to consider when managing conversation IDs include: - Generating and storing the unique conversation ID (UUID). - Persisting the conversation ID securely (e.g., Keychain / encrypted database). - Handling the conversation ID’s lifecycle. - Using verified conversations for anything beyond quick one-offs. **Developer leverages SDK queries** Use the Enhanced In-App SDK queries to take full advantage of your conversation data. For example, - Use the [Conversation Query API](https://salesforce-async-messaging.github.io/messaging-in-app-android/sdk/core/com.salesforce.android.smi.core/-conversation-client/index.html#962222010%2FFunctions%2F-1357061740) to look up existing conversations. - Implement robust error handling. - React to state changes (e.g., closed, archived). ## Implement Conversations Follow these implementation guidelines to create, close, and query conversations. ### Create a New Conversation To create a new conversation, build a configuration object and instantiate a [ConversationClient](https://salesforce-async-messaging.github.io/messaging-in-app-android/sdk/core/com.salesforce.android.smi.core/-conversation-client/index.html) ([Core SDK](https://developer.salesforce.com/docs/service/messaging-in-app/guide/android-core-sdk.html)), or create an Interface view ([UI SDK](https://developer.salesforce.com/docs/service/messaging-in-app/guide/android-ui-sdk.html)). ### Close a Conversation To close a conversation, call the [closeConversation](https://salesforce-async-messaging.github.io/messaging-in-app-android/sdk/core/com.salesforce.android.smi.core/-conversation-client/close-conversation.html) method on the [ConversationClient](https://salesforce-async-messaging.github.io/messaging-in-app-android/sdk/core/com.salesforce.android.smi.core/-conversation-client/index.html), or call the [closeConversation](https://salesforce-async-messaging.github.io/messaging-in-app-android/sdk/core/com.salesforce.android.smi.core/-core-client/index.html#913276732%2FFunctions%2F-1357061740) method on the [CoreClient](https://salesforce-async-messaging.github.io/messaging-in-app-android/sdk/core/com.salesforce.android.smi.core/-core-client/index.html). Using `ConversationClient`: ``` conversationClient.closeConversation() ``` Using `CoreClient`: ``` let conversationId = coreClient.closeConversation(conversationId) ``` ### Query a Conversation To query a conversation, refer to the [Conversation List](https://developer.salesforce.com/docs/service/messaging-in-app/guide/android-conversation-lists.html) documentation for query examples and pagination details. # Manage Conversations This document provides implementation guidelines and best practices for developers on how to generate conversation IDs and use these IDs to create, close, and query conversations. ## Conversations A messaging conversation represents a communication exchange between a messaging user—also known as the customer—and a service rep, an Agentforce agent, an Einstein bot, or a combination of them. ### Lifetime of a Conversation The lifetime of a conversation is broken down into four stages: 1. **Creation**–A new messaging conversation between a messaging user and a service rep, Agentforce agent, or Einstein bot starts. 2. **Session**–One or more messaging sessions occur within that conversation. Ending a session does not end the conversation. For example, clicking the **End Chat** button ends only the current session; it doesn’t end the conversation. See the [Enhanced Chat and Messaging Glossary](https://help.salesforce.com/s/articleView?id=service.miaw_glossary.htm) for precise definitions. 3. **Closing**–The messaging conversation is explicitly closed. When a conversation is closed, the status of the conversation changes to closed and no new messages can be sent. 4. **Persistence**–The conversation history is preserved, and the historical conversation data can be queried at any time for analysis using the [Conversation Query API](https://developer.salesforce.com/docs/service/messaging-in-app/guide/%3Chttps://salesforce-async-messaging.github.io/messaging-in-app-ios/documentation/smiclientcore/coreclient/conversations(withlimit:sortedbyactivitydirection:completion:)/>). ## Conversation IDs Each conversation has a unique, randomly-generated ID that persists for the conversation’s entire lifetime and links all messages and participants in that thread. The Enhanced In-App SDK uses these conversation IDs to track and manage message conversations throughout their entire lifecycle. A valid conversation ID must be: - A randomly-generated (version 4\) universally unique identifier (UUID v4). - Completely independent of business logic or customer data. - Used only for conversation tracking and management. Never substitute conversation IDs with customer IDs or any other business identifiers. ### Conversation ID Limitations Consider the following limitations with conversation IDs: - Conversation IDs can’t be moved from a staging org to a production org. - Conversation IDs can’t be transferred between verified and unverified users. - Conversation IDs created in an unverified session can’t be migrated to another device. - Conversation IDs are tied to user verification; if the local database or app is deleted, unverified conversations become inaccessible. ### Generate Conversation IDs The Enhanced In-App SDK can generate UUIDs automatically, or you can manually generate the IDs yourself: ``` // Generate a new UUID for conversation let conversationId = UUID() ``` Follow these guidelines when generating conversation IDs: - The conversation ID must be a randomly-generated (version 4\) universally unique identifier (UUID v4) - The conversation ID must be generated with the system’s UUID mechanism. - The conversation ID must be unique across all conversations. - The conversation ID must be stored and managed by your application. ## Manage Conversations ### Persist a Single Conversation To keep one ongoing conversation, you need: - A valid and unique conversation ID (UUID). - Proper initialization of the conversation object. - Persistent storage for the ID. - Logic to manage conversation state. ### Manage Multiple Conversations Use the [Conversation Query API](https://developer.salesforce.com/docs/service/messaging-in-app/guide/%3Chttps://salesforce-async-messaging.github.io/messaging-in-app-ios/documentation/smiclientcore/coreclient/conversations(withlimit:sortedbyactivitydirection:completion:)/>) to access and display multiple conversations. See Conversation Lists for more information. Follow these best practices when generating conversation IDs: - Store and retrieve conversation IDs systematically. - Use pagination for large result sets. - Implement retries and error handling. - Cache conversations when appropriate. - Prefer verified users for multi-conversation workflows. ### Recommended Approach Consider the following recommended approaches when managing conversations. **Developer manages conversation IDs** Follow best practices when managing conversation IDs. Some aspects to consider when managing conversation IDs include: - Generating and storing the unique conversation ID (UUID). - Persisting the conversation ID securely (e.g., Keychain / encrypted database). - Handling the conversation ID’s lifecycle. - Using verified conversations for anything beyond quick one-offs. **Developer leverages SDK queries** Use the Enhanced In-App SDK queries to take full advantage of your conversation data. For example, - Use the [Conversation Query API](https://developer.salesforce.com/docs/service/messaging-in-app/guide/%3Chttps://salesforce-async-messaging.github.io/messaging-in-app-ios/documentation/smiclientcore/coreclient/conversations(withlimit:sortedbyactivitydirection:completion:)/>) to look up existing conversations. - Implement robust error handling. - React to state changes (e.g., closed, archived). ## Implement Conversations Follow these implementation guidelines to create, close, and query conversations. ### Create a New Conversation To create a new conversation, build a configuration object and instantiate a [ConversationClient](https://salesforce-async-messaging.github.io/messaging-in-app-ios/documentation/smiclientcore/conversationclient) ([Core SDK](https://developer.salesforce.com/docs/service/messaging-in-app/guide/ios-core-sdk.html)), or create an Interface view ([UI SDK](https://developer.salesforce.com/docs/service/messaging-in-app/guide/ios-ui-sdk.html)). ### Close a Conversation To close a conversation, call the [closeConversation](https://developer.salesforce.com/docs/service/messaging-in-app/guide/%3Chttps://salesforce-async-messaging.github.io/messaging-in-app-ios/documentation/smiclientcore/conversationclient/closeconversation(completion:)>) method on the [ConversationClient](https://salesforce-async-messaging.github.io/messaging-in-app-ios/documentation/smiclientcore/conversationclient), or call the [closeConversation](https://developer.salesforce.com/docs/service/messaging-in-app/guide/%3Chttps://salesforce-async-messaging.github.io/messaging-in-app-ios/documentation/smiclientcore/coreclient/closeconversation(withidentifier:completion:)>) method on the [CoreClient](https://salesforce-async-messaging.github.io/messaging-in-app-ios/documentation/smiclientcore/coreclient). Using `ConversationClient`: ``` conversationClient.closeConversation(completion: { error in }) ``` Using `CoreClient`: ``` let conversationId = coreClient.closeConversation(identifier: conversationId, completion: { error in }) ``` ### Query a Conversation To query a conversation, refer to the [Conversation List](https://developer.salesforce.com/docs/service/messaging-in-app/guide/ios-conversation-lists.html) documentation for query examples and pagination details. # Manage Knowledge with REST APIs REST APIs provide programmatic access to many actions you can perform on your Knowledge base, an article, and its translations. # Manage Training with REST and Apex APIs To manage learning module assignments programmatically, you can use REST or Apex APIs with record objects. |Required Editions| |-----------------| |Workforce Engagement is available in Lightning Experience| |Available in: **Enterprise**, **Performance**, and **Unlimited** Editions| [Person Training](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_persontraining.htm) records represent learning assignments in Workforce Engagement. Assignments are Trailhead learning modules, which are [Learning Content](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_learningcontent.htm) records. ## REST API Examples These REST API examples list, create, update, and delete learning assignments in PersonTraining records. **List all learning assignments** ```nolang /services/data/v54.0/query?q=SELECT+Id+from+PersonTraining ``` **Create a learning assignment** ```nolang /services/data/v54.0/sobjects/PersonTraining { "Name": "Person Training 001", "TrainingId": "028af5d6-7e23-3cea-66e5-fd8e3bfe7e9c", "TrainingType": "T" } ``` **Update a learning assignment** In this example, 0hRSG00000000zJ2AQ is the ID of the Person Training record to update. ```nolang /services/data/v54.0/sobjects/PersonTraining/0hRSG00000000zJ2AQ { "Name": "Person Training Module 003" } ``` **Delete a learning assignment** In this example, 0hRSG00000000zJ2AQ is the ID of the Person Training record to delete. ```nolang /services/data/v54.0/sobjects/PersonTraining/0hRSG00000000zJ2AQ ``` ## Apex API Examples If you use Apex classes to look up learning modules programmatically, place a limit clause on the SOQL query, for example: ```nolang List aa = [SELECT ExternalId FROM LearningContent WHERE Title LIKE '%Accessibility%' LIMIT 5]; ``` These example Apex classes create, search, update, delete, and route learning assignments. **Create a learning assignment** ```nolang /* InsertPersonTraining.apex */ PersonTraining Test001 = new PersonTraining(); Test001.Name = 'Test001'; Test001.TrainingId = '028af5d6-7e23-3cea-66e5-fd8e3bfe7e9c'; Test001.TrainingType = 'T'; insert Test001; ``` **Search for a learning assignment** ```nolang /* SearchPersonTraining.apex */ PersonTraining training = [SELECT Name, ID FROM PersonTraining WHERE Name='Test001' LIMIT 1]; ``` **Update a learning assignment** ```nolang /* UpdatePersonTraining.apex */ PersonTraining training = [SELECT Name, Id FROM PersonTraining WHERE Name='newTest001' LIMIT 1]; // Update the training Name training.Name = 'newTest001'; update training; // Verify that the name was updated PersonTraining training02 = [SELECT Name, Id FROM PersonTraining WHERE Id=:training.Id]; ``` **Delete a learning assignment** ```nolang PersonTraining training = [SELECT Name, Id FROM PersonTraining WHERE Name='newTest001' LIMIT 1]; delete training; ``` **Route a learning assignment** ```nolang /* RoutePersonTraining.apex */ PendingServiceRouting routing = new PendingServiceRouting(); routing.CapacityWeight = 1; // To route correctly, PreferredUserId must be the same as AssigneeId. routing.preferredUserId = UserInfo.getUserId(); // Assign to current user for testing. routing.isPreferredUserRequired = true; routing.routingPriority = 1; routing.routingType = 'SkillsBased'; // set service channel ID routing.serviceChannelId = '0N9SG0000000CHJ'; // Hard-coded the service channel id routing.isReadyForRouting = true; // set workItemId to be person training ID routing.workItemId = '0hRSG000000009h2AA'; insert routing; ``` # Managed By Represents the Managed By relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. ## Relationship Type Definition ||| |-|-| |Developer Name|`SD_MaBy`| |Description|Defines the Managed By relationship between configuration items in the CMDB.| |Master Label|Managed By| |Direct Relationship|Managed By| |Inverse Relationship|Manages| |Line Stroke|Solid| |Color Code|`#993333`| # Management Controller Represents a Management Controller configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. ## Configuration Item Type Definition ||| |-|-| |Name|Management Controller| |Developer Name|`SD_MaCo`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Network Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-network-device.md)| |Rule Name|Default rule for all Azure Virtual Networks| |Identifier(s)|Asset Name Subscription Id Resource Group| ## Attributes No associated attributes for this configuration item type. # Manages Represents the Manages relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. ## Relationship Type Definition ||| |-|-| |Developer Name|`SD_Manxx`| |Description|Defines the Manages relationship between configuration items in the CMDB.| |Master Label|Manages| |Direct Relationship|Manages| |Inverse Relationship|Managed By| |Line Stroke|Solid| |Color Code|`#66ff33`| # Media Gateway Represents a Media Gateway configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Communication Infra. ## Configuration Item Type Definition ||| |-|-| |Name|Media Gateway| |Developer Name|`SD_MeGa`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Communication Infra](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-communication-infra.md)| |Rule Name|Default rule for all AWS Load Balancers| |Identifier(s)|Load Balancer ARN| ## Attributes No associated attributes for this configuration item type. # Members Represents the Members relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. ## Relationship Type Definition ||| |-|-| |Developer Name|`SD_Memxx`| |Description|Defines the Members relationship between configuration items in the CMDB.| |Master Label|Members| |Direct Relationship|Members| |Inverse Relationship|Member Of| |Line Stroke|Solid| |Color Code|`#9944BB`| # Memory Module Details Represents the Memory Module Details attribute set in the Configuration Management Database (CMDB). This attribute set groups related attributes for configuration items. ## Configuration Item Attribute Set Definition ||| |-|-| |Display Name|Memory Module Details| |Developer Name|`SD_MeMoDe`| |Master Label|Memory_Module_Details| ## Attributes ### Bank Locator - **Type**: text - **Developer Name**: `SD_BaLo` - **Description**: Describes the Bank Locator for configuration items. - **Required**: Optional ### Data width - **Type**: text - **Developer Name**: `SD_DaWi` - **Description**: Describes the Data width for configuration items. - **Required**: Optional ### Form Factor - **Type**: text - **Developer Name**: `SD_FoFa` - **Description**: Describes the Form Factor for configuration items. - **Required**: Optional ### Locator - **Type**: text - **Developer Name**: `SD_Lo` - **Description**: Describes the Locator for configuration items. - **Required**: Optional ### Memory manufacturer - **Type**: text - **Developer Name**: `SD_MeMa` - **Description**: Describes the Memory manufacturer for configuration items. - **Required**: Optional ### Memory Type - **Type**: text - **Developer Name**: `SD_MeTy` - **Description**: Describes the Memory Type for configuration items. - **Required**: Optional ### Part Number - **Type**: text - **Developer Name**: `SD_PaNu` - **Description**: Describes the Part Number for configuration items. - **Required**: Optional ### Size - **Type**: text - **Developer Name**: `SD_Si` - **Description**: Describes the Size for configuration items. - **Required**: Optional ### Total width - **Type**: text - **Developer Name**: `SD_ToWi` - **Description**: Describes the Total width for configuration items. - **Required**: Optional ### Type Detail - **Type**: text - **Developer Name**: `SD_TyDe` - **Description**: Describes the Type Detail for configuration items. - **Required**: Optional # Message Delivery Failed Interaction Notifies Salesforce when an inbound message interaction request fails. Whenever an inbound message interaction request fails, the response payload returns a `“success” : “false”` value. If the event is a [Message](https://developer.salesforce.com/docs/service/interaction-service-api/references/interaction-service-reference/interaction-type-message.md) or [FileAttachment](https://developer.salesforce.com/docs/service/interaction-service-api/references/interaction-service-reference/interaction-type-file-attachment.md) interaction, the response payload also includes an error code and message. If the event is a [TypingStartedIndicator](https://developer.salesforce.com/docs/service/interaction-service-api/references/interaction-service-reference/interaction-type-message-typing-started.md) or [TypingStoppedIndicator](https://developer.salesforce.com/docs/service/interaction-service-api/references/interaction-service-reference/interaction-type-message-typing-stopped.md) interaction, the response payload includes an ID. This API doesn’t process the failures. Instead, Salesforce tracks the failures, which you can ignore or use to send your own delivery failed notifications. This API applies to the following products: - Bring Your Own Channel for Contact Center as a Service - Bring Your Own Channel for Messaging This API is available in version 61.0 and later. ## URI `v1/interactions` ## HTTP Method POST ## Headers ### Authorization (User-Level Authentication) **Format:** `Bearer ` String. Standard header. Used to authenticate the user, where `` is the Salesforce access token used as the bearer token to make requests to the Interaction Service APIs. Required. ### Content-Type **Format:** `multipart/form-data` String. Standard header. Format of the request payload. Required for any request that includes a body. ### OrgId **Format:** `` String. Custom header. The Salesforce org. `` is the 15-character Org ID of the Salesforce org. Required. ### RequestId **Format:** `` String. Custom header. Universally Unique Identifier (``) that references and tracks this request. Required. ### AuthorizationContext **Format:** `` String. Custom header. Additional information for the request authorization used to authenticate and validate requests against the connected app scopes. - For Bring Your Own Channel for CCaaS, set `` to the developer name of the ConversationChannelDefinition record. For example, Partner1_ChannelDefinition1. Required. - For Bring Your Own Channel for Messaging, set `` to the developer name of the ConversationChannelDefinition record. For example, Partner1_ChannelDefinition1. Required. ### Sample Header ``` -H $'Authorization: Bearer 00DSG000009SWby!...LN8XxeRIxGe' \ -H "content-type: multipart/form-data" \ -H "OrgId: 00DSG000009SWby" \ -H "AuthorizationContext: Partner1_ChannelDefinition1" \ -H "RequestId: a1b23c45-c06a-4784-c96c-cb95d3321bda" \ ``` ## Parameters | Property Name | Type | Description | Required | | :---------------------------------------------------- | :------ | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------- | | to | string | The channel address identifier. This is the globally unique ID for the conversation channel (`MessagingChannel.ChannelAddressIdentifier`). | Yes | | from | string | The end user client identifier. This value comes from the partner system and can be up to 240 characters long. | Yes | | interactions | array | A list of interactions that are initiated by a messaging or voice rep or end user. | Yes | | interactions.timestamp | boolean | The date and time when the interaction was received by the Salesforce server. | Yes | | interactions.interactionType | string | The type of interaction. Possible values include:
- **EntryInteraction** to represent the type of interaction, such as an inbound message, a message sent failure, or a typing start or stop indicator.
- **AttachmentInteraction** to represent a file attachment that comes within the inbound messaging request. | Yes | | interactions.payload | array | The interaction payload. | Yes | | interactions.payload.id | string | The unique ID for the interaction. | Yes | | interaction.payload.entryType | string | The conversation entry type. Set this value to **MessageDeliveryFailed**. | Yes | | interaction.payload.failedConversationEntryIdentifier | string | The unique ID for the conversation entry that’s associated with the failed delivery. | Yes | | interaction.payload.recipient | object | A description of the recipient in the conversation. The `subject` represents the end user client identifier. The `role` represents the participant type and must be set to **EndUser**. The `appType` represents the type of app used by the conversation and must be set to **custom**. | Yes | | interaction.payload.errorCode | string | The Salesforce error code for the pre-defined error message that appears in the UI if the inbound message fails. If a custom error message (`errorMessage`) is specified, this error code is ignored. | Yes | | interaction.payload.errorMessage | string | The custom error message that appears in the UI if the inbound message fails. If a custom error message is specified, the Salesforce error code (`errorCode`) is ignored. | No | ## Example ### Request ```json { "to": "a12bc345-1303-44c2-866c-f30d546b58de", "from": "end-user-0001", "interactions": [{ "timestamp": 2542004100250, "interactionType": "EntryInteraction", "payload": { "id": "8432240c-81c7-492c-baf4-2e4cf0995610", "entryType": "MessageDeliveryFailed", "failedConversationEntryIdentifier": "8432240c-81c7-492c-baf4-2e4cf0995610", "recipient": { "subject": "end-user-0001", "role": "EndUser", "appType": "custom" }, "errorCode": "10001" } }] } ``` ```json { "to": "z12bc345-1303-44c2-866c-f30d546b58da", "from": "end-user-0001", "interactions": [{ "timestamp": 2542004100500, "interactionType": "EntryInteraction", "payload": { "id": "6752240c-81c7-492c-baf4-2e4cf0995659", "entryType": "MessageDeliveryFailed", "failedConversationEntryIdentifier": "6752240c-81c7-492c-baf4-2e4cf0995659", "recipient": { "subject": "end-user-0001", "role": "EndUser", "appType": "custom" }, "errorCode": "10001", "errorMessage": "Something went wrong on our side. Contact the IT department for help." } }] } ``` ## See Also - _GitHub_: [Interaction Service APIs](https://github.com/salesforce-misc/interaction-service-apis) - _GitHub:_ [Interaction Service API Error Codes](https://github.com/salesforce-misc/interaction-service-apis/blob/main/ERRORCODES.md) # Message Interaction Sends a `Message` interaction event from the client side to Salesforce when an end user sends a message. This API applies to the following products: - Bring Your Own Channel for Contact Center as a Service - Bring Your Own Channel for Messaging This API is available in version 61.0 and later. The Message interaction displays inbound messages in the Service Console. When an end user sends a message, call the Interactions API to notify Salesforce of the event. If a conversation corresponding to the passed-in conversation channel address identifier and end user client identifier exists, the interaction is associated with the conversation and the existing `conversationIdentifier` value is returned. If a conversation corresponding to the passed-in conversation channel address identifier and end user client identifier doesn’t exist, a conversation is created, a `MessagingSession` record is created, a `MessagingEndUser` record is created, and a new `conversationIdentifier` value is returned. A `workItemId` value is also returned. The `workItemId` represents the ID of the new or existing MessagingSession record that's associated with the conversation. For Bring You Own Channel for CCaaS, message routing is handled based on how it's configured: - If message routing is Salesforce-owned and routing is Omni-Flow based (Routing Type is Omni-Flow), the specified Omni-Channel flow definition is used to route inbound messages and file attachments to the next available rep or queue. If routing fails, Salesforce uses the specified fallback queue. - If message routing is Salesforce-owned and routing is queue-based (Routing Type is Omni-Queue), the specified queue is used to route inbound messages and file attachments. - If message routing is handled by the partner system, subscribe to the Pub/Sub API to listen to the `routingRequested` event. The rep accepts the inbound messaging call and returns an outbound message to the end user. ## URI `v1/interactions` ## HTTP Method POST ## Headers ### Authorization (User-Level Authentication) **Format:** `Bearer ` String. Standard header. Used to authenticate the user, where `` is the Salesforce access token used as the bearer token to make requests to the Interaction Service APIs. Required. ### Content-Type **Format:** `multipart/form-data` String. Standard header. Format of the request payload. Required for any request that includes a body. ### OrgId **Format:** `` String. Custom header. The Salesforce org. `` is the 15-character Org ID of the Salesforce org. Required. ### RequestId **Format:** `` String. Custom header. Universally Unique Identifier (``) that references and tracks this request. Required. ### AuthorizationContext **Format:** `` String. Custom header. Additional information for the request authorization used to authenticate and validate requests against the connected app scopes. - For Bring Your Own Channel for CCaaS, set `` to the developer name of the ConversationChannelDefinition record. For example, Partner1_ChannelDefinition1. Required. - For Bring Your Own Channel for Messaging, set `` to the developer name of the ConversationChannelDefinition record. For example, Partner1_ChannelDefinition1. Required. ### Sample Header ``` -H $'Authorization: Bearer 00DSG000009SWby!...LN8XxeRIxGe' \ -H "content-type: multipart/form-data" \ -H "OrgId: 00DSG000009SWby" \ -H "AuthorizationContext: Partner1_ChannelDefinition1" \ -H "RequestId: a1b23c45-c06a-4784-c96c-cb95d3321bda" \ ``` ## Parameters | Property Name | Type | Description | Required | | :---------------------------------- | :------ | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------- | | to | string | The channel address identifier. This is the globally unique ID for the conversation channel (`MessagingChannel.ChannelAddressIdentifier`). | Yes | | from | string | The end user client identifier. This value comes from the partner system and can be up to 240 characters long. | Yes | | interactions | array | A list of interactions that are initiated by a messaging or voice rep or end user. | Yes | | interactions.timestamp | boolean | The date and time when the interaction was received by the Salesforce server. | Yes | | interactions.interactionType | string | The type of interaction. Possible values include:
- **EntryInteraction** to represent the type of interaction, such as an inbound message, a message sent failure, or a typing start or stop indicator.
- **AttachmentInteraction** to represent a file attachment that comes within the inbound messaging request. | Yes | | interactions.payload | array | The interaction payload. | Yes | | interactions.payload.id | string | The unique ID for the interaction. | Yes | | interaction.payload.entryType | string | The conversation entry type. Set this value to **Message**. | Yes | | interaction.payload.abstractMessage | object | The message details. This object only applies if entryType is set to **Message**. Set `messageType` to **StaticContentMessage**. The `id` represents the unique ID for the interaction and must match the `interactions.payload.id` value in this payload. Set `staticContent.formatType` to **Text**, which represents the type of value to be formatted. The `staticContent.text` value represents the content of the message. | Yes | | routingAttributes | object | An optional object containing custom data to use for routing the conversation. This data helps Salesforce direct the conversation to the most appropriate rep or queue. How you use this parameter depends on your channel type.
For Bring Your Own Channel for Messaging:
- If you [add support for custom parameters](/docs/service/messaging-partner/guide/add-custom-objects.html) and the messaging end user sends the first message, set `routingAttributes` to a `key-value` pair, where `key` is set to the channel variable name in the parameter mapping, and `value` is set to the value of the custom parameter in Salesforce. This creates a direct map between a variable in your channel and a field in Salesforce. The value length must be less than or equal to the Maximum Length that the Salesforce admin set for the custom parameter in Messaging Settings.
- If your implementation uses proactive messaging where an AI agent sends the first message, set `routingAttributes` in the [`/conversation` API](https://developer.salesforce.com/docs/service/interaction-service-api/references/interaction-service-reference/api-conversation.md).
If conversation routing is partner-owned for Bring Your Own Channel for CCaaS and you add support for custom parameters, use the [`/route` API](https://developer.salesforce.com/docs/service/interaction-service-api/references/interaction-service-reference/api-route.md) to configure the routing attributes instead. | No | ## Example ### Request ```json { "to": "a12bc345-1303-44c2-866c-f30d546b58de", "from": "end-user-0001", "routingAttributes": { "input_OrderNumber" : "SAR21jac17emi14" }, "interactions": [{ "timestamp": 2542004100250, "interactionType": "EntryInteraction", "payload": { "id": "8432240c-81c7-492c-baf4-2e4cf0995610", "entryType": "Message", "abstractMessage": { "messageType": "StaticContentMessage", "id": "8432240c-81c7-492c-baf4-2e4cf0995610", "staticContent": { "formatType": "Text", "text": "Hello." } } } }] } ``` ## See Also - _GitHub:_ [Interaction Service APIs](https://github.com/salesforce-misc/interaction-service-apis) - [Pub\/Sub API](https://developer.salesforce.com/docs/platform/pub-sub-api/overview) - _Bring Your Own Channel for CCaaS:_ [Add Support for Custom Objects](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/add-custom-objects) # Message Types and Message Format Types For more information on Message Types and Message Format Types, see [Message Types and Message Format Types](https://developer.salesforce.com/docs/service/messaging-api/references/about/message-types-format-types.html). # Message Types and Message Format Types Message types and message format types are referred by the [List Conversation Entries](/docs/service/messaging-api/references/miaw-api-reference?meta=listConversationEntries) and [Server-Sent Events Structure](https://developer.salesforce.com/docs/service/messaging-api/references/about/server-sent-events-structure.md) sections. ## Message Types | Message Type (messageType) | Description | | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | StaticContentMessage | A message containing static content. No specific response is expected. For a sample payload, see StaticContentMessage. | | ChoicesMessage | A message with some choices from which the recipient can choose. A response of type ChoicesResponse is expected but not required. This API doesn't cause CRM changes, such as creating and updating records, but sometimes results in conversation routing in bots. For a sample payload, see ChoicesMessage. | | ChoicesResponseMessage | A message with the selected choices as a response to a Choices message. For a sample payload, see ChoicesResponseMessage. | | FormMessage | A message with a form containing multiple single or multiselect choices that a recipient can choose from. A response of type FormResponse is expected but not required. For a sample payload, see FormMessage. | | FormResponseMessage | A message with the form selection as a response to a Form message. The message results in a record being created or updated in the CRM database. For a sample payload, see FormResponseMessage. | ## Format Types Each message type supports specific format types, and each format type determines the shape of the payload. For example, messageType StaticContentMessage supports formatType Text, RichLink, Attachments, ExternalAttachments, and WebView, If, say, messageType is StaticContentMessage and formatType is Text, the payload includes the details of the message in plain text: ```json "messageType": "StaticContentMessage", "staticContent": { "formatType": "Text", "text": "hi" } ``` This table lists all message types and their possible format types. | Message Type (messageType) | Format Type (formatType) | | Description | |--------------------------------|------------------------------|------------------|-------------------------------------------------------------------------------------------------------------------------------------------| | StaticContentMessage | Text | Send and receive | Plain text. For a sample payload, see StaticContentMessage. | | StaticContentMessage | RichLink | Receive | A rich link containing an inline image or video. For a sample payload, see StaticContentMessage. | | StaticContentMessage | Attachments | Receive | Attachments stored in the CRM. Sent with MT messages. Can have optional text. For a sample payload, see StaticContentMessage. | | StaticContentMessage | ExternalAttachments | Send | External attachments not stored in the CRM. Sent with MO messages. Can have optional text. For a sample payload, see StaticContentMessage. | | StaticContentMessage | WebView | Receive | Web page sent. For a sample payload, see StaticContentMessage. | | ChoicesMessage | Buttons | Receive | A text with buttons with a title. The buttons can be postbacks. For a sample payload, see ChoicesMessage. | | ChoicesMessage | QuickReplies | Receive | An optional text with buttons that has titles and/or images. All buttons are postbacks. For a sample payload, see ChoicesMessage. | | ChoicesMessage | Carousel | Receive | A set of items that can include images, text, and buttons. The buttons can be postbacks. For a sample payload, see ChoicesMessage. | | ChoicesResponseMessage | Selections | Send | Selections of options from choices or forms. Always set for choice and form response. For a sample payload, see ChoicesResponseMessage. | | FormMessage | Inputs | Receive | Sends a form from the rep side. For a sample payload, see FormMessage. | | FormResponseMessage | Result | Send | The end user’s responses to the form sent from the rep. For a sample payload, see FormResponseMessage. | # Messaging Conversation Window Header Events These are the available actions in the messaging conversation window header. ```javascript /** * Event name for notifying the Embedded Messaging application about * a header's back button click. * @type {string} */ MESSAGING_EVENT.BACK_BUTTON_CLICK /** * Event name for minimizing the conversation client. * @type {string} */ MESSAGING_EVENT.MINIMIZE_BUTTON_CLICK /** * Event name for closing the conversation. * @type {string} */ MESSAGING_EVENT.CLOSE_CONVERSATION /** * Event name for closing the container. * @type {String} */ MESSAGING_EVENT.CLOSE_CONTAINER /** * Event name for toggling the display of the back button in the header. * @type {string} */ MESSAGING_EVENT.TOGGLE_BACK_BUTTON /** * Event name for notifying the Embedded Messaging application that a * menu item has been selected from the header menu. * @type {string} */ MESSAGING_EVENT.MENU_ITEM_SELECTED /** * Event name for indicating that a participant joined. * @type {string} */ MESSAGING_EVENT.PARTICIPANT_JOINED /** * Event name for indicating that a participant left. * @type {string} */ MESSAGING_EVENT.PARTICIPANT_LEFT /** * Event name for indicating an update to the header text. * @type {string} */ MESSAGING_EVENT.UPDATE_HEADER_TEXT /** * Event name for notifying the Embedded Messaging application that the * request transcript has been selected from the header menu. */ MESSAGING_EVENT.REQUEST_TRANSCRIPT /** * Event name for indicating that the transfer request is successfully initiated. * @type {string} */ MESSAGING_EVENT.TRANSFER_INITIATED /** * Event name for indicating that the transfer request failed or was canceled. * @type {string} */ MESSAGING_EVENT.TRANSFER_TERMINATED /** * Event name for indicating that the transfer request is successfully resolved. * @type {string} */ MESSAGING_EVENT.TRANSFER_COMPLETED /** * Event name for indicating that a reconnection event is in progress. * @type {string} */ MESSAGING_EVENT.RECONNECT_IN_PROGRESS /** * Event name for indicating that a reconnection event ended. * @type {string} */ MESSAGING_EVENT.RECONNECT_ENDED /** * Event name for notifying the Embedded Messaging application when the initial SSE ping was missed. * @type {string} */ MESSAGING_EVENT.SSE_INITIAL_PING_TIMEOUT /** * Event name for notifying the Embedded Messaging application when the SSE ping at regular intervals was missed. * @type {string} */ MESSAGING_EVENT.SSE_PING_TIMEOUT /** * Event name for shifting focus to the first focusable element in the chat header when navigating with the tab key. * @type {string} */ MESSAGING_EVENT.TAB_FOCUS_ON_FIRST_FOCUSABLE_ELEMENT ``` # Messaging Object Model Salesforce Enhanced Messaging lets your customers interact with your business across a variety of channels, including web, mobile, and third-party messaging apps. This document provides an overview of the data model used to store information about Messaging conversations, participants, and message content. This guide explains how your Messaging data is structured and shows you how to work with it effectively across Salesforce tools and integrations. ![Messaging object model](https://developer.salesforce.com/docs/media/messaging-object-model/messaging_object_model_enhanced_messaging.png) ## Understanding Each Messaging Object ### Messaging Session **Storage Location:** On Platform **Schema:** [MessagingSession Standard Object](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_messagingsession.htm) A session with a messaging end user that occurs on a Messaging channel. Manage messaging sessions on the Messaging Sessions tab or related list. ### Messaging Channel **Storage Location:** On Platform **Schema:** [MessagingChannel Standard Object](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_messagingchannel.htm) **Description:** **Description:** A Messaging Channel represents a communication channel that an end user can use to send a message to an agent. A communication channel can be an SMS number, a Facebook page, or another supported messaging channel. ### Messaging Session Metrics **Storage Location:** On Platform **Schema:** [MessaginSessionMetrics Standard Object](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_messagingsessionmetrics.htm) **Description:** Tracks KPIs for enhanced Messaging Sessions, such as average response time and message counts for agents and end users. This object is frequently used in reporting to measure agent responsiveness and engagement. To learn more, see [Track Your KPIs with More Messaging Session Metrics](https://help.salesforce.com/s/articleView?id=release-notes.rn_messaging_session_metrics.htm&release=252&type=5) ### Conversation **Storage Location:** On Platform **Schema:** [Conversation Standard Object](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_conversation.htm) **Description:** A conversation is a collection of one or more messaging sessions or voice calls involving a specific messaging user and messaging channel. Despite Conversations being stored on platform, they are not available in standard Salesforce reports. For the most part, messaging admins and developers work with the MessagingSession object rather than the Conversation object. ### Conversation Entry **Storage Location:** Off Platform **Schema Link(s):** [ConversationEntry Schema](/docs/service/messaging-object-model/references/messaging-object-model-conversationEntry/messaging-object-model-conversationentry.html) **Description:** A conversation entry represents a message or an event in the messaging history between an agent or bot and an end user. ### Messaging End User (MEU) **Storage Location:** On Platform **Schema:** [MessagingEndUser Standard Object](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_messagingenduser.htm) **Description:** A single address, such as a phone number or Facebook page, communicating with a single Messaging channel. A customer has an MEU record for each channel that they communicate in. Manage MEUs on the Messaging Users tab or related list. ### Participant **Storage Location:** On Platform **Schema:** [Participant Standard Object](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_participant.htm) **Description:** A Participant represents a unique user or bot that engages in messaging conversations. A Participant may take part in multiple conversations over time and is used to track identity across those interactions. For the most part, messaging admins and developers work with the MessagingEndUser object rather than the Participant object. ### Conversation Participant **Storage Location:** On Platform **Schema:** [ConversationParticipant Standard Object](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_conversationparticipant.htm) **Description:** A Conversation Participant represents a specific instance of a Participant in a given conversation. It captures details like when the participant joined or left the conversation, and other metadata related to their involvement in that session. For the most part, messaging admins and developers work with the MessagingEndUser object rather than the ConversationParticipant object. ### Related Record **Storage Location:** Off Platform **Schema:** RelatedRecord Schema **Description:** The RelatedRecord object links a ConversationEntry to another record, such as another ConversationEntry, a VoiceCall, or a MessagingSession. While primarily used internally by Salesforce to support conversation flows, this object may be visible if you sync your conversation data with Data Cloud. ## What are On-Platform and Off-Platform Messaging Objects? The Messaging Object Model diagram includes icons indicating whether each object is stored on platform or off platform. Objects that are stored on platform are part of the standard Salesforce platform, just like other objects you work with in your Salesforce org. Objects that are stored off platform live in a separate, purpose-built database designed to support the scale and performance demands of real-time messaging. How you access conversation data depends on whether the data is stored in objects that are on platform or off platform. ### See Also - [On-Platform vs. Off-Platform Messaging Objects](https://developer.salesforce.com/docs/service/messaging-object-model/guide/messaging-object-model-on-off-platform.md) - [Access Conversation Data](https://developer.salesforce.com/docs/service/messaging-object-model/guide/messaging-object-model-access-data.md) - [_Object Reference for the Salesforce Platform_](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_concepts.htm) # Messaging Object Model and Data Access Release Notes This section describes recent changes that have been made to this guide. ## Updates for Winter ‘26 - Added the following topics to the [Access Conversation Data](https://developer.salesforce.com/docs/service/messaging-object-model/guide/messaging-object-model-access-data.md) page: - Limitations of using APIs for conversation data access. - Differences between the `GET /conversation-entries` Conversation Data API endpoint and the Connect REST API. - Restructured the [ConversationEntry](https://developer.salesforce.com/docs/service/messaging-object-model/references/messaging-object-model-conversationEntry/messaging-object-model-conversationentry.html) schema page. ## Updates for Summer ‘25 - Updated the [Messaging Object Model](https://developer.salesforce.com/docs/service/messaging-object-model/guide/messaging-object-model.md) diagram and object descriptions to support Enhanced Messaging. - Added a topic describing the differences between [On-Platform and Off-Platform Messaging Objects](https://developer.salesforce.com/docs/service/messaging-object-model/guide/messaging-object-model-on-off-platform.md). - Added a topic on how to [Access On-Platform and Off-Platform Conversation Data](https://developer.salesforce.com/docs/service/messaging-object-model/guide/messaging-object-model-access-data.md). - Added a Reference section, along with the following new topics: - A topic describing the Off-Platform Messaging Objects - The [ConversationEntry Schema (Off Platform)](/docs/service/messaging-object-model/references/messaging-object-model-conversationEntry/messaging-object-model-conversationentry.html). - The [RelatedRecord Schema (Off Platform)](https://developer.salesforce.com/docs/service/messaging-object-model/references/mob-reference2/messaging-object-model-relatedrecord.html). # Method Parity Between Open CTI for Salesforce Classic and Lightning Experience The methods provided in the two APIs aren’t always the same. Some Salesforce Classic methods aren’t available in Lightning Experience and some have been renamed. |Salesforce Classic Method|Available in Lightning Experience?|Notes About Support in Lightning Experience|Go to Salesforce Classic API|Go to Lightning Experience API| |---------------------------|:----------------------------------:|---------------------------------------------|------------------------------|--------------------------------| |`disableClickToDial()`|![Checkmark icon](https://developer.salesforce.com/docs/media/checkmark_16x16.png)|Uses the same method name in Open CTI for Lightning.|[Link](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-disableclicktodial.md)|[Link](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-disableclicktodial-lex.md)| |`enableClickToDial()`|![Checkmark icon](https://developer.salesforce.com/docs/media/checkmark_16x16.png)|Uses the same method name in Open CTI for Lightning.|[Link](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-enableclicktodial.md)|[Link](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-enableclicktodial-lex.md)| |`getCallCenterSettings()`|![Checkmark icon](https://developer.salesforce.com/docs/media/checkmark_16x16.png)|Uses the same method name in Open CTI for Lightning.|[Link](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-getcallcentersettings.md)|[Link](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-getcallcentersettings-lex.md)| |`getDirectoryNumbers()`|![Checkmark icon](https://developer.salesforce.com/docs/media/redX.png)|Not yet supported.|[Link](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-getdirectorynumbers.md)|N/A| |`getPageInfo()`|![Checkmark icon](https://developer.salesforce.com/docs/media/checkmark_16x16.png)|The same functionality is provided in the Open CTI for Lightning method `getAppViewInfo`.|[Link](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-getpageinfo.md)|[Link](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-getappviewinfo-lex.md)| |`getSoftphoneLayout()`|![Checkmark icon](https://developer.salesforce.com/docs/media/checkmark_16x16.png)|Uses the same method name in Open CTI for Lightning.|[Link](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-getsoftphonelayout.md)|[Link](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-getsoftphonelayout-lex.md)| |`isInConsole()`|![Checkmark icon](https://developer.salesforce.com/docs/media/redX.png)|Not yet supported.|[Link](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-isinconsole.md)|N/A| |`isVisible()`|![Checkmark icon](https://developer.salesforce.com/docs/media/checkmark_16x16.png)|The same functionality is provided in the Open CTI for Lightning `isSoftphonePanelVisible`.|[Link](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-isvisible.md)|[Link](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-issoftphonepanelvisible-lex.md)| |`notifyInitializationComplete()`|![Checkmark icon](https://developer.salesforce.com/docs/media/checkmark_16x16.png)|Uses the same method name in Open CTI for Lightning.|[Link](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-notifyinitializationcomplete.md)|[Link](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-notifyinitializationcomplete-lex.md)| |`onClickToDial()`|![Checkmark icon](https://developer.salesforce.com/docs/media/checkmark_16x16.png)|Uses the same method name in Open CTI for Lightning.|[Link](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-onclicktodial.md)|[Link](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-onclicktodial-lex.md)| |`onFocus()`|![Checkmark icon](https://developer.salesforce.com/docs/media/checkmark_16x16.png)|The same functionality is provided in the Open CTI for Lightning method `onNavigationChange`.|[Link](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-onfocus.md)|[Link](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-onnavigationchange-lex.md)| |`refreshPage()`|![Checkmark icon](https://developer.salesforce.com/docs/media/checkmark_16x16.png)|The same functionality is provided in the Open CTI for Lightning method `refreshView`.|[Link](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-refreshpage.md)|[Link](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-refreshview-lex.md)| |`refreshRelatedList()`|![Checkmark icon](https://developer.salesforce.com/docs/media/checkmark_16x16.png)|The same functionality is provided in the Open CTI for Lightning method `refreshView`.|[Link](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-refreshrelatedlist.md)|[Link](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-refreshview-lex.md)| |`reloadFrame()`|![Checkmark icon](https://developer.salesforce.com/docs/media/checkmark_16x16.png)|The same functionality is provided in the Open CTI for Lightning method `refreshView`.|[Link](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-reloadframe.md)|[Link](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-refreshview-lex.md)| |`runApex()`|![Checkmark icon](https://developer.salesforce.com/docs/media/checkmark_16x16.png)|Uses the same method name in Open CTI for Lightning.|[Link](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-runapex.md)|[Link](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-runapex-lex.md)| |`saveLog()`|![Checkmark icon](https://developer.salesforce.com/docs/media/checkmark_16x16.png)|Uses the same method name in Open CTI for Lightning.|[Link](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-savelog.md)|[Link](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-savelog-lex.md)| |`screenPop()`|![Checkmark icon](https://developer.salesforce.com/docs/media/checkmark_16x16.png)|Uses the same method name in Open CTI for Lightning.|[Link](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-screenpop.md)|[Link](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-screenpop-lex.md)| |`searchAndGetScreenPopUrl()`|![Checkmark icon](https://developer.salesforce.com/docs/media/redX.png)|To recreate this functionality, use `searchAndScreenPop` in Open CTI for Lightning|[Link](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-searchandgetscreenpopurl.md)|[Link](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-searchandscreenpop-lex.md)| |`searchAndScreenPop()`|![Checkmark icon](https://developer.salesforce.com/docs/media/checkmark_16x16.png)|Uses the same method name in Open CTI for Lightning.|[Link](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-searchandscreenpop.md)|[Link](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-searchandscreenpop-lex.md)| |`setSoftphoneHeight()`|![Checkmark icon](https://developer.salesforce.com/docs/media/checkmark_16x16.png)|The same functionality is provided in the Open CTI for Lightning method `setSoftphonePanelHeight`.|[Link](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-setsoftphoneheight.md)|[Link](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-setsoftphonepanelheight-lex.md)| |`setSoftphoneWidth()`|![Checkmark icon](https://developer.salesforce.com/docs/media/checkmark_16x16.png)|The same functionality is provided in the Open CTI for Lightning method `setSoftphonePanelWidth`.|[Link](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-setsoftphonewidth.md)|[Link](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-setsoftphonepanelwidth-lex.md)| |`setVisible()`|![Checkmark icon](https://developer.salesforce.com/docs/media/checkmark_16x16.png)|The same functionality is provided in the Open CTI for Lightning method `setSoftphonePanelVisibility`.|[Link](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-setvisible.md)|[Link](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-setsoftphonepanelvisibility-lex.md)| # Methods for Application-Level Custom Console Components Custom console components let you customize, extend, or integrate the footer, sidebars, highlights panels, and interaction logs of a Salesforce console using Visualforce, canvas apps, lookup fields, or related lists. Administrators can add components to either: - Page layouts to display content on specific pages - Salesforce console apps to display content across all pages and tabs - **[addToBrowserTitleQueue()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-addtobrowsertitlequeue.md)** Adds a browser tab title to a list of titles, which rotates every three seconds. This method is only available in API version 28.0 or later. - **[blinkCustomConsoleComponentButtonText()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-blinkcustomconsolecomponentbuttontext.md)** Blinks a button’s text on an application-level custom console component that’s on a page. This method is only available in API version 25.0 or later. This method isn’t supported in Lightning Console. - **[isCustomConsoleComponentPoppedOut()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-iscustomconsolecomponentpoppedout.md)** Determines if a custom console component is popped out from a browser. To use this method, multi-monitor components must be turned on. This method is only available in API version 30.0 or later. - **[isCustomConsoleComponentWindowHidden()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-iscustomconsolecomponentwindowhidden.md)** Determines if the application-level custom console component window is hidden. This method is available in API versions 25.0 through 31.0. - **[isCustomConsoleComponentHidden()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-iscustomconsolecomponenthidden.md)** Determines if the application-level custom console component window is hidden. This method is available in API version 32.0 and later. In API version 31.0 and earlier, this method was called `isCustomConsoleComponentWindowHidden()`. - **[isInCustomConsoleComponent()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-isincustomconsolecomponent.md)** Determines if the page is in an application-level custom console component. This method is only available in API version 25.0 or later. - **[onCustomConsoleComponentButtonClicked()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-oncustomconsolecomponentbuttonclicked.md)** Registers a function to call when a button is clicked on an application-level custom console component. This method is only available in API version 25.0 or later. - **[removeFromBrowserTitleQueue()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-removefrombrowsertitlequeue.md)** Removes a browser tab title from the list of titles, which rotates every three seconds. This method is only available in API version 28.0 or later. - **[runSelectedMacro()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-runselectedmacro.md)** Executes the selected macro in the macro widget. This method is only available in API version 36.0 or later. This method isn’t supported in Lightning Console. - **[scrollCustomConsoleComponentButtonText()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-scrollcustomconsolecomponentbuttontext.md)** Scrolls a button’s text on an application-level custom console component that’s on a page. This method is only available in API version 25.0 or later. This method isn’t supported in Lightning Console. - **[selectMacro()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-selectmacro.md)** Selects and displays a specific macro in the macro widget. This method is only available in API version 36.0 or later. This method isn’t supported in Lightning Console. - **[setCustomConsoleComponentButtonIconUrl()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-setcustomconsolecomponentbuttoniconurl.md)** Sets the button icon URL of an application-level custom console component that’s on a page. This method is only available in API version 25.0 or later. - **[setCustomConsoleComponentButtonStyle()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-setcustomconsolecomponentbuttonstyle.md)** Sets the style of a button used to launch an application-level custom console component that’s on a page. This method is only available in API version 25.0 or later. This method isn’t supported in Lightning Console. - **[setCustomConsoleComponentButtonText()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-setcustomconsolecomponentbuttontext.md)** Sets the text on a button used to launch an application-level custom console component that’s on a page. This method is only available in API version 25.0 or later. - **[setCustomConsoleComponentHeight()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-setcustomconsolecomponentheight.md)** Sets the window height of an application-level custom console component that’s on a page. This method is available in API version 32.0 or later. - **[setCustomConsoleComponentVisible()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-setcustomconsolecomponentvisible.md)** Sets the window visibility of an application-level custom console component that’s on a page. This method is available in API version 32.0 and later. In API version 31.0 and earlier, this method was called `setCustomConsoleComponentWindowVisible()`. - **[setCustomConsoleComponentWidth()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-setcustomconsolecomponentwidth.md)** Sets the window width of an application-level custom console component that’s on a page. This method is available in API version 32.0 or later. - **[setCustomConsoleComponentPopoutable()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-setcustomconsolecomponentpopoutable.md)** Sets a custom console component to be popped out or popped into a browser. To use this method, multi-monitor components must be turned on. This method is only available in API version 30.0 or later. - **[setCustomConsoleComponentWindowVisible()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-setcustomconsolecomponentwindowvisible.md)** Sets the window visibility of an application-level custom console component that’s on a page. This method is available in API versions 25.0 through 31.0. This method isn’t supported in Lightning Console. - **[setSidebarVisible()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-setsidebarvisible.md)** Shows or hides a console sidebar based on `tabId` and region. This method is available in API version 33.0 or later. This method isn’t supported in Lightning Console. # Methods for Chat Connect with customers or website visitors in real time through Web-based chat. **note:** These methods in Salesforce Classic don’t work for chats routed with Omni-Channel. Chats with Omni-Channel routing use the [Methods for Omni-Channel](https://developer.salesforce.com/docs/atlas.en-us.api_console.meta/api_console/sforce_api_console_omnichannel_methods.htm). If you’re using Lightning Experience, use the [Methods for Omni-Channel in Lightning Experience](https://developer.salesforce.com/docs/atlas.en-us.api_console.meta/api_console/sforce_api_console_methods_lightning_omniToolkitAPI.htm). **important:** The legacy chat product is in maintenance-only mode, and we won't continue to build new features. You can continue to use it, but we no longer recommend that you implement new chat channels. Instead, you can modernize your customer communication with [Messaging for In-App and Web](https://help.salesforce.com/s/articleView?id=service.miaw_intro_landing.htm&type=5). Messaging offers many of the [chat features that you](https://help.salesforce.com/s/articleView?id=service.miaw_chat_vs_messaging.htm&type=5) love plus asynchronous conversations that can be picked back up at any time. - **[acceptChat()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-acceptchat.md)** Accepts a chat request. Available in API version 29.0 or later. This method isn't supported with Omni-Channel in API version 37.0 or later. - **[cancelFileTransferByAgent()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-cancelfiletransferbyagent.md)** Indicates that a file transfer request has been canceled by an agent. Available in API version 31.0 or later. - **[declineChat()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-declinechat.md)** Declines a chat request. Available in API version 29.0 or later. This method isn't supported with Omni-Channel in API version 37.0 or later. - **[endChat()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-endchat.md)** Ends a chat in which an agent is currently engaged. Available in API version 29.0 or later. - **[getAgentInput()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-getagentinput.md)** Returns the string of text which is currently in the agent’s text input area in the chat log of a chat with a specific chat key. Available in API version 29.0 or later. - **[getAgentState()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-getagentstate.md)** Returns the agent's current Chat status, such as Online, Away, or Offline. Available in API version 29.0 or later. - **[getChatLog()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-getchatlog.md)** Returns the chat log of a chat associated with a specific chat key. Available in API version 29.0 or later. - **[getChatRequests()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-getchatrequests.md)** Returns the chat keys of the chat requests that have been assigned to an agent. Available in API version 29.0 or later. - **[getDetailsByChatKey()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-getdetailsbychatkey.md)** Returns the details of the chat associated with a specific chat key. Available in API version 29.0 or later. - **[getDetailsByPrimaryTabId()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-getdetailsbyprimarytabid.md)** Returns the details of the chat associated with a specific primary tab ID. Available in API version 29.0 or later. - **[getEngagedChats()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-getengagedchats.md)** Returns the chat keys of the chats in which the agent is currently engaged. Available in API version 29.0 or later. - **[getMaxCapacity()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-getmaxcapacity.md)** Returns the maximum chat capacity for the current agent, as specified in the agent's assigned agent configuration. Available in API version 29.0 or later. - **[initFileTransfer()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-initfiletransfer.md)** Initiates the process of transferring a file from a customer to an agent. Available in API version 31.0 or later. - **[onAgentSend()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-onagentsend.md)** Registers a function to call when an agent sends a chat message through the Salesforce console. This method intercepts the message and occurs before it is sent to the chat visitor. Available in API version 29.0 or later. - **[onAgentStateChanged()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-onagentstatechanged.md)** Registers a function to call when agents change their Chat status, such as from Online to Away. Available in API version 29.0 or later. - **[onChatCanceled()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-onchatcanceled.md)** Registers a function to call when a chat visitor cancels a chat request. Available in API version 29.0 or later. - **[onChatCriticalWaitState()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-onchatcriticalwaitstate.md)** Registers a function to call when a chat becomes critical to answer or a waiting chat is answered. Available in API version 29.0 or later. - **[onChatDeclined()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-onchatdeclined.md)** Registers a function to call when an agent declines a chat request. Available in API version 29.0 or later. - **[onChatEnded()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-onchatended.md)** Registers a function to call when an engaged chat ends. Available in API version 29.0 or later. - **[onChatRequested()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-onchatrequested.md)** Registers a function to call when an agent receives a chat request. Available in API version 29.0 or later. - **[onChatStarted()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-onchatstarted.md)** Registers a function to call when an agent starts a new chat with a customer. Available in API version 29.0 or later. - **[onChatTransferredOut()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-onchattransferredout.md)** Registers a function to call when an engaged chat is transferred out to another agent. Available in API version 29.0 or later. - **[onCurrentCapacityChanged()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-oncurrentcapacitychanged.md)** Registers a function to call when an agent's capacity for accepting chats changes—for example, if an agent accepts a new chat, ends a currently engaged chat, or otherwise changes the number of chats to which they are assigned, or if a chat request is pushed to their chat queue. Available in API version 29.0 or later. - **[onCustomEvent()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-oncustomevent.md)** Registers a function to call when a custom event takes place during a chat. Available in API version 29.0 or later. - **[onFileTransferCompleted()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-onfiletransfercompleted.md)** Registers a function to call when a file is transferred from a customer to an agent. Available in API version 31.0 or later. - **[onNewMessage()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-onnewmessage.md)** Registers a function to call when a new message is sent from a customer, agent, or supervisor. Available in API version 29.0 or later. - **[onTypingUpdate()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-ontypingupdate.md)** Registers a function to call when the customer’s text in the chat window changes. If Sneak Peek is enabled, this function is called whenever the customer edits the text in the chat window. If Sneak Peek is not enabled, this function is called whenever a customer starts or stops typing in the chat window. Available in API version 29.0 or later. - **[sendCustomEvent()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-sendcustomevent.md)** Sends a custom event to the client-side chat window for a chat with a specific chat key. Available in API version 29.0 or later. - **[sendMessage()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-sendmessage.md)** Sends a new chat message from the agent to a chat with a specific chat key. Available in API version 29.0 or later. - **[setAgentInput()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-setagentinput.md)** Sets the string of text in the agent’s text input area in the chat log of a chat with a specific chat key.Available in API version 29.0 or later. - **[setAgentState()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-setagentstate.md)** Sets an agent's Chat status, such as Online, Away, or Offline. Available in API version 29.0 or later. - **[Methods for Chat Visitors](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-live-agent-methods-chasitor.md)** There are a few methods available that you can use to customize the visitor experience for Chat in a custom Visualforce chat window. These methods apply to Salesforce Classic only. # Methods for Chat in Lightning Experience Let customers chat with your agents on your web page. Connect with customers or website visitors in real time through Web-based chat. **important:** The legacy chat product is in maintenance-only mode, and we won't continue to build new features. You can continue to use it, but we no longer recommend that you implement new chat channels. Instead, you can modernize your customer communication with [Messaging for In-App and Web](https://help.salesforce.com/s/articleView?id=service.miaw_intro_landing.htm&type=5). Messaging offers many of the [chat features that you](https://help.salesforce.com/s/articleView?id=service.miaw_chat_vs_messaging.htm&type=5) love plus asynchronous conversations that can be picked back up at any time. For Lightning Console JavaScript API, use [Aura Methods for Enhanced Messaging in Lightning Experience](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-methods-enhanced-lightning-conversationtoolkitapi.md). - **[endChat() for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/conversationtoolkitapi/sforce-api-console-lightning-endchat.md)** Ends a chat in which an agent is currently engaged. This method works only in Lightning console apps. - **[getChatLog() for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/conversationtoolkitapi/sforce-api-console-lightning-getchatlog.md)** Returns the chat log of a chat associated with a specific recordId. This method works only in Lightning console apps. - **[sendCustomEvent() for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/conversationtoolkitapi/sforce-api-console-lightning-sendcustomevent.md)** Sends a custom event to the client-side chat window for a chat with a specific chat key. This method works only in Lightning console apps. - **[sendMessage() for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/conversationtoolkitapi/sforce-api-console-lightning-sendmessage.md)** Sends a new chat message from the agent to a chat with a specific chat key. This method works only in Lightning console apps. # Methods for Chat Visitors There are a few methods available that you can use to customize the visitor experience for Chat in a custom Visualforce chat window. These methods apply to Salesforce Classic only. **important:** The legacy chat product is in maintenance-only mode, and we won't continue to build new features. You can continue to use it, but we no longer recommend that you implement new chat channels. Instead, you can modernize your customer communication with [Messaging for In-App and Web](https://help.salesforce.com/s/articleView?id=service.miaw_intro_landing.htm&type=5). Messaging offers many of the [chat features that you](https://help.salesforce.com/s/articleView?id=service.miaw_chat_vs_messaging.htm&type=5) love plus asynchronous conversations that can be picked back up at any time. - **[chasitor.addCustomEventListener()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-chasitor-addcustomeventlistener.md)** Registers a function to call when a custom event is received in the chat window. Available in API version 29.0 or later. - **[chasitor.getCustomEvents()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-chasitor-getcustomevents.md)** Retrieves a list of custom events that have been received in this chat window during this chat session. Available in API version 29.0 or later. - **[chasitor.sendCustomEvent()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-chasitor-sendcustomevent.md)** Sends a custom event to the agent console of the agent who is currently chatting with a customer. Available in API version 29.0 or later. # Methods for Computer-Telephony Integration (CTI) Salesforce Call Center seamlessly integrates Salesforce with Computer-Telephony Integration systems. Developers create a CTI system with and console users access telephony features through a softphone, which is a call-control tool that appears in the footer of a console. - **[fireOnCallBegin()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-fireoncallbegin.md)** Fires an event that notifies a call has begun. Use to get information or send information between an interaction log and a custom console component. This method is only available in API version 31.0 or later. - **[fireOnCallEnd()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-fireoncallend.md)** Fires an event that notifies a call has ended. Use to get information or send information between an interaction log and a custom console component. This method executes when fireOnCallBegin() is called first. This method is only available in API version 31.0 or later. - **[fireOnCallLogSaved()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-fireoncalllogsaved.md)** Calls the `eventHandler` function registered with [onCallLogSaved()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-oncalllogsaved.md). Use to get information or send information between an interaction log and a custom console component.. This method is only available in API version 31.0 or later. - **[getCallAttachedData()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-getcallattacheddata.md)** Returns the attached data of a call represented by the call object ID or null if there isn’t an active call. The data is returned in JSON format. This method is for computer-telephony integration (CTI); it’s only available in API version 24.0 or later. - **[getCallObjectIds()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-getcallobjectids.md)** Returns any active call object IDs in the order in which they arrived or null if there aren’t any active calls. This method is for computer-telephony integration (CTI); it’s only available in API version 24.0 or later. - **[onCallBegin()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-oncallbegin.md)** Registers a function that is called when a call begins (comes in). This method is for computer-telephony integration (CTI); it’s only available in API version 24.0 or later. - **[onCallEnd()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-oncallend.md)** Registers a function that is called when a call ends. This method is for computer-telephony integration (CTI); it’s only available in API version 24.0 or later. - **[onCallLogSaved()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-oncalllogsaved.md)** Registers a function that is fired when an interaction log saves a call log. Use to get information or send information between an interaction log and a custom console component. This method is only available in API version 31.0 or later. - **[onSendCTIMessage()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-onsendctimessage.md)** Registers a function that is fired when a message is sent with the [sendCTIMessage()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-sendctimessage.md). Use to get information or send information between an interaction log and a custom console component. This method is only available in API version 31.0 or later. - **[sendCTIMessage()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-sendctimessage.md)** Sends a message to the CTI adapter or Open CTI. This method is for computer-telephony integration (CTI); it’s only available in API version 24.0 or later. - **[setCallAttachedData()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-setcallattacheddata.md)** Sets the call data associated with a call object ID. Use to get information or send information between an interaction log and a custom console component.This method is only available in API version 31.0 or later. - **[setCallObjectIds()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-setcallobjectids.md)** Sets call object IDs, in ascending order of arrival. This method is only available in API version 31.0 or later. # Methods for Computer-Telephony Integration (CTI) Open CTI lets you integrate your CTI system with Salesforce. **important:** The way you implement Open CTI depends on your org’s user interface. There are separate Open CTI APIs for Salesforce Classic and Lightning Experience.You can’t swap the two Open CTI APIs in custom JavaScript code because they behave and function differently. Make sure that you think about where you want to implement your CTI system before you begin developing. - **[disableClickToDial() for Salesforce Classic](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-disableclicktodial.md)** - **[enableClickToDial() for Salesforce Classic](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-enableclicktodial.md)** - **[getCallCenterSettings() for Salesforce Classic](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-getcallcentersettings.md)** - **[getDirectoryNumbers() for Salesforce Classic](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-getdirectorynumbers.md)** - **[getSoftphoneLayout() for Salesforce Classic](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-getsoftphonelayout.md)** - **[onClickToDial() for Salesforce Classic](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-onclicktodial.md)** - **[setSoftphoneHeight() for Salesforce Classic](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-setsoftphoneheight.md)** - **[setSoftphoneWidth() for Salesforce Classic](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-setsoftphonewidth.md)** # Methods for Console Events JavaScript can be executed when certain types of events occur in a console, such as when a user closes a tab. The following standard events are supported: | Event | Description | Payload | | -------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `sforce.console.ConsoleEvent.OPEN_TAB` | Fired when a primary tab or subtab is opened. Available in API version 30.0 or later. |
  • `id` — The ID of the opened tab.
  • `objectId` — The object ID of the opened tab, if available.
| | `sforce.console.ConsoleEvent.CLOSE_TAB` | Fired when a primary tab or subtab with a specified ID in the `additionalParams` argument is closed. Or, fired when a primary tab or subtab with no specified ID is closed. Available in API version 30.0 or later. |
  • `id` — The ID of the closed tab.
  • `objectID` — The object ID of the closed tab, if available.
    Note: For some objects (such as Email and Case Comment), the tab is opened and closed immediately and no object ID is generated for the tab. In those cases, this field’s value is equal to the parent’s object ID.
  • `tabObjectId` — The object ID of the closed tab, if available.
    Note: `tabObjectId` is generally the same as `objectID`. However, for tabs that close upon submission, no `tabObjectId` is generated. In those cases, the value of this field is either empty or null. For an Email, the value is empty. For a Case Comment, the value is null.
| | `sforce.console.ConsoleEvent.CONSOLE_LOGOUT` | Delays the execution of logging out of a console when a user clicks **Logout**. When **Logout** is clicked:
  1. An overlay appears, which tells a user that logout is in progress.
  2. Callbacks are executed that have been registered by using `sforce.console.ConsoleEvent.CONSOLE_LOGOUT`.
  3. Console logout logic is executed.
If the callback contains synchronous blocking code, the console logout code isn’t executed until the blocking code is executed. As a best practice, avoid synchronous blocking code or long code execution during logout. Available in API version 31.0 or later. | None | - **[addEventListener()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-addeventlistener.md)** Adds a listener for a custom event type or a standard event type when the event is fired. This method adds a listener for custom event types in API version 25.0 or later; it adds a listener for standard event types in API version 30.0 or later. - **[fireEvent()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-fireevent.md)** Fires a custom event. This method is only available in API version 25.0 or later. - **[removeEventListener()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-removeeventlistener.md)** Removes a listener for a custom event type or a standard event type. This method removes a listener for custom event types in API version 25.0 or later; it removes a listener for standard event types in API version 30.0 or later. # Methods for Lightning Console JavaScript API If your org is using Lightning Experience, use Lightning Console JavaScript API methods. - **[Methods for Navigation Items in Lightning Experience](https://developer.salesforce.com/docs/service/api-console/guide/navigationitemapi/sforce-api-console-methods-lightning-navigationitemapi.md)** Lightning console apps display an item menu that lets users select navigation items, such as cases, contacts, and accounts. Salesforce admins choose which navigation items to display in the navigation menu. Both Lightning Web Components (LWC) and Aura Components support the navigation items methods, with usage differences noted on each method. - **[Methods for Workspace Tabs and Subtabs in Lightning Experience](https://developer.salesforce.com/docs/service/api-console/guide/workspaceapi/sforce-api-console-methods-lightning-workspaceapi.md)** A Lightning console app displays Salesforce pages as workspace tabs or subtabs. A workspace tab displays the main work item or record, such as an account. A subtab displays related records, such as an account’s contacts or opportunities. - **[Methods for the Utility Bar in Lightning Experience](https://developer.salesforce.com/docs/service/api-console/guide/utilitybarapi/sforce-api-console-methods-lightning-utilitybarapi.md)** The utility bar houses Aura components and Lightning web components, providing users quick access to tools they use often. The utility bar is available in Lightning Experience only. Both Lightning Web Components (LWC) and Aura Components support the utility bar methods, with usage differences noted on each method. - **[LWC Methods for Enhanced Messaging in Lightning Experience](https://developer.salesforce.com/docs/service/api-console/guide/conversationtoolkitapi/sforce-api-console-methods-enhanced-lightning-conversationtoolkitapi-lwc.md)** The Conversation Toolkit API for Enhanced Messaging provides methods to interact with a Messaging customer from a Lightning web component (LWC). These methods apply to Lightning web components in Lightning Experience only. - **[Aura Methods for Enhanced Messaging in Lightning Experience](https://developer.salesforce.com/docs/service/api-console/guide/conversationtoolkitapi/sforce-api-console-methods-enhanced-lightning-conversationtoolkitapi.md)** Enable your developers to customize the agent experience by allowing custom components to interact with the Enhanced Conversation Component. These methods apply to Aura components in Lightning Experience only. - **[Methods for Chat in Lightning Experience](https://developer.salesforce.com/docs/service/api-console/guide/conversationtoolkitapi/sforce-api-console-methods-lightning-conversationtoolkitapi.md)** Let customers chat with your agents on your web page. - **[Methods for Omni-Channel in Lightning Experience](https://developer.salesforce.com/docs/service/api-console/guide/omnitoolkitapi/sforce-api-console-methods-lightning-omnitoolkitapi.md)** Omni-Channel lets your call center route any type of incoming work item to the most qualified, available agents. # Methods for Lightning Experience If your org is using Lightning Experience, use methods that work with Lightning Experience. **important:** Open CTI is in maintenance mode and is scheduled for retirement in February 2028. No new features or enhancements are being added to Open CTI. Effective immediately, Open CTI is deprecated and unavailable for newly created Agentforce Service orgs. To ensure long-term compatibility and access to the latest innovations, we recommend transitioning your development efforts to Salesforce Voice. For more information, see this [Knowledge Article](https://help.salesforce.com/s/articleView?id=005306437&type=1), [learning map](https://help.salesforce.com/s/articleView?id=service.cti_migrate_map.htm), and [developer migration guide](/docs/service/api-cti/guide/migrate-cti.html). **note:** The way you implement Open CTI depends on your org’s user interface. There are separate Open CTI APIs for Salesforce Classic and Lightning Experience.You can’t swap the two Open CTI APIs in custom JavaScript code because they behave and function differently. Make sure that you think about where you want to implement your CTI system before you begin developing. - **[disableClickToDial() for Lightning Experience](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-disableclicktodial-lex.md)** - **[enableClickToDial() for Lightning Experience](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-enableclicktodial-lex.md)** - **[getAppViewInfo() for Lightning Experience](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-getappviewinfo-lex.md)** - **[getCallCenterSettings() for Lightning Experience](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-getcallcentersettings-lex.md)** - **[getSoftphoneLayout() for Lightning Experience](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-getsoftphonelayout-lex.md)** - **[Sales Engagement Methods for Lightning Experience](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-hvs-lex.md)** - **[isSoftphonePanelVisible() for Lightning Experience](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-issoftphonepanelvisible-lex.md)** - **[notifyInitializationComplete() for Lightning Experience](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-notifyinitializationcomplete-lex.md)** - **[onClickToDial() for Lightning Experience](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-onclicktodial-lex.md)** - **[onNavigationChange() for Lightning Experience](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-onnavigationchange-lex.md)** - **[refreshView() for Lightning Experience](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-refreshview-lex.md)** - **[runApex() for Lightning Experience](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-runapex-lex.md)** - **[saveLog() for Lightning Experience](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-savelog-lex.md)** - **[screenPop() for Lightning Experience](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-screenpop-lex.md)** - **[searchAndScreenPop() for Lightning Experience](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-searchandscreenpop-lex.md)** - **[setSoftphoneItemIcon() for Lightning Experience](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-setsoftphoneitemicon-lex.md)** - **[setSoftphoneItemLabel() for Lightning Experience](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-setsoftphoneitemlabel-lex.md)** - **[setSoftphonePanelHeight() for Lightning Experience](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-setsoftphonepanelheight-lex.md)** - **[setSoftphonePanelIcon() for Lightning Experience](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-setsoftphonepanelicon-lex.md)** - **[setSoftphonePanelLabel() for Lightning Experience](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-setsoftphonepanellabel-lex.md)** - **[setSoftphonePanelVisibility() for Lightning Experience](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-setsoftphonepanelvisibility-lex.md)** - **[setSoftphonePanelWidth() for Lightning Experience](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-setsoftphonepanelwidth-lex.md)** - **[Lightning Message Service Methods for Lightning Experience](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-methods-lms.md)** - **[Common Error Messages for Lightning Experience Methods](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-error-messages-lightning.md)** # Methods for Navigation Items in Lightning Experience Lightning console apps display an item menu that lets users select navigation items, such as cases, contacts, and accounts. Salesforce admins choose which navigation items to display in the navigation menu. Both Lightning Web Components (LWC) and Aura Components support the navigation items methods, with usage differences noted on each method. These methods work with navigation items in Lightning console apps. - **[focusNavigationItem() for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/navigationitemapi/sforce-api-console-lightning-focusnavigationitem.md)** Focuses on the selected navigation object and opens the object's home page. Typically, standard and custom objects open the object's list view. If split view is open, focus remains on the selected navigation object. This method works only in Lightning console apps. - **[getNavigationItems() for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/navigationitemapi/sforce-api-console-lightning-getnavigationitems.md)** Returns information about all the items in the navigation menu. This method works only in Lightning console apps. - **[getSelectedNavigationItem() for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/navigationitemapi/sforce-api-console-lightning-getselectednavigationitem.md)** Returns information about the selected navigation item. This method works only in Lightning console apps. - **[refreshNavigationItem() for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/navigationitemapi/sforce-api-console-lightning-refreshnavigationitem.md)** Refreshes the selected navigation object's home page. Typically, standard and custom objects open the object's list view. If split view is open, it's refreshed. This method works only in Lightning console apps. - **[setSelectedNavigationItem() for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/navigationitemapi/sforce-api-console-lightning-setselectednavigationitem.md)** Sets the selected navigation item to a specific ID. This method works only in Lightning console apps. # Methods for Navigation Tabs A Salesforce console displays a navigation tab from which users can select objects to view lists or home pages. Administrators choose the objects that users can access from a navigation tab. - **[focusNavigationTab()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-focusnavigatortab.md)** Focuses the browser on the navigation tab. This method is only available in API version 31.0 or later. - **[getNavigationTabs()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-getnavigatortabs.md)** Returns all of the objects in the navigation tab. This method is only available in API version 31.0 or later. - **[getSelectedNavigationTab()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-getselectednavigatortab.md)** Returns the selected object in the navigation tab. This method is only available in API version 31.0 or later. - **[refreshNavigationTab()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-refreshnavigatortab.md)** Refreshes the selected navigation tab. This method is only available in API version 31.0 or later. - **[setSelectedNavigationTab()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-setselectednavigatortab.md)** Sets the navigation tab with a specific ID or URL. This method is only available in API version 31.0 or later. # Methods for Omni-Channel Omni-Channel is a comprehensive customer service solution that lets your call center route any type of incoming work item—including cases, chats, phone calls, or leads—to the most qualified, available agents in your organization. Omni-Channel provides a customizable customer service solution that integrates seamlessly into the Salesforce console and benefits your customers and support agents. For more information on Omni-Channel, see *Set Up Omni-Channel*. - **[acceptAgentWork](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-acceptagentwork.md)** Accepts a work item that’s assigned to an agent. Available in API versions 32.0 and later. - **[closeAgentWork](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-closeagentwork.md)** Changes the status of a work item to “Closed” and removes it from the list of work items in the Omni-Channel widget. Available in API versions 32.0 and later. - **[declineAgentWork](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-declineagentwork.md)** Declines a work item that’s assigned to an agent. Available in API versions 32.0 and later. - **[getAgentWorks](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-getagentworks.md)** Returns a list of work items that are currently assigned to an agent and open in the agent’s workspace. Available in API versions 32.0 and later. - **[getAgentWorkload](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-getagentworkload.md)** In API version 35.0 and later, we can retrieve an agent’s currently assigned workload. Use this method for rerouting work to available agents. - **[getServicePresenceStatusChannels](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-getservicepresencestatuschannels.md)** Retrieves the service channels that are associated with an Omni-Channel user’s current presence status. Available in API versions 32.0 and later. - **[getServicePresenceStatusId](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-getservicepresencestatusid.md)** Retrieves an agent’s current presence status. Available in API versions 32.0 and later. - **[login](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-login.md)** Logs an agent into Omni-Channel with a specific presence status. You also can use this method to reconnect to Omni-Channel after a connection error. Available in API versions 32.0 and later. - **[logout](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-logout.md)** Logs an agent out of Omni-Channel. Available in API versions 32.0 and later. - **[setServicePresenceStatus](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-setservicepresencestatus.md)** Sets an agent's presence status to a status with a particular ID. In API version 35.0 and later, we log the user into presence if that user is not already logged in, so you don’t have to make additional calls. You also can use this method to reconnect to Omni-Channel after a connection error. - **[Methods for Omni-Channel Console Events](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-omnichannel-methods-events.md)** JavaScript can be executed when certain types of events occur in a console, such as when a user closes a tab. In addition to the standard methods for console events, there are a few events that are specific to Omni-Channel. These events apply to Salesforce Classic only. # Methods for Omni-Channel Console Events JavaScript can be executed when certain types of events occur in a console, such as when a user closes a tab. In addition to the standard methods for console events, there are a few events that are specific to Omni-Channel. These events apply to Salesforce Classic only. ## Omni-Channel Console Events |Event|Description|Payload| |-----|-----------|-------| |`sforce.console.ConsoleEvent.​PRESENCE.LOGIN_SUCCESS`|Fired when an Omni-Channel user logs into Omni-Channel successfully. Available in API version 32.0 or later.|
  • `statusId`—the ID of the agent’s current presence status.
| |`sforce.console.ConsoleEvent.​PRESENCE.STATUS_CHANGED`|Fired when a user changes his or her presence status. Available in API version 32.0 or later.|
  • `statusId`—the ID of the agent’s current presence status.
  • `channels`—[channel](#channel)JSON string of channel objects.
  • `statusName`—the name of the agent’s current presence status.
  • `statusApiName`—the API name of the agent’s current presence status.
| |`sforce.console.ConsoleEvent.​PRESENCE.LOGOUT`|Fired when a user logs out of Salesforce. Available in API version 32.0 or later.|None| |`sforce.console.ConsoleEvent.​PRESENCE.WORK_ASSIGNED`|Fired when a user is assigned a new work item. Available in API version 32.0 or later.|
  • `workItemId`—the ID of the object that’s routed through Omni-Channel. This object becomes a work assignment with a `workId` when it’s assigned to an agent.
  • `workId`—the ID of a work assignment that’s routed to an agent.
| |`sforce.console.ConsoleEvent.​PRESENCE.WORK_ACCEPTED`|Fired when a user accepts a work assignment, or when a work assignment is automatically accepted. Available in API version 32.0 or later.|
  • `workItemId`—the ID of the object that’s routed through Omni-Channel. This object becomes a work assignment with a `workId` when it’s assigned to an agent.
  • `workId`—the ID of a work assignment that’s routed to an agent.
| |`sforce.console.ConsoleEvent.​PRESENCE.WORK_DECLINED`|Fired when a user declines a work assignment. Available in API version 32.0 or later.|
  • `workItemId`—the ID of the object that’s routed through Omni-Channel. This object becomes a work assignment with a `workId` when it’s assigned to an agent.
  • `workId`—the ID of a work assignment that’s routed to an agent.
| |`sforce.console.ConsoleEvent.​PRESENCE.WORK_CLOSED`|Fired when the status of an AgentWork object is changed to Closed. Available in API version 32.0 or later.|
  • `workItemId`—the ID of the object that’s routed through Omni-Channel. This object becomes a work assignment with a `workId` when it’s assigned to an agent.
  • `workId`—the ID of a work assignment that’s routed to an agent.
| |`sforce.console.ConsoleEvent. PRESENCE.WORKLOAD_CHANGED`|Fired when an agent’s workload changes. This includes receiving new work items, declining work items, and closing items in the console. It’s also fired when there’s a change to an agent’s capacity or Presence Configuration or when the agent goes offline in the Omni-Channel widget.|
  • `ConfiguredCapacity`—the configured capacity for the agent.
  • `PreviousWorkload`—the agent’s workload before the change.
  • `NewWorkload`—the agent’s new workload after the change.
| ## `channel` The `channel` object contains the following functions: |Name|Type|Description| |----|----|-----------| |`channelId`|String|Retrieves the ID of a service channel that’s associated with a presence status.| |`developerName`|String|Retrieves the developer name of the the service channel that’s associated with the `channelId`.| # Methods for Omni-Channel in Lightning Experience Omni-Channel lets your call center route any type of incoming work item to the most qualified, available agents. For more information about Omni-Channel, see *Omni-Channel for Administrators* in Salesforce Help. - **[acceptAgentWork for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/omnitoolkitapi/sforce-api-console-lightning-acceptagentwork.md)** Accepts a work item that’s assigned to an agent. - **[closeAgentWork for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/omnitoolkitapi/sforce-api-console-lightning-closeagentwork.md)** Changes the status of a work item to *Closed* and removes it from the list of work items in the Omni-Channel utility. - **[declineAgentWork for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/omnitoolkitapi/sforce-api-console-lightning-declineagentwork.md)** Declines a work item that’s assigned to an agent. - **[getAgentWorkload for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/omnitoolkitapi/sforce-api-console-lightning-getagentworkload.md)** Retrieves an agent’s currently assigned workload. Use this method to reroute work to available agents. - **[getAgentWorks for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/omnitoolkitapi/sforce-api-console-lightning-getagentworks.md)** Returns a list of work items that are assigned to an agent and open in the agent’s workspace. - **[getServicePresenceStatusChannels for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/omnitoolkitapi/sforce-api-console-lightning-getservicepresencestatuschannels.md)** Retrieves the service channels that are associated with an Omni-Channel user’s current presence status. - **[getServicePresenceStatusId for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/omnitoolkitapi/sforce-api-console-lightning-getservicepresencestatusid.md)** Retrieves an agent’s current presence status. - **[login for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/omnitoolkitapi/sforce-api-console-lightning-login.md)** Logs an agent in to Omni-Channel with a specific presence status. - **[logout for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/omnitoolkitapi/sforce-api-console-lightning-logout.md)** Logs an agent out of Omni-Channel. - **[lowerAgentWorkFlag for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/omnitoolkitapi/sforce-api-console-lightning-loweragentworkflag.md)** Lowers a flag for this agent work item. - **[raiseAgentWorkFlag for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/omnitoolkitapi/sforce-api-console-lightning-raiseagentworkflag.md)** Raises a flag for this agent work item. - **[setServicePresenceStatus for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/omnitoolkitapi/sforce-api-console-lightning-setservicepresencestatus.md)** Sets an agent's presence status to a status with a particular ID. If the specified agent is not already logged in, we log in the agent with the presence status. This method removes the need for you to make more calls. # Methods for Primary Tabs and Subtabs A Salesforce console displays Salesforce pages as primary tabs or subtabs. A primary tab displays the main item to work on, such as an account. A subtab displays related items, such as an account’s contacts or opportunities. - **[closeTab()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-closetab.md)** Closes a specified primary tab or subtab. Keep in mind that closing the first tab in a primary tab closes the primary tab itself. This method is only available in API version 20.0 or later. - **[disableTabClose()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-disabletabclose.md)** Prevents a user from closing a tab or a subtab. If the ID parameter doesn’t specify a tab, the enclosing tab is used. You can also use this method to re-enable a tab that has been disabled. Available in API version 36.0 or later. - **[focusPrimaryTabById()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-focusprimarytabbyid.md)** Focuses the browser on a primary tab that is already open with the specified ID. This method is only available in API version 22.0 or later. - **[focusPrimaryTabByName()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-focusprimarytabbyname.md)** Focuses the browser on a primary tab that is already open with the specified name. This method is only available in API version 22.0 or later. - **[focusSidebarComponent()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-focussidebarcomponent.md)** Focuses the browser on a sidebar component. Use this method to focus on a component with the tab or accordion sidebar style. - **[focusSubtabById()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-focussubtabbyid.md)** Focuses the browser on a subtab that is already open with the specified ID. This method is only available in API version 22.0 or later. - **[focusSubtabByNameAndPrimaryTabId()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-focussubtabbynameandprimarytabid.md)** Focuses the browser on a subtab that is already open with the specified name and primary tab ID. This method is only available in API version 22.0 or later. - **[focusSubtabByNameAndPrimaryTabName()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-focussubtabbynameandprimarytabname.md)** Focuses the browser on a subtab that is already open with the specified name and primary tab name. This method is only available in API version 22.0 or later. - **[generateConsoleUrl()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-generateconsoleurl.md)** Generates a URL to a tab, or group of related tabs, in the Salesforce console. If any tabs include external URLs, then add the external URLs to the console’s allowlist so that they can display correctly.This method is only available in API version 28.0 or later. - **[getEnclosingPrimaryTabId()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-getenclosingprimarytabid.md)** Returns the ID of the current primary tab. This method works within a primary tab or subtab, not within the navigation tab or custom console components. This method is only available in API version 20.0 or later. - **[getEnclosingPrimaryTabObjectId()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-getenclosingprimarytabobjectid.md)** Returns the object ID of the current primary tab, which contains a subtab. For example, a case ID or account ID. This method works within a primary tab or subtab. This method is only available in API version 24.0 or later. - **[getEnclosingTabId()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-getenclosingtabid.md)** Returns the ID of the tab that contains the current Visualforce page, which may be a primary tab or subtab. This method will work if the call is made within a component enclosed within a subtab. This method is only available in API version 20.0 or later. - **[getFocusedPrimaryTabId()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-getfocusedprimarytabid.md)** Returns the ID of the primary tab on which the browser is focused. This method is only available in API version 25.0 or later. - **[getFocusedPrimaryTabObjectId()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-getfocusedprimarytabobjectid.md)** Returns the object ID of the primary tab on which the browser is focused. This method is only available in API version 25.0 or later. - **[getFocusedSubtabId()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-getfocusedsubtabid.md)** Returns the ID of the subtab on which the browser is focused. For example, a case ID or account ID. This method is only available in API version 25.0 or later. - **[getFocusedSubtabObjectId()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-getfocusedsubtabobjectid.md)** Returns the object ID of the subtab on which the browser is focused. For example, a case ID or account ID. This method is only available in API version 24.0 or later. - **[getPageInfo()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-getpageinfo.md)** Returns page information for the specified tab after its content has loaded. If the tab ID is null, it returns page information for the enclosing primary tab or subtab. Note that to get the page information from a custom console component, a `tabId` must be passed as the first parameter to this method.This method is only available in API version 26.0 or later. - **[getPrimaryTabIds()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-getprimarytabids.md)** Returns all of the IDs of open primary tabs. This method is only available in API version 26.0 or later. - **[getSubtabIds()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-getsubtabids.md)** Returns all of the IDs of the subtabs on the primary tab specified by a primary tab ID. If the primary tab ID is null, it returns the IDs of the subtabs on the current primary tab. This method can only be called from a custom console component or a detail page overwritten by a Visualforce page. This method is only available in API version 26.0 or later. - **[getTabLink()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-gettablink.md)** Retrieves the URL to a tab, or group of related tabs, from the Salesforce console. This method is only available in API version 28.0 or later. - **[isInConsole()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-isinconsole.md)** Determines if the page is in the Salesforce console. This method is only available in API version 22.0 or later. - **[onEnclosingTabRefresh()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-onenclosingtabrefresh.md)** Registers a function to call when the enclosing tab refreshes. This method is only available in API version 24.0 or later. - **[onFocusedPrimaryTab()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-onfocusedprimarytab.md)** Registers a function to call when the focus of the browser changes to a different primary tab. This method is only available in API version 25.0 or later. - **[onFocusedSubtab()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-onfocusedsubtab.md)** Registers a function to call when the focus of the browser changes to a different subtab. This method is only available in API version 24.0 or later. - **[onTabSave()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-ontabsave.md)** Registers and calls a callback method when a user clicks **Save** in a subtab’s Unsaved Changes dialog box. When using this method, call [`setTabUnsavedChanges()`](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-settabdirty.md) in the callback method. This notifies the console that the custom save operation completed. In the call to `setTabUnsavedChanges()`, pass the first parameter as `false` to indicate a successful save or `true` to indicate an unsuccessful save. This method is only available in API version 28.0 or later. - **[openConsoleUrl()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-openconsoleurl.md)** Opens a URL created by the generateConsoleUrl() method (a URL to a tab, or group of related tabs, in the Salesforce console). This method is only available in API version 28.0 or later. - **[openPrimaryTab()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-openprimarytab.md)** Opens a new primary tab to display the content of the specified URL, which can be relative or absolute. You can also override an existing tab. This method is only available in API version 20.0 or later. - **[openSubtab()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-opensubtab.md)** Opens a new subtab (within a primary tab) that displays the content of a specified URL, which can be relative or absolute. You can also override an existing subtab. Use to open a new subtab on a primary tab via the primary tab's ID. This method is only available in API version 20.0 or later. - **[openSubtabByPrimaryTabName()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-opensubtabbyprimarytabname.md)** Opens a new subtab (within a primary tab) that displays the content of a specified URL, which can be relative or absolute. You can also override an existing subtab. Use to open a new subtab on a primary tab via the primary tab's name. This method is only available in API version 22.0 or later. - **[refreshPrimaryTabById()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-refreshprimarytabbyid.md)** Refreshes a primary tab specified by ID, including its subtabs. This method can't refresh subtabs with URLs to external pages or Visualforce pages. This method is only available in API version 22.0 or later. - **[refreshPrimaryTabByName()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-refreshprimarytabbyname.md)** Refreshes a primary tab specified by name, including its subtabs. This method can't refresh subtabs with URLs to external pages or Visualforce pages. This method is only available in API version 22.0 or later. - **[refreshSubtabById()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-refreshsubtabbyid.md)** Refreshes a subtab with the last known URL with a specified ID. This method can't refresh a subtab if the last known URL is an external page or a Visualforce page. This method is only available in API version 22.0 or later. - **[refreshSubtabByNameAndPrimaryTabId()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-refreshsubtabbynameandprimarytabid.md)** Refreshes a subtab with the last known URL with the specified name and primary tab ID. This method can't refresh a subtab if the last known URL is an external page or a Visualforce page. This method is only available in API version 22.0 or later. - **[refreshSubtabByNameAndPrimaryTabName()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-refreshsubtabbynameandprimarytabname.md)** Refreshes a subtab with the last known URL with the specified name and primary tab name. This method can't refresh a subtab if the last known URL is an external page or a Visualforce page. This method is only available in API version 22.0 or later. - **[reopenLastClosedTab()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-reopenlastclosedtab.md)** Reopens the last closed primary tab, and any of its subtabs that were open, the moment it was closed. This method is only available in API version 35.0 or later. - **[resetSessionTimeOut()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-resetsessiontimeout.md)** Resets a session timeout for a console app. This method ensures that users can continue working on Visualforce pages without being prompted to log back in to the console when they return to a console tab or console component. This method is only available in API version 24.0 or later. - **[setTabUnsavedChanges()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-settabdirty.md)** Sets the unsaved changes icon (![Unsaved changes on tab icon](https://developer.salesforce.com/media/api-console/dirtyIndicator.png) ) on subtabs to indicate unsaved data. This method is only available in API version 23.0 or later. - **[setTabIcon()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-settabicon.md)** Sets an icon on the specified tab. If a tab is not specified, the icon is set on the enclosing tab. Use this method to customize a tab’s icon. This method is only available in API version 28.0 or later. - **[setTabLink()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-settablink.md)** Sets a console tab’s URL attribute to the location of the tab’s content. Use this method to generate secure console URLs when users navigate to tabs displaying content outside of the Salesforce domain.This method is only available in API version 28.0 or later. - **[setTabStyle()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-settabstyle.md)** Sets a cascading style sheet (CSS) on the specified tab. If a tab is not specified, the CSS is set on the enclosing tab. Use this method to customize a tab’s look and feel. This method is only available in API version 28.0 or later. - **[setTabTextStyle()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-settabtextstyle.md)** Sets a cascading style sheet (CSS) on a specified tab’s text. If a tab is not specified, the CSS is set on the enclosing tab’s text. Use this method to customize a tab’s text style. This method is only available in API version 28.0 or later. - **[setTabTitle()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-settabtitle.md)** Sets the title of a primary tab or subtab. This method is only available in API version 20.0 or later. # Methods for Push Notifications Push notifications are visual indicators on lists and detail pages in a console that show when a record or field has changed during a user’s session. For example, if two support agents are working on the same case, and one agent changes the `Priority`, a push notification appears to the other agent so he or she spots the change and doesn’t duplicate the effort. When administrators set up a Salesforce console, they choose when push notifications display, and which objects and fields trigger push notifications. Developers can use push notification methods to customize push notifications beyond the default visual indicators supplied by Salesforce. For example, developers can use the methods below to create personalized notifications about objects accessible to specific console users, thereby eliminating the need for email notifications. Consider the following when using push notification methods: - Push notification listener response is only available for the objects and fields selected to trigger push notifications for a console. - When a Visualforce page includes a listener added by the `addPushNotificationListener()` method, the page receives notifications. The listener receives notifications when there is an update by any user to the objects selected for triggering console push notifications and the current user has access to the modified record. This functionality is slightly different from push notifications set up in the Salesforce user interface in that: - Listeners receive update notifications for changes made by all users. - When `Choose How Lists Refresh` is set to _Refresh List Rows_ and the user is viewing an empty list view for an object set to trigger push notifications, a listener receives notifications for any record of that object created as well as any updates made to fields selected to trigger push notifications on the object. - When `Choose How Lists Refresh` is set to _Refresh List_ and the user is viewing a list view for an object set to trigger push notifications, a listener receives notifications for any record of that object created and any updates made to fields selected to trigger push notifications, where the viewing user is the owner of the record. - The only way to stop receiving notifications is to remove listeners using the `removePushNotificationListener()` method. - Push notifications aren't available in the console in Professional Edition. - **[addPushNotificationListener()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-addpushnotificationlistener.md)** Adds a listener for a push notification. A user can only register a listener once until he or she removes the listener, or the listener is removed by another user. This method is only available in API version 26.0 or later. - **[removePushNotificationListener()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-removepushnotificationlistener.md)** Removes a listener that gets added for a push notification. This method is only available in API version 26.0 or later. # Methods for Salesforce Application Interaction Open CTI lets your CTI system interact with the Salesforce application, including elements on a Case Feed page. **important:** The way you implement Open CTI depends on your org’s user interface. There are separate Open CTI APIs for Salesforce Classic and Lightning Experience.You can’t swap the two Open CTI APIs in custom JavaScript code because they behave and function differently. Make sure that you think about where you want to implement your CTI system before you begin developing. - **[getPageInfo() for Salesforce Classic](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-getpageinfo.md)** - **[isInConsole() for Salesforce Classic](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-isinconsole.md)** - **[isVisible() for Salesforce Classic](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-isvisible.md)** - **[notifyInitializationComplete() for Salesforce Classic](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-notifyinitializationcomplete.md)** - **[onFocus() for Salesforce Classic](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-onfocus.md)** - **[onObjectUpdate() for Salesforce Classic](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-onobjectupdate.md)** - **[refreshObject() for Salesforce Classic](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-refreshobject.md)** - **[refreshPage() for Salesforce Classic](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-refreshpage.md)** - **[refreshRelatedList() for Salesforce Classic](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-refreshrelatedlist.md)** - **[reloadFrame() for Salesforce Classic](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-reloadframe.md)** - **[runApex() for Salesforce Classic](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-runapex.md)** - **[saveLog() for Salesforce Classic](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-savelog.md)** - **[screenPop() for Salesforce Classic](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-screenpop.md)** - **[searchAndGetScreenPopUrl() for Salesforce Classic](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-searchandgetscreenpopurl.md)** - **[searchAndScreenPop() for Salesforce Classic](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-searchandscreenpop.md)** - **[setVisible() for Salesforce Classic](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-setvisible.md)** # Methods for Salesforce Classic If your org is using Salesforce Classic, use Salesforce Console Integration Toolkit methods. - **[Methods for Primary Tabs and Subtabs](https://developer.salesforce.com/docs/service/api-console/guide/tabs/sforce-api-console-methods-tabs.md)** - **[Methods for Navigation Tabs](https://developer.salesforce.com/docs/service/api-console/guide/nav-tabs/sforce-api-console-methods-nav-tabs.md)** - **[Methods for Computer-Telephony Integration (CTI)](https://developer.salesforce.com/docs/service/api-console/guide/cti/sforce-api-console-methods-cti.md)** - **[Methods for Application-Level Custom Console Components](https://developer.salesforce.com/docs/service/api-console/guide/app-components/sforce-api-console-methods-app-components.md)** - **[Methods for Push Notifications](https://developer.salesforce.com/docs/service/api-console/guide/push-notifications/sforce-api-console-methods-push-notifications.md)** - **[Methods for Console Events](https://developer.salesforce.com/docs/service/api-console/guide/events/sforce-api-console-methods-events.md)** - **[Methods for Chat](https://developer.salesforce.com/docs/service/api-console/guide/chat/sforce-api-console-live-agent-methods.md)** - **[Methods for Omni-Channel](https://developer.salesforce.com/docs/service/api-console/guide/omnichannel/sforce-api-console-omnichannel-methods.md)** # Methods for Salesforce Classic If your org is using Salesforce Classic, use methods that work with Salesforce Classic. **important:** The way you implement Open CTI depends on your org’s user interface. There are separate Open CTI APIs for Salesforce Classic and Lightning Experience.You can’t swap the two Open CTI APIs in custom JavaScript code because they behave and function differently. Make sure that you think about where you want to implement your CTI system before you begin developing. - **[Methods for Salesforce Application Interaction](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-methods-app-integration.md)** Open CTI lets your CTI system interact with the Salesforce application, including elements on a Case Feed page. - **[Methods for Computer-Telephony Integration (CTI)](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-methods-cti.md)** Open CTI lets you integrate your CTI system with Salesforce. # Methods for the Utility Bar in Lightning Experience The utility bar houses Aura components and Lightning web components, providing users quick access to tools they use often. The utility bar is available in Lightning Experience only. Both Lightning Web Components (LWC) and Aura Components support the utility bar methods, with usage differences noted on each method. To understand how the utility bar methods for LWC map to the methods for Aura Components, see [Utility Bar API Method Parity](https://developer.salesforce.com/docs/service/sforce-api-console-js-utility-parity.md). These methods are available for working with the utility bar. - **[disableUtilityPopOut() for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/utilitybarapi/sforce-api-console-lightning-disableutilitypopout.md)** Disables pop-out for a utility. This method isn’t supported for Lightning Web Components (LWC). - **[enableModal() for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/utilitybarapi/sforce-api-console-lwc-enablemodal.md)** Toggles modal mode for a utility. While in modal mode, an overlay blocks users from using the console while the utility panel is visible. This method is available for Lightning Web Components (LWC) only. - **[enablePopout() for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/utilitybarapi/sforce-api-console-lwc-enablepopout.md)** Toggles pop-out mode on a utility. Enabling pop-out mode on a utility displays the utility in a separate child window. This method is available for Lightning Web Components (LWC) only. - **[getAllUtilityInfo() for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/utilitybarapi/sforce-api-console-lightning-getallutilityinfo.md)** Returns the state of all utilities as an array of `utilityInfo` objects. - **[getEnclosingUtilityId() for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/utilitybarapi/sforce-api-console-lightning-getenclosingutilityid.md)** Returns the ID of the enclosing utility, or false if not within a utility. This method isn’t supported for Lightning Web Components (LWC). - **[getInfo() for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/utilitybarapi/sforce-api-console-lwc-getinfo.md)** Returns the state of the current utility as a `utilityInfo` object. This method is available for Lightning Web Components (LWC) only. - **[getUtilityInfo() for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/utilitybarapi/sforce-api-console-lightning-getutilityinfo.md)** Returns the state of the current utility as a `utilityInfo` object. This method isn’t supported for Lightning Web Components (LWC). - **[isUtilityPoppedOut() for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/utilitybarapi/sforce-api-console-lightning-isutilitypoppedout.md)** Determines whether the utility is in a popped-out state. This method isn’t supported for Lightning Web Components (LWC). - **[minimize() for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/utilitybarapi/sforce-api-console-lwc-minimize.md)** Minimizes a utility. This method is available for Lightning Web Components (LWC) only. - **[minimizeUtility() for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/utilitybarapi/sforce-api-console-lightning-minimizeitem.md)** Minimizes a utility. This method isn’t supported for Lightning Web Components (LWC). - **[onUtilityClick() for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/utilitybarapi/sforce-api-console-lightning-onutilityclick.md)** Registers an `eventHandler` for the utility. This `eventHandler` is called when the utility is clicked. - **[open() for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/utilitybarapi/sforce-api-console-lwc-open.md)** Opens a utility. If the utility is already open, this method has no effect. Only one utility can be open at a time. If another utility is already open, `open()` minimizes the utility. This method is available for Lightning Web Components (LWC) only. - **[openUtility() for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/utilitybarapi/sforce-api-console-lightning-openutility.md)** Opens a utility. If the utility is already open, this method has no effect. Only one utility can be open at a time. If another utility is already open, `openUtility()` minimizes the utility. This method isn’t supported for Lightning Web Components (LWC). - **[setPanelHeaderIcon() for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/utilitybarapi/sforce-api-console-lightning-setpanelheadericon.md)** Sets the icon of a utility’s panel. This icon is displayed in the utility panel header. This method isn’t supported for Lightning Web Components (LWC). - **[setPanelHeaderLabel() for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/utilitybarapi/sforce-api-console-lightning-setpanellabel.md)** Sets the label of a utility’s panel. This label is displayed in the utility panel header. This method isn’t supported for Lightning Web Components (LWC). - **[setPanelHeight() for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/utilitybarapi/sforce-api-console-lightning-setpanelheight.md)** Sets a utility panel’s height. This method isn’t supported for Lightning Web Components (LWC). - **[setPanelWidth() for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/utilitybarapi/sforce-api-console-lightning-setpanelwidth.md)** Sets a utility panel’s width. This method isn’t supported for Lightning Web Components (LWC). - **[setUtilityHighlighted() for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/utilitybarapi/sforce-api-console-lightning-setutilityhighlighted.md)** Sets a utility as highlighted, giving it a badge and a more prominent background color. This method isn’t supported for Lightning Web Components (LWC). - **[setUtilityIcon() for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/utilitybarapi/sforce-api-console-lightning-setutilityicon.md)** Sets the icon of a utility. This icon is displayed in the utility bar. This method isn’t supported for Lightning Web Components (LWC). - **[setUtilityLabel() for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/utilitybarapi/sforce-api-console-lightning-setutilitylabel.md)** Sets the label of a utility. This text is displayed in the utility bar. This method isn’t supported for Lightning Web Components (LWC). - **[toggleModalMode() for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/utilitybarapi/sforce-api-console-lightning-togglemodalmode.md)** Toggles modal mode for a utility. While in modal mode, an overlay blocks users from using the console while the utility panel is visible. This method isn’t supported for Lightning Web Components (LWC). - **[updatePanel() for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/utilitybarapi/sforce-api-console-lwc-updatepanel.md)** Specifies a label and icon on the utility panel, and provides a height and width for the panel. This method is available for Lightning Web Components (LWC) only. - **[updateUtility() for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/utilitybarapi/sforce-api-console-lwc-updateutility.md)** Specifies a label and icon on the utility bar, and sets a utility as highlighted. This method is available for Lightning Web Components (LWC) only. - **[EnclosingUtilityId Context Wire Adapter for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/utilitybarapi/sforce-api-console-lwc-enclosingutilityid.md)** Determines if the component is within a utility. This wire adapter is available for Lightning Web Components (LWC) only. # Methods for Workspace Tabs and Subtabs in Lightning Experience A Lightning console app displays Salesforce pages as workspace tabs or subtabs. A workspace tab displays the main work item or record, such as an account. A subtab displays related records, such as an account’s contacts or opportunities. These methods work with workspace tabs and subtabs in Lightning console apps. Both Lightning Web Components (LWC) and Aura Components are supported unless otherwise specified. **note:** Keep in mind that tabIds are case sensitive. - **[addToBrowserTitleQueue() for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/workspaceapi/sforce-api-console-lightning-addtobrowsertitlequeue.md)** Adds a string to a list of titles that rotate in the browser title bar every three seconds.This method works only in Lightning console apps. This method isn’t supported for Lightning Web Components (LWC). - **[closeTab() for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/workspaceapi/sforce-api-console-lightning-closetab.md)** Closes a workspace tab or subtab. This method works only in Lightning console apps. - **[disableTabClose() for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/workspaceapi/sforce-api-console-lightning-disabletabclose.md)** Prevents a workspace tab or subtab from closing. This method removes the close button from a tab or subtab, and disables the keyboard shortcuts that close tabs and subtabs. This method works only in Lightning console apps. - **[focusTab() for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/workspaceapi/sforce-api-console-lightning-focustab.md)** Focuses a workspace tab or subtab. This method works only in Lightning console apps. - **[generateConsoleUrl() for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/workspaceapi/sforce-api-console-lightning-generateconsoleurl.md)** Generates a URL for a workspace tab and its subtabs. This method works only in Lightning console apps. This method isn’t supported for Lightning Web Components (LWC). - **[getAllTabInfo() for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/workspaceapi/sforce-api-console-lightning-getalltabinfo.md)** Returns information about all open tabs. This method works only in Lightning console apps. - **[getEnclosingTabId() for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/workspaceapi/sforce-api-console-lightning-getenclosingtabid.md)** Returns the ID of the enclosing tab. This method isn’t supported for Lightning Web Components (LWC). - **[getFocusedTabInfo() for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/workspaceapi/sforce-api-console-lightning-getfocusedtabinfo.md)** Returns information about the focused workspace tab or subtab. This method works only in Lightning console apps. - **[getTabInfo() for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/workspaceapi/sforce-api-console-lightning-gettabinfo.md)** Returns information about the specified tab. This method works only in Lightning console apps. - **[getTabURL() for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/workspaceapi/sforce-api-console-lightning-gettaburl.md)** Returns the URL of the specified tab. This method works only in Lightning console apps. This method isn’t supported for Lightning Web Components (LWC). - **[isConsoleNavigation() for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/workspaceapi/sforce-api-console-lightning-isconsolenavigation.md)** Determines whether the app it’s used within uses console navigation. This method isn’t supported for Lightning Web Components (LWC). - **[isSubtab() for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/workspaceapi/sforce-api-console-lightning-issubtab.md)** Checks whether a tab is a subtab. This method works only in Lightning console apps. This method isn’t supported for Lightning Web Components (LWC). - **[openConsoleUrl() for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/workspaceapi/sforce-api-console-lightning-openconsoleurl.md)** Opens a URL generated by `generateConsoleUrl()`. This method works only in Lightning console apps. This method isn’t supported for Lightning Web Components (LWC). - **[openSubtab() for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/workspaceapi/sforce-api-console-lightning-opensubtab.md)** Opens a subtab within a workspace tab. If the subtab is already open, the subtab is focused. This method works only in Lightning console apps. - **[openTab() for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/workspaceapi/sforce-api-console-lightning-opentab.md)** Opens a new workspace tab. If the tab is already open, the tab is focused. - **[refreshTab() for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/workspaceapi/sforce-api-console-lightning-refreshtab.md)** Refreshes a workspace tab or a subtab specified by `tabId`. Keep in mind that the first subtab has the same `tabId` as the workspace tab. This method works only in Lightning console apps. - **[removeFromBrowserTitleQueue() for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/workspaceapi/sforce-api-console-lightning-removefrombrowsertitlequeue.md)** Removes a string from a list of titles that rotate in the browser title bar every three seconds. This method works only in Lightning console apps. This method isn’t supported for Lightning Web Components (LWC). - **[setTabHighlighted() for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/workspaceapi/sforce-api-console-lightning-settabhighlighted.md)** Highlights the specified tab with a different background color and a badge. Tab highlights don’t persist after reloading a Lightning console app. This method works only in Lightning console apps. - **[setTabIcon() for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/workspaceapi/sforce-api-console-lightning-settabicon.md)** Sets the icon and alternative text of the specified tab. This method works only in Lightning console apps. - **[setTabLabel() for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/workspaceapi/sforce-api-console-lightning-settablabel.md)** Sets the label of the specified tab. This method works only in Lightning console apps. - **[EnclosingTabId Context Wire Adapter for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/workspaceapi/sforce-api-console-lwc-enclosingtabid.md)** Returns the ID of the enclosing tab or subtab. This wire adapter is available for Lightning Web Components (LWC) only. - **[IsConsoleNavigation Context Wire Adapter for Lightning Experience](https://developer.salesforce.com/docs/service/api-console/workspaceapi/sforce-api-console-lwc-isconsolenavigation.md)** Determines whether the app it’s used within uses console navigation. This wire adapter is available for Lightning Web Components (LWC) only. # Migrate Custom UI Integration: Voice Extensions, Voice Toolkit, LMS Bridge In Open CTI, custom UI lived inside the adapter iframe and pushed data to the page via `opencti.*` calls or `window.postMessage`. In Salesforce Voice with Partner Telephony, four dedicated mechanisms replace this: Voice Extensions, Voice Toolkit, LMS bridge, and custom Lightning events. ## Voice Extensions: Before, During, and After Call UI A Voice Extension is a Lightning page (FlexiPage of type `VoiceExtension`) that Salesforce renders inside the softphone panel alongside the standard call controls. It is visible pre-call (when the rep is signed in but not on a call), during the call, and during ACW (post-call). Use it for custom IVR data display, call notes, knowledge prompts, after-call disposition forms, anything the rep needs at any phase of the call lifecycle. Voice Extensions are assigned to a Contact Center. See [Customize Call Controls and Voice Extensions](https://help.salesforce.com/s/articleView?id=service.voice_pt_setup_extensions.htm&type=5). The LWC must declare in `.js-meta.xml`: - Target: `lightning__VoiceExtension` - Capability: `lightning__ServiceCloudVoiceToolkitApi` ```xml 57.0 true lightning__VoiceExtension lightning__ServiceCloudVoiceToolkitApi ``` ## Voice Toolkit The Voice Toolkit, the `lightning-service-cloud-voice-toolkit-api` base component, gives a Voice Extension LWC access to live telephony events. It's a Lightning base component that you embed in the template and query via `this.template.querySelector('lightning-service-cloud-voice-toolkit-api')`. The Voice Extension FlexiPage is the primary context, but the Voice Toolkit API can also be invoked from components on a record page when the host page has access to the Salesforce Voice with Partner Telephony capability and the rep is signed into Omni-Channel. ## LMS Bridge Once a Voice Extension has call data from the toolkit, it relays to LWCs anywhere on the page via LMS. Salesforce ships a standard channel: `ServiceCloudVoiceMessageChannel__c`. The pattern: - Voice Extension publishes with `source: 'CONNECTOR'` - Subscribers use `APPLICATION_SCOPE` and filter out their own messages ```javascript import { publish, subscribe, APPLICATION_SCOPE, MessageContext } from "lightning/messageService"; import SAMPLEMC from "@salesforce/messageChannel/ServiceCloudVoiceMessageChannel__c"; export default class LwcBridge extends LightningElement { @wire(MessageContext) messageContext; @api handleMessage; connectedCallback() { subscribe( this.messageContext, SAMPLEMC, (message) => { if (message.source !== "CONNECTOR") { this.handleMessage(message.payload); } }, { scope: APPLICATION_SCOPE }, ); } } ``` ## Custom Lightning Events To learn more about custom Lightning events, see [Communicate with Events](https://developer.salesforce.com/docs/platform/lwc/guide/events.html). ## When to Use Each Tool | Tool | Use When | | ----------------------------------------------------------- | ---------------------------------------------------------------------------------- | | Voice Extension | Building any custom UI in the softphone panel area | | Voice Toolkit (`lightning-service-cloud-voice-toolkit-api`) | Voice Extension LWC (or record-page LWC) needs live call events from the connector | | LMS (`ServiceCloudVoiceMessageChannel__c` or custom) | Relaying call data from Voice Extension to record page LWCs | | Custom Lightning Events | Parent-child or sibling communication within the same Voice Extension region | ## See Also - [Voice Toolkit API — Component Reference](https://developer.salesforce.com/docs/component-library/bundle/lightning-service-cloud-voice-toolkit-api/documentation) - [VoiceCall Object Reference](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_voicecall.htm) - [Omni Toolkit API — Component Reference](https://developer.salesforce.com/docs/component-library/bundle/lightning-omni-toolkit/documentation) # Migrate Multiparty and Transfer Calls Salesforce Voice with Partner Telephony supports four multiparty patterns. | UI Button | Pattern | SDK Entry Point | | -------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | | Blind Transfer (when `hasBlindTransfer` capability is enabled) | Rep dials target, drops immediately. | `addParticipant(contact, call, isBlindTransfer=true)` | | New Call | Rep dials target, stays to announce, then drops. | `addParticipant(contact, call, isBlindTransfer=false)` | | New Call (when `canConsult` capability is enabled) | Rep dials a private leg while the original call is on a type of hold without music. | `dial(contact, new DialOptions({ isConsultCall: true }))` | | Add Caller | A new participant is immediately merged. | `addParticipant(contact, call, isBlindTransfer=false)` with `call.callAttributes.isAutoMergeOn: true` | **note:** The UI controls are gated by capability flags returned from `getVoiceCapabilities()`. The Blind Transfer button only appears when `hasBlindTransfer: true`. The consult variant of New Call appears only when `canConsult: true`. If you don't enable a capability, the UI control doesn't render. ## VoiceCall Records and Leg Linking Each call leg gets its own new VoiceCall record (`0LQ...`), created server-side before publishing the leg's `CALL_STARTED`. Set `parentVoiceCallId` to link the child leg back to the parent. ## Prerequisite: Declare Capabilities ```javascript async getVoiceCapabilities() { return new VoiceCapabilitiesResult({ hasBlindTransfer: true, // enables blind transfer via New Call canConsult: true, // enables warm transfer and consult via New Call hasMerge: true, hasSwap: true, }); } ``` ## Blind Transfer The framework sends `ADD_PARTICIPANT` with `isBlindTransfer=true`. Your connector adds the new participant on the backend and returns. The framework automatically fires `HANGUP` for the original call. You don't publish it yourself. ## Warm Transfer The framework sends `ADD_PARTICIPANT` but `isBlindTransfer=false`. The rep stays to announce the transfer, then manually ends their own leg. When the rep drops, the framework fires `PARTICIPANT_REMOVED` (not `HANGUP`). ## Consult The rep dials a private second leg while the original call is held. The framework sends `DIAL` with `isConsultCall: true`. Then there are three options for what happens next. | Rep Action | Connector Method | Event Framework Fires | | ---------------------------- | -------------------- | ----------------------------- | | Merge all into conference | `conference(calls)` | `PARTICIPANTS_CONFERENCED` | | Swap which leg is active | `swap(call1, call2)` | `PARTICIPANTS_SWAPPED` | | End consult, resume original | `endCall(call)` | `HANGUP` for consult leg only | ## Add Caller or Auto-Merge Conference The new participant is immediately merged into a live conference. Set `isAutoMergeOn: true` in `PhoneCallAttributes` of the `ParticipantResult` so Salesforce knows to suppress the hold button for that leg. ## See Also - [Multiparty and Consult Calls — Partner Telephony Developer Guide](https://developer.salesforce.com/docs/atlas.en-us.voice_pt_developer_guide.meta/voice_pt_developer_guide/voice_pt_multiparty_consult_calls.htm) # Migrate Rep Presence Status Manage rep presence through Omni-Channel instead of your previous Open CTI pattern. Open CTI doesn't natively integrate with Omni-Channel for presence. Adapters that managed presence typically did one of the following: - Maintained an in-adapter presence widget that didn't talk to Omni-Channel at all - Mirrored adapter status to Omni-Channel via custom Apex REST endpoints setting `UserServicePresence` - Relied on the rep manually changing their Omni-Channel status in the UI This means for many Open CTI orgs, there is no Omni-Channel integration to migrate from. You're moving from "adapter has its own presence" to "Omni-Channel owns presence." ## What Omni-Channel Does and Doesn't Do Omni-Channel is channel-agnostic. It manages presence across Voice, Chat, Messaging, Cases, and more for the same rep. A single presence status (for example, "Available") can signal readiness for routing across all enabled channels. Omni-Channel does **not** change presence status when a rep accepts a call. When a rep takes a call, they go "busy" from a routing standpoint. Their capacity is consumed via AgentWork, but their Omni-Channel presence status itself doesn't change. They're still "Available." Capacity is the routing-side concept. Presence is the user-facing concept; they're decoupled. Omni-Channel does **not** set status to anything during the call. Reps stay on their selected presence status throughout the call. The "I'm on a call" indicator comes from AgentWork, not from presence status. `enqueueNextState` is the bridge between rep intent ("I want to go offline") and call lifecycle ("but they're still on a call"). Without it, premature status changes drop calls. **note:** Partners coming from non-Omni-Channel telephony platforms expect an explicit "On Call" status. There isn't one in Omni-Channel. The rep stays Available; their capacity is fully consumed by AgentWork for the duration. We recommend covering this in your training materials. ## Salesforce Voice with Partner Telephony Pattern for Presence Status Your connector responds to Omni-Channel in the new Salesforce Voice with Partner Telephony pattern. Here's an example of how to handle changes in rep status. ```javascript async setAgentStatus(agentStatus, statusInfo, enqueueNextState) { // agentStatus: 'Online' | 'Offline' | 'AfterCallWork' | if (enqueueNextState) { // Rep clicked "Go Offline" mid-call — apply AFTER the call ends await myBackend.queueStatusChange(agentStatus); } else { await myBackend.setStatus(agentStatus); } // Return a Promise } async getSharedCapabilities() { return new VoiceCapabilitiesResult({ hasPendingStatusChange: true, // enables enqueueNextState behavior hasTransferToOmniFlow: true, }); } ``` **important:** Skipping `enqueueNextState` causes dropped calls. If you apply Offline immediately while a call is active, your backend tears down the rep's session, and the call drops. Offline is the worst status to flip to mid-call. This is the root cause of numerous support cases with partner telephony. Always honor the `enqueueNextState` flag. # Migrate Reporting Unlike Open CTI, VoiceCall is the primary reporting object for Salesforce Voice with Partner Telephony. | Custom Metric | Salesforce Voice with Partner Telephony Equivalent | | ---------------- | -------------------------------------------------------- | | Call duration | `VoiceCall.CallDurationInSeconds` | | Queue wait time | `VoiceCall.CallWaitTime` | | Transfer count | `VoiceCallParticipant` child records | | Recording URL | `VoiceCallRecording.MediaDocumentId` | | Rep who answered | `VoiceCall.OwnerId` | | Disposition | `VoiceCall.CallDisposition` | | Custom fields | `VoiceCall.AdditionalFields` (JSON) or custom UDD fields | For Salesforce Voice (Native Telephony), [configure prebuilt reports and dashboards](https://help.salesforce.com/s/articleView?id=service.afcc_sv_configure_reports.htm&type=5). The Voice CRM Analytics app also provides out-of-the-box dashboards for other Voice telephony models. See [Track Contact Center KPIs with the CRM Analytics App](https://help.salesforce.com/s/articleView?id=service.voice_setup_analytics.htm&type=5) to learn more. # Migrate Screen Pop Replace the Open CTI screen pop pattern with an Omni-Channel flow screen pop action. The Open CTI pattern looks like this: ```javascript sforce.opencti.screenPop({ type: sforce.opencti.SCREENPOP_TYPE.SOBJECT, params: { recordId: contactId } }); ``` The screen pop in Salesforce Voice with Partner Telephony is a declarative Omni-Channel Flow action triggered at routing time, server-side. You configure it using Flow Builder, not adapter JS. **note:** Screen pops don't work with apps that use standard navigation. Screen pops work only if a service rep is accepting work from an app using console navigation. ## Build the Flow 1. In Setup, enter **Flows** in the Quick Find box, then select **Flows**. 2. Click **New Flow**, then search for and select **Omni-Channel Flow**. 3. Configure the flow by adding elements and actions. Your flow will be unique to your business logic. ![Example Omni-Channel flow to replace screenpop](https://developer.salesforce.com/docs/media/api-cti/cti-migrate-screenpop-example.png) 4. Save and activate your flow. ## Assign the Flow to Your Voice Channel 1. From Setup, enter **Contact Centers** into the Quick Find box, then select **Partner Telephony Contact Centers**. 2. Select your contact center. 3. Under **Channels**, select your channel and edit the **Routing** information to assign the flow. ## Full Screen Pop Migration Mapping | Open CTI Call | Omni-Channel Flow Equivalent | | ----------------------------------------------- | ---------------------------------------------------------------- | | `screenPop(SCREENPOP_TYPE.SOBJECT, recordId)` | Route Work → Screen Pop → SObject Record | | `screenPop(SCREENPOP_TYPE.SEARCH_PAGE, params)` | Route Work → Screen Pop → Search | | `screenPop(SCREENPOP_TYPE.NEW, defaultFields)` | Route Work → Screen Pop → New Record + field prepopulation | | `screenPop(SCREENPOP_TYPE.URL, url)` | Route Work → Screen Pop → URL | | Custom lookup + `screenPop` | Get Records (Contact/Account by phone) + Route Work → Screen Pop | ## See Also - [Salesforce Help: Add a Screen Pop Action to a Flow](https://help.salesforce.com/s/articleView?id=service.omnichannel_add_screen_pop_action.htm&type=5) - [Salesforce Help: Use Multiple Screen Pop Actions in a Flow](https://help.salesforce.com/s/articleView?id=service.omnichannel_multiple_screen_pop_actions.htm&type=5) — useful when you need conditional pops based on call attributes (caller is known vs. unknown, calling for different products, etc.) # Migrate Supervisor Features To migrate supervisor features that are custom-built in Open CTI, use built-in methods for Salesforce Voice with Partner Telephony. | Open CTI (Custom) | Salesforce Voice with Partner Telephony | | ---------------------------------------- | ------------------------------------------------- | | Custom "listen in" via separate call leg | `superviseCall()` → `SUPERVISOR_CALL_STARTED` | | Custom barge-in | `supervisorBargeIn()` → `SUPERVISOR_BARGED_IN` | | Custom disconnect | `supervisorDisconnect()` → `SUPERVISOR_HANGUP` | | Custom supervisor dashboard | Command Center for Service uses VoiceCall records | The `getVoiceCapabilities()` method indicates which voice capabilities your connector supports. ```javascript async getVoiceCapabilities() { return new VoiceCapabilitiesResult({ hasMute: true, hasRecord: true, hasMerge: true, hasSwap: true, canConsult: true, hasBlindTransfer: true, hasSupervisorListenIn: true, hasSupervisorBargeIn: true, }); } ``` # Migrate the Single Call Flow This is the connector contract for the most common case: one inbound call, accepted, connected, and ended. | Lifecycle Moment | Direction | What Happens | | ------------------------------------- | ---------------------- | ------------------------------------------------------------ | | Call rings on backend | Connector → Salesforce | `publishEvent(CALL_STARTED, { call })` with `state: RINGING` | | Rep clicks Accept | Salesforce → Connector | `acceptCall(call)` → return `Promise` | | Framework publishes | (auto) | Framework publishes `CALL_CONNECTED` from your `CallResult` | | Rep clicks Mute | Salesforce → Connector | `mute(call)` → return `Promise` | | Rep clicks End Call | Salesforce → Connector | `endCall(call)` → return `Promise` | | Framework publishes | (auto) | Framework publishes `HANGUP` from your `HangupResult` | | Customer hangs up first | Connector → Salesforce | `publishEvent(HANGUP, { calls: [call], reason })` | | ACW timer expires or rep ends wrap-up | Salesforce → Connector | `wrapUpCall(call)` → return `Promise` | # Migrate Your Open CTI Integration to Salesforce Voice with Partner Telephony Move your existing Open CTI integration to a Voice implementation by using planning resources, conceptual comparisons, step-by-step migration tasks, and troubleshooting guidance. This guide is for partners and independent software vendors migrating an existing Open CTI (Lightning) package to a Salesforce Voice with Partner Telephony connector built on Partner Telephony. For Salesforce admins moving from Open CTI to Salesforce Voice with Partner Telephony, see the [Migrate from Open CTI](https://help.salesforce.com/s/articleView?id=service.cti_migrate_map.htm) learning map in Salesforce Help. **important:** Open CTI is in maintenance mode and is scheduled for retirement in February 2028. No new features or enhancements are being added to Open CTI. Effective immediately, Open CTI is deprecated and unavailable for newly created Agentforce Service orgs. To ensure long-term compatibility and access to the latest innovations, we recommend transitioning your development efforts to Salesforce Voice. For more information, see this [Knowledge Article](https://help.salesforce.com/s/articleView?id=005306437&type=1), [learning map](https://help.salesforce.com/s/articleView?id=service.cti_migrate_map.htm), and [developer migration guide](/docs/service/api-cti/guide/migrate-cti.html). - **[Plan Your Migration](https://developer.salesforce.com/docs/service/api-cti/guide/plan-cti-migration.md)** Use the migration checklist and key resources to plan your move from Open CTI to Salesforce Voice with Partner Telephony. - **[Compare the Conceptual Models of Open CTI and Salesforce Voice with Partner Telephony](https://developer.salesforce.com/docs/service/api-cti/guide/compare-opencti-voice.md)** Understand the architectural and data model differences between Open CTI and Salesforce Voice with Partner Telephony, including the shift from Task records to VoiceCall records. - **[Clone Before You Build](https://developer.salesforce.com/docs/service/api-cti/guide/clone-before-build.md)** Start your migration from the demo connector rather than building from scratch. - **[Build Your Connector](https://developer.salesforce.com/docs/service/api-cti/guide/build-connector.md)** Replace Open CTI adapter logic with Salesforce Voice with Partner Telephony connector methods and events, starting from the demo connector. - **[Migrate the Single Call Flow](https://developer.salesforce.com/docs/service/api-cti/guide/migrate-single-call.md)** For the most common case, one inbound call, accepted, connected, and ended, this is the connector contract. - **[Migrate Multiparty and Transfer Calls](https://developer.salesforce.com/docs/service/api-cti/guide/migrate-multiparty-transfer.md)** Salesforce Voice with Partner Telephony supports four multiparty patterns. - **[Migrate Custom UI Integration](https://developer.salesforce.com/docs/service/api-cti/guide/custom-ui-integration.md)** Replace Open CTI iframe-based UI patterns with Voice Extensions, Voice Toolkit, and LMS. - **[Migrate Screen Pop](https://developer.salesforce.com/docs/service/api-cti/guide/migrate-screen-pop.md)** Replace the Open CTI screen pop pattern with an Omni-Channel flow screen pop action. - **[Migrate Rep Presence Status](https://developer.salesforce.com/docs/service/api-cti/guide/migrate-presence-status.md)** Manage rep presence through Omni-Channel instead of your previous Open CTI pattern. - **[Migrate Supervisor Features](https://developer.salesforce.com/docs/service/api-cti/guide/migrate-supervisor.md)** Replace custom-built Open CTI supervisor features with built-in Salesforce Voice with Partner Telephony connector methods. - **[Migrate Reporting](https://developer.salesforce.com/docs/service/api-cti/guide/migrate-reporting.md)** Use VoiceCall as the primary reporting object in Salesforce Voice with Partner Telephony. - **[Address Migration Roadblocks](https://developer.salesforce.com/docs/service/api-cti/guide/troubleshoot-migration.md)** Learn about common migration roadblocks and how to address them. # minimize() for Lightning Experience Minimizes a utility. This method is available for Lightning Web Components (LWC) only. ## Arguments |Name|Type|Description| |----|----|-----------| |`utilityId`|string|The ID of the utility for which to minimize.| ## LWC Sample Code This component minimizes a utility. ```javascript import { LightningElement, wire } from 'lwc'; import { minimize, EnclosingUtilityId } from 'lightning/platformUtilityBarApi'; export default class MinimizeUtilityExample extends LightningElement { @wire(EnclosingUtilityId) utilityId; async handleMinimize() { try { if (!this.utilityId) { return; } // Minimize the utility bar panel const isMinimized = await minimize(this.utilityId); console.log(`Minimize utility ${isMinimized ? 'successfully' : 'failed'}`); } catch (error) { // handle error } } } ``` To make your component available for use in a utility bar, specify the `lightning__UtilityBar` target in the [component’s configuration file](https://developer.salesforce.com/docs/platform/lwc/guide/use-config-for-utility-bar.html). ## Response Returns a promise that resolves to `true` if successful. The promise is rejected on error. **See Also** - [*LWC Dev Guide*: Understand the Wire Service](https://developer.salesforce.com/docs/platform/lwc/guide/data-wire-service-about.html) # minimizeUtility() for Lightning Experience Minimizes a utility. This method isn’t supported for Lightning Web Components (LWC). For LWC usage, see [minimize()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-lwc-minimize.md). ## Arguments |Name|Type|Description| |----|----|-----------| |`utilityId`|string|The ID of the utility to minimize. Optional when called within a utility.| ## Aura Components Sample Code This component minimizes the utility when the button is pressed. Component code: ```html ``` Controller code: ```javascript ({ handleMinimizeUtility : function(component, event, helper) { var utilityAPI = component.find("utilitybar"); utilityAPI.minimizeUtility(); } }) ``` ## Response This method returns a promise that, upon success, resolves to `true`. # Mobile Device Represents a Mobile Device configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Compute. ## Configuration Item Type Definition ||| |-|-| |Name|Mobile Device| |Developer Name|`SD_MoDe`| |Component|No| |End User Compute/Unmetered|Yes| |Parent|[Compute](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-compute.md)| |Rule Name|Default rule for all DSL Modem| |Identifier(s)|MAC address| ## Attributes No associated attributes for this configuration item type. # Mobile Phone Represents a Mobile Phone configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Mobile Device. ## Configuration Item Type Definition ||| |-|-| |Name|Mobile Phone| |Developer Name|`SD_MoPh`| |Component|No| |End User Compute/Unmetered|Yes| |Parent|[Mobile Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-mobile-device.md)| |Rule Name|Default rule for all Unknown Devices| |Identifier(s)|MAC address| ## Attributes No associated attributes for this configuration item type. # Model Workplace Reopening with Shift Management Shift Management for Work.com streamlines the process of getting your employees back to work safely. With Shift Management, you can model the capacity of your workplace facilities and resources. Taking into account new requirements and policies, you can specify how many people to allow onsite at a time. - **[Shift Management Data Triggers](https://developer.salesforce.com/docs/service/workdotcom-dev/guide/wkfsl-shift-management-data-triggers.md)** Work.com installs and uses data triggers for Shift Management on Employee, Location, Service Appointment, and Service Territory Member. Adding or modifying records for these objects can trigger changes in related objects. It’s also possible to disable some triggers for data loads. - **[Shift Records Sharing Flow](https://developer.salesforce.com/docs/service/workdotcom-dev/guide/wkfsl-shift-management-shift-records-sharing-flow.md)** The Create Shift Share Records flow checks if the Service Territory is populated when you create a Shift. If it is populated, the flow creates a Shift Share record so that the employee has visibility to their Shift. - **[Shift Management for Work.com Object Reference](https://developer.salesforce.com/docs/service/workdotcom-dev/guide/wkfsl-shift-management-object-reference-intro.md)** The Shift Management package includes several custom objects and fields that are described in this section. Shift Management requires Workplace Command Center and it builds on Field Service objects and capabilities such as service appointments and schedule optimization. # Modify a Multi-Resource Service Appointment Use Salesforce Scheduler APIs to modify a multi-resource service appointment. This use case explains how you can change the secondary service resources or the time slot of an existing multi-resource appointment. This topic explains how you can modify a multi-resource appointment by using the custom application that you built for creating appointments. A multi-resource service appointment includes more than one service resource, with one service resource set as the primary resource. Modifying the resources of a multi-resource service appointment presents an additional challenge. The time slot of such an appointment must match the availability of the resources from a particular work type group within a service territory. This use case is applicable when a secondary resource of a multi-resource appointment marks themselves absent. In that scenario, the appointment must be updated with an available resource. The absent resources, however, must ensure to mark themselves as absent in Salesforce Scheduler. Otherwise, the API request to retrieve the list of service resources continues to include the resources that are currently unavailable or absent. The steps in this section provide a high-level overview of how you can let users choose different service resources or an alternate time slot for an existing multi-resource service appointment. The use case provides the steps to modify the secondary resources. You can’t modify the primary resource by using the steps provided in this section. To modify the primary resource of a multi-resource appointment, you must delete the original appointment first. Then, create a new appointment with an available service resource set as the primary resource. **note:** Multi-resource appointments do not work when the concurrent scheduling feature is enabled. Make sure the concurrent scheduling feature is disabled in Salesforce Scheduler. ![A representation of the modify a multi-resource service appointment flow.](https://developer.salesforce.com/media/salesforce-scheduler-dev-guide/flow_modify_multires_booking.png) - **[Authenticate with Salesforce Scheduler APIs](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc7-scheduler-api-auth.md)** The first step in an API-based integration is to connect to Salesforce and get an access token using OAuth. OAuth access token authentication is the most secure way to authenticate SOAP and REST API calls. - **[Get Service Appointments](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc7-get-service-appointments.md)** A service appointment represents an appointment booked through Salesforce Scheduler. Use the `query` request on the `ServiceAppointment` object to retrieve a list of service appointments. - **[Get Service Appointment Details](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc7-get-service-appointment-details.md)** A service appointment represents an appointment booked through Salesforce Scheduler. Use the GET method on the Service Appointment object to fetch the details of a service appointment record. - **[Change Appointment Details](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc7-change-appointment-details.md)** This section explains how you can show either the service resources or time slots page based on what the user chooses to change for the appointment. Depending on the requirement, you can choose one of the two options. - **[Update Service Appointments](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc7-update-service-appointment.md)** A service appointment represents an appointment booked through Salesforce Scheduler. Make a PATCH request on the `service-appointments` Connect API to update a multi-resource service appointment. # Modify a Service Appointment Use Salesforce Scheduler APIs to modify a service appointment. This use case explains how you can change the engagement channel, service resource, time slot, or status of an existing appointment. However, you can also modify other details of the appointment in a similar fashion. For example, to change the service territory, use the `service-territories` Connect API. This topic explains how you can modify an appointment using the custom application that you built for creating appointments. **note:** For the procedure to be successful, ensure that each unavailable resource marks themselves as absent in Salesforce Scheduler. Otherwise, the API request to retrieve the list of service resources continues to include the resources that are currently unavailable or absent. These steps provide a high-level overview of how you can let users choose a different engagement channel type, service resource, or time slot for an existing service appointment. ![A representation of the modify service appointment flow.](https://developer.salesforce.com/media/salesforce-scheduler-dev-guide/flow_modify_an_appointment.png) 1. [Authenticate with a Connected App](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc4-scheduler-api-auth.md) The OAuth access token authentication is the most secure way to authenticate SOAP and REST API calls. Before you use Salesforce Scheduler for API-based integration, authenticate the API calls using OAuth. 2. [Get Service Appointments](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc4-get-service-appointments.md) A service appointment represents an appointment booked through Salesforce Scheduler. 3. [Get Service Appointment Details](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc4-get-service-appointment-details.md) A service appointment represents an appointment booked through Salesforce Scheduler. 4. [Change Appointment Details](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc4-change-appointment-details.md) This section explains how you can show either the engagement channel types, service resources, or time slots page based on what the user chooses to change for the appointment. 5. [Update Service Appointments](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc4-update-service-appointment.md) Show your users the details of a service appointment—an appointment modified through Salesforce Scheduler—so that users can review and update the appointment. # Modify an Anonymous Appointment This use case explains how to change the service resource of an existing anonymous service appointment by using Salesforce Scheduler APIs. Typically, anonymous appointments are scheduled when users who don't belong to your organization request for appointments. For example, a subscriber of your app requests for an appliance maintenance appointment from your service app. After a service appointment is scheduled by using the anonymous mechanism, the service resource for the appointment can mark themselves unavailable. In that scenario, as an administrator or an appointment orchestrator for your organization, ensure that you modify the anonymous service appointment and assign a different resource to the appointment. **note:** For the procedure to be successful, ensure that each unavailable resource marks themselves as absent in Salesforce Scheduler. Otherwise, the API request to retrieve the list of service resources continues to include the resources that are currently unavailable or absent. This flowchart provides an overview of the procedure: ![A representation of the flow to modify an anonymous service appointment when the associated resource is unavailable.](https://developer.salesforce.com/media/salesforce-scheduler-dev-guide/flow_modify_anonymous_booking.png) 1. [Authenticate with a Connected App](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc5-scheduler-api-auth.md) The first step in an API-based integration is to connect to Salesforce and get an access token by using OAuth. OAuth access token authentication is the most secure way to authenticate SOAP and REST API calls. 2. [Get Service Appointments](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc5-get-service-appointments.md) The `AssignedResource` object represents a service resource who is assigned to a service appointment in Salesforce Scheduler. Retrieve service appointment IDs of all scheduled appointments associated with specific resources by using the `query` request on the `AssignedResource` object. 3. [Get Service Appointment Details](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc5-get-service-appointment-details.md) A service appointment represents an appointment that’s booked via Salesforce Scheduler. Use a GET method to fetch the details of a service appointment record. 4. [Get Available Resources](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc5-get-available-resources.md) Retrieve the resources that are available for an anonymous appointment. 5. [Update Service Appointments](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc5-update-anonymous-appoint.md) A service appointment represents an appointment that is booked via Salesforce Scheduler. To update the appointment, run a PATCH request on the `service-appointments` Connect API. # Modify Appointments to Reassign to Actual Resources Retrieve and show the service appointments scheduled against the dummy resource. Branch managers or administrators can reassign the retrieved appointments to the actual resources. - **[Get Service Appointments Assigned to the Dummy Resource](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc11-get-service-appointments.md)** Show your users the service appointments—appointments booked through Salesforce Scheduler—scheduled against the dummy resource by retrieving the list of service appointments. Branch managers or administrators can reassign the appointments to the actual resources. - **[Get Actual Service Resources](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc11-get-actual-appointment-candidates.md)** Retrieve the actual service resources—an employee from your company, such as a loan officer, investment advisor, doctor, nurse practitioner, or retail store specialist who attends appointments with clients—based on the work type group and service territory that’s assigned to a service appointment. Business managers or administrators can then assign an available service resource to an appointment. - **[Update Service Appointments](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc11-modify-service-appointment.md)** Show the details of service appointments—appointments booked through Salesforce Scheduler—on a page of your app so that business managers or administrators can review and update appointments. # MSSQL Instance Represents a MSSQL Instance configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Database Systems. ## Configuration Item Type Definition ||| |-|-| |Name|MSSQL Instance| |Developer Name|`SD_MsIn`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Database Systems](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-database-systems.md)| |Rule Name|Default rule for all ShareLink File Servers| |Identifier(s)|MAC address| ## Attributes No associated attributes for this configuration item type. # My App Crashes Some tips if your app crashes. - Chat: If your app crashes when a user attempts to perform a file transfer, check that you've enabled the device privacy permissions for the camera and the photo library. An app will crash if these permissions are not set in Xcode. See [Install the Service Chat SDK for iOS](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/ios-sdk-install-overview.md). - For a list of known issues, see the latest [Release Notes](https://github.com/forcedotcom/ServiceSDK-iOS/releases). # My App Was Rejected What to do when your app is rejected from the App Store. - If you archive a framework and then export the archive using the Xcode command line tool (`xcodebuild`), you’ll get “Invalid Code Signing Entitlements” errors when you try to upload your app to the app store. This is a known issue with Apple’s tools. The workaround is to archive and export using Xcode’s user interface. # MySQL Instance Represents a MySQL Instance configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Database Systems. ## Configuration Item Type Definition ||| |-|-| |Name|MySQL Instance| |Developer Name|`SD_MyIn`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Database Systems](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-database-systems.md)| |Rule Name|Default rule for all Red Hat JBoss EAP| |Identifier(s)|IP Address| ## Attributes No associated attributes for this configuration item type. # NanoStation Terminal Represents a NanoStation Terminal configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. ## Configuration Item Type Definition ||| |-|-| |Name|NanoStation Terminal| |Developer Name|`SD_NaTe`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Network Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-network-device.md)| |Rule Name|Default rule for all IP Speakers| |Identifier(s)|MAC address| ## Attributes No associated attributes for this configuration item type. # NetApp Represents a NetApp configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. ## Configuration Item Type Definition ||| |-|-| |Name|NetApp| |Developer Name|`SD_Netxx`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Network Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-network-device.md)| |Rule Name|Default rule for all AVC encoders| |Identifier(s)|MAC address| ## Attributes No associated attributes for this configuration item type. # Netapp Cluster Represents a Netapp Cluster configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of NetApp. ## Configuration Item Type Definition ||| |-|-| |Name|Netapp Cluster| |Developer Name|`SD_NeCl`| |Component|No| |End User Compute/Unmetered|No| |Parent|[NetApp](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-netapp.md)| |Rule Name|Default rule for all NTP Servers| |Identifier(s)|MAC address| ## Attributes No associated attributes for this configuration item type. # Netapp Clustered Filer Represents a Netapp Clustered Filer configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of NetApp. ## Configuration Item Type Definition ||| |-|-| |Name|Netapp Clustered Filer| |Developer Name|`SD_NeClFi`| |Component|No| |End User Compute/Unmetered|No| |Parent|[NetApp](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-netapp.md)| |Rule Name|Default rule for all Management Controllers| |Identifier(s)|MAC address| ## Attributes No associated attributes for this configuration item type. # Netapp Filer Represents a Netapp Filer configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of NetApp. ## Configuration Item Type Definition ||| |-|-| |Name|Netapp Filer| |Developer Name|`SD_NeFi`| |Component|No| |End User Compute/Unmetered|No| |Parent|[NetApp](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-netapp.md)| |Rule Name|Default rule for all IBM Tape Libraries| |Identifier(s)|MAC address| ## Attributes No associated attributes for this configuration item type. # Network Adapter Details Represents the Network Adapter Details attribute set in the Configuration Management Database (CMDB). This attribute set groups related attributes for configuration items. ## Configuration Item Attribute Set Definition ||| |-|-| |Display Name|Network Adapter Details| |Developer Name|`SD_NeAdDe`| |Master Label|Network_Adapter_Details| ## Attributes ### Admin Status - **Type**: text - **Developer Name**: `SD_AdSt` - **Description**: Describes the Admin Status for configuration items. - **Required**: Optional ### Broadcast Address - **Type**: text - **Developer Name**: `SD_BrAd` - **Description**: Describes the Broadcast Address for configuration items. - **Required**: Optional ### Database Path - **Type**: text - **Developer Name**: `SD_DaPa` - **Description**: Describes the Database Path for configuration items. - **Required**: Optional ### Default Gateway - **Type**: text - **Developer Name**: `SD_DeGa` - **Description**: Describes the Default Gateway for configuration items. - **Required**: Optional ### DHCP Enabled - **Type**: text - **Developer Name**: `SD_DhEn` - **Description**: Describes the DHCP Enabled for configuration items. - **Required**: Optional ### DHCP Server - **Type**: text - **Developer Name**: `SD_DhSe` - **Description**: Describes the DHCP Server for configuration items. - **Required**: Optional ### DNS Host Name - **Type**: text - **Developer Name**: `SD_DnHoNa` - **Description**: Describes the DNS Host Name for configuration items. - **Required**: Optional ### DNS Servers - **Type**: text - **Developer Name**: `SD_DnSe` - **Description**: Describes the DNS Servers for configuration items. - **Required**: Optional ### Driver Date - **Type**: text - **Developer Name**: `SD_DrDa` - **Description**: Describes the Driver Date for configuration items. - **Required**: Optional ### Driver Version - **Type**: text - **Developer Name**: `SD_DrVe` - **Description**: Describes the Driver Version for configuration items. - **Required**: Optional ### GUID - **Type**: text - **Developer Name**: `SD_Gu` - **Description**: Describes the GUID for configuration items. - **Required**: Optional ### High Speed Enabled - **Type**: text - **Developer Name**: `SD_HiSpEn` - **Description**: Describes the High Speed Enabled for configuration items. - **Required**: Optional ### Interface Id - **Type**: text - **Developer Name**: `SD_InId` - **Description**: Describes the Interface Id for configuration items. - **Required**: Optional ### Interface Name - **Type**: text - **Developer Name**: `SD_InNa1` - **Description**: Describes the Interface Name for configuration items. - **Required**: Optional ### MAC Address - **Type**: text - **Developer Name**: `SD_MaAd` - **Description**: Describes the MAC Address for configuration items. - **Required**: Optional ### MAC Manufacturer - **Type**: text - **Developer Name**: `SD_MaMa` - **Description**: Describes the MAC Manufacturer for configuration items. - **Required**: Optional ### Netmask - **Type**: text - **Developer Name**: `SD_Ne` - **Description**: Describes the Netmask for configuration items. - **Required**: Optional ### Network Adapter Alias - **Type**: text - **Developer Name**: `SD_NeAdAl` - **Description**: Describes the Network Adapter Alias for configuration items. - **Required**: Optional ### Network Adapter Caption - **Type**: text - **Developer Name**: `SD_NeAdCa` - **Description**: Describes the Network Adapter Caption for configuration items. - **Required**: Optional ### Network Adapter Description - **Type**: text - **Developer Name**: `SD_NeAdDe` - **Description**: Describes the Network Adapter Description for configuration items. - **Required**: Optional ### Network Adapter Driver - **Type**: text - **Developer Name**: `SD_NeAdDr` - **Description**: Describes the Network Adapter Driver for configuration items. - **Required**: Optional ### Network Adapter Duplex - **Type**: text - **Developer Name**: `SD_NeAdDu` - **Description**: Describes the Network Adapter Duplex for configuration items. - **Required**: Optional ### Network Adapter Name - **Type**: text - **Developer Name**: `SD_NeAdNa` - **Description**: Describes the Network Adapter Name for configuration items. - **Required**: Optional ### Network Adapter PCI - **Type**: text - **Developer Name**: `SD_NeAdPc` - **Description**: Describes the Network Adapter PCI for configuration items. - **Required**: Optional ### Network Adapter Type - **Type**: text - **Developer Name**: `SD_NeAdTy` - **Description**: Describes the Network Adapter Type for configuration items. - **Required**: Optional ### Network Addresses - **Type**: text - **Developer Name**: `SD_NeAd` - **Description**: Describes the Network Addresses for configuration items. - **Required**: Optional ### Network Device ID - **Type**: text - **Developer Name**: `SD_NeDeId` - **Description**: Describes the Network Device ID for configuration items. - **Required**: Optional ### Network Host - **Type**: text - **Developer Name**: `SD_NeHo` - **Description**: Describes the Network Host for configuration items. - **Required**: Optional ### Network ifIndex - **Type**: text - **Developer Name**: `SD_NeIf` - **Description**: Describes the Network ifIndex for configuration items. - **Required**: Optional ### Network Model - **Type**: text - **Developer Name**: `SD_NeMo` - **Description**: Describes the Network Model for configuration items. - **Required**: Optional ### Network Speed(Mbps) - **Type**: text - **Developer Name**: `SD_NeSp` - **Description**: Describes the Network Speed(Mbps) for configuration items. - **Required**: Optional ### Operator Status - **Type**: text - **Developer Name**: `SD_OpSt` - **Description**: Describes the Operator Status for configuration items. - **Required**: Optional ### Port Number - **Type**: text - **Developer Name**: `SD_PoNu` - **Description**: Describes the Port Number for configuration items. - **Required**: Optional ### Subnet - **Type**: text - **Developer Name**: `SD_Su` - **Description**: Describes the Subnet for configuration items. - **Required**: Optional # Network Appliance Represents a Network Appliance configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Switch. ## Configuration Item Type Definition ||| |-|-| |Name|Network Appliance| |Developer Name|`SD_NeAp`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Switch](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-switch.md)| |Rule Name|Default rule for all Cisco Network Transport Receivers| |Identifier(s)|MAC address| ## Attributes No associated attributes for this configuration item type. # Network Convergence System Represents a Network Convergence System configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. ## Configuration Item Type Definition ||| |-|-| |Name|Network Convergence System| |Developer Name|`SD_NeCoSy`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Network Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-network-device.md)| |Rule Name|Default rule for all Application Servers| |Identifier(s)|MAC address Hostname| ## Attributes No associated attributes for this configuration item type. # Network Device Represents a Network Device configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Device. ## Configuration Item Type Definition ||| |-|-| |Name|Network Device| |Developer Name|`SD_NeDe`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-device.md)| |Rule Name|Default rule for all Windows Clusters| |Identifier(s)|Local FQDN| ## Attributes ### Boot Version - **Type**: text - **Developer Name**: `SD_BoVe` - **Attribute Set**: [Device Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-device-details.md) - **Description**: The boot version of the Network Device. - **Required**: Optional ### Firmware Revision - **Type**: text - **Developer Name**: `SD_FiRe` - **Attribute Set**: [Device Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-device-details.md) - **Description**: The firmware revision of the Network Device. - **Required**: Optional ### Hardware Revision - **Type**: text - **Developer Name**: `SD_HaRe` - **Attribute Set**: [Device Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-device-details.md) - **Description**: The hardware revision of the Network Device. - **Required**: Optional ### System Object ID - **Type**: text - **Developer Name**: `SD_SyObId` - **Attribute Set**: [Device Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-device-details.md) - **Description**: The system object id of the Network Device. - **Required**: Optional # Network Interface Details Represents the Network Interface Details attribute set in the Configuration Management Database (CMDB). This attribute set groups related attributes for configuration items. ## Configuration Item Attribute Set Definition ||| |-|-| |Display Name|Network Interface Details| |Developer Name|`SD_NeInDe`| |Master Label|Network_Interface_Details| ## Attributes ### Network Interface Name - **Type**: text - **Developer Name**: `SD_NeInNa` - **Description**: Describes the Network Interface Name for configuration items. - **Required**: Optional # Network Load Balancer Represents a Network Load Balancer configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. ## Configuration Item Type Definition ||| |-|-| |Name|Network Load Balancer| |Developer Name|`SD_NeLoBa`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Network Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-network-device.md)| |Rule Name|Default rule for all Hub| |Identifier(s)|MAC address| ## Attributes No associated attributes for this configuration item type. # Network Projector Represents a Network Projector configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. ## Configuration Item Type Definition ||| |-|-| |Name|Network Projector| |Developer Name|`SD_NePr`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Network Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-network-device.md)| |Rule Name|Default rule for all Standard UPS| |Identifier(s)|MAC address| ## Attributes No associated attributes for this configuration item type. # Network Receiver Represents a Network Receiver configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. ## Configuration Item Type Definition ||| |-|-| |Name|Network Receiver| |Developer Name|`SD_NeRe`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Network Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-network-device.md)| |Rule Name|Default rule for all Azure Network Security Groups| |Identifier(s)|Asset Name Subscription Id Resource Group| ## Attributes No associated attributes for this configuration item type. # Network Server Represents a Network Server configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. ## Configuration Item Type Definition ||| |-|-| |Name|Network Server| |Developer Name|`SD_NeSe`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Network Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-network-device.md)| |Rule Name|Default rule for all Database Servers| |Identifier(s)|Asset Name Server Port IP Address| ## Attributes No associated attributes for this configuration item type. # NlpResponse Class Stores the result for an NLP Operation. NLP operation can be SurveyLongSummarization and SurveyShortSummarization. ## Namespace [industriesNlpSvc](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/apex-namespace-industriesnlpsvc.md) - **[NlpResponse Properties](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/ns-industriesnlpsvc/apex-industriesnlpsvc-nlpresponse-properties.md)** # NlpResponse Properties The following are properties for `NlpResponse`. - **[summarizationResult](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/ns-industriesnlpsvc/apex-industriesnlpsvc-nlpresponse-summarizationresult.md)** Represents the property that stores the NLP Summarization result performed for an NLP Operation. NLP operation can be SurveyLongSummarization and SurveyShortSummarization. - **[errors](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/ns-industriesnlpsvc/apex-industriesnlpsvc-nlpresponse-errors.md)** Represents the property to store errors that occurred as a result of the NLP Operation. # NlpSummarizationResult Class Provides the summary obtained as result of NLP Operation. ## Namespace [industriesNlpSvc](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/apex-namespace-industriesnlpsvc.md) - **[NlpSummarizationResult Properties](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/ns-industriesnlpsvc/apex-industriesnlpsvc-nlpsummarizationresult-properties.md)** # NlpSummarizationResult Properties The following are properties for `NlpSummarizationResult`: - **[summary](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/ns-industriesnlpsvc/apex-industriesnlpsvc-nlpsummarizationresult-summary.md)** Represents the field that captures the summary obtained as result of NLP Operation. # Notifications for Chat Activity If there's chat activity when the user is not viewing the chat session, you can present that information to them using the iOS notification system. **important:** 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](https://help.salesforce.com/s/articleView?id=service.miaw_intro_landing.htm&type=5) before that date. Messaging offers many of the [chat features](https://help.salesforce.com/s/articleView?id=service.miaw_chat_vs_messaging.htm&type=5) that you love plus asynchronous conversations that can be picked back up at any time. Learn about chat retirement in [Help](https://help.salesforce.com/s/articleView?id=001790618&type=1). Notifications can be sent to the user when the user isn't viewing the chat session. A notification can appear when the app is in the background, or when the app is in the foreground but the chat session is minimized. The following activities can cause notifications: - Agent has connected - Agent sent a message - Agent requested a file transfer - Agent canceled a file transfer - Agent ended a session - Session will timeout soon To ensure that the app can send these notifications while in the background, chat must be configured to allow background execution (`allowBackgroundExecution`) and to allow for background notifications (`allowBackgroundNotifications`). Both these settings are turned on by default. See [Configure a Chat Session](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/configure-lac-session.md) for details. 1. Import the `UserNotifications` framework in your `AppDelegate` class. In Swift: ```java import UserNotifications ``` In Objective-C: ```java @import UserNotifications; ``` 2. Register for local notifications in your `AppDelegate`'s `didFinishLaunchingWithOptions` method. In Swift: ```java // Get the notification center object let center = UNUserNotificationCenter.current() // Register a delegate (see next step for delegate implementation) center.delegate = self // Request authorization center.requestAuthorization(options: [.alert,.sound], completionHandler: { granted, error in // Enable or disable features based on authorization }) // Create general category let generalCategory = UNNotificationCategory(identifier: "General", actions: [], intentIdentifiers: [], options: .customDismissAction) let categorySet: Set = [generalCategory] // Set category center.setNotificationCategories(categorySet) ``` In Objective-C: ```java // Get the notification center object UNUserNotificationCenter* center = [UNUserNotificationCenter currentNotificationCenter]; // Register a delegate (see next step for delegate implementation) [center setDelegate:self]; // Request authorization [center requestAuthorizationWithOptions:(UNAuthorizationOptionAlert + UNAuthorizationOptionSound) completionHandler:^(BOOL granted, NSError * _Nullable error) { // Enable or disable features based on authorization }]; // Create general category UNNotificationCategory* generalCategory = [UNNotificationCategory categoryWithIdentifier:@"GENERAL" actions:@[] intentIdentifiers:@[] options:UNNotificationCategoryOptionCustomDismissAction]; // Set category [center setNotificationCategories:[NSSet setWithObjects:generalCategory, nil]]; ``` 3. Implement `UNUserNotificationCenterDelegate`. Handle the `didReceiveNotificationResponse` and `willPresentNotification` methods. iOS calls the `didReceiveNotificationResponse` method when your app is in the background. In this method, you can tell your app to enter the foreground and for chat to maximize. To perform this behavior, use the [`handle(notification:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSChatInterface.html#/c:objc(cs)SCSChatInterface(im)handleNotification:>) method on the [`SCSChatInterface`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSChatInterface.html) object, which is accessible from the `chatUI` property of the [`ServiceCloud`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCServiceCloud.html) shared instance. iOS calls the `willPresentNotification` method when your app is in the foreground. To determine whether to display the notification, use the [`shouldDisplayNotificationInForeground`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSChatInterface.html#/c:objc(cs)SCSChatInterface(im)shouldDisplayNotificationInForeground>) method (accessible from the `chatUI` property of the [`ServiceCloud`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCServiceCloud.html) shared instance). If the Chat UI is already showing the relevant information related to this event, the method returns `false`. In Swift: ```java /** This delegate method is executed when the application launches as a result of the user interacting with a notification when it is in the background. The result of passing the notification to Chat is that we will maximize if the notification was scheduled as a result of a chat event. */ func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) { let chat = ServiceCloud.shared().chatUI! chat.handle(response.notification) } /** This delegate method is executed when a notification is received while the app is in the foreground. Check with Chat to see whether it's appropriate to display the notification (or if the notification relates to information already being shown to the user). */ func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void) { let chat = ServiceCloud.shared().chatUI! // Show we display this notification? if (chat.shouldDisplayNotificationInForeground()) { // Display notification as an alert completionHandler(.alert) } } ``` In Objective-C: ```java /** This delegate method is executed when the application launches as a result of the user interacting with a notification when it is in the background. The result of passing the notification to Chat is that we will maximize if the notification was scheduled as a result of a chat event. */ - (void)userNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void(^)(void))completionHandler { SCSChatInterface *chat = [SCServiceCloud sharedInstance].chatUI; [chat handleNotification:response.notification]; } /** This delegate method is executed when a notification is received while the app is in the foreground. Check with Chat to see whether it's appropriate to display the notification (or if the notification relates to information already being shown to the user). */ - (void)userNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler: (void (^)(UNNotificationPresentationOptions options))completionHandler { SCSChatInterface *chat = [SCServiceCloud sharedInstance].chatUI; // Show we display this notification? if ([chat shouldDisplayNotificationInForeground]) { // Display notification as an alert completionHandler(UNNotificationPresentationOptionAlert); } } ``` # Notifications with the Service Chat SDK for iOS The Service Chat SDK can display notifications for activity related to Chat. **important:** 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](https://help.salesforce.com/s/articleView?id=service.miaw_intro_landing.htm&type=5) before that date. Messaging offers many of the [chat features](https://help.salesforce.com/s/articleView?id=service.miaw_chat_vs_messaging.htm&type=5) that you love plus asynchronous conversations that can be picked back up at any time. Learn about chat retirement in [Help](https://help.salesforce.com/s/articleView?id=001790618&type=1). To learn more, see [Notifications for Chat Activity](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/live-agent-notifications.md). # notifyInitializationComplete() for Lightning Experience ## Usage Notifies Salesforce that the softphone initialization is complete and that Salesforce should not switch to a standby URL. While the softphone initializes, a loading icon displays in the softphone area. To use a standby URL, you must specify the `reqStandbyUrl` and `reqTimeout` fields, in the call center’s definition file. For more information, see [Optional Call Center Elements and Attributes](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-call-def-file-optional.md) The `notifyInitializationComplete()` method for Lightning Experience works differently from the Salesforce Classic method. - In Lightning Experience, the method takes an optional callback object. In Salesforce Classic, the method doesn't take arguments. - In Lightning Experience, after you go to the standby URL your browser session continues to use that standby URL. To force the standby URL check, you must restart the browser—close it and open it again. In Salesforce Classic, the standby URL check was completed only after you logged in to Salesforce, and the check wasn't repeated if you kept using the same Salesforce session. ## Syntax ```javascript sforce.opencti.notifyInitializationComplete({ callback: FUNCTION //Optional }); ``` ## Arguments |Name|Type|Description| |------|------|-------------| |`callback`|function|JavaScript method executed when the API method call is completed.| ## Sample Code–HTML and JavaScript ```html The Open CTI framework was notified that the softphone initialization is complete. ``` ## Response This method is asynchronous. The response is returned in an object passed to a callback method. The response object contains the following fields. |Name|Type|Description| |------|------|-------------| |`success`|boolean|Returns `true` if the API method call was invoked successfully, `false` otherwise.| |`returnValue`|object|This API method doesn’t return this object. The `returnValue` is always `null`.| |`errors`|array|If the API call was successful, this variable is `null`. If the API call failed, this variable returns an array of [error messages](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-error-messages-lightning.md).| # notifyInitializationComplete() for Salesforce Classic ## Usage Notifies Salesforce that the softphone initialization is complete and that Salesforce should not switch to a standby URL. While the softphone initializes, a loading icon displays in the SoftPhone area. To use a standby URL, you must specify it in the call center’s definition file. For more information, see [Optional Call Center Elements and Attributes](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-call-def-file-optional.md). ## Syntax ```javascript sforce.interaction.cti.notifyInitializationComplete() ``` ## Arguments None. ## Sample Code ```javascript The interaction framework has been notified that the CTI initialization is complete. ``` ## Response None. # NtfcnChannelActionDef Represents the actions associated with the definition of a notification that's configured for a specific object. For example, the Notification for Creation of Problems is a setup definition that applies to in-app and email notifications and the recipient user can take an action such as opening the record in Salesforce from within the notification. This object is available in API version 62.0 and later. ## Supported SOAP API Calls `create()`, `delete()`, `describeSObjects()`, `query()`, `retrieve()`, `update()` ## Supported REST API Calls `DELETE`, `GET`, `HEAD`, `PATCH`, `POST`, `Query` ## Usage Use this object to query and manage Notification Channel Action Definitions in your org. Client applications can create, update, delete, or query records associated with Notification Channel Action Definition via the API. ## Fields ### CreatedById - **Type**: reference - **Properties**: Create, Defaulted on create, Filter, Group, Sort - **Description**: The ID of the user who created this record. - **Relationship Name**: CreatedBy - **Relationship Type**: Lookup - **Refers To**: User ### CreatedDate - **Type**: datetime - **Properties**: Create, Defaulted on create, Filter, Sort - **Description**: The date and time on which this record is created. ### Id - **Type**: id - **Properties**: Defaulted on create, Filter, Group, Sort - **Description**: The ID of this Notification Channel Action Definition. ### IsDeleted - **Type**: boolean - **Properties**: Defaulted on create, Filter, Group, Sort - **Description**: Indicates whether the notification channel action definition is deleted or not. - **Default value**: `false` ### Label - **Type**: string - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The user-defined label of the action. ### LastModifiedById - **Type**: reference - **Properties**: Create, Defaulted on create, Filter, Group, Sort - **Description**: The ID of the user who last modified this record. - **Relationship Name**: LastModifiedBy - **Relationship Type**: Lookup - **Refers To**: User ### LastModifiedDate - **Type**: datetime - **Properties**: Create, Defaulted on create, Filter, Sort - **Description**: The date and time on which this record was last modified. ### ManageableState - **Type**: picklist - **Properties**: Filter, Group, Nillable, Restricted picklist, Sort - **Description**: Indicates the manageable state of the specified component that is contained in a package. - **Possible values**: - `beta`—Managed-Beta - `deleted`—Managed-Proposed-Deleted - `deprecated`—Managed-Proposed-Deprecated - `deprecatedEditable`—SecondGen-Installed-Deprecated - `installed`—Managed-Installed - `installedEditable`—SecondGen-Installed-Editable - `released`—Managed-Released - `unmanaged`—Unmanaged ### NotificationActionName - **Type**: picklist - **Properties**: Create, Filter, Group, Restricted picklist, Sort, Update - **Description**: The developer name of the action. - **Possible values**: - `UpdateRecord`—Update Record - `ViewRecord`—View Record ### NtfcnChannelDefId - **Type**: reference - **Properties**: Create, Filter, Group, Sort - **Description**: The notification channel for which the action is specified. This field is a relationship field. - **Relationship Name**: NtfcnChannelDef - **Relationship Type**: Lookup - **Refers To**: NtfcnChannelDef ### SystemModstamp - **Type**: datetime - **Properties**: Defaulted on create, Filter, Sort - **Description**: The date and time when this record was last modified by an automated process. ### TargetReference - **Type**: string - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The reference to the ID of the action target. ### TargetType - **Type**: picklist - **Properties**: Create, Filter, Group, Nillable, Restricted picklist, Sort, Update - **Description**: Specifies the type of action target such as a Slack URL, Salesforce URL, or a Microsoft Teams URL. - **Possible values**: - `Portal`—PORTAL - `Salesforce`—SALESFORCE # NtfcnChannelCont Represents the content associated with the definition of a notification that's configured for a specific object. For example, the Notification for Creation of Problems is a setup definition that applies to in-app and email notifications and the admin can configure the content such as the notification title and body. This object is available in API version 62.0 and later. ## Supported SOAP API Calls `create()`, `delete()`, `describeSObjects()`, `query()`, `retrieve()`, `update()` ## Supported REST API Calls `DELETE`, `GET`, `HEAD`, `PATCH`, `POST`, `Query` ## Usage Use this object to query and manage Notification Channel Contents in your org. Client applications can create, update, delete, or query records associated with Notification Channel Content via the API. ## Fields ### CreatedById - **Type**: reference - **Properties**: Create, Defaulted on create, Filter, Group, Sort - **Description**: The ID of the user who created this record. - **Relationship Name**: CreatedBy - **Relationship Type**: Lookup - **Refers To**: User ### CreatedDate - **Type**: datetime - **Properties**: Create, Defaulted on create, Filter, Sort - **Description**: The date and time on which this record is created. ### EmailTemplateId - **Type**: reference - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The email template related to the notification when channel type is Email. This field is a relationship field. - **Relationship Name**: EmailTemplate - **Relationship Type**: Lookup - **Refers To**: EmailTemplate ### Id - **Type**: id - **Properties**: Defaulted on create, Filter, Group, Sort - **Description**: The ID of this Notification Channel Content. ### IsDeleted - **Type**: boolean - **Properties**: Defaulted on create, Filter, Group, Sort - **Description**: Indicates whether the notification channel content is deleted or not. - **Default value**: `false` ### LastModifiedById - **Type**: reference - **Properties**: Create, Defaulted on create, Filter, Group, Sort - **Description**: The ID of the user who last modified this record. - **Relationship Name**: LastModifiedBy - **Relationship Type**: Lookup - **Refers To**: User ### LastModifiedDate - **Type**: datetime - **Properties**: Create, Defaulted on create, Filter, Sort - **Description**: The date and time on which this record was last modified. ### ManageableState - **Type**: picklist - **Properties**: Filter, Group, Nillable, Restricted picklist, Sort - **Description**: Indicates the manageable state of the specified component that is contained in a package. - **Possible values**: - `beta`—Managed-Beta - `deleted`—Managed-Proposed-Deleted - `deprecated`—Managed-Proposed-Deprecated - `deprecatedEditable`—SecondGen-Installed-Deprecated - `installed`—Managed-Installed - `installedEditable`—SecondGen-Installed-Editable - `released`—Managed-Released - `unmanaged`—Unmanaged ### MessageBody - **Type**: textarea - **Properties**: Create, Nillable, Update - **Description**: The body of the notification message configured for the content. ### MessageTitle - **Type**: string - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The title of the notification message configured for the content. ### NtfcnChannelDefId - **Type**: reference - **Properties**: Create, Filter, Group, Sort - **Description**: The notification channel for which the content is specified. This field is a relationship field. - **Relationship Name**: NtfcnChannelDef - **Relationship Type**: Lookup - **Refers To**: NtfcnChannelDef ### SystemModstamp - **Type**: datetime - **Properties**: Defaulted on create, Filter, Sort - **Description**: The date and time when this record was last modified by an automated process. # NtfcnChannelDef Represents the messaging channels associated with the definition of a notification that's configured for a specific object. For example, the Notification for Creation of Problems is a setup definition that applies to in-app and email notifications but eliminates Slack as a channel for notifying users. This object is available in API version 62.0 and later. ## Supported SOAP API Calls `create()`, `delete()`, `describeSObjects()`, `query()`, `retrieve()`, `update()` ## Supported REST API Calls `DELETE`, `GET`, `HEAD`, `PATCH`, `POST`, `Query` ## Usage Use this object to query and manage Notification Channel Definitions in your org. Client applications can create, update, delete, or query records associated with Notification Channel Definition via the API. ## Fields ### Active - **Type**: boolean - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: Indicates whether a notification for a specific channel type is active (true) or not (false). - **Default value**: `false` ### ChannelType - **Type**: picklist - **Properties**: Create, Filter, Group, Restricted picklist, Sort, Update - **Description**: Specifies the type of channel for which a notification is defined. - **Possible values**: - `Email` - `InApp`—In-App - `Slack` - `Teams` ### CreatedById - **Type**: reference - **Properties**: Create, Defaulted on create, Filter, Group, Sort - **Description**: The ID of the user who created this record. - **Relationship Name**: CreatedBy - **Relationship Type**: Lookup - **Refers To**: User ### CreatedDate - **Type**: datetime - **Properties**: Create, Defaulted on create, Filter, Sort - **Description**: The date and time on which this record is created. ### Id - **Type**: id - **Properties**: Defaulted on create, Filter, Group, Sort - **Description**: The ID of this Notification Channel Definition. ### IsDeleted - **Type**: boolean - **Properties**: Defaulted on create, Filter, Group, Sort - **Description**: Indicates whether the notification channel definition is deleted or not. - **Default value**: `false` ### LastModifiedById - **Type**: reference - **Properties**: Create, Defaulted on create, Filter, Group, Sort - **Description**: The ID of the user who last modified this record. - **Relationship Name**: LastModifiedBy - **Relationship Type**: Lookup - **Refers To**: User ### LastModifiedDate - **Type**: datetime - **Properties**: Create, Defaulted on create, Filter, Sort - **Description**: The date and time on which this record was last modified. ### ManageableState - **Type**: picklist - **Properties**: Filter, Group, Nillable, Restricted picklist, Sort - **Description**: Indicates the manageable state of the specified component that is contained in a package. - **Possible values**: - `beta`—Managed-Beta - `deleted`—Managed-Proposed-Deleted - `deprecated`—Managed-Proposed-Deprecated - `deprecatedEditable`—SecondGen-Installed-Deprecated - `installed`—Managed-Installed - `installedEditable`—SecondGen-Installed-Editable - `released`—Managed-Released - `unmanaged`—Unmanaged ### NtfcnDefinitionId - **Type**: reference - **Properties**: Create, Filter, Group, Sort - **Description**: The notification definition for which a channel is specified. This field is a relationship field. - **Relationship Name**: NtfcnDefinition - **Relationship Type**: Lookup - **Refers To**: NtfcnDefinition ### SystemModstamp - **Type**: datetime - **Properties**: Defaulted on create, Filter, Sort - **Description**: The date and time when this record was last modified by an automated process. # NtfcnChannelRec Represents the recipients associated with the definition of a notification that's configured for a specific object. For example, the Notification for Creation of Problems is a setup definition that applies to in-app and email notifications and the notifications are shared with specific users or email IDs. This object is available in API version 62.0 and later. ## Supported SOAP API Calls `create()`, `delete()`, `describeSObjects()`, `query()`, `retrieve()`, `update()` ## Supported REST API Calls `DELETE`, `GET`, `HEAD`, `PATCH`, `POST`, `Query` ## Usage Use this object to query and manage Notification Channel Recipients in your org. Client applications can create, update, delete, or query records associated with Notification Channel Recipient via the API. ## Fields ### Active - **Type**: boolean - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: Indicates whether a notification for a specific recipient is active (true) or not (false). - **Default value**: `false` ### CreatedById - **Type**: reference - **Properties**: Create, Defaulted on create, Filter, Group, Sort - **Description**: The ID of the user who created this record. - **Relationship Name**: CreatedBy - **Relationship Type**: Lookup - **Refers To**: User ### CreatedDate - **Type**: datetime - **Properties**: Create, Defaulted on create, Filter, Sort - **Description**: The date and time on which this record is created. ### Id - **Type**: id - **Properties**: Defaulted on create, Filter, Group, Sort - **Description**: The ID of this Notification Channel Recipient. ### IsDeleted - **Type**: boolean - **Properties**: Defaulted on create, Filter, Group, Sort - **Description**: Indicates whether the notification channel recipient is deleted or not. - **Default value**: `false` ### LastModifiedById - **Type**: reference - **Properties**: Create, Defaulted on create, Filter, Group, Sort - **Description**: The ID of the user who last modified this record. - **Relationship Name**: LastModifiedBy - **Relationship Type**: Lookup - **Refers To**: User ### LastModifiedDate - **Type**: datetime - **Properties**: Create, Defaulted on create, Filter, Sort - **Description**: The date and time on which this record was last modified. ### ManageableState - **Type**: picklist - **Properties**: Filter, Group, Nillable, Restricted picklist, Sort - **Description**: Indicates the manageable state of the specified component that is contained in a package. - **Possible values**: - `beta`—Managed-Beta - `deleted`—Managed-Proposed-Deleted - `deprecated`—Managed-Proposed-Deprecated - `deprecatedEditable`—SecondGen-Installed-Deprecated - `installed`—Managed-Installed - `installedEditable`—SecondGen-Installed-Editable - `released`—Managed-Released - `unmanaged`—Unmanaged ### NtfcnChannelDefId - **Type**: reference - **Properties**: Create, Filter, Group, Sort - **Description**: The notification channel for which a recipient is specified. This field is a relationship field. - **Relationship Name**: NtfcnChannelDef - **Relationship Type**: Lookup - **Refers To**: NtfcnChannelDef ### Recipient - **Type**: string - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The email ID, channel ID, or user ID of the recipient of a notification. ### RecipientType - **Type**: picklist - **Properties**: Create, Filter, Group, Restricted picklist, Sort, Update - **Description**: Specifies the type of recipient for a notification. - **Possible values**: - `EmailId`—Email Address - `InAppPortal`—In-App Portal - `SlackChannel`—Slack Channel - `UserField`—User Field - `UserId`—User ID ### SystemModstamp - **Type**: datetime - **Properties**: Defaulted on create, Filter, Sort - **Description**: The date and time when this record was last modified by an automated process. ### TargetIdentifier - **Type**: string - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The ID of the target application or channel to which the notification is sent. ### TeamIdentifier - **Type**: string - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The Team ID or Workspace ID of the target collaboration application (Slack, MS Teams) to which the notification is sent. # NtfcnCondition Represents the conditions associated with the definition of a notification that's configured for a specific object. For example, the Notification for Creation of Problems is a setup definition with a criteria that all conditions must be met, and it has two conditions: When Impact is Critical and when Status is not Closed. This object is available in API version 62.0 and later. ## Supported SOAP API Calls `create()`, `delete()`, `describeSObjects()`, `query()`, `retrieve()`, `update()` ## Supported REST API Calls `DELETE`, `GET`, `HEAD`, `PATCH`, `POST`, `Query` ## Usage Use this object to query and manage Notification Conditions in your org. Client applications can create, update, delete, or query records associated with Notification Condition via the API. ## Fields ### CreatedById - **Type**: reference - **Properties**: Create, Defaulted on create, Filter, Group, Sort - **Description**: The ID of the user who created this record. - **Relationship Name**: CreatedBy - **Relationship Type**: Lookup - **Refers To**: User ### CreatedDate - **Type**: datetime - **Properties**: Create, Defaulted on create, Filter, Sort - **Description**: The date and time on which this record is created. ### FieldName - **Type**: string - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The field on which a condition for notification applies. ### Id - **Type**: id - **Properties**: Defaulted on create, Filter, Group, Sort - **Description**: The ID of this Notification Condition. ### IsDeleted - **Type**: boolean - **Properties**: Defaulted on create, Filter, Group, Sort - **Description**: Indicates whether the notification condition is deleted or not. - **Default value**: `false` ### LastModifiedById - **Type**: reference - **Properties**: Create, Defaulted on create, Filter, Group, Sort - **Description**: The ID of the user who last modified this record. - **Relationship Name**: LastModifiedBy - **Relationship Type**: Lookup - **Refers To**: User ### LastModifiedDate - **Type**: datetime - **Properties**: Create, Defaulted on create, Filter, Sort - **Description**: The date and time on which this record was last modified. ### ManageableState - **Type**: picklist - **Properties**: Filter, Group, Nillable, Restricted picklist, Sort - **Description**: Indicates the manageable state of the specified component that is contained in a package. - **Possible values**: - `beta`—Managed-Beta - `deleted`—Managed-Proposed-Deleted - `deprecated`—Managed-Proposed-Deprecated - `deprecatedEditable`—SecondGen-Installed-Deprecated - `installed`—Managed-Installed - `installedEditable`—SecondGen-Installed-Editable - `released`—Managed-Released - `unmanaged`—Unmanaged ### NtfcnCriteriaId - **Type**: reference - **Properties**: Create, Filter, Group, Sort - **Description**: The criteria for which a condition is applied. This field is a relationship field. - **Relationship Name**: NtfcnCriteria - **Relationship Type**: Lookup - **Refers To**: NtfcnCriteria ### Operator - **Type**: picklist - **Properties**: Create, Filter, Group, Restricted picklist, Sort, Update - **Description**: The field operator on which a condition for notification applies. - **Possible values**: - `Contains`—5 - `DoesNotContain`—7 - `Equals`—0 - `GreaterOrEqual`—2 - `GreaterThan`—1 - `IsUpdated`—9 - `LessOrEqual`—4 - `LessThan`—3 - `NotEqual`—6 - `StartsWith`—8 ### SequenceNumber - **Type**: int - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The sequence number of the condition in the multichannel object notification criteria. ### SystemModstamp - **Type**: datetime - **Properties**: Defaulted on create, Filter, Sort - **Description**: The date and time when this record was last modified by an automated process. ### Value - **Type**: textarea - **Properties**: Create, Update - **Description**: The field value to which a condition for notification applies. # NtfcnCriteria Represents the criteria associated with the definition of a notification that's configured for a specific object. For example, the Notification for Creation of Problems is a setup definition with a criteria that allows admins to say that when all conditions are fulfilled for a specific event type such as creation of a record, only then notifications can be triggered. This object is available in API version 62.0 and later. ## Supported SOAP API Calls `create()`, `delete()`, `describeSObjects()`, `query()`, `retrieve()`, `update()` ## Supported REST API Calls `DELETE`, `GET`, `HEAD`, `PATCH`, `POST`, `Query` ## Usage Use this object to query and manage Notification Criteria in your org. Client applications can create, update, delete, or query records associated with Notification Criterion via the API. ## Fields ### CreatedById - **Type**: reference - **Properties**: Create, Defaulted on create, Filter, Group, Sort - **Description**: The ID of the user who created this record. - **Relationship Name**: CreatedBy - **Relationship Type**: Lookup - **Refers To**: User ### CreatedDate - **Type**: datetime - **Properties**: Create, Defaulted on create, Filter, Sort - **Description**: The date and time on which this record is created. ### CriteriaName - **Type**: string - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The name of the criteria that uniquely identifies it within the definition. ### CustomExpression - **Type**: string - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The custom expression used in the criteria that suggests which conditions apply to the definition. ### ExpressionType - **Type**: picklist - **Properties**: Create, Filter, Group, Restricted picklist, Sort, Update - **Description**: Specifies the type of expression used to evaluate the conditions that apply to the criteria. - **Possible values**: - `And`—AND - `CustomLogic`—Custom Logic - `Or`—OR ### Id - **Type**: id - **Properties**: Defaulted on create, Filter, Group, Sort - **Description**: The ID of this Notification Criterion. ### IsDeleted - **Type**: boolean - **Properties**: Defaulted on create, Filter, Group, Sort - **Description**: Indicates whether the notification criterion is deleted or not. - **Default value**: `false` ### LastModifiedById - **Type**: reference - **Properties**: Create, Defaulted on create, Filter, Group, Sort - **Description**: The ID of the user who last modified this record. - **Relationship Name**: LastModifiedBy - **Relationship Type**: Lookup - **Refers To**: User ### LastModifiedDate - **Type**: datetime - **Properties**: Create, Defaulted on create, Filter, Sort - **Description**: The date and time on which this record was last modified. ### ManageableState - **Type**: picklist - **Properties**: Filter, Group, Nillable, Restricted picklist, Sort - **Description**: Indicates the manageable state of the specified component that is contained in a package. - **Possible values**: - `beta`—Managed-Beta - `deleted`—Managed-Proposed-Deleted - `deprecated`—Managed-Proposed-Deprecated - `deprecatedEditable`—SecondGen-Installed-Deprecated - `installed`—Managed-Installed - `installedEditable`—SecondGen-Installed-Editable - `released`—Managed-Released - `unmanaged`—Unmanaged ### NtfcnDefinitionId - **Type**: reference - **Properties**: Create, Filter, Group, Sort - **Description**: The notification definition for which a criteria is specified. This field is a relationship field. - **Relationship Name**: NtfcnDefinition - **Relationship Type**: Lookup - **Refers To**: NtfcnDefinition ### SystemModstamp - **Type**: datetime - **Properties**: Defaulted on create, Filter, Sort - **Description**: The date and time when this record was last modified by an automated process. # NtfcnDefinition Represents a notification definition, including the criteria that trigger the notification and the channels, recipients, and content used to deliver it. This type extends the Metadata metadata type and inherits its fullName field. ## File Suffix and Directory Location NtfcnDefinition components have the suffix .ntfcnDefinition and are stored in the ntfcnDefinitions folder. ## Version NtfcnDefinition components are available in API version 62.0 and later. ## Fields ### description - **Type**: string - **Description**: The description of the notification. ### fullName - **Type**: string - **Description**: Required. The unique name of the NtfcnDefinition component. Inherited from the Metadata metadata type. This field isn't updateable. ### masterLabel - **Type**: string - **Description**: Required. The name of the notification. ### notificationCriteria - **Type**: [NtfcnCriteria](#ntfcncriteria)[] - **Description**: The criteria that determine when the notification is triggered. ### notificationType - **Type**: string - **Description**: Required. Indicates whether the notification uses a standard or custom template. - **Possible values**: - `Standard` - `Custom` ### ntfcnChannelDefs - **Type**: [NtfcnChannelDef](#ntfcnchanneldef)[] - **Description**: The channel definitions that specify how the notification is delivered, such as by email, Slack, or Microsoft Teams. ### refObjectApiName - **Type**: string - **Description**: The API name of the sObject associated with the notification. ### referenceObject - **Type**: string - **Description**: Required. The trigger object associated with the notification, such as Incident, Problem, ChangeRequest, or Release. ### relatedObjectApiRef - **Type**: string - **Description**: The API name of the junction object used to track associations, disassociations, and changes, such as ProblemIncident. ### status - **Type**: string - **Description**: The status of the notification. - **Possible values**: - `Active` - `Inactive` - `Draft` ### triggerEventType - **Type**: string - **Description**: Required. Indicates when the notification is sent, such as when a record is created or updated. - **Possible values**: - `Create` - `Update` - `Child Associate` - `Child Update` - `Parent Update` ### usageType - **Type**: string - **Description**: Required. The usage type of the notification. This field keeps the notification data model generic across products, such as IT Service. ## NtfcnCriteria ### condition - **Type**: [NtfcnCondition](#ntfcncondition)[] - **Description**: The conditions that make up the notification criteria. ### criteriaName - **Type**: string - **Description**: The name of the notification criteria. ### customExpression - **Type**: string - **Description**: The custom logic expression used to evaluate the conditions in the notification criteria. ### expressionType - **Type**: string - **Description**: Required. The type of logic used to evaluate the conditions in the notification criteria. - **Possible values**: - `And` - `Or` - `CustomLogic` ## NtfcnChannelDef ### active - **Type**: boolean - **Description**: Indicates whether the notification channel is active (`true`) or not (`false`). ### channelType - **Type**: string - **Description**: Required. The channel used to deliver the notification. - **Possible values**: - `Email` - `Slack` - `Teams` - `InApp` ### ntfcnChannelActionDefs - **Type**: [NtfcnChannelActionDef](#ntfcnchannelactiondef)[] - **Description**: The actions available on the notification for this channel. ### ntfcnChannelConts - **Type**: [NtfcnChannelCont](#ntfcnchannelcont)[] - **Description**: The content delivered on the notification for this channel. ### ntfcnChannelRecs - **Type**: [NtfcnChannelRec](#ntfcnchannelrec)[] - **Description**: The recipients of the notification for this channel. ## NtfcnCondition ### fieldName - **Type**: string - **Description**: Required. The API name of the field on the target object that's evaluated by the condition, such as Status or Priority. ### operator - **Type**: string - **Description**: Required. The operator used to compare the field to the value. - **Possible values**: - `Equals` - `GreaterThan` - `GreaterOrEqual` - `LessThan` - `LessOrEqual` - `Contains` - `DoesNotContain` ### sequenceNumber - **Type**: int - **Description**: Required. The order in which the condition is evaluated. ### value - **Type**: string - **Description**: Required. The value that the field is compared to when the condition is evaluated. ## NtfcnChannelActionDef ### label - **Type**: string - **Description**: Required. The user-defined label of the action. ### notificationActionName - **Type**: string - **Description**: Required. The developer name of the action. ### targetReference - **Type**: string - **Description**: The reference to the ID of the action target. ### targetType - **Type**: string - **Description**: The type of action target, such as a Salesforce URL, Slack URL, in-app URL, or Microsoft Teams URL. ## NtfcnChannelCont ### emailTemplate - **Type**: string - **Description**: The email template included in the notification when the channel type is email. ### messageBody - **Type**: string - **Description**: The message body of the notification. ### messageTitle - **Type**: string - **Description**: The title, or subject, of the notification. ### senderEmailAddress - **Type**: string - **Description**: The sender email address used for email notifications. ## NtfcnChannelRec ### active - **Type**: boolean - **Description**: Indicates whether the recipient is active (`true`) or not (`false`). ### recipient - **Type**: string - **Description**: Required. The identifier of the notification recipient. The recipient can be an email address, a channel ID, or a user field on an object. ### recipientType - **Type**: string - **Description**: Required. The type of recipient, such as an email address, user field, Slack channel, in-app channel, or Microsoft Teams channel. ### targetIdentifier - **Type**: string - **Description**: The name of the destination Slack or Microsoft Teams app. ### teamIdentifier - **Type**: string - **Description**: The workspace ID or team ID of the recipient's Slack channel or Microsoft Teams channel. ## Declarative Metadata Sample Definition A sample XML definition of a NtfcnDefinition component is shown here. ```nolang MyNtfcnDefinition sampleValue sampleValue sampleValue sampleValue sampleValue sampleValue sampleValue sampleValue sampleValue ``` The following `package.xml` manifest retrieves the NtfcnDefinition component. ```nolang * NtfcnDefinition XX.0 ``` ## Wildcard Support in the Manifest File This metadata type supports the wildcard character `*` (asterisk) in the `package.xml` manifest file. For information about using the manifest file, see [Deploying and Retrieving Metadata with the Zip File](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/file_based_zip_file.htm). # NtfcnDefinition Represents the definition of a notification that's configured for a specific object. For example, Notification for Creation of Problems is a setup definition that helps admins configure how, when, and the type of notifications that are shared across multiple channels such as Slack, Email, or In-App when a problem record is either created or updated. This object is available in API version 62.0 and later. ## Supported SOAP API Calls `create()`, `delete()`, `describeSObjects()`, `query()`, `retrieve()`, `update()` ## Supported REST API Calls `DELETE`, `GET`, `HEAD`, `PATCH`, `POST`, `Query` ## Usage Use this object to query and manage Notification Definitions in your org. Client applications can create, update, delete, or query records associated with Notification Definition via the API. ## Fields ### CreatedById - **Type**: reference - **Properties**: Create, Defaulted on create, Filter, Group, Sort - **Description**: The ID of the user who created this record. - **Relationship Name**: CreatedBy - **Relationship Type**: Lookup - **Refers To**: User ### CreatedDate - **Type**: datetime - **Properties**: Create, Defaulted on create, Filter, Sort - **Description**: The date and time on which this record is created. ### Description - **Type**: string - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The description of a notification definition. ### DeveloperName - **Type**: string - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The unique name of the object in the API. This name can contain only underscores and alphanumeric characters, and must be unique in your org. It must begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores. In managed packages, this field prevents naming conflicts on package installations. With this field, a developer can change the object's name in a managed package and the changes are reflected in a subscriber's organization. This field is automatically generated, but you can supply your own value if you create the record using the API. When creating large sets of data, always specify a unique DeveloperName for each record. If no DeveloperName is specified, performance may slow while Salesforce generates one for each record. ### Id - **Type**: id - **Properties**: Defaulted on create, Filter, Group, Sort - **Description**: The ID of this Notification Definition. ### IsDeleted - **Type**: boolean - **Properties**: Defaulted on create, Filter, Group, Sort - **Description**: Indicates whether the notification definition is deleted or not. - **Default value**: `false` ### Language - **Type**: picklist - **Properties**: Create, Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort, Update - **Description**: The combined language and locale ISO code, which controls the language of the configuration item attribute picklist value definition. ### LastModifiedById - **Type**: reference - **Properties**: Create, Defaulted on create, Filter, Group, Sort - **Description**: The ID of the user who last modified this record. - **Relationship Name**: LastModifiedBy - **Relationship Type**: Lookup - **Refers To**: User ### LastModifiedDate - **Type**: datetime - **Properties**: Create, Defaulted on create, Filter, Sort - **Description**: The date and time on which this record was last modified. ### ManageableState - **Type**: picklist - **Properties**: Filter, Group, Nillable, Restricted picklist, Sort - **Description**: Indicates the manageable state of the specified component that is contained in a package. - **Possible values**: - `beta`—Managed-Beta - `deleted`—Managed-Proposed-Deleted - `deprecated`—Managed-Proposed-Deprecated - `deprecatedEditable`—SecondGen-Installed-Deprecated - `installed`—Managed-Installed - `installedEditable`—SecondGen-Installed-Editable - `released`—Managed-Released - `unmanaged`—Unmanaged ### MasterLabel - **Type**: string - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The label for this configuration item type relation definition value. This display value is the internal label that doesn't get translated. ### NamespacePrefix - **Type**: string - **Properties**: Filter, Group, Nillable, Sort - **Description**: The namespace prefix that is associated with this object. Each Developer Edition org that creates a managed package has a unique namespace prefix. Limit: 15 characters. You can refer to a component in a managed package by using the `namespacePrefix__componentName` notation. ### NotificationType - **Type**: picklist - **Properties**: Create, Filter, Group, Nillable, Restricted picklist, Sort, Update - **Description**: Specifies the type of notification definition. If the definition is shipped, it's a template and if the admin creates a notification definition, it's custom. - **Possible values**: - `Custom` - `Template` ### ReferenceObject - **Type**: picklist - **Properties**: Create, Filter, Group, Restricted picklist, Sort, Update - **Description**: The object for which a notification definition is created. - **Possible values**: - `ApprovalWorkItem`—Approval Work Item - `Asset` - `Case` - `ChangeRequest`—Change Request - `ChgAdvsryBoardMeeting`—Change Advisory Board Meeting - `ChgAdvsryBoardRelChgReq`—Change Advisory Board Related Change Request - `ChgAdvsryBrdMtgRelChgReq`—Change Advisory Board Meeting Related Change Request - `CompPlcyCommsResponse`—Compliance Policy Communication Response - `ComplianceEvidenceRequest`—Compliance Evidence Request - `ComplianceIssue`—Compliance Issue - `Incident` - `Problem` - `ProductRequest`—Product Request - `ProductTransfer`—Product Transfer - `Release` - `RiskEvalSurveyInvt`—Risk Evaluation Survey Invitation - `ServiceRequest`—Service Request - `WorkOrder`—Work Order ### Status - **Type**: picklist - **Properties**: Create, Filter, Group, Restricted picklist, Sort, Update - **Description**: Specifies the status of the definition. - **Possible values**: - `Active` - `Draft` - `Inactive` ### SystemModstamp - **Type**: datetime - **Properties**: Defaulted on create, Filter, Sort - **Description**: The date and time when this record was last modified by an automated process. ### TriggerEventType - **Type**: picklist - **Properties**: Create, Filter, Group, Restricted picklist, Sort, Update - **Description**: The type of event for which a notification is triggered, such as creation or modification of a record for an object. - **Possible values**: - `Insert`—Create - `Update` ### UsageType - **Type**: picklist - **Properties**: Create, Filter, Group, Restricted picklist, Sort, Update - **Description**: Specifies the usage type of the definition. Example: IT Service - **Possible values**: - `DirectNotification`—Direct Notification - `ITServices`—It services - `SLA` # NTP Server Represents a NTP Server configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. ## Configuration Item Type Definition ||| |-|-| |Name|NTP Server| |Developer Name|`SD_NtSe`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Network Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-network-device.md)| |Rule Name|Default rule for all Azure SQL Managed Instances| |Identifier(s)|Asset Name Subscription Id Resource Group| ## Attributes No associated attributes for this configuration item type. # ObjectMilestonePauseTime Represents the details related to the duration, start and end times of when users pause and resume milestones for a specific object. This object is available in API version 65.0 and later. ## Supported Calls `create()`, `delete()`, `describeSObjects()`, `getDeleted()`, `getUpdated()`, `query()`, `retrieve()`, `undelete()`, `update()`, `upsert()` ## Fields ### EntityMilestoneId - **Type**: reference - **Properties**: Create, Filter, Group, Sort - **Description**: The entity milestone that is paused by a user. This field is a relationship field. - **Relationship Name**: EntityMilestone - **Relationship Type**: Master-detail - **Refers To**: EntityMilestone (the master object) ### Name - **Type**: string - **Properties**: Autonumber, Defaulted on create, Filter, idLookup, Sort - **Description**: The name of the record. ### PauseDurationInSecs - **Type**: int - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The duration for which an entity milestone is paused calculated in minutes. ### PauseEndTime - **Type**: dateTime - **Properties**: Create, Filter, Nillable, Sort, Update - **Description**: The time at which a user unpauses an entity milestone. ### PauseStartTime - **Type**: dateTime - **Properties**: Create, Filter, Sort, Update - **Description**: The time at which a user pauses an entity milestone. # Off-Platform Messaging Objects Most Messaging objects are stored on platform, meaning they're part of the standard Salesforce platform, just like other objects you work with in your Salesforce org. The [Object Reference for the Salesforce Platform Guide](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_concepts.htm) contains a list of on-platform Messaging objects and their descriptions. Some Messaging objects are stored off-platform, meaning they live in a separate, purpose-built database designed to support the scale and performance demands of real-time messaging. ## ConversationEntry Schema Each ConversationEntry record represents a message or event in a voice call or a standard or Enhanced Messaging session. See [ConversationEntry Schema (Off-Platform)](https://developer.salesforce.com/docs/service/messaging-object-model/references/mob-reference/messaging-object-model-conversationentry.md) for a list of fields and their descriptions. ## RelatedRecord Schema The RelatedRecord object links a ConversationEntry record to another record, such as another ConversationEntry, a VoiceCall, or a MessagingSession. See [RelatedRecord Schema (Off-Platform)](https://developer.salesforce.com/docs/service/messaging-object-model/references/mob-reference/messaging-object-model-relatedrecord.md) for a list of fields and their descriptions. ## See Also - [Messaging Object Model](https://developer.salesforce.com/docs/service/messaging-object-model/references/guides/messaging-object-model.md) - [On-Platform vs. Off-Platform Messaging Objects](https://developer.salesforce.com/docs/service/messaging-object-model/references/guides/messaging-object-model-on-off-platform.md) - [Access Conversation Data](https://developer.salesforce.com/docs/service/messaging-object-model/references/guides/messaging-object-model-access-data.md) - [ConversationEntry Schema (Off Platform)](/messaging-object-model/references/messaging-object-model-conversationEntry) - [RelatedRecord Schema (Off Platform)](https://developer.salesforce.com/docs/service/messaging-object-model/references/mob-reference/messaging-object-model-relatedrecord.md) - _Object Reference for the Salesforce Platform_: [ConversationEntry](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_conversationentry.htm) # On-Platform vs. Off-Platform Messaging Objects The [Messaging Object Model](https://developer.salesforce.com/docs/service/messaging-object-model/guide/messaging-object-model.md) diagram includes icons indicating whether each Messaging object is stored on platform or off platform. ## On-Platform Messaging Objects When we say an object is stored on platform, it means that it’s part of the standard Salesforce platform, just like other objects you work with in your Salesforce org. On-platform objects are managed using Salesforce’s platform infrastructure, which powers Service Cloud, Sales Cloud, and other Salesforce applications. On-platform Messaging objects are stored within your Salesforce org and support: - Viewing Object Manager - SOQL queries - Standard reporting Not all on-platform objects or fields are guaranteed to support these actions because internal restrictions or org-specific permissions may limit access. The [Object Reference for the Salesforce Platform Guide](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_concepts.htm) contains a list of on-platform Messaging objects and their descriptions. ## Off-Platform Messaging Objects While most messaging objects are stored on platform as part of the standard Salesforce platform, some Messaging objects are stored off platform, meaning the objects live in a separate, purpose-built database designed to support the scale and performance demands of real-time messaging. Salesforce processes billions of messaging conversations, across web, mobile, and third-party channels, which require a high-speed, high-volume storage system. To meet these demands, certain objects (like individual message entries) are stored in a specialized messaging database optimized for real-time performance. Because these objects are not stored in your platform Salesforce org, they: - Don’t appear in Object Manager - Can’t be queried with SOQL - Aren’t accessible via standard Salesforce reports See [Access Conversation Data](https://developer.salesforce.com/docs/service/messaging-object-model/guide/messaging-object-model-access-data.md) to learn how to access off-platform messaging data in Salesforce. **See Also** - [Messaging Object Model](https://developer.salesforce.com/docs/service/messaging-object-model/guide/messaging-object-model.md) - [Access Conversation Data](https://developer.salesforce.com/docs/service/messaging-object-model/guide/messaging-object-model-access-data.md) - [_Object Reference for the Salesforce Platform_](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_concepts.htm) # onAgentSend() Registers a function to call when an agent sends a chat message through the Salesforce console. This method intercepts the message and occurs before it is sent to the chat visitor. Available in API version 29.0 or later. **note:** This method is only called when an agent sends a message through the chat window interface. This method doesn’t apply when a sendMessage() method is called in the API. ## Syntax ```javascript sforce.console.chat.onAgentSend(chatKey:String, callback:Function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`chatKey`|String|The `chatKey` associated with the chat for which to call a function when the agent sends a message.| |`callback`|function|JavaScript method called upon completion of the method.| ## Sample Code–Visualforce ```apex_page ``` ## Response This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following properties: |Name|Type|Description| |----|----|-----------| |`content`|String|The text of the agent’s message.| |`name`|String|The name of the agent who is attempting to send the message as it appears in the chat log.| |`type`|String|The type of message that was received—for example, agent.| |`timestamp`|Date/Time|The date and time the agent attempted to send the chat message.| |`success`|Boolean|`true` if firing event was successful; `false` if firing event wasn’t successful.| # onAgentStateChanged() Registers a function to call when agents change their Chat status, such as from Online to Away. Available in API version 29.0 or later. ## Syntax ```javascript sforce.console.chat.onAgentStateChanged(eventHandler:Function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`eventHandler`|function|JavaScript method called when the agent's Chat status has changed.| ## Sample Code–Visualforce ```apex_page ``` ## Response This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following properties: |Name|Type|Description| |----|----|-----------| |`state`|String|String that represents the agent’s current Chat status—for example, Online, Away, or Offline. When an agent switches from Offline to Away, you may see two returned values (Online then Away) instead of one (Away).| |`success`|Boolean|`true` if firing event was successful; `false` if firing event wasn’t successful.| # onCallBegin() Registers a function that is called when a call begins (comes in). This method is for computer-telephony integration (CTI); it’s only available in API version 24.0 or later. ## Syntax ```javascript sforce.console.cti.onCallBegin( eventHandler:Function ) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`eventHandler`|function|JavaScript method called when a call begins.| ## Sample Code–Visualforce ```apex_page ``` ## Response This method is asynchronous, so it returns its response in an object in a callback method. The response object contains the following field: |Name|Type|Description| |----|----|-----------| |`id`|string|The call object ID of the call which has begun.| # onCallEnd() Registers a function that is called when a call ends. This method is for computer-telephony integration (CTI); it’s only available in API version 24.0 or later. ## Syntax ```javascript sforce.console.cti.onCallEnd( eventHandler:Function ) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`eventHandler`|function|JavaScript method called when a call ends.| ## Sample Code–Visualforce ```apex_page ``` ## Response This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following fields: |Name|Type|Description| |----|----|-----------| |`id`|string|The call object ID of the call which has ended.| |`duration`|string|The duration of the call.| |`disposition`|string|The disposition of the call.| # onCallLogSaved() Registers a function that is fired when an interaction log saves a call log. Use to get information or send information between an interaction log and a custom console component. This method is only available in API version 31.0 or later. ## Syntax ```javascript sforce.console.cti.onCallLogSaved( eventHandler:Function ) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`eventHandler`|function|For a standard interaction log, `eventHandler` is a function that is executed when a call log is saved. For a custom interaction log, `eventHandler` is a function that is executed when the `fireOnCallLogSaved` API is called in your Visualforce page.| ## Sample Code–Visualforce ```apex_page

Registered onCallLogSaved listener...

``` ## Response This method is asynchronous, so it returns its response in an object in a callback method. The response object contains the following field: |Name|Type|Description| |----|----|-----------| |`id`|string|Call log object ID that was saved.| # onChatCanceled() Registers a function to call when a chat visitor cancels a chat request. Available in API version 29.0 or later. ## Syntax ```javascript sforce.console.chat.onChatCanceled(callback:Function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`callback`|function|JavaScript method called upon completion of the method.| ## Sample Code–Visualforce ```apex_page ``` ## Response This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following properties: |Name|Type|Description| |----|----|-----------| |`chatKey`|string|The chat key for the chat request that has been canceled.| # onChatCriticalWaitState() Registers a function to call when a chat becomes critical to answer or a waiting chat is answered. Available in API version 29.0 or later. ## Syntax ```javascript sforce.console.chat.onChatCanceled(chatKey:String, callback:Function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`chatKey`|String|The `chatKey` associated with the chat for which the critical wait state has changed.| |`callback`|function|JavaScript method called upon completion of the method.| ## Sample Code–Visualforce ```apex_page ``` ## Response This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following properties: |Name|Type|Description| |----|----|-----------| |`state`|Boolean|Indicates whether the chat is in critical wait state (`true`) or not (`false`).| # onChatDeclined() Registers a function to call when an agent declines a chat request. Available in API version 29.0 or later. ## Syntax ```javascript sforce.console.chat.onChatDeclined(eventHandler:Function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`eventHandler`|function|JavaScript method called when a chat request is declined.| ## Sample Code–Visualforce ```apex_page ``` ## Response This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following properties: |Name|Type|Description| |----|----|-----------| |`chatKey`|String|The chat key for the chat request that has been declined.| |`success`|Boolean|`true` if firing event was successful; `false` if firing event wasn’t successful.| # onChatEnded() Registers a function to call when an engaged chat ends. Available in API version 29.0 or later. ## Syntax ```javascript sforce.console.chat.onChatEnded(eventHandler:Function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`eventHandler`|function|JavaScript method called when an engaged chat ends.| ## Sample Code–Visualforce ```apex_page ``` ## Response This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following properties: |Name|Type|Description| |----|----|-----------| |`chatKey`|String|The chat key for the engaged chat that has ended.| |`success`|Boolean|`true` if firing event was successful; `false` if firing event wasn’t successful.| # onChatRequested() Registers a function to call when an agent receives a chat request. Available in API version 29.0 or later. ## Syntax ```javascript sforce.console.chat.onChatRequested(eventHandler:Function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`eventHandler`|function|JavaScript method called when a chat request is assigned to an agent.| ## Sample Code–Visualforce ```apex_page ``` ## Response This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following properties: |Name|Type|Description| |----|----|-----------| |`chatKey`|String|The chat key for the incoming chat request.| |`success`|Boolean|`true` if firing event was successful; `false` if firing event wasn’t successful.| # onChatStarted() Registers a function to call when an agent starts a new chat with a customer. Available in API version 29.0 or later. ## Usage ## Syntax ```javascript sforce.console.chat.onChatStarted(eventHandler:Function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`eventHandler`|function|JavaScript method called when a chat request is accepted and becomes an engaged chat.| ## Sample Code–Visualforce ```apex_page ``` ## Response This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following properties: |Name|Type|Description| |----|----|-----------| |`chatKey`|String|The chat key for the chat request that has become an engaged chat.| |`success`|Boolean|`true` if firing event was successful; `false` if firing event wasn’t successful.| # onChatTransferredOut() Registers a function to call when an engaged chat is transferred out to another agent. Available in API version 29.0 or later. ## Syntax ```javascript sforce.console.chat.onChatTransferredOut(eventHandler:Function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`eventHandler`|function|JavaScript method called when a chat has been successfully transferred out to another agent.| ## Sample Code–Visualforce ```apex_page ``` ## Response This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following properties: |Name|Type|Description| |----|----|-----------| |`chatKey`|String|The chat key for the chat that has been transferred.| |`success`|Boolean|`true` if firing event was successful; `false` if firing event wasn’t successful.| # onClickToDial() for Lightning Experience ## Usage Registers a function to call when a user clicks an enabled phone number. This method is available in API version 38.0 or later. **note:** You can use this method with the Lightning web component `lightning-click-to-dial`. You can also use it with the Aura component `lightning:clickToDial`. Keep in mind that you can’t use either component in iFrames. This method can’t be used with the Visualforce component `support:clickToDial`. ## Syntax ```javascript sforce.opencti.onClickToDial({ listener: FUNCTION }) ``` ## Arguments |Name|Type|Description| |------|------|-------------| |`listener`|function|JavaScript method called when the user clicks an enabled phone number.| ## Sample Code–HTML and JavaScript ```html ``` ## Payload The payload object passed to each call to the listener method contains the following fields. |Name|Type|Description| |------|------|-------------| |`number`|number|Provides the phone number clicked by the user.| |`recordId`|string|Provides the ID of the record associated with the clicked phone number.| |`recordName`|string|Provides the name of the record for the clicked phone number.| |`objectType`|string|Provides the type of record associated with the clicked phone number.| |`accountId` or `contactId`|string|If the clicked phone number belongs to a person account, the associated account or contact ID is provided.| |`personAccount`|boolean|If the clicked phone number belongs to a person account, this property is `true`.If person accounts aren’t enabled in your org, this field isn’t included in the payload object.| |`params`|string|Comma-separated list of parameters associated with the phone number passed into the component.| # onClickToDial() for Salesforce Classic ## Usage Registers a function to call when a user clicks an enabled phone number. ## Syntax ```javascript sforce.interaction.cti.onClickToDial( listener:function ) ``` ## Arguments |Name|Type|Description| |------|------|-------------| |`listener`|function|JavaScript method called when the user clicks a phone number.| ## Sample Code–JavaScript ```javascript ``` ## Response This method is asynchronous. The response is returned in an object passed to a callback method. The response object contains the following fields. |Name|Type|Description| |------|------|-------------| |`result`|string|Returns the phone number, object ID, object name, and for API version 33.0 or later, the object tab name from where the click was initiated, as a JSON string. For API version 33.0 or later, invoking this method on a PersonAccount object also returns `accountId` or `contactId`, and `personAccount` (`true` if the object is a PersonAccount, `false` otherwise).| |`error`|string|If the API call was successful, this variable is undefined. If the API call failed, this variable returns an error message.| Example `result`: ```javascript {"number":"4155551212","objectId":"001x0000003DIGj","objectName":"Account", "displayName":"Company"} ``` Example `result` for a PersonAccount object (API version 33.0 and later): ```javascript {"number":"4155551212","object Id":"001D000000JWVvP","objectName":"Howard Jones","object":"Account", "personAccount":true,"contactId":" 003D000000QOBPX"} ``` # onCurrentCapacityChanged() Registers a function to call when an agent's capacity for accepting chats changes—for example, if an agent accepts a new chat, ends a currently engaged chat, or otherwise changes the number of chats to which they are assigned, or if a chat request is pushed to their chat queue. Available in API version 29.0 or later. ## Syntax ```javascript sforce.console.chat.onCurrentCapacityChanged(eventHandler:Function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`eventHandler`|function|JavaScript method called when the agent's capacity for accepting chats has changed.| ## Sample Code–Visualforce ```apex_page ``` ## Response This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following properties: |Name|Type|Description| |----|----|-----------| |`count`|integer|The number of chats in which the agent is currently engaged plus the number of chat requests currently assigned to the agent.| |`success`|Boolean|`true` if firing event was successful; `false` if firing event wasn’t successful.| # onCustomConsoleComponentButtonClicked() Registers a function to call when a button is clicked on an application-level custom console component. This method is only available in API version 25.0 or later. ## Syntax ```javascript sforce.console.onCustomConsoleComponentButtonClicked(eventHandler:Function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`callback`|function|JavaScript method called when a button is clicked on a custom console component.| ## Sample Code–Visualforce ```apex_page ``` ## Event Handler Response This method is asynchronous, so it returns its response in an object in a callback method. The response object contains the following field: |Name|Type|Description| |----|----|-----------| |`id`|string|The ID of the custom console component which includes the page.| |`windowHidden`|boolean|`true` if the custom console component window is hidden after the button is clicked; `false` if the custom console component window is visible after the button is clicked.| # onCustomEvent() Registers a function to call when a custom event takes place during a chat. Available in API version 29.0 or later. ## Syntax ```javascript sforce.console.chat.onCustomEvent(chatKey:String, type:String, callback:Function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`chatKey`|String|The `chatKey` associated with the chat for which to call a function when a custom event takes place.| |`type`|String|The name of the custom event you want to listen for. This should match the name of the custom event sent from the chat window.| |`callback`|function|JavaScript method called upon completion of the method.| ## Sample Code–Visualforce ```apex_page ``` ## Response This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following properties: |Name|Type|Description| |----|----|-----------| |`type`|String|The type of the custom event that was sent to this chat; corresponds to the `type` argument of the `liveagent.chasitor.sendCustomEvent()` method used to send this event from the chat window.| |`data`|String|The data of the custom event that was sent to this chat; corresponds to the `data` argument of the `liveagent.chasitor.sendCustomEvent()` method used to send this event from the chat window.| |`source`|String|The source of the custom event that was sent to this chat; corresponds to either the agent or the chat visitor, depending on who triggered the custom event.| |`timestamp`|Date/Time|The time and date the event was received.| |`success`|Boolean|`true` if firing event was successful; `false` if firing event wasn’t successful.| # onEnclosingTabRefresh() Registers a function to call when the enclosing tab refreshes. This method is only available in API version 24.0 or later. ## Syntax ```javascript sforce.console.onEnclosingTabRefresh(eventHandler:Function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`eventHandler`|function|JavaScript method called when the enclosing tab refreshes.| ## Sample Code–Visualforce ```apex_page ``` ## Event Handler Response This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following fields: |Name|Type|Description| |----|----|-----------| |`id`|string|The ID of the refreshed tab.| |`objectId`|string|The object ID of the refreshed tab or null if no object exists.| # onFileTransferCompleted() Registers a function to call when a file is transferred from a customer to an agent. Available in API version 31.0 or later. ## Syntax ```javascript sforce.console.chat.onFileTransferCompleted(chatKey:String, callback:Function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`chatKey`|String|The chat key for the chat the file was transferred from.| |`callback`|function|JavaScript method that is called when the method is complete.| ## Sample Code–Visualforce ```apex_page test on file transfer complete ``` ## Response This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following properties: |Name|Type|Description| |----|----|-----------| |`attachmentId`|String|The ID of the object created for the transferred file.| |`success`|Boolean|`true` if firing event was successful; `false` if firing event was unsuccessful.| # onFocus() for Salesforce Classic ## Usage Registers a function to call when the browser focus changes. In the Salesforce console, the browser focus changes when a user navigates between primary tabs or the navigation tab. ## Syntax ```javascript sforce.interaction.onFocus( listener:function ); ``` ## Arguments |Name|Type|Description| |------|------|-------------| |`listener`|function|JavaScript method called when the browser focus changes.| ## Sample Code–JavaScript ```javascript ``` ## Response This method is asynchronous. The response is returned in an object passed to a callback method. The response object contains the following fields. |Name|Type|Description| |------|------|-------------| |`result`|string|Returns the URL of the page in focus as a JSON string, including any applicable object ID, object name, object type, and for API version 33.0 or later, the object tab name. If the page isn't focused on an object, the object ID, object name, and object fields are empty. For API version 31.0 and later, invoking this method on a PersonAccount object also returns `accountId` or `contactId`, and `personAccount` (`true` if the object is a PersonAccount, `false` otherwise).| |`error`|string|If the API call was successful, this variable is undefined. If the API call failed, this variable returns an error message.| Example `result`: ```javascript {"url":"http://MYDOMAINNAME.my.salesforce.com/001x0000003DGQR", "objectId":"001x0000003DGQR","objectName":"Acme", "object":"Account","displayName":"Company"} ``` Example `result` for a PersonAccount object (API version 31.0 and later): ```javascript {"url":"http://MYDOMAINNAME.my.salesforce.com/001x0000003DGQR", "objectId":"001x0000003DGQR","objectName":"Acme Person Account", "object":"Account", "contactId":"003D000000QOMqg", "personAccount":true} ``` # onFocusedPrimaryTab() Registers a function to call when the focus of the browser changes to a different primary tab. This method is only available in API version 25.0 or later. ## Syntax ```javascript sforce.console.onFocusedPrimaryTab(eventHandler:Function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`eventHandler`|function|JavaScript method called when the focus of the browser changes to a different primary tab.| ## Sample Code–Visualforce ```apex_page ``` ## Event Handler Response This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following fields: |Name|Type|Description| |----|----|-----------| |`id`|string|The ID of the primary tab on which the browser is focused.| |`objectId`|string|The object ID of the primary tab on which the browser is focused or null if no object exists.| # onFocusedSubtab() Registers a function to call when the focus of the browser changes to a different subtab. This method is only available in API version 24.0 or later. ## Syntax ```javascript sforce.console.onFocusedSubtab(eventHandler:Function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`eventHandler`|function|JavaScript method called when the focus of the browser changes to a different subtab.| ## Sample Code–Visualforce ```apex_page ``` ## Event Handler Response This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following fields: |Name|Type|Description| |----|----|-----------| |`id`|string|The ID of the subtab on which the browser is focused.| |`objectId`|string|The object ID of the subtab on which the browser is focused or null if no object exists.| # onNavigationChange() for Lightning Experience ## Usage Registers a function to call when one of the following actions occur: - The URL of the page changes - In a standard app in Lightning Experience, a user navigates between browser tabs or windows and the document comes back into focus. If the document doesn’t come back into focus, the listener isn’t invoked. Also, internal navigation actions that open a new record modal, such as the screenPop() method, will invoke the listener. - In a console app in Lightning Experience, a user navigates between primary tabs and subtabs in a console, or the document comes back into focus when a user navigates between browser tabs or windows. - In a console app, a tab is refreshed, such as when you create a new case in a console and save it. For example, the listener is invoked when a user navigates away from a browser tab and then comes back to the tab. This method is available in API version 38.0 or later. ## Syntax ```javascript sforce.opencti.onNavigationChange({ listener: FUNCTION }); ``` ## Arguments |Name|Type|Description| |------|------|-------------| |`listener`|function|JavaScript method called upon a navigation change.| ## Sample Code–HTML and JavaScript ```html ``` ## Payload The payload object passed to each call to the listener method contains the following fields. When you switch from a record detail page to a list view, this method returns: - In Lightning Experience, only the `url` - In Lightning Experience console apps, nothing is returned because the listener isn’t invoked
NameTypeDescription
urlstringProvides the URL of the page the user navigated to.
recordIdstringIf the user navigated to a Salesforce record, such as an account or case, the loaded record ID is returned. Otherwise, the field is empty.
recordNamestringIf the user navigated to a Salesforce record, the loaded record name. Otherwise, the field is empty.
objectTypestringIf the user navigated to a Salesforce record, the loaded object type, such as an account or case. Otherwise, the field is empty.
accountId or contactIdstringIf the page the user navigated to is the record home of a person account, the associated account or contact ID is returned.
personAccountbooleanReturned only if person accounts are enabled in your org and the user navigates to a person account.

If the page the user navigated to is the record home of a person account, this field is true.

If the page the user navigated to is not the record home of a person account, this field is false.

If the page the user navigated to is a business account, this field along with the accountId and contactId fields aren’t included in the payload.

# onNewMessage() Registers a function to call when a new message is sent from a customer, agent, or supervisor. Available in API version 29.0 or later. ## Syntax ```javascript sforce.console.chat.onNewMessage(chatKey:String, callback:Function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`chatKey`|string|The `chatKey` associated with the chat for which to call a function when a new customer message is received.| |`callback`|function|JavaScript method called upon completion of the method.| ## Sample Code–Visualforce ```apex_page ``` ## Response This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following properties: |Name|Type|Description| |----|----|-----------| |`content`|String|The text of a message in the chat log.| |`name`|String|The name of the user who sent the message. This appears exactly as it is displayed in the chat log.| |`type`|String|The type of message that was received, such as an Agent or Visitor message.| |`timestamp`|Date/Time|The date and time the message was received.| |`success`|Boolean|`true` if firing event was successful; `false` if firing event wasn’t successful.| # onObjectUpdate() for Salesforce Classic ## Usage Registers a function to call when case fields, the feed, or related list data have changed on records that are displayed with a feed-based layout. **note:** Use this method with Visualforce pages you want to use as custom publishers in Case Feed. ## Syntax ```javascript sforce.interaction.entityFeed.onObjectUpdate(callback:function) ``` ## Arguments |Name|Type|Description| |------|------|-------------| |`callback`|function|JavaScript method executed when the API method call is completed.| ## Sample Code–JavaScript ```javascript ``` ## Response This method is asynchronous. The response is returned in an object passed to a callback method. The response object contains the following fields. |Name|Type|Description| |------|------|-------------| |`fieldsUpdated`|boolean|`true` if one or more case fields were updated.| |`relatedListsUpdated`|boolean|`true` if one or more case related lists were updated.| |`feedUpdated`|boolean|`true` if the case feed was updated.| # onSendCTIMessage() Registers a function that is fired when a message is sent with the [sendCTIMessage()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-sendctimessage.md). Use to get information or send information between an interaction log and a custom console component. This method is only available in API version 31.0 or later. ## Syntax ```javascript sforce.console.cti.onSendCTIMessage( eventHandler:Function ) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`eventHandler`|function|JavaScript method called when a message is sent with the onSendCTIMessage() method.| ## Sample Code–Visualforce ```apex_page Send a message to see your listener receiving it! ``` ## Response This method is asynchronous, so it returns its response in an object in a callback method. The response object contains the following field: |Name|Type|Description| |----|----|-----------| |`message`|string|The message that was sent with the onSendCTIMessage() method.| # onTabSave() Registers and calls a callback method when a user clicks **Save** in a subtab’s Unsaved Changes dialog box. When using this method, call [`setTabUnsavedChanges()`](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-settabdirty.md) in the callback method. This notifies the console that the custom save operation completed. In the call to `setTabUnsavedChanges()`, pass the first parameter as `false` to indicate a successful save or `true` to indicate an unsuccessful save. This method is only available in API version 28.0 or later. Registering a callback method affects the user interface. When no save handler is registered, the user is presented with two options when closing a subtab with unsaved changes: **Continue** or **Cancel**. When a save handler is registered, the user is presented with three options when closing the subtab: **Save**, **Don’t Save**, or **Cancel**. In this scenario, the callback method registered is called when the user chooses **Save**. **important:** When using `onTabSave()` with setTabUnsavedChanges(): - Calling `sforce.console.setTabUnsavedChanges(false,...)` closes the specified subtab. We recommend placing the call to `sforce.console.setTabUnsavedChanges()` at the end of the callback method, as any subsequent save logic might not execute. - `onTabSave()` works only on subtabs or their sidebar components. It doesn’t work on primary tabs. - *Not* calling `sforce.console.setTabUnsavedChanges()` will have a severe effect on the user interface. For example, closing a primary tab with a subtab for which `sforce.console.setTabUnsavedChanges()` has not been called prevents a `Saving...` modal dialog box from closing. - Any callback passed to `sforce.console.setTabUnsavedChanges()` will not execute if the specified tab saves successfully and closes. **note:** Calling `onTabSave()` from a custom console component prevents that component from refreshing when saving the subtab. ” in the Salesforce online help. ## Syntax ```javascript sforce.console.onTabSave(callback:Function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`callback`|function|JavaScript method called to handle the save operation.| ## Sample Code–Visualforce ```apex_page Click here to register save handler ``` ## Response |Name|Type|Description| |----|----|-----------| |`id`|string|ID of the subtab being saved.| |`objectId`|string|Object ID of the subtab being saved, if applicable; null otherwise.| # onTypingUpdate() Registers a function to call when the customer’s text in the chat window changes. If Sneak Peek is enabled, this function is called whenever the customer edits the text in the chat window. If Sneak Peek is not enabled, this function is called whenever a customer starts or stops typing in the chat window. Available in API version 29.0 or later. ## Syntax ```javascript sforce.console.chat.onTypingUpdate(chatKey:String, callback:Function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`chatKey`|String|The `chatKey` associated with the chat for which to call a function when a customer begins typing a new message to the agent.| |`callback`|function|JavaScript method called upon completion of the method.| ## Sample Code–Visualforce ```apex_page ``` ## Response This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following properties: |Name|Type|Description| |----|----|-----------| |`isTyping`|Boolean|Indicates whether a chat visitor is typing (`true`) or not (`false`).| |`sneakPeek`|String|The text the chat visitor is currently typing into their input box in the chat window. This is visible only if Sneak Peek is enabled for the agent.| |`success`|Boolean|`true` if firing event was successful; `false` if firing event wasn’t successful.| # onUtilityClick() for Lightning Experience Registers an `eventHandler` for the utility. This `eventHandler` is called when the utility is clicked. Consider the following guidelines when working with this method. - The method is supported in Lightning apps with standard and console navigation. - You can use this method to register multiple callbacks per `utilityItem` when executed sequentially. - You can’t remove registered callbacks. ## Arguments The method provides the same arguments for both Aura Components and Lightning Web Components (LWC). For LWC, optional parameters are passed into an object as the last argument of the method. |Name|Type|Description| |----|----|-----------| |`utilityId`|string|The ID of the utility for which to register the callback. Optional when called within a utility using Aura Components. Always required for LWC.| |`eventHandler`|function|The JavaScript function that's called when the utility is clicked.| ## LWC Sample Code This component handles a utility click using the `EnclosingUtilityId` wire adapter. ```javascript import { LightningElement, wire } from 'lwc'; import { onUtilityClick, EnclosingUtilityId } from 'lightning/platformUtilityBarApi'; export default class UtilityClickExample extends LightningElement { @wire(EnclosingUtilityId) utilityId; handleUtilityClick() { if (!this.utilityId) { return; } onUtilityClick(this.utilityId, () => { console.log(`Utility ${this.utilityId} clicked!`); }); } } ``` To make your component available for use in a utility bar, specify the `lightning__UtilityBar` target in the [component’s configuration file](https://developer.salesforce.com/docs/platform/lwc/guide/use-config-for-utility-bar.html). ## LWC Response Returns a promise that resolves to `true` if successful. The promise is rejected on error. ## Aura Components Sample Code This component has a button that, when pressed, registers an `eventHandler` function for the enclosing utility. Component code: ```html ``` Controller code: ```javascript ({ handleOnUtilityClick: function(component, event, helper){ var utilityBarAPI = component.find("utilitybar"); var eventHandler = function(response){ console.log(response); }; utilityBarAPI.onUtilityClick({ eventHandler: eventHandler }).then(function(result){ console.log(result); }).catch(function(error){ console.log(error); }); } }) ``` ## Aura Components Response This method returns a promise that, upon success, resolves to `true`, and is rejected on error. The `eventHandler` expects a response JSON object containing the following fields. |Name|Type|Description| |----|----|-----------| |`utilityId`|string|The ID of the utilityBar item button that was clicked.| |`panelVisible`|boolean|False if the utility item panel is hidden after the button is clicked. True if the utility item panel is visible after the button is clicked.| # Open CTI and Other Voice Solutions Open CTI integrates third-party CTI systems with Salesforce. But do you wonder what came before? Or what the difference is between Open CTI and Sales Dialer? **important:** Open CTI is in maintenance mode and is scheduled for retirement in February 2028. No new features or enhancements are being added to Open CTI. Effective immediately, Open CTI is deprecated and unavailable for newly created Agentforce Service orgs. To ensure long-term compatibility and access to the latest innovations, we recommend transitioning your development efforts to Salesforce Voice. For more information, see this [Knowledge Article](https://help.salesforce.com/s/articleView?id=005306437&type=1), [learning map](https://help.salesforce.com/s/articleView?id=service.cti_migrate_map.htm), and [developer migration guide](/docs/service/api-cti/guide/migrate-cti.html). - What came before Open CTI? - : Desktop CTI, also known as the CTI Toolkit, is the predecessor to Open CTI. Desktop CTI required adapters to be installed on each call center user’s machine. With Open CTI, those user-side adapters are a thing of the past. Desktop CTI is retired and you must migrate to another solution. Work with your partners to create a Service Cloud Voice implementation. * What about Sales Dialer? - : If you’re confused between Sales Dialer and Open CTI, don’t be. Sales Dialer provides a way to provision numbers and make calls directly from Salesforce. However, if you already have a telephony system in place, Open CTI is the way to go since it integrates to that existing system. # Open CTI and Security We recommend that all Open CTI implementations use HTTPS in the `reqAdapterUrl` element in their call center definition file. Using HTTPS ensures that traffic between your telephony server and Salesforce is encrypted. By using HTTPS, Open CTI inherits all the benefits of browser and cloud-based security because it points directly to the softphone provider using a secure connection. When users access the softphone on any Salesforce page, it’s displayed in an iFrame and all messages from the softphone to Salesforce are sent via Window.postMessage() methods. For each message sent, the target is restricted to Salesforce. For each message received, Salesforce verifies its format and the sender origin. **tip:** For Salesforce Classic console apps, if your CTI phone is running on a server with a non-standard port, make sure to include the port number in your domain. For example, if your server is called `myserver` and your port number is `8500`, include `myserver:8500` as an allowed URL in your Salesforce console. This setting doesn’t apply for Lightning console apps. # Open CTI Demo Adapter We’ve put together a demo adapter package that lets you test drive Open CTI for Lightning Experience. The package provides a demo softphone that highlights and demonstrates the main features of Open CTI for Lightning Experience without even connecting to a phone system. To learn more about the demo adapter, go to [Lightning Open CTI](https://developer.salesforce.com/page/Lightning_Open_CTI). You can also check out the demo adapter code on [GitHub](https://github.com/developerforce/open-cti-demo-adapter). **note:** The Open CTI demo adapter is an archived repository. Salesforce do not provide feature support or add new features for the demo adapter, and there will be limited support if you are using the Open CTI demo adapter for your Open CTI implementations. If you clone the Open CTI demo adapter archived repository, you must also download the latest `ant-salesforce.jar` and replace the pre-existing one in the repository to avoid any errors with the latest Salesforce APIs. See [Ant Migration Tool Guide](https://developer.salesforce.com/docs/atlas.en-us.daas.meta/daas/forcemigrationtool_prereq.htm). # Open CTI Developer Guide Previous PDF Versions | API Version | Release | PDF | | ----------- | ---------- | ------------------------------------------------------------------------------------------------------- | | 67.0 | Summer '26 | [Download PDF](https://resources.docs.salesforce.com/262/latest/en-us/sfdc/pdf/api_cti.pdf) | | 66.0 | Spring '26 | [Download PDF](https://resources.docs.salesforce.com/260/latest/en-us/sfdc/pdf/api_cti.pdf) | | 65.0 | Winter '26 | [Download PDF](https://resources.docs.salesforce.com/258/latest/en-us/sfdc/pdf/api_cti.pdf) | | 64.0 | Summer '25 | [Download PDF](https://resources.docs.salesforce.com/256/latest/en-us/sfdc/pdf/api_cti.pdf) | # Open CTI Release Notes This section describes recent updates to the Open CTI Developer Guide. ## Updates for Summer '26 - Published this guide at a new URL in the Salesforce Developers docs portal: [Open CTI Developer Guide](/docs/service/api-cti/guide/). - Added a new migration section to help partners and independent software vendors move from Open CTI to Salesforce Voice with Partner Telephony. See [Migrate Your Open CTI Integration to Salesforce Voice with Partner Telephony](https://developer.salesforce.com/docs/service/api-cti/guide/migrate-cti.md). # Open CTI Support Policy Open CTI is in maintenance mode and is scheduled for retirement in February 2028. No new features or enhancements are being added to Open CTI. Effective immediately, Open CTI is deprecated and unavailable for newly created Agentforce Service orgs. To ensure long-term compatibility and access to the latest innovations, we recommend transitioning your development efforts to Salesforce Voice with Partner Telephony. For more information, see this [Knowledge Article](https://help.salesforce.com/s/articleView?id=005306437&type=1), [learning map](https://help.salesforce.com/s/articleView?id=service.cti_migrate_map.htm), and [developer migration guide](https://developer.salesforce.com/docs/service/api-cti/guide/migrate-cti.md). - **[Backward Compatibility](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-backward-compatibility.md)** Salesforce strives to make backward compatibility easy when using Open CTI. - **[API Support](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-end-life.md)** Salesforce is committed to supporting each Open CTI version for a minimum of three years from the date of its first release. # open() for Lightning Experience Opens a utility. If the utility is already open, this method has no effect. Only one utility can be open at a time. If another utility is already open, `open()` minimizes the utility. This method is available for Lightning Web Components (LWC) only. ## Arguments Optional parameters are passed into an object as the last argument of the method. |Name|Type|Description| |----|----|-----------| |`utilityId`|string|The ID of the utility to open.| |`autoFocus`|object|Optional. Specifies whether the utility item to open has focus.| ## LWC Sample Code This component opens a utility using the enclosing utility ID. ```javascript import { LightningElement, wire } from 'lwc'; import { open, EnclosingUtilityId } from 'lightning/platformUtilityBarApi'; export default class EnablePopoutExample extends LightningElement { @wire(EnclosingUtilityId) utilityId; async handleOpen() { if (!this.utilityId) { return; } await open(this.utilityId, { autoFocus: true }); } } ``` To make your component available for use in a utility bar, specify the `lightning__UtilityBar` target in the [component’s configuration file](https://developer.salesforce.com/docs/platform/lwc/guide/use-config-for-utility-bar.html). ## Response Returns a promise that resolves to `true` if successful. The promise is rejected on error. # openConsoleUrl() Opens a URL created by the generateConsoleUrl() method (a URL to a tab, or group of related tabs, in the Salesforce console). This method is only available in API version 28.0 or later. ## Syntax ```javascript sforce.console.openConsoleUrl(id:String, consoleUrl:URL, active:Boolean, (optional)tabLabels:String, (optional)tabNames:String, (optional)callback:Function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`id`|string|ID of the console tab to override. If the ID corresponds to an existing primary tab, then the existing primary tab is redirected to the given URL because the console prevents duplicate tabs. Use null to create a new primary tab.| |`consoleUrl`|string|Console URL that represents the array of URLs passed into Salesforce.| |`active`|boolean|If `true`, the opened primary tab displays immediately. If `false`, the opened primary tab displays in the background and the current tab maintains focus.| |`tabLabels`|string|Optional array of labels of the opened primary tab or subtabs.  The order in which the tabs appear in the console URL should match the order of the labels that appear in the array. If you do not want to set the labels of tabs, use an empty string (`''`).| |`tabNames`|string|Optional array of names of the opened primary and subtabs.  The order in which the tabs appear in the console URL should match the order of the names that appear in the array. If you do not want to set the names of tabs, use an empty string (`''`).| |`callback`|function|JavaScript method that’s called upon completion of the method.| ## Sample Code–Visualforce ```apex_page Click here to open a console URL ``` **note:** This example shows that if you want to set a label or name, you must set the other values to empty string (`‘’`). ## Response This method is asynchronous, so it returns its response in an object in a callback method. The response object contains the following field: |Name|Type|Description| |----|----|-----------| |`success`|boolean|`true` if the console URL was opened successfully, `false` otherwise.| # openConsoleUrl() for Lightning Experience Opens a URL generated by `generateConsoleUrl()`. This method works only in Lightning console apps. This method isn’t supported for Lightning Web Components (LWC). ## Arguments |Name|Type|Description| |----|----|-----------| |`url`|string|Console URL representing the array of URLs passed into Salesforce.| |`focus`|boolean|Optional. If true, the workspace tab opens and displays immediately. If false, the workspace tab opens in the background.| |`labels`|string[]|Optional. An array of labels for the opened tabs. The order that the tabs appear in the URL should match the order in the array. Use an emptry string if you don’t want to set any labels.| ## Aura Components Sample Code This component has a button that, when pressed, opens a workspace using the `openConsoleUrl()`method. Component code: ```html ``` Controller code: ```javascript // Assume URL generated by generateConsoleUrl() API // E.g. /lightning/r/Account/001xx000003DGQYAA4/view?ws=%2Flightning%2Fr%2FAccount%2F001xx000003DGQXAA4%2Fview&ctabs=%2Flightning%2Fr%2FAccount%2F001xx000003DGQWAA4%2Fview&activectab=2 ({ handleOpenConsoleUrl : function(component, event, helper) { var url = generateConsoleUrl(); var workspaceAPI = cmp.find("workspaceAPI"); workspaceAPI.openConsoleURL({ "url": url, "focus": true, "labels": ["Workspace Label", "First Subtab Label", "Second Subtab Label"] }).then(function(activeTabId) { console.log(activeTabId); }) .catch(function(error) { console.log(error); }) } }); ``` ## Response This method returns a promise that, upon success, resolves to the `tabId` of the active tab. # openPrimaryTab() Opens a new primary tab to display the content of the specified URL, which can be relative or absolute. You can also override an existing tab. This method is only available in API version 20.0 or later. - If the ID corresponds to an existing primary tab, the existing tab is redirected to the given URL because the Salesforce console prevents duplicate tabs. - If the URL is to a Salesforce object, that object displays as specified in the Salesforce console app settings. For example, if cases are set to open as a subtab of their parent accounts, and `openPrimaryTab()` is called on a case, the case opens as subtab on its parent account's primary tab. If there's an error opening the tab, the error code is reported in the JavaScript console. ## Syntax ```javascript sforce.console.openPrimaryTab(id:String, url:URL, active:Boolean, (optional)tabLabel:String, (optional)callback:Function, (optional)NAME) ``` Where `NAME` is a variable. ## Arguments
Name Type Description
id string ID of the primary tab to override.

Use null to create a new primary tab.

If the ID corresponds to an existing primary tab, the existing tab is redirected to the given URL because the Salesforce console prevents duplicate tabs.

url URL URL of the opened primary tab.

If the URL is to a Salesforce object, that object displays as specified in the Salesforce console app settings. For example, if cases are set to open as a subtab of their parent accounts, and openPrimaryTab() is called on a case, the case opens as subtab on its parent account's primary tab.

Users can open an external URL if it’s been added to the console’s allowlist.

When using a relative URL, make sure that you include "/" at the beginning of your URL. When pointing to a Visualforce page, use "/apex/" at the beginning of your URL. Otherwise, your URL might not work as expected.

active boolean If true , the opened primary tab displays immediately. If false , the opened primary tab displays in the background and the current tab maintains focus.
tabLabel string Optional label of the opened primary tab. If a label isn't specified, External Page displays.

Add labels as text; HTML isn't supported.

callback function JavaScript method called upon completion of the method.
name string Optional name of the opened primary tab.

This argument is only available in API version 22.0 and later.

## Sample Code–Visualforce ```apex_page Click here to open a new primary tab ``` **note:** To see this example in action, click the custom link on a case. For more information, see [Define Custom Buttons and Links](https://help.salesforce.com/s/articleView?id=defining_custom_links.htm) in Salesforce Help. ## Response This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following fields: |Name|Type|Description| |----|----|-----------| |`success`|boolean|`true` if the tab successfully opened; `false` if the tab didn't open.| |`id`|string|ID of the primary tab. IDs are only valid during a user session; IDs become invalid when a user leaves the Salesforce console.| # openSubtab() Opens a new subtab (within a primary tab) that displays the content of a specified URL, which can be relative or absolute. You can also override an existing subtab. Use to open a new subtab on a primary tab via the primary tab's ID. This method is only available in API version 20.0 or later. If there's an error opening the tab, the error code is reported in the JavaScript console. ## Syntax ```javascript sforce.console.openSubtab(primaryTabId:String, url:URL, active:Boolean, tabLabel:String, id:String, (optional)callback:Function, (optional)name:String) ``` ## Arguments
Name Type Description
primaryTabId string ID of the primary tab in which the subtab opened.
url URL URL of the opened subtab.

If the URL is to a Salesforce object, that object displays as specified in the Salesforce console app settings. For example, if cases are set to open as a primary tab, and openSubtab() is called on a case, the case opens as a primary tab.

Users can open an external URL if it’s been added to the console’s allowlist.

When using a relative URL, make sure that you include "/" at the beginning of your URL. When pointing to a Visualforce page, use "/apex/" at the beginning of your URL. Otherwise, your URL might not work as expected.

active boolean If true , the opened subtab displays immediately. If false , the opened subtab displays in the background and the current tab maintains focus.
tabLabel string Optional label of the opened subtab. If a label isn't specified, External Page displays.

Add labels as text; HTML isn't supported.

id string ID of the subtab to override.

Use null to create a new subtab.

callback function JavaScript method called upon completion of the method.
name string Optional name of the opened subtab.

This argument is only available in API version 22.0 and later.

## Sample Code–Visualforce ```apex_page Click here to open a new subtab ``` **note:** To see this example in action, click the custom link on a case. For more information, see [Define Custom Buttons and Links](https://help.salesforce.com/apex/HTViewHelpDoc?id=defining_custom_links.htm) in the Salesforce help. ## Response This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following fields: |Name|Type|Description| |----|----|-----------| |`success`|boolean|`true` if the subtab successfully opened; `false` if the subtab didn't open.| |`id`|string|ID of the subtab. IDs are only valid during a user session; IDs become invalid when the user leaves the Salesforce console.| # openSubtab() for Lightning Experience Opens a subtab within a workspace tab. If the subtab is already open, the subtab is focused. This method works only in Lightning console apps. ## Arguments The method provides the same argument for both Aura Components and Lightning Web Components (LWC). However, `icon`, `iconAlt`, and `label` are supported only for LWC. |Name|Type|Description| |----|----|-----------| |`parentTabId`|string|The ID of the workspace tab within which the new subtab opens. You must pass the parent tab ID into the `openSubtab()` method.| |`pageReference`|object|Optional. Specifies the `pageReference` to open.| |`recordId`|ID|Optional. Specifies the record to open.| |`url`|string|Optional. The URL representing the content of the new workspace tab. The URL can be either relative or absolute. To use a third-party domain, add the site as a CSP Trusted Site.| |`focus`|boolean|Optional. Specifies whether the new subtab has focus. To display the subtab immediately, set `focus` to `true`. To open the subtab in the background, set `focus` to `false`.| |`icon`|string|Optional. An SLDS icon key. See a full list of icon keys on the [SLDS reference site](https://www.lightningdesignsystem.com/icons/). Available for LWC only.| |`iconAlt`|string|Optional. Alternative text for the icon. Available for LWC only.| |`label`|string|Optional. The text label for the icon. Available for LWC only.| **note:** `pageReference`, `recordId`, and `url` are prioritized in that order. Providing arguments with a higher priority means the others get ignored. ## LWC Sample Code This component retrieves the enclosing tab ID using the `EnclosingTabId` wire adapter. It opens a subtab on the current tab when the `handleClick()` function is called. If the component doesn’t reside inside a tab or subtab, `tabId` is null. To check if the current tab is a subtab, use `getTabInfo()`. If the current tab is a subtab, pass in the parent tab ID to the `openSubtab()` function. ```javascript import { LightningElement, wire } from 'lwc'; import { EnclosingTabId, getTabInfo, openSubtab } from 'lightning/platformWorkspaceApi'; export default class OpenSubtabExample extends LightningElement { @wire(EnclosingTabId) tabId; async handleClick() { if (!this.tabId) { return; } const tabInfo = await getTabInfo(this.tabId); const primaryTabId = tabInfo.isSubtab ? tabInfo.parentTabId : tabInfo.tabId; // Open a record as a subtab of the current tab await openSubtab(primaryTabId, { recordId: 'YOUR_RECORD_ID', focus: true }); } } ``` Where `YOUR_RECORD_ID` is a variable. For another example that uses `openSubtab()`, see the [workspaceAPIOpenSubtab](https://github.com/trailheadapps/lwc-recipes/tree/main/force-app/main/default/lwc/workspaceAPIOpenSubtab) component in the [lwc-recipes repo](https://github.com/trailheadapps/lwc-recipes/tree/main/force-app/main/default/lwc). To make your component available for use in a Lightning console app, specify the `lightning__AppPage` target in the [component’s configuration file](https://developer.salesforce.com/docs/platform/lwc/guide/use-config-for-console-app.html). ## Aura Components Sample Code This component has a button that, when pressed, opens a subtab within a workspace tab. Component code: ```html ``` Controller code: ```javascript ({ openTabWithSubtab : function(component, event, helper) { var workspaceAPI = component.find("workspace"); workspaceAPI.openTab({ url: '/lightning/r/Account/001xx000003DI05AAG/view', focus: true }).then(function(response) { workspaceAPI.openSubtab({ parentTabId: response, url: '/lightning/r/Contact/003xx000004Ts30AAC/view', focus: true }); }) .catch(function(error) { console.log(error); }); } }) ``` **note:** The relative URL used in this example is a placeholder. To try this example yourself, use a relative URL with a record ID from your org. ## Response This method returns a promise that, upon success, resolves to the ID of the new subtab. # openSubtabByPrimaryTabName() Opens a new subtab (within a primary tab) that displays the content of a specified URL, which can be relative or absolute. You can also override an existing subtab. Use to open a new subtab on a primary tab via the primary tab's name. This method is only available in API version 22.0 or later. If there's an error opening the tab, the error code is reported in the JavaScript console. ## Syntax ```javascript sforce.console.openSubtabByPrimaryTabName(primaryTabName:String, url:URL, active:Boolean, tabLabel:String, id:String, (optional)callback:Function, (optional)name:String) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`primaryTabName`|string|Name of the primary tab in which the subtab opened.| |`url`|URL|URL of the opened subtab. If the URL is to a Salesforce object, that object displays as specified in the Salesforce console app settings. For example, if cases are set to open as a primary tab, and `openSubtab()` is called on a case, the case opens as a primary tab. Users can open an external URL if it’s been added to the console’s allowlist.| |`active`|boolean|If `true`, the opened subtab displays immediately. If `false`, the opened subtab displays in the background and the current tab maintains focus.| |`tabLabel`|string|Optional label of the opened subtab. If a label isn't specified, `External Page` displays. Add labels as text; HTML isn't supported.| |`id`|string|ID of the subtab to override. Use `null` to create a new subtab.| |`callback`|function|JavaScript method called upon completion of the method.| |`name`|string|Optional name of the opened subtab. This argument is only available in API version 22.0 and later.| ## Sample Code–Visualforce ```apex_page Click here to open a new subtab by primary tab name ``` **note:** To see this example in action, click the custom link on a case. For more information, see [Define Custom Buttons and Links](https://help.salesforce.com/s/articleView?id=defining_custom_links.htm) in Salesforce Help. ## Response This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following fields: |Name|Type|Description| |----|----|-----------| |`success`|boolean|`true` if the subtab successfully opened; `false` if the subtab didn't open.| |`id`|string|ID of the subtab. IDs are only valid during a user session; IDs become invalid when the user leaves the Salesforce console.| # openTab() for Lightning Experience Opens a new workspace tab. If the tab is already open, the tab is focused. ## Arguments The method provides the same argument for both Aura Components and Lightning Web Components (LWC). However, `icon`, `iconAlt`, and `label` are supported only for LWC. |Name|Type|Description| |----|----|-----------| |`pageReference`|object|Optional. Generates a unique URL to open. A page reference contains attributes that apply to all pages of that type. See the [Aura pageReference types](https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/components_navigation_page_definitions.htm) and [LWC pageReference types](https://developer.salesforce.com/docs/platform/lwc/guide/reference-page-reference-type.html).| |`recordId`|ID|Optional. Specifies the record to open.| |`url`|URL|Optional. The URL representing the content of the new workspace tab. The URL can be either relative or absolute. To use a third-party domain, add the site as a CSP Trusted Site.| |`focus`|boolean|Optional. Specifies whether the new tab has focus. To display the tab immediately, set `focus` to `true`. To open the tab in the background, set `focus` to `false`.| |`overrideNavRules`|boolean|Optional. Specifies whether the open tab respects existing navigation rules. This argument has no effect on records that have no navigation rules configured and URLs that do not point to a record.| |`icon`|string|Optional. An SLDS icon key in the format `action:canvas` where `action` is the SLDS icon category. See a full list of icon categories and keys on the [SLDS reference site](https://www.lightningdesignsystem.com/icons/). Available for LWC only.| |`iconAlt`|string|Optional. Alternative text for the icon. Available for LWC only.| |`label`|string|Optional. The text label for the icon. Available for LWC only.| **note:** `pageReference`, `recordId`, and `url` are prioritized in that order. Providing an argument with a higher priority means the others are ignored. ## LWC Sample Code This component has a function that opens a specified tab and applies focus on it. ```javascript import { LightningElement, wire } from 'lwc'; import { IsConsoleNavigation, openTab } from 'lightning/platformWorkspaceApi'; export default class OpenTabExample extends LightningElement { @wire(IsConsoleNavigation) isConsoleNavigation; async openTab() { if (!this.isConsoleNavigation) { return; } await openTab({ pageReference: { type: 'standard__objectPage', attributes: { objectApiName: 'Account', actionName: 'home' } }, icon: 'utility:bookmark', focus: true, label: 'Account List' }); } } ``` For another example that uses `openTab()`, see the [workspaceAPIOpenTab](https://github.com/trailheadapps/lwc-recipes/tree/main/force-app/main/default/lwc/workspaceAPIOpenTab) component in the [lwc-recipes repo](https://github.com/trailheadapps/lwc-recipes/tree/main/force-app/main/default/lwc). To make your component available for use in a Lightning console app, specify the `lightning__AppPage` target in the [component’s configuration file](https://developer.salesforce.com/docs/platform/lwc/guide/use-config-for-console-app.html). ## Aura Components Sample Code This component has a button that when pressed, opens a tab. Component code: ```html ``` Pass in a pageReference Controller code ([pageReference](https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/components_navigation_page_definitions.htm)) using the `standard__recordPage` type: ```javascript ({ handleOpenTab: function(component, event, helper) { var workspaceAPI = component.find("workspace"); workspaceAPI.openTab({ pageReference: { "type": "standard__recordPage", "attributes": { "recordId":"500xx000000Ykt2AAC", "actionName":"view" }, "state": {} }, focus: true }).then(function(response) { workspaceAPI.getTabInfo({ tabId: response }).then(function(tabInfo) { console.log("The recordId for this tab is: " + tabInfo.recordId); }); }).catch(function(error) { console.log(error); }); } )} ``` Controller code (recordId): ```javascript ({ handleOpenTab : function(component, event, helper) { var workspaceAPI = component.find("workspace"); workspaceAPI.openTab({ recordId: '001xx000003DIkeAAG', focus: true }).then(function(response) { workspaceAPI.getTabInfo({ tabId: response }).then(function(tabInfo) { console.log("The url for this tab is: " + tabInfo.url); }); }) .catch(function(error) { console.log(error); }); } }) ``` Controller code (url): ```javascript ({ handleOpenTab : function(component, event, helper) { var workspaceAPI = component.find("workspace"); workspaceAPI.openTab({ url: '/lightning/r/Account/001xx000003DI05AAG/view', focus: true }).then(function(response) { workspaceAPI.getTabInfo({ tabId: response }).then(function(tabInfo) { console.log("The recordId for this tab is: " + tabInfo.recordId); }); }).catch(function(error) { console.log(error); }); } }) ``` **note:** The relative URL used in this example is a placeholder. To try this example yourself, use a relative URL with a record ID from your org. ## Response This method returns a promise that, upon success, resolves to the `tabId` of the new tab. # openUtility() for Lightning Experience Opens a utility. If the utility is already open, this method has no effect. Only one utility can be open at a time. If another utility is already open, `openUtility()` minimizes the utility. This method isn’t supported for Lightning Web Components (LWC). For LWC usage, see [open()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-lwc-open.md). ## Arguments |Name|Type|Description| |----|----|-----------| |`utilityId`|string|The ID of the utility to open. Optional when called within a utility.| ## Aura Components Sample Code This component, when added to a single-column Lightning page used in a utility bar, opens the utility when the button is pressed. Component code: ```html ``` Controller code: ```javascript ({ handleOpenUtility : function(component, event, helper) { var utilityAPI = component.find("utilitybar"); utilityAPI.openUtility(); } }) ``` This example opens a utility from outside of the utility, using the `utilityId` field. Component code: ```html ``` Controller code: ```javascript ({ openFirstUtility : function(component, event, helper) { var utilityAPI = component.find("utilitybar"); utilityAPI.getAllUtilityInfo().then(function(response) { var myUtilityInfo = response[0]; utilityAPI.openUtility({ utilityId: myUtilityInfo.id }); }) .catch(function(error) { console.log(error); }); } }) ``` ## Response This method returns a promise that, upon success, resolves to `true`. # Operating System Details Represents the Operating System Details attribute set in the Configuration Management Database (CMDB). This attribute set groups related attributes for configuration items. ## Configuration Item Attribute Set Definition ||| |-|-| |Display Name|Operating System Details| |Developer Name|`SD_OpSyDe`| |Master Label|Operating_System_Details| ## Attributes ### Operating System - **Type**: text - **Developer Name**: `SD_OpSy` - **Description**: Describes the Operating System for configuration items. - **Required**: Optional ### OS Architecture - **Type**: text - **Developer Name**: `SD_OsAr` - **Description**: Describes the OS Architecture for configuration items. - **Required**: Optional ### OS Build Number - **Type**: text - **Developer Name**: `SD_OsBuNu` - **Description**: Describes the OS Build Number for configuration items. - **Required**: Optional ### OS Caption - **Type**: text - **Developer Name**: `SD_OsCa` - **Description**: Describes the OS Caption for configuration items. - **Required**: Optional ### OS Class - **Type**: text - **Developer Name**: `SD_OsCl` - **Description**: Describes the OS Class for configuration items. - **Required**: Optional ### OS Current Time Zone - **Type**: text - **Developer Name**: `SD_OsCuTiZ` - **Description**: Describes the OS Current Time Zone for configuration items. - **Required**: Optional ### OS Description - **Type**: text - **Developer Name**: `SD_OsDe` - **Description**: Describes the OS Description for configuration items. - **Required**: Optional ### OS Domain - **Type**: text - **Developer Name**: `SD_OsDo` - **Description**: Describes the OS Domain for configuration items. - **Required**: Optional ### OS Edition - **Type**: text - **Developer Name**: `SD_OsEd` - **Description**: Describes the OS Edition for configuration items. - **Required**: Optional ### OS Install Date - **Type**: text - **Developer Name**: `SD_OsInDa` - **Description**: Describes the OS Install Date for configuration items. - **Required**: Optional ### OS Kernel - **Type**: text - **Developer Name**: `SD_OsKe` - **Description**: Describes the OS Kernel for configuration items. - **Required**: Optional ### OS Local Date Time - **Type**: text - **Developer Name**: `SD_OsLoDaT` - **Description**: Describes the OS Local Date Time for configuration items. - **Required**: Optional ### OS Major Version - **Type**: text - **Developer Name**: `SD_OsMaVe` - **Description**: Describes the OS Major Version for configuration items. - **Required**: Optional ### OS Minor Version - **Type**: text - **Developer Name**: `SD_OsMiVe` - **Description**: Describes the OS Minor Version for configuration items. - **Required**: Optional ### OS Number Of Licensed Users - **Type**: text - **Developer Name**: `SD_OsNuOfL` - **Description**: Describes the OS Number Of Licensed Users for configuration items. - **Required**: Optional ### OS Patch Count - **Type**: text - **Developer Name**: `SD_OsPaCo` - **Description**: Describes the OS Patch Count for configuration items. - **Required**: Optional ### OS Platform ID - **Type**: text - **Developer Name**: `SD_OsPlId` - **Description**: Describes the OS Platform ID for configuration items. - **Required**: Optional ### OS Product Key - **Type**: text - **Developer Name**: `SD_OsPrKe` - **Description**: Describes the OS Product Key for configuration items. - **Required**: Optional ### OS Serial Number - **Type**: text - **Developer Name**: `SD_OsSeNu` - **Description**: Describes the OS Serial Number for configuration items. - **Required**: Optional ### OS Service Pack Major Version - **Type**: text - **Developer Name**: `SD_OsSePaM` - **Description**: Describes the OS Service Pack Major Version for configuration items. - **Required**: Optional ### OS Service Pack Minor Version - **Type**: text - **Developer Name**: `SD_OsSePa1` - **Description**: Describes the OS Service Pack Minor Version for configuration items. - **Required**: Optional ### OS Signature - **Type**: text - **Developer Name**: `SD_OsSi` - **Description**: Describes the OS Signature for configuration items. - **Required**: Optional ### OS System Directory - **Type**: text - **Developer Name**: `SD_OsSyDi` - **Description**: Describes the OS System Directory for configuration items. - **Required**: Optional ### OS Type - **Type**: text - **Developer Name**: `SD_OsTy` - **Description**: Describes the OS Type for configuration items. - **Required**: Optional ### OS Vendor - **Type**: text - **Developer Name**: `SD_OsVe` - **Description**: Describes the OS Vendor for configuration items. - **Required**: Optional ### Package Count - **Type**: text - **Developer Name**: `SD_PaCo` - **Description**: Describes the Package Count for configuration items. - **Required**: Optional ### Win Server OS UserName - **Type**: text - **Developer Name**: `SD_WiSeOsU` - **Description**: Describes the Win Server OS UserName for configuration items. - **Required**: Optional # OperatingHours Represents the hours in which a service territory, service resource, or account is available for work in Salesforce Scheduler. This object is available in API version 38.0 and later. ## Supported Calls `create()`, `delete()`, `describeLayout()`, `describeSObjects()`, `getDeleted()`, `getUpdated()`, `query()`, `retrieve()`, search(), undelete(), `update()`, `upsert()` ## Special Access Rules Salesforce Scheduler must be enabled. ## Usage By default, only System Administrators can view, create, and assign operating hours. Service territory members—which are service resources who can work in the territory—automatically use their service territory’s operating hours. If a resource needs different operating hours than their territory, create separate operating hours for them from the Operating Hours tab. Then, select the desired hours in the `Operating Hours` lookup field on the service territory member detail page. To view a service resource’s operating hours for a particular territory, navigate to their Service Territories related list and click the Member Number for the territory. This takes you to the service territory member detail page, which lists the member’s operating hours and dates during which they belong to the territory. ## Fields ### Description - **Type**: textarea - **Properties**: Create, Nillable, Update - **Description**: The description of the operating hours. Add any details that aren’t included in the name. ### LastReferencedDate - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: The date when the operating hours record was last modified. Its label in the user interface is `Last Modified Date`. ### LastViewedDate - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: The date when the operating hours record was last viewed. ### Name - **Type**: string - **Properties**: Create, Filter, Group, idLookup, Sort, Update - **Description**: The name of the operating hours. For example, `Summer Hours`, `Winter Hours`, or `Peak Season Hours`. ### TimeZone - **Type**: picklist - **Properties**: Create, Filter, Group, Restricted picklist, Sort, Update - **Description**: The time zone that the operating hours fall within. ## Associated Objects This object has the following associated objects. Unless noted, they’re available in the same API version as this object. [OperatingHoursFeed](https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_associated_objects_feed.htm): Feed tracking is available for the object. # Operation Types Learn more about the various Agentforce IT Service Configuration Management Database (CMDB) GraphQL API operations. - **[Delete Configuration Item](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/operations-v2/mutation-deleteci-v2.md)** Delete a configuration item from the Configuration Management Database using its unique identifier. - **[Delete Configuration Item Relationship](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/operations-v2/mutation-deletecirelationship-v2.md)** Submit an operation to delete relationships between configuration items (CIs). This is a synchronous request. - **[Get Configuration Item](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/operations-v2/query-cibyid-v2.md)** Query a configuration item by its unique identifier. This operation returns detailed information for a single configuration item. - **[Get Configuration Item History](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/operations-v2/query-getcihistory-v2.md)** Perform a paginated retrieval of the audit trail for a specific configuration item. Returns a list of changes, including field-level modifications, timestamps, and user information. - **[Get Configuration Item Relationship](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/operations-v2/query-getcirelationship-v2.md)** Retrieves detailed information about all configuration item (CI) relationships by using the unique identifier of a CI record. - **[Get Configuration Item Tags](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/operations-v2/query-getalltags-v2.md)** Retrieve Returns a paginated list of configuration item (CI) tags. Tags are of type `KEY_VALUE` (key and value) or` KEY_ONLY` (key only). - **[Get Components for Configuration Item](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/operations-v2/query-getcomponentsbyciid-v2.md)** Retrieve child components of a specific type for a configuration item by its unique identifier. - **[Get Operation Status](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/operations-v2/query-getstatus-v2.md)** Retrieve the status of a previously submitted asynchronous job. For example, `upsertCI` a bulk upsert operation. Use this query to check the progress and completion status of the asynchronous operations. - **[Search Configuration Items](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/operations-v2/query-searchci-v2.md)** Perform a paginated search across configuration items with filtering and sorting options. Returns a list of configuration items that match the search criteria. - **[Search Component Configuration Items](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/operations-v2/query-searchcomponentci-v2.md)** Perform a paginated search across component configuration items with filtering and sorting options. Returns a list of component configuration items that match the search criteria. - **[Update Configuration Item](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/operations-v2/mutation-updatecibyid-v2.md)** Update one or more attributes of an existing configuration item specified by its unique identifier. Update a subset of attributes or all attributes in a single request. - **[Upsert Configuration Items](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/operations-v2/mutation-upsertci-v2.md)** Submit a bulk operation to create or update one or more configuration items (CIs). - **[Upsert Configuration Item Relationship](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/operations-v2/mutation-upsertcirelationship-v2.md)** Submit a bulk operation to create or update one or more relationships between configuration items. # Operation Types Learn more about the various Agentforce IT Service Configuration Management Database (CMDB) GraphQL API operations. - **[Delete Configuration Item](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/operations/mutation-deleteci.md)** Delete a configuration item from the Configuration Management Database using its unique identifier. - **[Get Configuration Item Relationship](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/operations/query-getcirelationship.md)** Retrieves detailed information about all configuration item (CI) relationships by using the unique identifier of a CI record. - **[Delete Configuration Item Relationship](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/operations/mutation-deletecirelationship.md)** Submit an operation to delete relationships between configuration items (CIs). This is a synchronous request. - **[Get Components for Configuration Item](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/operations/query-getcomponentsbyciid.md)** Retrieve child components of a specific type for a configuration item by its unique identifier. - **[Get Configuration Item History](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/operations/query-getcihistory.md)** Perform a paginated retrieval of the audit trail for a specific configuration item. Returns a list of changes, including field-level modifications, timestamps, and user information. - **[Get Status of Operation](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/operations/query-getstatus.md)** Retrieve the status of a previously submitted asynchronous job. For example, `upsertCI` a bulk upsert operation. Use this query to check the progress and completion status of the asynchronous operations. - **[Get Configuration Item Tags](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/operations/query-getalltags.md)** Retrieve Returns a paginated list of configuration item (CI) tags. Tags can be of type `KEY_VALUE` (key and value) or`KEY_ONLY` (key only). - **[Query Configuration Item](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/operations/query-cibyid.md)** Query a configuration item by its unique identifier. This operation returns detailed information for a single configuration item. - **[Search Configuration Items](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/operations/query-searchci.md)** Perform a paginated search across configuration items with filtering and sorting options. Returns a list of configuration items that match the search criteria. - **[Search Components for Configuration Item](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/operations/query-searchcomponentci.md)** Perform a paginated search across configuration item components with filtering and sorting options. Returns a list of configuration items that match the search criteria. - **[Update Configuration Item](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/operations/mutation-updatecibyid.md)** Updates one or more attributes of an existing configuration item specified by its unique identifier. You can update a subset of attributes or all attributes in a single request. - **[Upsert Configuration Items](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/operations/mutation-upsertci.md)** Submit a bulk operation to create or update one or more configuration items (CIs). This is an asynchronous operation that returns a job ID, which you can use with the [`getStatus`](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/operations/query-getstatus.md) query to check the operation progress. - **[Upsert Configuration Item Relationship](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/operations/mutation-upsertcirelationship.md)** Submit a bulk operation to create or update one or more relationships between configuration items. This is an asynchronous operation that returns a job ID, which you can use with the [`getStatus`](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/operations/query-getstatus.md) query to check the operation progress. # Optional Call Center Elements and Attributes The call center definition file can include optional `` elements in the `
` element. In addition to the required elements, you can add optional elements to configure a softphone. **important:** The way you implement Open CTI depends on your org’s user interface. There are separate Open CTI APIs for Salesforce Classic and Lightning Experience. The `reqSalesforceCompatibilityMode` item in your call center definition file identifies the user interface you plan to use—Salesforce Classic, Lightning Experience, or both. If no value is specified, the default is `Classic`. This item is optional, but to make calls in Lightning Experience you must specify `Lightning` or `Classic_and_Lightning`. |\ Name|Description|Supported in Salesforce Classic|Supported in Lightning Experience| |--------------|-------------|---------------------------------|-----------------------------------| |`reqSalesforceCompatibilityMode`|Determines where the softphone is visible. If no value is specified, the default is `Classic`.
  • To display the softphone in Lightning Experience, specify `Lightning`.
  • To display the softphone in Salesforce Classic, specify `Classic`.
  • To display the softphone in both user interfaces, specify `Classic_and_Lightning`.
|![Checkmark icon](https://developer.salesforce.com/docs/media/checkmark_16x16.png)|![Checkmark icon](https://developer.salesforce.com/docs/media/checkmark_16x16.png)| |`reqStandbyUrl`|Represents the location that hosts the secondary softphone. The standby softphone is used after the timeout period for the primary softphone has elapsed and the [notifyInitializationComplete() for Salesforce Classic](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-notifyinitializationcomplete.md) method hasn’t been called within the required timeout period. When you specify a standby URL, you must also specify the `reqTimeout` field.|![Checkmark icon](https://developer.salesforce.com/docs/media/checkmark_16x16.png)|![Checkmark icon](https://developer.salesforce.com/docs/media/checkmark_16x16.png)| |`reqTimeout`|Represents the time in milliseconds after which the standby URL is used to host the softphone. Before the timeout period has elapsed, the softphone displays a loading icon indicating that the softphone is initializing. When you specify a required timeout, you must also specify the `reqStandbyUrl` field.|![Checkmark icon](https://developer.salesforce.com/docs/media/checkmark_16x16.png)|![Checkmark icon](https://developer.salesforce.com/docs/media/checkmark_16x16.png)| # Oracle Cluster Represents an Oracle Cluster configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Database Systems. ## Configuration Item Type Definition ||| |-|-| |Name|Oracle Cluster| |Developer Name|`SD_OrCl`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Database Systems](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-database-systems.md)| |Rule Name|Default rule for all Storage Servers| |Identifier(s)|MAC address Hostname| ## Attributes No associated attributes for this configuration item type. # Other Resources In addition to this guide, there are other resources available for you as you learn how to use the console APIs. - **[Console API Typographical Conventions](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-typo-conventions.md)** Typographical conventions are used in our code examples. Learn what Courier font, italics, and brackets mean. **See Also** - [*Salesforce Help*: Salesforce Console](https://help.salesforce.com/apex/HTViewHelpDoc?id=console2_about.htm) - [*Salesforce Help*: Glossary](https://help.salesforce.com/apex/HTViewHelpDoc?id=glossary.htm) - [Salesforce Developers: Getting Started with Salesforce Platform](https://developer.salesforce.com/gettingstarted) - [Salesforce University: Training](https://trailhead.salesforce.com/) - [Firebug Extension for Firefox](https://addons.mozilla.org/en-US/firefox/addon/firebug/) - [Salesforce Extensions for Visual Studio Code](https://developer.salesforce.com/page/Tools) # Other Resources In addition to this guide, there are other resources available for you as you learn how to use Open CTI. - **[Typographical Conventions](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-typo-conventions.md)** Typographical conventions are used in our code examples. Learn what Courier font, italics, and brackets mean. # Other Resources for Lightning Flow for Service Learn about other resources, like developer guides and Trailhead, to help you get started with Lightning Flow for Service. - Process Automation - : [Trailhead: Lightning Flow for Service](https://trailhead.salesforce.com/en/content/learn/modules/service_lightning_flow_for_service) [Trailhead: Automate Your Business Processes with Salesforce Flow](https://trailhead.salesforce.com/trails/automate_business_processes) [Trailhead: Einstein Next Best Action](https://trailhead.salesforce.com/en/content/learn/modules/einstein-next-best-action) [Salesforce Help: Automate Your Business Processes](https://help.salesforce.com/articleView?id=extend_click_process.htm) [Salesforce Help: Einstein Next Best Action](https://help.salesforce.com/articleView?id=einstein_next_best_action.htm) [Cheatsheet: *Process Automation Cheatsheet*](https://resources.docs.salesforce.com/rel1/doc/en-us/static/pdf/SF_Process_Automation_cheatsheet_web.pdf) - App - : [Salesforce Help: Salesforce Console in Lightning Experience](https://help.salesforce.com/articleView?id=console_lex_intro.htm) [Salesforce Help: Create and Configure Lightning Experience Record Pages](https://help.salesforce.com/articleView?id=lightning_app_builder_customize_lex_pages.htm) - Integrations - : [Salesforce Help: Salesforce Call Center](https://help.salesforce.com/articleView?id=cti_overview.htm) [Salesforce Help: Chat](https://help.salesforce.com/articleView?id=live_agent_intro.htm) # Overview This guide describes the Messaging object model and details on how to access Messaging data. The Messaging object model includes a mix of on-platform and off-platform objects. Most Messaging objects are stored on platform, meaning they're part of the standard Salesforce platform, just like other objects you work with in your Salesforce org. Some Messaging objects are stored off-platform, meaning they live in a separate, purpose-built database designed to support the scale and performance demands of real-time messaging. How Messaging objects are accessed depends on whether the object is on platform or off platform. Messaging objects that are on platform are accessible using either REST or SOAP. Refer to the [SOAP API Developer Guide](https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_quickstart_intro.htm) and the [REST API Developer Guide](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/intro_rest.htm) for more information. Messaging objects that are off platform are accessible through Data Cloud, Connect REST API, or bulk export. Refer to the [Access Conversation Data](https://developer.salesforce.com/docs/service/messaging-object-model/guide/messaging-object-model-access-data.md) topic for more information. # Owned By Represents the Owned By relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. ## Relationship Type Definition ||| |-|-| |Developer Name|`SD_OwBy`| |Description|Defines the Owned By relationship between configuration items in the CMDB.| |Master Label|Owned By| |Direct Relationship|Owned By| |Inverse Relationship|Owns| |Line Stroke|Solid| |Color Code|`#D1E32E`| # Owns Represents the Owns relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. ## Relationship Type Definition ||| |-|-| |Developer Name|`SD_Ownxx`| |Description|Defines the Owns relationship between configuration items in the CMDB.| |Master Label|Owns| |Direct Relationship|Owns| |Inverse Relationship|Owned By| |Line Stroke|Solid| |Color Code|`#FFB280`| # Package and License a Workplace Command Center Component To extend Workplace Command Center functionality, you package a solution that’s installed where Work.com and the Workplace Command Center package are installed. When deciding how to package your Workplace Command Center solution, consider the features that impact Work.com package and license dependencies. - **[Package Your Work.com Solution](https://developer.salesforce.com/docs/service/workdotcom-dev/guide/wdc-cc-packaging.md)** Choose the most appropriate type of package based on your solution design and resulting dependencies. - **[Work.com Command Center Licensing](https://developer.salesforce.com/docs/service/workdotcom-dev/guide/wdc-cc-licensing.md)** Design your solution with Salesforce platform and Work.com end-user license requirements in mind. # Package Details Represents the Package Details attribute set in the Configuration Management Database (CMDB). This attribute set groups related attributes for configuration items. ## Configuration Item Attribute Set Definition ||| |-|-| |Display Name|Package Details| |Developer Name|`SD_PaDe`| |Master Label|Package_Details| ## Attributes ### Package Version - **Type**: text - **Developer Name**: `SD_PaVe` - **Description**: Describes the Package Version for configuration items. - **Required**: Optional # Package Your Work.com Solution Choose the most appropriate type of package based on your solution design and resulting dependencies. Work.com: - Requires an Enterprise Edition org or higher. - Has a standalone data model with objects, such as Location and Employee, that are gated behind the provisionable Workplace Command Center Permission Set License (PSL). The Location object is available in orgs that have the Work.com PSL. To access the Employee object, the PSL must be assigned to a user. - Includes the Command Center managed package which has a dependency on the Work.com data model. - Uses Lightning Message Service (LMS). The Work.com LMS channel is available to all users. The channel isn’t gated behind the Work.com PSL. The following options illustrate how your packaging strategy can introduce or avoid Work.com hard dependencies for your end users. ## Base Package with Work.com Hard Dependencies Directly accessing the Work.com data model introduces Work.com hard dependencies. The same is true if you use declarative features, such as flows, reports, and triggers in your base package. To avoid these dependencies, choose another packaging strategy, such as an extension package. ## Base Package with No Work.com Hard Dependencies If you use only [dynamic Apex](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_dynamic.htm) and custom Lightning Components to access the Work.com data model, there are no Work.com hard dependencies in your base package. Use dynamic Apex with [InvocableMethod annotation](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_annotation_InvocableMethod.htm), Salesforce Object Query Language (SOQL), Salesforce Object Search Language (SOSL), and Lightning Components in a new or existing package. Lightning Components can use the object query and search classes to dynamically access the data model. Your package can also listen for messages on the Work.com LMS channel without introducing Work.com hard dependencies. However, using declarative features, such as flows, reports, and triggers, without using Apex InvocableMethod annotation, introduces Work.com hard dependencies. To avoid these dependencies in your base package, create an extension package that uses the declarative features. ## Extension Package with Work.com Hard Dependencies Use an extension package to avoid Work.com hard dependencies in your base package. The extension package can directly access the Work.com data model, and use declarative features such as Lightning App Builder components and flows. Your base or extension package can also listen for messages on the Work.com LMS channel without introducing Work.com hard dependencies. Another reason to use an extension package is to preserve existing licensing requirements for your base package users. If you introduce Work.com dependencies in your base package, you also introduce a Workplace Command Center add-on license requirement for your base package users. Instead, abstract the dependencies to your extension package. A Workplace Command Center add-on license is required only for users who install your extension package. # Packet Broker Represents a Packet Broker configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. ## Configuration Item Type Definition ||| |-|-| |Name|Packet Broker| |Developer Name|`SD_PaBr`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Network Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-network-device.md)| |Rule Name|Default rule for all Media Gateways| |Identifier(s)|MAC address| ## Attributes No associated attributes for this configuration item type. # Parent-Child CI Type Represents the Parent-Child CI Type relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. ## Relationship Type Definition ||| |-|-| |Developer Name|`SD_PaCh`| |Description|Defines the Parent-Child CI Type relationship between configuration items in the CMDB.| |Master Label|Parent-Child CI Type| |Direct Relationship|Parent-Child CI Type| |Inverse Relationship|Child-Parent CI Type| |Line Stroke|Not specified| |Color Code|`Not specified`| # Part Of Represents the Part Of relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. ## Relationship Type Definition ||| |-|-| |Developer Name|`SD_PaOf`| |Description|Defines the Part Of relationship between configuration items in the CMDB.| |Master Label|Part Of| |Direct Relationship|Part Of| |Inverse Relationship|Consists| |Line Stroke|Solid| |Color Code|`#CC397B`| # Pass Your View Builder to the UI Interface Pass the `MyEntryViewBuilder` structure from the [Define How To Render Each Element](https://developer.salesforce.com/docs/service/messaging-in-app/guide/ios-define-render-element.md) example to the UI interface. ``` struct MIAWView: View { let myEntryViewBuilder = MyEntryViewBuilder() var body: some View { let config = ... // Create your UIConfiguration Interface(config, chatFeedViewBuilder: myEntryViewBuilder) } } ``` ``` let config = ... // Create your UIConfiguration let myEntryViewBuilder = TestEntryViewBuilder() let interface = InterfaceViewController(config, chatFeedViewBuilder: myEntryViewBuilder) ``` # Pause Messaging Sessions With status-based capacity enabled in Omni-Channel, reps can pause and unpause Messaging sessions. Rep capacity reflects active, unpaused Messaging sessions only. To support this feature for Bring Your Own Channel for CCaaS, follow these steps. 1. Implement the [onAgentWorkEvent(agentWork)](/docs/service/service-connector-api/references/connector-api/service-connector-interface-onagentwork.html) method in your connector to listen for PAUSED and UNPAUSED events from `agentWork.workEvent`. - `Constants.WORK_EVENT.PAUSED`: Omni-Channel sends a PAUSED event if a rep selects **Customer Inactive** in the Conversation component or if a conversation is automatically marked inactive after a period of inactivity. - `Constants.WORK_EVENT.UNPAUSED`: Omni-Channel sends an UNPAUSED event if a Messaging end user sends a message after the conversation has been marked inactive. 2. When agentWork is paused, release a rep’s capacity and set the work item status appropriately. 3. When agentWork is unpaused, include the work in a rep’s capacity and update the work item status as needed. See the [vendor-sdk.js](https://github.com/salesforce-misc/byo-demo-connector/blob/main/src/main/vendor-sdk.js) file in GitHub for a sample implementation in the Bring Your Own Channel for CCaaS demo connector. **See Also** - _Salesforce Help_: [Ending or Inactivating Messaging Sessions Automatically](https://help.salesforce.com/s/articleView?id=service.messaging_auto_end.htm) - _Salesforce Help_: [Set Up a Status-Based Capacity Model](https://help.salesforce.com/s/articleView?id=service.omnichannel_status_based_capacity.htm) # Perform Survey Sentiment Analysis Create or update the AI Sentiment Result records. You can get insights into the sentiments underlying survey responses and save the sentiment analysis in the SentimentAnalysisResult object. This action is available in API version 55.0 and later. ## Special Access Rules To access the Perform Survey Sentiment Analysis action, you must have the Feedback Management - Starter and Feedback Management - Growth licenses. ## Supported REST HTTP Methods **URI:** `/services/data/vXX.X/actions/standard/performSurveySentimentAnalysis` Where `XX.X` is the latest API version. **Formats:** JSON **HTTP Methods:** POST **Authentication:** `Authorization: Bearer TOKEN` Where `TOKEN` is a variable. ## Inputs |Input|Type|Description| |-----|----|-----------| |`surveyId`|ID|Required. The ID of the survey containing the questions for whose responses you want to get sentiment insights.| |`surveyQuestionIds`|ID|Required. The IDs of the questions for whose responses you want to get sentiment insights.| |`startDate`|Datetime|Required. The date from when participant responses are processed to get sentiment insights.| |`endDate`|Datetime|Required. The date until when participant responses are processed to get sentiment insights.| |`typeOfOperation`|String|Required. The type of operation to be performed on the survey responses. Use `create` to bulk process survey responses and create AI Sentiment Result records with Submitted status. Use `update` to bulk process survey responses that have associated AI Sentiment Result records in Draft status and update them to Submitted status. You can only update a sentiment analysis result record with the Draft status.| ## Outputs None. ## Example **Sample Request** Here's an example POST request to create or update the AI Sentiment Result records: ```nolang { "inputs":[{ "surveyId":"0Kdx00000000GYeCAM", "surveyQuestionIds":["0Kux00000000xDgCAI","0Kux00000000xDiCAI"], "startDate":"1-07-2022", "endDate":"12-07-2022", "typeOfOperation":"create" }] } ``` # Physically Connected To Represents the Physically Connected To relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. ## Relationship Type Definition ||| |-|-| |Developer Name|`SD_PhCoTo`| |Description|Defines the Physically Connected To relationship between configuration items in the CMDB.| |Master Label|Physically Connected To| |Direct Relationship|Physically Connected To| |Inverse Relationship|Physically Connected By| |Line Stroke|Solid| |Color Code|`#00BFFF`| # Plan Your Migration Before you move your Open CTI integration to Salesforce Voice with Partner Telephony, use the migration checklist and key resources to guide you through the process. ## Open CTI Migration Checklist To plan your migration, work through these assessment, implementation, and validation phases. **Phase 0: Assess and Plan** - Audit all `opencti.*` calls in your existing Open CTI adapter. - Map each call to a Salesforce Voice with Partner Telephony equivalent. See [Compare Open CTI Capabilities with Salesforce Voice with Partner Telephony Replacements](https://developer.salesforce.com/docs/service/api-cti/guide/compare-opencti-voice.md#compare-open-cti-capabilities-with-salesforce-voice-replacements). - Inventory custom fields on CTI-created Tasks. Map the fields to VoiceCall or other target objects. - Identify all external system calls from your adapter. **Phase 1: Set Up Scratch Org** - Deploy `scv-partner-telephony-quickstart` to a scratch org. - Configure Omni-Channel queues, service channels, and routing configurations. - Assign permission sets to reps and supervisors. **Phase 2: Implement Your Connector** - Clone `byo-demo-connector` as base. - Verify that mock calls work via `CCaaS.html` simulator. - Implement `getVoiceCapabilities()` and `getSharedCapabilities()`. - Replace `acceptCall`, `endCall`, `dial` (Promise return pattern). - Replace `hold`, `resume`, `mute`, `unmute`. - Implement `setAgentStatus()` with `enqueueNextState` handling. - Implement `wrapUpCall()`. - Verify `voiceCallId` populated on every `CALL_STARTED`. - Implement supervisor methods if applicable. **Phase 3: Set Up Flows** - Build an Omni-Channel routing flow with screen pop. - Build a VoiceCall record-triggered flow for the customer's chosen target object (Case, Opportunity, Lead, Task, or custom). - Test against demo connector mock calls. **Phase 4: Validate Your Implementation** - Command Center for Service (formerly Omni Supervisor) shows correct rep and call state. - VoiceCall records are created and linked correctly. - Custom records are created post-call with the right field mapping. - Supervisor listen-in and barge-in work end-to-end. - Multi-tab test passes. ## Key Resources Consult these resources before or during your migration. | Resource | How to Use It | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | [Salesforce Help Learning Map: Connect Voice to Partner Contact Center](https://help.salesforce.com/s/articleView?id=service.voice_about.htm&type=5) | A learning map for the broader Partner Contact Center Voice product line, including Salesforce Voice with Partner Telephony. Use it as an entry point to feature docs cited throughout this guide. | | [Salesforce Help Learning Map: Migrate from Open CTI](https://help.salesforce.com/s/articleView?id=service.cti_migrate_map.htm) | A learning map for Open CTI migration with links to resources for partners, admins, and organizational decision-makers. | | [GitHub: byo-demo-connector](https://github.com/salesforce-misc/byo-demo-connector) | Your starting point as a developer, a fully working Salesforce Voice with Partner Telephony connector for you to clone and adapt. Includes a `CCaaS.html` call simulator for local end-to-end testing. | | [GitHub: scv-connector-base SDK](https://github.com/salesforce/scv-connector-base) | The base SDK that defines connector types, events, and method contracts. | | [GitHub: scv-partner-telephony-quickstart](https://github.com/salesforce/scv-partner-telephony-quickstart) | A sample application that demonstrates the Salesforce Voice with Partner Telephony integration implementation. Includes org setup metadata. | | [GitHub: open-cti-demo-adapter](https://github.com/developerforce/open-cti-demo-adapter) | Reference for understanding what your current Open CTI adapter does. | | [Service Connector API](https://developer.salesforce.com/docs/service/service-connector-api/overview) | Reference guide for Service Connector API, where connector methods, objects, and events from the scv-connector-base SDK are documented. | | [Salesforce Voice with Partner Telephony Developer Guide](https://developer.salesforce.com/docs/atlas.en-us.voice_pt_developer_guide.meta/voice_pt_developer_guide/voice_pt_intro.htm) | Connector-specific reference for Partner Telephony. | | [Salesforce Voice with Telephony Providers Implementation Guide](https://developer.salesforce.com/docs/atlas.en-us.voice_developer_guide.meta/voice_developer_guide/voice_intro.htm) | Telephony API and configuration reference. Most content applies to Salesforce Voice with Amazon Connect and Salesforce Voice with Partner Telephony from Amazon Connect. Certain sections also apply to Salesforce Voice with Partner Telephony, such as the [Telephony Integration API](https://developer.salesforce.com/docs/atlas.en-us.voice_developer_guide.meta/voice_developer_guide/voice_rest_overview.htm), [Toolkit API](https://developer.salesforce.com/docs/atlas.en-us.voice_developer_guide.meta/voice_developer_guide/voice_lc_toolkit_overview.htm), and [Connect API](https://developer.salesforce.com/docs/atlas.en-us.voice_developer_guide.meta/voice_developer_guide/voice_connect_overview.htm). | | [Salesforce Help: Standard Omni-Channel Flow Templates for Open CTI Migration](https://help.salesforce.com/s/articleView?id=service.cti_migrate_flow_templates.htm) | Information about out-of-the-box Omni-Channel flow templates. Customize these flows based on business requirements. | | [Salesforce Help: Requirements for Building Salesforce Voice with Partner Telephony Omni-Channel Flows](https://help.salesforce.com/s/articleView?id=service.cti_migrate_flow_reqs.htm) | Clarifies the skills required to migrate your adapter logic to Omni-Channel flows. | # Platform Events for External Calendars Use the AppointmentSchedulingEvent to notify subscribers when an appointment schedule is added, updated, or deleted. The following is the platform event object available within the Salesforce Scheduler platform. ## Platform Event Objects - [AppointmentSchedulingEvent](https://developer.salesforce.com/docs/atlas.en-us.platform_events.meta/platform_events/sforce_api_objects_appointmentschedulingevent.htm) — Notifies subscribers when an appointment schedule is added, updated, or deleted. - [AsgnRsrcApptSchdEvent](https://developer.salesforce.com/docs/atlas.en-us.platform_events.meta/platform_events/sforce_api_objects_asgnrsrcapptschdevent.htm) — Represents the assigned resources that are part of various platform events. This object is included in a streamed notification received on the channels for the parent platform events. You can’t subscribe to the AsgnRsrcApptSchdEvent channel directly. - [SvcApptSchdEvent](https://developer.salesforce.com/docs/atlas.en-us.platform_events.meta/platform_events/sforce_api_objects_svcapptschdevent.htm) — Represents the service appointment event. This object is included in a streamed notification received on the channels for the parent platform events. You can’t subscribe to the SvcApptSchdEvent channel directly. **See Also** - [Platform Events Developer Guide](https://developer.salesforce.com/docs/atlas.en-us.platform_events.meta/platform_events/platform_events_intro.htm) # Populate Pre-Chat Form Fields for Android When customers start a messaging conversation, you sometimes already know basic information such as their name, email address, and what product they're looking at. You can set up a pre-chat form in the UI with visible fields such as name, email address, and product name. Then use the SDK to populate the pre-chat fields with this information so it appears when the user first opens the pre-chat form. **important:** This feature requires version 1.5.0 or later of the Enhanced In-App Chat SDK. This article applies to the following implementations: | UI SDK | Core SDK | | :----: | :------: | | ✅ | | Before you use the SDK, add the visible fields to the pre-chat form. See [Customize Pre-Chat for Enhanced Chat](https://help.salesforce.com/s/articleView?id=service.miaw_custom_prechat_2.htm) in Salesforce Help. After you add the visible fields to the pre-chat form, you can populate these values by using `uiClient`. 1. To populate known values in the pre-chat fields, implement `preChatFieldValueProvider`. 2. Add your provider to the SDK by using the `uiClient.preChatFieldValueProvider` property. See the [`UIClient`](https://salesforce-async-messaging.github.io/messaging-in-app-android/sdk/ui/com.salesforce.android.smi.ui/-u-i-client/index.html?query=interface%20UIClient) reference documentation. 3. To make the pre-chat fields editable, set `isEditable` to `true`, or to make them non-editable, set it to `false`. **note:** If the pre-populated fields are set as non-editable, make sure that the pre-chat form fields follow the validation rules. If a required field exceeds the character limit or is set to an invalid data type, the `createConversation` flow stops and the form isn't submitted. In such cases, the SDK logs error messages in the developer console. ``` UIClient.kt /** * A provider to populate known values in the pre-chat fields. * It requires a user-defined lambda expression to modify the list of [PreChatField]s, before they're rendered in the pre-chat form. */ var preChatFieldValueProvider: ((List) -> List)? ``` ``` MessagingProvider.kt uiClient.preChatFieldValueProvider = { list -> list.onEach { field -> settings.prePopulatedPreChatParamsMap.entries.find { it.key == field.name }?.let { field.userInput = it.value field.isEditable = settings.prePopulatedPreChatEditable } } list } ``` # Populate Pre-Chat Form Fields for iOS When customers start a messaging conversation, you sometimes already know basic information such as their name, email address, and what product they're looking at. You can set up a pre-chat form in the UI with visible fields such as name, email address, and product name. Then use the SDK to populate the pre-chat fields with this information so it appears when the user first opens the pre-chat form. **important:** This feature requires version 1.5.0 or later of the Enhanced In-App Chat SDK. This article applies to the following implementations: | UI SDK | Core SDK | | :----: | :------: | | ✅ | | Before you use the SDK, add the visible fields to the pre-chat form. See [Customize Pre-Chat for Enhanced Chat](https://help.salesforce.com/s/articleView?id=service.miaw_custom_prechat_2.htm) in Salesforce Help. After you add the visible fields to the pre-chat form, you can populate these values by using the SDK. 1. To populate known values in the pre-chat fields, implement `preChatFieldValueProvider`. 2. Add your provider to the SDK by using `init` in the `Interface.swift` file. 3. To modify the pre-chat fields, create a `setPreChatValues` function. 4. To make the pre-chat fields editable, set `isEditable` to `true`. To make the pre-chat fields non-editable, set `isEditable` to `false`. **note:** If you configure the pre-populated fields to be non-editable, make sure that the pre-chat form fields follow the validation rules. If a required field exceeds the character limit or is set to an invalid data type, the createConversation flow stops and the form isn't submitted. In these cases, the SDK logs error messages in the developer console. ``` Interface.swift /** * A provider to populate known values in the pre-chat fields. * It requires a function to modify the list of [PreChatField]s, before they're rendered in the pre-chat form. */ var preChatFieldValueProvider: (([PreChatField]) async throws -> [PreChatField]) /** * Add the provider using init in Interface.swift */ public init(_ config: UIConfiguration, preChatFieldValueProvider: ((_ preChatFields: [PreChatField]) async throws -> [PreChatField])? = nil) ``` ``` // Create an key value pair object that will be pre-populated let prechatKeyValuePairs = ["_firstName": "Joe", "_subject": "My app is not working"] // Create a function to modify the pre-chat fields private func setPreChatValues() -> (([PreChatField]) async throws -> [PreChatField]) { { prechatFields in prechatFields.enumerated().forEach { (index, value) in let currenPrechatName = value.name for prechatKeyValuePair in prechatKeyValuePairs { if currenPrechatName == prechatKeyValuePair.key { prechatFields[index].value = // Set the value for the pre-chat fields prechatFields[index].isEditable = // Set it to true to make the pre-chat fields editable, or to false to make them non-editable } } } return prechatFields } } ``` # Populate Pre-Chat Form Fields in Enhanced Web Chat When customers start a messaging conversation, you sometimes already know basic information such as their name, email address, and what product they're looking at. You set up a pre-chat form in the UI with visible fields such as name, email address, and product name. Then you use the [`prechatAPI`](/docs/service/messaging-web/references/m4w-reference/prechatAPI.html) object to populate the pre-chat fields with this information, so it appears when the user first opens the pre-chat form. With the API, you can also configure a field to be editable or not by the user and remove populated values again. If you use your messaging conversation windows in Experience Cloud sites, you can enable contact fields to fill in automatically by editing the pre-chat fields in **Embedded Service Deployments** in Setup. See [Customize Pre-Chat for Enhanced Chat](https://help.salesforce.com/s/articleView?id=service.miaw_custom_prechat_2.htm) in _Salesforce Help_. Before you use the API, add the visible fields to the pre-chat form. See [Customize Pre-Chat for Enhanced Chat](https://help.salesforce.com/s/articleView?id=service.miaw_custom_prechat_2.htm) in _Salesforce Help_. Here are the steps to configure your web client to populate pre-chat fields with data. 1. Download the Salesforce-provided code snippet from your Embedded Service Deployments in Setup as described in [Get Started with Enhanced Web Chat](/docs/service/messaging-web/guide/introduction.html). You need the snippet, because you modify its code in later steps. 2. Add an event listener for [`onEmbeddedMessagingReady`](/docs/service/messaging-web/guide/event-listeners.html). This method notifies you when the API is ready for requests. 3. After the `onEmbeddedMessagingReady` event dispatches, populate the pre-chat fields by using [`setVisiblePrechatFields`](https://developer.salesforce.com/docs/service/messaging-web/guide/docs/service/messaging-web/references/m4w-reference/prechatAPI.html#setvisibleprechatfieldsfields) and remove the values by using [`unsetVisiblePrechatFields`](/docs/service/messaging-web/references/m4w-reference/prechatAPI.html#unsetvisibleprechatfieldsfields). - Use the channel variable name of your custom or standard pre-chat fields for the pre-chat field names. From Setup, in the Quick Find box, enter `Messaging Settings`, and then select **Messaging Settings**. Click the name of your messaging channel. The channel variable names are listed in the Parameter Mappings section. - Standard pre-chat fields start with an underscore. They are `_firstName`, `_lastName`, `_email`, and `_subject`. - For more information on editing pre-chat fields, see [Customize Pre-Chat for Enhanced Chat](https://help.salesforce.com/s/articleView?id=service.miaw_custom_prechat_2.htm) in _Salesforce Help_. This sample code shows you how to add values to pre-chat fields by using `setVisiblePrechatFields`. ```javascript window.addEventListener("onEmbeddedMessagingReady", e => { embeddedservice_bootstrap.prechatAPI.setVisiblePrechatFields({ // List the pre-chat field names with the value and whether // it's editable in the pre-chat form. "_firstName": { "value": "Jane", "isEditableByEndUser": false }, "dropdown_prechat": { "value": "A2", "isEditableByEndUser": false }, "checkbox_prechat": { "value": false, "isEditableByEndUser": false } }); }); ``` This sample code shows you how to remove values from pre-chat fields by using `unsetVisiblePrechatFields`. Use the channel variable name as the pre-chat field name here as well. ```javascript embeddedservice_bootstrap.prechatAPI.unsetVisiblePrechatFields( // List one or more field names. ['_firstName','dropdown_prechat']); ``` The Enhanced Web Chat [reference documentation](/docs/service/messaging-web/references/m4w-reference/prechatAPI.html) describes these methods in detail. **note:** If your Enhanced Web Chat deployment is on an Experience Cloud site, follow the instructions in _Salesforce Help_ to add JavaScript code to the head markup section of your site. See [Configure an Enhanced Web Chat Deployment in an Experience Builder Site](https://help.salesforce.com/s/articleView?id=service.miaw_deployment_experience_builder.htm) in _Salesforce Help_. # Port Server Represents a Port Server configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. ## Configuration Item Type Definition ||| |-|-| |Name|Port Server| |Developer Name|`SD_PoSe`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Network Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-network-device.md)| |Rule Name|Default rule for all VoWiFi Handsets| |Identifier(s)|MAC address| ## Attributes ### Post Version - **Type**: text - **Developer Name**: `SD_PoVe` - **Attribute Set**: [Device Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-device-details.md) - **Description**: The post version of the Port Server. - **Required**: Optional ### Software Revision - **Type**: text - **Developer Name**: `SD_SoRe` - **Attribute Set**: [Device Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-device-details.md) - **Description**: The software revision of the Port Server. - **Required**: Optional # Power Distribution Unit Represents a Power Distribution Unit configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. ## Configuration Item Type Definition ||| |-|-| |Name|Power Distribution Unit| |Developer Name|`SD_PoDiUn`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Network Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-network-device.md)| |Rule Name|Default rule for all Network Devices| |Identifier(s)|MAC address| ## Attributes ### Software Revision - **Type**: text - **Developer Name**: `SD_SoRe` - **Attribute Set**: [Device Details](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-attributes-set/cmdb-attribute-set-device-details.md) - **Description**: The software revision of the Power Distribution Unit. - **Required**: Optional # Powers Represents the Powers relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. ## Relationship Type Definition ||| |-|-| |Developer Name|`SD_Powxx`| |Description|Defines the Powers relationship between configuration items in the CMDB.| |Master Label|Powers| |Direct Relationship|Powers| |Inverse Relationship|Powered By| |Line Stroke|Solid| |Color Code|`#FF0000`| # prechatAPI This object contains all the APIs associated with pre-chat. **note:** If your Enhanced Web Chat deployment is on an Experience Cloud site, follow the instructions on how to add JavaScript code to the head markup section of your site. See [Configure an Enhanced Web Chat Deployment in an Experience Builder Site](https://help.salesforce.com/s/articleView?id=service.miaw_deployment_experience_builder.htm). ## `setHiddenPrechatFields({fields})` Sends hidden pre-chat fields to Salesforce. To learn about and set up hidden pre-chat, see [Customize Pre-Chat for Enhanced Chat](https://help.salesforce.com/s/articleView?id=service.miaw_custom_prechat_2.htm) in _Salesforce Help_. This method must be called after the [`onEmbeddedMessagingReady`](/docs/service/messaging-web/guide/event-listeners.html) event is dispatched and before the conversation begins. See [Hidden Pre-Chat](/docs/service/messaging-web/guide/pre-chat.html). ### Parameters `{fields}`: Required. A JSON object containing a list of key-value pairs of the hidden pre-chat field names and their values. ### Example ```javascript embeddedservice_bootstrap.prechatAPI.setHiddenPrechatFields({ Hidden1: "value one", Hidden2: "value two", Hidden3: "value three", Hidden4: "value four", }); ``` ## `removeHiddenPrechatFields({fields})` Removes hidden pre-chat fields from Salesforce. This method must be called after the [`onEmbeddedMessagingReady`](/docs/service/messaging-web/guide/event-listeners.html) event is dispatched and before the conversation begins. See [Hidden Pre-Chat](/docs/service/messaging-web/guide/pre-chat.html). ### Parameters `{fields}`: Required. An array of strings. Each string is a pre-chat field. When this method is called, the hidden pre-chat field is removed from the conversation. ### Example ```javascript embeddedservice_bootstrap.prechatAPI.removeHiddenPrechatFields(["Hidden3"]); ``` ## `setVisiblePrechatFields({fields})` Populates visible pre-chat fields with data in the pre-chat form. The pre-chat field must already be in the pre-chat form. See [Customize Pre-Chat for Enhanced Chat](https://help.salesforce.com/s/articleView?id=service.miaw_custom_prechat_2.htm) in _Salesforce Help_. Call this method after the [`onEmbeddedMessagingReady`](/docs/service/messaging-web/guide/event-listeners.html) event is dispatched and before the conversation begins. See [Populate Pre-Chat Form Fields](/docs/service/messaging-web/guide/populate-prechat-fields.html). ### Parameter `{fields}`: Required. A JSON object containing nested `{field}` objects. The key of each nested object is the channel variable name of a custom or standard pre-chat field. From Setup, in the Quick Find box, enter `Messaging Settings`, and then select **Messaging Settings**. Click the name of your messaging channel. The channel variable names are listed in the Parameter Mappings section. Standard pre-chat fields start with an underscore. They are `_firstName`, `_lastName`, `_email`, and `_subject`. For more information on editing pre-chat fields, see [Customize Pre-Chat for Enhanced Chat](https://help.salesforce.com/s/articleView?id=service.miaw_custom_prechat_2.htm) in _Salesforce Help_. #### `{field}` | Parameter | Type | Description | Required or Optional | | --------------------- | ------- | ------------------------------------------------------------------------------------------------------------- | -------------------- | | `value` | String | Required. The value to populate the field with. | | `isEditableByEndUser` | Boolean | Indicates whether a user can edit this pre-chat field (`true`) or not (`false`). The default value is `true`. | Optional | ### Example Pass each pre-chat field with its value and whether it's editable in the pre-chat form. ```javascript window.addEventListener("onEmbeddedMessagingReady", e => { embeddedservice_bootstrap.prechatAPI.setVisiblePrechatFields({ "_firstName": { "value": "Jane", "isEditableByEndUser": false }, "dropdown_prechat": { "value": "A2", "isEditableByEndUser": false }, "checkbox_prechat": { "value": false, "isEditableByEndUser": false } }); }); ``` ## `unsetVisiblePrechatFields({fields})` Removes the values from visible pre-chat fields that you populated by using `setVisiblePrechatFields`. Call this method after the [`onEmbeddedMessagingReady`](/docs/service/messaging-web/guide/event-listeners.html) event is dispatched and before the conversation begins. See [Populate Pre-Chat Form Fields](/docs/service/messaging-web/guide/populate-prechat-fields.html) in _Salesforce Help_. ### Parameters `{fields}`: Required. An array of strings. Each string is a pre-chat field name. When this method is called, the value of each pre-chat field is removed. Use the channel variable name of your custom or standard pre-chat fields for the pre-chat field names. From Setup, in the Quick Find box, enter `Messaging Settings`, and then select **Messaging Settings**. Click the name of your messaging channel. The channel variable names are listed in the Parameter Mappings section. Standard pre-chat fields start with an underscore. They are `_firstName`, `_lastName`, `_email`, and `_subject`. For more information on editing pre-chat fields, see [Customize Pre-Chat for Enhanced Chat](https://help.salesforce.com/s/articleView?id=service.miaw_custom_prechat_2.htm) in _Salesforce Help_. ### Example ```javascript embeddedservice_bootstrap.prechatAPI.unsetVisiblePrechatFields( ['_firstName','dropdown_prechat']); ``` # Preferred Language of Messaging Users The Enhanced In-App Chat SDK automatically sends the device’s preferred language to the org, which will allow localized [Messaging Components](https://help.salesforce.com/s/articleView?id=service.messaging_components_parent.htm) to be sent back to the SDK. For this to work, the **Identify preferred language of messaging users** option on the Messaging Settings page in Setup must be selected. For more information about translating messaging components, see [Translate Messaging Components into Your Customer’s Language](https://help.salesforce.com/s/articleView?id=service.messaging_components_translate.htm). **important:** This feature requires version 1.9.0 or later of the Messaging for In-App SDK. This article applies to the following implementations: | UI SDK | Core SDK | | :----: | :------: | | ✅ | | The SDK will automatically pass the language locale of the device to the agent on session creation. For clarification on the difference between a session and a conversation see the [Message Glossary](https://help.salesforce.com/s/articleView?id=service.miaw_glossary.htm). The list of [Supported Languages](https://help.salesforce.com/s/articleView?id=xcloud.faq_getstart_what_languages_does.htm) on the org depends on the level of language support configured on the org. The list of supported languages on the Android platform is much larger. If a language and locale pair that are sent to the service is unrecognized, the translated messaging component won’t be shown in the desired language and you won’t be notified of the failure. The SDK provides a public API [remoteLocaleMap](https://help.salesforce.com/s/articleView?id=xcloud.faq_getstart_what_languages_does.htm) on the [CoreConfiguration](https://salesforce-async-messaging.github.io/messaging-in-app-ios/documentation/smiclientcore/configuration) object to allow the language locale to be mapped from the mobile device value to a supported Salesforce language locale. **note:** We highly recommend that you use the remoteLocaleMap API; otherwise, the feature may not work. ```kotlin // Map a device language to a Salesforce language val remoteLocaleMap = mapOf( "en-CA" to "en", "fr-Fr" to "fr", "es-CO" to "es", "default" to "en" ) // Create a UIConfiguration object and set the remoteLocaleMap val uiConfiguration = UIConfiguration( serviceAPI = "", organizationId = "", developerName = "", conversationId = UUID.randomUUID(), remoteLocaleMap = remoteLocaleMap ) ``` # Preferred Language of Messaging Users The Enhanced In-App Chat SDK automatically sends the device’s preferred language to the org, which will allow localized [Messaging Components](https://help.salesforce.com/s/articleView?id=service.messaging_components_parent.htm) to be sent back to the SDK. For this to work, the **Identify preferred language of messaging users** option on the Messaging Settings page in Setup must be selected. For more information about translating messaging components, see [Translate Messaging Components into Your Customer’s Language](https://help.salesforce.com/s/articleView?id=service.messaging_components_translate.htm). **important:** This feature requires version 1.9.0 or later of the Messaging for In-App SDK. This article applies to the following implementations: | UI SDK | Core SDK | | :----: | :------: | | ✅ | | The SDK will automatically pass the language locale of the device to the agent on session creation. For clarification on the difference between a session and a conversation see the [Message Glossary](https://help.salesforce.com/s/articleView?id=service.miaw_glossary.htm). The list of [Supported Languages](https://help.salesforce.com/s/articleView?id=xcloud.faq_getstart_what_languages_does.htm) on the org depends on the level of language support configured on the org. The list of supported languages on the iOS platform is much larger. If a language and locale pair that are sent to the service is unrecognized, the translated messaging component won’t be shown in the desired language and you won’t be notified of the failure. The SDK provides a public API [remoteLocaleMap](https://help.salesforce.com/s/articleView?id=xcloud.faq_getstart_what_languages_does.htm) on the [CoreConfiguration](https://salesforce-async-messaging.github.io/messaging-in-app-ios/documentation/smiclientcore/configuration) object to allow the language locale to be mapped from the mobile device value to a supported Salesforce language locale. **note:** We highly recommend that you use the remoteLocaleMap API; otherwise, the feature may not work. ```swift // Map a device language to a Salesforce language let remoteLocaleMap = remoteLocaleMap = [ "en-CA": "en", "fr-Fr": "fr", "es-CO": "es", "default": "en" ] // Create a UIConfiguration object and set the remoteLocaleMap let configuration = UIConfiguration(serviceAPI: , organizationId: , developerName: , remoteLocaleMap: remoteLocaleMap, conversationId: ) ``` # Prepare Your App for Submission If you’re not using Swift Package Manager to install the SDK, you need to strip development resources (such as unneeded architectures and header resources) from the Service Chat SDK before you can submit your app to the App Store. **important:** 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](https://help.salesforce.com/s/articleView?id=service.miaw_intro_landing.htm&type=5) before that date. Messaging offers many of the [chat features](https://help.salesforce.com/s/articleView?id=service.miaw_chat_vs_messaging.htm&type=5) that you love plus asynchronous conversations that can be picked back up at any time. Learn about chat retirement in [Help](https://help.salesforce.com/s/articleView?id=001790618&type=1). Xcode doesn't automatically strip unneeded architectures from dynamic libraries, nor remove some header and utility resources. Apps that don't do this clean up are rejected from the App Store. For example, you might receive the following error from iTunes Connect: ```java ERROR ITMS-90085: No architectures in the binary. Lipo failed to detect any architectures in the bundle executable. ``` You can resolve this problem by using the script provided in the `ServiceCore` framework that automatically strips unneeded architectures from the dynamic libraries and then re-signs them. **note:** This process is not required if you used Swift Package Manager to install your app. To use this script: 1. Select `Build Phases` for your project target. 2. Create a `Run Script` phase to run the script. Access the `prepare-framework` script from within the `ServiceCore` framework in your project directory. - If you installed the XCFramework files manually, use: ```java $SRCROOT/ServiceCore.xcframework/ios-arm64/ServiceCore.framework/prepare-framework ``` - If you installed the SDK with CocoaPods, use: ```java $PODS_ROOT/ServiceSDK/Frameworks/ServiceCore.framework/prepare-framework ``` - If you installed the standard framework files with version 224.0.2 or earlier, use: ```java $SRCROOT/ServiceCore.framework/prepare-framework ``` **important:** Verify that this script is in the _exact location_ that you specify in this build phase. This build phase must occur **after** the link phase and all embed phases. If you're using CocoaPods, make sure to put this script after the "[CP] Embed Pods Frameworks" phase. # Print Server Represents a Print Server configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. ## Configuration Item Type Definition ||| |-|-| |Name|Print Server| |Developer Name|`SD_PrSe`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Network Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-network-device.md)| |Rule Name|Default rule for all VMWare VCenter Folder| |Identifier(s)|Asset Name UUID| ## Attributes No associated attributes for this configuration item type. # Printer Represents a Printer configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. ## Configuration Item Type Definition ||| |-|-| |Name|Printer| |Developer Name|`SD_Prixx`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Network Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-network-device.md)| |Rule Name|Default rule for all Windows Cluster Nodes| |Identifier(s)|Node Name| ## Attributes No associated attributes for this configuration item type. # Problem Standard fields extend the Problem object for use in Agentforce IT Service to represent the root cause of an issue. This object is available in API version 65.0 and later. ## Supported Calls `create()`, `delete()`, `describeLayout()`, `describeSObjects()`, `getDeleted()`, `getUpdated()`, `query()`, `retrieve()`, `search()`, `undelete()`, `update()`, `upsert()` ## Fields ### AssignedGroupId - **Type**: reference - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The group or queue to which the problem is assigned. This field is a relationship field. - **Relationship Name**: AssignedGroup - **Refers To**: Group ### AssignedUserId - **Type**: reference - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The primary user to whom the problem is assigned. This field is a relationship field. - **Relationship Name**: AssignedUser - **Refers To**: User ### BusinessHoursId - **Type**: reference - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The ID of the business hours related to the entitlement process for a problem. This field is a relationship field. - **Relationship Name**: BusinessHours - **Refers To**: BusinessHours ### Comments - **Type**: textarea - **Properties**: Create, Nillable, Update - **Description**: The comments added to a problem by users across various statuses. ### EntitlementId - **Type**: reference - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The ID of the entitlement related to the problem. This field is a relationship field. - **Relationship Name**: Entitlement - **Refers To**: Entitlement ### IsClosed - **Type**: boolean - **Properties**: Defaulted on create, Filter, Group, Sort - **Description**: Indicates whether a problem is closed (true) or not (false). - **Default value**: `false` ### IsStopped - **Type**: boolean - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: Indicates whether a problem is paused for further processing (true) or not (false). - **Default value**: `false` ### MilestoneStatus - **Type**: string - **Properties**: Group, Nillable, Sort - **Description**: The milestone status related to the entitlement process for a problem. ### PermanentSolution - **Type**: textarea - **Properties**: Create, Nillable, Update - **Description**: The permanent solution to a problem. If the problem can be addressed permanently, use this field. ### ReportedById - **Type**: reference - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The user or account who reports a problem. This field is a relationship field. - **Relationship Name**: ReportedBy - **Refers To**: User ### ResolutionStatusCode - **Type**: picklist - **Properties**: Create, Defaulted on create, Filter, Group, Nillable, Sort, Update - **Description**: Specifies the status code for the problem when it's resolved, such as resolved by the reportee, known error, or workaround provided. - **Default value**: `Duplicate` - **Possible values**: - `Change Request Created` - `Duplicate` - `Known Error` - `No Resolution Provided` - `Other` - `Resolved By Reporter` - `Resolved Post Change` - `Solution Provided` - `User Error` - `Workaround Provided` ### SlaExitDate - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: The date and time when the entitlement process ends for a problem. ### SlaStartDate - **Type**: dateTime - **Properties**: Create, Filter, Nillable, Sort, Update - **Description**: ### StopStartDate - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: The date and time when the entitlement process starts for a problem. ### Workaround - **Type**: textarea - **Properties**: Create, Nillable, Update - **Description**: The workaround to a problem. When there's no permanent solution for a problem, use this field. For other fields on this object, see [*Object Reference for the Salesforce Platform*: Problem](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_problem.htm) # ProblemConfigurationItem Represents the relationship between a problem and a configuration item reference. This object is available in API version 65.0 and later. ## Supported Calls `create()`, `delete()`, `describeLayout()`, `describeSObjects()`, `getDeleted()`, `getUpdated()`, `query()`, `retrieve()`, `search()`, `undelete()`, `update()`, `upsert()` ## Fields ### ConfigurationItemId - **Type**: reference - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The configuration item that represents the external configuration item record that's related to a problem. This field is a relationship field. - **Relationship Name**: ConfigurationItem - **Refers To**: ConfigurationItem ### LastReferencedDate - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: The timestamp when the current user last accessed this record, a record related to this record, or a list view. ### LastViewedDate - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: The timestamp when the current user last viewed this record or list view. ### Name - **Type**: string - **Properties**: Autonumber, Defaulted on create, Filter, idLookup, Sort - **Description**: The name of the record. ### ProblemId - **Type**: reference - **Properties**: Create, Filter, Group, Sort - **Description**: The problem with which a configuration item is related. This field is a relationship field. - **Relationship Name**: Problem - **Relationship Type**: Master-detail - **Refers To**: Problem (the master object) ### RelationshipType - **Type**: picklist - **Properties**: Create, Filter, Group, Restricted picklist, Sort - **Description**: Specifies the type of relationship between a configuration item and the problem. Values are `Affected` or `Impacted`. # Process Data Using Generative AI Action Using Einstein Generative AI, perform Natural Language Processing (NLP) to summarize text, extract key phrases, analyze sentiment, and unlock valuable insights. This action is available in API version 61.0 and later. To access the Process Data Using Generative AI action, you must have the Salesforce Feedback Management Starter or Growth License and the Salesforce org enabled with Surveys along with Generative AI Surveys feature. ## Supported REST HTTP Methods **URI:** `/services/data/vXX.X/actions/standard/processDataUsingGenAi` Where `XX.X` is the latest API version. **Formats:** JSON, XML **HTTP Methods:** POST **Authentication:** `Authorization: Bearer TOKEN` Where `TOKEN` is a variable. ## Inputs |Input|Type|Description| |-----|----|-----------| |`additionalParameterIds`|String|Collection of additional record IDs on which NLP is performed.| |`feature`|String (Picklist)|Required. Purpose of applying NLP to the target record: `SurveyLongSummarization` or `SurveyShortSummarization`.| |`targetRecordId`|String|Required. ID of the record on which NLP is performed.| ## Outputs |Output|Type|Description| |------|----|-----------| |`nlpRecordId`|string|ID of the created NLP record.| ## Example **POST** This example shows a sample request for the Process Data Using Generative AI action. ```nolang { "inputs":[{ "targetRecordId": "0MySM00000007eD0xx", "additionalParameterIds": [ "0KuSM0000000JM10xx","0KuSM0000000JM20xx","0KuSM0000000JM30xx","0KuSM0000000JM40xx" ], "feature": "SurveyLongSummarization" }] } ``` This example shows a sample response for the Process Data Using Generative AI action. ```nolang [ { "nlpRecordId" : "7NPSM0000000K5B4xx" } ] ``` # Process Details Represents the Process Details attribute set in the Configuration Management Database (CMDB). This attribute set groups related attributes for configuration items. ## Configuration Item Attribute Set Definition ||| |-|-| |Display Name|Process Details| |Developer Name|`SD_PrDe`| |Master Label|Process_Details| ## Attributes ### Process Arguments - **Type**: text - **Developer Name**: `SD_PrAr1` - **Description**: Describes the Process Arguments for configuration items. - **Required**: Optional ### Process Component User Name - **Type**: text - **Developer Name**: `SD_PrCoUN` - **Description**: Describes the Process Component User Name for configuration items. - **Required**: Optional ### Process id - **Type**: text - **Developer Name**: `SD_PrId1` - **Description**: Describes the Process id for configuration items. - **Required**: Optional ### Process Name - **Type**: text - **Developer Name**: `SD_PrNa` - **Description**: Describes the Process Name for configuration items. - **Required**: Optional ### Process Simple identity - **Type**: text - **Developer Name**: `SD_PrSiId` - **Description**: Describes the Process Simple identity for configuration items. - **Required**: Optional # Processor Details Represents the Processor Details attribute set in the Configuration Management Database (CMDB). This attribute set groups related attributes for configuration items. ## Configuration Item Attribute Set Definition ||| |-|-| |Display Name|Processor Details| |Developer Name|`SD_PrDe1`| |Master Label|Processor_Details| ## Attributes ### Cores per Processor - **Type**: int - **Developer Name**: `SD_CoPePr` - **Description**: Describes the Cores per Processor for configuration items. - **Required**: Optional ### FPU Type - **Type**: text - **Developer Name**: `SD_FpTy` - **Description**: Describes the FPU Type for configuration items. - **Required**: Optional ### Number of Logical Processors - **Type**: int - **Developer Name**: `SD_NuOfLoP` - **Description**: Describes the Number of Logical Processors for configuration items. - **Required**: Optional ### Number of Processors - **Type**: int - **Developer Name**: `SD_NuOfPr` - **Description**: Describes the Number of Processors for configuration items. - **Required**: Optional ### Processor Architecture - **Type**: text - **Developer Name**: `SD_PrAr` - **Description**: Describes the Processor Architecture for configuration items. - **Required**: Optional ### Processor Device ID - **Type**: text - **Developer Name**: `SD_PrDeId` - **Description**: Describes the Processor Device ID for configuration items. - **Required**: Optional ### Processor ID - **Type**: text - **Developer Name**: `SD_PrId` - **Description**: Describes the Processor ID for configuration items. - **Required**: Optional ### Processor Name - **Type**: text - **Developer Name**: `SD_PrNa1` - **Description**: Describes the Processor Name for configuration items. - **Required**: Optional ### Processor Speed - **Type**: text - **Developer Name**: `SD_PrSp` - **Description**: Describes the Processor Speed for configuration items. - **Required**: Optional ### Processor Type - **Type**: text - **Developer Name**: `SD_PrTy` - **Description**: Describes the Processor Type for configuration items. - **Required**: Optional ### Processor Version - **Type**: text - **Developer Name**: `SD_PrVe` - **Description**: Describes the Processor Version for configuration items. - **Required**: Optional ### Threads per Processor Core - **Type**: int - **Developer Name**: `SD_ThPePrC` - **Description**: Describes the Threads per Processor Core for configuration items. - **Required**: Optional ### VMSS Name - **Type**: text - **Developer Name**: `SD_VmNa1` - **Description**: Describes the VMSS Name for configuration items. - **Required**: Optional # ProductAttributeDefinition Represents the relationship of an attribute to a product and the default configuration for the product to which they are assigned. For example, the Polo T-shirt product is associated with the T-shirt Size attribute. This object is available in API version 56.0 and later. ## Supported Calls `create()`, `delete()`, `describeLayout()`, `describeSObjects()`, `getDeleted()`, `getUpdated()`, `query()`, `retrieve()`, `search()`, `undelete()`, `update()`, `upsert()` ## Special Access Rules Field Service must be enabled. ## Fields ### AttributeDefinitionId - **Type**: reference - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The attribute ID associated with the product attribute definition. This field is a relationship field. - **Relationship Name**: AttributeDefinition - **Relationship Type**: Lookup - **Refers To**: AttributeDefinition ### AttributeNameOverride - **Type**: string - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: Name to display for the attribute when shown for this object. This display name overrides the name on the attribute. For example, the attribute Color is overriden to display as Laptop Color. Maximum size is 255 alphanumeric characters. Can include the following special characters: @ ! - \< \> \* ? + = % \# ( ) / \\ & ‘ £ € $ ”. ### DateTimeValue - **Type**: dateTime - **Properties**: Create, Filter, Nillable, Sort, Update - **Description**: The value for a product attribute that has a DateTime data type. ### DateValue - **Type**: date - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The value for a product attribute that has a Date data type. ### DefaultValue - **Type**: string - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The default value for the attribute for the product. The attribute value can be changed. This default overrides the default value set for a picklist for the attribute. ### Description - **Type**: textarea - **Properties**: Create, Nillable, Update - **Description**: A description of the attribute definition. Maximum size is 32000 alphanumeric characters. Can include the following special characters: @ ! - \< \> \* ? + = % \# ( ) / \\ & ‘ £ € $ ”. ### FormatMask - **Type**: string - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The format mask governing data entry for the attribute value. For example, a user enters `1234567899` as a value. If the format is `NNN-NN-NNNN` and the value is saved as `1234-56-7899`. ### HelpText - **Type**: textarea - **Properties**: Create, Nillable, Update - **Description**: Help text to display when end users configure the attribute for this product. This text overrides the help text defined for the attribute. Maximum size is 32000 alphanumeric characters. The default is AtrributeDefinition.DefaultHelpText. ### IsBooleanValue - **Type**: boolean - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: The Boolean value for the product attribute that has a Boolean data type. - **Default value**: `false` ### IsConfigurable - **Type**: boolean - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: Indicates whether users can configure the attribute after adding the product to the order capture page. - **Default value**: `false` ### IsEncrypted - **Type**: boolean - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: Indicates whether the attribute value must be encrypted. Use to ensure privacy, such as Personally Identifiable Information (PII). - **Default value**: `false` ### IsHidden - **Type**: boolean - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: Indicates whether to hide the attribute from users in the order capture interface. - **Default value**: `false` ### IsOverride - **Type**: boolean - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: Represents whether a record is default or a overridden record. - **Default value**: `false` ### IsReadOnly - **Type**: boolean - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: Indicates whether the product attribute is read-only for end-users in the order capture page. - **Default value**: `false` ### IsRequired - **Type**: boolean - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: Indicates whether a value for the attribute is required for the assigned parent object (usually a product). - **Default value**: `false` ### IsValueCloneable - **Type**: boolean - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: Indicates whether to duplicate the attribute value when a line item is cloned. - **Default value**: `false` ### LastReferencedDate - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: The date the product attribute definition was last referenced. ### LastViewedDate - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: The date the product attribute definition was last viewed. ### Name - **Type**: string - **Properties**: Create, Filter, Group, idLookup, Sort, Update - **Description**: Name of the product attribute definition. ### NumberValue - **Type**: double - **Properties**: Create, Filter, Nillable, Sort, Update - **Description**: The numeric value for the product attribute that has a Number data type. ### OverriddenProductAttributeDefinitionId - **Type**: reference - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: Lookup to the Overriden Product Attribute Definition. This field is a relationship field. - **Relationship Name**: OverriddenProductAttributeDefinition - **Relationship Type**: Lookup - **Refers To**: ProductAttributeDefinition ### OverrideContextId - **Type**: reference - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: Lookup to a root bundle product or promotion. This field is a polymorphic relationship field. - **Relationship Name**: OverrideContext - **Relationship Type**: Lookup - **Refers To**: Product2 ### OwnerId - **Type**: reference - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: The ID of the user or group that owns the product attribute definition. This field is a polymorphic relationship field. - **Relationship Name**: Owner - **Relationship Type**: Lookup - **Refers To**: Group, User ### Product2Id - **Type**: reference - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The product ID associated with the product attribute definition. This field is a relationship field. - **Relationship Name**: Product2 - **Relationship Type**: Lookup - **Refers To**: Product2 ### Status - **Type**: picklist - **Properties**: Create, Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort, Update - **Description**: Lifecycle state of the product attribute definition. - **Default value**: `Draft` - **Possible values**: - `Active` - `Draft` - `Inactive` ### TextValue - **Type**: string - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The value for the product attribute that has a Text data type. ### ValueDescription - **Type**: textarea - **Properties**: Create, Nillable, Update - **Description**: Description of the value assigned to this attribute. Defaulted from the Attribute Definition. ## Associated Objects This object has the following associated objects. If the API version isn’t specified, they’re available in the same API versions as this object. Otherwise, they’re available in the specified API version and later. - [ProductAttributeDefinitionFeed](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_associated_objects_feed.htm) - : Feed tracking is available for the object. - [ProductAttributeDefinitionHistory](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_associated_objects_history.htm) - : History is available for tracked fields of the object. - [ProductAttributeDefinitionShare](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_associated_objects_share.htm) - : Sharing is available for the object. # Progress Indicators Display a progress indicator when an AI agent is responding to a conversation. Progress indicators are useful to provide more information and context to users when an AI Agent is executing complex actions. This feature is available from [`CapabilitiesVersion`](https://developer.salesforce.com/docs/service/messaging-api/references/miaw-api-reference?meta=type%3ACapabilitiesVersion) 62. ## Sample Payload ```json { "channelPlatformKey": "ec935ff5-8e16-4299-a9fd-88221a3e94f3", "channelType": "embedded_messaging", "channelAddressIdentifier": "ec935ff5-8e16-4299-a9fd-88221a3e94f3", "conversationId": "01c25401-3353-444e-8323-ace07e1b7375", "conversationEntry": { "senderDisplayName": "Agentforce Service Agent", "identifier": "a7ba79d6-6ee5-402c-936c-d2716682c4ed", "entryType": "ProgressIndicator", "entryPayload": "{\"entryType\":\"ProgressIndicator\",\"id\":\"a7ba79d6-6ee5-402c-936c-d2716682c4ed\",\"progressIndicator\":{\"indicatorType\":\"ProgressUpdateIndicator\",\"progressMessage\":{\"formatType\":\"Text\",\"text\":\"Calling agent action: SvcCopilotTmpl__GetAllCasesForContact\"}}}", "sender": { "role": "Chatbot", "appType": "chatbot", "subject": "0XxSB000000IgTp", "clientIdentifier": "" }, "contextParamMap": {}, "visibilityStrategy": "Default", "transcriptedTimestamp": 1731960237641, "relatedRecords": [], "clientTimestamp": 1731960237624, "clientDuration": 0 } } ``` # Progress Indicators Set the `AgentConfiguration` parameter in the `UIConfiguration` object to `false` to use an animated ellipses typing indicator instead of a progress indicator. This will only affect progress indicators of service reps, not progress indicators of AI agents and bots. **important:** This feature requires version 1.9.0 or later of the Enhanced In-App Chat SDK. This article applies to the following implementations: | UI SDK | Core SDK | | :----: | :------: | | ✅ | | ``` // Setting the useProgressIndicators property to false changes the progress indicator to the animating ellipses. @Parcelize data class AgentConfiguration( val useProgressIndicators: Boolean = false ) : Parcelable ``` # Progress Indicators Set the `AgentConfiguration` parameter in the `UIConfiguration` object to `false` to use an animated ellipses typing indicator instead of a progress indicator. This will only affect progress indicators of service reps, not progress indicators of AI agents and bots. **important:** This feature requires version 1.9.0 or later of the Enhanced In-App Chat SDK. This article applies to the following implementations: | UI SDK | Core SDK | | :----: | :------: | | ✅ | | ``` /** * Setting the useProgressIndicators property to false changes the progress * indicator to the animating ellipses. */ let configuration = UIConfiguration(serviceAPI: , organizationId: , developerName: , conversationId: ) configuration.agentConfiguration = AgentConfiguration(useProgressIndicators: false) ``` # Provided By Represents the Provided By relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. ## Relationship Type Definition ||| |-|-| |Developer Name|`SD_PrBy`| |Description|Defines the Provided By relationship between configuration items in the CMDB.| |Master Label|Provided By| |Direct Relationship|Provided By| |Inverse Relationship|Provides| |Line Stroke|Solid| |Color Code|`#FFA3E0`| # Provides Represents the Provides relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. ## Relationship Type Definition ||| |-|-| |Developer Name|`SD_Proxx`| |Description|Defines the Provides relationship between configuration items in the CMDB.| |Master Label|Provides| |Direct Relationship|Provides| |Inverse Relationship|Provided By| |Line Stroke|Solid| |Color Code|`#FF8080`| # Provides Storage For Represents the Provides Storage For relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. ## Relationship Type Definition ||| |-|-| |Developer Name|`SD_PrStFo`| |Description|Defines the Provides Storage For relationship between configuration items in the CMDB.| |Master Label|Provides Storage For| |Direct Relationship|Provides Storage For| |Inverse Relationship|Stored On| |Line Stroke|Solid| |Color Code|`#99FF66`| # Publish the Primary Version of an Article Publishes the primary version of an article. **important:** Where possible, we changed noninclusive terms to align with our company value of Equality. We maintained certain terms to avoid any effect on customer implementations. The publishing actions are defined by the field change you request on the resource. To publish a minor version, use `"publishStatus":"Online"`. To publish a major version, use `"publishStatus":"Online"` and `"versionNumber":"NextVersion"`. To schedule a publication date, use `"publishScheduleDate" : `. ## URI ```nolang /services/data/v25.0/knowledgeManagement/articleVersions/masterVersions/ ``` ## Formats JSON, XML ## HTTP Method PATCH ## Authentication `Authorization: OAuth {accesstoken}` ## Parameters | Parameter | Description | | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | publishStatus | Publishing status of the article. Use online. | | versionNumber | Version of the article. | | publishScheduleDate | Date to publish the article in ISO 8601 format YYYY-`MM-DDTHH:mm:ss+/-HHmm`. For example, for February 8, 2023, 1:40 pm UTC+01:00 use `2023-02-08T13:40:31+0100.`. | ## Input Publish a minor version: ```nolang { "publishStatus":"Online" } ``` Publish a major version: ```nolang { "publishStatus":"Online", "versionNumber":"NextVersion" } ``` Schedule for publication: ```nolang { "publishScheduleDate" : "2012-05-19T07:00:00+0000" } ``` ## Output HTTP status code 204 is returned when an existing record is updated. # PublishingService Class Use the methods in the `KbManagement.PublishingService` class to manage the lifecycle of an article and its translations. ## Namespace The `KbManagement` namespace provides a class for managing knowledge articles. ## Usage Use the methods in the `KbManagement.PublishingService` class to manage the following parts of the lifecycle of an article and its translations: - Publishing - Updating - Retrieving - Deleting - Submitting for translation - Setting a translation to complete or incomplete status - Archiving - Assigning review tasks for draft articles or translations **note:** Date values are based on GMT. To use the methods in this class, you must enable Salesforce Knowledge. # PublishingService Methods These methods are methods for `PublishingService`. All methods are static. - [archiveOnlineArticle(articleID, scheduledDate](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_classes_knowledge_kbManagement.htm#apex_KbManagement_PublishingService_archiveOnlineArticle) - [assignDraftArticleTask(articleId, assigneeId, instructions, dueDate, sendEmailNotification)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_classes_knowledge_kbManagement.htm#apex_KbManagement_PublishingService_assignDraftArticleTask) - [assignDraftTranslationTask(articleVersionId, assigneeId, instructions, dueDate, sendEmailNotification)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_classes_knowledge_kbManagement.htm#apex_KbManagement_PublishingService_assignDraftTranslationTask) - [cancelScheduledArchivingOfArticle(articleId)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_classes_knowledge_kbManagement.htm#apex_KbManagement_PublishingService_cancelScheduledArchivingOfArticle) - [cancelScheduledPublicationOfArticle(articleId)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_classes_knowledge_kbManagement.htm#apex_KbManagement_PublishingService_cancelScheduledPublicationOfArticle) - [completeTranslation(articleVersionId)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_classes_knowledge_kbManagement.htm#apex_KbManagement_PublishingService_completeTranslation) - [deleteArchivedArticle(articleId)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_classes_knowledge_kbManagement.htm#apex_KbManagement_PublishingService_deleteArchivedArticle) - [deleteArchivedArticleVersion(articleId, versionNumber)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_classes_knowledge_kbManagement.htm#apex_KbManagement_PublishingService_deleteArchivedArticleVersion) - [deleteDraftArticle(articleId)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_classes_knowledge_kbManagement.htm#apex_KbManagement_PublishingService_deleteDraftArticle) - [deleteDraftTranslation(articleVersionId)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_classes_knowledge_kbManagement.htm#apex_KbManagement_PublishingService_deleteDraftTranslation) - [editArchivedArticle(articleId)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_classes_knowledge_kbManagement.htm#apex_KbManagement_PublishingService_editArchivedArticle) - [editOnlineArticle(articleId, unpublish)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_classes_knowledge_kbManagement.htm#apex_KbManagement_PublishingService_editOnlineArticle) - [editPublishedTranslation(articleId, language, unpublish)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_classes_knowledge_kbManagement.htm#apex_KbManagement_PublishingService_editPublishedTranslation) - [publishArticle(articleId, flagAsNew)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_classes_knowledge_kbManagement.htm#apex_KbManagement_PublishingService_publishArticle) - [restoreOldVersion(articleId, versionNumber)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_classes_knowledge_kbManagement.htm#apex_KbManagement_PublishingService_restoreOldVersion) - [scheduleForPublication(articleId, scheduledDate)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_classes_knowledge_kbManagement.htm#apex_KbManagement_PublishingService_scheduleForPublication) - [setTranslationToIncomplete(articleVersionId)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_classes_knowledge_kbManagement.htm#apex_KbManagement_PublishingService_setTranslationToIncomplete) - [submitForTranslation(articleId, language, assigneeId, dueDate)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_classes_knowledge_kbManagement.htm#apex_KbManagement_PublishingService_submitForTranslation) # Push Notifications with the Service Chat SDK for Android To take advantage of push notifications from your org to your app, set up an Apex trigger and configure your app for notifications. Pass relevant notification information, such as case feed activity, to the Service Chat SDK using your `PushNotificationListener` implementation. **important:** 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](https://help.salesforce.com/s/articleView?id=service.miaw_intro_landing.htm&type=5) before that date. Messaging offers many of the [chat features](https://help.salesforce.com/s/articleView?id=service.miaw_chat_vs_messaging.htm&type=5) that you love plus asynchronous conversations that can be picked back up at any time. Learn about chat retirement in [Help](https://help.salesforce.com/s/articleView?id=001790618&type=1). The following activities can cause notifications: - Agent has connected - Agent sent a message - Agent requested a file transfer - Agent canceled a file transfer - Agent ended a session To implement notifications, follow these steps: 1. Set up authentication in your app. To learn more, see [Authentication with the Service Chat SDK for Android](https://developer.salesforce.com/docs/service/service-sdk-android/guide/android-authentication.md). 2. Add FCM (Firebase Cloud Messaging) to your app. To learn more, see Google's documentation, [Add Firebase to Your Android Project](https://firebase.google.com/docs/android/setup). **note:** Avoid any references to GCM (Google Cloud Messaging) in your build dependencies and your `AndroidManifest.xml` files. If you experience a `NoClassDefError` which claims that `GcmReceiver` is missing, it may be included in your final merged manifest by one of your dependencies, such as the Salesforce Mobile SDK. To resolve the error, add the following remove instruction to your `AndroidManifest.xml`: ``. 3. Add a `connected-app` dependency in your module's `build.gradle` file. Service Chat SDK ```java dependencies { // Add the connected-app dependency implementation "com.salesforce.service:connected-app:8.0.6" // ... your other dependencies go here too ... } ``` **note:** The version of the connected-app is the same as the version of the Common module used by the Service Chat SDK. 4. Create a connected app and an Apex trigger to send a notification from your org. Follow the instructions in the [Salesforce Mobile Push Notifications Implementation Guide](https://developer.salesforce.com/docs/atlas.en-us.pushImplGuide.meta/pushImplGuide/pns_overview.htm) for [Creating a Connected App](https://developer.salesforce.com/docs/atlas.en-us.pushImplGuide.meta/pushImplGuide/pns_create_connected_app_overview.htm). 5. Implement [`PushNotificationListener`](https://forcedotcom.github.io/ServiceSDK-Android/releases/common/8.0.5/api/reference/com/salesforce/android/connectedapp/PushNotificationListener.html) and handle the push notification event in the [`onPushNotificationReceived`](https://developer.salesforce.com/docs/service/service-sdk-android/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-Android/releases/common/8.0.5/api/reference/com/salesforce/android/connectedapp/PushNotificationListener.html#onPushNotificationReceived(android.os.Bundle)>) method. 6. Configure using the Sender ID, [`AuthTokenProvider`](https://forcedotcom.github.io/ServiceSDK-Android/releases/common/8.0.5/api/reference/com/salesforce/android/service/common/http/AuthTokenProvider.html), and the site URL. Pass this object your push notification listener and then register your device for push notifications. In Java: ```java // Create a connected app object SalesforceConnectedApp connectedApp = SalesforceConnectedApp.create(this, new ConnectedAppConfiguration.Builder() .gcmSenderId(uniqueProjectId) .salesforceInstanceURL(siteUrl) .authTokenProvider(authProvider) .build()); // Add the push notification listener connectedApp.addPushNotificationListener(myPushNotificationListener); // Register for push notifications connectedApp.registerDeviceForPushNotifications().onError(new Async.ErrorHandler() { @Override public void handleError (Async operation, @NonNull Throwable throwable) { // TO DO: Handle error } }); ``` In Kotlin: ```java // Create a connected app object val connectedApp = SalesforceConnectedApp.create(this, ConnectedAppConfiguration.Builder() .gcmSenderId(uniqueProjectId) .salesforceInstanceURL(siteUrl) .authTokenProvider(authProvider) .build()) // Add the push notification listener connectedApp.addPushNotificationListener(myPushNotificationListener) // Register for push notifications connectedApp.registerDeviceForPushNotifications().onError(object: Async.ErrorHandler { override fun handleError(operation: Async<*>?, throwable: Throwable) { // TO DO: Handle error } }) ``` # Query Configuration Item Query a configuration item by its unique identifier. This operation returns detailed information for a single configuration item. ## Special Access Rules To query a configuration item, you must have the following user permissions: - IT Service Configuration Item Type Manager - IT Service Configuration Item Owner - IT Service Configuration Item Type Reader ## Request ### JSON example ```nolang query CiById { ciById(id: 345672) { id cnfgItemTypeDef { component developerName name } discoveryInformation { createdBySource firstDiscoveredBy firstDiscoveredOn lastDiscoveredBy lastDiscoveredOn lastDiscoveredBySource { date source } } } } ``` ### Properties |Name|Type|Description|Required or Optional|Available Version| |----|----|-----------|--------------------|-----------------| |`id`|Integer|The unique identifier of the configuration item to retrieve.|Required|66.0| ## Response ### JSON example ```nolang { "data": { "ciById": { "id": 6460947, "ciTags": { "totalElements": 1, "ciTags": [ { "type": "KEY_VALUE", "key": "searchtags", "keyId": 764952, "valueId": 859952, "value": "s1" } ] }, "cnfgItemTypeDef": { "component": false, "developerName": "SD_AwEcIn", "name": "AWS EC2 Instance" }, "discoveryInformation": { "createdBySource": "Aws", "firstDiscoveredBy": "Aws", "firstDiscoveredOn": 1765929600000, "lastDiscoveredBy": "Aws", "lastDiscoveredOn": 1765929600000, "lastDiscoveredBySource": [ { "date": 1765929600000, "source": "Aws" } ] } } } } ``` ### Properties |Name|Type|Description|Available Version| |----|----|-----------|-----------------| |`id`|Integer|The unique integer identifier of the configuration item.|66.0| |`name`|String|The descriptive name of the Configuration Item.|66.0| |`createdOn`|String|The date and time the record was created.|66.0| |`cnfgItemTypeDef`|[CnfgItemTypeDef](#cnfgitemtypedef)|The configuration item type definition.|66.0| |`ciTags`|[CiTags](#citags)|The tags associated with the configuration item.|67.0| |`discoveryInformation`|[DiscoveryInformation](#discoveryinformation)|Information about sources that have discovered this configuration item and when.|66.0| |`lastModifiedOn`|String|The date and time the record was last updated.|66.0| |Attribute (by developer name)|String|Any configuration item attribute you request in the query is returned with its developer name as the key (for example, `SD_OpSy`—Operating system). The response includes only the attributes you request.|66.0| ## CnfgItemTypeDef Configuration item type definition returned when requested in the query. ### Properties |Name|Type|Description|Available Version| |----|----|-----------|-----------------| |`component`|Boolean|Indicates whether the configuration item type is a component type.|66.0| |`developerName`|String|The developer name of the configuration item type. To retrieve the list of available CI type developer names programmatically, query the [CnfgItemTypeDef](https://developer.salesforce.com/docs/service/tooling-apis/tooling-api-objects-cnfgitemtypedef.md) object.|66.0| |`name`|String|The display name of the configuration item type.|66.0| ## CiTags Configuration item type tags returned when requested in the query. ### Properties |Name|Type|Description|Available Version| |----|----|-----------|-----------------| |`key`|BigInteger|The tag key or name.|67.0| |`keyId`|BigInteger|The unique identifier of the tag key.|67.0| |`type`|String|The tag type: `KEY_VALUE` (key-value pair) or `KEY_ONLY` (key only).|67.0| |`value`|String|The tag value. This field is null for `KEY_ONLY` tags.|67.0| |`valueId`|String|The unique identifier of the tag value. This field is null for `KEY_ONLY` tags.|67.0| ## DiscoveryInformation Contains information about sources that have discovered this configuration item, along with the date and time of discovery. ### Properties |Name|Type|Description|Available Version| |----|----|-----------|-----------------| |`createdBySource`|String|The source that created the configuration item.|66.0| |`firstDiscoveredBy`|String|The source that first discovered the configuration item.|66.0| |`firstDiscoveredOn`|Integer|The date and time when the configuration item was first discovered (milliseconds since epoch).|66.0| |`lastDiscoveredBy`|String|The source that last discovered the configuration item.|66.0| |`lastDiscoveredOn`|Integer|The date and time when the configuration item was last discovered (milliseconds since epoch).|66.0| |`lastDiscoveredBySource`|Array of [LastDiscoveredBySource](#lastdiscoveredbysource)|List of discovery events with date and source.|66.0| ## LastDiscoveredBySource Each element in the `lastDiscoveredBySource` array contains the following fields. ### Properties |Name|Type|Description|Available Version| |----|----|-----------|-----------------| |`date`|Integer|The date and time when the configuration item was last discovered by this source (milliseconds since epoch).|66.0| |`source`|String|The source that performed the discovery.|66.0| When using the `ciById` operation, you can request any available attribute to be included in the response. The attributes you can include: - Standard Attributes: Many attributes are available out-of-the-box. - Custom Attributes: You can create and include custom attributes using the sObject API. Add any attribute using its Developer Name (for example, `SD_AsNa`—Asset Name) to specify exactly which information you want to receive for your Configuration Items (CIs). # Query Conversation Data API Logs You can track the status of your delete requests using the [ConversationApiLog](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_conversationapilog.htm) object. ``` SELECT Id, Action, Context, Name, Operation, OwnerId, Parameter, RequestedById, RequestedDate, RequestedEntityIdentifier, RequestedEntityType, Status, StatusHistory FROM ConversationApiLog WHERE Id='YOUR_ConversationApiLog_ID' ``` # Queue Management Implementation Instructions These instructions guide you through the process of creating a customized visitor experience using Queue Management Salesforce objects. ## Before You Begin **important:** These steps are automatically performed when you install the [Queue Management Visitor Sign-Up Experience](https://appexchange.salesforce.com/appxListingDetail?listingId=a0N3u00000MRoEKEA1) package. To learn more, see [Create a Visitor Sign-Up Form](https://help.salesforce.com/articleView?id=que_mgmt_signup_next_steps.htm&type=5). Before following the implementation instructions, review these prerequisites: - SMS is the only supported channel type for Broadcast Messaging. - You must have a Messaging channel for SMS text messages associated with a working phone number. You can use a short code, or toll free number. You must have access to the [MessagingChannel](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_messagingchannel.htm) record. - Your messaging channels must be associated with a queue. - You must create a queue (a [LocationWaitlist](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_locationwaitlist.htm) record) using the Digital Waitlist app. - You must create a form that asks for the necessary information to create a wait-list party. This form must include: a name, mobile number, party size, and that the person opts-in to receiving messages. Once a person fills out the form with the relevant information, use the Salesforce API ([SOAP](https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_quickstart_intro.htm), [REST](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/intro_what_is_rest_api.htm), or [Apex](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_dev_guide.htm)) to create a wait-list party. ## Steps 1. Using the ID of the [LocationWaitlist](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_locationwaitlist.htm) record, get the Status field. Check that the Status is "Open". 2. Create a [MessagingEndUser](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_messagingenduser.htm) record. This record contains the following relevant fields: MessageType (set to "text"), MessagingChannelId, MessagingConsentStatus (set to "ExplicitlyOptedIn" or "ImplicitlyOptedIn", depending on your workflow), MessagingPlatformKey (contains the phone number of the customer with the country code appended), Name (contains the name of the customer). This record is used by Digital Engagement for checking the consent when sending an SMS message. **important:** Be sure that the customer has opted in before creating this record with an opted-in consent status! 3. Create a [LocationWaitlistedParty](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_locationwaitlistedparty.htm) record, which stores the wait-list party information. Relevant fields include: MobilePhone, Name, PartySize, PartyStatus (set to "waiting"), and the WaitlistId (set to the ID of the [LocationWaitlist](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_locationwaitlist.htm) record). When the Status field of the [LocationWaitlistedParty](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_locationwaitlistedparty.htm) record changes, Salesforce uses the Messaging template and the Messaging channel to send an SMS message to the number specified. When the status changes to “canceled”, the customer is removed from the wait-list. # Queue Management Object Model Queue Management uses a combination of Salesforce objects. The following diagram highlights the key objects involved in the queue management process. ![Queue management object model](https://developer.salesforce.com/docs/media/queue_management_erd.png) ## Queue Management Objects - [LocationWaitlist](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_locationwaitlist.htm): Represents a queue created for a specific location. Multiple queues can be created for a single location. For example, you can have a queue for each sales agent or a standard queue and a queue for vulnerable groups. The specific party of people in a queue is represented by LocationWaitlistedParty. - [LocationWaitlistedParty](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_locationwaitlistedparty.htm): Represents a specific party of people waiting in a queue. - [LocWaitlistMsgTemplate](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_locwaitlistmsgtemplate.htm): Represents a junction object connecting LocationWaitlist to MessagingTemplate. ## Other Objects - [BusinessHours](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_businesshours.htm): Specifies the business hours of your support organization. - [Location](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_location.htm): Represents a physical organization location, with extra custom fields added by Work.com. - [MessagingChannel](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_messagingchannel.htm): Represents a communication channel that an end user can use to send a message to an agent. A communication channel can be an SMS number, a Facebook page, or another supported messaging channel. For Queue Management, we exclusively use the SMS text messaging channel. - [MessagingEndUser](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_messagingenduser.htm): Represents a single address—such as a phone number or Facebook page—communicating with a single Messaging channel. - [MessagingTemplate](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_messagingtemplate.htm): Represents a Messaging template used to send pre-formatted messages. For queue management, the admin should create at least one template before implementing this visitor experience. # Quick Setup: Chat in the Service Chat SDK To add Chat to your Android app, create a configuration object that points to your org and then create a Chat UI client. ## Before You Begin **important:** 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](https://help.salesforce.com/s/articleView?id=service.miaw_intro_landing.htm&type=5) before that date. Messaging offers many of the [chat features](https://help.salesforce.com/s/articleView?id=service.miaw_chat_vs_messaging.htm&type=5) that you love plus asynchronous conversations that can be picked back up at any time. Learn about chat retirement in [Help](https://help.salesforce.com/s/articleView?id=001790618&type=1). - Set up your console to work with Chat. See [Org Setup for Chat in Lightning Experience with a Guided Flow](https://developer.salesforce.com/docs/service/service-sdk-android/guide/shared/live-agent-cloud-setup.md). - Installed the SDK. See [Install the Service SDK for Android](https://developer.salesforce.com/docs/service/service-sdk-android/guide/android-install-sdk.md). To set up Chat with the default UI, create a configuration object that points to your org and then start a chat session. If you prefer to build your own user interface, see [Build Your Own UI with the Chat Core API](https://developer.salesforce.com/docs/service/service-sdk-android/guide/android-chat-core-api.md). 1. Specify your Chat org settings. In Java: ```java public static final String ORG_ID = "YOUR_ORG_ID"; public static final String DEPLOYMENT_ID = "YOUR_DEPLOYMENT_ID"; public static final String BUTTON_ID = "YOUR_BUTTON_ID"; public static final String LIVE_AGENT_POD = "YOUR_LAC_ORG_URL"; // e.g. "d.la.salesforce.com" ``` In Kotlin: ```java val ORG_ID = "YOUR_ORG_ID" val DEPLOYMENT_ID = "YOUR_DEPLOYMENT_ID" val BUTTON_ID = "YOUR_BUTTON_ID" val LIVE_AGENT_POD = "YOUR_LAC_ORG_URL" // e.g. "d.la.salesforce.com" ``` **note:** You can get the required parameters from your Salesforce org. If your Salesforce admin hasn’t set up Chat in Service Cloud or you need more guidance, see [Org Setup for Chat in Lightning Experience with a Guided Flow](https://developer.salesforce.com/docs/service/service-sdk-android/guide/shared/live-agent-cloud-setup.md). 2. Create a [`ChatConfiguration`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/ChatConfiguration.html) object using your org settings. In Java: ```java // Create a core configuration instance ChatConfiguration chatConfiguration = new ChatConfiguration.Builder(ORG_ID, BUTTON_ID, DEPLOYMENT_ID, LIVE_AGENT_POD) .build(); ``` In Kotlin: ```java // Create a core configuration instance val chatConfiguration = ChatConfiguration.Builder(ORG_ID, BUTTON_ID, DEPLOYMENT_ID, LIVE_AGENT_POD) .build() ``` **tip:** You can use the [`ChatConfiguration.Builder`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/ChatConfiguration.Builder.html) class to configure other behaviors, such as how to handle the pre-chat view (see [Show Pre-Chat Fields to User](https://developer.salesforce.com/docs/service/service-sdk-android/guide/android-chat-prechat-fields.md)) and how to specify the name of the visitor speaking with the agent (use the `visitorName` method). 3. Configure and launch a chat session using [`ChatUI`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/ui/ChatUI.html), [`ChatUIConfiguration`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/ui/ChatUIConfiguration.html), and [`ChatUIClient`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/ui/ChatUIClient.html). In Java: ```java // Create a UI configuration instance from a core config object // and start session! ChatUI.configure(ChatUIConfiguration.create(chatConfiguration)) .createClient(getApplicationContext()) .onResult(new Async.ResultHandler() { @Override public void handleResult (Async operation, ChatUIClient chatUIClient) { chatUIClient.startChatSession(MainActivity.this); } }); ``` In Kotlin: ```java // Create a UI configuration instance from a core config object // and start session! ChatUI.configure(ChatUIConfiguration.create(chatConfiguration)) .createClient(applicationContext) .onResult { _, chatUIClient -> chatUIClient.startChatSession(this@MainActivity) } ``` **note:** Don't create more than 1 instance of `ChatUIClient`. The system returns an `Async` error if there is already an active instance. The SDK only supports 1 session at a time per device. Wait until the chat session ends before attempting to start a new session. When calling `startChatSession`, pass the context for the `Activity` that you want to show the chat UI on top of. The chat session starts minimized and the user can tap the thumbnail to go full screen. If you want the session to start in full-screen mode, call `defaultToMinimized(false)` on the builder. When the minimized view is visible, it displays the number of unread messages. This value represents the total number of bot, agent, and system messages that are unread. By default, the user's queue position is shown while the user waits for an agent. You can change this information from a position number to an estimated wait time using the [`queueStyle`](https://developer.salesforce.com/docs/service/service-sdk-android/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/ui/ChatUIConfiguration.Builder.html#queueStyle(com.salesforce.android.chat.ui.model.QueueStyle)>) build method and specifying `QueueStyle.EstimatedWaitTime`. When using the estimated wait time, you can set the minimum ([`minimumWaitTime`](https://developer.salesforce.com/docs/service/service-sdk-android/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/ui/ChatUIConfiguration.Builder.html#minimumWaitTime(int)>)) and maximum ([`maximumWaitTime`](https://developer.salesforce.com/docs/service/service-sdk-android/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/ui/ChatUIConfiguration.Builder.html#maximumWaitTime(int)>)) wait time values. If the wait time exceeds the maximum value, a generic message appears, which [you can customize](https://developer.salesforce.com/docs/service/service-sdk-android/guide/android-strings.md) (using the customizable chat strings). To understand the algorithm used for the estimated wait time, see the estimated wait time documentation in the [Chat REST API Developer Guide](https://developer.salesforce.com/docs/atlas.en-us.live_agent_rest.meta/live_agent_rest/live_agent_rest_estimated_wait_time.htm). To hide queue information entirely, use a queue style of `None`. Sample alternate configuration in Java: ```java ChatUIConfiguration uiConfig = new ChatUIConfiguration.Builder() .chatConfiguration(chatConfiguration) .queueStyle(QueueStyle.EstimatedWaitTime) // Use estimated wait time .defaultToMinimized(false) // Start in full-screen mode .build(); ``` Sample alternate configuration in Kotlin: ```java val uiConfig = ChatUIConfiguration.Builder() .chatConfiguration(chatConfiguration) .queueStyle(QueueStyle.EstimatedWaitTime) // Use estimated wait time .defaultToMinimized(false) // Start in full-screen mode .build() ``` 4. (Optional) Customize the interface. You can customize the colors, strings, and other aspects of the interface. You can also localize the strings into other languages. 5. (Optional) Add listeners for state changes or events. You can add listeners for state changes and events during a chat session and respond accordingly. For instance, when the client ends a session, you can display a dialog to the user. See [Listen for State Changes and Events](https://developer.salesforce.com/docs/service/service-sdk-android/guide/android-chat-state-changes.md). **note:** If you use an incorrect button ID in your [`ChatConfiguration`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/ChatConfiguration.html), the chat fails and your [`SessionStateListener`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/SessionStateListener.html) reports a [`ChatEndReason`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/model/ChatEndReason.html) of `NetworkError`. When a session launches, it appears minimized. ![Chat session minimzed](https://developer.salesforce.com/docs/media/service-sdk/android_lac_chat_minimized.png '{"class": "image-sm"}') The user can tap the session to make it full screen and begin a conversation with an agent. ![Chat session full screen](https://developer.salesforce.com/docs/media/service-sdk/android_lac_chat_normal.png '{"class": "image-sm"}') **note:** When the app is in the background, the SDK ensures that the session remains open. A timeout should only occur when there is a connection issue, the agent closes the session, or the app is removed from memory. # Quick Setup: Chat in the Service Chat SDK To add Chat to your iOS app, create an `SCSChatConfiguration` object and pass it to the `showChat` method. ## Before You Begin **important:** 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](https://help.salesforce.com/s/articleView?id=service.miaw_intro_landing.htm&type=5) before that date. Messaging offers many of the [chat features](https://help.salesforce.com/s/articleView?id=service.miaw_chat_vs_messaging.htm&type=5) that you love plus asynchronous conversations that can be picked back up at any time. Learn about chat retirement in [Help](https://help.salesforce.com/s/articleView?id=001790618&type=1). Before running through these steps, be sure you’ve already: - Set up Service Cloud to work with Chat. To learn more, see [Org Setup for Chat in Lightning Experience with a Guided Flow](https://developer.salesforce.com/docs/service/service-sdk-android/guides/shared/live-agent-cloud-setup.md). - Installed the SDK. To learn more, see [Install the Service Chat SDK for iOS](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/ios-sdk-install-overview.md). Once you’ve reviewed these prerequisites, you’re ready to begin. These steps describe how to set up Chat with the default UI. If you prefer to build your own user interface, see [Build Your Own UI with the Chat Core API](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/live-agent-chat-core-api.md). 1. Import the SDK. Wherever you intend to use the Chat SDK, be sure to import the ServiceCore framework and the ServiceChat framework. In Swift: ```java import ServiceCore import ServiceChat ``` In Objective-C: ```java @import ServiceCore; @import ServiceChat; ``` 2. Create an [`SCSChatConfiguration`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSChatConfiguration.html) instance with information about your LiveAgent pod, your Salesforce org ID, the deployment ID, and the button ID. In Swift: ```java let config = SCSChatConfiguration(liveAgentPod: "TO_DO_POD_NAME", // e.g. "d.gla5.gus.salesforce.com" orgId: "TO_DO_ORG_ID", // e.g. "00DB00000003Rxz" deploymentId: "TO_DO_DEPLOYMENT_ID", // e.g. "573B00000005KXz" buttonId: "TO_DO_BUTTON_ID") // e.g. "575C00000004h3m" ``` In Objective-C: ```java SCSChatConfiguration *config = [[SCSChatConfiguration alloc] initWithLiveAgentPod:@"TO_DO_POD_NAME" // e.g. "d.gla5.gus.salesforce.com" orgId:@"TO_DO_ORG_ID" // e.g. "00DB00000003Rxz" deploymentId:@"TO_DO_DEPLOYMENT_ID" // e.g. "573B00000005KXz" buttonId:@"TO_DO_BUTTON_ID"]; // e.g. "575C00000004h3m" ``` **note:** You can get the required parameters for this method from your Salesforce org. See [Get Chat Settings from Your Org](https://developer.salesforce.com/docs/service/service-sdk-android/guides/shared/live-agent-cloud-setup-get-settings.md). If your Salesforce admin hasn’t already set up Chat in Service Cloud or you need more guidance, see [Org Setup for Chat in Lightning Experience with a Guided Flow](https://developer.salesforce.com/docs/service/service-sdk-android/guides/shared/live-agent-cloud-setup.md). 3. (Optional) Configure the visitor name, queue display style, whether the user can minimize the chat session, and various other configuration settings. See [Configure a Chat Session](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/configure-lac-session.md) for more information. 4. (Optional) Customize the appearance with the configuration object. You can configure the colors, fonts, and images to your interface with an [`SCAppearanceConfiguration`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCAppearanceConfiguration.html) instance. It contains the methods [`setColor`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCAppearanceConfiguration.html#/c:objc(cs)SCAppearanceConfiguration(im)setColor:forName:>), [`setFontDescriptor`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCAppearanceConfiguration.html#/c:objc(cs)SCAppearanceConfiguration(im)setFontDescriptor:fontFileName:forWeight:>), and [`setImage`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCAppearanceConfiguration.html#/c:objc(cs)SCAppearanceConfiguration(im)setImage:compatibleWithTraitCollection:forName:>). You can also configure the strings used throughout the interface. See [SDK Customizations with the Service Chat SDK for iOS](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/servicesdk-ui-customization.md). 5. (Optional) Specify any pre-chat fields. You can specify both optional and required fields shown to the user before a chat session starts. You can also directly pass data to an agent without requiring any user input. These fields can be mapped directly to fields in a record in your org. See [Show Pre-Chat Fields to User](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/live-agent-prechat-fields.md) and [Create or Update Salesforce Records from a Chat Session](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/live-agent-send-custom-data.md) for more information. 6. To start a chat session, call the [`showChat(with:showPrechat:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSChatInterface.html#/c:objc(cs)SCSChatInterface(im)showChatWithConfiguration:showPrechat:>) method on [`SCSChatInterface`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSChatInterface.html). In Swift: ```java ServiceCloud.shared().chatUI.showChat(with: config!) ``` In Objective-C: ```java [[SCServiceCloud sharedInstance].chatUI showChatWithConfiguration:config]; ``` **note:** The `showChat` method must be called on the main UI thread. You can provide an optional completion block to execute code when the session has been fully connected to all services. During a successful session initialization, the SDK calls the completion block at the point that the session is active and the user is waiting for an agent to join. If there is a failure, the SDK calls the completion block with the associated error. 7. Listen for events and handle error conditions. You can detect when a session ends by implementing the [`session(didEnd:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSChatSessionDelegate.html#/c:objc(pl)SCSChatSessionDelegate(im)session:didEnd:>) method on the [`SCSChatSessionDelegate`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSChatSessionDelegate.html) delegate. Register this delegate using the [`add(delegate:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSChat.html#/c:objc(cs)SCSChat(im)addDelegate:>) method on your [`SCSChat`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSChat.html) instance. In particular, we suggest that you handle the `.agent` reason (for when an agent ends a session) and the `.noAgentsAvailable` reason (for when there are no agents available). See [Listen for State Changes and Events](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/live-agent-listen-to-events.md). **note:** The SDK doesn't show an alert when a session fails to start, or when a session ends. It's your responsibility to listen to events and display an error when appropriate. These steps embed the chat experience into your app. **note:** To learn about chat timeout limitations on iOS devices, see [When does a chat session time out?](https://github.com/forcedotcom/ServiceSDK-iOS/wiki/When-does-a-chat-session-time-out%3F) ## Example To use this example code, create a Single View Application and [Install the Service Chat SDK for iOS](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/ios-sdk-install-overview.md). Use the storyboard to add a button to the view. Add a `Touch Up Inside` action in your `UIViewController` implementation with the name `startChat`. In the view controller code: - Implement the [`SCSChatSessionDelegate`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSChatSessionDelegate.html) protocol so that you can be notified when there are errors or state changes. - Specify `self` as a chat delegate. - Start a chat session in the button action. - Implement the [`session(didEnd:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSChatSessionDelegate.html#/c:objc(pl)SCSChatSessionDelegate(im)session:didEnd:>) method and show a dialog when appropriate. In Swift: ```java import UIKit import ServiceCore import ServiceChat class ViewController : UIViewController, SCSChatSessionDelegate { override func viewDidLoad() { super.viewDidLoad() // Add our chat delegate ServiceCloud.shared().chatCore.add(delegate: self) } @IBAction func startChat(_ sender: AnyObject) { // Create config object if let config = SCSChatConfiguration(liveAgentPod: "YOUR-POD-NAME", orgId: "YOUR-ORG-ID", deploymentId: "YOUR-DEPLOYMENT-ID", buttonId: "YOUR-BUTTON-ID") { // Start a session ServiceCloud.shared().chatUI.showChat(with: config) } } func session(_ session: SCSChatSession!, didEnd endEvent: SCSChatSessionEndEvent!) { var description = "" // Here we'll handle the situation where the agent ends the session // and when there are no agents available... switch endEvent.reason { case .agent: description = "The agent has ended the session." case .noAgentsAvailable: description = "It looks like there are no agents available. Try again later." // TO DO: Handle other reasons default: description = "Session ended for an unknown reason." } let alert = UIAlertController(title: "Session Ended", message: description, preferredStyle: .alert) let okAction = UIAlertAction(title: "OK", style: .default, handler: nil) alert.addAction(okAction) self.present(alert, animated: true, completion: nil) } func session(_ session: SCSChatSession!, didError error: Error!, fatal: Bool) { // TO DO: Handle error condition NSLog("Chat error: \(error.localizedDescription)") } } ``` In Objective-C: ```java #import "ViewController.h" @import ServiceCore; @import ServiceChat; @interface ViewController : UIViewController @end @implementation ViewController - (void)viewDidLoad { [super viewDidLoad]; // Add our chat delegate [[SCServiceCloud sharedInstance].chatCore addDelegate:self]; } - (IBAction)startChat:(id)sender { // Create config object SCSChatConfiguration *config = [[SCSChatConfiguration alloc] initWithLiveAgentPod:@"YOUR-POD-NAME" orgId:@"YOUR-ORG-ID" deploymentId:@"YOUR-DEPLOYMENT-ID" buttonId:@"YOUR-BUTTON-ID"]; // Start the session [[SCServiceCloud sharedInstance].chatUI showChatWithConfiguration:config]; } - (void)session:(id)session didEnd:(SCSChatSessionEndEvent *)endEvent { NSString *description = nil; // Here we'll handle the situation where the agent ends the session // and when there are no agents available... switch (endEvent.reason){ case SCSChatEndReasonAgent: description = @"The agent has ended the session."; break; case SCSChatEndReasonNoAgentsAvailable: description = @"It looks like there are no agents available. Try again later."; break; // TO DO: Handle other reasons default: description = @"Session ended for an unknown reason."; break; } UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Session Ended" message:description preferredStyle:UIAlertControllerStyleAlert]; UIAlertAction* okAction = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:nil]; [alert addAction:okAction]; [self presentViewController:alert animated:YES completion:nil]; } - (void)session:(id)session didError:(NSError *)error fatal:(BOOL)fatal { // TO DO: Handle error condition NSLog(@"Chat error: \(error.localizedDescription)"); } @end ``` # raiseAgentWorkFlag for Lightning Experience Raises a flag for this agent work item. ## Arguments |Name|Type|Description| |----|----|-----------| |`workId`|string|The ID of the work item to raise the flag on.| |`message`|string|Optional. The message associated with this flag.| ## Sample Code Component code: ```html ``` Controller code: ```javascript ({ raiseFlag: function(cmp, evt, hlp) { var omniAPI = cmp.find("omniToolkit"); omniAPI.getAgentWorks().then(function(result) { var works = JSON.parse(result.works); var work = works[0]; omniAPI.raiseAgentWorkFlag({workId: work.workId, message: "Raise Flag Message"}).then(function(res) { if (res) { console.log("Flag raised successfully"); } else { console.log("Flag raise failed"); } }).catch(function(error) { console.log(error); }); }); } }) ``` ## Response This method returns a promise that, upon success, resolves to `true` and is rejected on error. **note:** When Omni-Channel Fallback Mode is enabled, the raise and lower flag feature isn't supported. If this method is used, it doesn’t perform any operations and always resolves to true. **See Also** - [Knowledge Article: Routing Work with Omni-Channel Fallback Mode](https://help.salesforce.com/s/articleView?id=002186102&type=1) # Rate Limits for Interaction Service API Interaction Service API has a rate limit of 2,000 requests per second. If the rate limit is exceeded, the API returns the error message: `Interaction request rate limit exceeded`. # Reads Data From Represents the Reads Data From relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. ## Relationship Type Definition ||| |-|-| |Developer Name|`SD_ReDaFr1`| |Description|Defines the Reads Data From relationship between configuration items in the CMDB.| |Master Label|Reads Data From| |Direct Relationship|Reads Data From| |Inverse Relationship|Data Read By| |Line Stroke|Solid| |Color Code|`#e8a11e`| # Rebook And Notify Output representation of the rebook and notify request. ## JSON Example ```nolang { "errorCode": 0, "errorMessage": "", "requestId": "0Xx5g0000008AbCEAU", "status": "Completed" } ``` ## Properties |Property Name|Type|Description|Filter Group and Version|Available Version| |-------------|----|-----------|------------------------|-----------------| |`errorCode`|Integer|A unique code representing the reason for the failure.|Small, 64.0|64.0| |`errorMessage`|String|The reason for the failure.|Small, 64.0|64.0| |`requestId`|String|The ID of the ConvMessageSendActionRequest record created by the request that's used to track the message’s progress.|Small, 64.0|64.0| |`status`|String|Defines whether the process completed successfully. Possible values are:
  • `Completed`​The operation successfully completed.
  • `Failed`​The operation failed.
|Small, 64.0|64.0| # Rebook and Notify Customer Rebook service appointments and notify the end customer for Agentforce Scheduling for Field Service. ## Resource ```nolang /connect/field-service/rebookNotifyAgentforceSchedulingFS ``` ## Resource Example ```nolang https://yourInstance.salesforce.com/services/data/v68.0/connect/field-service/rebookNotifyAgentforceSchedulingFS ``` ## Available Version 64.0 ## HTTP Methods POST ## Request Body for POST ### JSON Example ```nolang { "flowDefinitionId": "3015g0000008XYZAA2", "operationType": "UpdateObj", "serviceAppointmentId": "08p5g0000004AbCEAU" } ``` ### Properties |Name|Type|Description|Required or Optional|Available Version| |----|----|-----------|--------------------|-----------------| |`flowDefinitionID`|String|The ID of the FlowDefinition object.|Required|64.0| |`operationType`|String|Defines the type of operation. Possible values are:
  • `CreateObj`
  • `DeleteObj`
  • `Invalid`
  • `UpdateObj`
|Required|64.0| |`serviceAppointmentId`|String|The ID of the service appointment that needs rescheduling.|Required|64.0| ## Response Body for POST [Rebook And Notify](https://developer.salesforce.com/docs/service/field-service-dev/guide/connect-responses-rebook-and-notify.md) # Rebook And Notify Input Input representation for the rebooking and notifying. ## JSON Example ```nolang { "flowDefinitionId": "3015g0000008XYZAA2", "operationType": "UpdateObj", "serviceAppointmentId": "08p5g0000004AbCEAU" } ``` ## Properties |Name|Type|Description|Required or Optional|Available Version| |----|----|-----------|--------------------|-----------------| |`flowDefinitionID`|String|The ID of the FlowDefinition object.|Required|64.0| |`operationType`|String|Defines the type of operation. Possible values are:
  • `CreateObj`
  • `DeleteObj`
  • `Invalid`
  • `UpdateObj`
|Required|64.0| |`serviceAppointmentId`|String|The ID of the service appointment that needs rescheduling.|Required|64.0| # Rebook and Notify Resources Field Service Rebook and Notify Connect APIs are RESTful APIs. - **[Rebook and Notify Customer](https://developer.salesforce.com/docs/service/field-service-dev/rebookandnotify/connect-resources-field-srvc-rebook-and-notify.md)** Rebook service appointments and notify the end customer for Agentforce Scheduling for Field Service. # Receives Data From Represents the Receives Data From relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. ## Relationship Type Definition ||| |-|-| |Developer Name|`SD_ReDaFr`| |Description|Defines the Receives Data From relationship between configuration items in the CMDB.| |Master Label|Receives Data From| |Direct Relationship|Receives Data From| |Inverse Relationship|Send Data To| |Line Stroke|Solid| |Color Code|`#A37000`| # Reference Documentation Reference documentation for Service Chat SDK for Android. **important:** 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](https://help.salesforce.com/s/articleView?id=service.miaw_intro_landing.htm&type=5) before that date. Messaging offers many of the [chat features](https://help.salesforce.com/s/articleView?id=service.miaw_chat_vs_messaging.htm&type=5) that you love plus asynchronous conversations that can be picked back up at any time. Learn about chat retirement in [Help](https://help.salesforce.com/s/articleView?id=001790618&type=1). To access the reference documentation for the Service Chat SDK for Android, visit: - [forcedotcom.github.io/ServiceSDK-Android](https://forcedotcom.github.io/ServiceSDK-Android/) This site contains API documentation for the latest version of the SDK. # Reference Documentation Reference documentation for Service Chat SDK for iOS. **important:** 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](https://help.salesforce.com/s/articleView?id=service.miaw_intro_landing.htm&type=5) before that date. Messaging offers many of the [chat features](https://help.salesforce.com/s/articleView?id=service.miaw_chat_vs_messaging.htm&type=5) that you love plus asynchronous conversations that can be picked back up at any time. Learn about chat retirement in [Help](https://help.salesforce.com/s/articleView?id=001790618&type=1). To access the reference documentation for the Service Chat SDK for iOS, visit: - [forcedotcom.github.io/ServiceSDK-iOS](https://forcedotcom.github.io/ServiceSDK-iOS/) This site contains API documentation for the latest version of the SDK. # Reference Index A list of all classes, interfaces, methods, constants, and enums referenced from this developer's guide. **important:** 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](https://help.salesforce.com/s/articleView?id=service.miaw_intro_landing.htm&type=5) before that date. Messaging offers many of the [chat features](https://help.salesforce.com/s/articleView?id=service.miaw_chat_vs_messaging.htm&type=5) that you love plus asynchronous conversations that can be picked back up at any time. Learn about chat retirement in [Help](https://help.salesforce.com/s/articleView?id=001790618&type=1). ## Chat Index - [`AgentAvailabilityClient`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/AgentAvailabilityClient.html) - [`AgentListener`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/AgentListener.html) - [`AppEventList`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/model/AppEventList.html) - [`AppLinkClickListener`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/ui/AppLinkClickListener.html) - [`AvailabilityState`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/model/AvailabilityState.html) - [`ChatAnalytics`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/ChatAnalytics.html) - [`ChatClient`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/ChatClient.html) - [`addFileTransferRequestListener`](https://developer.salesforce.com/docs/service/service-sdk-android/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/ChatClient.html#addFileTransferRequestListener(com.salesforce.android.chat.core.FileTransferRequestListener)>) - [`ChatConfiguration`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/ChatConfiguration.html) - [`ChatConfiguration.Builder`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/ChatConfiguration.Builder.html) - [`chatEntities`](https://developer.salesforce.com/docs/service/service-sdk-android/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/ChatConfiguration.Builder.html#chatEntities(java.util.List%3Ccom.salesforce.android.chat.core.model.ChatEntity%3E)>) - [`chatUserData`](https://developer.salesforce.com/docs/service/service-sdk-android/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/ChatConfiguration.Builder.html#chatUserData(com.salesforce.android.chat.core.model.ChatUserData...)>) - [`maximumWaitTime`](https://developer.salesforce.com/docs/service/service-sdk-android/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/ui/ChatUIConfiguration.Builder.html#maximumWaitTime(int)>) - [`minimumWaitTime`](https://developer.salesforce.com/docs/service/service-sdk-android/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/ui/ChatUIConfiguration.Builder.html#minimumWaitTime(int)>) - [`queueStyle`](https://developer.salesforce.com/docs/service/service-sdk-android/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/ui/ChatUIConfiguration.Builder.html#queueStyle(com.salesforce.android.chat.ui.model.QueueStyle)>) - [`ChatCore`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/ChatCore.html) - [`ChatEndReason`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/model/ChatEndReason.html) - [`ChatEntity`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/model/ChatEntity.html) - [`ChatEntityField`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/model/ChatEntityField.html) - [`ChatEventListener`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/ui/ChatEventListener.html) - [`ChatKnowledgeArticlePreviewClickListener`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/ui/ChatKnowledgeArticlePreviewClickListener.html) - [`ChatKnowledgeArticlePreviewDataHelper`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/ui/ChatKnowledgeArticlePreviewDataHelper.html) - [`ChatKnowledgeArticlePreviewDataProvider`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/ui/ChatKnowledgeArticlePreviewDataProvider.html) - [`ChatSessionState`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/model/ChatSessionState.html) - [`ChatUI`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/ui/ChatUI.html) - [`ChatUIClient`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/ui/ChatUIClient.html) - [`ChatUIConfiguration`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/ui/ChatUIConfiguration.html) - [`ChatUIConfiguration.Builder`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/ui/ChatUIConfiguration.Builder.html) - [`chatBotAvatar`](https://developer.salesforce.com/docs/service/service-sdk-android/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/ui/ChatUIConfiguration.Builder.html#chatBotAvatar(int)>) - [`enableChatBotBanner`](https://developer.salesforce.com/docs/service/service-sdk-android/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/ui/ChatUIConfiguration.Builder.html#enableChatBotBanner(int)>) - [`ChatUserData`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/model/ChatUserData.html) - [`FileTransferAssistant`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/FileTransferAssistant.html) - [`FileTransferRequestListener`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/FileTransferRequestListener.html) - [`FileTransferStatus`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/model/FileTransferStatus.html) - [`PreChatPickListField`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/ui/model/PreChatPickListField.html) - [`PreChatTextInputField`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/ui/model/PreChatTextInputField.html) - [`QueueListener`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/QueueListener.html) - [`SessionInfoListener`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/SessionInfoListener.html) - [`SessionStateListener`](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.3.1/api/reference/com/salesforce/android/chat/core/SessionStateListener.html) ## Common Index - [`Async`](https://forcedotcom.github.io/ServiceSDK-Android/releases/common/8.0.5/api/reference/com/salesforce/android/service/common/utilities/control/Async.html)\*\*\*\* - [`AuthenticatedUser`](https://forcedotcom.github.io/ServiceSDK-Android/releases/common/8.0.5/api/reference/com/salesforce/android/service/common/http/AuthenticatedUser.html) - [`AuthTokenProvider`](https://forcedotcom.github.io/ServiceSDK-Android/releases/common/8.0.5/api/reference/com/salesforce/android/service/common/http/AuthTokenProvider.html) - [`PushNotificationListener`](https://forcedotcom.github.io/ServiceSDK-Android/releases/common/8.0.5/api/reference/com/salesforce/android/connectedapp/PushNotificationListener.html) - [`onPushNotificationReceived`](https://developer.salesforce.com/docs/service/service-sdk-android/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-Android/releases/common/8.0.5/api/reference/com/salesforce/android/connectedapp/PushNotificationListener.html#onPushNotificationReceived(android.os.Bundle)>) - [`SalesforceConnectedApp`](https://forcedotcom.github.io/ServiceSDK-Android/releases/common/8.0.5/api/reference/com/salesforce/android/connectedapp/SalesforceConnectedApp.html) - [`ServiceAnalytics`](https://forcedotcom.github.io/ServiceSDK-Android/releases/common/8.0.5/api/reference/com/salesforce/android/service/common/analytics/ServiceAnalytics.html) - [`ServiceAnalyticsListener`](https://forcedotcom.github.io/ServiceSDK-Android/releases/common/8.0.5/api/reference/com/salesforce/android/service/common/analytics/ServiceAnalyticsListener.html) - [`ServiceLogging`](https://forcedotcom.github.io/ServiceSDK-Android/releases/common/8.0.5/api/reference/com/salesforce/android/service/common/utilities/logging/ServiceLogging.html) - [`addSink`](https://developer.salesforce.com/docs/service/service-sdk-android/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-Android/releases/common/8.0.5/api/reference/com/salesforce/android/service/common/utilities/logging/ServiceLogging.html#addSink(com.salesforce.android.service.common.utilities.logging.ServiceLoggingSink)>) - [`setLogLevel`](https://developer.salesforce.com/docs/service/service-sdk-android/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-Android/releases/common/8.0.5/api/reference/com/salesforce/android/service/common/utilities/logging/ServiceLogging.html#setLogLevel(int)>) - [`ServiceLoggingSink`](https://forcedotcom.github.io/ServiceSDK-Android/releases/common/8.0.5/api/reference/com/salesforce/android/service/common/utilities/logging/ServiceLoggingSink.html) ## Resource Files - [Chat String Resources](https://forcedotcom.github.io/ServiceSDK-Android/releases/chat/4.1.1/api/reference/doc-files/resource_overrides.html#Strings) - [Common String Resources](https://forcedotcom.github.io/ServiceSDK-Android/releases/common/8.0.2/api/reference/doc-files/resource_overrides.html#Strings) ## Deprecated APIs - [`ArticleSummary`](https://forcedotcom.github.io/ServiceSDK-Android/releases/knowledge/4.3.6/api/reference/com/salesforce/android/knowledge/core/model/ArticleSummary.html) - [`getArticleId`](https://developer.salesforce.com/docs/service/service-sdk-android/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-Android/releases/knowledge/4.3.6/api/reference/com/salesforce/android/knowledge/core/model/ArticleSummary.html#getArticleId()>) - [`getArticleNumber`](https://developer.salesforce.com/docs/service/service-sdk-android/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-Android/releases/knowledge/4.3.6/api/reference/com/salesforce/android/knowledge/core/model/ArticleSummary.html#getArticleNumber()>) - [`DataCategorySummary`](https://forcedotcom.github.io/ServiceSDK-Android/releases/knowledge/4.3.6/api/reference/com/salesforce/android/knowledge/core/model/DataCategorySummary.html) - [`getName`](https://developer.salesforce.com/docs/service/service-sdk-android/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-Android/releases/knowledge/4.3.6/api/reference/com/salesforce/android/knowledge/core/model/DataCategorySummary.html#getName()>) - [`KnowledgeClient`](https://forcedotcom.github.io/ServiceSDK-Android/releases/knowledge/4.3.6/api/reference/com/salesforce/android/knowledge/core/KnowledgeClient.html) - [`KnowledgeConfiguration`](https://forcedotcom.github.io/ServiceSDK-Android/releases/knowledge/4.3.6/api/reference/com/salesforce/android/knowledge/core/KnowledgeConfiguration.html) - [`KnowledgeConfiguration.Builder`](https://forcedotcom.github.io/ServiceSDK-Android/releases/knowledge/4.3.6/api/reference/com/salesforce/android/knowledge/core/KnowledgeConfiguration.Builder.html) - [`offlineResourceConfig`](https://developer.salesforce.com/docs/service/service-sdk-android/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-Android/releases/knowledge/4.3.6/api/reference/com/salesforce/android/knowledge/core/KnowledgeConfiguration.Builder.html#offlineResourceConfig(com.salesforce.android.knowledge.core.offline.OfflineResourceConfig)>) - [`KnowledgeCore`](https://forcedotcom.github.io/ServiceSDK-Android/releases/knowledge/4.3.6/api/reference/com/salesforce/android/knowledge/core/KnowledgeCore.html) - [`deleteCache`](https://developer.salesforce.com/docs/service/service-sdk-android/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-Android/releases/knowledge/4.3.6/api/reference/com/salesforce/android/knowledge/core/KnowledgeCore.html#deleteCache(android.content.Context)>) - [`KnowledgeCssProvider`](https://forcedotcom.github.io/ServiceSDK-Android/releases/knowledge/4.3.6/api/reference/com/salesforce/android/knowledge/ui/KnowledgeCssProvider.html) - [`KnowledgeImageProvider`](https://forcedotcom.github.io/ServiceSDK-Android/releases/knowledge/4.3.6/api/reference/com/salesforce/android/knowledge/ui/KnowledgeImageProvider.html) - [`getImageForArticle`](https://developer.salesforce.com/docs/service/service-sdk-android/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-Android/releases/knowledge/4.3.6/api/reference/com/salesforce/android/knowledge/ui/KnowledgeImageProvider.html#getImageForArticle(android.content.Context,%20com.salesforce.android.knowledge.core.model.ArticleSummary)>) - [`getImageForDataCategory`](https://developer.salesforce.com/docs/service/service-sdk-android/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-Android/releases/knowledge/4.3.6/api/reference/com/salesforce/android/knowledge/ui/KnowledgeImageProvider.html#getImageForDataCategory(android.content.Context,%20com.salesforce.android.knowledge.core.model.DataCategorySummary)>) - [`KnowledgeJsProvider`](https://forcedotcom.github.io/ServiceSDK-Android/releases/knowledge/4.3.6/api/reference/com/salesforce/android/knowledge/ui/KnowledgeJsProvider.html) - [`KnowledgeUI`](https://forcedotcom.github.io/ServiceSDK-Android/releases/knowledge/4.3.6/api/reference/com/salesforce/android/knowledge/ui/KnowledgeUI.html) - [`configure`](https://developer.salesforce.com/docs/service/service-sdk-android/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-Android/releases/knowledge/4.3.6/api/reference/com/salesforce/android/knowledge/ui/KnowledgeUI.html#configure(com.salesforce.android.knowledge.ui.KnowledgeUIConfiguration)>) - [`createClient`](https://developer.salesforce.com/docs/service/service-sdk-android/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-Android/releases/knowledge/4.3.6/api/reference/com/salesforce/android/knowledge/ui/KnowledgeUI.html#createClient(android.content.Context)>) - [`KnowledgeUIClient`](https://forcedotcom.github.io/ServiceSDK-Android/releases/knowledge/4.3.6/api/reference/com/salesforce/android/knowledge/ui/KnowledgeUIClient.html) - [`KnowledgeUIClient.OnCloseListener`](https://forcedotcom.github.io/ServiceSDK-Android/releases/knowledge/4.3.6/api/reference/com/salesforce/android/knowledge/ui/KnowledgeUIClient.OnCloseListener.html) - [`launchHome`](https://developer.salesforce.com/docs/service/service-sdk-android/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-Android/releases/knowledge/4.3.6/api/reference/com/salesforce/android/knowledge/ui/KnowledgeUIClient.html#launchHome(android.app.Activity)>) - [`setOnCloseListener`](https://developer.salesforce.com/docs/service/service-sdk-android/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-Android/releases/knowledge/4.3.6/api/reference/com/salesforce/android/knowledge/ui/KnowledgeUIClient.html#setOnCloseListener(com.salesforce.android.knowledge.ui.KnowledgeUIClient.OnCloseListener)>) - [`KnowledgeUIAnalytics`](https://forcedotcom.github.io/ServiceSDK-Android/releases/knowledge/4.3.6/api/reference/com/salesforce/android/knowledge/ui/KnowledgeUIAnalytics.html) - [`KnowledgeUIConfiguration`](https://forcedotcom.github.io/ServiceSDK-Android/releases/knowledge/4.3.6/api/reference/com/salesforce/android/knowledge/ui/KnowledgeUIConfiguration.html) - [`KnowledgeViewAddition`](https://forcedotcom.github.io/ServiceSDK-Android/releases/knowledge/4.3.6/api/reference/com/salesforce/android/knowledge/ui/KnowledgeViewAddition.html) - [`createView`](https://developer.salesforce.com/docs/service/service-sdk-android/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-Android/releases/knowledge/4.3.6/api/reference/com/salesforce/android/knowledge/ui/KnowledgeViewAddition.html#createView(android.view.ViewGroup%2C%20android.content.Context)>) - [`getEnterAnimator`](https://developer.salesforce.com/docs/service/service-sdk-android/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-Android/releases/knowledge/4.3.6/api/reference/com/salesforce/android/knowledge/ui/KnowledgeViewAddition.html#getEnterAnimator(android.view.View)>) - [`getExitAnimator`](https://developer.salesforce.com/docs/service/service-sdk-android/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-Android/releases/knowledge/4.3.6/api/reference/com/salesforce/android/knowledge/ui/KnowledgeViewAddition.html#getExitAnimator(android.view.View)>) - [`initView`](https://developer.salesforce.com/docs/service/service-sdk-android/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-Android/releases/knowledge/4.3.6/api/reference/com/salesforce/android/knowledge/ui/KnowledgeViewAddition.html#initView(android.view.View%2C%20boolean)>) - [`visibleFor`](https://developer.salesforce.com/docs/service/service-sdk-android/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-Android/releases/knowledge/4.3.6/api/reference/com/salesforce/android/knowledge/ui/KnowledgeViewAddition.html#visibleFor(com.salesforce.android.knowledge.ui.KnowledgeScene)>) - [`OfflineResourceConfig`](https://forcedotcom.github.io/ServiceSDK-Android/releases/knowledge/4.3.6/api/reference/com/salesforce/android/knowledge/core/offline/OfflineResourceConfig.html) - [`CaseClient`](https://forcedotcom.github.io/ServiceSDK-Android/releases/case/4.2.7/api/reference/com/salesforce/android/cases/core/CaseClient.html) - [`clearCache`](https://developer.salesforce.com/docs/service/service-sdk-android/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-Android/releases/case/4.2.7/api/reference/com/salesforce/android/cases/core/CaseClient.html#clearCache()>) - [`CaseClientCallbacks`](https://forcedotcom.github.io/ServiceSDK-Android/releases/case/4.2.7/api/reference/com/salesforce/android/cases/core/CaseClientCallbacks.html) - [`getHiddenFields`](https://developer.salesforce.com/docs/service/service-sdk-android/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-Android/releases/case/4.2.7/api/reference/com/salesforce/android/cases/core/CaseClientCallbacks.html#getHiddenFields()>) - [`CaseConfiguration`](https://forcedotcom.github.io/ServiceSDK-Android/releases/case/4.2.7/api/reference/com/salesforce/android/cases/core/CaseConfiguration.html) - [`CaseConfiguration.Builder`](https://forcedotcom.github.io/ServiceSDK-Android/releases/case/4.2.7/api/reference/com/salesforce/android/cases/core/CaseConfiguration.Builder.html) - [`caseListName`](https://developer.salesforce.com/docs/service/service-sdk-android/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-Android/releases/case/4.2.7/api/reference/com/salesforce/android/cases/core/CaseConfiguration.Builder.html#caseListName(java.lang.String)>) - [`enablePush`](https://developer.salesforce.com/docs/service/service-sdk-android/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-Android/releases/case/4.2.7/api/reference/com/salesforce/android/cases/core/CaseConfiguration.Builder.html#enablePush()>) - [`CasesUIAnalytics`](https://forcedotcom.github.io/ServiceSDK-Android/releases/case/4.2.7/api/reference/com/salesforce/android/cases/ui/CasesUIAnalytics.html) - [`CaseUI`](https://forcedotcom.github.io/ServiceSDK-Android/releases/case/4.2.7/api/reference/com/salesforce/android/cases/ui/CaseUI.html) - [`CaseUIClient`](https://forcedotcom.github.io/ServiceSDK-Android/releases/case/4.2.7/api/reference/com/salesforce/android/cases/ui/CaseUIClient.html) - [`getCoreClient`](https://developer.salesforce.com/docs/service/service-sdk-android/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-Android/releases/case/4.2.7/api/reference/com/salesforce/android/cases/ui/CaseUIClient.html#getCoreClient()>) - [`launch`](https://developer.salesforce.com/docs/service/service-sdk-android/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-Android/releases/case/4.2.7/api/reference/com/salesforce/android/cases/ui/CaseUIClient.html#launch(android.content.Context)>) - [`launchCaseList`](https://developer.salesforce.com/docs/service/service-sdk-android/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-Android/releases/case/4.2.7/api/reference/com/salesforce/android/cases/ui/CaseUIClient.html#launchCaseList(android.content.Context)>) - [`launchCasePublisher`](https://developer.salesforce.com/docs/service/service-sdk-android/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-Android/releases/case/4.2.7/api/reference/com/salesforce/android/cases/ui/CaseUIClient.html#launchCasePublisher(android.content.Context)>) - [`CaseUIConfiguration`](https://forcedotcom.github.io/ServiceSDK-Android/releases/case/4.2.7/api/reference/com/salesforce/android/cases/ui/CaseUIConfiguration.html) - [`AudioStats`](https://forcedotcom.github.io/ServiceSDK-Android/releases/sos/4.0.9/api/reference/com/salesforce/android/sos/api/AudioStats.html) - [`AutoCompleteTextView`](https://forcedotcom.github.io/ServiceSDK-Android/releases/sos/4.0.9/api/reference/com/salesforce/android/sos/maskview/AutoCompleteTextView.html) - [`EditText`](https://forcedotcom.github.io/ServiceSDK-Android/releases/sos/4.0.9/api/reference/com/salesforce/android/sos/maskview/EditText.html) - [`SosAvailability`](https://forcedotcom.github.io/ServiceSDK-Android/releases/sos/4.0.9/api/reference/com/salesforce/android/sos/api/SosAvailability.html) - [`SosAvailability.Listener`](https://forcedotcom.github.io/ServiceSDK-Android/releases/sos/4.0.9/api/reference/com/salesforce/android/sos/api/SosAvailability.Listener.html) - [`SosAVListener`](https://forcedotcom.github.io/ServiceSDK-Android/releases/sos/4.0.9/api/reference/com/salesforce/android/sos/api/SosAVListener.html) - [`SosMaskedField`](https://forcedotcom.github.io/ServiceSDK-Android/releases/sos/4.0.9/api/reference/com/salesforce/android/sos/maskview/SosMaskedField.html) - [`setMask`](https://developer.salesforce.com/docs/service/service-sdk-android/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-Android/releases/sos/4.0.9/api/reference/com/salesforce/android/sos/maskview/SosMaskedField.html#setMask(android.graphics.drawable.Drawable)>) - [`showMask`](https://developer.salesforce.com/docs/service/service-sdk-android/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-Android/releases/sos/4.0.9/api/reference/com/salesforce/android/sos/maskview/SosMaskedField.html#showMask(boolean)>) - [`useFocusMasking`](https://developer.salesforce.com/docs/service/service-sdk-android/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-Android/releases/sos/4.0.9/api/reference/com/salesforce/android/sos/maskview/SosMaskedField.html#useFocusMasking(boolean)>) - [`MultiAutoCompleteTextView`](https://forcedotcom.github.io/ServiceSDK-Android/releases/sos/4.0.9/api/reference/com/salesforce/android/sos/maskview/MultiAutoCompleteTextView.html) - [`Sos`](https://forcedotcom.github.io/ServiceSDK-Android/releases/sos/4.0.9/api/reference/com/salesforce/android/sos/api/Sos.html) - [`hideKeyboard`](https://developer.salesforce.com/docs/service/service-sdk-android/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-Android/releases/sos/4.0.9/api/reference/com/salesforce/android/sos/api/Sos.html#hideKeyboard()>) - [`getHoldState`](https://developer.salesforce.com/docs/service/service-sdk-android/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-Android/releases/sos/4.0.9/api/reference/com/salesforce/android/sos/api/Sos.html#getHoldState()>) - [`getState`](https://developer.salesforce.com/docs/service/service-sdk-android/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-Android/releases/sos/4.0.9/api/reference/com/salesforce/android/sos/api/Sos.html#getState()>) - [`Sos.SessionBuilder`](https://forcedotcom.github.io/ServiceSDK-Android/releases/sos/4.0.9/api/reference/com/salesforce/android/sos/api/Sos.SessionBuilder.html) - [`start`](https://developer.salesforce.com/docs/service/service-sdk-android/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-Android/releases/sos/4.0.9/api/reference/com/salesforce/android/sos/api/Sos.SessionBuilder.html#start(android.app.Activity)>) - [`showKeyboard`](https://developer.salesforce.com/docs/service/service-sdk-android/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-Android/releases/sos/4.0.9/api/reference/com/salesforce/android/sos/api/Sos.html#showKeyboard(android.graphics.Rect)>) - [`SosConfiguration`](https://forcedotcom.github.io/ServiceSDK-Android/releases/sos/4.0.9/api/reference/com/salesforce/android/sos/api/SosConfiguration.html) - [`SosConfiguration.Builder`](https://forcedotcom.github.io/ServiceSDK-Android/releases/sos/4.0.9/api/reference/com/salesforce/android/sos/api/SosConfiguration.Builder.html) - [`connectingUi`](https://developer.salesforce.com/docs/service/service-sdk-android/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-Android/releases/sos/4.0.9/api/reference/com/salesforce/android/sos/api/SosConfiguration.Builder.html#connectingUi(boolean)>) - [`disableToasts`](https://developer.salesforce.com/docs/service/service-sdk-android/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-Android/releases/sos/4.0.9/api/reference/com/salesforce/android/sos/api/SosConfiguration.Builder.html#disableToasts(java.util.EnumSet%3Ccom.salesforce.android.sos.api.SosToast%3E)>) - [`SosConnectionListener`](https://forcedotcom.github.io/ServiceSDK-Android/releases/sos/4.0.9/api/reference/com/salesforce/android/sos/api/SosConnectionListener.html) - [`SosHoldListener`](https://forcedotcom.github.io/ServiceSDK-Android/releases/sos/4.0.9/api/reference/com/salesforce/android/sos/api/SosHoldListener.html) - [`SosListener`](https://forcedotcom.github.io/ServiceSDK-Android/releases/sos/4.0.9/api/reference/com/salesforce/android/sos/api/SosListener.html) - [`SosMaskingListener`](https://forcedotcom.github.io/ServiceSDK-Android/releases/sos/4.0.9/api/reference/com/salesforce/android/sos/api/SosMaskingListener.html) - [`SosNetworkStatsListener`](https://forcedotcom.github.io/ServiceSDK-Android/releases/sos/4.0.9/api/reference/com/salesforce/android/sos/api/SosNetworkStatsListener.html) - [`SosNetworkTestListener`](https://forcedotcom.github.io/ServiceSDK-Android/releases/sos/4.0.9/api/reference/com/salesforce/android/sos/api/SosNetworkTestListener.html) - [`SosOptions`](https://forcedotcom.github.io/ServiceSDK-Android/releases/sos/4.0.9/api/reference/com/salesforce/android/sos/api/SosOptions.html) - [`SosShareTypeListener`](https://forcedotcom.github.io/ServiceSDK-Android/releases/sos/4.0.9/api/reference/com/salesforce/android/sos/api/SosShareTypeListener.html) - [`SosState`](https://forcedotcom.github.io/ServiceSDK-Android/releases/sos/4.0.9/api/reference/com/salesforce/android/sos/api/SosState.html) - [`SosToast`](https://forcedotcom.github.io/ServiceSDK-Android/releases/sos/4.0.9/api/reference/com/salesforce/android/sos/api/SosToast.html) - [`TextView`](https://forcedotcom.github.io/ServiceSDK-Android/releases/sos/4.0.9/api/reference/com/salesforce/android/sos/maskview/TextView.html) - [`VideoStats`](https://forcedotcom.github.io/ServiceSDK-Android/releases/sos/4.0.9/api/reference/com/salesforce/android/sos/api/VideoStats.html) - [`View`](https://forcedotcom.github.io/ServiceSDK-Android/releases/sos/4.0.9/api/reference/com/salesforce/android/sos/maskview/View.html) - [Knowledge String Resources](https://forcedotcom.github.io/ServiceSDK-Android/releases/knowledge/4.3.4/api/reference/doc-files/resource_overrides.html#Strings) - [Case Management String Resources](https://forcedotcom.github.io/ServiceSDK-Android/releases/case/4.2.4/api/reference/doc-files/resource_overrides.html#Strings) - [SOS String Resources](https://forcedotcom.github.io/ServiceSDK-Android/releases/sos/4.0.9/api/reference/doc-files/resource_overrides.html#Strings) # Reference Index A list of all classes, protocols, methods, constants, and enums referenced from this developer's guide. **important:** 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](https://help.salesforce.com/s/articleView?id=service.miaw_intro_landing.htm&type=5) before that date. Messaging offers many of the [chat features](https://help.salesforce.com/s/articleView?id=service.miaw_chat_vs_messaging.htm&type=5) that you love plus asynchronous conversations that can be picked back up at any time. Learn about chat retirement in [Help](https://help.salesforce.com/s/articleView?id=001790618&type=1). ## Chat Index - [`SCSChat`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSChat.html) - [`add(delegate:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSChat.html#/c:objc(cs)SCSChat(im)addDelegate:>) - [`addEvent(delegate:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSChat.html#/c:objc(cs)SCSChat(im)addEventDelegate:>) - [`determineAvailabilityWithConfiguration`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSChat.html#/c:objc(cs)SCSChat(im)determineAvailabilityWithConfiguration:completion:>) - [`startSession(with:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSChat.html#/c:objc(cs)SCSChat(im)startSessionWithConfiguration:>) - [`startSession(with:completion:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSChat.html#/c:objc(cs)SCSChat(im)startSessionWithConfiguration:completion:>) - [`SCSChatInterface`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSChatInterface.html) - [`handle(notification:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSChatInterface.html#/c:objc(cs)SCSChatInterface(im)handleNotification:>) - [`showChat(with:showPrechat:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSChatInterface.html#/c:objc(cs)SCSChatInterface(im)showChatWithConfiguration:showPrechat:>) - [`showPrechat(withFields:modal:completion:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSChatInterface.html#/c:objc(cs)SCSChatInterface(im)showPrechatWithFields:modal:completion:>) - [`shouldDisplayNotificationInForeground`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSChatInterface.html#/c:objc(cs)SCSChatInterface(im)shouldDisplayNotificationInForeground>) - [`SCSChatInterfaceDelegate`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSChatInterfaceDelegate.html) - [`SCSChatConfiguration`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSChatConfiguration.html) - [`maximumEstimatedWaitTime`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSChatConfiguration.html#/c:objc(cs)SCSChatConfiguration(py)maximumEstimatedWaitTime>) - [`minimumEstimatedWaitTime`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSChatConfiguration.html#/c:objc(cs)SCSChatConfiguration(py)minimumEstimatedWaitTime>) - [`prechatEntities`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSChatConfiguration.html#/c:objc(cs)SCSChatConfiguration(py)prechatEntities>) - [`prechatFields`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSChatConfiguration.html#/c:objc(cs)SCSChatConfiguration(py)prechatFields>) - [`queueStyle`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSChatConfiguration.html#/c:objc(cs)SCSChatConfiguration(py)queueStyle>) - [`SCSChatEventDelegate`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSChatEventDelegate.html) - [`session(agentJoined:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSChatEventDelegate.html#/c:objc(pl)SCSChatEventDelegate(im)session:agentJoined:>) - [`session(agentLeftConference:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSChatEventDelegate.html#/c:objc(pl)SCSChatEventDelegate(im)session:agentLeftConference:>) - [`session(didReceiveChatBotMenu:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSChatEventDelegate.html#/c:objc(pl)SCSChatEventDelegate(im)session:didReceiveChatBotMenu:>) - [`session(didReceiveFileTransferRequest:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSChatEventDelegate.html#/c:objc(pl)SCSChatEventDelegate(im)session:didReceiveFileTransferRequest:>) - [`session(didReceiveMessage:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSChatEventDelegate.html#/c:objc(pl)SCSChatEventDelegate(im)session:didReceiveMessage:>) - [`session(didReceiveURL:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSChatEventDelegate.html#/c:objc(pl)SCSChatEventDelegate(im)session:didReceiveURL:>) - [`session(didSelectMenuItem:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSChatEventDelegate.html#/c:objc(pl)SCSChatEventDelegate(im)session:didSelectMenuItem:>) - [`session(didUpdateOutgoingMessageDeliveryStatus:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSChatEventDelegate.html#/c:objc(pl)SCSChatEventDelegate(im)session:didUpdateOutgoingMessageDeliveryStatus:>) - [`session(processedOutgoingMessage:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSChatEventDelegate.html#/c:objc(pl)SCSChatEventDelegate(im)session:processedOutgoingMessage:>) - [`SCSChatSessionDelegate`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSChatSessionDelegate.html) - [`session(didEnd:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSChatSessionDelegate.html#/c:objc(pl)SCSChatSessionDelegate(im)session:didEnd:>) - [`session(didError:fatal:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSChatSessionDelegate.html#/c:objc(pl)SCSChatSessionDelegate(im)session:didError:fatal:>) - [`session(didUpdateQueuePosition:estimatedWaitTime:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSChatSessionDelegate.html#/c:objc(pl)SCSChatSessionDelegate(im)session:didUpdateQueuePosition:estimatedWaitTime:>) - [`session(didTransitionFrom:to:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSChatSessionDelegate.html#/c:objc(pl)SCSChatSessionDelegate(im)session:didTransitionFromState:toState:>) - [`SCSChatEndReason`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Enums/SCSChatEndReason.html) - [`SCSChatErrorCode`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Enums/SCSChatErrorCode.html) - [`SCSChatSession`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSChatSession.html) - [`SCSChatSessionState`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Enums/SCSChatSessionState.html) - [`SCSPrechatEntity`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSPrechatEntity.html) - [`SCSPrechatEntityField`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSPrechatEntityField.html) - [`SCSPrechatObject`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSPrechatObject.html) - [`SCSPrechatPickerObject`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSPrechatPickerObject.html) - [`SCSPrechatPickerOption`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSPrechatPickerOption.html) - [`SCSPrechatTextInputObject`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSPrechatTextInputObject.html) ## Service Common Index - [`SCAppearanceConfiguration`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCAppearanceConfiguration.html) - [`globalArticleCSS`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCAppearanceConfiguration.html#/c:objc(cs)SCAppearanceConfiguration(py)globalArticleCSS>) - [`globalArticleJavascript`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCAppearanceConfiguration.html#/c:objc(cs)SCAppearanceConfiguration(py)globalArticleJavascript>) - [`setColor`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCAppearanceConfiguration.html#/c:objc(cs)SCAppearanceConfiguration(im)setColor:forName:>) - [`setFontDescriptor`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCAppearanceConfiguration.html#/c:objc(cs)SCAppearanceConfiguration(im)setFontDescriptor:fontFileName:forWeight:>) - [`setImage`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCAppearanceConfiguration.html#/c:objc(cs)SCAppearanceConfiguration(im)setImage:compatibleWithTraitCollection:forName:>) - [`SCAppearanceConfigurationDelegate`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCAppearanceConfigurationDelegate.html) - [`SCSAppEventList`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSAppEventList.html) - [`SCSActionButton`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSActionButton.html) - [`SCSActionItem`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSActionItem.html) - [`SCSActionItemContainer`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSActionItemContainer.html) - [`SCSActionManager`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSActionManager.html) - [`SCSActionManagerDelegate`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSActionManagerDelegate.html) - [`SCSAuthenticationSettings`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSAuthenticationSettings.html) - [`ServiceCloud`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCServiceCloud.html) - [`actions`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCServiceCloud.html#/c:objc(cs)SCServiceCloud(py)actions>) - [`appearanceConfiguration`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCServiceCloud.html#/c:objc(cs)SCServiceCloud(py)appearanceConfiguration>) - [`cases`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCServiceCloud.html#/c:objc(cs)SCServiceCloud(py)cases>) - [`chatCore`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCServiceCloud.html#/c:objc(cs)SCServiceCloud(py)chatCore>) - [`chatUI`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCServiceCloud.html#/c:objc(cs)SCServiceCloud(py)chatUI>) - [`knowledge`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCServiceCloud.html#/c:objc(cs)SCServiceCloud(py)knowledge>) - [`notification(fromRemoteNotificationDictionary:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCServiceCloud.html#/c:objc(cs)SCServiceCloud(im)notificationFromRemoteNotificationDictionary:>) - [`setAuthenticationSettings(settings:forServiceType:completion:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCServiceCloud.html#/c:objc(cs)SCServiceCloud(im)setAuthenticationSettings:forServiceType:completion:>) - [`sharedInstance`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCServiceCloud.html#/c:objc(cs)SCServiceCloud(cm)sharedInstance>) - [`showInterface(for:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCServiceCloud.html#/c:objc(cs)SCServiceCloud(im)showInterfaceForNotification:>) - [`sos`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCServiceCloud.html#/c:objc(cs)SCServiceCloud(py)sos>) - [`SCServiceCloudDelegate`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCServiceCloudDelegate.html) - [`serviceCloud(didDisplay controller:animated:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCServiceCloudDelegate.html#/c:objc(pl)SCServiceCloudDelegate(im)serviceCloud:didDisplayViewController:animated:>) - [`serviceCloud(authenticationFailed:forServiceType:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCServiceCloudDelegate.html#/c:objc(pl)SCServiceCloudDelegate(im)serviceCloud:authenticationFailed:forServiceType:>) - [`serviceCloud(shouldAuthenticateServiceType:completion:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCServiceCloudDelegate.html#/c:objc(pl)SCServiceCloudDelegate(im)serviceCloud:shouldAuthenticateServiceType:completion:>) - [`serviceCloud(transitioningDelegateForPresentedController:presenting:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCServiceCloudDelegate.html#/c:objc(pl)SCServiceCloudDelegate(im)serviceCloud:transitioningDelegateForViewController:>) - [`serviceCloud(willDisplay controller:animated:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCServiceCloudDelegate.html#/c:objc(pl)SCServiceCloudDelegate(im)serviceCloud:willDisplayViewController:animated:>) - [`SCSServiceConfiguration`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSServiceConfiguration.html) - [`imageFolderPath`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSServiceConfiguration.html#/c:objc(cs)SCSServiceConfiguration(py)imageFolderPath>) - [`SCSServiceConfiguration(community:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSServiceConfiguration.html#/c:objc(cs)SCSServiceConfiguration(im)initWithCommunity:>) - [`SCSServiceConfiguration(community:dataCategoryGroup:rootDataCategory:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSServiceConfiguration.html#/c:objc(cs)SCSServiceConfiguration(im)initWithCommunity:dataCategoryGroup:rootDataCategory:>) - [`SCSNotification`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSNotification.html) - [`SCSNotificationType`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Enums/SCSNotificationType.html) - [`ServiceLogger`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCServiceLogger.html) - [`filehandle`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCServiceLogger.html#/c:objc(cs)SCServiceLogger(py)filehandle>) - [`level`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCServiceLogger.html#/c:objc(cs)SCServiceLogger(py)level>) - [`shared`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCServiceLogger.html#/c:objc(cs)SCServiceLogger(cpy)sharedLogger>) ## Resource Files - [ServiceChat (Chat) String Resources](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/servicechatstringconstants.html) - [ServiceCore (Common) String Resources](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/servicecorestringconstants.html) ## Deprecated APIs - [`SCArticleSortByField`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Enums/SCArticleSortByField.html) - [`SCArticleSortOrder`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Enums/SCArticleSortOrder.html) - [`SCKnowledgeInterface`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCKnowledgeInterface.html) - [`setInterfaceVisible`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCKnowledgeInterface.html#/c:objc(cs)SCKnowledgeInterface(im)setInterfaceVisible:animated:completion:>) - [`showArticle`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCKnowledgeInterface.html#/c:objc(cs)SCKnowledgeInterface(im)showArticle:animated:completion:>) - [`SCKnowledgeInterfaceDelegate`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCKnowledgeInterfaceDelegate.html) - [`SCQueryMethod`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Enums/SCQueryMethod.html) - [`Article`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSArticle.html) - [`downloadContent(withOptions:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSArticle.html#/c:objc(cs)SCSArticle(im)downloadContentWithOptions:completion:>) - [`isArticleContentDownloaded`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSArticle.html#/c:objc(cs)SCSArticle(im)isArticleContentDownloaded>) - [`isAssociatedContentDownloaded`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSArticle.html#/c:objc(cs)SCSArticle(im)isAssociatedContentDownloaded>) - [`SCSArticleQuery`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSArticleQuery.html) - [`valid`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSArticleQuery.html#/c:objc(cs)SCSArticleQuery(py)valid>) - [`SCSArticleQueryListViewController`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSArticleQueryListViewController.html) - [`SCSArticleQueryListViewControllerDelegate`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSArticleQueryListViewControllerDelegate.html) - [`SCSArticleViewController`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSArticleViewController.html) - [`article`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSArticleViewController.html#/c:objc(cs)SCSArticleViewController(py)article>) - [`SCSArticleViewControllerDelegate`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSArticleViewControllerDelegate.html) - [`additionalCSSForArticle`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSArticleViewControllerDelegate.html#/c:objc(pl)SCSArticleViewControllerDelegate(im)articleController:additionalCSSForArticle:>) - [`additionalJavascriptForArticle`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSArticleViewControllerDelegate.html#/c:objc(pl)SCSArticleViewControllerDelegate(im)articleController:additionalJavascriptForArticle:>) - [`Category`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSCategory.html) - [`CategoryGroup`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSCategoryGroup.html) - [`SCSCategoryViewController`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSCategoryViewController.html) - [`SCSCategoryViewControllerDelegate`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSCategoryViewControllerDelegate.html) - [`SCSKnowledgeHomeViewController`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSKnowledgeHomeViewController.html) - [`SCSKnowledgeHomeViewControllerDelegate`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSKnowledgeHomeViewControllerDelegate.html) - [`KnowledgeManager`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSKnowledgeManager.html) - [`articles(matching:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSKnowledgeManager.html#/c:objc(cs)SCSKnowledgeManager(im)articlesMatchingQuery:completion:>) - [`defaultManager`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSKnowledgeManager.html#/c:objc(cs)SCSKnowledgeManager(cpy)defaultManager>) - [`fetchAllCategories`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSKnowledgeManager.html#/c:objc(cs)SCSKnowledgeManager(im)fetchAllCategoriesWithCompletionHandler:>) - [`fetchArticles(with:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSKnowledgeManager.html#/c:objc(cs)SCSKnowledgeManager(im)fetchArticlesWithQuery:completion:>) - [`hasFetchedCategories`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSKnowledgeManager.html#/c:objc(cs)SCSKnowledgeManager(im)hasFetchedCategories>) - [`MutableArticleQuery`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSMutableArticleQuery.html) - [`SCCaseInterface`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCCaseInterface.html) - [`caseCreateActionName`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCCaseInterface.html#/c:objc(cs)SCCaseInterface(py)caseCreateActionName>) - [`setInterfaceVisible`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCCaseInterface.html#/c:objc(cs)SCCaseInterface(im)setInterfaceVisible:animated:completion:>) - [`SCSCaseDetailViewController`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSCaseDetailViewController.html) - [`SCSCaseDetailViewControllerDelegate`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSCaseDetailViewControllerDelegate.html) - [`caseDetail(fieldsToHideFromCaseFields:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSCaseDetailViewControllerDelegate.html#/c:objc(pl)SCSCaseDetailViewControllerDelegate(im)caseDetail:fieldsToHideFromCaseFields:>) - [`SCSCaseListViewController`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSCaseListViewController.html) - [`SCSCaseListViewControllerDelegate`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSCaseListViewControllerDelegate.html) - [`caseList(selectedCaseWithId:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSCaseListViewControllerDelegate.html#/c:objc(pl)SCSCaseListViewControllerDelegate(im)caseList:selectedCaseWithId:>) - [`SCSCasePublisherViewController`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SCSCasePublisherViewController.html) - [`SCSCasePublisherViewControllerDelegate`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSCasePublisherViewControllerDelegate.html) - [`casePublisher(fieldsForCaseDeflection:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSCasePublisherViewControllerDelegate.html#/c:objc(pl)SCSCasePublisherViewControllerDelegate(im)casePublisher:fieldsForCaseDeflection:>) - [`casePublisher(fieldsToHideFromCaseFields:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSCasePublisherViewControllerDelegate.html#/c:objc(pl)SCSCasePublisherViewControllerDelegate(im)casePublisher:fieldsToHideFromCaseFields:>) - [`casePublisher(valuesForHiddenFields:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSCasePublisherViewControllerDelegate.html#/c:objc(pl)SCSCasePublisherViewControllerDelegate(im)casePublisher:valuesForHiddenFields:>) - [`casePublisher(viewFor:withCaseId:error:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSCasePublisherViewControllerDelegate.html#/c:objc(pl)SCSCasePublisherViewControllerDelegate(im)casePublisher:viewForResult:withCaseId:error:>) - [`shouldEnableCaseDeflection(forPublisher:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SCSCasePublisherViewControllerDelegate.html#/c:objc(pl)SCSCasePublisherViewControllerDelegate(im)shouldEnableCaseDeflectionForPublisher:>) - [`SOSAgentAvailability`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SOSAgentAvailability.html) - [`startPolling(withOrganizationId:deploymentId:liveAgentPod:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SOSAgentAvailability.html#/c:objc(cs)SOSAgentAvailability(im)startPollingWithOrganizationId:deploymentId:liveAgentPod:>) - [`SOSAgentAvailabilityDelegate`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SOSAgentAvailabilityDelegate.html) - [`SOSAgentAvailabilityStatusType`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Enums/SOSAgentAvailabilityStatusType.html) - [`SOSCameraType`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Enums/SOSCameraType.html) - [`SOSConnectingBaseViewController`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SOSConnectingBaseViewController.html) - [`SOSConnectingViewController`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SOSConnectingViewController.html) - [`SOSDelegate`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SOSDelegate.html) - [`sosDidStart`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SOSDelegate.html#/c:objc(pl)SOSDelegate(im)sosDidStart:>) - [`sosDidConnect`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SOSDelegate.html#/c:objc(pl)SOSDelegate(im)sosDidConnect:>) - [`sosWillReconnect`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SOSDelegate.html#/c:objc(pl)SOSDelegate(im)sosWillReconnect:>) - [`sos(didCreateSession:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SOSDelegate.html#/c:objc(pl)SOSDelegate(im)sos:didCreateSession:>) - [`sos(didError:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SOSDelegate.html#/c:objc(pl)SOSDelegate(im)sos:didError:>) - [`sos(didStopWith:error:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SOSDelegate.html#/c:objc(pl)SOSDelegate(im)sos:didStopWithReason:error:>) - [`sos(stateDidChange:current:previous:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SOSDelegate.html#/c:objc(pl)SOSDelegate(im)sos:stateDidChange:previous:>) - [`SOSErrorCode`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Enums/SOSErrorCode.html) - [`SOSMaskedTextField`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SOSMaskedTextField.html) - [`SOSNetworkReporterDelegate`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SOSNetworkReporterDelegate.html) - [`SOSOnboardingBaseViewController`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SOSOnboardingBaseViewController.html) - [`SOSOnboardingViewController`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SOSOnboardingViewController.html) - [`SOSOptions`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SOSOptions.html) - [`customFieldData`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SOSOptions.html#/c:objc(cs)SOSOptions(py)customFieldData>) - [`featureAgentVideoStreamEnabled`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SOSOptions.html#/c:objc(cs)SOSOptions(py)featureAgentVideoStreamEnabled>) - [`featureClientBackCameraEnabled`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SOSOptions.html#/c:objc(cs)SOSOptions(py)featureClientBackCameraEnabled>) - [`featureClientFrontCameraEnabled`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SOSOptions.html#/c:objc(cs)SOSOptions(py)featureClientFrontCameraEnabled>) - [`featureClientScreenSharingEnabled`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SOSOptions.html#/c:objc(cs)SOSOptions(py)featureClientScreenSharingEnabled>) - [`featureNetworkTestEnabled`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SOSOptions.html#/c:objc(cs)SOSOptions(py)featureNetworkTestEnabled>) - [`initialAgentStreamPosition`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SOSOptions.html#/c:objc(cs)SOSOptions(py)initialAgentStreamPosition>) - [`initialAgentVideoStreamActive`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SOSOptions.html#/c:objc(cs)SOSOptions(py)initialAgentVideoStreamActive>) - [`initialCameraType`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SOSOptions.html#/c:objc(cs)SOSOptions(py)initialCameraType>) - [`remoteLoggingEnabled`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SOSOptions.html#/c:objc(cs)SOSOptions(py)remoteLoggingEnabled>) - [`sessionRetryTime`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SOSOptions.html#/c:objc(cs)SOSOptions(py)sessionRetryTime>) - [`setViewControllerClass`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SOSOptions.html#/c:objc(cs)SOSOptions(im)setViewControllerClass:for:>) - [`SOSOptions(liveAgentPod:orgId:deploymentId:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SOSOptions.html#/c:objc(cs)SOSOptions(cm)optionsWithLiveAgentPod:orgId:deploymentId:>) - [`SOSSessionBaseViewController`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SOSSessionBaseViewController.html) - [`SOSSessionViewController`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SOSSessionViewController.html) - [`SOSScreenSharingBaseViewController`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SOSScreenSharingBaseViewController.html) - [`SOSSessionManager`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SOSSessionManager.html) - [`add(delegate: SOSDelegate!)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SOSSessionManager.html#/c:objc(cs)SOSSessionManager(im)addDelegate:>) - [`screenSharing`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SOSSessionManager.html#/c:objc(cs)SOSSessionManager(py)screenSharing>) - [`startSession`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SOSSessionManager.html#/c:objc(cs)SOSSessionManager(im)startSessionWithOptions:>) - [`state`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SOSSessionManager.html#/c:objc(cs)SOSSessionManager(py)state>) - [`stopSession`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SOSSessionManager.html#/c:objc(cs)SOSSessionManager(im)stopSession>) - [`stopSession(completion:)`](https://developer.salesforce.com/docs/service/service-sdk-ios/guide/%3Chttps://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Classes/SOSSessionManager.html#/c:objc(cs)SOSSessionManager(im)stopSessionWithCompletion:>) - [`SOSSessionState`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Enums/SOSSessionState.html) - [`SOSStopReason`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Enums/SOSStopReason.html) - [`SOSUIAgentStreamReceivable`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SOSUIAgentStreamReceivable.html) - [`SOSUILineDrawingReceivable`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Protocols/SOSUILineDrawingReceivable.html) - [`SOSUIPhase`](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/Enums/SOSUIPhase.html) - [ServiceKnowledge (Knowledge) String Resources](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/serviceknowledgestringconstants.html) - [ServiceCases (Case Management) String Resources](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/servicecasesstringconstants.html) - [ServiceSOS (SOS) String Resources](https://forcedotcom.github.io/ServiceSDK-iOS/releases/api/234.1/servicesosstringconstants.html) # refreshNavigationItem() for Lightning Experience Refreshes the selected navigation object's home page. Typically, standard and custom objects open the object's list view. If split view is open, it's refreshed. This method works only in Lightning console apps. This method refreshes in the background. If the list view has unsaved changes, the method returns false and doesn’t refresh the navigation item. The method doesn’t set focus on the navigation tab. The following navigation items aren’t supported: - Custom Visualforce tabs - Custom Aura component tabs - Custom web tabs - Dashboards - Reports ## Arguments None ## LWC Sample Code This example reloads the current navigation item's home page, such as an object's list view, or its split view. ## Aura Components Sample Code This Aura component has a button that, when pressed, refreshes the navigation item. Component code: ```html ``` Controller code: ```javascript ({ refreshNavigationItem : function(component, event, helper) { var navigationItemAPI = component.find("navigationItemAPI"); navigationItemAPI.refreshNavigationItem().then(function(response) { console.log(response); }) .catch(function(error) { console.log(error); }); } }) ``` ## Response This method returns a promise that, upon success, resolves to `true`. The promise is rejected on error. # refreshNavigationTab() Refreshes the selected navigation tab. This method is only available in API version 31.0 or later. ## Syntax ```javascript sforce.console.refreshNavigationTab((optional)callback:Function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`callback`|function|JavaScript method that’s called upon completion of the method.| ## Sample Code–Visualforce ```apex_page ``` ## Response This method is asynchronous, so it returns its response in an object in a callback method. The response object contains the following field: |Name|Type|Description| |----|----|-----------| |`success`|boolean|`true` if refreshing the navigation tab was successful, `false` otherwise.| # refreshObject() for Salesforce Classic ## Usage Notifies a page that uses a feed-based layout, that fields, the feed, or related list data has changed, and forces an update of these on the page. Use this method with Visualforce pages you want to use as custom publishers in Case Feed. ## Syntax ```javascript sforce.interaction.entityFeed.refreshObject( objectId:string, refreshFields:boolean, refreshRelatedLists:boolean, refreshFeed:boolean,callback:function) ``` ## Arguments |Name|Type|Description| |------|------|-------------| |`objectId`|string|The record ID of the case object.| |`refreshFields`|boolean|Indicates that one or more fields on the case have changed.| |`refreshRelatedLists`|boolean|Indicates that one or more case-related lists have changed.| |`refreshFeed`|boolean|Indicates that the case feed has changed.| |`callback`|function|JavaScript method executed when the API method call is completed.| ## Sample Code–JavaScript ```javascript Refresh Case ``` ## Response This method is asynchronous. The response is returned in an object passed to a callback method. The response object contains the following fields. |Name|Type|Description| |------|------|-------------| |`result`|boolean|`true` if the Case Feed page was successfully updated, `false` if it was not.| # refreshPage() for Salesforce Classic ## Usage Returns `true` if page refresh is invoked, `false` otherwise. When this method is called within the Salesforce console, it refreshes the current active tab. This method is only available in API version 28.0 or later. ## Syntax ```javascript sforce.interaction.refreshPage(callback:function); ``` ## Arguments |Name|Type|Description| |------|------|-------------| |`callback`|function|JavaScript method executed when the API method call is completed.| ## Sample Code–JavaScript ```javascript ``` ## Response |Name|Type|Description| |------|------|-------------| |`result`|boolean|Returns `true` if page refresh has been invoked, `false` otherwise.| |`error`|string|If the API call was successful, this variable is undefined. If the API call failed, this variable returns an error message.| # refreshPrimaryTabById() Refreshes a primary tab specified by ID, including its subtabs. This method can't refresh subtabs with URLs to external pages or Visualforce pages. This method is only available in API version 22.0 or later. ## Syntax ```javascript sforce.console.refreshPrimaryTabById(ID:String, ACTIVATE:Boolean, (optional)CALLBACK:Function, (optional)FULL_REFRESH:Boolean) ``` Where `ID`, `ACTIVATE`, `CALLBACK`, and `FULL_REFRESH` are variables. ## Arguments |Name|Type|Description| |----|----|-----------| |`id`|string|ID of the primary tab to refresh.| |`activate`|boolean|If `true`, the refreshed primary tab displays immediately. If `false`, the refreshed primary tab displays in the background.| |`callback`|function|JavaScript method that’s called upon completion of the method.| |`fullRefresh`|boolean|Enables a full refresh of the entire case feed.| ## Sample Code–Visualforce ```apex_page Click here to refresh a primary tab by id ``` **note:** To see this example in action, click the custom link on a case. For more information, see [Define Custom Buttons and Links](https://help.salesforce.com/s/articleView?id=defining_custom_links.htm) in Salesforce Help. ## Response This method is asynchronous, so it returns its response in an object in a callback method. The response object contains the following field: |Name|Type|Description| |----|----|-----------| |`success`|boolean|`true` if the primary tab refreshed successfully; `false` if the primary tab didn't refresh.| # refreshPrimaryTabByName() Refreshes a primary tab specified by name, including its subtabs. This method can't refresh subtabs with URLs to external pages or Visualforce pages. This method is only available in API version 22.0 or later. ## Syntax ```javascript sforce.console.refreshPrimaryTabByName(NAME:String, ACTIVE:Boolean, (optional)CALLBACK:Function), (optional)FULL_REFRESH:Boolean) ``` Where `NAME`, `ACTIVE`, `CALLBACK`, and `FULL_REFRESH` are variables. ## Arguments |Name|Type|Description| |----|----|-----------| |`name`|string|Name of the primary tab to refresh.| |`active`|boolean|If `true`, the refreshed primary tab displays immediately. If `false`, the refreshed primary tab displays in the background.| |`callback`|function|JavaScript method that’s called upon completion of the method.| |`fullRefresh`|boolean|Enables a full refresh of the entire case feed.| ## Sample Code–Visualforce ```apex_page Click here to refresh a primary tab by name ``` **note:** To see this example in action, click the custom link on a case. For more information, see [Define Custom Buttons and Links](https://help.salesforce.com/s/articleView?id=defining_custom_links.htm) in Salesforce Help. ## Response This method is asynchronous, so it returns its response in an object in a callback method. The response object contains the following field: |Name|Type|Description| |----|----|-----------| |`success`|boolean|`true` if the primary tab refreshed successfully; `false` if the primary tab didn't refresh.| # refreshRelatedList() for Salesforce Classic ## Usage Returns `true` if the related list with the given `listName` is refreshed, `false` otherwise. When this method is called within the Salesforce console, only the related list with the given list name in the currently focused view will be refreshed. This method is only available in API version 28.0 or later. ## Syntax ```javascript sforce.interaction.refreshRelatedList(listName:string, callback:function) ``` ## Arguments |Name|Type|Description| |------|------|-------------| |`listName`|string|The name of the related list to refresh. For example, Contact for Contacts related list or Activity for Open Activities related list.Note that to refresh a custom related list created from a custom lookup field, `listName` must specify the ID of the custom lookup field.| |`callback`|function|JavaScript method executed when the API method call is completed.| ## Sample Code–JavaScript ```javascript ``` ## Response |Name|Type|Description| |------|------|-------------| |`result`|boolean|Returns `true` if the related list with the given name is refreshed, `false` otherwise.| |`error`|string|If the API call was successful, this variable is undefined. If the API call failed, this variable returns an error message.| ## Notes - This method cannot refresh related lists created from ``. - This method cannot refresh a related list from an overridden Visualforce page in the Salesforce console. - If called from within the Salesforce console, this method will only search for the related list to refresh in the currently focused view. # refreshSubtabById() Refreshes a subtab with the last known URL with a specified ID. This method can't refresh a subtab if the last known URL is an external page or a Visualforce page. This method is only available in API version 22.0 or later. ## Syntax ```javascript sforce.console.refreshSubtabById(ID:String, ACTIVATE:Boolean, (optional)CALLBACK:Function, (optional)FULL_REFRESH:Boolean) ``` Where `ID`, `ACTIVATE`, `CALLBACK`, and `FULL_REFRESH` are variables. ## Arguments |Name|Type|Description| |----|----|-----------| |`id`|string|ID of the subtab to refresh.| |`activate`|boolean|If `true`, the refreshed subtab displays immediately. If `false`, the refreshed subtab displays in the background.| |`callback`|function|JavaScript method that’s called upon completion of the method.| |`fullRefresh`|boolean|Enables a full refresh of the entire case feed.| ## Sample Code–Visualforce ```apex_page Click here to refresh a subtab by id ``` **note:** To see this example in action, click the custom link on a case. For more information, see [Define Custom Buttons and Links](https://help.salesforce.com/s/articleView?id=defining_custom_links.htm) in Salesforce Help. ## Response This method is asynchronous, so it returns its response in an object in a callback method. The response object contains the following field: |Name|Type|Description| |----|----|-----------| |`success`|boolean|`true` if the subtab refreshed successfully; `false` if the subtab didn't refresh.| # refreshSubtabByNameAndPrimaryTabId() Refreshes a subtab with the last known URL with the specified name and primary tab ID. This method can't refresh a subtab if the last known URL is an external page or a Visualforce page. This method is only available in API version 22.0 or later. ## Syntax ```javascript sforce.console.refreshSubtabByNameAndPrimaryTabId(NAME:String, PRIMARY_TAB_ID:String, ACTIVE:Boolean, (optional)CALLBACK:Function, (optional)FULL_REFRESH:Boolean) ``` Where `NAME`, `PRIMARY_TAB_ID`, `ACTIVE`, `CALLBACK`, and `FULL_REFRESH` are variables. ## Arguments |Name|Type|Description| |----|----|-----------| |`name`|string|Name of the subtab to refresh.| |`primaryTabId`|string|ID of the primary tab in which the subtab opened.| |`active`|boolean|If `true`, the refreshed subtab displays immediately. If `false`, the refreshed subtab displays in the background.| |`callback`|function|JavaScript method that’s called upon completion of the method.| |`fullRefresh`|boolean|Enables a full refresh of the entire case feed.| ## Sample Code–Visualforce ```apex_page Click here to refresh a subtab by name and primary tab ID ``` **note:** To see this example in action, click the custom link on a case. For more information, see [Define Custom Buttons and Links](https://help.salesforce.com/s/articleView?id=defining_custom_links.htm) in Salesforce Help. ## Response This method is asynchronous, so it returns its response in an object in a callback method. The response object contains the following field: |Name|Type|Description| |----|----|-----------| |`success`|boolean|`true` if the subtab refreshed successfully; `false` if the subtab didn't refresh.| # refreshSubtabByNameAndPrimaryTabName() Refreshes a subtab with the last known URL with the specified name and primary tab name. This method can't refresh a subtab if the last known URL is an external page or a Visualforce page. This method is only available in API version 22.0 or later. ## Syntax ```javascript sforce.console.refreshSubtabByNameAndPrimaryTabName(NAME:String, PRIMARY_TAB_NAME:String, ACTIVE:Boolean, (optional)CALLBACK:Function, (optional)FULL_REFRESH:Boolean) ``` Where `NAME`, `PRIMARY_TAB_NAME`, `ACTIVE`, `CALLBACK`, and `FULL_REFRESH` are variables. ## Arguments |Name|Type|Description| |----|----|-----------| |`name`|string|Name of the subtab to refresh.| |`primaryTabName`|string|Name of the primary tab in which the subtab opened.| |`active`|boolean|If `true`, the refreshed subtab displays immediately. If `false`, the refreshed subtab displays in the background.| |`callback`|function|JavaScript method that’s called upon completion of the method.| |`fullRefresh`|boolean|Enables a full refresh of the entire case feed.| ## Sample Code–Visualforce ```apex_page Click here to refresh a subtab by name and primary tab name ``` **note:** To see this example in action, click the custom link on a case. For more information, see [Define Custom Buttons and Links](https://help.salesforce.com/s/articleView?id=defining_custom_links.htm) in Salesforce Help. ## Response This method is asynchronous, so it returns its response in an object in a callback method. The response object contains the following field: |Name|Type|Description| |----|----|-----------| |`success`|boolean|`true` if the subtab refreshed successfully; `false` if the subtab didn't refresh.| # refreshTab() for Lightning Experience Refreshes a workspace tab or a subtab specified by `tabId`. Keep in mind that the first subtab has the same `tabId` as the workspace tab. This method works only in Lightning console apps. If this method is invoked for a workspace tab with unsaved changes, a confirmation window opens for the user. - Continue editing: Changes are preserved and the tab or workspace isn’t refreshed. - Discard changes: Changes are discarded and the tab or workspace is refreshed. - Save: Changes are saved and then the tab or workspace is refreshed. ## Arguments The method provides the same argument for both Aura Components and Lightning Web Components (LWC). |Name|Type|Description| |----|----|-----------| |`tabId`|string|ID of the workspace tab or subtab to refresh.| |`includeAllSubtabs`|boolean|Optional. If the `tabId` corresponds to a workspace tab, all subtabs within that workspace are refreshed. The default is true. Keep in mind that the first subtab has the same `tabId` as the workspace tab.| ## LWC Sample Code This component checks if it’s in a Lightning console app, returns information about the focused tab and refreshes it. When the [getFocusedTabInfo()](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-lightning-getfocusedtabinfo.md) method resolves successfully, it returns the `tabInfo` object. The `const { tabId }` syntax destructures the `tabInfo` object and binds the `tabInfo.tabId` value on the `tabId` variable. `refreshTab()` uses this `tabId` value to refresh the tab and its subtabs. ```javascript import { LightningElement, wire } from 'lwc'; import { IsConsoleNavigation, getFocusedTabInfo, refreshTab } from 'lightning/platformWorkspaceApi'; export default class WorkspaceAPIRefreshTab extends LightningElement { @wire(IsConsoleNavigation) isConsoleNavigation; async refreshTab() { if (!this.isConsoleNavigation) { return; } const { tabId } = await getFocusedTabInfo(); await refreshTab(tabId, { includeAllSubtabs: true }); } } ``` This example is the [workspaceAPIRefreshTab](https://github.com/trailheadapps/lwc-recipes/tree/main/force-app/main/default/lwc/workspaceAPIRefreshTab) component from the [lwc-recipes repo](https://github.com/trailheadapps/lwc-recipes/tree/main/force-app/main/default/lwc). To make your component available for use in a Lightning console app, specify the `lightning__AppPage` target in the [component’s configuration file](https://developer.salesforce.com/docs/platform/lwc/guide/use-config-for-console-app.html). ## Aura Components Sample Code This component has a button that, when pressed, refreshes the focused workspace tab and all its open subtabs. Component code: ```html ``` Controller code: ```javascript ({ refreshFocusedTab : function(component, event, helper) { var workspaceAPI = component.find("workspace"); workspaceAPI.getFocusedTabInfo().then(function(response) { var focusedTabId = response.tabId; workspaceAPI.refreshTab({ tabId: focusedTabId, includeAllSubtabs: true }); }) .catch(function(error) { console.log(error); }); } }) ``` ## Response This method returns a promise that, upon success, resolves to `true`. If there was an error, the promise is rejected. **note:** `true` doesn’t necessarily mean that the refresh was successful. For example, if the tab has unsaved changes when this method was called, the user has a choice to save or discard their changes. The refresh is canceled depending on user’s choice. # refreshView() for Lightning Experience ## Usage Returns `true` if view refresh is invoked, `false` otherwise. When this method is called within the Salesforce console, it refreshes the current active view. If any related lists are included in this tab, they’re refreshed too. This method is available in API version 38.0 or later. ## Syntax ```javascript sforce.opencti.refreshView({ callback:FUNCTION }); ``` ## Arguments |Name|Type|Description| |------|------|-------------| |`callback`|function|Optional. JavaScript method executed when the API method call is completed.| ## Sample Code–HTML and JavaScript without a callback ```html ``` ## Sample Code–HTML and JavaScript with a callback ```html ``` ## Response This method is asynchronous. The response is returned in an object passed to a callback method. The response object contains the following fields. |Name|Type|Description| |------|------|-------------| |`success`|boolean|Returns `true` if the API method call was invoked successfully, `false` otherwise.| |`returnValue`|object|This API method doesn’t return this object. The `returnValue` is always `null`.| |`errors`|array|If the API call was successful, this variable is `null`. If the API call failed, this variable returns an array of [error messages](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-error-messages-lightning.md).| # Register Capabilities Registers the capabilities that a messaging channel supports, including structured content message types and their format types, as well as progress indicators. Include a format type field restriction, if needed. After a partner registers message format types, an admin [sets up interactive messaging components](https://help.salesforce.com/s/articleView?id=service.messaging_components_parent.htm) for their Messaging channel as needed. If a partner has registered the capability and an admin has set up the messaging component, a rep can send a message to a Messaging end user with the supported structured content format type. A Messaging end user can also select an option for an inbound response. Certain format types, like rich links for link previews, don’t require that an admin set up a messaging component. Partners should register capabilities for an integration at regular intervals, such as weekly or daily. This API applies to the following products: - Bring Your Own Channel for Messaging - Bring Your Own Channel for Contact Center as a Service - Bring Your Own Bot (BYOB) This API is available in version 61.0 and later. ## URI v1/capabilities ## HTTP Method PATCH ## Headers ### Authorization (User-Level Authentication) **Format:** `Bearer ` String. Standard header. Used to authenticate the user, where `` is the Salesforce access token used as the bearer token to make requests to the Interaction Service APIs. Required. ### Content-Type **Format:** `application/json` String. Standard header. Format of the request payload. Required for any request that includes a body. ### OrgId **Format:** `` String. Custom header. The Salesforce org. `` is the 15-character Org ID of the Salesforce org. Required. ### RequestId **Format:** `` String. Custom header. Universally Unique Identifier (``) that references and tracks this request. Required. ### AuthorizationContext **Format:** `` String. Custom header. Additional information for the request authorization used to authenticate and validate requests against the connected app scopes. - For Bring Your Own Channel for CCaaS, set `` to the developer name of the ConversationChannelDefinition record. For example, Partner1_ChannelDefinition1. Required. - For Bring Your Own Channel for Messaging, set `` to the developer name of the ConversationChannelDefinition record. For example, Partner1_ChannelDefinition1. Required. ### AuthorizationContextType **Format:** `` String. Custom header. Specifies the type of context for the request. - For Bring Your Own Channel for CCaaS, set `` to **ConversationChannelDefinition**. - For Bring Your Own Channel for Messaging, set `` to **ConversationChannelDefinition**. - For Bring Your Own Bot (BYOB), set `` to **ExternalConversationParticipant**. If not set, this header defaults to **ConversationChannelDefinition**. ### Sample Header ``` -H $'Authorization: Bearer 00DSG000009SWby!...LN8XxeRIxGe' \ -H "content-type: application/json" \ -H "OrgId: 00DSG000009SWby" \ -H "AuthorizationContext: Partner1_ChannelDefinition1" \ -H "AuthorizationContextType: ConversationChannelDefinition" \ -H "RequestId: a1b23c45-c06a-4784-c96c-cb95d3321bda" \ ``` ## Parameters | Property Name | Type | Description | Required | | :------------------------------------------------------- | :----- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :------- | | capabilities | object | An object that defines the various capabilities of the application. | Yes | | appType | string | The app type for which the capabilities are being registered. Set this value to **custom** to represent a custom channel. | Yes | | channelCapabilities | array | A list of the capabilities and restrictions for the requested app’s channels. | Yes | | channelCapabilities.channelType | array | The channel type. Set this value to **custom** to represent a custom channel. | No | | channelCapabilities.customIntegration | object | Specifies the custom integration type, integration namespace, and conversation channel definition or external conversation participant integration definition to register capabilities for.
`customIntegrationType` specifies the type of custom integration. Set this value to **CustomChannelIntegration** for Bring Your Own Channel for Messaging or Bring Your Own Channel for CCaaS, or **CustomBotIntegration** for Bring Your Own Bot (BYOB).
`integrationNamespace` specifies the namespace or orgId. Partners producing an integration, use the integration’s Namespace value. Customers who are self-implementing, use the OrgId value.
`conversationChannelDefinitionDevName` specifies the developer name of the Conversation Channel Definition. Required for Bring Your Own Channel.
`extConvParticipantIntegDefDevName` specifies the developer name of the `ExtConvParticipantIntegDef` record. Required for Bring Your Own Bot (BYOB). | Yes | | channelCapabilities.messageTypeCapabilities | array | A list of the message type and format type capabilities and any field restrictions. | Yes | | messageTypeCapabilities.messageType | string | Specifies a list of supported message types. See [Message Types](#message-types) for valid values and their descriptions. | Yes | | messageTypeCapabilities.formatTypeCapabilities | array | Specifies a list of format types that are supported for a message type. | Yes | | formatTypeCapabilities.formatType | string | Specifies the name of the format type to register for the message type. See [Format Types](#format-types) for valid values and their descriptions for each supported message type. | Yes | | formatTypeCapabilities.fieldRestrictions | array | Specifies a list of restrictions on the fields on the message format type. To set a restriction, include `restriction` with `fieldRestrictionType`. See [Field Restriction Types](#field-restriction-types) for valid values and details for each `fieldRestrictionType`. Also include `fieldJsonPath`, a pointer to a field in the message JSON to which the restriction is applied. This value supports the Root (\$) and child (.) operators only. For example, `$.some.field`, `$.some.array`, `$.some.array.field`. | No | | progressIndicatorTypeCapabilities | array | A list of progress indicator capabilities for the integration. Not supported for Bring Your Own Bot (BYOB). | No | | progressIndicatorTypeCapabilities.progressIndicatorType | string | Specifies the type of progress indicator. Set this value to **ProgressUpdateIndicator**. Not supported for Bring Your Own Bot (BYOB). | No | | progressIndicatorTypeCapabilities.formatTypeCapabilities | array | Lists the format types supported for the progress indicator capability. Set `formatType` to **Text**. Not supported for Bring Your Own Bot (BYOB). | No | ## Message Types | Message Type (messageType) | Description | | :------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | StaticContentMessage | A message containing static content. | | ChoicesMessage | A message with some choices from which the recipient can choose. This API doesn't cause CRM changes, such as creating and updating records, but sometimes results in conversation routing in bots. | | ChoicesResponseMessage | A message with the selected choices as a response to a Choices message. | | FormMessage | A message with a form containing multiple single or multiselect choices that a recipient can choose from. | | FormResponseMessage | A message with the form selection as a response to a Form message. The message results in a record being created or updated in the CRM database. | ## Format Types This table lists all supported message types and their possible format types. | Message Type (messageType) | Format Type (formatType) | Description | | :------------------------- | :----------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | StaticContentMessage | Text | Plain text. The Text format is the default format for messaging components, and is used if the formats added to the component aren’t available or supported in a channel. | | StaticContentMessage | RichLink | A rich link containing additional metadata like an inline image or video. | | StaticContentMessage | Links | A URL in a string format. | | StaticContentMessage | Attachments | Attachments stored in the CRM. Sent with MT messages. Can have optional text. | | StaticContentMessage | Media | A link name and image. | | StaticContentMessage | WebView | Web page sent. | | StaticContentMessage | Application | A link to an external application or iOS extension. | | StaticContentMessage | ExperienceType | Rich, interactive UI components with full formatting. Handles dynamic, structured data and supports interactive UI elements. Supports ESTypes. | | ChoicesMessage | Buttons | A text with buttons with a title. The buttons can be postbacks. | | ChoicesMessage | Carousel | A set of items that can include images, text, and buttons. The buttons can be postbacks. | | ChoicesMessage | MessageDefinition | Reference and use existing messaging components by their ID or developer name. | | ChoicesMessage | QuickReplies | An optional text with buttons that has titles and/or images. All buttons are postbacks. | | ChoicesMessage | ListPicker | A clickable text prompt that leads to a vertical list of up to 10 clickable options. | | ChoicesMessage | TimePicker | A prompt with a list of open time slots. | | ChoicesResponseMessage | Selections | Selections of options from choices or forms. Always set for choice and form response. | | FormMessage | Inputs | Sends a form from the rep side. | | FormMessage | Flow | Rich, customizable fields to guide customers through a structured business interaction in a form. | | FormMessage | MessageDefinition | Reference and use existing messaging components by their ID or developer name. | | FormResponseMessage | Result | The end user’s responses to the form sent from the rep. | ## Field Restriction Types For sample field restriction payloads, see [Register a Capability with a Field Restriction](#register-a-capability-with-a-field-restriction). | Field Restriction Type Value | Type | Description | | :--------------------------- | :----- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | StringFieldRestriction | object | Specifies the `encoding` and `maxLength` for a string restriction on a message field. `encoding` is the character encoding to use when evaluating the string. Valid values are `UTF8`, `GSM`, `UCS2`. `maxLength` is the character length maximum for the field, in int64. | | MimeTypeRestriction | object | Specifies the `mimeType` for a mime type restriction on a message field. | | FileSizeRestriction | object | Specifies the `maxSizeInKb` to limit the maximum file size in kilobytes for a messaging field, in int64. | | DimensionRestriction | object | Specifies the `x`, `y`, and `dimensionType` information to set dimension restrictions for the message field. `x` specifies x dimension limits for the media. `y` specifies y dimension limits for the media. `dimensionType` indicates how the dimension field is interpreted. Valid values are `PIXEL` or `RATIO`. | | ArrayRestriction | object | Specifies the `maxItems` to limit the maximum number of items in the array for a message field, in int64. | | RequiredFieldRestriction | object | Specifies `fieldRequired`, a boolean value that notes whether a flag is required for a message field. | | TypeRestriction | object | Specifies the `type` restriction as a string for a message field. | ## Sample Register Capabilites API Payloads Use the Register Capabilities API to register capabilities for more than one channel, message type, or format type at a time. Or register a message type with a format type along with a progress indicator capability. You can also set restrictions on fields while registering capabilities. ### Register Multiple Channel Capabilities You can register channel capabilities for more than one channel at a time. ```json { "capabilities": { "appType": "Custom", "channelCapabilities": [ { "channelType": "Custom", "customIntegration": { "customIntegrationType": "CustomChannelIntegration", "integrationNamespace": "", "conversationChannelDefinitionDevName": "" }, "messageTypeCapabilities": [ { "messageType": "StaticContentMessage", "formatTypeCapabilities": [ { "formatType": "Text" } ] } ] }, { "channelType": "Custom", "customIntegration": { "customIntegrationType": "CustomChannelIntegration", "integrationNamespace": "", "conversationChannelDefinitionDevName": "" }, "messageTypeCapabilities": [ { "messageType": "StaticContentMessage", "formatTypeCapabilities": [ { "formatType": "Text" } ] } ] } ] } } ``` ### Register Multiple Message Types You can register more than one message type at a time. ```json { "capabilities": { "appType": "Custom", "channelCapabilities": [ { "channelType": "Custom", "customIntegration": { "customIntegrationType": "CustomChannelIntegration", "integrationNamespace": "", "conversationChannelDefinitionDevName": "" }, "messageTypeCapabilities": [ { "messageType": "StaticContentMessage", "formatTypeCapabilities": [ { "formatType": "Text" } ] }, { "messageType": "ChoicesMessage", "formatTypeCapabilities": [ { "formatType": "Buttons" } ] } ] } ] } } ``` ### Register Multiple Format Types You can register more than one format type at the same time. ```json { "capabilities": { "appType": "Custom", "channelCapabilities": [ { "channelType": "Custom", "customIntegration": { "customIntegrationType": "CustomChannelIntegration", "integrationNamespace": "", "conversationChannelDefinitionDevName": "" }, "messageTypeCapabilities": [ { "messageType": "StaticContentMessage", "formatTypeCapabilities": [ { "formatType": "Text" }, { "formatType": "RichLink" } ] } ] } ] } } ``` ### Register a Single Message and Format Type If preferred, you can register a single message type and format type for a channel at a time. ```json { "capabilities": { "appType": "Custom", "channelCapabilities": [ { "channelType": "Custom", "customIntegration": { "customIntegrationType": "CustomChannelIntegration", "integrationNamespace": "", "conversationChannelDefinitionDevName": "" }, "messageTypeCapabilities": [ { "messageType": "StaticContentMessage", "formatTypeCapabilities": [ { "formatType": "Text" } ] } ] } ] } } ``` ### Register a Message Type, Format Type, and Progress Indicator Type You can add registration for progress indicators for AI agents to a payload that registers a messaging type and its format type. ```json { "capabilities": { "appType" : "Custom", "channelCapabilities" : [{ "channelType" : "Custom", "customIntegration": { "customIntegrationType": "CustomChannelIntegration", "integrationNamespace": "", "conversationChannelDefinitionDevName": "" }, "messageTypeCapabilities": [{ "messageType": "StaticContentMessage", "formatTypeCapabilities": [{ "formatType": "Text" }] }], "progressIndicatorTypeCapabilities": [{ "progressIndicatorType": "ProgressUpdateIndicator", "formatTypeCapabilities": [{ "formatType": "Text" }] }] }] } } ``` ### Register a Capability with a Field Restriction You can set field restrictions for arrays, strings, mime type, file size, dimension, whether a field is required, or type. ```json { "capabilities": { "appType" : "custom", "channelCapabilities" : [{ "channelType" : "custom", "customIntegration": { "customIntegrationType": "CustomChannelIntegration", "integrationNamespace": "00Dxx0000006GuB", "conversationChannelDefinitionDevName": "CCaaSDot_ChannelDefinition1" }, "messageTypeCapabilities": [{ "messageType": "StaticContentMessage", "formatTypeCapabilities": [{ "formatType": "Text", "capabilityFieldRestriction": [{ "fieldJsonPath": "$.staticContent.text", "restriction":{ "fieldRestrictionType": "ArrayRestriction", "maxItems": 9 } }] }] }] }] } } ``` ```json { "capabilities": { "appType": "custom", "channelCapabilities": [{ "channelType": "custom", "customIntegration": { "customIntegrationType": "CustomChannelIntegration", "integrationNamespace": "sdb6byo", "conversationChannelDefinitionDevName": "BYOCC_Channel_Definition" }, "messageTypeCapabilities": [{ "messageType": "StaticContentMessage", "formatTypeCapabilities": [{ "formatType": "Text", "capabilityFieldRestriction": [{ "fieldJsonPath": "$.staticContent.text", "restriction": { "fieldRestrictionType": "StringFieldRestriction", "encoding": "UTF8", "maxLength": 10 } }] }] }] }] } } ``` ```json { "capabilities": { "appType": "custom", "channelCapabilities": [ { "channelType": "custom", "customIntegration": { "customIntegrationType": "CustomChannelIntegration", "integrationNamespace": "sdb6byo", "conversationChannelDefinitionDevName": "BYOCC_Channel_Definition" }, "messageTypeCapabilities": [{ "messageType": "StaticContentMessage", "formatTypeCapabilities": [{ "formatType": "Attachments", "capabilityFieldRestriction": [{ "fieldJsonPath": "$.staticContent.attachments.mimeType", "restriction": { "fieldRestrictionType": "MimeTypeRestriction", "mimeType": "image/png" } }] }] }] }] } } ``` ```json { "capabilities": { "appType": "custom", "channelCapabilities": [ { "channelType": "custom", "customIntegration": { "customIntegrationType": "CustomChannelIntegration", "integrationNamespace": "sdb6byo", "conversationChannelDefinitionDevName": "BYOCC_Channel_Definition" }, "messageTypeCapabilities": [{ "messageType": "StaticContentMessage", "formatTypeCapabilities": [{ "formatType": "Attachments", "capabilityFieldRestriction": [{ "fieldJsonPath": "$.staticContent.attachments", "restriction": { "fieldRestrictionType": "FileSizeRestriction", "maxSizeInKb": 1000 } }] }] }] }] } } ``` ```json { "capabilities": { "appType": "custom", "channelCapabilities": [ { "channelType": "custom", "customIntegration": { "customIntegrationType": "CustomChannelIntegration", "integrationNamespace": "sdb6byo", "conversationChannelDefinitionDevName": "BYOCC_Channel_Definition" }, "messageTypeCapabilities": [{ "messageType": "StaticContentMessage", "formatTypeCapabilities": [{ "formatType": "Attachments", "capabilityFieldRestriction": [{ "fieldJsonPath": "$.staticContent.attachments", "restriction": { "fieldRestrictionType": "DimensionRestriction", "dimensionType": "PIXEL", "x": 0.1, "y": 0.1 } }] }] }] }] } } ``` ```json { "capabilities": { "appType": "custom", "channelCapabilities": [{ "channelType": "custom", "customIntegration": { "customIntegrationType": "CustomChannelIntegration", "integrationNamespace": "sdb6byo", "conversationChannelDefinitionDevName": "BYOCC_Channel_Definition" }, "messageTypeCapabilities": [{ "messageType": "StaticContentMessage", "formatTypeCapabilities": [{ "formatType": "RichLink", "capabilityFieldRestriction": [{ "fieldJsonPath": "$.staticContent.image", "restriction": { "fieldRestrictionType": "RequiredFieldRestriction", "fieldRequired": false } }] }] }] }] } } ``` ```json { "capabilities": { "appType": "custom", "channelCapabilities": [ { "channelType": "custom", "customIntegration": { "customIntegrationType": "CustomChannelIntegration", "integrationNamespace": "", "conversationChannelDefinitionDevName": "" }, "messageTypeCapabilities": [ { "messageType": "StaticContentMessage", "formatTypeCapabilities": [ { "formatType": "Text", "capabilityFieldRestriction": [ { "fieldJsonPath": "$.staticContent.text", "restriction": { "fieldRestrictionType": "TypeRestriction", "type": "string" } }, { "fieldJsonPath": "$.staticContent.metadata", "restriction": { "fieldRestrictionType": "TypeRestriction", "type": "object" } } ] }, { "formatType": "Attachments", "capabilityFieldRestriction": [ { "fieldJsonPath": "$.staticContent.attachments", "restriction": { "fieldRestrictionType": "TypeRestriction", "type": "array" } } ] } ] }, { "messageType": "FormMessage", "formatTypeCapabilities": [ { "formatType": "Inputs", "capabilityFieldRestriction": [ { "fieldJsonPath": "$.form.inputs", "restriction": { "fieldRestrictionType": "TypeRestriction", "type": "array" } } ] } ] } ] } ] } } ``` ## Sample Bring Your Own Bot Register Capabilities API Payloads ### Register Bring Your Own Bot Capabilities For Bring Your Own Bot (BYOB), register the capabilities that the bot integration supports. Set `customIntegrationType` to `CustomBotIntegration` and use the `extConvParticipantIntegDefDevName` field (instead of `conversationChannelDefinitionDevName`) to identify the `ExtConvParticipantIntegDef` record. The BYOB flow typically registers `StaticContentMessage`, `ChoicesResponseMessage`, and `FormResponseMessage` capabilities. Progress indicators (`progressIndicatorTypeCapabilities`) aren’t supported for BYOB; omit this field from BYOB payloads. ```json { "capabilities": { "appType": "custom", "channelCapabilities": [ { "channelType": "custom", "customIntegration": { "customIntegrationType": "CustomBotIntegration", "integrationNamespace": "", "extConvParticipantIntegDefDevName": "" }, "messageTypeCapabilities": [ { "messageType": "StaticContentMessage", "formatTypeCapabilities": [ {} ] }, { "messageType": "ChoicesResponseMessage", "formatTypeCapabilities": [ { "formatType": "Selections" } ] }, { "messageType": "FormResponseMessage", "formatTypeCapabilities": [ { "formatType": "Result" } ] } ] } ] } } ``` # Registered On Represents the Registered On relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. ## Relationship Type Definition ||| |-|-| |Developer Name|`SD_ReOn`| |Description|Defines the Registered On relationship between configuration items in the CMDB.| |Master Label|Registered On| |Direct Relationship|Registered On| |Inverse Relationship|Has Registered| |Line Stroke|Solid| |Color Code|`#669900`| # RelatedRecord Represents the link between a ConversationEntry record and another record, such as a VoiceCall record, or a MessagingSession record, or another ConversationEntry record. RelatedRecord is an off-platform object. ## Fields | Field | Details | | :--------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | conversation_entity_id | **Type**
Reference

**Description**
The ID of the conversation entry.

**Relationship Type**
Lookup

**Refer To**
Conversation | | record_id | **Type**
Reference

**Description**
The ID of the record that links this conversation entry to the other record, such as a VoiceCall record, a MessagingSession record, or another ConversationEntry record.

**Relationship Type**
Lookup

**Refer To**
ConversationEntry, MessagingSession, VoiceCall | | created_at | **Type**
DateTime

**Description**
The date and time when the record was created. | | org_id | **Type**
Text

**Description**
The Salesforce Org ID associated with the record. | ## See Also - [Off-Platform Messaging Objects](https://developer.salesforce.com/docs/service/messaging-object-model/references/mob-reference2/messaging-object-model-off-platform-schemas.md) - [ConversationEntry Schema (Off Platform)](/messaging-object-model/references/messaging-object-model-conversationEntry) - _Object Reference for the Salesforce Platform_: [VoiceCall](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_voicecall.htm) - _Object Reference for the Salesforce Platform_: [MessagingSession](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_messagingsession.htm) # Release Represents a release for service management operations, such as incidents, problems, and change requests. A release is a period during which new or updated service operations are deployed. This object is available in API version 65.0 and later. ## Supported Calls `create()`, `describeLayout()`, `describeSObjects()`, `getDeleted()`, `getUpdated()`, `query()`, `retrieve()`, `search()`, `update()`, `upsert()` ## Fields ### ActualDuration - **Type**: double - **Properties**: Filter, Nillable, Sort - **Description**: The actual duration for a release in days, calculated as the difference between the actual end date and the actual start date. ### ActualEndDate - **Type**: dateTime - **Properties**: Create, Filter, Nillable, Sort, Update - **Description**: The actual date and time on which a release ended. ### ActualStartDate - **Type**: dateTime - **Properties**: Create, Filter, Nillable, Sort, Update - **Description**: The actual date and time on which a release started. ### ClosingSummary - **Type**: textarea - **Properties**: Create, Nillable, Update - **Description**: The closing summary for each release state and includes relevant comments regarding the release state. ### DeploymentDate - **Type**: dateTime - **Properties**: Create, Filter, Nillable, Sort, Update - **Description**: The deployment date of a release. Defaults to the planned end date if no deployment date is specified. ### Description - **Type**: textarea - **Properties**: Create, Nillable, Update - **Description**: The description of a release. ### LastReferencedDate - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: The timestamp when the current user last accessed this record, a record related to this record, or a list view. ### LastViewedDate - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: The timestamp when the current user last viewed this record or list view. ### Name - **Type**: string - **Properties**: Create, Filter, Group, idLookup, Sort, Update - **Description**: The name of a release. ### OwnerId - **Type**: reference - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: ID of the user who owns the record. This field is a polymorphic relationship field. - **Relationship Name**: Owner - **Refers To**: Group, User ### PlannedDuration - **Type**: double - **Properties**: Filter, Nillable, Sort - **Description**: The planned duration for a release in days, calculated as the difference between the planned end date and the planned start date. ### PlannedEndDate - **Type**: dateTime - **Properties**: Create, Filter, Sort, Update - **Description**: The date and time on which a release is planned to end. ### PlannedStartDate - **Type**: dateTime - **Properties**: Create, Filter, Sort, Update - **Description**: The date and time on which a release is planned to start. ### Priority - **Type**: picklist - **Properties**: Create, Filter, Group, Sort, Update - **Description**: Specifies the urgency of a release, such as critical, high, moderate, and low. Values are `Critical`, `High`, `Low`, or `Moderate`. ### ReleaseOwnerId - **Type**: reference - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The group or user who owns a release. This field is a polymorphic relationship field. - **Relationship Name**: ReleaseOwner - **Refers To**: Group, User ### RequestedById - **Type**: reference - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The user who created or requested the release. This field is a relationship field. - **Relationship Name**: RequestedBy - **Refers To**: User ### RiskLevel - **Type**: picklist - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: Specifies the risk level of a release, such as low, medium, and high, which are represented as green, amber, and red, respectively. Values are `High`, `Low`, or `Medium`. ### Status - **Type**: picklist - **Properties**: Create, Filter, Group, Sort, Update - **Description**: Specifies the current status of a release. - **Possible values**: - `Canceled` - `Closed` - `Completed` - `In Progress` - `New` - `Rolled Back` ### Type - **Type**: picklist - **Properties**: Create, Filter, Group, Sort, Update - **Description**: Specifies the type of a release, such as major, minor, or an upgrade. - **Possible values**: - `Emergency` - `Major` - `Minor` - `Others` - `Patch` - `Upgrade` ### UsageType - **Type**: picklist - **Properties**: Create, Filter, Group, Restricted picklist, Sort, Update - **Description**: The usage type for the release. Values are `ServiceManagement`—Service Management. # Release Notes Check out the new features and known issues for the Android Service Chat SDK . **important:** 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](https://help.salesforce.com/s/articleView?id=service.miaw_intro_landing.htm&type=5) before that date. Messaging offers many of the [chat features](https://help.salesforce.com/s/articleView?id=service.miaw_chat_vs_messaging.htm&type=5) that you love plus asynchronous conversations that can be picked back up at any time. Learn about chat retirement in [Help](https://help.salesforce.com/s/articleView?id=001790618&type=1). To review the latest releases for the Service Chat SDK for Android, visit [github.com/forcedotcom/ServiceSDK-Android/releases](https://github.com/forcedotcom/ServiceSDK-Android/releases). # Release Notes Check out the new features and known issues for the iOS Service Chat SDK. **important:** 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](https://help.salesforce.com/s/articleView?id=service.miaw_intro_landing.htm&type=5) before that date. Messaging offers many of the [chat features](https://help.salesforce.com/s/articleView?id=service.miaw_chat_vs_messaging.htm&type=5) that you love plus asynchronous conversations that can be picked back up at any time. Learn about chat retirement in [Help](https://help.salesforce.com/s/articleView?id=001790618&type=1). To review the latest releases for the Service Chat SDK for iOS, visit [github.com/forcedotcom/ServiceSDK-iOS/releases](https://github.com/forcedotcom/ServiceSDK-iOS/releases). # ReleaseMgmtSettings Represents the settings for enabling Release Management features of IT Service Management. ## Parent Type and Manifest Access This type extends the Metadata metadata type and inherits its fullName field. In the package manifest, all the settings metadata types for the org are accessed using the "Settings" name. ## File Suffix and Directory Location ReleaseMgmtSettings values are stored in the ReleaseMgmtSettings.settings file in the settings folder. The .settings files are different from other named components, because there is only one settings file for each settings component. ## Version ReleaseMgmtSettings components are available in API version 64.0 and later. ## Fields ### enableITSMReleaseMgmt - **Type**: boolean - **Description**: Indicates whether the Release Management feature of IT Service Management is enabled (`true`) or disabled (`false`) for your org. - **Default value**: `false` ### enableReleaseEventCreation - **Type**: boolean - **Description**: Indicates whether the Release Management Event Creation feature is enabled (`true`) or disabled (`false`) for your org. - **Default value**: `false` ## Declarative Metadata Sample Definition The following is an example of a ReleaseMgmtSettings component. ```xml true false ``` The following is an example `package.xml` that references the previous definition. ```xml ReleaseMgmt Settings 64.0 ``` ## Wildcard Support in the Manifest File The wildcard character `*` (asterisk) in the package.xml manifest file doesn't apply to metadata types for feature settings. The wildcard applies only when retrieving all settings, not for an individual setting. # ReleaseParticipant Represents the relationship between a release and a user or group who participates in a release, such as an owner or a manager. This object is available in API version 65.0 and later. ## Supported Calls `create()`, `delete()`, `describeSObjects()`, `getDeleted()`, `getUpdated()`, `query()`, `retrieve()`, `undelete()`, `update()`, `upsert()` ## Fields ### AssignedToId - **Type**: reference - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The user or group assigned to participate in a release. This field is a polymorphic relationship field. - **Relationship Name**: AssignedTo - **Refers To**: Group, User ### Name - **Type**: string - **Properties**: Autonumber, Defaulted on create, Filter, idLookup, Sort - **Description**: The name of the record. ### OwnerId - **Type**: reference - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: ID of the user who owns the record. This field is a polymorphic relationship field. - **Relationship Name**: Owner - **Refers To**: Group, User ### ReleaseId - **Type**: reference - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The release to which the participant is associated. This field is a relationship field. - **Relationship Name**: Release - **Refers To**: Release ### Role - **Type**: picklist - **Properties**: Create, Filter, Group, Restricted picklist, Sort, Update - **Description**: Specifies the role of a user or a group in a release, such as an owner or a manager. Values are `Member` or `Owner`. # ReleaseRelatedRecord Represents the relationship between a release and a record, such as incident, problem, or change request. This object is available in API version 65.0 and later. ## Supported Calls `create()`, `delete()`, `describeSObjects()`, `getDeleted()`, `getUpdated()`, `query()`, `retrieve()`, `undelete()`, `update()`, `upsert()` ## Fields ### Name - **Type**: string - **Properties**: Autonumber, Defaulted on create, Filter, idLookup, Sort - **Description**: The name of the record. ### OwnerId - **Type**: reference - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: ID of the user who owns the record. This field is a polymorphic relationship field. - **Relationship Name**: Owner - **Refers To**: Group, User ### RelatedRecordId - **Type**: reference - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The issue associated with a release, which can be an incident, problem, or change request. This field is a polymorphic relationship field. - **Relationship Name**: RelatedRecord - **Refers To**: ChangeRequest, Incident, Problem, Release ### RelationshipType - **Type**: picklist - **Properties**: Create, Filter, Group, Restricted picklist, Sort, Update - **Description**: Specifies whether the Incident, Problem, or Change (IPC) is related to a release as a source or created after the release is created. - **Possible values**: - `linked_to_release`—Linked to Release - `source_of_release`—Source of Release ### ReleaseId - **Type**: reference - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The parent release associated with the issue. This field is a relationship field. - **Relationship Name**: Release - **Refers To**: Release # reloadFrame() for Salesforce Classic ## Usage Reloads the frame that contains the page making the call. This method is available only if the record is displayed with a feed-based layout. This method is available in API version 34.0 or later. ## Syntax ```javascript sforce.interaction.entityFeed.reloadFrame() ``` ## Arguments None. ## Sample Code–JavaScript ```visualforce Reload ``` ## Response None. # Remind Users to Complete Mandatory Steps Highlight required steps by configuring them as mandatory actions. When agents try to close a flow that’s mandatory, they see a reminder that the step is required. Maria, the Salesforce admin at Awesome Bank, wants to make sure that agents complete the Check Credit Score step. This step is required for every loan application. To help agents remember to complete this step, Maria defines this screen flow as a mandatory action. **note:** The reminder appears for screen flows and field service mobile flows. We don’t show the reminder for quick actions or autolaunched flows that are marked as mandatory. Maria can set up an action as mandatory in several ways. Which method Maria uses depends on how she creates the RecordActions that display in the component. - When Maria configures channel defaults in an Actions & Recommendations deployment, she can select an action in the preview area and mark it as mandatory. - If Maria uses Process Builder to create RecordActions, she can set the Is Mandatory attribute to **True**. - If Maria uses an API to define RecordActions, she can set the mandatory field for the action to **True**. For example, when an agent tries to close a mandatory screen flow before completing it, a message reminds the agent that the flow is required. Clicking **Cancel** dismisses the warning and continues the flow. Or, the agent can click **Finish Later**, which closes the tab or window. The agent can start a new instance of the flow later. ![Users see a reminder to complete a mandatory action.](https://developer.salesforce.com/docs/media/guided_engagement_mandatory_message.png) **See Also** - [Keep Steps Visible on Your List](https://developer.salesforce.com/docs/service/salesforce-guided-engagement/guide/guided-engagement-sample-user-removable.md) # Remote Access Controller Represents a Remote Access Controller configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. ## Configuration Item Type Definition ||| |-|-| |Name|Remote Access Controller| |Developer Name|`SD_ReAcCo`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Network Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-network-device.md)| |Rule Name|Default rule for all Serial Console Servers| |Identifier(s)|MAC address| ## Attributes No associated attributes for this configuration item type. # Remove a Participant Removes a rep participant from an active messaging session. Only use this API if routing is partner-owned (if `ConversationChannelDefinition.routingOwner` is set to `Partner`). **note:** Before calling this API, call the [Route Conversation API](https://developer.salesforce.com/docs/service/interaction-service-api/references/interaction-service-reference/api-route.md) (`POST /route`) to transfer and reroute the messaging session to another rep. When this API is called on an active messaging session, a rep is removed from the messaging session while other participants such as the end user and another rep remain. The messaging session stays open. If After Conversation Work (ACW) is enabled for the service channel or presence configuration, the removed rep goes into ACW. This API is useful if a rep gets disconnected during an active messaging session with a messaging end user and another rep needs to take over. Calling this API after rerouting the messaging session prevents the disconnected rep from re-joining the session when they reconnect. This API applies to the following product: - Bring Your Own Channel for Contact Center as a Service This API is available in version 65.0 and later. ## URI `v1/participant` ## HTTP Method POST ## Headers ### Authorization (User-Level Authentication) **Format:** `Bearer ` String. Standard header. Used to authenticate the user, where `` is the Salesforce access token used as the bearer token to make requests to the Interaction Service APIs. Required. ### Content-Type **Format:** `application/json` String. Standard header. Format of the request payload. Required for any request that includes a body. ### OrgId **Format:** `` String. Custom header. The Salesforce org. `` is the 15-character Org ID of the Salesforce org. Required. ### RequestId **Format:** `` String. Custom header. Universally Unique Identifier (``) that references and tracks this request. Required. ### AuthorizationContext **Format:** `` String. Custom header. Additional information for the request authorization used to authenticate and validate requests against the connected app scopes. - For Bring Your Own Channel for CCaaS, set `` to the developer name of the ConversationChannelDefinition record. For example, Partner1_ChannelDefinition1. Required. ### Sample Header ``` -H $'Authorization: Bearer 00DSG000009SWby!...LN8XxeRIxGe' \ -H "content-type: application/json" \ -H "OrgId: 00DSG000009SWby" \ -H "AuthorizationContext: Partner1_ChannelDefinition1" \ -H "RequestId: a1b23c45-c06a-4784-c96c-cb95d3321bda" \ ``` ## Parameters | Property Name | Type | Description | Required | | :--------------------- | :----- | :--------------------------------------------------------------------------------------------------------- | :------- | | conversationIdentifier | string | The unique ID for the conversation channel. | Yes | | operation | string | The action taken for the participant. Set this value to **Remove**. | Yes | | participants | string | A list of participants being removed from the conversation. This list supports a maximum of 1 participant. | Yes | | participants.appType | string | The app type used for the conversation. Set this value to **agent**. | Yes | | participants.role | string | The role within the conversation. Set this value to **Agent**. | Yes | | participants.subject | string | The end user client identifier. | Yes | ## Example ### Request Sample Payload ```json { "conversationIdentifier": "1234a5bc-52b8-43ed-9608-7997f7b88dc1", "operation": "Remove", "participants": [ { "subject": "UserName01" "role": "Agent" "appType": "agent" } ] } ``` ### Response Sample Payload ```json { “success”:true } ``` ## See Also - _GitHub_: [Interaction Service APIs](https://github.com/salesforce-misc/interaction-service-apis) # Remove Bundle Members Removes one or more service appointments from an existing bundle. This resource accepts service appointment IDs. This API is not supported in Gov Cloud. This endpoint is available in version 54.0 and later of the Salesforce API. ## Add a Remote Site 1. From Setup, in the Quick Find box, enter `Security`, and then select **Remote Site Settings**. 2. Click **New Remote Site**. 3. Enter a name. 4. For Remote Site URL, enter `https://api.salesforce.com/` 5. Save your changes. ## Syntax **URI**: `HOST/bundleflow/api/v1.0/bundle/remove` Where `HOST` is a variable. **Format**: JSON **HTTP Method**: PATCH **Authentication**: `Authorization: Bearer TOKEN` Where `TOKEN` is a variable. If the authentication token isn’t valid, a 401 HTTP status is returned. **Headers**: - `request.setHeader('x-sfdc-tenant-id', 'core/prod/ORG-ID_18_Characters');`—Field Service functional domain - `sf_api_version`—Salesforce API version. Minimum version is 53.0. - `Authorization`—Authorization token. - `Content-Type`—File format. Valid value is `JSON`. - `Referer`—Org domain URL. ## Request Body The request body contains these properties. |Field|Type|Description| |-----|----|-----------| |`user`|String|Optional. User name of user sending the request.| |`initiate`|String|Type of bundle request. Valid value: `manual`.| |`saRequestPayloads`|Array|Details of the service appointments to be removed from a bundle.| |`serviceAppointmentId`|String|ID of a service appointment.| |`action`|String|Bundling action performed on this service appointment. Valid values: `remove`.| ## Example This example shows a manual request to remove two service appointments from a bundle. ```nolang { "user":"Misha", "initiate":"manual", "saRequestPayloads":[ { "serviceAppointmentId":"08px000000NzbmkAAB", "action":"remove" }, { "serviceAppointmentId":"08pT300000006LLIAY", "action":"remove" } ] } ``` ## Response Body The response body contains these properties. |Field|Type|Description| |-----|----|-----------| |`bundleId`|String|ID of the bundle to update. If the update isn’t successful, it’s `null`.| |`responsePayloads`|Array|Details of the service appointment objects that are part of the bundle request.| |`objectName`|String|Type of object. Output: `ServiceAppointment`.| |`objectId`|String|ID of the service appointment.| |`action`|String|Bundling action performed on this service appointment. Valid values: `remove`.| |`status`|String|Status of updating the service appointment. Output: `SUCCESS` or `FAIL`.| |`messageCode`|Number|Success or error code of updating the service appointment. 0 means success. The error codes are listed in [Error Responses](#error-responses).| |`message`|String|Success or error message of updating the service appointment.| |`status`|String|Status of the request. Output: `SUCCESS` or `FAIL`.| |`messageCode`|Number|Success or error code of the request. 0 means success. The error codes are listed in [Error Responses](#error-responses).| |`message`|String|Success or error message of the request.| |`messageAddionalInfo`|String|More information provided by Salesforce.| ## Example: Successful Response This example shows a successful response for removing a service appointment from a bundle. ```nolang { "bundleId": "08px000000OAkUXAA1", "responsePayloads": [ { "objectName": "ServiceAppointment", "objectId": "08px000000OAjPRAA1", "action": "remove", "status": "SUCCESS", "messageCode": "NONE", "message": "Success", "messageParams": [] } ], "status": "SUCCESS", "messageCode": "NONE", "message": "Success" } ``` ## Example: Fail Response This example shows the output of a request where the user entered an invalid service appointment ID. ```nolang { "bundleId": null, "responsePayloads": [ { "status": "FAIL", "messageCode": "GET_BUNDLE_INFO_FAILURE", "message": "Try again later.", "messageParams": [] } ], "status": "FAIL", "messageCode": "ERROR_REMOVING_FROM_BUNDLE", "message": "We couldn't remove the service appointment from the bundle." "messageAdditionalInfo": "" } ``` ## Error Responses |Code|Name|Message| |----|----|-------| |0|NONE|\: Success.| |1|UNSUPPORTED_VERSION|Ask your admin to check the API version, then try again.| |2|SA_PAYLOAD_SHOULD_CONTAIN_ADD_ACTIONS_ONLY|Create bundles using add actions only.| |3|EMPTY_BUNDLE_POLICY|Enter an ID for the bundlePolicyId.| |4|EMPTY_BUNDLE_INITIATE|Specify manual or auto for the initiate entry.| |5|EMPTY_BUNDLE_SERVICE_APPOINTMENT|Add a bundle service appointment.| |6|SA_PAYLOAD_DUPLICATED_SAS|Remove duplicate service appointment IDs.| |7|SA_IS_BUNDLE|\: Is already a bundle service appointment.| |8|SA_ALREADY_BUNDLED|\: Is a bundle member service appointment in another bundle.| |9|STATUS_FORBIDDEN|\: Can’t be bundled in the current status.| |10|SA_PAYLOAD_SHOULD_NOT_CONTAIN_MIX_ACTIONS|Send separate requests for add and remove actions.| |11|SA_IS_NOT_BUNDLE|Select a bundle service appointment and try again.| |12|EXCEEDED_BUNDLE_MEMBERS_LIMIT|You reached the maximum number of service appointments for this bundle. Remove some of them and try again.| |13|SA_PAYLOAD_SHOULD_CONTAIN_ONLY_BUNDLE_MEMBERS|To remove bundle members from a bundle, include only service appointments that are bundle members.| |14|ERROR_IN_BASIC_VALIDATIONS|We couldn’t bundle the service appointments.| |15|ERROR_IN_LIMIT_VALIDATIONS|N/A| |16|ERROR_IN_CRITERIA_VALIDATIONS|N/A| |17|ERROR_IN_SERVICE_TERRITORY_VALIDATIONS|Confirm or revise the service territories of the selected service appointments. Or ask your admin for help.| |18|ERROR_IN_RESTRICTION_VALIDATIONS|Confirm or revise the selected service appointments. Or ask your admin to check the restriction policies.| |19|EXCEEDED_BUNDLE_DURATION_LIMIT|N/A| |20|EMPTY_BODY|Fill in the request.| |21|SA_IS_NOT_BUNDLED|\: Can’t remove a service appointment that isn’t in the bundle.| |22|ERROR_IN_AGGREGATION|Confirm or revise the selected service appointments. Or ask your admin to check the aggregation policies.| |23|ERROR_IN_PROPAGATION|Confirm or revise the selected service appointments. Or ask your admin to check the propagation policies.| |24|GET_POLICY_FAILURE|Ask your admin to check the bundle policies, then try again.| |25|GET_CONFIG_FAILURE|Ask your admin to check the bundle config, then try again.| |26|GET_BUNDLE_INFO_FAILURE|Try again later.| |27|ERROR_IN_LOGIC|We couldn’t bundle the service appointments.| |28|EMPTY_BUNDLE_MEMBERS|Add bundle member service appointments.| |29|EMPTY_BUNDLE_PARENT_WORK_ORDER_ID|Add the work order ID for the bundle service appointment.| |30|UNBUNDLE_REQUEST_ASSIGNED_RESOURCES_NOT_COMPATiBLE|To unbundle a scheduled bundle, send assigned resources for each service appointment.| |31|EMPTY_OLD_VALUES|To update a bundle, send the current values.| |32|EMPTY_NEW_VALUES|To update a bundle, send the new values.| |33|SA_PAYLOAD_SHOULD_CONTAIN_AT_LEAST_ONE_ADD_OR_REMOVE_ACTION|To update a bundle, send at least one add or remove action.| |34|FORBIDDEN_FIELDS_IN_POLICY_OBJECT|Confirm or revise the selected service appointments. Or ask your admin to check the field names selected in the related policies.| |35|EMPTY_SERVICE_TERRITORY|Add a Service Territory ID.| |36|EMPTY_START_TIME|Add the interval’s start time.| |37|EMPTY_END_TIME|Add the interval’s end time.| |38|ERROR_IN_BUNDLE_POLICY_RFC|Confirm or revise the selected service appointments. Or ask your admin to check the recordset filter criteria in the bundle policy.| |39|ERROR_IN_TIME_ZONE_VALIDATION|Select service appointments that are in the same time zone. Or ask your admin for help.| |40|ERROR_IN_LOGIC_UNBUNDLE|We couldn’t unbundle the service appointment.| |41|ERROR_CREATING_BUNDLE|We couldn’t bundle the service appointments.| |42|ERROR_ADDING_TO_BUNDLE|We couldn’t add the service appointment to the bundle.| |43|ERROR_REMOVING_FROM_BUNDLE|We couldn’t remove the service appointment from the bundle.| |44|ERROR_UNBUNDLING|We couldn’t unbundle the service appointment.| |58|ERROR_IN_MSW_VALIDATIONS|We can’t bundle service appointments with dependencies. Remove the dependencies and try again.| |-500|http error|Hmm… Something went wrong. Try again.| # removeEventListener() Removes a listener for a custom event type or a standard event type. This method removes a listener for custom event types in API version 25.0 or later; it removes a listener for standard event types in API version 30.0 or later. For the list of standard events, see [Methods for Console Events](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-methods-events.md). ## Syntax ```javascript sforce.console.removeEventListener( eventType: String, eventListener:Function, (optional)additionalParams:Object ) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`eventType`|string|Event type for which eventListener is removed.| |`eventListener`|function|Event listener to remove.| |`additionalParams`|object|Optional parameters accepted by this method. The supported properties on this object are `tabId`: The ID of the tab to remove the listener for the specified event. This argument is only available in API version 30.0 or later.| ## Sample Code API Version 25.0 or Later–Visualforce ```apex_page Click here to remove an event listener for the 'SampleEvent' event type ``` ## Response None ## Sample Code API Version 30.0 or Later–Visualforce ```apex_page Click here to remove an event listener for the console 'CLOSE_TAB' event type ``` ## Response None # removeFromBrowserTitleQueue() Removes a browser tab title from the list of titles, which rotates every three seconds. This method is only available in API version 28.0 or later. ## Syntax ```javascript sforce.console.removeFromBrowserTitleQueue( title:String, callback:Function ) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`title`|string|Browser tab title to remove.| |`callback`|function|JavaScript method that’s called upon completion of the method.| ## Sample Code–Visualforce ```apex_page ``` ## Response This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following fields: |Name|Type|Description| |----|----|-----------| |`success`|boolean|If `true`, the title was successfully removed from the browser title queue. If `false`, the title wasn’t removed from the browser title queue.| |`callback`|function|JavaScript method that’s called upon completion of the method.| # removeFromBrowserTitleQueue() for Lightning Experience Removes a string from a list of titles that rotate in the browser title bar every three seconds. This method works only in Lightning console apps. This method isn’t supported for Lightning Web Components (LWC). **note:** Accurate browser tab titles help improve accessibility. Screen readers announce page titles when a page is first loaded, and don’t announce dynamic updates to the title. Use the root node of the document, like `document.title`, to announce the updated browser tab title instead. ## Arguments |Name|Type|Description| |----|----|-----------| |`title`|string|The browser tab title to remove.| ## Sample Code This component has a button that, when pressed, removes a string from a list of titles that rotate in the browser title bar every three seconds. Component code: ```html ``` Controller code: ```javascript ({ handleremoveFromBrowserTitleQueue : function(component, event, helper) { var workspaceAPI = component.find("workspace"); workspaceAPI.removeFromBrowserTitleQueue({ title: "New Browser Title" }) .then(function(result){ console.log(result); }) .catch(function(error) { console.log(error); }); } }) ``` ## Response This method returns a promise that, open success, resolves to `true`. # removePushNotificationListener() Removes a listener that gets added for a push notification. This method is only available in API version 26.0 or later. For more information on push notifications, see [Methods for Push Notifications](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-methods-push-notifications.md). ## Syntax ```javascript sforce.console.removePushNotificationListener((optional) callback:Function ) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`callback`|function|A function called when the removal of the push notification listener completes.| ## Sample Code–Visualforce ```apex_page Click here to remove push notification ``` ## Response This method is asynchronous so it returns its response in an object in a callback method. |Name|Type|Description| |----|----|-----------| |`success`|boolean|`true` if removing the push notification listener was successful; `false` if removing the push notification listener wasn’t successful.| # reopenLastClosedTab() Reopens the last closed primary tab, and any of its subtabs that were open, the moment it was closed. This method is only available in API version 35.0 or later. ## Syntax ```javascript sforce.console.reopenLastClosedTab() ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`callback`|function|JavaScript method called upon completion of the method.| ## Sample Code–Visualforce ```apex_page Re-open Last Closed Tab ``` ## Response This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following field: |Name|Type|Description| |----|----|-----------| |`success`|boolean|`true` if the tab was reopened, `false` otherwise.| # Request Bodies Here’s a list of Scheduling Operations API request bodies. - **[Fetch Files Input](https://developer.salesforce.com/docs/service/schedulingoperation/business-apis/connect-requests-fetch-files-input.md)** Input representation for retrieving files generated by an optimization request in Enhanced Scheduling and Optimization. - **[Rebook And Notify Input](https://developer.salesforce.com/docs/service/rebookandnotify/connect-requests-rebook-and-notify-input.md)** Input representation for the rebooking and notifying. # Request Bodies Get to know the request bodies for the Salesforce Feedback Management (SFM) unAuth Response APIs. - **[Survey Description Input](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/surveys-requests-survey-description-input-unauth-apis.md)** Input representation of the details of the survey recipient and their engagement context, the language, related records, and invitation settings of the survey. - **[Survey Integer Question Response Input](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/surveys-requests-survey-integer-question-response-input-unauth-apis.md)** Input representation of the details of the response to an NPS question on the survey page. - **[Survey Invitation Settings Input](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/surveys-requests-survey-invitation-settings-input-unauth-apis.md)** Input representation of the settings of the survey invitation that define the participants who can respond to the survey, its expiration, and other related configurations. - **[Survey Page Response Input](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/surveys-requests-survey-page-response-input-unauth-apis.md)** Input representation of the details of the response to a survey page. - **[Survey Question Response Input](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/surveys-requests-survey-question-response-input-unauth-apis.md)** Input representation of the details of the response to a question on the survey page. - **[Survey Response Input](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/surveys-requests-survey-response-input-unauth-apis.md)** Input representation of the details of a survey response. - **[Survey Selection Question Choice Input](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/surveys-requests-survey-selection-question-choice-input-unauth-apis.md)** The details of a boolean, rating, single selection, or a multiple selection question’s choice on the survey page. - **[Survey Selection Question Response Input](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/surveys-requests-survey-selection-question-response-input-unauth-apis.md)** Input representation of the details of the response to a boolean, rating, single selection, or a multiple selection question on the survey page. - **[Survey Text Question Response Input](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/surveys-requests-survey-text-question-response-input-unauth-apis.md)** The details of the response to a short-text or a long-text question on the survey page. # Required Call Center Elements and Attributes The call center definition file must include the required `` elements in the `
` element. **important:** The way you implement Open CTI depends on your org’s user interface. There are separate Open CTI APIs for Salesforce Classic and Lightning Experience. The `reqSalesforceCompatibilityMode` item in your call center definition file identifies the user interface you plan to use—Salesforce Classic, Lightning Experience, or both. If no value is specified, the default is `Classic`. This item is optional, but to make calls in Lightning Experience you must specify `Lightning` or `Classic_and_Lightning`.
NameDescriptionSupported in Salesforce ClassicSupported in Lightning Experience
reqAdapterUrlRepresents the location of where the CTI adapter or softphone is hosted. For example:
  • http://localhost:11000

Relative URLs are allowed for Visualforce pages. For example:

  • : /apex/softphone

If you add Canvas applications to Open CTI, those apps can trump reqAdapterUrl when specified.

To implement in a Lightning Experience org, use https in your URL.

reqCanvasApiNameRepresents the API name associated with any Canvas applications added to your call center. Required if you add canvas apps to Open CTI.

Not supported

reqCanvasNamespaceRepresents the namespace associated with any Canvas applications added to your call center. Required if you add canvas apps to Open CTI.

Not supported

reqDisplayNameRepresents the name of the call center as displayed in Salesforce. It must have a sortOrder value of 1. A value for reqDisplayName has a maximum length of 1,000 UTF-8 characters.
reqInternalNameRepresents the unique identifier for the call center in the database. It must have a sortOrder value of 0, and its value must be specified in the call center definition. A value for reqInternalName must be composed of no more than 40 alphanumeric characters with no white space or other punctuation. It must start with an alphabetic character and must be unique from the reqInternalName of all other call centers defined in your organization.
reqSoftphoneHeightRepresents the height of the softphone in pixels as displayed in Salesforce.

If you’re using Open CTI for Lightning Experience, enter a number from 240 through 2,560. Value is in pixels (px).

reqSoftphoneWidthRepresents the width of the softphone in pixels as displayed in Salesforce.

If you’re using Open CTI for Lightning Experience, enter a number from 200 through 1,920. Value is in pixels (px).

reqUseApiRepresents that the call center is using Open CTI (true) or not (false).
If needed, you can add more `` elements to this section. # Requirements for the Android SDK Before you install the SDKs, understand the external components and extensions used with the SDKs and ensure your devices meet all requirements: ## Android SDK The UI SDK and Core SDK require Android 6.0 (API Level 23), also known as Marshmallow, or higher. ## New Relic If you use the New Relic Android agent with the SDKs, use New Relic Android agent version 7.2.0 or higher. Also, add this code to the `build.gradle` file. This requirement is essential to avoid server-sent event connection failures due to a dependency conflict between New Relic and OkHttp. See the [New Relic](https://docs.newrelic.com/docs/mobile-monitoring/new-relic-mobile-android/install-configure/configure-new-relic-gradle-plugin/) and [OkHttp](https://square.github.io/okhttp/) documentation. ``` newrelic { excludePackageInstrumentation("("okhttp3.sse.internal.RealEventSource")") } ``` ## Zetetic SQLCipher SQLCipher Community Edition is an open source extension to SQLite that supports database-level encryption. The UI SDK uses the SQLCipher extension. ``` Copyright (c) 2005, ZETETIC LLC All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the ZETETIC LLC nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY ZETETIC LLC ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ZETETIC LLC BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ``` Per SQLCipher's guidelines, if you use the Salesforce custom library, please include the SQLCipher Community Edition license and copyright statement in your application and documents. You can find more information about the guidelines at [https://www.zetetic.net/sqlcipher/community/](https://www.zetetic.net/sqlcipher/community/). # Requirements for the iOS SDK Before you install the SDKs, understand the external components and extensions used with the SDKs and ensure your devices meet all requirements: ## Apple iOS The [UI SDK](https://developer.salesforce.com/docs/service/messaging-in-app/guide/ios-ui-sdk.html) requires iOS 15.0 or higher. The [Core SDK](https://developer.salesforce.com/docs/service/messaging-in-app/guide/ios-core-sdk.html) requires iOS 13.0 or higher. ## Apple Xcode To develop using either the UI SDK or the Core SDK, install [Xcode](https://developer.apple.com/xcode/) (version 12.3 or later) and the Command Line Tools for Xcode. ## Apple Swift Package Manager If you install the SDK using Swift Package Manager (SPM), use version 1.4.0 or higher. **note:** The CocoaPods main trunk will be read-only by December 2026\. When this happens, Salesforce will no longer be able to deploy apps for iPhones. Don’t use CocoaPods to install the SDK; instead, use Swift Package Manager. If you installed the SDK in the past using CocoaPods, migrate from CocoaPods to Swift Package Manager to ensure you can continue to receive the latest SDK releases. See the [CocoaPods Trunk Read-only Plan](https://blog.cocoapods.org/CocoaPods-Specs-Repo/) for more information about CocoaPods’ read-only transition plan. ## Zetetic SQLCipher SQLCipher Community Edition is an open source extension to SQLite that supports database-level encryption. The UI SDK uses the SQLCipher extension. ``` Copyright (c) 2005, ZETETIC LLC All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the ZETETIC LLC nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY ZETETIC LLC ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ZETETIC LLC BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ``` Per SQLCipher's guidelines, if you use the Salesforce custom library, please include the SQLCipher Community Edition license and copyright statement in your application and documents. You can find more information about the guidelines at [https://www.zetetic.net/sqlcipher/community/](https://www.zetetic.net/sqlcipher/community/). # Requirements for the Service Chat SDK for Android The Salesforce org, SDK development, and mobile app requirements for using the Service Chat SDK. **important:** 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](https://help.salesforce.com/s/articleView?id=service.miaw_intro_landing.htm&type=5) before that date. Messaging offers many of the [chat features](https://help.salesforce.com/s/articleView?id=service.miaw_chat_vs_messaging.htm&type=5) that you love plus asynchronous conversations that can be picked back up at any time. Learn about chat retirement in [Help](https://help.salesforce.com/s/articleView?id=001790618&type=1). ## Salesforce Org Requirements The Service Chat SDK can be used with both Lightning Experience and Salesforce Classic. However, the SOS agent widget currently works only in Salesforce Classic. ## SDK Requirements This SDK requires [Android](https://www.android.com/) API level 21 (5.0, Lollipop) or newer. You can access the SDK using either Java or Kotlin. ## App Permission Requirements The SDK inserts permission requirements into the manifest of your compiled application package. | Permission | | ----------------------------------------- | | **General Purpose Permissions** | | android.permission.ACCESS_NETWORK_STATE | | android.permission.INTERNET | | android.permission.READ_EXTERNAL_STORAGE | | android.permission.WRITE_EXTERNAL_STORAGE | | **Real-Time Chat and Video Permissions** | | android.permission.CAMERA | # Requirements for the Service Chat SDK for iOS The Salesforce org, SDK development, and mobile app requirements for using the Service Chat SDK. **important:** 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](https://help.salesforce.com/s/articleView?id=service.miaw_intro_landing.htm&type=5) before that date. Messaging offers many of the [chat features](https://help.salesforce.com/s/articleView?id=service.miaw_chat_vs_messaging.htm&type=5) that you love plus asynchronous conversations that can be picked back up at any time. Learn about chat retirement in [Help](https://help.salesforce.com/s/articleView?id=001790618&type=1). ## Salesforce Org Requirements The Service Chat SDK can be used with both Lightning Experience and Salesforce Classic. However, the SOS agent widget currently works only in Salesforce Classic. ## SDK Development Requirements To develop using this SDK, you must have [iOS SDK](https://developer.apple.com/ios/) version 12 or later. **important:** Apple mandates a privacy manifest for third-party SDKs that have a large user base. Service Chat SDK is excluded from Apple’s list of third-party SDK requirements because it has a small user base compared to popular third-party SDKs. Also, the SDK has reached the end-of-sale state, and end-of-sale SDKs haven’t been added to the requirements. So, Service Chat doesn’t require a privacy manifest. See [Upcoming third-party SDK requirements](https://developer.apple.com/support/third-party-SDK-requirements/) in _Apple Developer Support_. Service Chat also doesn’t collect or store user data locally in the SDK and doesn’t track data. However, if you use a pre-chat form and configure it to store any data entered by the user in Salesforce, add a privacy manifest with this information to the host app. ## Mobile App Requirements Any app that uses this SDK requires [iOS](https://developer.apple.com/ios/) version 12 or later. # resetSessionTimeOut() Resets a session timeout for a console app. This method ensures that users can continue working on Visualforce pages without being prompted to log back in to the console when they return to a console tab or console component. This method is only available in API version 24.0 or later. For more information, see [Modify Session Security Settings](https://help.salesforce.com/s/articleView?id=xcloud.admin_sessions.htm&type=5) in Salesforce Help. ## Syntax ```javascript sforce.console.resetSessionTimeOut() ``` ## Arguments None ## Sample Code–Visualforce ```apex_page Click here to reset session timeout ``` **note:** To see this example in action, click the custom link on a case. For more information, see [Define Custom Buttons and Links](https://help.salesforce.com/s/articleView?id=defining_custom_links.htm) in Salesforce Help. ## Response None # ResourceAbsence Represents a time period in which a service resource is unavailable to work in Salesforce Scheduler. This object is available in API version 38.0 and later. ## Supported Calls `create()`, `delete()`, `describeLayout()`, `describeSObjects()`, `getDeleted()`, `getUpdated()`, `query()`, `retrieve()`, search(), `update()`, `upsert()` ## Special Access Rules Salesforce Scheduler must be enabled. ## Usage Resource absences you define periods of time when a service resource is unavailable to work. **tip:** Create a trigger that sends an approval request to a supervisor when a service resource creates an absence. ## Fields ### AbsenceNumber - **Type**: string - **Properties**: Autonumber, Defaulted on create, Filter, idLookup, Sort - **Description**: (Read only) An auto-generated number identifying the absence. ### Description - **Type**: textarea - **Properties**: Create, Nillable, Update - **Description**: The description of the absence. ### End - **Type**: dateTime - **Properties**: Create, Filter, Sort, Update - **Description**: The date and time when the absence ends. ### LastReferencedDate - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: The date when the resource absence was last modified. Its label in the user interface is `Last Modified Date`. ### LastViewedDate - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: The date when the resource absence was last viewed. ### ResourceId - **Type**: reference - **Properties**: Create, Filter, Group, Sort - **Description**: The absent service resource. This is a relationship field. - **Relationship Name**: Resource - **Relationship Type**: Lookup - **Refers To**: ServiceResource ### Start - **Type**: dateTime - **Properties**: Create, Filter, Sort, Update - **Description**: The date and time when the absence begins. ## Associated Objects This object has the following associated objects. If the API version isn’t specified, they’re available in the same API versions as this object. Otherwise, they’re available in the specified API version and later. [ResourceAbsenceChangeEvent](https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_associated_objects_change_event.htm) (API version 48.0): Change events are available for the object. [ResourceAbsenceFeed](https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_associated_objects_feed.htm): Feed tracking is available for the object. [ResourceAbsenceHistory](https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_associated_objects_history.htm): History is available for tracked fields of the object. # ResourceAbsence Custom Fields Custom fields associated with a time period in which a service resource is unavailable to work in Field Service. The standard fields are documented in the [ResourceAbsence](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_resourceabsence.htm) object reference. ## Supported Calls `create()`, `delete()`, `describeLayout()`, `describeSObjects()`, `getDeleted()`, `getUpdated()`, `query()`, `retrieve()`, `search()`, `update()`, `upsert()` ## Special Access Rules Field Service managed package must be installed. **See Also** - [Salesforce Object Reference: ResourceAbsence](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_resourceabsence.htm) - [Salesforce Help: View Resource Absences on the Gantt and Map](https://help.salesforce.com/articleView?id=service.pfs_approved_absences.htm&type=5) ## Fields ### FSL__Approved__c - **Type**: boolean - **Properties**: Create, Defaulted on create, Filter, Group, Sort, Update - **Description**: When this field is `true` and the **Activate approval confirmation on resource absences** setting is enabled, the resource absence appears in the dispatcher console’s Gantt chart and is considered by the scheduler. When this field is `false` and the setting is enabled, the resource absence doesn’t appear in the Gantt chart and is ignored by the scheduler. For more info, view the [View Resource Absences on the Gantt and Map](https://help.salesforce.com/articleView?id=service.pfs_approved_absences.htm&type=5) Help article. - **Default value**: `false` ### FSL__Duration_In_Minutes__c - **Type**: double - **Properties**: Filter, Nillable, Sort - **Description**: The duration of the resource absence in minutes. This field is automatically populated after the resource absence is created. This is a calculated field. - **Formula**: ```nolang IF (ISBLANK(Start), 0, (End - Start)*24*60) ``` ### FSL__EstTravelTimeFrom__c - **Type**: double - **Properties**: Create, Filter, Nillable, Sort, Update - **Description**: The estimated travel time from the service resource’s absence location to their home base. For this field, the absence location must have latitude and longitude coordinates and be the last location of the day. If it doesn’t have coordinates, isn’t the last location of the day, or the travel calculations are disabled, this field is 0. ### FSL__EstTravelTime__c - **Type**: double - **Properties**: Create, Filter, Nillable, Sort, Update - **Description**: The estimated time to the service resource’s absence location from a service appointment or another resource absence location. For this field, the absence location must have latitude and longitude coordinates. If it doesn’t have latitude and longitude coordinates or the travel calculations are disabled, this field is 0. ### FSL__EstimatedTravelDistanceFrom__c - **Type**: double - **Properties**: Create, Filter, Nillable, Sort, Update - **Description**: The estimated travel distance from the service resource’s absence location to their home base. For this field, the absence location must have latitude and longitude coordinates and be the last location of the day. If it doesn’t have coordinates, isn’t the last location of the day, or the travel calculations are disabled, this field is 0. ### FSL__EstimatedTravelDistanceTo__c - **Type**: double - **Properties**: Create, Filter, Nillable, Sort, Update - **Description**: The estimated travel distance to service resource’s absence location from a service appointment or another resource absence location. For this field, the absence location must have latitude and longitude coordinate. If it doesn’t have latitude and longitude coordinates or the travel calculations are disabled, this field is 0. ### FSL__Estimated_Travel_Time_From_Source__c - **Type**: picklist - **Properties**: Create, Filter, Group, Nillable, Restricted picklist, Sort, Update - **Description**: The method used to calculate the travel time from the service resource’s absence location to a service appointment or another resource absence location. For this field, the absence location must have latitude and longitude coordinates and be the last location of the day. If it doesn’t have coordinates, isn’t the last location of the day, or the travel calculations are disabled, this field is `None`. - **Possible values**: - `Aerial` - `None` - `Predictive` - `SLR` ### FSL__Estimated_Travel_Time_To_Source__c - **Type**: picklist - **Properties**: Create, Filter, Group, Nillable, Restricted picklist, Sort, Update - **Description**: The method used to calculate the travel time to this service resource’s absence location from a service appointment or another resource absence location. For this field, the absence location must have latitude and longitude coordinates. If it doesn’t have latitude and longitude coordinates or the travel calculations are disabled, this field is None. - **Possible values**: - `Aerial` - `None` - `Predictive` - `SLR` ### FSL__GanttLabel__c - **Type**: string - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The label of the resource absence in the Field Service dispatcher console’s Gantt chart and resource calendar. This replaces the resource absence’s number in the chart. ### FSL__Gantt_Color__c - **Type**: string - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: The Hex color of the resource absence in Field Service dispatcher console’s Gantt chart and resource calendar. ### FSL__Scheduling_Policy_Used__c - **Type**: reference - **Properties**: Create, Filter, Group, Nillable, Sort, Update - **Description**: A scheduling policy used by the scheduler for the service appointment. This policy overrides the default one in the Field Service Settings page or the one that the scheduler would otherwise select. This is used for travel calculations. This is a relationship field. - **Relationship Name**: FSL__Scheduling_Policy_Used__r - **Relationship Type**: Lookup - **Refers To**: FSL__Scheduling_Policy__c ## Internal Fields These internal fields are used by the Field Service managed package for Street Level Routing calculations. Although they’re publicly accessible, they must only be updated by the managed package. - FSL__InternalSLRGeolocation__Latitude__s - FSL__InternalSLRGeolocation__Longitude__s - FSL__InternalSLRGeolocation__c # ResourcePreference Represents an account’s preference for a specified service resource. Resource preferences indicate which service resources should be assigned to a service appointment. You can designate service resources as preferred, required, or excluded on accounts. ## Supported Calls `create()`, `delete()`, `describeLayout()`, `describeSObjects()`, `getDeleted()`, `getUpdated()`, `query()`, `retrieve()`, `update()`, `upsert()` ## Fields ### LastReferencedDate - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: The date when the resource preference was last modified. ### LastViewedDate - **Type**: dateTime - **Properties**: Filter, Nillable, Sort - **Description**: The date when the resource preference was last viewed. ### PreferenceType - **Type**: picklist - **Properties**: Create, Defaulted on create, Filter, Group, Restricted picklist, Sort, Update - **Description**: Resource preference type. Values include: - `Preferred`— Indicates that the user would like their appointment assigned to the resource. - `Required`— Indicates that the resource must be assigned to the appointment. - `Excluded`— Indicates that the resource must not be assigned to the appointment. Resource preferences serve more as a suggestion than a requirement. You can still assign a service appointment to any resource regardless of the related account’s resource preferences. ### RelatedRecordId - **Type**: reference - **Properties**: Create, Filter, Group, Sort - **Description**: The account with the resource preference. This is a polymorphic relationship field. - **Relationship Name**: RelatedRecord - **Relationship Type**: Lookup - **Refers To**: Account ### ResourcePreferenceNumber - **Type**: string - **Properties**: Autonumber, Defaulted on create, Filter, Sort - **Description**: An auto-generated number identifying the resource preference. ### ServiceResourceId - **Type**: reference - **Properties**: Create, Filter, Group, Sort, Update - **Description**: The service resource that is preferred, required, or excluded. This is a relationship field. - **Relationship Name**: ServiceResource - **Relationship Type**: Lookup - **Refers To**: ServiceResource ## Associated Objects This object has the following associated objects. Unless noted, they are available in the same API version as this object. [ResourcePreferenceFeed](https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_associated_objects_feed.htm): Feed tracking is available for the object. [ResourcePreferenceHistory](https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_associated_objects_history.htm): History is available for tracked fields of the object. # Resources Field Service Connect APIs are RESTful APIs. You can access Field Service Connect REST resources, including Scheduling Operations, Recordset Filter Criteria, and Shifts from Pattern using REST endpoints. These REST APIs follow similar conventions as Connect REST APIs. Here’s a list of Field Service API resources. To understand the architecture, authentication, rate limits, and how the requests and responses work, see [Connect REST API Developer Guide](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/intro_what_is_chatter_connect.htm). - **[Rebook and Notify Resources](https://developer.salesforce.com/docs/service/rebookandnotify/fs-rebook-and-notify-connect-resources.md)** Field Service Rebook and Notify Connect APIs are RESTful APIs. - **[Scheduling Operations Resources](https://developer.salesforce.com/docs/service/schedulingoperation/business-apis/fs-scheduling-operation-connect-resources.md)** Field Service Scheduling Operations Connect APIs are RESTful APIs. # Resources Use the developer resources for the Salesforce Feedback Management (SFM) unAuth Response APIs to create survey invitation, enable survey responses, and gather feedback from unauthenticated participants. **note:** Salesforce Feedback Management Business API performance can be impacted if a POST request exceeds 3600 calls per minute and if a PATCH request exceeds 1800 calls per minute at the organization level. - **[Survey Responses Using Invitation Configurations (POST, PATCH)](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/surveys-resources-create-submit-surveys-unauth-apis.md)** Create responses using the invitation configuration details and initiate the process of submitting the survey responses by making a POST request. Submit the survey responses using the PATCH request. # Respond to Location Filter Changes Custom components should respond to global filter changes if possible, to provide a cohesive Command Center user experience. Components that must respond to global filter changes should subscribe to the Command Center standard Lightning Message Service channels. To reference a message channel, import it from the `@salesforce/messageChannel` scoped module. To use the Lightning Message Service APIs: - Import the following functions from lightning/messageService: `subscribe`, `unsubscribe`, `MessageContext`, and `APPLICATION_SCOPE`. - Import `COMMAND_CENTER_MSG_CHANNEL` from `@salesforce/messageChannel/lightning__CommandCenterMessageChannel`. The following example, from the sample app at [https://github.com/forcedotcom/WorkDotCom-Partners](https://github.com/forcedotcom/WorkDotCom-Partners), demonstrates subscribing and unsubscribing to the Command Center message channel and listening for events fired. ```javascript import { LightningElement, wire, track } from 'lwc'; import { subscribe, MessageContext, unsubscribe, APPLICATION_SCOPE } from 'lightning/messageService'; /*** Message Channel ***/ import COMMAND_CENTER_MSG_CHANNEL from '@salesforce/messageChannel/lightning__CommandCenterMessageChannel'; export default class lwc_component extends LightningElement{ @wire(MessageContext) messageContext; @track globalLocationName; @track globalLocationId; subscription; connectedCallback() { this.subscribeToChannel(); } /** * Subscribe to Command Center Message Channel to listen to global filter changes */ subscribeToChannel() { if (!this.subscription) { this.subscription = subscribe(this.messageContext, COMMAND_CENTER_MSG_CHANNEL, message => this.handleEvent(message), { scope: APPLICATION_SCOPE }); } } /** * Any time global filter changes are captured get updated values * @param {} message */ handleEvent(message) { switch (message.EventType) { case 'CC_LOCATION_CHANGE': { /* This event returns two attributes within it's EventPayload (locationName & locationId) */ this.globalLocationName = message.EventPayload.locationName; this.globalLocationId = message.EventPayload.locationId; break; } default: { break; } } } /** * If disconnected unsubscribe from Message Channel */ disconnectedCallback() { if (this.subscription) { unsubscribe(this.subscription); } } } ``` While Lightning Message Service allows any component to publish a message on any channel, the Command Center global filter component does not subscribe to any LMS channels, so it won’t receive any messages published by other Command Center components. # Response Bodies Here’s a list of Scheduling Operations response bodies. - **[Created File](https://developer.salesforce.com/docs/service/schedulingoperation/business-apis/connect-responses-created-file.md)** Represents a single file created during a fetch optimization files operation. - **[Fetch Files](https://developer.salesforce.com/docs/service/schedulingoperation/business-apis/connect-responses-fetch-files.md)** Output representation for a fetch optimization files operation. Contains a map of the files created in the org for the specified optimization request. - **[Rebook And Notify](https://developer.salesforce.com/docs/service/rebookandnotify/connect-responses-rebook-and-notify.md)** Output representation of the rebook and notify request. # Response Bodies Get to know the response bodies for the Salesforce Feedback Management (SFM) unAuth Response APIs. - **[Survey Description Output](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/surveys-responses-survey-description-output-unauth-apis.md)** Output representation of the response to the Start Survey request. - **[Survey Detail Output](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/surveys-responses-survey-detail-output-unauth-apis.md)** Output representation of the details of the survey. - **[Survey NPS Question Output](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/surveys-responses-survey-nps-question-output-unauth-apis.md)** Output representation of the details of the NPS question on the survey page. - **[Survey Question Output](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/surveys-responses-survey-question-output-unauth-apis.md)** Output representation of the details of the question on the survey page. - **[Survey Question Page Output](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/surveys-responses-survey-question-page-output-unauth-apis.md)** The details of the question page in the survey. - **[Survey Response Output](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/surveys-responses-survey-response-output-unauth-apis.md)** Output representation of the response to the Submit Survey request. The response includes the status of the survey unAuth response API and the Thank You page details in the survey. - **[Survey Selection Question Choice Output](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/surveys-responses-survey-selection-question-choice-output-unauth-apis.md)** The details of a boolean, rating, single selection, or a multiple selection question’s choice on the survey page. - **[Survey Selection Question Output](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/surveys-responses-survey-selection-question-output-unauth-apis.md)** Output representation of the details of the boolean, rating, single-selection, or multiple-selection question on the survey page. - **[Survey Short-Text Question Output](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/surveys-responses-survey-short-text-question-output-unauth-apis.md)** Output representation of the details of the short-text question on the survey page. - **[Survey Text Question Output](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/surveys-responses-survey-text-question-output-unauth-apis.md)** Output representation of the details of the text question on the survey page. - **[Survey Thank You Page Output](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/surveys-responses-survey-thank-you-page-output-unauth-apis.md)** Output representation of the details of the Thank You page in the survey. - **[Survey URL Buttons Output](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/surveys-responses-survey-u-r-l-buttons-output-unauth-apis.md)** Output representation of the details of the URL buttons on the Thank You page in the survey. # REST APIs Use Salesforce Scheduler REST APIs to get appointment time slots and available service resources based on work type groups and service territories. Salesforce Scheduler is built on the Salesforce platform (also known as Lighting Experience). The Salesforce platform specific API rate limits apply to the Salesforce Scheduler REST APIs. For more information on Lightning platform common limits and allocations, see [API Request Limits and Allocations](https://developer.salesforce.com/docs/atlas.en-us.salesforce_app_limits_cheatsheet.meta/salesforce_app_limits_cheatsheet/salesforce_app_limits_platform_api.htm). The following is a list of REST APIs available within the Salesforce Scheduler platform. ## Resources Use Salesforce Scheduler REST APIs to get appointment time slots or available service resources based on work type groups and service territories. - [Get Appointment Candidates](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/requests_ls_getappointmentcandidates.htm) - [Get Appointment Slots](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/requests_ls_getappointmentslots.htm) - [Scheduling](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_ls_scheduling.htm) ## Request Bodies To perform a POST, PATCH, or PUT request, create a request body formatted in either XML or JSON. - [Skill Requirement](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/request_body_ls_skillrequirement.htm) - [Work Type](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/request_body_ls_worktype.htm) ## Response Bodies Successful execution of a request to a Salesforce Scheduler resource can return a response body either in JSON or XML format. For example, the request to get appointment time slots returns a list of available time slots for a selection of work type group and territories. - [Candidates](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/responses_ls_candidates.htm) - [Time Slots](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/responses_ls_timeslots.htm) **See Also** - [REST API Developer Guide: Introducing Lightning Platform REST API](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/intro_what_is_rest_api.htm) - [Salesforce Developer Limits and Allocations Quick Reference: About This Quick Reference](https://developer.salesforce.com/docs/atlas.en-us.salesforce_app_limits_cheatsheet.meta/salesforce_app_limits_cheatsheet/salesforce_app_limits_overview.htm) # REST Reference You can access Field Service APIs using REST endpoints. These REST APIs follow similar conventions as Connect REST APIs. To understand the architecture, authentication, rate limits, and how the requests and responses work, see [Connect REST API Developer Guide](https://developer.salesforce.com/docs/platform/connect-rest-api/guide/intro_what_is_chatter_connect.html). - **[Resources](https://developer.salesforce.com/docs/service/schedulingoperation/business-apis/fsl-connect-resources.md)** Field Service Connect APIs are RESTful APIs. You can access Field Service Connect REST resources, including Scheduling Operations, Recordset Filter Criteria, and Shifts from Pattern using REST endpoints. These REST APIs follow similar conventions as Connect REST APIs. Here’s a list of Field Service API resources. - **[Request Bodies](https://developer.salesforce.com/docs/service/schedulingoperation/business-apis/fs-scheduling-operation-requests.md)** Here’s a list of Scheduling Operations API request bodies. - **[Response Bodies](https://developer.salesforce.com/docs/service/schedulingoperation/business-apis/fs-scheduling-operation-responses.md)** Here’s a list of Scheduling Operations response bodies. # Restore an Archived Version of an Article Restores an archived version of the article. If versionNumber isn’t specified, restores the latest version of the archived article. **important:** Where possible, we changed noninclusive terms to align with our company value of Equality. We maintained certain terms to avoid any effect on customer implementations. ## URI ```nolang /services/data/v25.0/knowledgeManagement/articleVersions/masterVersions/ ``` ## Formats JSON, XML ## HTTP Method POST ## Authentication `Authorization: OAuth {accesstoken}` ## Parameters | Parameter | Description | | ------------- | --------------------------------------------------------------------------------------------------------------- | | articleId | The ID of the article. | | versionNumber | Version of the article. If this field is not specified, the latest version of the archived article is restored. | ## Input ```nolang { "articleId":"", "versionNumber": } ``` # Retrieve a Version of an Article Retrieves the version ID of an article. **important:** Where possible, we changed noninclusive terms to align with our company value of Equality. We maintained certain terms to avoid any effect on customer implementations. ## URI ```nolang /services/data/v25.0/knowledgeManagement/articleVersions/masterVersions/ ``` ## Formats JSON, XML ## HTTP Method GET ## Authentication `Authorization: OAuth {accesstoken}` ## Parameters None ## Input None required # Retrieve Article Metadata Retrieves the metadata of an article. ## URI ```nolang /services/data/v25.0/knowledgeManagement/articles/ ``` ## Formats JSON, XML ## HTTP Method GET ## Authentication `Authorization: OAuth {accesstoken}` ## Parameters None ## Input None required # Retrieve Conversation Entries Retrieve messages from a conversation. This API applies to the following product: - Bring Your Own Bot (BYOB) For authentication details, see [Generate an Access Token](https://developer.salesforce.com/docs/service/interaction-service-api/guide/authorization.html). ## URI `v1/conversationEntry` ## HTTP Method GET ## Headers ### Authorization **Format:** `Bearer ` String. Standard header. The authorization token, where `` is the JSON Web Token (JWT). Required. ### Content-Type **Format:** `application/json` String. Standard header. The format of the request body. Valid format is `application/json`. Required. ### OrgId **Format:** `` String. Standard header. The 15-character Org ID of the Salesforce org. Required. ### AuthorizationContext **Format:** `` String. Standard header. The `ExtConvParticipantIntegDef` developer name in the format `{prefix}_{ExtConvParticipantIntegDef}`. The prefix must match the developer name prefix of the corresponding `ExternalClientApp`. For example, `Partnerapp_ExtConvParticipantIntegDef`. Required. ### AuthorizationContextType **Format:** `ExternalConversationParticipant` String. Standard header. Set this value to `ExternalConversationParticipant`. Required. ### RequestId **Format:** `` String. Standard header. A globally unique ID (GUID). Required. ### Sample Header ``` -H $'Authorization: Bearer 00DSG000009SWby!...LN8XxeRIxGe' \ -H "content-type: application/json" \ -H "OrgId: 00DSG000009SWby" \ -H "AuthorizationContext: ExtConvParticipantIntegDef" \ -H "AuthorizationContextType: ExternalConversationParticipant" \ -H "RequestId: a1b23c45-c06a-4784-c96c-cb95d3321bda" \ ``` ## Parameters | Property Name | Type | Description | Required | | :--------------------- | :-------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------- | | conversationIdentifier | string | A unique identifier generated for the conversation. | Yes | | startTime | timestamp | Specifies the starting time boundary for retrieving conversation entries. Must be greater than 0. If invalid, returns error code 10090. | Yes | | endTime | timestamp | Specifies the ending time boundary for retrieving conversation entries. Must be greater than 0 and greater than `startTime`. If invalid, returns error code 10091. If omitted, queries up to the current time. | No | | direction | string | Defines the order or direction in which conversation entries are retrieved. Valid values are `FROM_START` and `FROM_END`. | No | | limit | number | Sets a maximum number of conversation entries to be returned in the API response. Valid range is 1–20; server maximum is 20. If invalid, returns error code 10092. | No | ## Bring Your Own Bot Example ### Request ```json { "conversationIdentifier": "3f5e2d4e-e41c-424a-90db-df70c8153a67", "startTime": 1741763707000, "endTime": 1741765807000, "direction": "FROM_START", "limit": 20 } ``` ### Response ```json { "success": true, "conversationEntries": [ { "clientTimestamp": "1741763887000", "sender": { "appType": "CUSTOM", "subject": "EndUser123", "role": "EndUser" }, "entryPayload": "{\"entryType\":\"Message\",\"id\":\"12345678\",\"abstractMessage\":{\"messageType\":\"StaticContentMessage\",\"id\":\"123456\",\"staticContent\":{\"formatType\":\"Text\",\"text\":\"Hi. Message from EndUser123.\"}}}" }, { "clientTimestamp": "1741763707000", "sender": { "appType": "CUSTOM", "subject": "EndUser123", "role": "EndUser" }, "entryPayload": "{\"entryType\":\"Message\",\"id\":\"1122334455\",\"abstractMessage\":{\"messageType\":\"StaticContentMessage\",\"id\":\"1122334455\",\"staticContent\":{\"formatType\":\"Text\",\"text\":\"I have a question\"}}}" } ] } ``` # Retrieve the Invitation Key Retrieve the unique invitation key from the invitation URL that the user clicks. The invitation URL has two components: the invitation URL prefix and the invitation key. The invitation key is an auto-generated unique identifier. 1. Capture the invitation key from the invitation URL. For example, if the invitation URL is `https://YourSiteDomain/SiteURL/f482d103-4792-40ac-864a-57db0c13161b`, the invitation key is `f482d103-4792-40ac-864a-57db0c13161b`. After you capture the invitation key, fetch the invitation appointment details by using the key. # RFID Reader Represents a RFID Reader configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of IOT Sensor. ## Configuration Item Type Definition ||| |-|-| |Name|RFID Reader| |Developer Name|`SD_RfRe`| |Component|No| |End User Compute/Unmetered|No| |Parent|[IOT Sensor](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-iot-sensor.md)| |Rule Name|Default rule for all IP Cameras| |Identifier(s)|MAC address| ## Attributes No associated attributes for this configuration item type. # Route a Conversation Routes a newly-established conversation, transfers an existing conversation to a target participant, such as a rep, queue, bot, or Agentforce service agent, or adds more callers to an existing conversation through conferencing. Only use this API if routing is partner-owned (if `ConversationChannelDefinition.routingOwner` is set to `Partner`). When routing starts, a pending service routing (PSR) record is created. The PSR record is a Salesforce object that gets created when work is routed. The PSR is a transient object that contains routing information about a work item that’s in the midst of being routed. Once a rep accepts the work, the PSR record is deleted. If the PSR record isn’t automatically deleted, call the DELETE `/route` API to delete it. How this API is called depends on the information it uses to route the conversation: - **Routing based on the Messaging channel setting**–Defer to the routing preference that’s set in the Messaging channel by the Salesforce admin. This is the recommended approach. - **Flow-based routing**–Route the conversation based on the specified flow ID and fallback queue ID that’s specified in the payload. - **Queue-based routing**–Route the conversation based on the target queue ID that’s specified in the payload. If routing information is set in the Messaging channel as well as being passed using the `routingInfo` object in this API, the API takes precedence over the Omni-Channel Routing Messaging channel setting. This API applies to the following products: - Bring Your Own Channel for Contact Center as a Service - Bring Your Own Bot (BYOB) This API is available in version 61.0 and later. ## URI `v1/route` ## HTTP Method POST ## Headers ### Authorization (User-Level Authentication) **Format:** `Bearer ` String. Standard header. Used to authenticate the user, where `` is the Salesforce access token used as the bearer token to make requests to the Interaction Service APIs. Required. ### Content-Type **Format:** `application/json` String. Standard header. Format of the request payload. Required for any request that includes a body. ### OrgId **Format:** `` String. Custom header. The Salesforce org. `` is the 15-character Org ID of the Salesforce org. Required. ### RequestId **Format:** `` String. Custom header. Universally Unique Identifier (``) that references and tracks this request. Required. ### AuthorizationContext **Format:** `` String. Custom header. Additional information for the request authorization used to authenticate and validate requests against the connected app scopes. - For Bring Your Own Channel for CCaaS, set `` to the developer name of the ConversationChannelDefinition record. For example, Partner1_ChannelDefinition1. Required. - For Bring Your Own Bot (BYOB), set `` to the developer name of the ExtConvParticipantIntegDef record. For example, Partnerapp_ExtConvParticipantIntegDef. Required. ### AuthorizationContextType **Format:** `` String. Custom header. Specifies the type of context for the request. - For Bring Your Own Channel for CCaaS, set `` to **ConversationChannelDefinition**. - For Bring Your Own Bot (BYOB), set `` to **ExternalConversationParticipant**. ### Sample Header ``` -H $'Authorization: Bearer 00DSG000009SWby!...LN8XxeRIxGe' \ -H "content-type: application/json" \ -H "OrgId: 00DSG000009SWby" \ -H "AuthorizationContext: Partner1_ChannelDefinition1" \ -H "AuthorizationContextType: ConversationChannelDefinition" \ -H "RequestId: a1b23c45-c06a-4784-c96c-cb95d3321bda" \ ``` ## Parameters | Property Name | Type | Description | Required | | :---------------------------- | :----- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------- | | conversationIdentifier | string | The unique ID for the conversation channel. | Yes | | routingType | string | Determines whether the conversation that’s being routed is a new conversation, one that’s being transferred, or one that’s bringing in more participants through conferencing. Valid values include:
\- **Initial** \- A newly-established conversation.
\- **Transfer** \- An existing conversation that’s being transferred.
\- **Conference** \- An existing conversation that’s bringing in more participants through conferencing. This value is required if `routingContext` is required. | Yes | | routingInfo | object | The routing details, including flow details, specifying how a conversation is routed. This object is only required for newly-established conversations (`“routingType” : “Initial”`). Conversation routing can be based on an Omni-Channel flow that’s configured in the Messaging channel, flow-based (based on the flow ID and fallback queue ID), or queue-based (based on the target queue ID). If conversation routing is based on an Omni-Channel flow that’s configured in the Messaging channel, don’t include this object. If conversation routing is flow-based, include the `flow.flowId` and `flow.queueId` parameters. If conversation routing is based on the queue ID, set the `queueId` parameter. | No | | routingInfo.flow | object | If conversation routing is flow-based, set `flowId` to the unique ID of the `FlowDefinitionView` record, and set `queueId` to the ID of the fallback queue. You can also include optional routing attributes. | Yes | | routingInfo.queueId | string | If conversation routing is queue-based, set this value to the ID of the target queue. | Yes | | routingInfo.routingAttributes | object | An optional object containing custom data to use for routing the conversation. If Bring Your Own Channel for CCaaS conversation routing is flow-based and you [add support for custom parameters](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/add-custom-objects.html), set `routingAttributes` to a `key-value` pair, where `key` is set to the channel variable name in the parameter mapping, and `value` is set to the value of the custom parameter in Salesforce. The value length must be less than or equal to the Maximum Length that the Salesforce admin set for the custom parameter in Messaging Settings. | No | ## Example ### Routing Based on the Messaging Channel Setting This example routes a conversation based on the routing preference that’s set in the Messaging channel. ```json { "conversationIdentifier": "1234a5bc-52b8-43ed-9608-7997f7b88dc1", "routingType": "Initial" } ``` ### Flow-Based Routing This example routes a conversation based on the flow ID and fallback queue ID, plus optional routing attributes: ```json { "conversationIdentifier": "1234a5bc-52b8-43ed-9608-7997f7b88dc1", "routingType": "Initial", "routingInfo": { "flow":{ "flowId": "301SG00000Oq1tR", "queueId": "00GSG000004PZNl" }, "routingAttributes": { "input_OrderNumber" : "SAR21jac17emi14" } } } ``` ### Queue-Based Routing This example routes a conversation based on the ID of the target queue: ```json { "conversationIdentifier": "1234a5bc-52b8-43ed-9608-7997f7b88dc1", "routingType": "Transfer", "routingInfo": { "queueId": "00GSG000004PZNl" } } ``` ## Bring Your Own Bot Routing Examples For Bring Your Own Bot (BYOB), the Route Conversation API routes the conversation through the bot integration’s external conversation participant context. Set the `AuthorizationContextType` header to `ExternalConversationParticipant` and the `AuthorizationContext` header to the developer name of the `ExtConvParticipantIntegDef` record. ### Sample Header ``` -H $'Authorization: Bearer 00DSG000009SWby!...LN8XxeRIxGe' \ -H "content-type: application/json" \ -H "OrgId: 00DSG000009SWby" \ -H "AuthorizationContext: Partnerapp_ExtConvParticipantIntegDef" \ -H "AuthorizationContextType: ExternalConversationParticipant" \ -H "RequestId: a1b23c45-c06a-4784-c96c-cb95d3321bda" \ ``` ### Initial Routing with Flow This example routes a newly-established BYOB conversation based on the flow ID and fallback queue ID. ```json { "conversationIdentifier": "1234a5bc-52b8-43ed-9608-7997f7b88dc1", "routingType": "Initial", "routingInfo": { "flow": { "flowId": "301SG00000Oq1tR", "queueId": "00GSG000004PZNl" } } } ``` ### Transfer to Queue This example transfers an existing BYOB conversation to a queue. ```json { "conversationIdentifier": "1234a5bc-52b8-43ed-9608-7997f7b88dc1", "routingType": "Transfer", "routingInfo": { "queueId": "00GSG000004PZNl" } } ``` ## See Also - _GitHub_: [Interaction Service APIs](https://github.com/salesforce-misc/interaction-service-apis) - _Bring Your Own Channel for CCaaS:_ [Configure Partner-Owned Routing and Consent](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/configure-partner-routing-consent.html) - _Bring Your Own Channel for CCaaS:_ [Add Support for Custom Objects](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/add-custom-objects.html) - _Salesforce Help_: [Route Data to Objects in Bring Your Own Channel](https://help.salesforce.com/s/articleView?id=service.partner_messaging_parameters.htm) # Route Processor Module Represents a Route Processor Module configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. ## Configuration Item Type Definition ||| |-|-| |Name|Route Processor Module| |Developer Name|`SD_RoPrMo`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Network Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-network-device.md)| |Rule Name|Default rule for all Linux Servers| |Identifier(s)|MAC address Hostname| ## Attributes No associated attributes for this configuration item type. # Router Represents a Router configuration item in the Configuration Management Database (CMDB). This CI type is a subclass of Network Device. ## Configuration Item Type Definition ||| |-|-| |Name|Router| |Developer Name|`SD_Rouxx1`| |Component|No| |End User Compute/Unmetered|No| |Parent|[Network Device](https://developer.salesforce.com/docs/service/agentforce-it-service/guide/cmdb-ci-network-device.md)| |Rule Name|Default rule for all Cisco Satellite Receivers| |Identifier(s)|MAC address| ## Attributes No associated attributes for this configuration item type. # runApex() for Lightning Experience ## Usage Executes an Apex method from an Apex class that's exposed in Salesforce. This method is available in API version 38.0 or later. ## Syntax ```javascript sforce.opencti.runApex({ apexClass:STRING, methodName:STRING, methodParams:STRING, callback:FUNCTION //Optional }) ``` ## Arguments Pass a single `args` object with the following properties. |Name|Type|Description| |------|------|-------------| |`apexClass`|string|Specifies the Apex class of the method to execute.| |`methodName`|string|Specifies the method to execute.| |`methodParams`|string|Specifies the method parameters to pass. The string must include field value pairs formatted as a valid query string. If the Apex method doesn't take any parameters, specify `methodParams` as `none` or an empty object, `{}`.| |`callback`|function|JavaScript method called upon completion of the method. Optional.| Example `methodParams` value: ```javascript name=acme&phone=(212) 555-5555 ``` ## Sample Code–HTML and JavaScript 1. In Setup, create an Apex class and Apex method. ```javascript global class AccountRetrieval{ webService static String getAccount(String name) { List accounts = new List(); for (Account account : Database.query('Select Id, Name, phone from Account where Name like \'' + name + '%\'')){ accounts.add(account); } String JSONString = JSON.serialize(accounts); return JSONString; } } ``` 2. In Setup, click **Generate from WSDL** to expose the method and class so that a third-party softphone can call it. 3. Add your code to the softphone: ```html ``` 4. Output is returned. In this example, one account named Acme was found: ```javascript { "success": true, "returnValue": { "runApex": "[{\"attributes\":{\"type\":\"Account\",\"url\":\"/services/data/v38.0/sobjects/Account /001xx000003DGawAAG\"},\"Id\":\"001xx000003DGawAAG\",\"Name\":\"Acme\",\"Phone\":\"(212) 555-5555\"}]" }, "errors": null } ``` ## Response |Name|Type|Description| |------|------|-------------| |`success`|boolean|Returns `true` if the API method call was invoked successfully, `false` otherwise.| |`returnValue`|object|A JavaScript object containing the result from executing the method from the specified Apex class. No specific format is returned. The format is determined by the value from the method that executed.| |`errors`|array|If the API call was successful, this variable is `null`. If the API call failed, this variable returns an array of [error messages](https://developer.salesforce.com/docs/service/api-cti/guide/sforce-api-cti-error-messages-lightning.md).| Example `returnValue`: ```javascript {"runApex":"[{\"attributes\":{\"type\":\"Account\", \"url\":\"/services/data/v/sobjects/Account/ 001xx000003DGawAAG\"},\"Id\":\"001xx000003DGawAAG\", \"Name\":\"Acme\",\"Phone\":\"(212)555-5555\"}]"} ``` # runApex() for Salesforce Classic ## Usage Executes an Apex method from an Apex class that’s exposed in Salesforce. ## Syntax ```javascript sforce.interaction.runApex(apexClass:string, methodName:string, methodParams:string, (optional) callback:function) ``` ## Arguments |Name|Type|Description| |------|------|-------------| |`apexClass`|string|Specifies the Apex class of the method to execute.| |`methodName`|string|Specifies the method to execute.| |`methodParams`|string|Specifies the method parameters to pass. The string must include field value pairs and be formatted as a valid query string. For example:`name=acme&phone=(212) 555-5555`.| |`callback`|function|JavaScript method executed when the API method call is completed.| ## Sample Code–JavaScript 1. An administrator creates an Apex class and Apex method: ```javascript global class AccountRetrieval{ webService static String getAccount(String name) { List accounts = new List(); for (Account account : Database.query('Select Id, Name, phone from Account where Name like \'' + name + '%\'')){ accounts.add(account); } String JSONString = JSON.serialize(accounts); return JSONString; } } ``` 2. In the location where you’ve created the Apex class and method in Salesforce, click **Generate WSDL** to expose the method and class so that a third-party softphone can call it. 3. Add your code to the softphone: ```javascript ``` 4. Output is returned. In this example, one account named, Acme, was found: ```javascript [{"attributes":{"type":"Account", "url":"/services/data/v25.0/sobjects/Account/001x0000003DGQRAA4"}, "Id":"001x0000003DGQRAA4","Name":"Acme","Phone":"(212) 555-5555"}] ``` ## Response |Name|Type|Description| |------|------|-------------| |`result`|string|Returns the result from executing the method from the specified Apex class.No specific format is returned. The format is determined by the value from the method that was executed.| |`error`|string|If the API call was successful, this variable is undefined. If the API call failed, this variable returns an error message.| # Runs Represents the Runs relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. ## Relationship Type Definition ||| |-|-| |Developer Name|`SD_Runxx`| |Description|Defines the Runs relationship between configuration items in the CMDB.| |Master Label|Runs| |Direct Relationship|Runs| |Inverse Relationship|Runs On| |Line Stroke|Solid| |Color Code|`#2343f1`| # Runs On Represents the Runs On relationship type in the Configuration Management Database (CMDB). This relationship type defines how configuration items are connected to each other. ## Relationship Type Definition ||| |-|-| |Developer Name|`SD_RuOn`| |Description|Defines the Runs On relationship between configuration items in the CMDB.| |Master Label|Runs On| |Direct Relationship|Runs On| |Inverse Relationship|Runs| |Line Stroke|Solid| |Color Code|`#33CCFF`| # runSelectedMacro() Executes the selected macro in the macro widget. This method is only available in API version 36.0 or later. This method isn’t supported in Lightning Console. ## Syntax ```javascript sforce.console.runSelectedMacro ((optional)callback:Function) ``` ## Arguments |Name|Type|Description| |----|----|-----------| |`callback`|function|JavaScript method that is called when the method is completed| ## Sample Code–Visualforce ```apex_page Click here to run a macro ``` ## Response This method is asynchronous, so it returns its response in an object in a callback method. The response object contains the following field: |Name|Type|Description| |----|----|-----------| |`cause`|string|Explanation of function failure, if applicable| |`success`|boolean|`true` if running the macro was successful; `false` otherwise| # Sales Engagement Methods for Lightning Experience ## Usage These two methods allow your CTI implementation to communicate with [Sales Engagement](https://help.salesforce.com/articleView?id=high_velocity_sales.htm) to handle Sales Engagement work. The `onWorkStart` method lets you listen for when a Sales Engagement work item starts. You communicate back to Sales Engagement with the `completeWork` method when the work completes. These methods are available in API version 46.0 or later. **note:** You can use this method with the Lightning web component `lightning-click-to-dial`. You can also use it with the Aura component `lightning:clickToDial`. Keep in mind that you can’t use either component in iFrames. This method can’t be used with the Visualforce component `support:clickToDial`. **note:** `CallEnd` is deprecated as of API version 48.0. ## Syntax The `onWorkStart` method lets you listen for when work starts. Sales Engagement calls your listener function when the work starts. In your listener, the `completeWorkWhen` parameter specifies whether to call Sales Engagement back when the task is saved (`TaskSaved`). ```javascript sforce.opencti.hvs.onWorkStart({listener: FUNCTION}); { // Listener function payload workId: STRING, // Id of the current work completeWorkWhen: STRING, // 'TaskSaved' attributes: { to: STRING // Used to match to click_to_call } } ``` When the work completes (when the task is saved), call the `completeWork` method so that the Sales Engagement system can update its information. ```javascript sforce.opencti.hvs.completeWork({ workId: STRING, // Id from onWorkStart attributes: { disposition: STRING, // Only needed for task taskId: STRING, wasConnected: BOOLEAN, // Should be added, otherwise defaults to true }, callback: FUNCTION }); ``` **note:** Only call this method for outbound calls. Inbound calls aren't started by Sales Engagement. ## Arguments Arguments for `onWorkStart`: |Name|Type|Description| |------|------|-------------| |`listener`|function|Function that is called when the work is started. This function’s payload includes `workId`, `completeWorkWhen`, `attributes`, and `to`.| |`workId`|string|ID of the work item. Depending on the type of work, this value is either the step tracker ID or the my list ID.| |`completeWorkWhen`|string|Defines when to call the `completeWork` method. This value is `TaskSaved`.| |`attributes`|object|Attributes object that contains the `to` field.| |`to`|string|This field is used to link to the number in `onClickToDial`.| Arguments for `completeWork`: |Name|Type|Description| |------|------|-------------| |`workId`|string|ID of the work item. Use the same value that you previously received in `onWorkStart`.| |`attributes`|object|Attributes object that can contain the following fields: `disposition`, `taskId`, `wasConnected`.| |`disposition`|string|Value of the disposition. Required when `completeWorkWhen` is `TaskSaved`.| |`taskId`|string|ID of the task. Required when `completeWorkWhen` is `TaskSaved`.| |`wasConnected`|boolean|Indicates whether the call successfully connected. We recommend always passing this value. If not passed, the value defaults to true.| |`callback`|function|Function executed when the call completes.| ## Sample Code Listen for Sales Engagement work to start: ```javascript sforce.opencti.hvs.onWorkStart({ listener: function(payload) { var workId = payload.workId; // Save the work ID var whenVal = payload.completeWorkWhen; // Save the completion requirement var toVal = payload.attributes.to; // Save the number to associate with onClickToDial } }); ``` Call Sales Engagement when a task is saved: ```javascript sforce.opencti.hvs.completeWork({ workId: a07B0000006VFHrIAO, // Id sent via onWorkStart attributes: { disposition: 'Completed', // Disposition value taskId: '00TR00000032yfVMAQ' // ID of task created wasConnected: true // Whether the call successfully connected }, callback: function() { /* perform cleanup here */ } }); ``` # Salesforce Console Developer Guide The Lightning Console JavaScript API and the Salesforce Console Integration Toolkit both interact with Salesforce console apps. This guide provides reference material for both. Starting with API version 42.0 of the Salesforce Console Integration Toolkit, many of the methods used in existing Visualforce pages and third-party web tabs now work in Lightning Experience. Just point to the latest version of the toolkit script in your Visualforce pages or third-party web tabs. Third-party content must be allowlisted in the Trusted URLs list to be used in Lightning Experience. See [Classic Console API Methods Supported in the Lightning Console API](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-lightning-classic-bridge-methods.md) for a list of supported methods. To use this guide, it helps if you have a basic familiarity with: - JavaScript - Visualforce - Web services - Software development - Salesforce console - Lightning - Lightning console apps Ready to get started? - **[Get to Know Lightning Console](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/sforce-api-console-js-lex-intro.md)** Get started with the Salesforce console in Lightning Experience. - **[Get to Know the Utility Bar](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/sforce-api-console-js-utility.md)** The utility bar is a specialized type of Lightning page that gives your users quick access to common productivity tools. Utility bars are supported in Lightning Experience for desktop only. **See Also** - [How are the Classic and Lightning Console APIs Different?](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-js-lightning-ui-matters.md) - [Lightning Console JavaScript API](https://developer.salesforce.com/docs/service/api-console/guide/lightning-api/sforce-api-console-js-getting-started.md) - [Salesforce Console Integration Toolkit for Salesforce Classic](https://developer.salesforce.com/docs/service/api-console/guide/classic-api/sforce-api-console-intro.md) # Salesforce Console Developer Guide Previous PDF Versions | API Version | Release | PDF | | ----------- | ---------- | ----------------------------------------------------------------------------------------------- | | 68.0 | Winter '27 | [Download PDF](https://resources.docs.salesforce.com/264/latest/en-us/sfdc/pdf/api_console.pdf) | | 67.0 | Summer '26 | [Download PDF](https://resources.docs.salesforce.com/262/latest/en-us/sfdc/pdf/api_console.pdf) | | 66.0 | Spring '26 | [Download PDF](https://resources.docs.salesforce.com/260/latest/en-us/sfdc/pdf/api_console.pdf) | | 65.0 | Winter '26 | [Download PDF](https://resources.docs.salesforce.com/258/latest/en-us/sfdc/pdf/api_console.pdf) | # Salesforce Console Integration Toolkit Best Practices Salesforce recommends that you adhere to a few best practices as you use the Salesforce Console Integration Toolkit. - Many of the methods in the Salesforce Console Integration Toolkit are asynchronous and return their results using a callback method. We recommend that you refer to the documentation for each method to understand the information for each response. - Errors generated by the Salesforce Console Integration Toolkit are typically emitted in a way that doesn't halt JavaScript processing. Therefore, we recommend that you use a tool such as [Firebug for Firefox](https://addons.mozilla.org/en-US/firefox/addon/firebug/?src=ss) to monitor the JavaScript console and to help you debug your code. - Due to third-party cookie restrictions in modern web browsers, Visualforce pages can’t load in Salesforce Classic console apps when third-party cookies are disabled. See [Visualforce Limitations in Salesforce Classic When Third-Party Cookies are Blocked](https://help.salesforce.com/s/articleView?id=003786014&type=1). - To display Visualforce pages properly in the Salesforce Console, we recommend you: - Accept the default setting `showHeader="true"` and set `sidebar="false"` on the `apex:page` tag. - Set `Behavior` on custom buttons and links that include methods from the toolkit to display in an existing window without a sidebar or header. For more information, see Define Custom Buttons and Links” in the Salesforce online help. - When using Firefox, we recommend that you don't call `closeTab()` on a tab with an active alert box because the browser may not load properly. - Duplicate tabs might open when users initiate methods with invalid URLs. We recommend that you check URLs for validity before you include them in methods. - To prevent `External Page` from displaying as a tab name, we recommend that you specify the `tabLabel` argument on methods such as `openPrimaryTab()` and `openSubtab()`. - To enable the toolkit for third-party domains, add the domains to the allowlist of the Salesforce console. - The Salesforce Console Integration Toolkit methods don't work in nested iframes. For example, if you use a custom quick action in a feed, the methods still work as expected because the feed is in a single iframe. But if Development Mode is also enabled in your org, the methods no longer work because the iframe of the feed is nested inside the Development Mode iframe. # Salesforce Console Integration Toolkit for Salesforce Classic The Salesforce Console Integration Toolkit is a browser-based JavaScript API that provides you with programmatic access to the console in Salesforce Classic. The Salesforce Console Integration Toolkit uses browsers as clients to display pages as tabs in the console. For example, the toolkit lets you integrate third-party systems with the console, opening up an external application in the same window, in a tab. |Required Editions| |-----------------| |Available in: Salesforce Classic ([not available in all orgs](https://help.salesforce.com/s/articleView?id=sf.overview_edition_lex_only.htm))| |Available in: **Professional**, **Enterprise**, **Performance**, **Unlimited**, and **Developer** Editions| This guide explains how to use the Salesforce Console Integration Toolkit in JavaScript to embed API calls and processes. The toolkit is available for use with third-party domains, such as www.yourdomain.com; however, the examples in this guide are in Visualforce. The functionality it describes is available to your organization if you have: - Enterprise, Unlimited, Performance, or Developer Edition with the Service Cloud - Salesforce console The Salesforce Console Integration Toolkit supports any browser that the Salesforce console supports. **note:** To enable the toolkit for third-party domains, add the domains to the allowlist of the Salesforce console. - **[When to Use the Salesforce Console Integration Toolkit](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-when-to-use.md)** The Salesforce Console Integration Toolkit helps advanced administrators and developers implement custom functionality for the Salesforce console. For example, you can use the Salesforce Console Integration Toolkit to display Visualforce pages or third-party content as tabs in the Salesforce console. The Salesforce Console Integration Toolkit is an API that uses browsers as clients to display pages in the console. - **[Salesforce Console Integration Toolkit Support Policy](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-support.md)** The current release of the Salesforce Console Integration Toolkit is the only version that receives enhancements. - **[Change a Visualforce Page by Using the Salesforce Console Integration Toolkit](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-sample-vf.md)** Each implementation of Salesforce Console Integration Toolkit can look different. This example shows how to change the Salesforce console user interface using the Salesforce Console Integration Toolkit. - **[Working with the Salesforce Console Integration Toolkit](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-working.md)** You can use Salesforce Console Integration Toolkit to streamline a business process. - **[Methods for Salesforce Classic](https://developer.salesforce.com/docs/service/api-console/guide/methods/sforce-api-console-methods-classic.md)** If your org is using Salesforce Classic, use Salesforce Console Integration Toolkit methods. **See Also** - [*Salesforce Help*: Allow Domains for a Salesforce Console in Salesforce Classic](https://help.salesforce.com/apex/HTViewHelpDoc?id=console2_allowed_domains.htm) - [*Salesforce Help*: Supported Browsers and Devices](https://help.salesforce.com/articleView?id=getstart_browsers_sfx.htm) - [Methods for Salesforce Classic](https://developer.salesforce.com/docs/service/api-console/guide/methods/sforce-api-console-methods-classic.md) # Salesforce Console Integration Toolkit Support Policy The current release of the Salesforce Console Integration Toolkit is the only version that receives enhancements. Previous versions may or may not receive fixes. When a new version is released, the previous version remains available. - **[Backward Compatibility](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-backward-compatibility.md)** Salesforce strives to make backward compatibility easy when using the Salesforce Console Integration Toolkit. - **[End-of-Life](https://developer.salesforce.com/docs/service/api-console/guide/sforce-api-console-end-life.md)** Salesforce is committed to supporting each Salesforce Console Integration Toolkit version for a minimum of three years from the date of its first release. To improve the quality and performance of the Salesforce Console Integration Toolkit, versions that are more than three years old may not be supported. # Salesforce Feedback Management Developer Guide Previous PDF Versions | API Version | Release | PDF | | ----------- | ---------- | --------------------------------------------------------------------------------------------------------- | | 68.0 | Winter '27 | [Download PDF](https://resources.docs.salesforce.com/264/latest/en-us/sfdc/pdf/salesforce_feedback_management_dev_guide.pdf) | | 67.0 | Summer '26 | [Download PDF](https://resources.docs.salesforce.com/262/latest/en-us/sfdc/pdf/salesforce_feedback_management_dev_guide.pdf) | | 66.0 | Spring '26 | [Download PDF](https://resources.docs.salesforce.com/260/latest/en-us/sfdc/pdf/salesforce_feedback_management_dev_guide.pdf) | | 65.0 | Winter '26 | [Download PDF](https://resources.docs.salesforce.com/258/latest/en-us/sfdc/pdf/salesforce_feedback_management_dev_guide.pdf) | # Salesforce Flow for Service Give your users a list of logical next steps with Salesforce Flow for Service and the Actions & Recommendations component. To create the list, associate actions with a record page using an Actions & Recommendations deployment, Salesforce automation tools, or API. You can configure default actions for specific channels, like phone or chat, and select the actions that you want users to complete first and last. | Required Editions | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Available in: Lightning Experience | | Available in: **Essentials**, **Professional**, **Enterprise**, **Performance**, **Unlimited**, and **Developer** Editions
Lightning console apps are available for an extra cost to users with Salesforce Platform user licenses for certain products. Some restrictions apply. For pricing details, contact your Salesforce account executive. | Specify which actions to show in the component on your Lightning pages. When you set up a deployment or use an API, you can also display the top recommendations that result from your Einstein Next Best Action strategies. The component shows a list of RecordAction junction objects. A RecordAction associates an action, such as a screen flow, a field service mobile flow, an autolaunched flow, or a quick action, with the parent record. A RecordAction is also created when a user accepts a Next Best Action recommendation; then the RecordAction associates the flow in the recommendation with the record. When the user clicks a step in the list, the associated action in the RecordAction object launches. You can also set up the first action to auto-launch when the record page opens. If the action is a screen flow, for example, it starts in a subtab of a console app or in a window for a standard navigation app. When the user confirms the start of an autolaunched flow, it runs in the background. Quick actions open in a window. The Actions & Recommendations component helps your users: - Identify which steps to complete for a specific record and in which order - Consider customized actions and offers that result from an Einstein Next Best Action strategy, such as a discount, a repair, or an add-on service - Restart flows that users have paused, and view stages in an active flow if stages are defined - Identify and complete flows that are mandatory - Find and start another action from a subset that you configure - Understand the history of actions taken on a record, including when each action was started, paused, resumed, and completed and by whom Here’s an example of Salesforce Flow for Service set up in the Service Console app. The flow in the subtab helps agents verify the identity of an incoming caller. ![Screen shot of the Service Console set up with Salesforce Flow for Service.](https://developer.salesforce.com/docs/media/guided_engagement_service_runtime.png) Before you add the component to your Lightning pages, first set up the flows and quick actions that you want to show. If you want to include recommendations from Next Best Action strategies, configure them first as well. Then create an Actions & Recommendations deployment. A deployment captures settings that you can reuse on multiple pages. Place the component on your Lightning pages, and select the deployment in component properties. **tip:** Learn how to put the Actions & Recommendations component to work for your agents. The [Salesforce Flow for Service module on Trailhead](https://trailhead.salesforce.com/en/content/learn/modules/service_lightning_flow_for_service) can help you get started. Never heard of flows and process automation? Many of the tasks you assign, the emails you send, and other record updates are vital parts of your standard business processes. Instead of doing this repetitive work manually, you can configure flows and processes to do it automatically. To learn more, check out [Automate Your Business Processes](https://help.salesforce.com/s/articleView?id=platform.platform_automation.htm) in Salesforce Help. - **[Supported Apps, Channels, Actions, and Objects in Lightning Flow for Service](https://developer.salesforce.com/docs/service/salesforce-guided-engagement/guide/guided-engagement-support.md)** Lightning Flow for Service is supported in Lightning console and standard navigation apps. You can set it up to work with Open CTI for phone integration, including support for unknown callers, and Chat in Lightning Experience for chat integration. - **[Lightning Flow for Service Example Use Case](https://developer.salesforce.com/docs/service/salesforce-guided-engagement/guide/guided-engagement-sample-use-case.md)** Lightning Flow for Service can help your agents follow consistent procedures when a customer calls or a support issue comes in. You can associate actions with a new record, such as a case or contact record, and show agents a to-do list for the record page. - **[Implementing the Example Use Case](https://developer.salesforce.com/docs/service/salesforce-guided-engagement/guide/guided-engagement-sample-implementation.md)** You can configure the Actions & Recommendations component in several ways. Creating a deployment in Setup is an easy way to create RecordActions that appear in the list. - **[Enhance the User Experience](https://developer.salesforce.com/docs/service/salesforce-guided-engagement/guide/guided-engagement-sample-user-experience.md)** The Actions & Recommendations component gives your agents a clear set of steps to follow. Help your agents be more productive by fine-tuning how they use the list. - **[Lightning Flow for Service Considerations](https://developer.salesforce.com/docs/service/salesforce-guided-engagement/guide/guided-engagement-considerations.md)** Learn about how packaging, change sets, and the sharing model can impact your Lightning Flow for Service implementation. **See Also** - [Trailhead module: Lightning Flow for Service](https://trailhead.salesforce.com/en/content/learn/modules/service_lightning_flow_for_service) # Salesforce Knowledge Developer Guide Previous PDF Versions | API Version | Release | PDF | | ----------- | ---------- | ------------------------------------------------------------------------------------------------------------------ | | 67.0 | Summer '26 | [Download PDF](https://resources.docs.salesforce.com/262/latest/en-us/sfdc/pdf/salesforce_knowledge_dev_guide.pdf) | | 66.0 | Spring '26 | [Download PDF](https://resources.docs.salesforce.com/260/latest/en-us/sfdc/pdf/salesforce_knowledge_dev_guide.pdf) | | 65.0 | Winter '26 | [Download PDF](https://resources.docs.salesforce.com/258/latest/en-us/sfdc/pdf/salesforce_knowledge_dev_guide.pdf) | | 64.0 | Summer '25 | [Download PDF](https://resources.docs.salesforce.com/256/latest/en-us/sfdc/pdf/salesforce_knowledge_dev_guide.pdf) | # Salesforce Knowledge Metadata API You can manage articles, page layouts, and data categories with the Metadata API. The main purpose of Metadata API is to move metadata between Salesforce orgs during the development process. Use Metadata API to deploy, retrieve, create, update, or delete customization information, such as custom object definitions and page layouts. Metadata API doesn’t work directly with business data. - [ArticleType](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_articletype.htm) - [KnowledgeSettings](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_knowledgesettings.htm) - [DataCategoryGroup](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_datacategorygroup.htm) - [SeachSettings](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_searchsettings.htm) - [SearchLayouts](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_searchlayouts.htm) - [SynoymDictionary](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_synonymdictionary.htm) - [ExternalDataSource](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_externaldatasource.htm) For generic Metadata API information see the [Metadata API Developer Guide](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/). # Salesforce Knowledge REST APIs You can manage articles and get support information with REST APIs. REST API uses the same underlying [data model](https://developer.salesforce.com/docs/service/salesforce-knowledge-dev-guide/guide/knowledge-development-object-model.md) and [standard objects](https://developer.salesforce.com/docs/service/salesforce-knowledge-dev-guide/guide/knowledge-development-soap-intro.md) as those in SOAP API. For generic REST API information see the [REST API Developer Guide](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/). # Salesforce Knowledge SOAP API You can manage articles and get support information with Salesforce Objects using the SOAP API. ## Objects Use these Salesforce platform objects for working with Salesforce Knowledge. - [KnowledgeArticle](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_knowledgearticle.htm) - [KnowledgeArticleVersion](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_knowledgearticleversion.htm) - [Knowledge\_\_DataCategorySelection](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_knowledge__datacategoryselection.htm) - [Knowledge\_\_Feed](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_knowledge__feed.htm) - [Knowledge\_\_kav](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_knowledge__kav.htm) - [Knowledge\_\_ka](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_knowledge__ka.htm) - [KnowledgeArticleVersionHistory](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_knowledgearticleversionhistory.htm) - [KnowledgeArticleViewStat](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_knowledgearticleviewstat.htm) - [KnowledgeArticleVoteStat](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_knowledgearticlevotestat.htm) - [CaseArticle](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_casearticle.htm) - [LinkedArticle](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_linkedarticle.htm) - [RecentlyViewed](https://developer.salesforce.com/docs/atlas.en-us.262.0.object_reference.meta/object_reference/sforce_api_objects_recentlyviewed.htmhttps://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_recentlyviewed.htm) - [SearchPromotionRule](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_searchpromotionrule.htm) - [TopicAssignment](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_topicassignment.htm) ## Calls Use these SOAP API calls for working with Salesforce Knowledge. - [describeKnowledge()](https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_calls_describeknowledge.htm) - [describeDataCategoryGroups()](https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_calls_describedatacategorygroups.htm) - [describeDataCategoryGroupStructures()](https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_calls_describedatacategorygroupstructures.htm) - [search()](https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_calls_search.htm) # Salesforce Knowledge UI API Retrieve and update data and metadata of Salesforce Knowledge records with the UI API to help build your Lightning Experience UI for your mobile or custom web app. **note:** UI API isn’t supported for Classic Knowledge. To learn how to use the UI API, go to the [User Interface API Developer Guide](https://developer.salesforce.com/docs/atlas.en-us.uiapi.meta/uiapi/). You can find supported Knowledge objects and how to use them in the [Supported Objects](https://developer.salesforce.com/docs/atlas.en-us.uiapi.meta/uiapi/ui_api_get_started_supported_objects.htm) section of the UI API Developer Guide. - [All Supported Objects](https://developer.salesforce.com/docs/atlas.en-us.uiapi.meta/uiapi/ui_api_all_supported_objects.htm)—CaseArticle, KnowledgeArticleVersion, and LinkedArticle - [List View Supported Objects](https://developer.salesforce.com/docs/atlas.en-us.uiapi.meta/uiapi/ui_api_list_view_supported_objects.htm)—KnowledgeArticleVersion - [Most Recently Used List View Supported Objects](https://developer.salesforce.com/docs/atlas.en-us.uiapi.meta/uiapi/ui_api_mru_list_view_supported_objects.htm)—KnowledgeArticleVersion # Salesforce Knowledge with SOQL and SOSL Use the Salesforce Object Query Language (SOQL) to search your organization's Knowledge data for specific information. SOQL is similar to the SELECT statement in the widely used Structured Query Language (SQL) but is designed specifically for Salesforce. Use the Salesforce Object Search Language (SOSL) to construct text-based search queries against the search index. Keep the following limits in mind when querying `KnowledgeArticleVersion`. - Filter on a single value of PublishStatus for best results. To find all versions of each article, omit the PublishStatus filter, but do filter on one or more master key IDs. To retrieve all archived versions for a given article, specify a SOQL filter where IsLatestVersion is `false`. - In API version 46.0 and earlier, queries without a filter on PublishStatus return published articles by default. In API version 47.0 and later, draft, published, and archived articles are returned when Lightning Knowledge is enabled. - To support security, only users with the "View Draft Articles" permission see articles whose PublishStatus value is `Draft`. Similarly, only users with the "View Archived Articles" permission see articles whose PublishStatus value is `Archived`. - Archived article versions are stored in the `{Knowledge}__kav` object. To query archived article versions, specify the article Id and set `IsLatestVersion='0'`. You can't use binding variables in Apex SOQL statements with KnowledgeArticleVersion objects. For example, the following SOQL statement causes a compilation error. ```soql final String PUBLISH_STATUS_ONLINE = 'Online'; List articles = [ SELECT Id FROM Knowledge__kav WHERE PublishStatus = :PUBLISH_STATUS_ONLINE ]; ``` Instead, use dynamic SOQL as follows. See [Dynamic SOQL](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_dynamic_soql.htm) in _Apex Developer Guide_. ```soql final String PUBLISH_STATUS_ONLINE = 'Online'; final String q = 'SELECT Id, PublishStatus FROM Knowledge__kav WHERE PublishStatus = :PUBLISH_STATUS_ONLINE'; List articles = Database.query(q); ``` For generic SOQL and SOSL information see the [SOQL and SOSL Reference](https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/). # Salesforce Knowledge, Apex, and Visualforce With the power of Apex and Visualforce, you can customize the look and feel of your knowledge base; for example, with custom search pages or a robust article publishing cycle. Apex is a strongly typed, object-oriented programming language that allows developers to execute flow and transaction control statements on the server in conjunction with calls to the API. Using syntax that looks like Java and acts like database stored procedures, Apex enables developers to add business logic to most system events, including button clicks, related record updates, and Visualforce pages. Apex code can be initiated by Web service requests and from triggers on objects. Visualforce is a framework that allows developers to build sophisticated, custom user interfaces that can be hosted natively on the Lightning Platform. The Visualforce framework includes a tag-based markup language, similar to HTML, and a set of server-side “standard controllers” that makes basic database operations, such as queries and saves, very simple to perform. Due to the endless possibilities with Apex and Visualforce, only the Apex Publishing Service class is in this guide. For more Apex and Visualforce information see the [Apex Developer Guide](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/) and the [Visualforce Developer Guide](https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/). # Salesforce Scheduler Apex Classes Salesforce Scheduler provides the `ConnectApi` namespace (also called Connect in Apex) and `LxScheduler` namespace that contains classes for accessing the same data available in the Salesforce Scheduler Business APIs. You can use these apex classes as an alternative to the Salesforce Scheduler Business APIs to simplify appointment scheduling in Salesforce. For example, use the `createServiceAppointment(createServiceAppointmentInput)` method of the `ConnectApi` namespace as an alternative to the `service-appointments` Connect API to create service appointments. **note:** Salesforce Scheduler is built on the Salesforce platform (also known as Lighting Experience). The Salesforce platform specific Apex governor limits apply to the Salesforce Scheduler Apex classes and methods requests. For more information on the Lightning platform Apex governor limits, see [Apex Governor Limits](https://developer.salesforce.com/docs/atlas.en-us.salesforce_app_limits_cheatsheet.meta/salesforce_app_limits_cheatsheet/salesforce_app_limits_platform_apexgov.htm) in Salesforce Developer Limits and Allocations Quick Reference. The following table lists the available Salesforce Scheduler Apex methods, as well as the corresponding Connect REST API. |Apex Method|Connect REST API| |-----------|----------------| |[`createServiceAppointment(createServiceAppointmentInput)`](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_ConnectAPI_LightningScheduler_static_methods.htm#apex_ConnectAPI_LightningScheduler_createServiceAppointment_2)|[`service-appointments (POST)`](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_resources_service_appointments.htm)| |[`updateServiceAppointment(updateServiceAppointmentInput)`](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_ConnectAPI_LightningScheduler_static_methods.htm#apex_ConnectAPI_LightningScheduler_updateServiceAppointment_1)|[`service-appointments (PATCH)`](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_resources_service_appointments.htm)| |[`getAppointmentCandidates(getAppointmentCandidatesInput)`](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_lxscheduler_SchedulerResources.htm#apex_lxscheduler_SchedulerResources_getAppointmentCandidates)|[`getAppointmentCandidates (POST)`](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/requests_ls_getappointmentcandidates.htm)| |[`getAppointmentSlots(getAppointmentSlotsInput)`](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_lxscheduler_SchedulerResources.htm#apex_lxscheduler_SchedulerResources_getAppointmentSlots)|[`getAppointmentSlots (POST)`](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/requests_ls_getappointmentslots.htm)| **See Also** - [Salesforce Developer Limits and Allocations Quick Reference: About This Quick Reference](https://developer.salesforce.com/docs/atlas.en-us.salesforce_app_limits_cheatsheet.meta/salesforce_app_limits_cheatsheet/salesforce_app_limits_overview.htm) # Salesforce Scheduler Business APIs Salesforce Scheduler gives various developer resources that you need to simplify appointment scheduling in Salesforce. These resources include REST APIs and Connect REST APIs. The APIs don't have full parity, and you may need to use both REST and Connect to accomplish your business goals. - **[REST APIs](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/salesforce-scheduler-rest-apis.md)** Use Salesforce Scheduler REST APIs to get appointment time slots and available service resources based on work type groups and service territories. - **[Connect APIs](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/salesforce-scheduler-connect-apis.md)** Use Salesforce Scheduler Connect REST APIs to get service territories, get consolidated availability of each service resource within specified territories, and create service appointments. - **[Error Codes and Responses](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/scheduler-error-codes/salesforce-scheduler-error-codes-description.md)** When using the APIs in Salesforce Scheduler, you may encounter error codes and messages under certain conditions. For each Scheduler API, it lists the potential error codes, the associated error messages, and a description of what causes the error to occur. # Salesforce Scheduler Custom Objects This section provides details on custom objects, including junction objects. The Junction Object is a custom object that enables you to link a custom object with a large number of child records and link each child record to a large number of parent objects. Salesforce Scheduler is available for an extra cost in Lightning Experience. Available in: Enterprise, Unlimited, Performance, and Developer editions. - **[ActionableListMbrInvitation](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/objects/sforce-api-objects-actionablelistmbrinvitation.md)** Represents a relationship between an Actionable List Member and an Appointment Invitation. This object is available in API version 59.0 and later. - **[EngagementChannelType](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/objects/sforce-api-objects-engagementchanneltype.md)** Represents a channel through which a customer can be reached for communication. The Engagement Channel Type object supports only the English language. This object is available in API version 48.0 and later. - **[EngagementChannelWorkType](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/objects/sforce-api-objects-engagementchannelworktype.md)** Represents the relationship between an Engagement Channel Type object and a Work Type object for Salesforce Scheduler. This object is available in API version 56.0 and later. - **[ShiftEngagementChannel](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/objects/sforce-api-objects-shiftengagementchannel.md)** Represents the relationship between a Shift object and an Engagement Channel Type object for Salesforce Scheduler. This object is available in API version 56.0 and later. - **[ShiftWorkTopic](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/objects/sforce-api-objects-shiftworktopic.md)** Represents the relationship between a Shift object and a Work Type or Work Type Group object for Salesforce Scheduler. This object is available in API version 56.0 and later. - **[WaitlistServiceResource](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/objects/sforce-api-objects-waitlistserviceresource.md)** Represents the relationship between the Waitlist object and the Service Resource object for Salesforce Scheduler. This object is available in API version 58.0 and later. - **[WaitlistWorkType](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/objects/sforce-api-objects-waitlistworktype.md)** Represents the relationship between the Waitlist object and the Work Type object for Salesforce Scheduler. This object is available in API version 58.0 and later. - **[WorkTypeGroupMember](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/objects/sforce-api-objects-worktypegroupmember.md)** Represents the relationship between a work type and the work type group it belongs to. This object is available in API version 45.0 and later. **See Also** - [Create a Many-to-Many Object Relationship](https://help.salesforce.com/s/articleView?id=platform.relationships_manytomany.htm&type=5) # Salesforce Scheduler Data Model Overview Learn about the objects and relationships within the Salesforce Scheduler data model that represent appointments and employees who can be scheduled to attend appointments. **note:** Not all fields are specified in this data model. ![data model](https://developer.salesforce.com/media/salesforce-scheduler-dev-guide/ls_data_model.png) View the [Salesforce Scheduler data model](https://developer.salesforce.com/docs/platform/data-models/guide/salesforce-scheduler.html) in the Salesforce Developer documentation. # Salesforce Scheduler Developer Guide Previous PDF Versions | API Version | Release | PDF | | ----------- | ---------- | ------------------------------------------------------------------------------------------------------------------ | | 68.0 | Winter '27 | [Download PDF](https://resources.docs.salesforce.com/264/latest/en-us/sfdc/pdf/salesforce_scheduler_dev_guide.pdf) | | 67.0 | Summer '26 | [Download PDF](https://resources.docs.salesforce.com/262/latest/en-us/sfdc/pdf/salesforce_scheduler_dev_guide.pdf) | | 66.0 | Spring '26 | [Download PDF](https://resources.docs.salesforce.com/260/latest/en-us/sfdc/pdf/salesforce_scheduler_dev_guide.pdf) | | 65.0 | Winter '26 | [Download PDF](https://resources.docs.salesforce.com/258/latest/en-us/sfdc/pdf/salesforce_scheduler_dev_guide.pdf) | # Salesforce Scheduler Metadata API Types Metadata API enables you to access some types and feature settings that you can customize in the user interface. For more information about Metadata API and to find a complete reference of existing metadata types, see [Metadata API Developer Guide](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/). - **[IndustriesSettings](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/meta-scheduler-industriessettings.md)** Represents settings for Salesforce Scheduler. # Salesforce Scheduler Platform Events Use the ServiceAppointmentEvent platform event to notify subscribers about service appointment details. This platform event object is available within the Salesforce Scheduler platform. ## Platform Event Objects - [ServiceAppointmentEvent](https://developer.salesforce.com/docs/atlas.en-us.platform_events.meta/platform_events/sforce_api_objects_serviceappointmentevent.htm) — Notifies subscribers of the service appointment details that are generated from the event platform. # Salesforce Scheduler Standard Objects Salesforce Scheduler gives you access to a suite of standard objects that you can find in Setup and as tabs in Salesforce. Salesforce Scheduler shares these objects with Field Service. These objects make up the core Salesforce Scheduler features, including appointments. Salesforce Scheduler is available for an extra cost in Lightning Experience. Available in: Enterprise, Unlimited, Performance, and Developer editions. The following is a list of standard objects currently available within the Salesforce Scheduler platform. - **[AppointmentCategory](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/objects/sforce-api-objects-appointmentcategory.md)** Represents the category of work types and shifts. This object is available in API version 58.0 and later. - **[AppointmentInvitation](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/objects/sforce-api-objects-appointmentinvitation.md)** Represents information about an appointment invitation that’s created for customers who can use it for booking appointments. This object is available in API version 55.0 and later. - **[AppointmentInvitee](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/objects/sforce-api-objects-appointmentinvitee.md)** Represents information about the participant and resources required for creating an appointment invitation URL. This object is available in API version 55.0 and later. - **[AssignedResource](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/objects/sforce-api-objects-assignedresource.md)** Represents a service resource who is assigned to a service appointment in Salesforce Scheduler. Assigned resources appear in the Assigned Resources related list on service appointments. This object is available in API version 38.0 and later. - **[Holiday](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/objects/sforce-api-objects-holiday.md)** Represents the fields in the Holiday object that are used by Salesforce Scheduler. A holiday is a period during which your service resource is unavailable for appointment scheduling. - **[OperatingHours](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/objects/sforce-api-objects-operatinghours.md)** Represents the hours in which a service territory, service resource, or account is available for work in Salesforce Scheduler. This object is available in API version 38.0 and later. - **[ResourcePreference](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/objects/sforce-api-objects-resourcepreference.md)** Represents an account’s preference for a specified service resource. - **[ResourceAbsence](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/objects/sforce-api-objects-resourceabsence.md)** Represents a time period in which a service resource is unavailable to work in Salesforce Scheduler. This object is available in API version 38.0 and later. - **[ServiceAppointment](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/objects/sforce-api-objects-serviceappointment.md)** Represents an appointment booked through Salesforce Scheduler. This object is available in API version 38.0 and later. - **[ServiceAppointmentAttendee](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/objects/sforce-api-objects-serviceappointmentattendee.md)** Represents a Lead, Contact, or Person Account who is associated with the Service Appointment of type Group. This object is available in API version 60.0 and later. - **[ServiceResource](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/objects/sforce-api-objects-serviceresource.md)** Represents a technician or an asset. This object is available in API version 38.0 and later. - **[ServiceResourceSkill](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/objects/sforce-api-objects-serviceresourceskill.md)** Represents a skill that a service resource possesses in Salesforce Scheduler. This object is available in API version 38.0 and later. - **[ServiceTerritory](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/objects/sforce-api-objects-serviceterritory.md)** Represents a geographic or functional region in which work can be performed in Salesforce Scheduler. This object is available in API version 38.0 and later. - **[ServiceTerritoryMember](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/objects/sforce-api-objects-serviceterritorymember.md)** Represents a service resource who can be assigned to service appointments in a service territory in Salesforce Scheduler. This object is available in API version 38.0 and later. - **[Shift](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/objects/sforce-api-objects-shift.md)** Represents a shift for service resource scheduling. This object is available in API version 46.0 and later. - **[Skill](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/objects/sforce-api-objects-skill.md)** Represents a skill that service resources have. This object is available in API version 24.0 and later. - **[SkillRequirement](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/objects/sforce-api-objects-skillrequirement.md)** Represents a skill that is required to complete a particular task in Salesforce Scheduler. Skill requirements can be added to work types Salesforce Scheduler. This object is available in API version 38.0 and later. - **[TimeSlot](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/objects/sforce-api-objects-timeslot.md)** Represents a period of time on a specified day of the week during which work can be performed in Salesforce Scheduler. Operating hours consist of one or more time slots. This object is available in API version 38.0 and later. - **[Waitlist](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/objects/sforce-api-objects-waitlist.md)** Represents a queue to which drop in customers who visit the branch without an already scheduled appointment are added. This object is available in API version 58.0 and later. - **[WaitlistParticipant](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/objects/sforce-api-objects-waitlistparticipant.md)** Represents a customer who is added to a waitlist. This object is available in API version 58.0 and later. - **[WorkType](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/objects/sforce-api-objects-worktype.md)** Represents a type of work to be performed in Salesforce Scheduler. This object is available in API version 38.0 and later. - **[WorkTypeGroup](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/objects/sforce-api-objects-worktypegroup.md)** Represents a grouping of work types used to categorize types of appointments available in Salesforce Scheduler. This object is available in API version 45.0 and later. - **[WorkTypeGroupDataTranslation](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/objects/sforce-api-objects-worktypegroupdatatranslation.md)** Represents the translated values of the data stored within a [WorkTypeGroup](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/objects/sforce-api-objects-worktypegroup.md) record’s fields. This object is available in API version 54.0 and later. - **[Additional Salesforce Scheduler Objects](https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/salesforce-scheduler-object-reference-parent.md)** Additional Salesforce Scheduler objects, including appointment assignment, scheduling policies, and related junction objects that are documented in the Salesforce Object Reference. # Salesforce Surveys Apex Classes Salesforce Surveys provides the `ConnectApi` namespace (also called Connect in Apex) and `sfdc_surveys` namespace that contains classes for creating and sending survey invitations. - **[sfdc_surveys Namespace](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/apex/reference/ns-sfdc-surveys/apex-namespace-sfdc-surveys.md)** The `sfdc_surveys` namespace provides an interface for shortening survey invitations. - **[ConnectApi Namespace](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/salesforce-surveys-connect-api-namespace.md)** The `ConnectApi` namespace (also called Connect in Apex) provides classes for creating surveys. - **[industriesNlpSvc](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/apex/reference/ns-industriesnlpsvc/apex-namespace-industriesnlpsvc.md)** Stores the objects used in Industries Einstein Natural Language Processing (NLP) services. # Salesforce Surveys Business APIs Salesforce Feedback Management (SFM) developer resources include Connect REST APIs that you can use to create engaging, personalized surveys in Salesforce. Use the SFM Connect REST APIs to build in-app surveys in Salesforce Lightning pages, such as the home page or record pages for users to respond in Salesforce. - **[Surveys for Authenticated Participants](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/salesforce-surveys-for-authenticated-participants.md)** Use Salesforce Feedback Management (SFM) Response APIs to create survey invitations and to enable survey responses from authenticated participants. - **[Surveys for Unauthenticated Participants](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/salesforce-surveys-for-unauthenticated-participants.md)** Use Salesforce Feedback Management (SFM) unAuth Response APIs to create survey invitations and to enable survey responses from unauthenticated participants. # Salesforce Surveys Invitation Emails Resource Email survey invitations to up to 300 participants. You can email leads, contacts, or users in your org. Either a link to launch the survey or a question can be embedded in the email invitations. ## Resource ```nolang /connect/surveys/SURVEY_ID/survey-invitation-emails ``` Where `SURVEY_ID` is a variable. ## Available Version 50.0 ## HTTP Methods POST ## Request Body for POST ### Root XML tag `` ### JSON Example ```nolang { "recipients":["003x0000003j8CEAAY"], "collectAnonymousResponse":false, "allowParticipantsAccessTheirResponse":false, "allowGuestUserResponse":true, "isPersonalInvitation":true, "emailTemplateId":"00Xx0000000LwAuEAK", "surveyQuestionIds":["0Kux000000003yBCAQ"], "invitationExpirationDate":"2020-07-31T21:32:54", "fromEmailAddress":"abeeram@salesforce.com", "invitationOwner":"0054V00000FZTjJ", "shareInvitationsWith":["0054V00000FZTjJ"], "associateRecordsWithRecipients":[{"recipientId":"003x0000003j8CEAAY","associateRecordIds":["001x0000004EWIZAA4"]}], "recipientEngagementContexts":[{"recipientId" : "003x0000003j8CEAAY","recipientEngagementContext":{"TestKey" :"TestValue"}}] } ``` ### Properties |Name|Type|Description|Required or Optional|Available Version| |----|----|-----------|--------------------|-----------------| |`allowGuest​UserResponse`|Boolean|Specifies whether participants who don't have a Salesforce account can respond (`true`) or not (`false`).|Required|50.0| |`allowParticipants​AccessTheir​Response`|Boolean|Specifies whether participants can see their responses (`true`) or not (`false`).|Required|50.0| |`associateRecords​WithRecipients`|[Survey Recipient Survey Subjects Input](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/requests/connect-requests-survey-recipient-survey-subjects-input.md)[]|Maps each recipient with another record that must be associated with the recipient's survey invitation.|Optional|50.0| |`body`|String|Content of the email. Specify the email body in case you don't specify an email template. The email body must contain one of these merge fields:
  • To embed a link to launch the survey: [[SURVEY_INVITATION_URL]]
  • To embed a survey question: {{{SurveyQuestion.QuestionName}}} and {{{SurveyQuestion.QuestionHtmlContent}}}
|Optional|50.0| |`collectAnonymous​Response`|Boolean|Specifies whether participants can respond anonymously (`true`) or not (`false`).|Required|50.0| |`communityId`|String|ID of the site that's used to open the survey for users outside your org.|Optional|50.0| |`emailTemplateId`|String|ID of the Lightning email template that's used to send the survey invitation. The template must contain the required merge fields that embed either the survey link or a question in the email. Only Lightning email templates are used to send survey invitations.|Optional|50.0| |`fromEmail​Address`|String|Email ID of the user or the org-wide email address associated with the user's profile.|Required|50.0| |`invitation​ExpirationDate`|String|Date on which the survey invitation expires.|Optional|50.0| |`invitationOwner`|String|ID of the owner of the survey invitation records.|Optional|50.0| |`isPersonal​Invitation`|Boolean|Specifies whether a unique invitation is created for each participant (`true`) or not (`false`). When a participant responds using a personal invitation, the response record is associated with the participant's Salesforce record.|Required|50.0| |`recipient​Engagement​Contexts`|[Survey Recipient Engagement Context Input](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/requests/connect-requests-survey-recipient-engagement-context-input.md)[]|Maps each recipient with the context based on which the survey invitation is emailed.|Optional|50.0| |`recipients`|String[]|List of up to 300 IDs of leads, contacts, or users to whom the survey invitation is emailed.|Required|50.0| |`sendEmail​ThroughUma`|Boolean|Specifies whether to send the email through Marketing Cloud (`true`) or not (`false`). If unspecified, defaults to `false`.|Optional|65.0| |`shareInvitations​With`|String[]|IDs of the users with whom the survey invitation records must be shared. The invitation records are shared with Read access.|Optional|50.0| |`subject`|String|Subject of the email. Specify the subject in case you don't specify an email template.|Optional|50.0| |`surveyQuestion​Ids`|String[]|IDs of the questions that are embedded in the email. You can send an email invitation for questions of these types: Net Promoter Score (NPS), rating, and score.|Optional|50.0| ## Response Body for POST [Survey Email](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/responses/connect-responses-survey-email.md) # Salesforce Surveys Object Model Learn about how Salesforce Surveys objects relate to one another in Salesforce. ![This diagram represents the object model for Salesforce Surveys.](https://developer.salesforce.com/media/salesforce-feedback-management-dev-guide/salesforce-surveys-data-model.png) This diagram represents the object model for Salesforce Surveys. For more details and a larger image, visit the [Data Model Gallery](https://developer.salesforce.com/docs/platform/data-models/guide/salesforce-surveys.html). # Salesforce Surveys Standard Invocable Actions Send email survey invitations to leads, contacts, and users in your org based on an action. Also, send customized notifications to users about important events or updates to the records that they’re working on. - **[Dynamic Send Survey Invitation Actions](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/api-action/objects/actions-obj-dynamic-send-survey-invitation.md)** Send customized notifications to users about important events or updates to the records that they're working on. For example, notify account owners when a case is created. - **[Perform Survey Sentiment Analysis](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/api-action/objects/actions-obj-survey-sentiment-analysis.md)** Create or update the AI Sentiment Result records. You can get insights into the sentiments underlying survey responses and save the sentiment analysis in the SentimentAnalysisResult object. - **[Process Data Using Generative AI Action](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/api-action/objects/actions-obj-process-data-using-gen-ai.md)** Using Einstein Generative AI, perform Natural Language Processing (NLP) to summarize text, extract key phrases, analyze sentiment, and unlock valuable insights. - **[Send Survey Invitation Actions](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/api-action/objects/actions-obj-send-survey-invitation.md)** Send email survey invitations to leads, contacts, and users in your org based on an action. For example, send a survey invitation when a customer support case closes. - **[Transform NLP Action Results Action](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/api-action/objects/actions-obj-transform-nlp-action-result.md)** Transform an AI Natural Language Processing (NLP) result created by using Einstein Generative AI into an Apex Object record. # Salesforce Surveys Standard Objects Salesforce Feedback Management (SFM) provides you access to a suite of standard objects that you can find in Setup and as tabs in Salesforce. Use the standard objects to work with the core Surveys features. SFM is available in both Salesforce Classic ([not available in all orgs](https://help.salesforce.com/s/articleView?id=xcloud.overview_edition_lex_only.htm&type=5)) and Lightning Experience. SFM is available in Enterprise, Unlimited, and Developer editions. Here’s a list of standard objects available with SFM. - [Survey](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_survey.htm) Represents a survey. - [SurveyEmailBranding](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_surveyemailbranding.htm) Represents the configuration settings for invitation emails sent to survey participants for a particular survey. - [SurveyEngagementContext](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_surveyengagementcontext.htm) Represents the context based on which a survey invitation was sent or a survey response was received. This object is available in API version 49.0 and later. - [SurveyInvitation](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_surveyinvitation.htm) Represents the invitation sent to a participant to complete the survey. - [SurveyPage](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_surveypage.htm) Represents a page, such as the title page or a question page, in a survey. - [SurveyQuestion](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_surveyquestion.htm) Represents a question in a survey. - [SurveyQuestionChoice](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_surveyquestionchoice.htm) Represents an answer choice that a participant can select for a survey question. - [SurveyQuestionResponse](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_surveyquestionresponse.htm) Represents a participant’s answer to a specific question. - [SurveyQuestionScore](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_surveyquestionscore.htm) Represents the aggregate of responses for the following question types: date, multiple choice, picklist, radio, ranking, rating, scoring, slider, and [Net Promoter Score® (NPS®)](https://www.salesforce.com/content/dam/web/en_us/www/documents/legal/Agreements/product-specific-terms/net-promoter-and-nps.pdf). - [SurveyResponse](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_surveyresponse.htm) Represents information about a participant’s response to a survey, such as the status of the response, the participant’s location, and when the survey was completed. - [SurveySubject](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_surveysubject.htm) Represents a relationship between a survey and another object, such as an account or a case. - [SurveyVersion](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_surveyversion.htm) Represents a version of a survey. - [SurveyVersionAddlInfo](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_surveyversionaddlinfo.htm) Represents additional information about a survey version. This information defines the default settings of a survey version. This object is available in API version 49.0 and later. # Salesforce Surveys Translation Resources Use REST APIs to translate survey fields, view, update, or delete translated survey fields. The translated values of surveys fields are stored in Flow fields. The following survey fields can be translated: - Survey name - Pause message - Welcome message - Questions - Answer choices and ranking items - Thank you message - **[Add or Change the Translation of a Survey Field](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/request-survey-translate-add-change.md)** If a survey field can be translated or is already translated into a particular language, you can add or change the translated value of the survey field. This resource is available in REST API version 48.0 and later. - **[Add or Update the Translated Value of Multiple Survey Fields in One or More Languages](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/request-survey-translate-add-change-multiple.md)** If one or more survey fields can be translated or are already translated, you can add or update the translated values of the survey fields in the languages into which survey fields can be translated. This resource is available in REST API version 48.0 and later. - **[Delete the Translated Value of a Survey Field](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/request-survey-translate-delete.md)** After a survey field is translated into a particular language, you can delete the translated value of the survey field. This resource is available in REST API version 48.0 and later. - **[Delete the Translated Value of Multiple Survey Fields in One or More Languages](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/request-survey-translate-delete-multiple.md)** After survey fields are translated into one or more languages, you can delete the translated values of multiple survey fields. This resource is available in REST API version 48.0 and later. - **[Get Translated Value of a Survey Field](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/request-survey-translate-view.md)** After a survey field is translated into a particular language, you can use this resource to get the translated value of the survey field. This resource is available in REST API version 48.0 and later. - **[Get the Translated Values of Multiple Survey Fields in One or More Languages](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/request-survey-translate-view-multiple.md)** After survey fields are translated into one or more languages, you can view the translated values of multiple survey fields in the translated languages. This resource is available in REST API versions 48.0 and later. # Salesforce Surveys Use Cases Learn more about surveys through use cases and usage examples. Refer to the use cases and usage examples in this section to deepen your knowledge about using surveys. Learn how to: - Create in-app surveys. - Use Lightning Web Components (LWCs) for Surveys. - **[Creation of Surveys by Using Salesforce Feedback Management Response APIs](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/salesforce-create-in-app-surveys-use-case.md)** Learn how you can create surveys using the Salesforce Feedback Management Response APIs. - **[In-App Survey Overview](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/salesforce-in-app-survey-overview.md)** Get your environment ready before you create a sample in-app survey. With the Surveys setup ready in Salesforce, prepare survey details, create and send invitations, and collect survey responses. # Sample Call Center Definition File Each call center definition file looks different. This example shows you what a call center definition file looks like for an org using Salesforce Classic and Lightning Experience. **important:** The way you implement Open CTI depends on your org’s user interface. There are separate Open CTI APIs for Salesforce Classic and Lightning Experience. The `reqSalesforceCompatibilityMode` item in your call center definition file identifies the user interface you plan to use—Salesforce Classic, Lightning Experience, or both. If no value is specified, the default is `Classic`. This item is optional, but to make calls in Lightning Experience you must specify `Lightning` or `Classic_and_Lightning`. ## Sample XML for an Org Using Salesforce Classic ```xml
DemoAdapter Demo Call Center Adapter https://domain:port/softphone true 300 500 Classic
9 1 01
``` ## Sample XML for an Org Using Lightning Experience ```javascript
OpenCTI OpenCTI https://domain:port/softphone true 300 500 Lightning
9 1 01
``` # Sample Code for Using Lightning Message Service with Open CTI You can use the Lightning Message Service API to communicate with an Open CTI softphone. This example displays three buttons that subscribe, publish, and remove a message channel `servicedev1_SampleMC__c`. To use Open CTI, you must reference either `opencti.js` or `opencti_min.js` version 47.0 on your softphone adapter page. If you don't have these files, your Salesforce representative can provide them. In the `` of the HTML file, include the filepath for `opencti_min.js`. First, define a variable for the name of your message channel in the JavaScript section of your code. Here, we assign the message channel string `SAMPLEMC_c` to the variable `SAMPLEMC`. Next, create the variable `SAMPLEMC_SUBSCRIPTION` to hold the subscription object and assign it a null value. The `subscribeToSampleMC()` method first checks whether the subscription variable is empty. If the method is empty, it calls the `sforce.opencti.subscribe()` method. The `sforce.opencti.subscribe()` method has three parameters: - `channelName` - : The name of the message channel. - `listener` - : The listener function that’s invoked when a message is sent on the message channel. - `callback` - : The function that receives the subscription object. Assign this value to a variable such as `SAMPLEMC_SUBSCRIPTION`. The `subscribeToSampleMC()` method sets the `` tag in the HTML to _true_. Similarly, the `unsubscribeToSampleMC()` method checks whether there is a subscription object. If so, it calls `sforce.opencti.unsubscribe()`. The method `sforce.opencti.unsubscribe()` has two parameters: - subscription - : The subscription object that you want to unsubscribe from. - callback - : The function that handles the success or error output. The `unsubscribeToSampleMC()` method sets the`` tag in the HTML to _false_. The `publishSampleMC()` method is passed the message content that we want to publish. A message is a serialized JSON object. You can pass data such as strings, numbers, objects, and Boolean values. A message cannot contain functions and symbols. In this example, the message contains three strings: - Name of the sender, “LightningMessageService_OpenCTI_TestPage” - Type of message, “SampleMC” - Time when the message was sent The `publishSampleMC()` method calls `sforce.opencti.publish()` method, which takes three parameters: - channelName - : The name of the message channel to publish to. - message - : The message to publish as a serialized JSON object. - callback - : The function that handles the success or error output. The HTML markup displays the message channel’s name, indicates whether the channel is subscribed, and shows buttons to subscribe, unsubscribe, and publish on the channel. When clicked, these buttons call the respective `subscribeToSampleMC()`, `unsubscribeToSampleMC()`, and `publishSampleMC()` functions. The text area with the `id` set to `opencti_testMessageTextArea` shows the message text. ## Example ```html

MessageChannel: SampleMC

Subscribed: false



Received message: