• Partners
  • Email Us
  • Product
    • Channels
      • Voice
      • Email
      • SMS
      • Chat
      • Messenger
      • Omnichannel
    • Features
      • Predictive Dialer
      • VCC Live Pay
      • Outbound IVR
      • Inbound IVR
      • Voicemail Detection
      • Live Dashboards
      • ACD
      • Salesforce Integration
      • Dialogflow
  • Solutions
    • Customer Service
    • Sales Teams
    • Debt Collection
    • Virtual Call Center
  • Pricing
  • Resources
    • Blog
    • Case Studies
    • Ebooks
    • Courses
    • Webinars
    • Information Security
    • Learning Center
    • Developers
  • Company
    • About us
    • Careers
    • News
    • Partners
  • Partners
  • Email Us
+44 208 638 0169
GET STARTED
Developer GuidesClick 2 CallResourcesInteracting with a Script
  • Overview
    • About Click-to-Call
    • Setting up Click-to-Call
  • Resources
    • Initiating a Call
    • Hanging up a Call
    • Putting a Call on Hold
    • Interacting with a Script
Back to Support and Learning Center
English Hungarian

Interacting with a Script

Use the ‘/call/script’ resource to interact with scripts created in VCC Live’s projects.

To make this work, you need to set a Javascript code in the VCC Live Desk application that can handle HTTP requests, for example:

$().onHttpRequest = (query) => {
    vcc.alert(JSON.stringify(query));
}

This needs to be inserted in the Edit code section at project > Script Editor > Edit code

Then, other softwares can use this GET API to interact with the script:

Request
Method GET
Resource http://localhost:[port]/call//script?someKey1=someValue&someKey2=value
Options N/A
Body N/A
Response
Body Returns the response of the HTTP handler provided by the user in the Request resource.

The above request’s ‘someKey1=someValue&someKey2=value’ part is available for the JavaScript code added by the user, via the query parameter. In our example here, the query is a variable, that provides the following response in a pop-up window:

{someKey1: "someValue", someKey2: "value"}

If the JavaScript code, provided by the user gets a response, then that will be available in response body.

Example: the following code returns the name of the customer that is currently handled by the agent, in a response body.

$().onHttpRequest = () => {
    return vcc.getFieldValue("name");
}

Note: The ‘/script’ API does not work in Test mode, only in Prework, Call or Afterwork states.

Back to Support and Learning Center

Comments

Can’t find what you need? Use the comment section below to connect with others, get answers from our experts, or share your ideas with us.


There are no comments yet.

Click here to cancel reply.

Please note that by clicking on the Submit button, you agree to a member of VCC Live team contacting you with business offers. You can find detailed information on how we can establish contact with you in our Privacy Policy

  • Channels
    • Voice
    • Email
    • SMS
    • Chat
    • Messenger
    • Omnichannel
  • Main Features
    • Call Center Software
    • Predictive Dialer
    • VCC Live Pay
    • Outbound IVR
    • Inbound IVR
    • Voicemail Detection
    • Live Dashboards
    • ACD
    • Salesforce Integration
    • Dialogflow
  • Solutions
    • Customer Service
    • Sales Teams
    • Debt Collection
    • Virtual Call Center
  • Resources
    • Blog
    • Case Studies
    • Ebooks
    • Courses
    • Webinars
    • Information Security
    • Learning Center
    • Developers
    • Download
  • Company
    • About us
    • Careers
    • News
    • Partners
https://vcc.live/wp-content/uploads/2019/07/iso-cert-1.png https://vcc.live/wp-content/uploads/2019/07/iso-cert-2.png https://vcc.live/wp-content/uploads/2019/07/iso-cert-3.png
Social Media
https://vcc.live/wp-content/uploads/2019/07/linkedin.svg https://vcc.live/wp-content/uploads/2019/07/twitter.svg https://vcc.live/wp-content/uploads/2019/07/facebook-1.svg https://vcc.live/wp-content/uploads/2019/07/instagram-1.svg
Call us
Hungary
+36 19996400
UK
+44 2086380169
Germany
+49 3021782516
Poland
+48 123950886
Romania
+40 31706167
USA
+1 3024988337
Hungary
+36 19996400
UK
+44 2086380169
Germany
+49 3021782516
Poland
+48 123950886
Romania
+40 31706167
USA
+1 3024988337
  • Privacy Policy
  • Cookie Policy
  • Legal Statement
  • General Terms of Agreement
  • Magyar nyelvű jogi dokumentumok