refernce. 개 없음.
나박에.없음.ㅋ
import React, { useEffect } from "react";
import Zendesk from "react-zendesk";
function CreateTicket() {
const setting = {
webWidget: {
helpCenter: {
suppress: true,
},
contactForm: {
suppress: false,
},
ticketForm: {
suppress: true,
subject: true,
fields: [
{
id: "description",
prefill: {
"*": "Default ticket description",
},
},
],
},
},
};
return (
<>
<Zendesk defer zendeskKey={process.env.REACT_APP_ZENDESK_KEY} {...setting} onLoaded={() => console.log('is loaded')} />
</>
);
}
export default CreateTicket;
=============================================================================================
=============================================================================================
=============================================================================================
===================== 하기는 chatGPT가 알려준 코드, react-zendesk 라이브러리 사용하지 않음 ========================
=============================================================================================
=============================================================================================
=============================================================================================
{"ticket": {"subject": "My printer is on fire!", "comment": {"body": "The smoke is very colorful."}}}
import React, { useEffect } from "react";
function ZendeskTicketForm() {
useEffect(() => {
// Zendesk Embeddables 스크립트를 동적으로 로드
const script = document.createElement("script");
script.src = "https://static.zdassets.com/ekr/snippet.js?key=your-zendesk-key"; // zendesk 계정 key 값 .env에서 관리 ?
script.async = true;
document.body.appendChild(script);
// Zendesk 초기화
window.zESettings = {
webWidget: {
// Zendesk 티켓 발행 버튼 클릭 시 동작할 함수 지정
onHelpCenterSubmit: function(data) {
// 티켓 발행 처리 로직 작성
// data 객체를 통해 사용자 입력 정보에 접근 가능
console.log("티켓 발행 처리:", data);
}
}
};
}, []);
return (
<div>
<h1>Zendesk Embeddables 예제</h1>
<button onClick={() => window.zE.activate()}>티켓 발행</button>
</div>
);
}
export default ZendeskTicketForm;
Exploring the Zendesk API provides a solid foundation for enhancing your customer support capabilities. To further maximize the effectiveness of Zendesk, especially in a global setting, incorporating translation features is crucial. The zendesk translation guide offers detailed insights on how to implement multi-language support, enabling you to cater to a diverse customer base efficiently. This can significantly boost user satisfaction by providing support in their native language. How are you planning to integrate these translation capabilities into your Zendesk setup?