DFO 채팅 채널 JSON 스키마

DFO 라이브 채팅닫힘 실시간으로 상호작용하는 상담원 및 컨택입니다이나 채팅 메시지닫힘 컨택에 언제든 채팅 메시지를 보내고 회신을 기다리는 비동기 채팅입니다 채널로 메시지를 전송할 때 다음 스키마를 사용합니다. 이 스키마의 요소에 사용하는 모든 ID는 고유해야 합니다. 이같은 특정 요소에 포스트백 등의 이벤트가 발생하도록 이전에 정의했던 요소를 참조하는 경우는 예외입니다.

도움말 사이트에서 다음 스키마를 사용할 수 있습니다.

  • 캐러셀
  • 이미지
  • 마크다운
  • 단일 응답에서 여러 메시지
  • 프롬프트
  • 빠른 응답
  • 텍스트
  • URL:

스키마는 아래에 포함되어 있습니다. 각 스키마가 포함된 JSON 텍스트 파일이 포함된 ZIP 파일을 다운로드할 수도 있습니다.

DFO미러 도구를 사용하여 라이브 채팅 채널에 사용할 JSON을 확인합니다.

캐러셀

{
"prompts": [{
"mediaSpecificObject": {
"dfoMessage": {
"messageContent": {
"type": "PLUGIN",
"payload": {
	"elements": [
	{
	"id": "Ek4tPy1h4",
	"type": "MENU",
	"elements": [
	{
	"id": "Uk4tPy1h2",
	"type": "FILE",
	"url": "https://picsum.photos/300/150",
	"filename": "photo.jpg",
	"mimeType": "image/jpeg"
	},
	{
	"id": "Ck4tPy1h3",
	"type": "TITLE",
	"text": "Hello!"
	},
	{
	"id": "Ek4tPy1h1",
	"type": "TEXT",
	"text": "Lorem Impsum..."
	},
	{
	"id": "Nkm0hRAiE",
	"type": "BUTTON",
	"text": "Click me!",
	"postback": "click-on-button-1"
	},
	{
	"id": "EyCyTRCi4",
	"type": "BUTTON",
	"text": "Aww don`t click on me",
	"postback": "click-on-button-2"
	}
	]
	},
	{
	"id": "Ek4tPy1h52",
	"type": "MENU",
	"elements": [
		{
		"id": "Uk4tPy1h22",
		"type": "FILE",
		"url": "https://picsum.photos/300/150",
		"filename": "photo.jpg",
		"mimeType": "image/jpeg"
		},
		{
		"id": "Ck4tPy1h32",
		"type": "TITLE",
		"text": "Hello!"
		},
		{
		"id": "Ek4tPy1h12",
		"type": "TEXT",
		"text": "Lorem Impsum..."
		},
		{
		"id": "Nkm0hRAiE2",
		"type": "BUTTON",
		"text": "Click me!",
		"postback": "click-on-button-1"
		},
		{
		"id": "NkGJ6CAiN2",
		"type": "BUTTON",
		"text": "Aww don`t click on me",
		"postback": "click-on-button-2"
		 }
		]
	   }
	  ]
	 }
	}
   }
  }
 }
]
}
		

이미지

{
"prompts": [{
  "mediaSpecificObject": {
    "dfoMessage": {
    "messageContent": {
      "type": "PLUGIN",
      "payload": {
	    "elements": [{
		  "id": "bf2521f4-5e85-413f-b6ed-815d1c3905f0",
		  "type": "FILE",
		  "filename": "photo.jpg",
		  "url": "https://picsum.photos/300/150",
		  "mimeType": "image/jpeg"
		}
	   ]
	  }
	 }
	}
   }
  }
 ]
}

마크다운

{
"prompts": [{
  "mediaSpecificObject": {
    "dfoMessage": {
	  "messageContent": {
		"type": "PLUGIN",
		"payload": {
		  "elements": [
			{
			"id": "Ukm0hRAiA",
			"type": "TEXT",
			"mimeType": "text/markdown",
			"text": "**bold text**, *italicized text*, [URL](https://www.NICE.com), ~~Strikethrough~~
				1. Ordered List 1
				2. Ordered List 2
				3. Ordered List 3
				- Bullet list 1
				- Bullet list 2"
			}
		   ]
		  }
		 }
	    }
	  }
	}
  ]
}

단일 응답에서 여러 메시지

{
"prompts": [
 {
	"transcript": "This is message one.",
	"base64EncodedG711ulawWithWavHeader": "",
	"audioFilePath": null,
	"textToSpeech": null,
	"mediaSpecificObject": null
 },
 {
	"transcript": "This is message two.",
	"base64EncodedG711ulawWithWavHeader": "",
	"audioFilePath": null,
	"textToSpeech": null,
	"mediaSpecificObject": null
 },
 {
	"transcript": "This is message three.",
	"base64EncodedG711ulawWithWavHeader": "",
	"audioFilePath": null,
	"textToSpeech": null,
	"mediaSpecificObject": null
 }
 ]
}

프롬프트

{
"prompts":[{
 "transcript":"Welcome! Choose Sales or Support and an agent will be with you shortly."
  },
  {
   "mediaSpecificObject":{
    "dfoMessage":{
     "messageContent":{
      "type":"PLUGIN",
      "payload":{
      "postback":"",
      "elements":[{
        "id":"Ek4tPy1h4",
        "type":"TEXT_AND_BUTTONS",
        "elements":[{
          "id":"TID1",
          "type":"TEXT",
          "text":"Please select an option"
         },
        {
        "id":"BID1",
        "type":"BUTTON",
        "text":"Sales",
        "postback":"payment-button-1"
        },
        {
        "id":"BID2",
        "type":"BUTTON",
        "text":"Support",
        "postback":"payment-button-2"
        }
       ]
      }
     ]
    }
    }
   }
  }
  }
 ]
}

빠른 응답

{
"prompts": [{
 "mediaSpecificObject": {
  "dfoMessage": {
   "messageContent": {
   "type": "QUICK_REPLIES",
   "fallbackText": "Text sent if rich message is not available on external platform",
   "payload": {
    "text": {
      "content": "Prompt text"
    },
	"actions": [
	{
	 "type": "REPLY_BUTTON",
	 "text": "Button1Text",
	 "postback": "/Button1"
	},
	{
	  "type": "REPLY_BUTTON",
	  "text": "Button2Text",
	  "postback": "/Button1"
	}
	]
	}
	}
   }
  }
  }
 ]
}

텍스트

{
"prompts": [{
 "mediaSpecificObject": {
   "dfoMessage": {
    "messageContent": {
      "type": "TEXT",
      "payload": {
      "text": "Test Outbound Message"
      }
     }
    }
   }
  }
 ]
}

URL:

{
"prompts": [{
 "mediaSpecificObject": {
  "dfoMessage": {
   "messageContent": {
    "type": "PLUGIN",
     "payload": {
      "elements": [
      {
      "id": "richLink_7329c009-4a36-493c-8435-80874a15175e",
      "type": "MENU",
      "elements": [
      //{
      //    "id": "bf2521f4-5e85-413f-b6ed-815d1c3905f0",
      //    "type": "FILE",
      //    "filename": "photo.jpg",
      //    "url": "https://picsum.photos/300/150",
      //    "mimeType": "image/jpeg"
      //},
     {
      "id": "7329c009-4a36-493c-8435-80874a1517524",
      "type": "BUTTON",
      "text": "RichLink Title",
      "url": "https://www.nice.com/"
      }
     ]
    }
    ]
   }
   }
   }
  }
 }
]
}