UserMessage

ข้อความที่ส่งจากผู้ใช้ไปยังตัวแทน

UserMessage จะปรากฏในช่อง data ของออบเจ็กต์ message ที่ Agent ได้รับ ช่อง data เป็นสตริงที่เข้ารหัสแบบ Base64 ที่ Agent ต้องแปลงเป็นไบต์และแยกวิเคราะห์ด้วยบัฟเฟอร์โปรโตคอล UserMessage

การแสดง JSON
{
  "requestId": string,
  "conversationId": string,
  "customAgentId": string,
  "agent": string,
  "context": {
    object (Context)
  },
  "sendTime": string,
  "dialogflowResponse": {
    object (DialogflowResponse)
  },

  // Union field payload can be only one of the following:
  "message": {
    object (Message)
  },
  "receipts": {
    object (Receipts)
  },
  "userStatus": {
    object (UserStatus)
  },
  "surveyResponse": {
    object (SurveyResponse)
  },
  "suggestionResponse": {
    object (SuggestionResponse)
  },
  "authenticationResponse": {
    object (AuthenticationResponse)
  }
  // End of list of possible types for union field payload.
}
ช่อง
requestId

string

ตัวระบุที่ไม่ซ้ำกันของข้อความของผู้ใช้ ใช้ช่องนี้เพื่อกรองข้อความขาเข้าที่ซ้ำกันออก

conversationId

string

ตัวระบุที่ไม่ซ้ำกันของการสนทนา

customAgentId

string

ตัวระบุที่กำหนดเองสำหรับตัวแทน พาร์ทเนอร์เป็นผู้กำหนดในระหว่างการลงทะเบียนตัวแทน

agent

string

ตัวระบุสำหรับตัวแทน ตั้งค่าระหว่างการสร้าง Agent

context

object (Context)

ข้อมูลตามบริบทที่เชื่อมโยงกับข้อความ

sendTime

string (Timestamp format)

เวลาที่ส่งข้อความ

การประทับเวลาจะอยู่ในรูปแบบ RFC3339 UTC "Zulu" ที่มีความละเอียดระดับนาโนวินาทีและมีตัวเลขเศษส่วนได้สูงสุด 9 หลัก ตัวอย่าง: "2014-10-02T15:01:23Z" และ "2014-10-02T15:01:23.045123456Z"

dialogflowResponse

object (DialogflowResponse)

การตอบสนองของ Dialogflow

ฟิลด์การรวม payload เพย์โหลดของข้อความสำหรับผู้ใช้ payload ต้องเป็นค่าใดค่าหนึ่งต่อไปนี้เท่านั้น
message

object (Message)

เนื้อหาของข้อความ

receipts

object (Receipts)

เนื้อหาของใบเสร็จ

userStatus

object (UserStatus)

เนื้อหาของสถานะผู้ใช้

surveyResponse

object (SurveyResponse)

คำตอบแบบสำรวจ

suggestionResponse

object (SuggestionResponse)

การตอบกลับคำแนะนำ

authenticationResponse

object (AuthenticationResponse)

การตอบกลับการตรวจสอบสิทธิ์

UserStatus

สถานะของผู้ใช้

การแสดง JSON
{
  "createTime": string,

  // Union field status can be only one of the following:
  "isTyping": boolean,
  "requestedLiveAgent": boolean
  // End of list of possible types for union field status.
}
ช่อง
createTime

string (Timestamp format)

เวลาที่สถานะผู้ใช้เปลี่ยนแปลง

การประทับเวลาจะอยู่ในรูปแบบ RFC3339 UTC "Zulu" ที่มีความละเอียดระดับนาโนวินาทีและมีตัวเลขเศษส่วนได้สูงสุด 9 หลัก ตัวอย่าง: "2014-10-02T15:01:23Z" และ "2014-10-02T15:01:23.045123456Z"

ฟิลด์การรวม status

status ต้องเป็นค่าใดค่าหนึ่งต่อไปนี้เท่านั้น

isTyping

boolean

ผู้ใช้กำลังพิมพ์อยู่หรือไม่

requestedLiveAgent

boolean

ผู้ใช้ขอตัวแทนแบบเรียลไทม์หรือไม่