此页面为开发人员构建特定应用程序的 GPT Action 提供说明和指南。在继续之前,请务必先熟悉以下信息
此页面为开发人员构建特定应用程序的 GPT Action 提供说明和指南。在继续之前,请务必先熟悉以下信息
这个特定的 GPT Action 概述了如何连接到 Salesforce,特别是 Salesforce Service Cloud。此 Action 中详细描述的架构允许用户直接从 ChatGPT 中提取案例数据和更新案例。为其他 Salesforce Cloud 解决方案创建 Actions 的设置过程使用相同的连接应用程序和身份验证设置,但需要不同的 API 架构。
价值:用户现在可以利用 ChatGPT 的自然语言功能直接连接到 Salesforce
示例用例:
在开始之前,请查看应用程序中的这些链接
在开始之前,请确保在您的应用程序环境中完成以下步骤
创建自定义 GPT 后,将以下文本复制到“Instructions”(指令)面板中。有疑问?查看入门示例,了解此步骤的详细工作原理。
**Context**: Your purpose is to pull information from Service Cloud, and push updates to cases. A user is going to ask you a question and ask you to make updates.
**Instructions**:
1. When a user asks you to help them solve a case in Service Cloud, ask for the case number and pull the details for the case into the conversation using the getCaseDetailsFromNumber action.
2. If the user asks you to update the case details, use the action updateCaseStatus.
**Example**:
User: Help me solve case 00001104 in Service Cloud.
创建自定义 GPT 后,将以下文本复制到“Actions”(操作)面板中。有疑问?查看入门示例,了解此步骤的详细工作原理。
openapi: 3.1.0
info:
title: Salesforce Service Cloud Case Update API
description: API for updating the status of Service Cloud tickets (cases) in Salesforce.
version: 1.0.3
servers:
- url: https://your_instance.my.salesforce.com
description: Base URL for your Salesforce instance (replace 'your_instance' with your actual Salesforce domain)
paths:
/services/data/v60.0/sobjects/Case/{CaseId}:
patch:
operationId: updateCaseStatus
summary: Updates the status of a Service Cloud case
description: Updates the status of a Service Cloud ticket based on the case ID number.
parameters:
- name: CaseId
in: path
required: true
description: The ID of the case to update.
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
Status:
type: string
description: The new status of the case.
responses:
'204':
description: Successfully updated the case status
'400':
description: Bad request - invalid input or case ID not found
'401':
description: Unauthorized - authentication required
'404':
description: Not Found - case ID does not exist
delete:
operationId: deleteCase
summary: Deletes a Service Cloud case
description: Deletes a Service Cloud ticket based on the case ID number.
parameters:
- name: CaseId
in: path
required: true
description: The ID of the case to delete.
schema:
type: string
responses:
'204':
description: Successfully deleted the case
'400':
description: Bad request - invalid case ID
'401':
description: Unauthorized - authentication required
'404':
description: Not Found - case ID does not exist
/services/data/v60.0/query:
get:
operationId: getCaseDetailsFromNumber
summary: Retrieves case details using a case number
description: Retrieves the details of a Service Cloud case associated with a given case number.
parameters:
- name: q
in: query
required: true
description: SOQL query string to find the Case details based on Case Number.
schema:
type: string
example: "SELECT Id, CaseNumber, Status, Subject, Description FROM Case WHERE CaseNumber = '123456'"
responses:
'200':
description: Successfully retrieved the case details
content:
application/json:
schema:
type: object
properties:
totalSize:
type: integer
done:
type: boolean
records:
type: array
items:
type: object
properties:
Id:
type: string
CaseNumber:
type: string
Status:
type: string
Subject:
type: string
Description:
type: string
'400':
description: Bad request - invalid query
'401':
description: Unauthorized - authentication required
'404':
description: Not Found - case number does not exist
以下是关于使用此第三方应用程序设置身份验证的说明。有疑问?查看入门示例,了解此步骤的详细工作原理。
在 ChatGPT 中设置身份验证之前,请在应用程序中执行以下步骤。
在 ChatGPT 中设置身份验证之前,请在应用程序中执行以下步骤。
在 ChatGPT 中,单击 “Authentication”(身份验证)并选择 “OAuth”。输入以下信息。
在 ChatGPT 中设置身份验证后,请按照应用程序中的以下步骤完成 Action。
您希望我们优先考虑哪些集成?我们的集成中是否存在错误?在我们的 github 中提交 PR 或 issue,我们会查看。