getScriptVariable

Reading Time: 1 minute

Gets every variable that can be used in a script page’s text control. For example {agent.name}.

Description

vcc.getScriptVariable(name: string): string|null

List of available variables:

  • id
  • numberid
  • projectid
  • project.id
  • project.name
  • global.commission
  • global.price
  • agent.name
  • agent.username
  • agent.email
  • agent.status
  • agent.extension
  • agent.userid
  • agent.teams_name
  • agent.group_name
  • source
  • destination
  • global.ccphone
  • global.clientphone
  • global.dtmf
  • global.uuid
  • global.shortid
  • contact.name
  • contact.title
  • contact.phone
  • contact.email
  • global.ivr.(.+)$: equivalent withgetChannelVariable
  • ^agent.custom.(w*)$: return a customField

Parameters

name
The name of the variable.

Return values

The value of the variable, or null if there is no source.

Example

You want to insert the agent name into a field.

$().onLoad = function() {
     vcc.setFieldValue('agent', vcc.getScriptVariable('agent.name'));
};

There are no comments yet.
Subscribe to our newsletter
or Contact us!
Please note that by subscribing to our newsletter, you agree to receive regular email messages from VCC Live® about service related news and updates. By subscribing to our newsletter, you also agree that VCC Live® will use your data in accordance with the applicable Privacy Policy until you unsubscribe from the newsletter.