1

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....) ??

akira
  • 193
  • 3
  • 16
  • How much of this have you tried implementing so far, and what was the response from Zendesk? From the top of my head, the first two are possible, and the third is not. If the first two are not working, we may have to investigate in more detail. – Jimmy Long Mar 11 '19 at 06:03
  • @JimmyLong for the (Question 1) i launch the script in the console of google chrome, and it work. but for the (Question 2) i don't know how can i do it , I searched for an example who can help me to understand but I did not find it – akira Mar 11 '19 at 08:26
  • Are you just looking for a JS variable? https://www.w3schools.com/js/js_variables.asp – Jimmy Long Mar 11 '19 at 13:07

0 Answers0