integrating Zendesk Talk API code in the telephony system

强颜欢笑 提交于 2019-11-30 20:30:17

问题


I have existing telephony system and now I want to integrate into zendesk, I have gone through Talk Partner Edition API .

I already asked you about this in this Zendesk Question, and thanks to a member with us jimmy Long, things are seems to be clear, but i wanna know more about how i will write code, so i have another Questions.

Question 1: if i wanna create a call ticket in the zendesk automatically from telephony system as a code java-script, should i write it in the telephony system like this ?? or there is another script ??

$.ajax({
    url: '/api/v2/channels/voice/tickets.json',
    contentType:'application/json',
    type: 'POST',
    data: JSON.stringify({
                            "ticket": {
                                            "via_id": 45,
                                            "description": "Voicemail from: +0000000000",
                                            "voice_comment": {
                                            "from": "+00000000000",
                                            "to": "+000000000000",
                                            "recording_url": "http://XXXXXX.zendesk.com/recordings/1.mp3",
                                            "started_at": "2019-02-26 14:08:36 +0000",
                                            "call_duration": 40,
                                            "answered_by_id": 374879813254,
                                            "transcription_text": "The transcription of the call",
                                            "location": "XXXX, YYYYY"
                                                                }
                                        }                           
                        })
  })
  .done(function(data) {
    console.log(data.ticket);
  });

Question 2: for example we have in the code a line contain ("transcription text": "The transcription of the call") ??

can i change the constant value ("The transcription of the call") to a variable , i mean can i change "The transcription of the call" to a dynamic variable,


Question 3: can i send all this information in a URL, i mean sending data in a url like (http://XXXX.zendesk.com/api/v2/channels/voice/tickets.json/data1/data2/data3....) ??

来源:https://stackoverflow.com/questions/55091689/integrating-zendesk-talk-api-code-in-the-telephony-system

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!